@launchdarkly/toolbar 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/toolbar.min.js +1 -1
- package/dist/angular.cjs +1 -1
- package/dist/core/ui/Toolbar/types/ldApi.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/js/816.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/vue.cjs +1 -1
- package/package.json +1 -1
package/cdn/toolbar.min.js
CHANGED
|
@@ -304,7 +304,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
|
|
|
304
304
|
`,gH(l,e)):(l.description!==e.description&&(e.description.length>l.description.length&&a.updateDescription(e.description),ug.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view.
|
|
305
305
|
`,`Details:
|
|
306
306
|
`,gU(l,e),`The longer description will be used.
|
|
307
|
-
To resolve the conflict:`,gH(l,e))),i=a)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},e}(),gJ=function(){function e(e){this._backingStorages=e}return e.prototype.record=function(e,t,r,n){this._backingStorages.forEach(function(i){i.record(e,t,r,n)})},e}(),gQ=function(){function e(e,t){this._instrumentName=e,this._valueType=t,this._buffer=new gV}return e.prototype.observe=function(e,t){(void 0===t&&(t={}),"number"!=typeof e)?ug.warn("non-number value provided to metric "+this._instrumentName+": "+e):(this._valueType!==cF.INT||Number.isInteger(e)||(ug.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),Number.isInteger(e=Math.trunc(e))))&&this._buffer.set(t,e)},e}(),gq=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(e,t,r){if(void 0===r&&(r={}),gA(e)){var n=this._buffer.get(e);if(null==n&&(n=new gV,this._buffer.set(e,n)),"number"!=typeof t)return void ug.warn("non-number value provided to metric "+e._descriptor.name+": "+t);(e._descriptor.valueType!==cF.INT||Number.isInteger(t)||(ug.warn("INT value type cannot accept a floating-point value for "+e._descriptor.name+", ignoring the fractional digits."),Number.isInteger(t=Math.trunc(t))))&&n.set(r,t)}},e}(),g$=function(e,t,r,n){return new(r||(r=Promise))(function(t,i){function o(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var n;e.done?t(e.value):((n=e.value)instanceof r?n:new r(function(e){e(n)})).then(o,s)}a((n=n.apply(e,[])).next())})},g0=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var l=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},g1=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},g2=function(e,t,r){if(2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},g5=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(e,t){this._findCallback(e,t)>=0||this._callbacks.push({callback:e,instrument:t})},e.prototype.removeCallback=function(e,t){var r=this._findCallback(e,t);r<0||this._callbacks.splice(r,1)},e.prototype.addBatchCallback=function(e,t){var r=new Set(t.filter(gA));0===r.size?ug.error("BatchObservableCallback is not associated with valid instruments",t):this._findBatchCallback(e,r)>=0||this._batchCallbacks.push({callback:e,instruments:r})},e.prototype.removeBatchCallback=function(e,t){var r=new Set(t.filter(gA)),n=this._findBatchCallback(e,r);n<0||this._batchCallbacks.splice(n,1)},e.prototype.observe=function(e,t){return g$(this,void 0,void 0,function(){var r,n;return g0(this,function(i){switch(i.label){case 0:return r=this._observeCallbacks(e,t),n=this._observeBatchCallbacks(e,t),[4,function(e){return mr(this,void 0,void 0,function(){var t=this;return mn(this,function(r){return[2,Promise.all(e.map(function(e){return mr(t,void 0,void 0,function(){return mn(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e];case 1:return[2,{status:"fulfilled",value:t.sent()}];case 2:return[2,{status:"rejected",reason:t.sent()}];case 3:return[2]}})})}))]})})}(g2(g2([],g1(r),!1),g1(n),!1))];case 1:return[2,i.sent().filter(md).map(function(e){return e.reason})]}})})},e.prototype._observeCallbacks=function(e,t){var r=this;return this._callbacks.map(function(n){var i=n.callback,o=n.instrument;return g$(r,void 0,void 0,function(){var r,n;return g0(this,function(s){switch(s.label){case 0:return n=Promise.resolve(i(r=new gQ(o._descriptor.name,o._descriptor.valueType))),null!=t&&(n=mu(n,t)),[4,n];case 1:return s.sent(),o._metricStorages.forEach(function(t){t.record(r._buffer,e)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(e,t){var r=this;return this._batchCallbacks.map(function(n){var i=n.callback,o=n.instruments;return g$(r,void 0,void 0,function(){var r,n;return g0(this,function(s){switch(s.label){case 0:return n=Promise.resolve(i(r=new gq)),null!=t&&(n=mu(n,t)),[4,n];case 1:return s.sent(),o.forEach(function(t){var n=r._buffer.get(t);null!=n&&t._metricStorages.forEach(function(t){t.record(n,e)})}),[2]}})})})},e.prototype._findCallback=function(e,t){return this._callbacks.findIndex(function(r){return r.callback===e&&r.instrument===t})},e.prototype._findBatchCallback=function(e,t){return this._batchCallbacks.findIndex(function(r){return r.callback===e&&function(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var i=ms(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(!t.has(s))return!1}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0}(r.instruments,t)})},e}(),g3=(bV=function(e,t){return(bV=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}bV(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),g9=function(e){function t(t,r,n,i,o){var s=e.call(this,t)||this;return s._attributesProcessor=n,s._aggregationCardinalityLimit=o,s._deltaMetricStorage=new gP(r,s._aggregationCardinalityLimit),s._temporalMetricStorage=new gD(r,i),s}return g3(t,e),t.prototype.record=function(e,t,r,n){t=this._attributesProcessor.process(t,r),this._deltaMetricStorage.record(e,t,r,n)},t.prototype.collect=function(e,t){var r=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,r,t)},t}(gZ),g4=(bW=function(e,t){return(bW=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}bW(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),g6=function(){function e(){}return e.Noop=function(){return be},e}(),g7=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g4(t,e),t.prototype.process=function(e,t){return e},t}(g6);function g8(e){var t=g6.call(this)||this;return t._allowedAttributeNames=e,t}g4(g8,g6),g8.prototype.process=function(e,t){var r=this,n={};return Object.keys(e).filter(function(e){return r._allowedAttributeNames.includes(e)}).forEach(function(t){return n[t]=e[t]}),n};var be=new g7,bt=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var l=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},br=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},bn=function(){function e(e,t){this._meterProviderSharedState=e,this._instrumentationScope=t,this.metricStorageRegistry=new gK,this.observableRegistry=new g5,this.meter=new gN(this)}return e.prototype.registerMetricStorage=function(e){var t=this._registerMetricStorage(e,g9);return 1===t.length?t[0]:new gJ(t)},e.prototype.registerAsyncMetricStorage=function(e){return this._registerMetricStorage(e,gB)},e.prototype.collect=function(e,t,r){var n,i,o;return n=this,i=void 0,o=function(){var n,i,o;return bt(this,function(s){switch(s.label){case 0:return[4,this.observableRegistry.observe(t,r?.timeoutMillis)];case 1:return n=s.sent(),0===(i=this.metricStorageRegistry.getStorages(e)).length?[2,null]:0===(o=i.map(function(r){return r.collect(e,t)}).filter(ma)).length?[2,{errors:n}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:o},errors:n}]}})},new(i||(i=Promise))(function(e,t){function r(e){try{a(o.next(e))}catch(e){t(e)}}function s(e){try{a(o.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):((n=t.value)instanceof i?n:new i(function(e){e(n)})).then(r,s)}a((o=o.apply(n,[])).next())})},e.prototype._registerMetricStorage=function(e,t){var r=this,n=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope).map(function(n){var i,o,s={name:null!=(i=n.name)?i:e.name,description:null!=(o=n.description)?o:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice},a=r.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(null!=a)return a;var l=n.aggregation.createAggregator(s),c=new t(s,l,n.attributesProcessor,r._meterProviderSharedState.metricCollectors,n.aggregationCardinalityLimit);return r.metricStorageRegistry.register(c),c});if(0===n.length){var i=this._meterProviderSharedState.selectAggregations(e.type).map(function(n){var i=br(n,2),o=i[0],s=i[1],a=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(o,e);if(null!=a)return a;var l=s.createAggregator(e),c=o.selectCardinalityLimit(e.type),u=new t(e,l,g6.Noop(),[o],c);return r.metricStorageRegistry.registerForCollector(o,u),u});n=n.concat(i)}return n},e}(),bi=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bo=function(){function e(e){this.resource=e,this.viewRegistry=new gx,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(e){var t,r,n=e.name+":"+(null!=(t=e.version)?t:"")+":"+(null!=(r=e.schemaUrl)?r:""),i=this.meterSharedStates.get(n);return null==i&&(i=new bn(this,e),this.meterSharedStates.set(n,i)),i},e.prototype.selectAggregations=function(e){var t,r,n=[];try{for(var i=bi(this.metricCollectors),o=i.next();!o.done;o=i.next()){var s=o.value;n.push([s,s.selectAggregation(e)])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},e}(),bs=function(e,t,r,n){return new(r||(r=Promise))(function(t,i){function o(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var n;e.done?t(e.value):((n=e.value)instanceof r?n:new r(function(e){e(n)})).then(o,s)}a((n=n.apply(e,[])).next())})},ba=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var l=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},bl=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},bc=function(e,t,r){if(2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},bu=function(){function e(e,t){this._sharedState=e,this._metricReader=t}return e.prototype.collect=function(e){return bs(this,void 0,void 0,function(){var t,r,n,i=this;return ba(this,function(o){switch(o.label){case 0:return t=mK(Date.now()),r=[],n=[],[4,Promise.all(Array.from(this._sharedState.meterSharedStates.values()).map(function(o){return bs(i,void 0,void 0,function(){var i;return ba(this,function(s){switch(s.label){case 0:return[4,o.collect(this,t,e)];case 1:return i=s.sent(),i?.scopeMetrics!=null&&r.push(i.scopeMetrics),i?.errors!=null&&n.push.apply(n,bc([],bl(i.errors),!1)),[2]}})})}))];case 1:return o.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:n}]}})})},e.prototype.forceFlush=function(e){return bs(this,void 0,void 0,function(){return ba(this,function(t){switch(t.label){case 0:return[4,this._metricReader.forceFlush(e)];case 1:return t.sent(),[2]}})})},e.prototype.shutdown=function(e){return bs(this,void 0,void 0,function(){return ba(this,function(t){switch(t.label){case 0:return[4,this._metricReader.shutdown(e)];case 1:return t.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(e){return this._metricReader.selectAggregationTemporality(e)},e.prototype.selectAggregation=function(e){return this._metricReader.selectAggregation(e)},e.prototype.selectCardinalityLimit=function(e){var t,r,n;return null!=(n=null==(r=(t=this._metricReader).selectCardinalityLimit)?void 0:r.call(t,e))?n:2e3},e}(),bd=function(e,t,r,n){return new(r||(r=Promise))(function(t,i){function o(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var n;e.done?t(e.value):((n=e.value)instanceof r?n:new r(function(e){e(n)})).then(o,s)}a((n=n.apply(e,[])).next())})},bh=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var l=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},bp=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bf=function(){function e(e){if(this._shutdown=!1,this._sharedState=new bo((s=null==(o=e?.mergeResourceWithDefaults)||o,a=e?.resource??pu.empty(),s?pu.default().merge(a):a)),e?.views!=null&&e.views.length>0)try{for(var t,r,n,i,o,s,a,l=bp(e.views),c=l.next();!c.done;c=l.next()){var u=c.value;this._sharedState.viewRegistry.addView(u)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}if(e?.readers!=null&&e.readers.length>0)try{for(var d=bp(e.readers),h=d.next();!h.done;h=d.next()){var p=h.value;this.addMetricReader(p)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}return e.prototype.getMeter=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r={}),this._shutdown?(ug.warn("A shutdown MeterProvider cannot provide a Meter"),cI):this._sharedState.getMeterSharedState({name:e,version:t,schemaUrl:r.schemaUrl}).meter},e.prototype.addMetricReader=function(e){var t=new bu(this._sharedState,e);e.setMetricProducer(t),this._sharedState.metricCollectors.push(t)},e.prototype.shutdown=function(e){return bd(this,void 0,void 0,function(){return bh(this,function(t){switch(t.label){case 0:return this._shutdown?(ug.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(t){return t.shutdown(e)}))]);case 1:return t.sent(),[2]}})})},e.prototype.forceFlush=function(e){return bd(this,void 0,void 0,function(){return bh(this,function(t){switch(t.label){case 0:return this._shutdown?(ug.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(t){return t.forceFlush(e)}))];case 1:return t.sent(),[2]}})})},e}();function bm(e,t){return e.dataPoints.map(function(r){var n=e.descriptor.valueType,i={attributes:me(r.attributes),startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)};switch(n){case cF.INT:i.asInt=r.value;break;case cF.DOUBLE:i.asDouble=r.value}return i})}var bg=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bb=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},bv={serializeRequest:function(e){var t,r=(t={useLongBits:!1},{resourceMetrics:[e].map(function(e){var r,n,i;return r=f4(t),{resource:f7(e.resource),schemaUrl:void 0,scopeMetrics:(n=e.scopeMetrics,i=r,Array.from(n.map(function(e){return{scope:f8(e.scope),metrics:e.metrics.map(function(e){return function(e,t){var r,n,i,o,s={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},a=function(e){switch(e){case my.DELTA:return 1;case my.CUMULATIVE:return 2}}(e.aggregationTemporality);switch(e.dataPointType){case mw.SUM:s.sum={aggregationTemporality:a,isMonotonic:e.isMonotonic,dataPoints:bm(e,t)};break;case mw.GAUGE:s.gauge={dataPoints:bm(e,t)};break;case mw.HISTOGRAM:s.histogram={aggregationTemporality:a,dataPoints:(r=e,n=t,r.dataPoints.map(function(e){var t=e.value;return{attributes:me(e.attributes),bucketCounts:t.buckets.counts,explicitBounds:t.buckets.boundaries,count:t.count,sum:t.sum,min:t.min,max:t.max,startTimeUnixNano:n.encodeHrTime(e.startTime),timeUnixNano:n.encodeHrTime(e.endTime)}}))};break;case mw.EXPONENTIAL_HISTOGRAM:s.exponentialHistogram={aggregationTemporality:a,dataPoints:(i=e,o=t,i.dataPoints.map(function(e){var t=e.value;return{attributes:me(e.attributes),count:t.count,min:t.min,max:t.max,sum:t.sum,positive:{offset:t.positive.offset,bucketCounts:t.positive.bucketCounts},negative:{offset:t.negative.offset,bucketCounts:t.negative.bucketCounts},scale:t.scale,zeroCount:t.zeroCount,startTimeUnixNano:o.encodeHrTime(e.startTime),timeUnixNano:o.encodeHrTime(e.endTime)}}))}}return s}(e,i)}),schemaUrl:e.scope.schemaUrl}})))}})});return new TextEncoder().encode(JSON.stringify(r))},deserializeResponse:function(e){return JSON.parse(new TextDecoder().decode(e))}},by={serializeRequest:function(e){var t={resourceSpans:function(e,t){for(var r=function(e){var t,r,n=new Map;try{for(var i=bg(e),o=i.next();!o.done;o=i.next()){var s=o.value,a=n.get(s.resource);a||(a=new Map,n.set(s.resource,a));var l=s.instrumentationLibrary.name+"@"+(s.instrumentationLibrary.version||"")+":"+(s.instrumentationLibrary.schemaUrl||""),c=a.get(l);c||(c=[],a.set(l,c)),c.push(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}(e),n=[],i=r.entries(),o=i.next();!o.done;){for(var s=bb(o.value,2),a=s[0],l=s[1],c=[],u=l.values(),d=u.next();!d.done;){var h=d.value;if(h.length>0){var p=h.map(function(e){return function(e,t){var r,n=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:null==(r=n.traceState)?void 0:r.serialize(),name:e.name,kind:null==e.kind?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:me(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(e){var r,n;return r=e,n=t,{attributes:r.attributes?me(r.attributes):[],name:r.name,timeUnixNano:n.encodeHrTime(r.time),droppedAttributesCount:r.droppedAttributesCount||0}}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(e){return function(e,t){var r;return{attributes:e.attributes?me(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:null==(r=e.context.traceState)?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)}),droppedLinksCount:e.droppedLinksCount}}(e,t)});c.push({scope:f8(h[0].instrumentationLibrary),spans:p,schemaUrl:h[0].instrumentationLibrary.schemaUrl})}d=u.next()}var f={resource:f7(a),scopeSpans:c,schemaUrl:void 0};n.push(f),o=i.next()}return n}(e,f4({useHex:!0,useLongBits:!1}))};return new TextEncoder().encode(JSON.stringify(t))},deserializeResponse:function(e){return JSON.parse(new TextDecoder().decode(e))}},bw=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var l=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},bx=function(){function e(e){this._transport=e}return e.prototype.retry=function(e,t,r){var n=this;return new Promise(function(i,o){setTimeout(function(){n._transport.send(e,t).then(i,o)},r)})},e.prototype.send=function(e,t){var r,n,i,o;return n=this,i=void 0,o=function(){var n,i,o,s,a,l,c;return bw(this,function(u){switch(u.label){case 0:return n=Date.now()+t,[4,this._transport.send(e,t)];case 1:i=u.sent(),o=5,s=1e3,u.label=2;case 2:return"retryable"===i.status&&o>0?(o--,a=Math.max(Math.min(s,5e3)+(.4*Math.random()-.2),0),s*=1.5,(l=null!=(r=i.retryInMillis)?r:a)>(c=n-Date.now())?[2,i]:[4,this.retry(e,c,l)]):[3,4];case 3:return i=u.sent(),[3,2];case 4:return[2,i]}})},new(i||(i=Promise))(function(e,t){function r(e){try{a(o.next(e))}catch(e){t(e)}}function s(e){try{a(o.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):((n=t.value)instanceof i?n:new i(function(e){e(n)})).then(r,s)}a((o=o.apply(n,[])).next())})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function bk(e){return new bx(e.transport)}var bS=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},b_=function(){function e(e){this._parameters=e}return e.prototype.send=function(e,t){var r=this;return new Promise(function(n){var i=new XMLHttpRequest;i.timeout=t,i.open("POST",r._parameters.url),Object.entries(r._parameters.headers()).forEach(function(e){var t=bS(e,2),r=t[0],n=t[1];i.setRequestHeader(r,n)}),i.ontimeout=function(e){n({status:"failure",error:Error("XHR request timed out")})},i.onreadystatechange=function(){i.status>=200&&i.status<=299?(ug.debug("XHR success"),n({status:"success"})):i.status&&[429,502,503,504].includes(i.status)?n({status:"retryable",retryInMillis:function(e){if(null!=e){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?1e3*t:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}}(i.getResponseHeader("Retry-After"))}):0!==i.status&&n({status:"failure",error:Error("XHR request failed with non-retryable status")})},i.onabort=function(){n({status:"failure",error:Error("XHR request aborted")})},i.onerror=function(){n({status:"failure",error:Error("XHR request errored")})},i.send(e)})},e.prototype.shutdown=function(){},e}(),bC=function(){function e(e){this._params=e}return e.prototype.send=function(e){var t=this;return new Promise(function(r){navigator.sendBeacon(t._params.url,new Blob([e],{type:t._params.blobType}))?(ug.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}(),bT=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},bI=function(){return(bI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function bE(e,t,r,n){var i,o,s,a,l,c,u,d,h,p,f,m,g,b,v,y,w,x,k,S,_,C=!!e.headers||"function"!=typeof navigator.sendBeacon,T=(s={url:e.url,timeoutMillis:e.timeoutMillis,headers:function(e){if(null!=e)return function(){return e}}(e.headers),concurrencyLimit:e.concurrencyLimit},a={},l=bI(bI({},{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}),{headers:function(){return n},url:"http://localhost:4318/"+r,agentOptions:{keepAlive:!0}}),bI(bI({},{timeoutMillis:function(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}(null!=(f=null!=(p=s.timeoutMillis)?p:a.timeoutMillis)?f:l.timeoutMillis),concurrencyLimit:null!=(g=null!=(m=s.concurrencyLimit)?m:a.concurrencyLimit)?g:l.concurrencyLimit,compression:null!=(v=null!=(b=s.compression)?b:a.compression)?v:l.compression}),{headers:(y=s.headers,w=function(){var e,t={};return Object.entries(null!=(e=y?.())?e:{}).forEach(function(e){var r=bT(e,2),n=r[0],i=r[1];"u">typeof i?t[n]=String(i):ug.warn('Header "'+n+'" has invalid value ('+i+") and will be ignored")}),t},x=a.headers,k=l.headers,S=bI({},k()),_={},function(){return null!=x&&Object.assign(_,x()),null!=w&&Object.assign(_,w()),Object.assign(_,S)}),url:null!=(u=null!=(c=function(e){if(null!=e)try{return new URL(e),e}catch{throw Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}(s.url))?c:a.url)?u:l.url,agentOptions:null!=(h=null!=(d=s.agentOptions)?d:a.agentOptions)?h:l.agentOptions}));return C?fQ(i=T,t,bk({transport:new b_(i)})):fQ(o=T,t,bk({transport:new bC({url:o.url,blobType:o.headers()["Content-Type"]})}))}var bR,bO,bL,bA,bN,bZ,bM,bG,bV,bW,bP,bj,bX,bD=(bP=function(e,t){return(bP=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}bP(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),bF=function(e){function t(t){return void 0===t&&(t={}),e.call(this,bE(t,by,"v1/traces",{"Content-Type":"application/json"}))||this}return bD(t,e),t}(fz);(vv=bX||(bX={}))[vv.DELTA=0]="DELTA",vv[vv.CUMULATIVE=1]="CUMULATIVE",vv[vv.LOWMEMORY=2]="LOWMEMORY";var bz=(vy=function(e,t){return(vy=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}vy(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),bB=function(){return my.CUMULATIVE},bU=function(e){switch(e){case mk.COUNTER:case mk.OBSERVABLE_COUNTER:case mk.GAUGE:case mk.HISTOGRAM:case mk.OBSERVABLE_GAUGE:return my.DELTA;case mk.UP_DOWN_COUNTER:case mk.OBSERVABLE_UP_DOWN_COUNTER:return my.CUMULATIVE}},bH=function(e){switch(e){case mk.COUNTER:case mk.HISTOGRAM:return my.DELTA;case mk.GAUGE:case mk.UP_DOWN_COUNTER:case mk.OBSERVABLE_UP_DOWN_COUNTER:case mk.OBSERVABLE_COUNTER:case mk.OBSERVABLE_GAUGE:return my.CUMULATIVE}},bY=function(e){function t(t,r){var n,i,o,s,a=e.call(this,t)||this;return a._aggregationSelector=null!=r&&r.aggregationPreference?r.aggregationPreference:function(e){return m3.Default()},a._aggregationTemporalitySelector=null!=(n=r?.temporalityPreference)?n===bX.DELTA?bU:n===bX.LOWMEMORY?bH:bB:"cumulative"===(s=(i=function(e){var t={};for(var r in uU)if("OTEL_LOG_LEVEL"===r)!function(e,t,r){var n=r[e];if("string"==typeof n){var i=uH[n.toUpperCase()];null!=i&&(t[e]=i)}}(r,t,e);else if(uD.indexOf(r)>-1)!function(e,t,r){if("u">typeof r[e]){var n=String(r[e]);t[e]="true"===n.toLowerCase()}}(r,t,e);else if(uF.indexOf(r)>-1)!function(e,t,r,n,i){if(void 0===n&&(n=-1/0),void 0===i&&(i=1/0),"u">typeof r[e]){var o=Number(r[e]);isNaN(o)||(o<n?t[e]=n:o>i?t[e]=i:t[e]=o)}}(r,t,e);else if(uz.indexOf(r)>-1)!function(e,t,r,n){void 0===n&&(n=",");var i=r[e];"string"==typeof i&&(t[e]=i.split(n).map(function(e){return e.trim()}))}(r,t,e);else{var n=e[r];"u">typeof n&&null!==n&&(t[r]=String(n))}return t}(uY),o=Object.assign({},uU,i)).OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase())?bB:"delta"===s?bU:"lowmemory"===s?bH:(ug.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+o.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),bB),a}return bz(t,e),t.prototype.selectAggregation=function(e){return this._aggregationSelector(e)},t.prototype.selectAggregationTemporality=function(e){return this._aggregationTemporalitySelector(e)},t}(fz),bK=(vw=function(e,t){return(vw=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}vw(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),bJ=function(e){function t(t){return e.call(this,bE(t??{},bv,"v1/metrics",{"Content-Type":"application/json"}),t)||this}return bK(t,e),t}(bY);class bQ extends bF{constructor(e,t){super(lv(lb({},e),{headers:{}})),this.sampler=t}export(e,t){let r=function(e,t){if(!t.isSamplingEnabled())return e;let r=[],n={},i={};for(let o of e){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));let e=t.shouldSample(o);e.sample?e.attributes?n[o.spanContext().spanId]=function(e,t){let r=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>r,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.shift(),n=new WeakMap;e.length>0;)r=function e(t,r,n,i){if(void 0===n&&(n=0),!(n>20)){if(n++,dh(t)||dh(r)||du(r))a=da(r);else if(dc(t)){if(a=t.slice(),dc(r))for(var o,s,a,l=0,c=r.length;l<c;l++)a.push(da(r[l]));else if(dd(r))for(var u=Object.keys(r),l=0,c=u.length;l<c;l++){var d=u[l];a[d]=da(r[d])}}else if(dd(t))if(dd(r)){if(o=t,s=r,!ds(o)||!ds(s))return r;a=Object.assign({},t);for(var u=Object.keys(r),l=0,c=u.length;l<c;l++){var d=u[l],h=r[d];if(dh(h))typeof h>"u"?delete a[d]:a[d]=h;else{var p=a[d];if(dl(t,d,i)||dl(r,d,i))delete a[d];else{if(dd(p)&&dd(h)){var f=i.get(p)||[],m=i.get(h)||[];f.push({obj:t,key:d}),m.push({obj:r,key:d}),i.set(p,f),i.set(h,m)}a[d]=e(a[d],h,n,i)}}}}else a=r;return a}}(r,e.shift(),0,n);return r}(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}(o,e.attributes):n[o.spanContext().spanId]=o:r.push(o.spanContext().spanId)}for(;r.length>0;){let e=i[r.shift()];if(e)for(let t of e)delete n[t],r.push(t)}return Object.values(n)}(e,this.sampler);if(0===r.length)return;let n=0,i=e=>e.code===hM.SUCCESS?t({code:hM.SUCCESS}):++n>3?t({code:hM.FAILED,error:e.error}):void new Promise(e=>setTimeout(e,1e3+500*Math.pow(2,n))).then(()=>{super.export(r,i)});super.export(r,i)}}class bq extends bJ{constructor(e){super(lv(lb({},e),{headers:{}}))}export(e,t){let r=0,n=i=>{var o;return i.code===hM.SUCCESS?t({code:hM.SUCCESS}):++r>3?(console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${null==(o=i.error)?void 0:o.message}`,i.error),t({code:hM.FAILED,error:i.error})):void new Promise(e=>setTimeout(e,1e3+500*Math.pow(2,r))).then(()=>{var t;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${null==(t=i.error)?void 0:t.message}`,i.error),super.export(e,n)})};super.export(e,n)}}let b$=["click","input","submit"];function b0(){return!1}let b1=class e extends dO{constructor(t={}){var r;super(e.moduleName,e.version,t),ly(this,"_spansData",new WeakMap),ly(this,"_zonePatched"),ly(this,"_wrappedListeners",new WeakMap),ly(this,"_eventsSpanMap",new WeakMap),ly(this,"_eventNames"),ly(this,"_shouldPreventSpanCreation"),this._eventNames=new Set(null!=(r=t?.eventNames)?r:b$),this._shouldPreventSpanCreation="function"==typeof t?.shouldPreventSpanCreation?t.shouldPreventSpanCreation:b0}init(){}_checkForTimeout(e,t){var r,n,i,o;let s=this._spansData.get(t);s&&("setTimeout"===e.source?(n=uJ(("number"!=typeof(r=uK.timeOrigin)&&(r=uK.timing&&uK.timing.fetchStart),r)),i=uJ(uK.now()),(o=[n[0]+i[0],n[1]+i[1]])[1]>=1e9&&(o[1]-=1e9,o[0]+=1),s.hrTimeLastTimeout=o):"Promise.then"!==e.source&&"setTimeout"!==e.source&&(s.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,t){var r;let n=e?.target,i=e?.type;if(!(n instanceof HTMLElement)||!n.getAttribute||n.hasAttribute("disabled")||!this._allowEventName(i))return;let o=function e(t,r){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=function(e,t){var r=e.nodeType,n=function(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var r=Array.from(e.parentNode.childNodes);return(r=r.filter(function(r){var n=r.localName;return t.indexOf(r.nodeType)>=0&&n===e.localName})).length>=1?r.indexOf(e)+1:0}(e),i="";if(r===Node.ELEMENT_NODE){var o=e.getAttribute("id");if(t&&o)return'//*[@id="'+o+'"]';i=e.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else{if(r!==Node.COMMENT_NODE)return"";i="comment()"}return i&&n>1?"/"+i+"["+n+"]":"/"+i}(t,r);if(r&&n.indexOf("@id")>0)return n;var i="";return t.parentNode&&(i+=e(t.parentNode,!1)),i+=n}(n,!0);try{let s=this.tracer.startSpan(i,{attributes:{"event.type":i,"event.tag":n.tagName,"event.xpath":o,"event.id":n.id,"event.classname":n.className,"event.text":null!=(r=n.textContent)?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},t?uO.setSpan(um.active(),t):void 0);return e instanceof MouseEvent&&(s.setAttribute("event.x",e.clientX),s.setAttribute("event.y",e.clientY),s.setAttribute("event.relativeX",e.clientX/window.innerWidth),s.setAttribute("event.relativeY",e.clientY/window.innerHeight),"scroll"===i&&(s.setAttribute("event.scrollX",window.scrollX),s.setAttribute("event.scrollY",window.scrollY))),!0===this._shouldPreventSpanCreation(i,n,s)?void 0:(this._spansData.set(s,{taskCount:0}),s)}catch(e){this._diag.error("failed to start create new user interaction span",e)}}_decrementTask(e){let t=this._spansData.get(e);t&&(t.taskCount--,0===t.taskCount&&this._tryToEndSpan(e,t.hrTimeLastTimeout))}_getCurrentSpan(e){let t=e.get("OT_ZONE_CONTEXT");return t&&uO.getSpan(t)}_incrementTask(e){let t=this._spansData.get(e);t&&t.taskCount++}addPatchedListener(e,t,r,n){let i=this._wrappedListeners.get(r);i||(i=new Map,this._wrappedListeners.set(r,i));let o=i.get(t);return o||(o=new Map,i.set(t,o)),!o.has(e)&&(o.set(e,n),!0)}removePatchedListener(e,t,r){let n=this._wrappedListeners.get(r);if(!n)return;let i=n.get(t);if(!i)return;let o=i.get(e);return o&&(i.delete(e),0===i.size&&(n.delete(t),0===n.size&&this._wrappedListeners.delete(r))),o}_invokeListener(e,t,r){return"function"==typeof e?e.apply(t,r):e.handleEvent(r[0])}_patchAddEventListener(){let e=this,t=new Map;return r=>function(n,i,o){if(!i)return r.call(this,n,i,o);let s=o&&"object"==typeof o&&o.once,a=function(...r){var o;let a,l=r[0];if(!(null!=l&&l.type)||Date.now()-(null!=(o=t.get(l.type))?o:0)<1e3/60)return e._invokeListener(i,this,r);t.set(l.type,Date.now()),l&&(a=e._eventsSpanMap.get(l)),s&&e.removePatchedListener(this,n,i);let c=e._createSpan(l,a);return c?(l&&e._eventsSpanMap.set(l,c),um.with(uO.setSpan(um.active(),c),()=>{let t=e._invokeListener(i,this,r);return c.end(),t})):e._invokeListener(i,this,r)};if(e.addPatchedListener(this,n,i,a))return r.call(this,n,a,o)}}_patchRemoveEventListener(){let e=this;return t=>function(r,n,i){let o=e.removePatchedListener(this,r,n);return o?t.call(this,r,o,i):t.call(this,r,n,i)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){let e=this;return t=>function(...r){let n=`${location.pathname}${location.hash}${location.search}`,i=t.apply(this,r),o=`${location.pathname}${location.hash}${location.search}`;return n!==o&&e._updateInteractionName(o),i}}_unpatchHistoryApi(){dL(history.replaceState)&&this._unwrap(history,"replaceState"),dL(history.pushState)&&this._unwrap(history,"pushState"),dL(history.back)&&this._unwrap(history,"back"),dL(history.forward)&&this._unwrap(history,"forward"),dL(history.go)&&this._unwrap(history,"go")}_updateInteractionName(e){let t=uO.getSpan(um.active());t&&"function"==typeof t.updateName&&t.updateName(`Navigation: ${e}`)}_patchZoneCancelTask(){let e=this;return t=>function(r){let n=Zone.current,i=e._getCurrentSpan(n);return i&&e._shouldCountTask(r,n)&&e._decrementTask(i),t.call(this,r)}}_patchZoneScheduleTask(){let e=this;return t=>function(r){let n=Zone.current,i=e._getCurrentSpan(n);return i&&e._shouldCountTask(r,n)&&(e._incrementTask(i),e._checkForTimeout(r,i)),t.call(this,r)}}_patchZoneRunTask(){let e=this;return t=>function(r,n,i){let o,s=Array.isArray(i)&&i[0]instanceof Event?i[0]:void 0;if(s?.target){if(o=e._createSpan(s))return e._incrementTask(o),this.run(()=>{try{return um.with(uO.setSpan(um.active(),o),()=>{let e=Zone.current;return r._zone=e,t.call(e,r,n,i)})}finally{e._decrementTask(o)}})}else o=e._getCurrentSpan(this);try{return t.call(this,r,n,i)}finally{o&&e._shouldCountTask(r,this)&&e._decrementTask(o)}}}_shouldCountTask(e,t){if(e._zone&&(t=e._zone),!t||!e.data||e.data.isPeriodic)return!1;let r=this._getCurrentSpan(t);return!!r&&!!this._spansData.get(r)&&("macroTask"===e.type||"microTask"===e.type)}_tryToEndSpan(e,t){e&&this._spansData.get(e)&&(e.end(t),this._spansData.delete(e))}enable(){let t=this._getZoneWithPrototype();this._diag.debug("applying patch to",e.moduleName,e.version,"zone:",!!t),t?(dL(t.prototype.runTask)&&(this._unwrap(t.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),dL(t.prototype.scheduleTask)&&(this._unwrap(t.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),dL(t.prototype.cancelTask)&&(this._unwrap(t.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(t.prototype,"runTask",this._patchZoneRunTask()),this._wrap(t.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(t.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(e=>{dL(e.addEventListener)&&(this._unwrap(e,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),dL(e.removeEventListener)&&(this._unwrap(e,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(e,"addEventListener",this._patchAddEventListener()),this._wrap(e,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){let t=this._getZoneWithPrototype();this._diag.debug("removing patch from",e.moduleName,e.version,"zone:",!!t),t&&this._zonePatched?(dL(t.prototype.runTask)&&this._unwrap(t.prototype,"runTask"),dL(t.prototype.scheduleTask)&&this._unwrap(t.prototype,"scheduleTask"),dL(t.prototype.cancelTask)&&this._unwrap(t.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(e=>{dL(e.addEventListener)&&this._unwrap(e,"addEventListener"),dL(e.removeEventListener)&&this._unwrap(e,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};ly(b1,"version","0.1.1"),ly(b1,"moduleName","user-interaction");let b2={},b5,b3="highlight.record",b9="launchdarkly.js.log",b4="launchdarkly.sampling.ratio",b6="log.severity",b7="log.message";class b8 extends h3{onStart(e,t){e.setAttribute("highlight.session_id",aj()),super.onStart(e,t)}onEnd(e){!1!==e.attributes[b3]&&super.onEnd(e)}}class ve extends u6{constructor(e){super(),ly(this,"highlightEndpoints"),ly(this,"tracingOrigins"),ly(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,t,r){var n;let i=uO.getSpan(e);if(!i||!i.attributes)return;let o=vm(i);("string"!=typeof o||(vc(o,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||i.setAttribute(b3,!1),((e,t,r)=>{var n;if(r.some(t=>e.toLowerCase().includes(t)))return!1;let i=[];!0===t?(i=["localhost",/^\//],null!=(n=window?.location)&&n.host&&i.push(window.location.host)):t instanceof Array&&(i=t);let o=!1;return i.forEach(t=>{e.match(t)&&(o=!0)}),o})(o,null!=(n=this.tracingOrigins)?n:[],this.urlBlocklist)))&&super.inject(e,t,r)}}let vt="highlight-browser",vr=()=>{var e;return null==(e=b2.tracerProvider)?void 0:e.getTracer(vt)},vn=()=>{var e;return null==(e=b2.meterProvider)?void 0:e.getMeter(vt)},vi=(e,t,r,n)=>{var i;if(!e.attributes)return;let o=fP(vm(e)),s=fW(o),a="string"==typeof t?t:String(t);try{let r=t?JSON.parse(a):void 0;null!=r&&r.operationName&&e.setAttribute("graphql.operation.name",r.operationName)}catch{}e.setAttributes({"highlight.type":"http.request",[pG]:o,[aS]:o,[a_]:s.pathname,"url.query":s.search});let l=Array.from(s.searchParams.entries());if(l.length>0&&e.setAttribute("url.query_params",JSON.stringify(Object.fromEntries(l))),null!=n&&n.recordHeadersAndBody){let o=fF(t,n.networkBodyKeysToRedact,n.bodyKeysToRecord,r);e.setAttribute("http.request.body",o);let s=vo(fZ(null!=(i=n.networkHeadersToRedact)?i:[],r,n.headerKeysToRecord),"http.request.header");e.setAttributes(s)}},vo=(e,t)=>{let r={};return Object.entries(e).forEach(([e,n])=>{let i=e.toLowerCase().replace(/_/g,"-"),o=`${t}.${i}`,s=va(i,n);if(r[o]){let e=r[o];Array.isArray(e)?r[o]=[...e,...s]:r[o]=[e,...s]}else r[o]=1===s.length?s[0]:s}),r},vs=new Set(["accept","accept-charset","accept-encoding","accept-language","accept-ranges","allow","cache-control","connection","content-encoding","content-language","expect","if-match","if-none-match","pragma","proxy-authenticate","te","trailer","transfer-encoding","upgrade","vary","via","warning","www-authenticate","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-request-headers"]),va=(e,t)=>vs.has(e)?t.split(",").map(e=>e.trim()).filter(e=>e.length>0):[t],vl=(e,t,r,n)=>{var i;e.setAttribute("http.response.body",r);let o=vo(fZ(null!=(i=n.networkHeadersToRedact)?i:[],t,n.headerKeysToRecord),"http.response.header");e.setAttributes(o)},vc=(e,t,r,n)=>!(null!=n&&n.some(t=>e.toLowerCase().includes(t)))&&((e,t,r)=>!t.some(t=>e.toLocaleLowerCase().includes(t))&&!(e.includes("/sdk/evalx")&&e.match(fj)||e.includes("/eval/")&&e.match(fX))&&!["events.ld.catamorphic.com","events.launchdarkly.com"].some(t=>e.toLocaleLowerCase().includes(t)))(e,t),vu=e=>{var t,r,n;if(!e.events)return;let i=e.events,o={unload:vd("unloadEventStart","unloadEventEnd",i),dom_interactive:vd("fetchStart","domInteractive",i),dom_content_loaded:vd("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:vd("fetchStart","domComplete",i),load_event:vd("loadEventStart","loadEventEnd",i),document_load:vd("fetchStart","loadEventEnd",i),first_paint:vd("fetchStart","firstPaint",i),first_contentful_paint:vd("fetchStart","firstContentfulPaint",i),domain_lookup:vd("domainLookupStart","domainLookupEnd",i),connect:vd("connectStart","connectEnd",i),request:vd("requestStart","requestEnd",i),response:vd("responseStart","responseEnd",i)},s=null!=(r=null==(t=b5?.getIntegrations)?void 0:t.call(b5))?r:[];if(void 0!==o.document_load)for(let e of s)e.recordGauge(null!=(n=b5?.sessionSecureId)?n:"",{name:"document_load",value:o.document_load/1e6});Object.entries(o).forEach(([t,r])=>{void 0!==r&&(e.setAttribute(`timings.${t}.ns`,r),e.setAttribute(`timings.${t}.readable`,vp(r)))})};function vd(e,t,r){let n=r.find(t=>t.name===e),i=r.find(e=>e.name===t);if(!n||!i)return;let o=1e9*n.time[0]+n.time[1];return 1e9*i.time[0]+i.time[1]-o}let vh=(e,t)=>{Object.entries({domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e9,connect:(t.connectEnd-t.connectStart)*1e9,request:(t.responseEnd-t.requestStart)*1e9,response:(t.responseEnd-t.responseStart)*1e9}).forEach(([t,r])=>{e.setAttribute(`timings.${t}.ns`,r),e.setAttribute(`timings.${t}.readable`,vp(r))})},vp=e=>{if(e>=36e11){let t=e/36e11;return`${Number(t.toFixed(1))}h`}if(e>=6e10){let t=e/6e10;return`${Number(t.toFixed(1))}m`}if(e>=1e9){let t=e/1e9;return`${Number(t.toFixed(1))}s`}if(e>=1e6){let t=e/1e6;return`${Number(t.toFixed(1))}ms`}{if(!(e>=1e3))return`${Number(e.toFixed(1))}ns`;let t=e/1e3;return`${Number(t.toFixed(1))}\xb5s`}},vf=e=>!0===e?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(e)?e.map(e=>"string"==typeof e?new RegExp(e):e):/^$/,vm=e=>e.attributes[aS]?e.attributes[aS]:e.attributes[pG],vg=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(r=>e(r-t)))),vb="u">typeof window&&"performance"in window&&"memory"in performance?performance:{memory:{}};var vv,vy,vw,vx,vk,vS,v_,vC,vT=-1,vI=function(e){addEventListener("pageshow",function(t){t.persisted&&(vT=t.timeStamp,e(t))},!0)},vE=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},vR=function(){var e=vE();return e&&e.activationStart||0},vO=function(e,t){var r=vE(),n="navigate";return vT>=0?n="back-forward-cache":r&&(document.prerendering||vR()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(0x82f79cd8fff*Math.random())+1e12),navigationType:n}},vL=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch{}},vA=function(e,t,r,n){var i,o;return function(s){var a;t.value>=0&&(s||n)&&((o=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=o,a=t.value,t.rating=a>r[1]?"poor":a>r[0]?"needs-improvement":"good",e(t))}},vN=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},vZ=function(e){var t=function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},vM=function(e){var t=!1;return function(r){t||(e(r),t=!0)}},vG=-1,vV=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},vW=function(e){"hidden"===document.visibilityState&&vG>-1&&(vG="visibilitychange"===e.type?e.timeStamp:0,vj())},vP=function(){addEventListener("visibilitychange",vW,!0),addEventListener("prerenderingchange",vW,!0)},vj=function(){removeEventListener("visibilitychange",vW,!0),removeEventListener("prerenderingchange",vW,!0)},vX=function(){return vG<0&&(vG=vV(),vP(),vI(function(){setTimeout(function(){vG=vV(),vP()},0)})),{get firstHiddenTime(){return vG}}},vD=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},vF=[1800,3e3],vz=function(e,t){t=t||{},vD(function(){var r,n=vX(),i=vO("FCP"),o=vL("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-vR(),0),i.entries.push(e),r(!0)))})});o&&(r=vA(e,i,vF,t.reportAllChanges),vI(function(n){r=vA(e,i=vO("FCP"),vF,t.reportAllChanges),vN(function(){i.value=performance.now()-n.timeStamp,r(!0)})}))})},vB=[.1,.25],vU=function(e,t){t=t||{},vz(vM(function(){var r,n=vO("CLS",0),i=0,o=[],s=function(e){e.forEach(function(e){if(!e.hadRecentInput){var t=o[0],r=o[o.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}}),i>n.value&&(n.value=i,n.entries=o,r())},a=vL("layout-shift",s);a&&(r=vA(e,n,vB,t.reportAllChanges),vZ(function(){s(a.takeRecords()),r(!0)}),vI(function(){i=0,r=vA(e,n=vO("CLS",0),vB,t.reportAllChanges),vN(function(){return r()})}),setTimeout(r,0))}))},vH={passive:!0,capture:!0},vY=new Date,vK=function(e,t){vx||(vx=t,vk=e,vS=new Date,vq(removeEventListener),vJ())},vJ=function(){if(vk>=0&&vk<vS-vY){var e={entryType:"first-input",name:vx.type,target:vx.target,cancelable:vx.cancelable,startTime:vx.timeStamp,processingStart:vx.timeStamp+vk};v_.forEach(function(t){t(e)}),v_=[]}},vQ=function(e){if(e.cancelable){var t,r,n,i=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(t=function(){vK(i,e),n()},r=function(){n()},n=function(){removeEventListener("pointerup",t,vH),removeEventListener("pointercancel",r,vH)},addEventListener("pointerup",t,vH),addEventListener("pointercancel",r,vH)):vK(i,e)}},vq=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,vQ,vH)})},v$=[100,300],v0=function(e,t){t=t||{},vD(function(){var r,n=vX(),i=vO("FID"),o=function(e){e.startTime<n.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),r(!0))},s=function(e){e.forEach(o)},a=vL("first-input",s);r=vA(e,i,v$,t.reportAllChanges),a&&vZ(vM(function(){s(a.takeRecords()),a.disconnect()})),a&&vI(function(){r=vA(e,i=vO("FID"),v$,t.reportAllChanges),v_=[],vk=-1,vx=null,vq(addEventListener),v_.push(o),vJ()})})},v1=0,v2=1/0,v5=0,v3=function(e){e.forEach(function(e){e.interactionId&&(v2=Math.min(v2,e.interactionId),v1=(v5=Math.max(v5,e.interactionId))?(v5-v2)/7+1:0)})},v9=function(){return vC?v1:performance.interactionCount||0},v4=function(){"interactionCount"in performance||vC||(vC=vL("event",v3,{type:"event",buffered:!0,durationThreshold:0}))},v6=[200,500],v7=0,v8=function(){return v9()-v7},ye=[],yt={},yr=function(e){var t=ye[ye.length-1],r=yt[e.interactionId];if(r||ye.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};yt[n.id]=n,ye.push(n)}ye.sort(function(e,t){return t.latency-e.latency}),ye.splice(10).forEach(function(e){delete yt[e.id]})}},yn=function(e,t){t=t||{},vD(function(){v4();var r,n,i=vO("INP"),o=function(e){e.forEach(function(e){e.interactionId&&yr(e),"first-input"!==e.entryType||ye.some(function(t){return t.entries.some(function(t){return e.duration===t.duration&&e.startTime===t.startTime})})||yr(e)});var t,r=(t=Math.min(ye.length-1,Math.floor(v8()/50)),ye[t]);r&&r.latency!==i.value&&(i.value=r.latency,i.entries=r.entries,n())},s=vL("event",o,{durationThreshold:null!=(r=t.durationThreshold)?r:40});n=vA(e,i,v6,t.reportAllChanges),s&&("interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),vZ(function(){o(s.takeRecords()),i.value<0&&v8()>0&&(i.value=0,i.entries=[]),n(!0)}),vI(function(){ye=[],v7=v9(),n=vA(e,i=vO("INP"),v6,t.reportAllChanges)}))})},yi=[2500,4e3],yo={},ys=function(e,t){t=t||{},vD(function(){var r,n=vX(),i=vO("LCP"),o=function(e){var t=e[e.length-1];t&&t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-vR(),0),i.entries=[t],r())},s=vL("largest-contentful-paint",o);if(s){r=vA(e,i,yi,t.reportAllChanges);var a=vM(function(){yo[i.id]||(o(s.takeRecords()),s.disconnect(),yo[i.id]=!0,r(!0))});["keydown","click"].forEach(function(e){addEventListener(e,function(){return setTimeout(a,0)},!0)}),vZ(a),vI(function(n){r=vA(e,i=vO("LCP"),yi,t.reportAllChanges),vN(function(){i.value=performance.now()-n.timeStamp,yo[i.id]=!0,r(!0)})})}})},ya=[800,1800],yl=function e(t){document.prerendering?vD(function(){return e(t)}):"complete"!==document.readyState?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},yc=function(e,t){t=t||{};var r=vO("TTFB"),n=vA(e,r,ya,t.reportAllChanges);yl(function(){var i=vE();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-vR(),0),r.entries=[i],n(!0),vI(function(){(n=vA(e,r=vO("TTFB",0),ya,t.reportAllChanges))(!0)})}})};let yu="u">typeof navigator&&"connection"in navigator?navigator.connection:{};function yd(e){let t=Math.trunc(e);return 1===t||0!==t&&0===Math.floor(Math.random()*t)}class yh{constructor(e=yd){ly(this,"regexCache",new Map),ly(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,t,r,n;return!!(null!=(t=null==(e=this.config)?void 0:e.logs)&&t.length||null!=(n=null==(r=this.config)?void 0:r.spans)&&n.length)}shouldSample(e){var t,r;return e.name===b9?this.sampleLog(null==(t=this.config)?void 0:t.logs,e):this.sampleSpan(null==(r=this.config)?void 0:r.spans,e)}matchesValue(e,t){if(!e)return!1;if("matchValue"in e)return e.matchValue===t;if("regexValue"in e){let r=e.regexValue;if(null===r)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));let n=this.regexCache.get(r);if("string"==typeof t)return n.test(t)}return!1}matchesAttributes(e,t){if(e)for(let r of e){let e=!1;for(let n of Object.keys(t))if(this.matchesValue(r.key,n)){let i=t[n];if(this.matchesValue(r.attribute,i)){e=!0;break}}if(!e)return!1}return!0}matchEvent(e,t){return!(e.name&&!this.matchesValue(e.name,t.name)||e.attributes&&(!t.attributes||!this.matchesAttributes(e.attributes,t.attributes)))}matchesEvents(e,t){if(e)for(let r of e){let e=!1;for(let n of t)if(this.matchEvent(r,n)){e=!0;break}if(!e)return!1}return!0}matchesSpanConfig(e,t){return!(e.name&&!this.matchesValue(e.name,t.name)||!this.matchesAttributes(e.attributes,t.attributes)||!this.matchesEvents(e.events,t.events))}matchesLogConfig(e,t){if(e.severityText){let r=t[b6];if(!this.matchesValue(e.severityText,r))return!1}if(e.message){let r=t[b7];if(!this.matchesValue(e.message,r))return!1}return!!this.matchesAttributes(e.attributes,t)}sampleSpan(e,t){if(e){for(let r of e)if(this.matchesSpanConfig(r,t))return{sample:this.sampler(r.samplingRatio),attributes:{[b4]:r.samplingRatio}}}return{sample:!0}}sampleLog(e,t){if(e){for(let r of e)if(this.matchesLogConfig(r,t.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[b4]:r.samplingRatio}}}return{sample:!0}}}let yp=()=>{let e={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(t,r)=>e,setAttributes:t=>e,addEvent:(t,r,n)=>e,addLinks:t=>e,setStatus:t=>e,recordException:()=>{},addLink:()=>e,updateName:()=>e,isRecording:()=>!1};return e},yf=function(e,t,r){if(!e)return;let n=lb({},r);"string"==typeof t?n[ax]=t:t&&(t.code?n[ak]=t.code.toString():t.name&&(n[ak]=t.name),t.message&&(n[ax]=t.message),t.stack&&(n["exception.stacktrace"]=t.stack)),n[ak]||n[ax]?e.addEvent("exception",n):oK("otel","recordException","warn",`Failed to record an exception ${t}`)};class ym{constructor(e){ly(this,"organizationID"),ly(this,"_options"),ly(this,"_integrations",[]),ly(this,"_gauges",new Map),ly(this,"_counters",new Map),ly(this,"_histograms",new Map),ly(this,"_up_down_counters",new Map),ly(this,"sampler",new yh),ly(this,"_started",!1),ly(this,"graphqlSDK"),this._options=e,this.organizationID=e.projectId}start(){return lw(this,null,function*(){var e,t,r,n,i,o,s,a,l,c,u,d,h,p,f,m,g;let b;if(this._started)return;this._started=!0,((e,t)=>{var r,n,i,o,s,a,l,c,u,d,h,p,f,m,g;if(b2.tracerProvider||b2.meterProvider)return console.warn("OTEL already initialized. Skipping...");b5=e;let b=e.backendUrl||"https://pub.highlight.io",v=[...null!=(n=null==(r=e.networkRecordingOptions)?void 0:r.urlBlocklist)?n:[],...fG],y=null!=(i=e.environment)?i:"production",w={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},x=new b8(new bQ(w,t),{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:w.timeoutMillis,scheduledDelayMillis:w.timeoutMillis}),k=new pu({"service.name":null!=(o=e.serviceName)?o:"highlight-browser","service.version":e.serviceVersion,"deployment.environment.name":y,"highlight.project_id":e.projectId,"user_agent.original":navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":"9.26.0"});b2.tracerProvider=new p_({resource:k,mergeResourceWithDefaults:!0,spanProcessors:[x]}),uO.setGlobalTracerProvider(b2.tracerProvider),b2.meterProvider=new bf({resource:k,readers:[new gw({exporter:new bq(lv(lb({},w),{url:e.otlpEndpoint+"/v1/metrics"})),exportIntervalMillis:w.timeoutMillis,exportTimeoutMillis:w.timeoutMillis})]}),uy.setGlobalMeterProvider(b2.meterProvider);let S=[];(null==(s=e.instrumentations)?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&S.push(new pX({applyCustomAttributesOnSpan:{documentLoad:vu,documentFetch:vu,resourceFetch:vh}})),(null==(a=e.instrumentations)?void 0:a["@opentelemetry/instrumentation-user-interaction"])!==!1&&S.push(new b1({eventNames:e.eventNames})),null!=(l=e.networkRecordingOptions)&&l.enabled&&((null==(c=e.instrumentations)?void 0:c["@opentelemetry/instrumentation-fetch"])!==!1&&S.push(new fp({propagateTraceHeaderCorsUrls:vf(e.tracingOrigins),applyCustomAttributesOnSpan:(t,r,n)=>lw(void 0,null,function*(){var i,o,s;if(!(!t.attributes||!1===t.attributes[b3])){if(vi(t,r.body,r.headers,e.networkRecordingOptions),!(n instanceof Response))return void t.setAttributes({"http.response.error":n.message,"http.response.status_code":n.status});if(null!=(i=e.networkRecordingOptions)&&i.recordHeadersAndBody){let r,i,a=yield(r=null==(o=e.networkRecordingOptions)?void 0:o.bodyKeysToRecord,i=null==(s=e.networkRecordingOptions)?void 0:s.networkBodyKeysToRedact,lw(void 0,null,function*(){let e;try{let t=n.clone().body;if(t){let o=t.getReader(),s=new TextDecoder,a,l="";for(;!(a=yield o.read()).done;){let e=a.value;l+=s.decode(e)}e=l,e=fF(e,i,r,n.headers)}else e=""}catch(t){e=`Unable to clone response: ${t}`}return e}));vl(t,Object.fromEntries(n.headers.entries()),a,e.networkRecordingOptions)}}})})),(null==(u=e.instrumentations)?void 0:u["@opentelemetry/instrumentation-xml-http-request"])!==!1&&S.push(new fN({propagateTraceHeaderCorsUrls:vf(e.tracingOrigins),applyCustomAttributesOnSpan:(t,r)=>{var n,i,o,s;if(!(!t.attributes||!1===t.attributes[b3])&&(vi(t,r._body,r._requestHeaders,e.networkRecordingOptions),null!=(n=e.networkRecordingOptions)&&n.recordHeadersAndBody)){let n,a="";(""===r.responseType||"text"===r.responseType)&&(a=fF(r.responseText,null==(i=e.networkRecordingOptions)?void 0:i.networkBodyKeysToRedact,null==(o=e.networkRecordingOptions)?void 0:o.bodyKeysToRecord,void 0)),vl(t,(s=r.getAllResponseHeaders(),n={},s&&s.trim().split(/[\r\n]+/).forEach(e=>{let t=e.split(": "),r=t.shift();r&&(n[r]=t.join(": "))}),n),a,e.networkRecordingOptions)}}}))),f=(d={instrumentations:S}).tracerProvider||uO.getTracerProvider(),m=d.meterProvider||uy.getMeterProvider(),g=d.loggerProvider||dw.getLoggerProvider(),function(e,t,r,n){for(var i=0,o=e.length;i<o;i++){var s=e[i];t&&s.setTracerProvider(t),r&&s.setMeterProvider(r),n&&s.setLoggerProvider&&s.setLoggerProvider(n),s.getConfig().enabled||s.enable()}}(null!=(p=null==(h=d.instrumentations)?void 0:h.flat())?p:[],f,m,g);let _=new pk;return _.enable(),b2.tracerProvider.register({contextManager:_,propagator:new uq({propagators:[new uX,new ve({backendUrl:b,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:v})]})})})({backendUrl:null!=(t=null==(e=this._options)?void 0:e.backendUrl)?t:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:null!=(i=null==(n=null==(r=this._options)?void 0:r.otel)?void 0:n.otlpEndpoint)?i:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:null!=(s=null==(o=this._options)?void 0:o.environment)?s:"production",networkRecordingOptions:"object"==typeof(null==(a=this._options)?void 0:a.networkRecording)?this._options.networkRecording:void 0,tracingOrigins:null==(l=this._options)?void 0:l.tracingOrigins,serviceName:null!=(u=null==(c=this._options)?void 0:c.serviceName)?u:"browser",serviceVersion:null==(d=this._options)?void 0:d.version,instrumentations:null==(p=null==(h=this._options)?void 0:h.otel)?void 0:p.instrumentations,eventNames:null==(m=null==(f=this._options)?void 0:f.otel)?void 0:m.eventNames,getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();let v=new s2(null!=(g=this._options.backendUrl)?g:"https://pub.observability.app.launchdarkly.com",{headers:{}});this.graphqlSDK=function(e,t=(e,t,r,n)=>e()){return{PushPayload:(r,n)=>t(t=>e.request(au,r,o4(o4({},n),t)),"PushPayload","mutation",r),PushSessionEvents:(r,n)=>t(t=>e.request(ad,r,o4(o4({},n),t)),"PushSessionEvents","mutation",r),identifySession:(r,n)=>t(t=>e.request(ah,r,o4(o4({},n),t)),"identifySession","mutation",r),addSessionProperties:(r,n)=>t(t=>e.request(ap,r,o4(o4({},n),t)),"addSessionProperties","mutation",r),pushMetrics:(r,n)=>t(t=>e.request(af,r,o4(o4({},n),t)),"pushMetrics","mutation",r),addSessionFeedback:(r,n)=>t(t=>e.request(am,r,o4(o4({},n),t)),"addSessionFeedback","mutation",r),initializeSession:(r,n)=>t(t=>e.request(ag,r,o4(o4({},n),t)),"initializeSession","mutation",r),Ignore:(r,n)=>t(t=>e.request(ab,r,o4(o4({},n),t)),"Ignore","query",r),GetSamplingConfig:(r,n)=>t(t=>e.request(av,r,o4(o4({},n),t)),"GetSamplingConfig","query",r)}}(v,b=(e,t,r,n,i=0)=>o8(void 0,null,function*(){try{return yield e()}catch(s){var o;if(s instanceof sH&&(null==(o=s.response.errors)?void 0:o.find(e=>aU.includes(e.message)))!==void 0)throw s;if(i<3)return yield new Promise(e=>setTimeout(e,1e3+500*Math.pow(2,i))),yield b(e,t,r,n,i+1);throw console.error(`highlight.io: data request failed after ${i} retries`),s}})),yield this.configureSampling(),this.setupListeners()})}stop(){return lw(this,null,function*(){this._started&&(this._started=!1,yield lw(void 0,null,function*(){yield Promise.allSettled([lw(void 0,null,function*(){b2.tracerProvider?(yield b2.tracerProvider.shutdown(),b2.tracerProvider=void 0):console.warn("OTEL shutdown called without initialized tracerProvider.")}),lw(void 0,null,function*(){b2.meterProvider?(yield b2.meterProvider.shutdown(),b2.meterProvider=void 0):console.warn("OTEL shutdown called without initialized meterProvider.")})])}))})}configureSampling(){return lw(this,null,function*(){try{let e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){oY("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}_recordLog(e,t,r,n){this.startSpan(b9,i=>{let o="string"==typeof e?e:ae(e),s=n?ae(n.map(e=>e.toString())):void 0;if(i?.addEvent("log",lb({[b6]:t,[b7]:o,"code.stacktrace":s},r)),this._options.reportConsoleErrors&&"error"===t){i?.recordException(Error(o)),i?.setStatus({code:uV.ERROR,message:o});let e=Error(o);n&&(e.stack=s),this.recordError(e)}})}_recordErrorMessage(e,t){try{e.payload&&(t=lb(lb({},JSON.parse(e.payload)),t||{}))}catch{}this.startSpan("highlight.exception",r=>{var n;yf(r,null!=(n=e.error)?n:Error(e.event),{"launchdarkly.exception.id":e.id}),r?.setAttributes(lb({event:e.event,type:e.type,url:e.url,source:e.source,lineNumber:e.lineNumber,columnNumber:e.columnNumber},t))});let r=((e,t)=>{var r={};for(var n in e)lf.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&lp)for(var n of lp(e))0>t.indexOf(n)&&lm.call(e,n)&&(r[n]=e[n]);return r})(e,["payload"]);for(let e of this._integrations)e.error(aj(),lv(lb({},r),{payload:JSON.stringify(t)}))}recordError(e,t,r,n,i){var o,s,a,l;(e=e||Error("Unknown error"))instanceof Error&&e.cause&&(r=lv(lb({},r),{"exception.cause":JSON.stringify(e.cause)}));let c=t?t+":"+e.message:e.message;"React.ErrorBoundary"===i&&(c="ErrorBoundary: "+c);let u=lF(e),d={error:e,event:c,type:i??"custom",url:window.location.href,source:n??"frontend",lineNumber:null!=(o=u[0])&&o.lineNumber?null==(s=u[0])?void 0:s.lineNumber:0,columnNumber:null!=(a=u[0])&&a.columnNumber?null==(l=u[0])?void 0:l.columnNumber:0,stackTrace:u,timestamp:new Date().toISOString(),id:lQ()};this._recordErrorMessage(d,r)}recordCount(e){var t;let r=this._counters.get(e.name);if(!r){if(!(r=null==(t=vn())?void 0:t.createCounter(e.name)))return;this._counters.set(e.name,r)}r.add(e.value,lv(lb({},e.attributes),{"highlight.session_id":aj()}))}recordGauge(e){var t,r,n,i;let o=this._gauges.get(e.name);if(!o){if(!(o=null==(t=vn())?void 0:t.createGauge(e.name)))return;this._gauges.set(e.name,o)}o.record(e.value,lv(lb({},e.attributes),{"highlight.session_id":aj()}));let s={name:e.name,value:e.value,category:null==(r=e.attributes)?void 0:r.category,group:null==(i=null==(n=e.attributes)?void 0:n.group)?void 0:i.toString(),tags:e.attributes?Object.entries(e.attributes).map(([e,t])=>{var r;return{name:e??"",value:null!=(r=t?.toString())?r:""}}):[]};for(let e of this._integrations)e.recordGauge(aj(),s)}recordIncr(e){this.recordCount(lv(lb({},e),{value:1}))}recordHistogram(e){var t;let r=this._histograms.get(e.name);if(!r){if(!(r=null==(t=vn())?void 0:t.createHistogram(e.name)))return;this._histograms.set(e.name,r)}r.record(e.value,lv(lb({},e.attributes),{"highlight.session_id":aj()}))}recordUpDownCounter(e){var t;let r=this._up_down_counters.get(e.name);if(!r){if(!(r=null==(t=vn())?void 0:t.createUpDownCounter(e.name)))return;this._up_down_counters.set(e.name,r)}r.add(e.value,lv(lb({},e.attributes),{"highlight.session_id":aj()}))}startSpan(e,t,r,n){let i=vr();if(!i){let e=yp();return void 0===n&&void 0===r?t(e):void 0===n?r(e):n(e)}let o=(e,t)=>{let r=t(e);return r instanceof Promise?r.finally(()=>e.end()):(e.end(),r)};return void 0===n&&void 0===r?i.startActiveSpan(e,e=>o(e,t)):void 0===n?i.startActiveSpan(e,t,e=>o(e,r)):i.startActiveSpan(e,t,r,e=>o(e,n))}startManualSpan(e,t,r,n){let i=vr();if(!i){let e=yp();return void 0===n&&void 0===r?t(e):void 0===n?r(e):n(e)}return void 0===n&&void 0===r?i.startActiveSpan(e,t):void 0===n?i.startActiveSpan(e,t,r):i.startActiveSpan(e,t,r,n)}register(e,t){this._integrations.push(new lt(e,t))}getHooks(e){return this._integrations.flatMap(t=>{var r,n;return null!=(n=null==(r=t.getHooks)?void 0:r.call(t,e))?n:[]})}submitViewportMetrics({height:e,width:t,availHeight:r,availWidth:n}){this.recordGauge({name:lW.ViewportHeight,value:e,attributes:{category:lP.Device,group:window.location.href}}),this.recordGauge({name:lW.ViewportWidth,value:t,attributes:{category:lP.Device,group:window.location.href}}),this.recordGauge({name:lW.ScreenHeight,value:r,attributes:{category:lP.Device,group:window.location.href}}),this.recordGauge({name:lW.ScreenWidth,value:n,attributes:{category:lP.Device,group:window.location.href}}),this.recordGauge({name:lW.ViewportArea,value:e*t,attributes:{category:lP.Device,group:window.location.href}})}setupListeners(){var e,t,r,n,i,o;let s,a,l,c,u,d,h,p,f,m,g,b,v,y,w;this._options.disableConsoleRecording||function(e,t){let r,n=t.logger;r=window[n];let i=[];if(t.level.includes("error")&&window){let r=r=>{let{message:n,error:i}=r,o=[];i&&(o=lF(i));let s=[aw(n,t.stringifyOptions)];e({type:"Error",trace:o,time:Date.now(),value:s})};window.addEventListener("error",r),i.push(()=>{window&&window.removeEventListener("error",r)})}for(let n of t.level)i.push(function(r,n){return r[n]?function(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}}(r,n,r=>(...i)=>{r.apply(this,i);try{e(function(e,t,...r){let n=lF(Error());return{type:e,trace:n,value:t.serializeConsoleAttributes?r.map(e=>"object"==typeof e?aw(e,t.stringifyOptions):e):r.filter(e=>"object"!=typeof e).map(e=>`${e}`),attributes:aw(r.filter(e=>"object"==typeof e).reduce((e,t)=>lb(lb({},e),t),{}),t.stringifyOptions),time:Date.now()}}(n,t,...i))}catch(e){r("highlight logger error:",e,...i)}}):()=>{}}(r,n))}(e=>{var t;this._recordLog(null==(t=e.value)?void 0:t.join(" "),e.type,e.attributes?JSON.parse(e.attributes):{},e.trace)},{level:null!=(e=this._options.consoleMethodsToRecord)?e:[...lx],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),!1!==this._options.enablePerformanceRecording&&(t=e=>{Object.entries(e).filter(([e])=>"relativeTimestamp"!==e).forEach(([e,t])=>t&&this.recordGauge({name:e,value:t,attributes:{category:lP.Performance,group:window.location.href}}))},s=0,(a=()=>{let e=(new Date().getTime()-0)/1e3;t({jsHeapSizeLimit:vb.memory.jsHeapSizeLimit||0,usedJSHeapSize:vb.memory.usedJSHeapSize||0,relativeTimestamp:e,fps:s})})(),setInterval(()=>{a()},1e3),l=0,c=Date.now(),(u=function(){var e=Date.now();l++,e>1e3+c&&(s=Math.round(1e3*l/(e-c)),l=0,c=e),requestAnimationFrame(u)})(),r=e=>{this.recordGauge({name:"Jank",value:e.jankAmount,attributes:{category:lP.WebVital,group:e.querySelector}})},d={},h=16.666666666666668,lw(void 0,null,function*(){let e=[];for(let t=0;t<30;t++)e.push((yield vg()));return e.reduce((e,t)=>e+t,0)/e.length}).then(e=>h=e),p=e=>{var t;null!=d&&d.event||(d={event:e,location:window.location.href,timerStart:null==(t=window.performance)?void 0:t.now()},window.requestAnimationFrame(f))},f=()=>{null!=d&&d.timerStart&&(m(window.performance.now()-d.timerStart-h),d={})},m=e=>{r({relativeTimestamp:(new Date().getTime()-0)/1e3,jankAmount:e,querySelector:g(),newLocation:window.location.href!=d.location?window.location.href:void 0})},g=()=>{var e;return null!=(e=d?.event)&&e.target?function(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(let r of e.classList)t.push(`.${r}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}(d.event.target):""},window.addEventListener("click",p,!0),window.addEventListener("keydown",p,!0)),((e,{enablePromisePatch:t})=>{if(typeof window>"u")return()=>{};let r=window.onerror=(t,r,n,i,o)=>{lq(e,t,r,o)},n=window.onunhandledrejection=t=>{if(t.reason){let r=t.promise;r.getStack?lq(e,t.reason,t.type,r.getStack()):lq(e,t.reason,t.type)}},i=window.Promise,o=class extends i{constructor(e){super(e),ly(this,"promiseCreationError"),this.promiseCreationError=Error()}getStack(){return this.promiseCreationError}static shouldPatch(){let e=typeof window.Zone>"u";return t&&e}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=n,window.onerror=r}})(e=>{var t;if(l0.includes(e.event)||l1.some(t=>e.event.includes(t)))return;let r=Error(e.event);r.stack=ae(e.stackTrace.map(e=>e.toString()));let n={};try{e.payload&&(n=JSON.parse(e.payload))}catch{}this._recordErrorMessage(lv(lb({},e),{error:null!=(t=e.error)?t:r}),n)},{enablePromisePatch:!!this._options.enablePromisePatch}),vU(b=e=>{let{name:t,value:r}=e,{hostname:n,pathname:i,href:o}=window.location;this.recordGauge({name:t,value:r,attributes:{group:window.location.pathname,category:lP.WebVital,[aS]:fP(o),[a_]:i,"server.address":n}})}),vz(b),v0(b),ys(b),yc(b),yn(b),n=e=>{this.submitViewportMetrics(e)},y=()=>{clearTimeout(v),v=setTimeout(()=>{var e,t;n({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:null!=(t=null==(e=window.screen.orientation)?void 0:e.angle)?t:0})},500)},window.addEventListener("resize",y),y(),i=e=>{let t={category:lP.Performance,group:window.location.href};void 0!==e.saveData&&(t.saveData=e.saveData.toString()),void 0!==e.effectiveType&&(t.effectiveType=e.effectiveType.toString()),void 0!==e.type&&(t.type=e.type.toString()),Object.entries(e).filter(([e])=>"relativeTimestamp"!==e).forEach(([e,r])=>{"number"==typeof r&&!isNaN(r)&&isFinite(r)&&this.recordGauge({name:e,value:r,attributes:t})})},o=new Date().getTime(),(w=()=>{i({relativeTimestamp:(new Date().getTime()-o)/1e3,downlink:yu.downlink,downlinkMax:yu.downlinkMax,effectiveType:yu.effectiveType,rtt:yu.rtt,saveData:yu.saveData,type:yu.type})})(),setInterval(()=>{w()},1e3);let{getDeviceDetails:x}=(()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};let e=window.performance;return{getDeviceDetails:()=>({deviceMemory:1024*(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>({jsHeapSizeLimit:e.memory.jsHeapSizeLimit/1e6,totalJSHeapSize:e.memory.totalJSHeapSize/1e6,usedJSHeapSize:e.memory.usedJSHeapSize/1e6})}})();x&&this.recordGauge({name:lW.DeviceMemory,value:x().deviceMemory,attributes:{category:lP.Device,group:window.location.href}})}recordLog(e,t,r){return this._recordLog(e,t,r)}}class yg extends la{constructor(e){super(e),ly(this,"observe"),ly(this,"options"),this.options=e}initialize(e,t){try{if(typeof window>"u"||typeof document>"u")return void console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");if(!e)return void console.warn("@launchdarkly/observability is not initializing because the SDK credential is undefined.");this.configureSession(e,t),this.observe=new ym(lv(lb({},t),{projectId:e,sessionSecureId:this.sessionSecureID})),null!=t&&t.manualStart||this.observe.start(),i.load(this.observe)}catch(e){oY("Error initializing @launchdarkly/observability SDK","error",e)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(e,t){var r;null==(r=this.observe)||r.register(e,t)}getHooks(e){var t,r,n,i;let o=lb(lb({"telemetry.sdk.name":e.sdk.name,"telemetry.sdk.version":e.sdk.version,[aK]:e.clientSideId,[a0]:"LaunchDarkly"},null!=(t=e.application)&&t.id?{[a5]:e.application.id}:{}),null!=(r=e.application)&&r.version?{[a3]:e.application.version}:{});return this.initialize(null!=(i=null!=(n=e.sdkKey)?n:e.mobileKey)?i:e.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(t,r,n)=>{var i,s,a,l,c,u,d,h;for(let o of null!=(a=null==(s=null==(i=this.observe)?void 0:i.getHooks)?void 0:s.call(i,e))?a:[])null==(l=o.afterIdentify)||l.call(o,t,r,n);if("completed"===n.status){let e=lv(lb({},a8(t.context)),{key:null!=(d=null==(u=null==(c=this.options)?void 0:c.contextFriendlyName)?void 0:u.call(c,t.context))?d:a7(t.context),timeout:t.timeout,canonicalKey:a7(t.context),"result.status":n.status});null==(h=this.observe)||h.recordLog("LD.identify","info",lb(lb({},o),e))}return r},afterEvaluation:(t,r,n)=>{var i,s,a,l,c;for(let o of null!=(a=null==(s=null==(i=this.observe)?void 0:i.getHooks)?void 0:s.call(i,e))?a:[])null==(l=o.afterEvaluation)||l.call(o,t,r,n);let u=lb({[aJ]:t.flagKey,[a$]:JSON.stringify(n.value)},n.variationIndex?{[a2]:n.variationIndex}:{});if(n.reason)for(let e in a1){let t=n.reason[e];t&&(u[a1[e]]=t)}t.context&&(u[aQ]=JSON.stringify(a8(t.context)),u[aq]=a7(t.context));let d=lb(lb({},o),u);return null==(c=this.observe)||c.startSpan("evaluation",e=>{e&&e.addEvent(aH,d)}),r},afterTrack:t=>{var r,n,i,s,a;for(let o of null!=(i=null==(n=null==(r=this.observe)?void 0:r.getHooks)?void 0:n.call(r,e))?i:[])null==(s=o.afterTrack)||s.call(o,t);null==(a=this.observe)||a.recordLog("LD.track","info",lb(lv(lb({},o),{key:t.key,value:t.metricValue}),"object"==typeof t.data?t.data:{}))}}]}}var yb=r("../../node_modules/.pnpm/@launchdarkly+session-replay@1.0.2/node_modules/@launchdarkly/session-replay/dist/index-Cxm-TAmp.js");let yv=["flag-sdk","flag-dev-server","events","settings"],yy=["flags","monitoring","interactive","settings"];function yw(e){return e?"dev-server":"sdk"}let yx=["top-left","top-right","bottom-left","bottom-right"],yk="ld-toolbar-settings",yS="ld-toolbar-starred-flags",y_="ld-toolbar-mcp-alert-dismissed",yC="ld-toolbar-analytics-consent-shown",yT="ld-toolbar-contexts",yI="ld-toolbar-active-context",yE=["cursor","windsurf","vscode","github-copilot"],yR="cursor";function yO(e,t){try{let r=localStorage.getItem(yk),n={};r&&(n=JSON.parse(r));let i={...n,[e]:t};localStorage.setItem(yk,JSON.stringify(i))}catch(t){console.warn(`Failed to save toolbar ${e} to localStorage:`,t)}}function yL(){try{let e=localStorage.getItem(yT);if(e){let t=JSON.parse(e);return Array.isArray(t)?t:[]}}catch(e){console.error("Error reading contexts from localStorage:",e)}return[]}function yA(e){try{let t=JSON.stringify(e);localStorage.setItem(yT,t)}catch(e){console.error("Error saving contexts to localStorage:",e)}}function yN(){try{let e=localStorage.getItem(yI);if(e){let t=JSON.parse(e);if(t&&"object"==typeof t&&t.kind)return t}}catch(e){console.error("Error reading active context from localStorage:",e)}return null}function yZ(e){try{if(e){let t=JSON.stringify(e);localStorage.setItem(yI,t)}else localStorage.removeItem(yI)}catch(e){console.error("Error saving active context to localStorage:",e)}}let yM=(0,L.createContext)(null),yG=()=>{let e=(0,L.useContext)(yM);if(!e)throw Error("useToolbarUIContext must be used within ToolbarUIProvider");return e},yV=({children:e,initialPosition:t})=>{let r=t&&yx.includes(t)?t:void 0,[n,i]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return null;let t=JSON.parse(e);if(!t.position)return null;return yx.includes(t.position)?t.position:null}catch(e){return console.warn("Failed to load toolbar position from localStorage:",e),null}})()||r||"bottom-right"),o=(0,L.useCallback)(e=>{i(e),yO("position",e)},[]),s=(0,L.useMemo)(()=>({position:n,handlePositionChange:o}),[n,o]);return(0,O.jsx)(yM.Provider,{value:s,children:e})};function yW(){let e;return"u">typeof window&&window.navigator&&(e=void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack),1===e||!0===e||"1"===e||"yes"===e}class yP{ldClient=null;mode=null;isOptedInToAnalytics=!1;searchDebounceTimer=null;constructor(e,t,r){this.ldClient=e||null,this.mode=t||null,this.isOptedInToAnalytics=r||!1}track(e,t){let r=`ld.toolbar.${e}`;if(!this.ldClient)return void console.debug("ToolbarAnalytics: LDClient not available, skipping track event:",r);if(yW()||!this.isOptedInToAnalytics)return;let n={...t,mode:this.mode};try{this.ldClient.track(r,n)}catch(e){console.error("ToolbarAnalytics: Failed to track event:",r,e)}}trackInitialization(){this.track("initialized",{})}trackPositionChange(e,t,r){this.track("position.changed",{oldPosition:e,newPosition:t,source:r})}trackAutoCollapseToggle(e){this.track("auto.collapse.toggled",{action:e})}trackTabChange(e,t){this.track("tab.changed",{fromTab:e,toTab:t})}trackSubtabChange(e,t){this.track("subtab.changed",{fromSubtab:e,toSubtab:t})}trackSearch(e){this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=setTimeout(()=>{e&&(this.track("search",{query:e}),this.searchDebounceTimer=null)},1e3)}trackToolbarToggle(e,t){this.track("toggle",{action:e,trigger:t})}trackFlagOverride(e,t,r){this.track("toggle.flag",{flagKey:e,value:"remove"===r?null:t,action:r})}trackStarredFlag(e,t){this.track("star.flag",{flagKey:e,action:t})}trackFilterChange(e,t){this.track("filter.changed",{filter:e,action:t})}trackOpenFlagDeeplink(e,t){this.track("open.flag.deeplink",{flagKey:e,baseUrl:t})}trackClearEvents(){this.track("clear.events",{})}trackEventClick(e){this.track("event.click",{eventName:e})}trackReloadOnFlagChangeToggle(e){this.track("reload.on.flag.change.toggle",{enabled:e})}trackLoginSuccess(){this.track("login.success",{})}trackLoginCancelled(){this.track("login.cancelled",{})}trackLogout(){this.track("logout",{})}trackAuthError(e){this.track("auth.error",{error:e instanceof Error?e.message:String(e)})}trackProjectSwitch(e,t){this.track("project.switched",{fromProject:e,toProject:t})}trackApiError(e){this.track("api.error",{error:e instanceof Error?e.message:String(e)})}trackRefresh(){this.track("refresh",{})}trackFeedback(e,t,r){if(this.track("feedback.submitted",{sentiment:t,comment:e}),r?.flagKey){if(!this.ldClient)return void console.debug("ToolbarAnalytics: LDClient not available, skipping feedback event:",r.flagKey);if(!yW()&&this.isOptedInToAnalytics)try{!function(e,t){let{flagKey:r,feedback:n,sentiment:i,prompt:o,customProperties:s}=t,a={feedback_answer:n,flag_key:r,sentiment:i??"neutral",custom_properties:s},l=yb.t?.getSession()?.sessionSecureID;l&&(a.o11y_session_id=l),o&&(a.feedback_prompt=o),e.track("$ld:feedback",a),e.flush()}(this.ldClient,{flagKey:r.flagKey,feedback:e,sentiment:t,prompt:r.prompt,customProperties:r.customProperties})}catch(e){console.error("ToolbarAnalytics: Failed to send feedback event:",e)}}}trackFlagKeyCopy(e){this.track("copy.flag.key",{flagKey:e})}trackContextAdded(e,t,r){this.track("context.added",{contextKind:e,contextKey:t,isMultiKind:r})}trackContextRemoved(e,t){this.track("context.removed",{contextKind:e,contextKey:t})}trackContextUpdated(e,t,r,n){this.track("context.updated",{oldKind:e,oldKey:t,newKind:r,newKey:n})}trackContextSelected(e,t){this.track("context.selected",{contextKind:e,contextKey:t})}trackContextEditStarted(e,t){this.track("context.edit.started",{contextKind:e,contextKey:t})}trackContextEditCancelled(e,t){this.track("context.edit.cancelled",{contextKind:e,contextKey:t})}trackContextKeyCopy(e){this.track("context.key.copied",{contextKey:e})}trackShareState(e){this.track("share.state",{includeSettings:e.includeSettings,overrideCount:e.overrideCount,contextCount:e.contextCount,starredFlagCount:e.starredFlagCount})}}function yj(e){function t(e,t){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=e,this.code=t}return t.prototype=Error(),t.prototype.name=e,t.prototype.constructor=t,t}let yX=yj("LaunchDarklyUnexpectedResponseError"),yD=yj("LaunchDarklyInvalidEnvironmentIdError"),yF=yj("LaunchDarklyInvalidUserError"),yz=yj("LaunchDarklyInvalidEventKeyError"),yB=yj("LaunchDarklyInvalidArgumentError"),yU=yj("LaunchDarklyFlagFetchError");for(var yH={LDUnexpectedResponseError:yX,LDInvalidEnvironmentIdError:yD,LDInvalidUserError:yF,LDInvalidEventKeyError:yz,LDInvalidArgumentError:yB,LDInvalidDataError:yj("LaunchDarklyInvalidDataError"),LDFlagFetchError:yU,LDTimeoutError:yj("LaunchDarklyTimeoutError"),isHttpErrorRecoverable:function(e){return!(e>=400&&e<500)||400===e||408===e||429===e}},yY=[],yK=[],yJ=("u">typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),yQ=0;yQ<64;++yQ)yY[yQ]=yJ[yQ],yK[yJ.charCodeAt(yQ)]=yQ;yK[45]=62,yK[95]=63;var yq=function(e){for(var t,r=e.length,n=r%3,i=[],o=0,s=r-n;o<s;o+=16383)i.push(function(e,t,r){for(var n,i=[],o=t;o<r;o+=3)i.push(yY[(n=(e[o]<<16&0xff0000)+(e[o+1]<<8&65280)+(255&e[o+2]))>>18&63]+yY[n>>12&63]+yY[n>>6&63]+yY[63&n]);return i.join("")}(e,o,o+16383>s?s:o+16383));return 1===n?i.push(yY[(t=e[r-1])>>2]+yY[t<<4&63]+"=="):2===n&&i.push(yY[(t=(e[r-2]<<8)+e[r-1])>>10]+yY[t>>4&63]+yY[t<<2&63]+"="),i.join("")},y$=Array.isArray,y0=Object.keys,y1=Object.prototype.hasOwnProperty,y2=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){var n,i,o,s=y$(t),a=y$(r);if(s&&a){if((i=t.length)!=r.length)return!1;for(n=i;0!=n--;)if(!e(t[n],r[n]))return!1;return!0}if(s!=a)return!1;var l=t instanceof Date,c=r instanceof Date;if(l!=c)return!1;if(l&&c)return t.getTime()==r.getTime();var u=t instanceof RegExp,d=r instanceof RegExp;if(u!=d)return!1;if(u&&d)return t.toString()==r.toString();var h=y0(t);if((i=h.length)!==y0(r).length)return!1;for(n=i;0!=n--;)if(!y1.call(r,h[n]))return!1;for(n=i;0!=n--;)if(!e(t[o=h[n]],r[o]))return!1;return!0}return t!=t&&r!=r};let y5=["key","ip","country","email","firstName","lastName","avatar","name"];function y3(e){return yq(function(e){let t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return t}(unescape(encodeURIComponent(e))))}function y9(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var y4,y6={appendUrlPath:function(e,t){return(e.endsWith("/")?e.substring(0,e.length-1):e)+(t.startsWith("/")?"":"/")+t},base64URLEncode:function(e){return y3(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},btoa:y3,clone:function(e){return JSON.parse(JSON.stringify(e))},deepEquals:function(e,t){return y2(e,t)},extend:function(...e){return e.reduce((e,t)=>({...e,...t}),{})},getLDUserAgentString:function(e){let t=e.version||"?";return e.userAgent+"/"+t},objectHasOwnProperty:y9,onNextTick:function(e){setTimeout(e,0)},sanitizeContext:function(e){let t;return e?(null!==e.kind&&void 0!==e.kind||y5.forEach(r=>{let n=e[r];void 0!==n&&"string"!=typeof n&&((t=t||{...e})[r]=String(n))}),t||e):e},transformValuesToVersionedValues:function(e){let t={};for(let r in e)y9(e,r)&&(t[r]={value:e[r],version:0});return t},transformVersionedValuesToValues:function(e){let t={};for(let r in e)y9(e,r)&&(t[r]=e[r].value);return t},wrapPromiseCallback:function(e,t){let r=e.then(e=>(t&&setTimeout(()=>{t(null,e)},0),e),e=>{if(!t)return Promise.reject(e);setTimeout(()=>{t(e,null)},0)});return t?void 0:r},once:function(e){let t,r=!1;return function(...n){return r||(r=!0,t=e.apply(this,n)),t}}},y7=new Uint8Array(16);function y8(){if(!y4&&!(y4="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"u">typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y4(y7)}var we=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function wt(e){return"string"==typeof e&&we.test(e)}for(var wr,wn,wi=[],wo=0;wo<256;++wo)wi.push((wo+256).toString(16).substr(1));function ws(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(wi[e[t+0]]+wi[e[t+1]]+wi[e[t+2]]+wi[e[t+3]]+"-"+wi[e[t+4]]+wi[e[t+5]]+"-"+wi[e[t+6]]+wi[e[t+7]]+"-"+wi[e[t+8]]+wi[e[t+9]]+"-"+wi[e[t+10]]+wi[e[t+11]]+wi[e[t+12]]+wi[e[t+13]]+wi[e[t+14]]+wi[e[t+15]]).toLowerCase();if(!wt(r))throw TypeError("Stringified UUID is invalid");return r}var wa=0,wl=0;function wc(e){if(!wt(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/0x10000000000&255,r[11]=t/0x100000000&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function wu(e,t,r){function n(e,n,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=wc(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(n),s.set(e,n.length),(s=r(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,i){o=o||0;for(var a=0;a<16;++a)i[o+a]=s[a];return i}return ws(s)}try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function wd(e){return 14+(e+64>>>9<<4)+1}function wh(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function wp(e,t,r,n,i,o){var s;return wh((s=wh(wh(t,e),wh(n,o)))<<i|s>>>32-i,r)}function wf(e,t,r,n,i,o,s){return wp(t&r|~t&n,e,t,i,o,s)}function wm(e,t,r,n,i,o,s){return wp(t&n|r&~n,e,t,i,o,s)}function wg(e,t,r,n,i,o,s){return wp(t^r^n,e,t,i,o,s)}function wb(e,t,r,n,i,o,s){return wp(r^(t|~n),e,t,i,o,s)}function wv(e,t){return e<<t|e>>>32-t}var wy=Object.freeze({__proto__:null,v1:function(e,t,r){var n=t&&r||0,i=t||Array(16),o=(e=e||{}).node||wr,s=void 0!==e.clockseq?e.clockseq:wn;if(null==o||null==s){var a=e.random||(e.rng||y8)();null==o&&(o=wr=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=wn=16383&(a[6]<<8|a[7]))}var l=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:wl+1,u=l-wa+(c-wl)/1e4;if(u<0&&void 0===e.clockseq&&(s=s+1&16383),(u<0||l>wa)&&void 0===e.nsecs&&(c=0),c>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");wa=l,wl=c,wn=s;var d=(1e4*(0xfffffff&(l+=122192928e5))+c)%0x100000000;i[n++]=d>>>24&255,i[n++]=d>>>16&255,i[n++]=d>>>8&255,i[n++]=255&d;var h=l/0x100000000*1e4&0xfffffff;i[n++]=h>>>8&255,i[n++]=255&h,i[n++]=h>>>24&15|16,i[n++]=h>>>16&255,i[n++]=s>>>8|128,i[n++]=255&s;for(var p=0;p<6;++p)i[n+p]=o[p];return t||ws(i)},v3:wu("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){for(var t=[],r=32*e.length,n="0123456789abcdef",i=0;i<r;i+=8){var o=e[i>>5]>>>i%32&255,s=parseInt(n.charAt(o>>>4&15)+n.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[wd(t)-1]=t;for(var r=0x67452301,n=-0x10325477,i=-0x67452302,o=0x10325476,s=0;s<e.length;s+=16){var a=r,l=n,c=i,u=o;r=wf(r,n,i,o,e[s],7,-0x28955b88),o=wf(o,r,n,i,e[s+1],12,-0x173848aa),i=wf(i,o,r,n,e[s+2],17,0x242070db),n=wf(n,i,o,r,e[s+3],22,-0x3e423112),r=wf(r,n,i,o,e[s+4],7,-0xa83f051),o=wf(o,r,n,i,e[s+5],12,0x4787c62a),i=wf(i,o,r,n,e[s+6],17,-0x57cfb9ed),n=wf(n,i,o,r,e[s+7],22,-0x2b96aff),r=wf(r,n,i,o,e[s+8],7,0x698098d8),o=wf(o,r,n,i,e[s+9],12,-0x74bb0851),i=wf(i,o,r,n,e[s+10],17,-42063),n=wf(n,i,o,r,e[s+11],22,-0x76a32842),r=wf(r,n,i,o,e[s+12],7,0x6b901122),o=wf(o,r,n,i,e[s+13],12,-0x2678e6d),i=wf(i,o,r,n,e[s+14],17,-0x5986bc72),r=wm(r,n=wf(n,i,o,r,e[s+15],22,0x49b40821),i,o,e[s+1],5,-0x9e1da9e),o=wm(o,r,n,i,e[s+6],9,-0x3fbf4cc0),i=wm(i,o,r,n,e[s+11],14,0x265e5a51),n=wm(n,i,o,r,e[s],20,-0x16493856),r=wm(r,n,i,o,e[s+5],5,-0x29d0efa3),o=wm(o,r,n,i,e[s+10],9,0x2441453),i=wm(i,o,r,n,e[s+15],14,-0x275e197f),n=wm(n,i,o,r,e[s+4],20,-0x182c0438),r=wm(r,n,i,o,e[s+9],5,0x21e1cde6),o=wm(o,r,n,i,e[s+14],9,-0x3cc8f82a),i=wm(i,o,r,n,e[s+3],14,-0xb2af279),n=wm(n,i,o,r,e[s+8],20,0x455a14ed),r=wm(r,n,i,o,e[s+13],5,-0x561c16fb),o=wm(o,r,n,i,e[s+2],9,-0x3105c08),i=wm(i,o,r,n,e[s+7],14,0x676f02d9),r=wg(r,n=wm(n,i,o,r,e[s+12],20,-0x72d5b376),i,o,e[s+5],4,-378558),o=wg(o,r,n,i,e[s+8],11,-0x788e097f),i=wg(i,o,r,n,e[s+11],16,0x6d9d6122),n=wg(n,i,o,r,e[s+14],23,-0x21ac7f4),r=wg(r,n,i,o,e[s+1],4,-0x5b4115bc),o=wg(o,r,n,i,e[s+4],11,0x4bdecfa9),i=wg(i,o,r,n,e[s+7],16,-0x944b4a0),n=wg(n,i,o,r,e[s+10],23,-0x41404390),r=wg(r,n,i,o,e[s+13],4,0x289b7ec6),o=wg(o,r,n,i,e[s],11,-0x155ed806),i=wg(i,o,r,n,e[s+3],16,-0x2b10cf7b),n=wg(n,i,o,r,e[s+6],23,0x4881d05),r=wg(r,n,i,o,e[s+9],4,-0x262b2fc7),o=wg(o,r,n,i,e[s+12],11,-0x1924661b),i=wg(i,o,r,n,e[s+15],16,0x1fa27cf8),r=wb(r,n=wg(n,i,o,r,e[s+2],23,-0x3b53a99b),i,o,e[s],6,-0xbd6ddbc),o=wb(o,r,n,i,e[s+7],10,0x432aff97),i=wb(i,o,r,n,e[s+14],15,-0x546bdc59),n=wb(n,i,o,r,e[s+5],21,-0x36c5fc7),r=wb(r,n,i,o,e[s+12],6,0x655b59c3),o=wb(o,r,n,i,e[s+3],10,-0x70f3336e),i=wb(i,o,r,n,e[s+10],15,-1051523),n=wb(n,i,o,r,e[s+1],21,-0x7a7ba22f),r=wb(r,n,i,o,e[s+8],6,0x6fa87e4f),o=wb(o,r,n,i,e[s+15],10,-0x1d31920),i=wb(i,o,r,n,e[s+6],15,-0x5cfebcec),n=wb(n,i,o,r,e[s+13],21,0x4e0811a1),r=wb(r,n,i,o,e[s+4],6,-0x8ac817e),o=wb(o,r,n,i,e[s+11],10,-0x42c50dcb),i=wb(i,o,r,n,e[s+2],15,0x2ad7d2bb),n=wb(n,i,o,r,e[s+9],21,-0x14792c6f),r=wh(r,a),n=wh(n,l),i=wh(i,c),o=wh(o,u)}return[r,n,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(wd(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length))}),v4:function(e,t,r){var n=(e=e||{}).random||(e.rng||y8)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return ws(n)},v5:wu("v5",80,function(e){var t=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],r=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var i=0;i<n.length;++i)e.push(n.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=Array(s),l=0;l<s;++l){for(var c=new Uint32Array(16),u=0;u<16;++u)c[u]=e[64*l+4*u]<<24|e[64*l+4*u+1]<<16|e[64*l+4*u+2]<<8|e[64*l+4*u+3];a[l]=c}a[s-1][14]=8*(e.length-1)/0x100000000,a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)|0;for(var d=0;d<s;++d){for(var h=new Uint32Array(80),p=0;p<16;++p)h[p]=a[d][p];for(var f=16;f<80;++f)h[f]=wv(h[f-3]^h[f-8]^h[f-14]^h[f-16],1);for(var m=r[0],g=r[1],b=r[2],v=r[3],y=r[4],w=0;w<80;++w){var x=Math.floor(w/20),k=wv(m,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}(x,g,b,v)+y+t[x]+h[w]>>>0;y=v,v=b,b=wv(g,30)>>>0,g=m,m=k}r[0]=r[0]+m>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+b>>>0,r[3]=r[3]+v>>>0,r[4]=r[4]+y>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}),NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(!wt(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},validate:wt,stringify:ws,parse:wc});let ww=["debug","info","warn","error","none"];var wx={commonBasicLogger:function(e,t){if(e&&e.destination&&"function"!=typeof e.destination)throw Error("destination for basicLogger was set to a non-function");function r(e){return function(t){console&&console[e]&&console[e].call(console,t)}}let n=e&&e.destination?[e.destination,e.destination,e.destination,e.destination]:[r("log"),r("info"),r("warn"),r("error")],i=!(!e||!e.destination),o=e&&void 0!==e.prefix&&null!==e.prefix?e.prefix:"[LaunchDarkly] ",s=1;if(e&&e.level)for(let t=0;t<ww.length;t++)ww[t]===e.level&&(s=t);let a={};for(let e=0;e<ww.length;e++){let r=ww[e];if("none"!==r)if(e<s)a[r]=()=>{};else{let s=e;a[r]=function(){!function(e,r,s){let a;if(s.length<1)return;let l=i?r+": "+o:o;if(1!==s.length&&t){let e=[...s];e[0]=l+e[0],a=t(...e)}else a=l+s[0];try{n[e](a)}catch(e){console&&console.log&&console.log("[LaunchDarkly] Configured logger's "+r+" method threw an exception: "+e)}}(s,r,arguments)}}}return a},validateLogger:function(e){ww.forEach(t=>{if("none"!==t&&(!e[t]||"function"!=typeof e[t]))throw Error("Provided logger instance must support logger."+t+"(...) method")})}};function wk(e){return e&&e.message?e.message:"string"==typeof e||e instanceof String?e:JSON.stringify(e)}let wS=" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initialize-the-client for instructions on SDK initialization.";var w_={bootstrapInvalid:function(){return"LaunchDarkly bootstrap data is not available because the back end could not read the flags."},bootstrapOldFormat:function(){return"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."+wS},clientInitialized:function(){return"LaunchDarkly client initialized"},clientNotReady:function(){return"LaunchDarkly client is not ready"},debugEnqueueingEvent:function(e){return'enqueueing "'+e+'" event'},debugPostingDiagnosticEvent:function(e){return"sending diagnostic event ("+e.kind+")"},debugPostingEvents:function(e){return"sending "+e+" events"},debugStreamDelete:function(e){return'received streaming deletion for flag "'+e+'"'},debugStreamDeleteIgnored:function(e){return'received streaming deletion for flag "'+e+'" but ignored due to version check'},debugStreamPatch:function(e){return'received streaming update for flag "'+e+'"'},debugStreamPatchIgnored:function(e){return'received streaming update for flag "'+e+'" but ignored due to version check'},debugStreamPing:function(){return"received ping message from stream"},debugPolling:function(e){return"polling for feature flags at "+e},debugStreamPut:function(){return"received streaming update for all flags"},deprecated:function(e,t){return t?'"'+e+'" is deprecated, please use "'+t+'"':'"'+e+'" is deprecated'},environmentNotFound:function(){return"Environment not found. Double check that you specified a valid environment/client-side ID."+wS},environmentNotSpecified:function(){return"No environment/client-side ID was specified."+wS},errorFetchingFlags:function(e){return"Error fetching flag settings: "+wk(e)},eventCapacityExceeded:function(){return"Exceeded event queue capacity. Increase capacity to avoid dropping events."},eventWithoutContext:function(){return"Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"},httpErrorMessage:function(e,t,r){return"Received error "+e+(401===e?" (invalid SDK key)":"")+" for "+t+" - "+(yH.isHttpErrorRecoverable(e)?r:"giving up permanently")},httpUnavailable:function(){return"Cannot make HTTP requests in this environment."+wS},identifyDisabled:function(){return"identify() has no effect here; it must be called on the main client instance"},inspectorMethodError:(e,t)=>`an inspector: "${t}" of type: "${e}" generated an exception`,invalidContentType:function(e){return'Expected application/json content type but got "'+e+'"'},invalidData:function(){return"Invalid data received from LaunchDarkly; connection may have been interrupted"},invalidInspector:(e,t)=>`an inspector: "${t}" of an invalid type (${e}) was configured`,invalidKey:function(){return"Event key must be a string"},invalidMetricValue:e=>`The track function was called with a non-numeric "metricValue" (${e}), only numeric metric values are supported.`,invalidContext:function(){return"Invalid context specified."+wS},invalidTagValue:e=>`Config option "${e}" must only contain letters, numbers, ., _ or -.`,localStorageUnavailable:function(e){return"local storage is unavailable: "+wk(e)},networkError:e=>"network error"+(e?" ("+e+")":""),optionBelowMinimum:(e,t,r)=>'Config option "'+e+'" was set to '+t+", changing to minimum value of "+r,streamClosing:function(){return"Closing stream connection"},streamConnecting:function(e){return"Opening stream connection to "+e},streamError:function(e,t){return"Error on stream connection: "+wk(e)+", will continue retrying after "+t+" milliseconds."},tagValueTooLong:e=>`Value of "${e}" was longer than 64 characters and was discarded.`,unknownCustomEventKey:function(e){return'Custom event "'+e+'" does not exist'},unknownOption:e=>'Ignoring unknown config option "'+e+'"',contextNotSpecified:function(){return"No context specified."+wS},unrecoverableStreamError:e=>`Error on stream connection ${wk(e)}, giving up permanently`,wrongOptionType:(e,t,r)=>'Config option "'+e+'" should be of type '+t+", got "+r+", using default value",wrongOptionTypeBoolean:(e,t)=>'Config option "'+e+'" should be a boolean, got '+t+", converting to boolean"};let{validateLogger:wC}=wx,wT={baseUrl:{default:"https://app.launchdarkly.com"},streamUrl:{default:"https://clientstream.launchdarkly.com"},eventsUrl:{default:"https://events.launchdarkly.com"},sendEvents:{default:!0},streaming:{type:"boolean"},sendLDHeaders:{default:!0},requestHeaderTransform:{type:"function"},sendEventsOnlyForVariation:{default:!1},useReport:{default:!1},evaluationReasons:{default:!1},eventCapacity:{default:100,minimum:1},flushInterval:{default:2e3,minimum:2e3},samplingInterval:{default:0,minimum:0},streamReconnectDelay:{default:1e3,minimum:0},allAttributesPrivate:{default:!1},privateAttributes:{default:[]},bootstrap:{type:"string|object"},diagnosticRecordingInterval:{default:9e5,minimum:2e3},diagnosticOptOut:{default:!1},wrapperName:{type:"string"},wrapperVersion:{type:"string"},stateProvider:{type:"object"},application:{validator:function(e,t,r){let n={};return t.id&&(n.id=wR(`${e}.id`,t.id,r)),t.version&&(n.version=wR(`${e}.version`,t.version,r)),n}},inspectors:{default:[]},hooks:{default:[]},plugins:{default:[]}},wI=/^(\w|\.|-)+$/;function wE(e){return e&&e.replace(/\/+$/,"")}function wR(e,t,r){if("string"==typeof t&&t.match(wI)){if(!(t.length>64))return t;r.warn(w_.tagValueTooLong(e))}else r.warn(w_.invalidTagValue(e))}var wO={baseOptionDefs:wT,validate:function(e,t,r,n){var i,o,s;let a,l,c,u=y6.extend({logger:{default:n}},wT,r),d={};function h(e){y6.onNextTick(()=>{t&&t.maybeReportError(new yH.LDInvalidArgumentError(e))})}let p=y6.extend({},e||{});return i=p,Object.keys(d).forEach(e=>{if(void 0!==i[e]){let t=d[e];n&&n.warn(w_.deprecated(e,t)),t&&(void 0===i[t]&&(i[t]=i[e]),delete i[e])}}),o=p,a=y6.extend({},o),Object.keys(u).forEach(e=>{void 0!==a[e]&&null!==a[e]||(a[e]=u[e]&&u[e].default)}),s=p=a,l=y6.extend({},s),c=e=>{if(null===e)return"any";if(void 0===e)return;if(Array.isArray(e))return"array";let t=typeof e;return"boolean"===t||"string"===t||"number"===t||"function"===t?t:"object"},Object.keys(s).forEach(e=>{let t=s[e];if(null!=t){let r=u[e];if(void 0===r)h(w_.unknownOption(e));else{let i=r.type||c(r.default),o=r.validator;if(o){let t=o(e,s[e],n);void 0!==t?l[e]=t:delete l[e]}else if("any"!==i){let n=i.split("|"),o=c(t);0>n.indexOf(o)?"boolean"===i?(l[e]=!!t,h(w_.wrongOptionTypeBoolean(e,o))):(h(w_.wrongOptionType(e,i,o)),l[e]=r.default):"number"===o&&void 0!==r.minimum&&t<r.minimum&&(h(w_.optionBelowMinimum(e,t,r.minimum)),l[e]=r.minimum)}}}}),l.baseUrl=wE(l.baseUrl),l.streamUrl=wE(l.streamUrl),l.eventsUrl=wE(l.eventsUrl),wC((p=l).logger),p},getTags:function(e){let t={};return e&&(e.application&&void 0!==e.application.id&&null!==e.application.id&&(t["application-id"]=[e.application.id]),e.application&&void 0!==e.application.version&&null!==e.application.id&&(t["application-version"]=[e.application.version])),t}};let{getLDUserAgentString:wL}=y6;var wA={getLDHeaders:function(e,t){if(t&&!t.sendLDHeaders)return{};let r={};r[e.userAgentHeaderName||"User-Agent"]=wL(e),t&&t.wrapperName&&(r["X-LaunchDarkly-Wrapper"]=t.wrapperVersion?t.wrapperName+"/"+t.wrapperVersion:t.wrapperName);let n=wO.getTags(t),i=Object.keys(n);return i.length&&(r["x-launchdarkly-tags"]=i.sort().map(e=>Array.isArray(n[e])?n[e].sort().map(t=>`${e}/${t}`):[`${e}/${n[e]}`]).reduce((e,t)=>e.concat(t),[]).join(" ")),r},transformHeaders:function(e,t){return t&&t.requestHeaderTransform?t.requestHeaderTransform({...e}):e}};let{v1:wN}=wy,{getLDHeaders:wZ,transformHeaders:wM}=wA;var wG=function(e,t,r){let n=y6.extend({"Content-Type":"application/json"},wZ(e,r)),i={};return i.sendEvents=(t,i,o)=>{if(!e.httpRequest)return Promise.resolve();let s=JSON.stringify(t),a=o?null:wN();return(function t(l){let c=o?n:y6.extend({},n,{"X-LaunchDarkly-Event-Schema":"4","X-LaunchDarkly-Payload-ID":a});return e.httpRequest("POST",i,wM(c,r),s).promise.then(e=>{if(e)return e.status>=400&&yH.isHttpErrorRecoverable(e.status)&&l?t(!1):function(e){let t={status:e.status},r=e.header("date");if(r){let e=Date.parse(r);e&&(t.serverTime=e)}return t}(e)}).catch(()=>l?t(!1):Promise.reject())})(!0).catch(()=>{})},i},wV=function e(t,r=[]){if(null===t||"object"!=typeof t)return JSON.stringify(t);if(r.includes(t))throw Error("Cycle detected");return Array.isArray(t)?`[${t.map(n=>e(n,[...r,t])).map(e=>void 0===e?"null":e).join(",")}]`:`{${Object.keys(t).sort().map(n=>{let i=e(t[n],[...r,t]);if(void 0!==i)return`${JSON.stringify(n)}:${i}`}).filter(e=>void 0!==e).join(",")}}`};let{commonBasicLogger:wW}=wx;function wP(e){return"string"==typeof e&&"kind"!==e&&e.match(/^(\w|\.|-)+$/)}function wj(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}var wX={checkContext:function(e,t){if(e){if(t&&(void 0===e.kind||null===e.kind))return void 0!==e.key&&null!==e.key;let r=e.key,n=void 0===e.kind?"user":e.kind,i=wP(n),o="multi"===n||null!=r&&""!==r;if("multi"===n){let t=Object.keys(e).filter(e=>"kind"!==e);return o&&t.every(e=>wP(e))&&t.every(t=>{let r=e[t].key;return null!=r&&""!==r})}return o&&i}return!1},getContextKeys:function(e,t=wW()){if(!e)return;let r={},{kind:n,key:i}=e;switch(n){case void 0:r.user=`${i}`;break;case"multi":Object.entries(e).filter(([e])=>"kind"!==e).forEach(([e,t])=>{t&&t.key&&(r[e]=t.key)});break;case null:t.warn(`null is not a valid context kind: ${e}`);break;case"":t.warn(`'' is not a valid context kind: ${e}`);break;default:r[n]=`${i}`}return r},getContextKinds:function(e){return e?null===e.kind||void 0===e.kind?["user"]:"multi"!==e.kind?[e.kind]:Object.keys(e).filter(e=>"kind"!==e):[]},getCanonicalKey:function(e){if(e){if((void 0===e.kind||null===e.kind||"user"===e.kind)&&e.key)return e.key;if("multi"!==e.kind&&e.key)return`${e.kind}:${wj(e.key)}`;if("multi"===e.kind)return Object.keys(e).sort().filter(e=>"kind"!==e).map(t=>`${t}:${wj(e[t].key)}`).join(":")}}};let{getContextKinds:wD}=wX;var wF=function(){let e={},t=0,r=0,n={},i={};return e.summarizeEvent=e=>{if("feature"===e.kind){let o=e.key+":"+(null!==e.variation&&void 0!==e.variation?e.variation:"")+":"+(null!==e.version&&void 0!==e.version?e.version:""),s=n[o],a=i[e.key];a||(a=new Set,i[e.key]=a),(e.context?wD(e.context):e.contextKeys?Object.keys(e.contextKeys):[]).forEach(e=>a.add(e)),s?s.count=s.count+1:n[o]={count:1,key:e.key,version:e.version,variation:e.variation,value:e.value,default:e.default},(0===t||e.creationDate<t)&&(t=e.creationDate),e.creationDate>r&&(r=e.creationDate)}},e.getSummary=()=>{let e={},o=!0;for(let t of Object.values(n)){let r=e[t.key];r||(r={default:t.default,counters:[],contextKinds:[...i[t.key]]},e[t.key]=r);let n={value:t.value,count:t.count};void 0!==t.variation&&null!==t.variation&&(n.variation=t.variation),void 0!==t.version&&null!==t.version?n.version=t.version:n.unknown=!0,r.counters.push(n),o=!1}return o?null:{startDate:t,endDate:r,features:e,kind:"summary"}},e.clearSummary=()=>{t=0,r=0,n={},i={}},e},wz=function(e){let t={},r={};return{summarizeEvent:function(e){if("feature"===e.kind){let n=wV(e.context);if(!n)return;let i=t[n];i||(t[n]=wF(),i=t[n],r[n]=e.context),i.summarizeEvent(e)}},getSummaries:function(){let n=t,i=r;return t={},r={},Object.entries(n).map(([t,r])=>{let n=r.getSummary();return n.context=e.filter(i[t]),n})}}};function wB(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function wU(e){return(e.startsWith("/")?e.substring(1):e).split("/").map(e=>e.indexOf("~")>=0?e.replace(/~1/g,"/").replace(/~0/g,"~"):e)}function wH(e){return!e.startsWith("/")}function wY(e,t){let r=wH(e),n=wH(t);if(r&&n)return e===t;if(r){let r=wU(t);return 1===r.length&&e===r[0]}if(n){let r=wU(e);return 1===r.length&&t===r[0]}return e===t}function wK(e){return`/${wB(e)}`}var wJ=function(e,t){let r=[],n={},i=[];for(r.push(...Object.keys(e).map(t=>({key:t,ptr:wK(t),source:e,parent:n,visited:[e]})));r.length;){let e=r.pop();if(t.some(t=>wY(t,e.ptr)))i.push(e.ptr);else{let t=e.source[e.key];if(null===t)e.parent[e.key]=t;else if(Array.isArray(t))e.parent[e.key]=[...t];else if("object"==typeof t){if(e.visited.includes(t))continue;e.parent[e.key]={},r.push(...Object.keys(t).map(r=>{var n,i;return{key:r,ptr:(n=e.ptr,i=wB(r),`${n}/${i}`),source:t,parent:e.parent[e.key],visited:[...e.visited,t]}}))}else e.parent[e.key]=t}}return{cloned:n,excluded:i.sort()}},wQ=function(e){let t={},r=e.allAttributesPrivate,n=e.privateAttributes||[],i=["key","kind","_meta","anonymous"],o=["name","ip","firstName","lastName","email","avatar","country"],s=(e,t)=>{if("object"!=typeof e||null===e||Array.isArray(e))return;let{cloned:o,excluded:s}=wJ(e,(r||t&&e.anonymous?Object.keys(e):[...n,...e._meta&&e._meta.privateAttributes||[]]).filter(e=>!i.some(t=>wY(e,t))));return o.key=String(o.key),s.length&&(o._meta||(o._meta={}),o._meta.redactedAttributes=s),o._meta&&(delete o._meta.privateAttributes,0===Object.keys(o._meta).length&&delete o._meta),void 0!==o.anonymous&&(o.anonymous=!!o.anonymous),o};return t.filter=(e,t=!1)=>void 0===e.kind||null===e.kind?s((e=>{let t={...e.custom||{},kind:"user",key:e.key};for(let r of(void 0!==e.anonymous&&(t.anonymous=!!e.anonymous),o))delete t[r],void 0!==e[r]&&null!==e[r]&&(t[r]=String(e[r]));return void 0!==e.privateAttributeNames&&null!==e.privateAttributeNames&&(t._meta=t._meta||{},t._meta.privateAttributes=e.privateAttributeNames.map(e=>e.startsWith("/")?wK(e):e)),t})(e),t):"multi"===e.kind?((e,t)=>{let r={kind:e.kind};for(let n of Object.keys(e))if("kind"!==n){let i=s(e[n],t);i&&(r[n]=i)}return r})(e,t):s(e,t),t};let{getContextKeys:wq}=wX;var w$=function(e,t,r,n=null,i=null,o=null){let s={},a=o||wG(e,r,t),l=y6.appendUrlPath(t.eventsUrl,"/events/bulk/"+r),c=wQ(t),u=wz(c),d=t.samplingInterval,h=t.eventCapacity,p=t.flushInterval,f=t.logger,m,g=[],b=0,v=!1,y=!1;function w(){return 0===d||0===Math.floor(Math.random()*d)}function x(e){g.length<h?(g.push(e),y=!1):(y||(y=!0,f.warn(w_.eventCapacityExceeded())),n&&n.incrementDroppedEvents())}return s.enqueue=function(e){let t;if(v)return;let r=!1,n=!1;if(u.summarizeEvent(e),"feature"===e.kind?w()&&(r=!!e.trackEvents,n=!!e.debugEventsUntilDate&&e.debugEventsUntilDate>b&&e.debugEventsUntilDate>(new Date).getTime()):r=w(),r&&x((t=y6.extend({},e),"identify"===e.kind||"feature"===e.kind||"custom"===e.kind?t.context=c.filter(e.context):(t.contextKeys=wq(e.context,f),delete t.context),"feature"===e.kind&&(delete t.trackEvents,delete t.debugEventsUntilDate),t)),n){let t=y6.extend({},e,{kind:"debug"});t.context=c.filter(t.context),delete t.trackEvents,delete t.debugEventsUntilDate,x(t)}},s.flush=async function(){if(v)return Promise.resolve();let e=g;return u.getSummaries().forEach(t=>{Object.keys(t.features).length&&e.push(t)}),n&&n.setEventsInLastBatch(e.length),0===e.length?Promise.resolve():(g=[],f.debug(w_.debugPostingEvents(e.length)),a.sendEvents(e,l).then(e=>{e&&(e.serverTime&&(b=e.serverTime),yH.isHttpErrorRecoverable(e.status)||(v=!0),e.status>=400&&y6.onNextTick(()=>{i.maybeReportError(new yH.LDUnexpectedResponseError(w_.httpErrorMessage(e.status,"event posting","some events were dropped")))}))}))},s.start=function(){let e=()=>{s.flush(),m=setTimeout(e,p)};m=setTimeout(e,p)},s.stop=function(){clearTimeout(m)},s},w0=function(e){let t={},r={};return t.on=function(e,t,n){r[e]=r[e]||[],r[e]=r[e].concat({handler:t,context:n})},t.off=function(e,t,n){if(r[e])for(let i=0;i<r[e].length;i++)r[e][i].handler===t&&r[e][i].context===n&&(r[e]=r[e].slice(0,i).concat(r[e].slice(i+1)))},t.emit=function(e){if(!r[e])return;let t=r[e].slice(0);for(let e=0;e<t.length;e++)t[e].handler.apply(t[e].context,Array.prototype.slice.call(arguments,1))},t.getEvents=function(){return Object.keys(r)},t.getEventListenerCount=function(e){return r[e]?r[e].length:0},t.maybeReportError=function(t){t&&(r.error?this.emit("error",t):(e||console).error(t.message))},t};let w1="ready",w2="initialized",w5="failed";var w3=function(e){let t=!1,r=!1,n=null,i=null,o=new Promise(t=>{let r=()=>{e.off(w1,r),t()};e.on(w1,r)}).catch(()=>{});return{getInitializationPromise:()=>i||(t?Promise.resolve():r?Promise.reject(n):i=new Promise((t,r)=>{let n=()=>{e.off(w2,n),t()},i=t=>{e.off(w5,i),r(t)};e.on(w2,n),e.on(w5,i)})),getReadyPromise:()=>o,signalSuccess:()=>{t||r||(t=!0,e.emit(w2),e.emit(w1))},signalFailure:i=>{t||r||(r=!0,n=i,e.emit(w5,i),e.emit(w1)),e.maybeReportError(i)}}},w9=function(e,t,r,n){let i={};function o(){let e="",i=n.getContext();return i&&(e=r||y6.btoa(JSON.stringify(i))),"ld:"+t+":"+e}return i.loadFlags=()=>e.get(o()).then(e=>{if(null==e)return null;try{let t=JSON.parse(e);if(t){let e=t.$schema;void 0===e||e<1?t=y6.transformValuesToVersionedValues(t):delete t.$schema}return t}catch(e){return i.clearFlags().then(()=>null)}}),i.saveFlags=t=>{let r=y6.extend({},t,{$schema:1});return e.set(o(),JSON.stringify(r))},i.clearFlags=()=>e.clear(o()),i},w4=function(e,t){let r={},n=!1,i=e=>{n||(n=!0,t.warn(w_.localStorageUnavailable(e)))};return r.isEnabled=()=>!!e,r.get=t=>new Promise(r=>{e?e.get(t).then(r).catch(e=>{i(e),r(void 0)}):r(void 0)}),r.set=(t,r)=>new Promise(n=>{e?e.set(t,r).then(()=>n(!0)).catch(e=>{i(e),n(!1)}):n(!1)}),r.clear=t=>new Promise(r=>{e?e.clear(t).then(()=>r(!0)).catch(e=>{i(e),r(!1)}):r(!1)}),r};let{appendUrlPath:w6,base64URLEncode:w7,objectHasOwnProperty:w8}=y6,{getLDHeaders:xe,transformHeaders:xt}=wA,{isHttpErrorRecoverable:xr}=yH;var xn=function(e,t,r,n){let i=t.streamUrl,o=t.logger,s={},a=w6(i,"/eval/"+r),l=t.useReport,c=t.evaluationReasons,u=t.streamReconnectDelay,d=xe(e,t),h,p=!1,f=null,m=null,g=null,b=null,v=null,y=0;function w(e){var t;let r,n;if(e.status&&"number"==typeof e.status&&!xr(e.status))return S(),o.error(w_.unrecoverableStreamError(e)),void(m&&(clearTimeout(m),m=null));let i=(n=(t=(r=u*Math.pow(2,y))>3e4?3e4:r)-Math.trunc(.5*Math.random()*t),y+=1,n);p||(o.warn(w_.streamError(e,i)),p=!0),_(!1),S(),x(i)}function x(e){m||(e?m=setTimeout(k,e):k())}function k(){let n;m=null;let s="",u={headers:d,readTimeoutMillis:3e5};if(e.eventSourceFactory){for(let d in null!=b&&(s="h="+b),l?e.eventSourceAllowsReport?(n=a,u.method="REPORT",u.headers["Content-Type"]="application/json",u.body=JSON.stringify(g)):(n=w6(i,"/ping/"+r),s=""):n=a+"/"+w7(JSON.stringify(g)),u.headers=xt(u.headers,t),c&&(s=s+(s?"&":"")+"withReasons=true"),n=n+(s?"?":"")+s,S(),o.info(w_.streamConnecting(n)),h=(new Date).getTime(),f=e.eventSourceFactory(n,u),v)w8(v,d)&&f.addEventListener(d,v[d]);f.onerror=w,f.onopen=()=>{y=0}}}function S(){f&&(o.info(w_.streamClosing()),f.close(),f=null)}function _(e){h&&n&&n.recordStreamInit(h,!e,(new Date).getTime()-h),h=null}return s.connect=function(e,t,r){for(let n in g=e,b=t,v={},r||{})v[n]=function(e){p=!1,_(!0),r[n]&&r[n](e)};x()},s.disconnect=function(){clearTimeout(m),m=null,S()},s.isConnected=function(){return!!(f&&e.eventSourceIsActive&&e.eventSourceIsActive(f))},s},xi=function(e){let t,r,n,i,o={addPromise:(o,s)=>{t=o,r&&r(),r=s,o.then(r=>{t===o&&(n(r),e&&e())},r=>{t===o&&(i(r),e&&e())})}};return o.resultPromise=new Promise((e,t)=>{n=e,i=t}),o};let{transformHeaders:xo,getLDHeaders:xs}=wA,xa="application/json";var xl=function(e,t,r){let n=t.baseUrl,i=t.useReport,o=t.evaluationReasons,s=t.logger,a={},l={};function c(r,n){if(!e.httpRequest)return new Promise((e,t)=>{t(new yH.LDFlagFetchError(w_.httpUnavailable()))});let i=xs(e,t);n&&(i["Content-Type"]=xa);let o=l[r];o||(o=xi(()=>{delete l[r]}),l[r]=o);let s=e.httpRequest(n?"REPORT":"GET",r,xo(i,t),n),a=s.promise.then(e=>{if(200===e.status){if(e.header("content-type")&&e.header("content-type").substring(0,16)===xa)return JSON.parse(e.body);{let t=w_.invalidContentType(e.header("content-type")||"");return Promise.reject(new yH.LDFlagFetchError(t))}}return Promise.reject(404===e.status?new yH.LDInvalidEnvironmentIdError(w_.environmentNotFound()):new yH.LDFlagFetchError(w_.errorFetchingFlags(e.statusText||String(e.status))))},e=>Promise.reject(new yH.LDFlagFetchError(w_.networkError(e))));return o.addPromise(a,()=>{s.cancel&&s.cancel()}),o.resultPromise}return a.fetchJSON=function(e){return c(y6.appendUrlPath(n,e),null)},a.fetchFlagSettings=function(e,t){let a,l,u="";return i?(a=n+"/sdk/evalx/"+r+"/context",l=JSON.stringify(e)):a=n+"/sdk/evalx/"+r+"/contexts/"+y6.base64URLEncode(JSON.stringify(e)),t&&(u="h="+t),o&&(u=u+(u?"&":"")+"withReasons=true"),a=a+(u?"?":"")+u,s.debug(w_.debugPolling(a)),c(a,l)},a},xc=function(e,t){let r,n={};return n.setContext=function(e){(r=y6.sanitizeContext(e))&&t&&t(y6.clone(r))},n.getContext=function(){return r?y6.clone(r):null},e&&n.setContext(e),n};let{v1:xu}=wy,{getContextKinds:xd}=wX;var xh=function(e){function t(e){return null==e||"user"===e?"ld:$anonUserId":`ld:$contextKey:${e}`}function r(r,n){return null!==n.key&&void 0!==n.key?(n.key=n.key.toString(),Promise.resolve(n)):n.anonymous?e.get(t(r)).then(i=>{if(i)return n.key=i,n;{let i=xu();return n.key=i,e.set(t(r),i).then(()=>n)}}):Promise.reject(new yH.LDInvalidUserError(w_.invalidContext()))}this.processContext=e=>{if(!e)return Promise.reject(new yH.LDInvalidUserError(w_.contextNotSpecified()));let t=y6.clone(e);return"multi"===e.kind?Promise.all(xd(t).map(e=>r(e,t[e]))).then(()=>t):r(e.kind,t)}};let{v1:xp}=wy,{baseOptionDefs:xf}=wO,{appendUrlPath:xm}=y6;var xg=function(e){let t={diagnosticId:xp()};return e&&(t.sdkKeySuffix=e.length>6?e.substring(e.length-6):e),t},xb=function(e){let t,r,n,i;function o(e){t=e,r=0,n=0,i=[]}return o(e),{getProps:()=>({dataSinceDate:t,droppedEvents:r,eventsInLastBatch:n,streamInits:i}),setProps:e=>{t=e.dataSinceDate,r=e.droppedEvents||0,n=e.eventsInLastBatch||0,i=e.streamInits||[]},incrementDroppedEvents:()=>{r++},setEventsInLastBatch:e=>{n=e},recordStreamInit:(e,t,r)=>{i.push({timestamp:e,failed:t,durationMillis:r})},reset:o}},xv=function(e,t,r,n,i,o,s){let a=!!e.diagnosticUseCombinedEvent,l="ld:"+i+":$diagnostics",c=xm(o.eventsUrl,"/events/diagnostic/"+i),u=o.diagnosticRecordingInterval,d,h,p=!!o.streaming,f={};function m(){let t;return{sdk:(t={...e.diagnosticSdkData},o.wrapperName&&(t.wrapperName=o.wrapperName),o.wrapperVersion&&(t.wrapperVersion=o.wrapperVersion),t),configuration:{customBaseURI:o.baseUrl!==xf.baseUrl.default,customStreamURI:o.streamUrl!==xf.streamUrl.default,customEventsURI:o.eventsUrl!==xf.eventsUrl.default,eventsCapacity:o.eventCapacity,eventsFlushIntervalMillis:o.flushInterval,reconnectTimeMillis:o.streamReconnectDelay,streamingDisabled:!p,allAttributesPrivate:!!o.allAttributesPrivate,diagnosticRecordingIntervalMillis:o.diagnosticRecordingInterval,usingSecureMode:!!o.hash,bootstrapMode:!!o.bootstrap,fetchGoalsDisabled:!o.fetchGoals,sendEventsOnlyForVariation:!!o.sendEventsOnlyForVariation},platform:e.diagnosticPlatformData}}function g(e){o.logger&&o.logger.debug(w_.debugPostingDiagnosticEvent(e)),n.sendEvents(e,c,!0).then(()=>{}).catch(()=>{})}function b(){let e,n;g((n={kind:a?"diagnostic-combined":"diagnostic",id:s,creationDate:e=(new Date).getTime(),...r.getProps()},a&&(n={...n,...m()}),r.reset(e),n)),h=setTimeout(b,u),d=(new Date).getTime(),a&&function(){if(t.isEnabled()){let e={...r.getProps()};t.set(l,JSON.stringify(e))}}()}return f.start=()=>{a?function(e){if(!t.isEnabled())return e(!1);t.get(l).then(t=>{if(t)try{let e=JSON.parse(t);r.setProps(e),d=e.dataSinceDate}catch(e){}e(!0)}).catch(()=>{e(!1)})}(e=>{if(e){let e=(d||0)+u,t=(new Date).getTime();t>=e?b():h=setTimeout(b,e-t)}else 0===Math.floor(4*Math.random())?b():h=setTimeout(b,u)}):(g({kind:"diagnostic-init",id:s,creationDate:r.getProps().dataSinceDate,...m()}),h=setTimeout(b,u))},f.stop=()=>{h&&clearTimeout(h)},f.setStreaming=e=>{p=e},f},xy=function(e,t){let r=!1,n={type:e.type,name:e.name,synchronous:e.synchronous,method:(...i)=>{try{e.method(...i)}catch{r||(r=!0,t.warn(w_.inspectorMethodError(n.type,n.name)))}}};return n};let{onNextTick:xw}=y6,xx={flagUsed:"flag-used",flagDetailsChanged:"flag-details-changed",flagDetailChanged:"flag-detail-changed",clientIdentityChanged:"client-identity-changed"};Object.freeze(xx);let{LDTimeoutError:xk}=yH,xS="unknown hook";function x_(e,t,r,n,i){try{return n()}catch(n){return e?.error(`An error was encountered in "${t}" of the "${r}" hook: ${n}`),i}}function xC(e,t){try{return t.getMetadata().name||xS}catch{return e.error("Exception thrown getting metadata for hook. Unable to get hook name."),xS}}var xT=function(e,t){let r=t?[...t]:[];return{withEvaluation:function(t,n,i,o){if(0===r.length)return o();let s=[...r],a={flagKey:t,context:n,defaultValue:i},l=s.map(t=>x_(e,"beforeEvaluation",xC(e,t),()=>t?.beforeEvaluation?.(a,{})??{},{})),c=o();return function(e,t,r,n,i){for(let o=t.length-1;o>=0;o-=1){let s=t[o],a=n[o];x_(e,"afterEvaluation",xC(e,s),()=>s?.afterEvaluation?.(r,a,i)??{},{})}}(e,s,a,l,c),c},identify:function(t,n){let i=[...r],o={context:t,timeout:n},s=i.map(t=>x_(e,"beforeIdentify",xC(e,t),()=>t?.beforeIdentify?.(o,{})??{},{}));return t=>{for(let r=i.length-1;r>=0;r-=1){let n=i[r],a=s[r];x_(e,"afterIdentify",xC(e,n),()=>n?.afterIdentify?.(o,a,t)??{},{})}}},addHook:function(e){r.push(e)},afterTrack:function(t){if(0!==r.length){var n=[...r];for(let r=n.length-1;r>=0;r-=1){let i=n[r];x_(e,"afterTrack",xC(e,i),()=>i?.afterTrack?.(t),void 0)}}}}},xI=function(){let e,t={};function r(r){return e&&y6.objectHasOwnProperty(e,r)&&e[r]?e[r]:t&&y6.objectHasOwnProperty(t,r)&&t[r]&&!t[r].deleted?t[r]:null}return{clearAllOverrides:function(){if(!e)return{};let t={...e};return e=void 0,t},get:r,getFlagOverrides:function(){return e||{}},getFlags:function(){return t},getFlagsWithOverrides:function(){let n={};for(let e in t){let t=r(e);t&&(n[e]=t)}if(e)for(let t in e){let e=r(t);e&&(n[t]=e)}return n},removeOverride:function(t){e&&e[t]&&(delete e[t],0===Object.keys(e).length&&(e=void 0))},setFlags:function(e){t={...e}},setOverride:function(t,r){e||(e={}),e[t]={value:r}}}};let xE="unknown plugin";function xR(e,t){try{return t.getMetadata().name||xE}catch(t){return e.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),xE}}let{commonBasicLogger:xO}=wx,{checkContext:xL,getContextKeys:xA}=wX,{InspectorTypes:xN,InspectorManager:xZ}={InspectorTypes:xx,InspectorManager:function(e,t){let r={},n={[xx.flagUsed]:[],[xx.flagDetailsChanged]:[],[xx.flagDetailChanged]:[],[xx.clientIdentityChanged]:[]},i={[xx.flagUsed]:[],[xx.flagDetailsChanged]:[],[xx.flagDetailChanged]:[],[xx.clientIdentityChanged]:[]},o=e&&e.map(e=>xy(e,t));return o&&o.forEach(e=>{Object.prototype.hasOwnProperty.call(n,e.type)&&!e.synchronous?n[e.type].push(e):Object.prototype.hasOwnProperty.call(i,e.type)&&e.synchronous?i[e.type].push(e):t.warn(w_.invalidInspector(e.type,e.name))}),r.hasListeners=e=>n[e]&&n[e].length||i[e]&&i[e].length,r.onFlagUsed=(e,t,r)=>{let o=xx.flagUsed;i[o].length&&i[o].forEach(n=>n.method(e,t,r)),n[o].length&&xw(()=>{n[o].forEach(n=>n.method(e,t,r))})},r.onFlags=e=>{let t=xx.flagDetailsChanged;i[t].length&&i[t].forEach(t=>t.method(e)),n[t].length&&xw(()=>{n[t].forEach(t=>t.method(e))})},r.onFlagChanged=(e,t)=>{let r=xx.flagDetailChanged;i[r].length&&i[r].forEach(r=>r.method(e,t)),n[r].length&&xw(()=>{n[r].forEach(r=>r.method(e,t))})},r.onIdentityChanged=e=>{let t=xx.clientIdentityChanged;i[t].length&&i[t].forEach(t=>t.method(e)),n[t].length&&xw(()=>{n[t].forEach(t=>t.method(e))})},r}},{getPluginHooks:xM,registerPlugins:xG,registerPluginsForDebugOverride:xV,createPluginEnvironment:xW}={getPluginHooks:function(e,t,r){let n=[];return r.forEach(r=>{try{let i=r.getHooks?.(t);void 0===i?e.error(`Plugin ${xR(e,r)} returned undefined from getHooks.`):i&&i.length>0&&n.push(...i)}catch(t){e.error(`Exception thrown getting hooks for plugin ${xR(e,r)}. Unable to get hooks.`)}}),n},registerPlugins:function(e,t,r,n){n.forEach(n=>{try{n.register(r,t)}catch(t){e.error(`Exception thrown registering plugin ${xR(e,n)}.`)}})},registerPluginsForDebugOverride:function(e,t,r){r.forEach(r=>{try{r.registerDebug?.(t)}catch(t){e.error(`Exception thrown registering debug override with plugin ${xR(e,r)}.`)}})},createPluginEnvironment:function(e,t,r){let n={};e.userAgent&&(n.name=e.userAgent),e.version&&(n.version=e.version),r.wrapperName&&(n.wrapperName=r.wrapperName),r.wrapperVersion&&(n.wrapperVersion=r.wrapperVersion);let i={};r.application&&(r.application.name&&(i.name=r.application.name),r.application.version&&(i.version=r.application.version));let o={sdk:n,clientSideId:t};return Object.keys(i).length>0&&(o.application=i),o}},xP="change",xj="internal-change";var xX=function(e,t,r,n,i){var o;let s,a,l,c,u,d=r&&r.logger?r.logger:i&&i.logger&&i.logger.default||xO("warn"),h=w0(d),p=w3(h),f=wO.validate(r,h,i,d),m=xZ(f.inspectors,d),g=f.sendEvents,b=e,v=f.hash,y=[...f.plugins],w=xW(n,e,f),x=xM(d,w,y),k=xT(d,[...f.hooks,...x]),S=w4(n.localStorage,d),_=wG(n,b,f),C=f.sendEvents&&!f.diagnosticOptOut,T=C?xg(b):null,I=C?xb((new Date).getTime()):null,E=C?xv(n,S,I,_,b,f,T):null,R=xn(n,f,b,I),O=f.eventProcessor||w$(n,f,b,I,h,_),L=xl(n,f,b),A=xI(),N,Z,M,G=f.streaming,V=!1,W=!1,P=!0,j=f.stateProvider,X=xc(null,function(e){!j&&e&&z({kind:"identify",context:e,creationDate:(new Date).getTime()}),m.hasListeners(xN.clientIdentityChanged)&&m.onIdentityChanged(X.getContext())}),D=new xh(S),F=S.isEnabled()?w9(S,b,v,X):null;function z(e){b&&(j&&j.enqueueEvent&&j.enqueueEvent(e)||(e.context?(P=!1,!g||W||n.isDoNotTrack()||(d.debug(w_.debugEnqueueingEvent(e.kind)),O.enqueue(e))):P&&(d.warn(w_.eventWithoutContext()),P=!1)))}function B(e,t){m.hasListeners(xN.flagDetailChanged)&&m.onFlagChanged(e.key,J(t))}function U(){m.hasListeners(xN.flagDetailsChanged)&&m.onFlags(Object.entries(A.getFlagsWithOverrides()).map(([e,t])=>({key:e,detail:J(t)})).reduce((e,t)=>(e[t.key]=t.detail,e),{}))}function H(e,t,r,n){let i=X.getContext(),o=new Date,s={kind:"feature",key:e,context:i,value:t?t.value:null,variation:t?t.variationIndex:null,default:r,creationDate:o.getTime()},a=A.getFlags()[e];a&&(s.version=a.flagVersion?a.flagVersion:a.version,s.trackEvents=a.trackEvents,s.debugEventsUntilDate=a.debugEventsUntilDate),(n||a&&a.trackReason)&&t&&(s.reason=t.reason),z(s)}function Y(e){return xL(e,!1)?Promise.resolve(e):Promise.reject(new yH.LDInvalidUserError(w_.invalidContext()))}function K(e,t,r,n,i,o){var s;let a,l=A.get(e);return l?(a=J(l),null!==l.value&&void 0!==l.value||(a.value=t)):a={value:t,variationIndex:null,reason:{kind:"ERROR",errorKind:"FLAG_NOT_FOUND"}},r&&(i||l?.prerequisites?.forEach(e=>{K(e,void 0,r,!1,!1,!1)}),H(e,a,t,n)),!i&&o&&(s=a,m.hasListeners(xN.flagUsed)&&m.onFlagUsed(e,s,X.getContext())),a}function J(e){return{value:e.value,variationIndex:void 0===e.variation?null:e.variation,reason:e.reason||null}}function Q(){if(Z=!0,!X.getContext())return;let e=e=>{try{return JSON.parse(e)}catch(e){return void h.maybeReportError(new yH.LDInvalidDataError(w_.invalidData()))}};R.connect(X.getContext(),v,{ping:function(){d.debug(w_.debugStreamPing());let e=X.getContext();L.fetchFlagSettings(e,v).then(t=>{y6.deepEquals(e,X.getContext())&&$(t||{})}).catch(e=>{h.maybeReportError(new yH.LDFlagFetchError(w_.errorFetchingFlags(e)))})},put:function(t){let r=e(t.data);r&&(d.debug(w_.debugStreamPut()),$(r))},patch:function(t){let r=e(t.data);if(!r)return;let n=A.getFlags(),i=n[r.key];if(i&&i.version&&r.version&&!(i.version<r.version))d.debug(w_.debugStreamPatchIgnored(r.key));else{d.debug(w_.debugStreamPatch(r.key));let e={},t=y6.extend({},r);delete t.key,n[r.key]=t,A.setFlags(n);let o=J(t);e[r.key]=i?{previous:i.value,current:o}:{current:o},B(r,t),ee(e)}},delete:function(t){let r=e(t.data);if(!r)return;let n=A.getFlags();if(!n[r.key]||n[r.key].version<r.version){d.debug(w_.debugStreamDelete(r.key));let e={};n[r.key]&&!n[r.key].deleted&&(e[r.key]={previous:n[r.key].value}),n[r.key]={version:r.version,deleted:!0},A.setFlags(n),B(r,n[r.key]),ee(e)}else d.debug(w_.debugStreamDeleteIgnored(r.key))}})}function q(){Z&&(R.disconnect(),Z=!1)}function $(e){let t={};if(!e)return Promise.resolve();let r=A.getFlags();for(let n in r)y6.objectHasOwnProperty(r,n)&&r[n]&&(e[n]&&!y6.deepEquals(e[n].value,r[n].value)?t[n]={previous:r[n].value,current:J(e[n])}:e[n]&&!e[n].deleted||(t[n]={previous:r[n].value}));for(let n in e)y6.objectHasOwnProperty(e,n)&&e[n]&&(!r[n]||r[n].deleted)&&(t[n]={current:J(e[n])});return A.setFlags({...e}),U(),ee(t).catch(()=>{})}function ee(e){let t=Object.keys(e);if(t.length>0){let r={};t.forEach(t=>{let n=e[t].current,i=n?n.value:void 0,o=e[t].previous;h.emit(xP+":"+t,i,o),r[t]=n?{current:i,previous:o}:{previous:o}}),h.emit(xP,r),h.emit(xj,A.getFlagsWithOverrides()),f.sendEventsOnlyForVariation||j||t.forEach(t=>{H(t,e[t].current)})}return N&&F?F.saveFlags(A.getFlags()):Promise.resolve()}function et(){let e=G||M&&void 0===G;e&&!Z?Q():!e&&Z&&q(),E&&E.setStreaming(e)}function er(e){return e===xP||e.substr(0,7)===xP+":"}if("string"==typeof f.bootstrap&&"LOCALSTORAGE"===f.bootstrap.toUpperCase()&&(F?N=!0:d.warn(w_.localStorageUnavailable())),"object"==typeof f.bootstrap&&A.setFlags((s=Object.keys(o=f.bootstrap),l="$valid",(c=o[a="$flagsState"])||!s.length||d.warn(w_.bootstrapOldFormat()),!1===o[l]&&d.warn(w_.bootstrapInvalid()),u={},s.forEach(e=>{if(e!==a&&e!==l){let t={value:o[e]};c&&c[e]?t=y6.extend(t,c[e]):t.version=0,u[e]=t}}),u)),j){let e=j.getInitialState();e?en(e):j.on("init",en),j.on("update",function(e){e.context&&X.setContext(e.context),e.flags&&$(e.flags)})}else{let r;(!e?Promise.reject(new yH.LDInvalidEnvironmentIdError(w_.environmentNotSpecified())):D.processContext(t).then(Y).then(e=>(r=y6.once(k.identify(e,void 0)),e)).then(e=>(r?.({status:"completed"}),X.setContext(e),"object"==typeof f.bootstrap?ei():N?F.loadFlags().then(e=>null==e?(A.setFlags({}),L.fetchFlagSettings(X.getContext(),v).then(e=>$(e||{})).then(ei).catch(e=>{eo(new yH.LDFlagFetchError(w_.errorFetchingFlags(e)))})):(A.setFlags(e),y6.onNextTick(ei),L.fetchFlagSettings(X.getContext(),v).then(e=>$(e)).catch(e=>h.maybeReportError(e)))):L.fetchFlagSettings(X.getContext(),v).then(e=>{A.setFlags(e||{}),U(),ei()}).catch(e=>{A.setFlags({}),eo(e)}))).catch(e=>{throw r?.({status:"error"}),e})).catch(eo)}function en(e){b=e.environment,X.setContext(e.context),A.setFlags({...e.flags}),y6.onNextTick(ei)}function ei(){d.info(w_.clientInitialized()),V=!0,et(),p.signalSuccess()}function eo(e){p.signalFailure(e)}let es={waitForInitialization:function(e){if(null!=e){if("number"==typeof e){let t;return e>5&&d.warn("The waitForInitialization function was called with a timeout greater than 5 seconds. We recommend a timeout of 5 seconds or less."),t=p.getInitializationPromise(),Promise.race([new Promise((t,r)=>{setTimeout(()=>{r(new xk(`waitForInitialization timed out after ${e} seconds.`))},1e3*e)}),t]).catch(e=>{throw e instanceof yH.LDTimeoutError&&d.error(`waitForInitialization error: ${e}`),e})}d.warn("The waitForInitialization method was provided with a non-numeric timeout.")}return d.warn("The waitForInitialization function was called without a timeout specified. In a future version a default timeout will be applied."),p.getInitializationPromise()},waitUntilReady:()=>p.getReadyPromise(),identify:function(e,t,r){let n;if(W)return y6.wrapPromiseCallback(Promise.resolve({}),r);if(j)return d.warn(w_.identifyDisabled()),y6.wrapPromiseCallback(Promise.resolve(y6.transformVersionedValuesToValues(A.getFlagsWithOverrides())),r);let i=N&&F?F.clearFlags():Promise.resolve();return y6.wrapPromiseCallback(i.then(()=>D.processContext(e)).then(Y).then(e=>(n=y6.once(k.identify(e,void 0)),e)).then(e=>L.fetchFlagSettings(e,t).then(r=>{let n=y6.transformVersionedValuesToValues(r);return X.setContext(e),v=t,r?$(r).then(()=>n):n})).then(e=>(n?.({status:"completed"}),Z&&Q(),e)).catch(e=>(n?.({status:"error"}),h.maybeReportError(e),Promise.reject(e))),r)},getContext:function(){return X.getContext()},variation:function(e,t){let{value:r}=k.withEvaluation(e,X.getContext(),t,()=>K(e,t,!0,!1,!1,!0));return r},variationDetail:function(e,t){return k.withEvaluation(e,X.getContext(),t,()=>K(e,t,!0,!0,!1,!0))},track:function(e,t,r){if("string"!=typeof e)return void h.maybeReportError(new yH.LDInvalidEventKeyError(w_.unknownCustomEventKey(e)));void 0!==r&&"number"!=typeof r&&d.warn(w_.invalidMetricValue(typeof r)),n.customEventFilter&&!n.customEventFilter(e)&&d.warn(w_.unknownCustomEventKey(e));let i=X.getContext(),o={kind:"custom",key:e,context:i,url:n.getCurrentUrl(),creationDate:(new Date).getTime()};i&&i.anonymous&&(o.contextKind=i.anonymous?"anonymousUser":"user"),null!=t&&(o.data=t),null!=r&&(o.metricValue=r),z(o),k.afterTrack({context:i,key:e,data:t,metricValue:r})},on:function(e,t,r){er(e)?(M=!0,V&&et(),h.on(e,t,r)):h.on(...arguments)},off:function(e){if(h.off(...arguments),er(e)){let e=!1;h.getEvents().forEach(t=>{er(t)&&h.getEventListenerCount(t)>0&&(e=!0)}),e||(M=!1,Z&&void 0===G&&q())}},setStreaming:function(e){let t=null===e?void 0:e;t!==G&&(G=t,et())},flush:function(e){return y6.wrapPromiseCallback(g?O.flush():Promise.resolve(),e)},allFlags:function(){let e={},t=A.getFlagsWithOverrides();if(!t)return e;for(let r in t)e[r]=K(r,null,!f.sendEventsOnlyForVariation,!1,!0,!1).value;return e},close:function(e){if(W)return y6.wrapPromiseCallback(Promise.resolve(),e);let t=()=>{W=!0,A.setFlags({})},r=Promise.resolve().then(()=>{if(q(),E&&E.stop(),g)return O.stop(),O.flush()}).then(t).catch(t);return y6.wrapPromiseCallback(r,e)},addHook:function(e){k.addHook(e)}};return xG(d,w,es,y),xV(d,{setOverride:function(e,t){let r={},n=A.get(e),i=n?n.value:null;if(i===t)return void d.debug(`setOverride: No change needed for ${e}, value already ${t}`);A.setOverride(e,t);let o=A.get(e),s=J(o);r[e]={previous:i,current:s},B({key:e},o),ee(r)},removeOverride:function(e){let t=A.getFlagOverrides();if(!t[e])return;let r={},n=t[e],i=A.getFlags()[e];r[e]={previous:n.value,current:i?J(i):void 0},A.removeOverride(e),B({key:e},i),ee(r)},clearAllOverrides:function(){let e=A.getFlagOverrides();if(0===Object.keys(e).length)return;let t={},r=A.getFlags();Object.keys(e).forEach(n=>{let i=e[n],o=r[n];t[n]={previous:i.value,current:o?J(o):void 0}}),A.clearAllOverrides(),Object.keys(t).length>0&&ee(t)},getAllOverrides:function(){let e=A.getFlagOverrides();if(!e)return{};let t={};return Object.keys(e).forEach(r=>{let n=e[r];n&&(t[r]=n.value)}),t}},y),{client:es,options:f,emitter:h,ident:X,logger:d,requestor:L,start:function(){g&&(E&&E.start(),O.start())},enqueueEvent:z,getFlagsInternal:function(){return A.getFlagsWithOverrides()},getEnvironmentId:()=>b,internalChangeEventName:xj}};function xD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xF(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xD(Object(r),!0).forEach(function(t){!function(e,t,r){var n;(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:n+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xD(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var xz={promise:Promise.resolve({status:200,header:function(){return null},body:null})},xB=e=>{if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function xU(e,t){for(var r={},n=null,i=[],o=0;o<e.length;o++)for(var s=e[o],a=s.urls||[],l=0;l<a.length;l++)if(function(e,t,r,n){var i,o,s=(("substring"===e.kind||"regex"===e.kind)&&n.includes("/")?t:t.replace(n,"")).replace(r,"");switch(e.kind){case"exact":o=t,i=RegExp("^"+xB(e.url)+"/?$");break;case"canonical":o=s,i=RegExp("^"+xB(e.url)+"/?$");break;case"substring":o=s,i=RegExp(".*"+xB(e.substring)+".*$");break;case"regex":o=s,i=new RegExp(e.pattern);break;default:return!1}return i.test(o)}(a[l],window.location.href,window.location.search,window.location.hash)){"pageview"===s.kind?t("pageview",s):(i.push(s),t("click_pageview",s));break}return i.length>0&&(n=function(e){for(var r=function(e,t){for(var r=[],n=0;n<t.length;n++)for(var i=e.target,o=t[n],s=o.selector,a=document.querySelectorAll(s);i&&a.length>0;){for(var l=0;l<a.length;l++)i===a[l]&&r.push(o);i=i.parentNode}return r}(e,i),n=0;n<r.length;n++)t("click",r[n])},document.addEventListener("click",n)),r.dispose=function(){document.removeEventListener("click",n)},r}var xH="goalsReady",xY={fetchGoals:{default:!0},hash:{type:"string"},eventProcessor:{type:"object"},eventUrlTransformer:{type:"function"},disableSyncEventPost:{default:!1}};let xK=null;function xJ(e,t){return()=>xK?xK.variation(e,t):t}let xQ=(0,L.createContext)(null);function xq({children:e,clientSideId:t,initialContext:r,baseUrl:n,streamUrl:i,eventsUrl:o,backendUrl:s,observabilityOtlpEndpoint:a}){let[l,c]=(0,L.useState)(null),[u,d]=(0,L.useState)(!1),[h,p]=(0,L.useState)(null);(0,L.useEffect)(()=>{if(!t)return;let e=!0,l=null;return(async()=>{try{d(!0),p(null);let u=new yg({manualStart:!0,...s&&{backendUrl:s},...a&&{otel:{otlpEndpoint:a}},networkRecording:{enabled:!0,recordHeadersAndBody:!0},reportConsoleErrors:!0}),h=new yb.q({manualStart:!0,privacySetting:"default",...s&&{backendUrl:s},blockSelector:"body > *:not(#ld-toolbar)"}),f={...n&&{baseUrl:n},...i&&{streamUrl:i},...o&&{eventsUrl:o},plugins:[u,h]},m=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=function(e){var t,r={userAgentHeaderName:"X-LaunchDarkly-User-Agent",synchronousFlush:!1};if(window.XMLHttpRequest){var n=e&&e.disableSyncEventPost;r.httpRequest=function(e,t,i,o){var s=!n&r.synchronousFlush;return r.synchronousFlush=!1,function(e,t,r,n,i){if(i&&!function(){var e=window.navigator&&window.navigator.userAgent;if(e){var t=e.match(/Chrom(e|ium)\/([0-9]+)\./);if(t)return 73>parseInt(t[2],10)}return!0}())return xz;var o,s=new window.XMLHttpRequest;for(var a in s.open(e,t,!i),r||{})Object.prototype.hasOwnProperty.call(r,a)&&s.setRequestHeader(a,r[a]);if(i){try{s.send(n)}catch(e){}return xz}return{promise:new Promise(function(e,t){s.addEventListener("load",function(){o||e({status:s.status,header:function(e){return s.getResponseHeader(e)},body:s.responseText})}),s.addEventListener("error",function(){o||t(Error())}),s.send(n)}),cancel:function(){o=!0,s.abort()}}}(e,t,i,o,s)}}r.httpAllowsPost=function(){return void 0===t&&(t=!!window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest),t},r.httpFallbackPing=function(e){(new window.Image).src=e};var i,o=e&&e.eventUrlTransformer;r.getCurrentUrl=function(){return o?o(window.location.href):window.location.href},r.isDoNotTrack=function(){var e;return 1===(e=window.navigator&&void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:window.navigator&&void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack)||!0===e||"1"===e||"yes"===e};try{window.localStorage&&(r.localStorage={get:function(e){return new Promise(function(t){t(window.localStorage.getItem(e))})},set:function(e,t){return new Promise(function(r){window.localStorage.setItem(e,t),r()})},clear:function(e){return new Promise(function(t){window.localStorage.removeItem(e),t()})}})}catch(e){r.localStorage=null}return e&&e.useReport&&"function"==typeof window.EventSourcePolyfill&&window.EventSourcePolyfill.supportedOptions&&window.EventSourcePolyfill.supportedOptions.method?(r.eventSourceAllowsReport=!0,i=window.EventSourcePolyfill):(r.eventSourceAllowsReport=!1,i=window.EventSource),window.EventSource&&(r.eventSourceFactory=function(e,t){var r=xF(xF({},{heartbeatTimeout:3e5,silentTimeout:3e5,skipDefaultHeaders:!0}),t);return new i(e,r)},r.eventSourceIsActive=function(e){return e.readyState===window.EventSource.OPEN||e.readyState===window.EventSource.CONNECTING}),r.userAgent="JSClient",r.version="3.9.0",r.diagnosticSdkData={name:"js-client-sdk",version:"3.9.0"},r.diagnosticPlatformData={name:"JS"},r.diagnosticUseCombinedEvent=!0,r}(r),i=xX(e,t,r,n,xY),o=i.client,s=i.options,a=i.emitter,l=new Promise(function(e){var t=a.on(xH,function(){a.off(xH,t),e()})});o.waitUntilGoalsReady=function(){return l},s.fetchGoals?function(e,t){var r,n;function i(){n&&n.dispose(),r&&r.length&&(n=xU(r,o))}function o(t,r){var n=e.ident.getContext(),i={kind:t,key:r.key,data:null,url:window.location.href,creationDate:(new Date).getTime(),context:n};return"click"===t&&(i.selector=r.selector),e.enqueueEvent(i)}e.requestor.fetchJSON("/sdk/goals/"+e.getEnvironmentId()).then(function(e){e&&e.length>0&&(n=xU(r=e,o),function(e,t){var r,n=window.location.href;function i(){(r=window.location.href)!==n&&(n=r,t())}!function e(t,r){t(),setTimeout(function(){e(t,r)},r)}(i,300),window.history&&window.history.pushState?window.addEventListener("popstate",i):window.addEventListener("hashchange",i)}(0,i)),t()}).catch(function(r){e.emitter.maybeReportError(new yH.LDUnexpectedResponseError((r&&r.message,r.message))),t()})}(i,function(){return a.emit(xH)}):a.emit(xH),"complete"!==document.readyState?window.addEventListener("load",i.start):i.start();var c=function(){n.synchronousFlush=!0,o.flush().catch(function(){}),n.synchronousFlush=!1};return document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&c()}),window.addEventListener("pagehide",c),o}(t,r||{kind:"user",key:"toolbar-anonymous",anonymous:!0},f);l=m,await m.waitForInitialization(5),e&&(c(m),xK=m,d(!1),console.log("[InternalClientProvider] Internal client initialized"))}catch(t){console.error("[InternalClientProvider] Failed to initialize internal client:",t),e&&(p(t instanceof Error?t:Error("Failed to initialize client")),d(!1))}})(),()=>{(e=!1,l)&&(xK=null,l.close())}},[t,r,n,i,o,s,a]);let f=(0,L.useCallback)(async(e,t)=>{if(l)return new Promise(r=>{l.identify({kind:"multi",account:{key:e},user:{key:t}},void 0,e=>{e&&console.error("[InternalClientProvider] Failed to update context:",e),r()})})},[l]);return(0,O.jsx)(xQ.Provider,{value:{client:l,loading:u,error:h,updateContext:f},children:e})}function x$(){let e=(0,L.useContext)(xQ);if(!e)throw Error("useInternalClient must be used within InternalClientProvider");return e}let x0=(0,L.createContext)(void 0);function x1({children:e}){let[t,r]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return!1;let t=JSON.parse(e);return"boolean"==typeof t.isOptedInToAnalytics&&t.isOptedInToAnalytics}catch(e){return console.warn("Failed to load is opted in to analytics from localStorage:",e),!1}})()),[n,i]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return!1;let t=JSON.parse(e);return"boolean"==typeof t.isOptedInToEnhancedAnalytics&&t.isOptedInToEnhancedAnalytics}catch(e){return console.warn("Failed to load is opted in to enhanced analytics from localStorage:",e),!1}})()),[o,s]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return!1;let t=JSON.parse(e);return"boolean"==typeof t.isOptedInToSessionReplay&&t.isOptedInToSessionReplay}catch(e){return console.warn("Failed to load is opted in to session replay from localStorage:",e),!1}})()),a=(0,L.useCallback)(e=>{yO("isOptedInToEnhancedAnalytics",e),i(e)},[]),l=(0,L.useCallback)(e=>{yO("isOptedInToSessionReplay",e),s(e)},[]),c=(0,L.useCallback)(e=>{yO("isOptedInToAnalytics",e),r(e),e||(a(!1),l(!1))},[a,l]),u=(0,L.useMemo)(()=>({isOptedInToAnalytics:t,isOptedInToEnhancedAnalytics:n,isOptedInToSessionReplay:o,handleToggleAnalyticsOptOut:c,handleToggleEnhancedAnalyticsOptOut:a,handleToggleSessionReplayOptOut:l}),[t,n,o,c,a,l]);return(0,O.jsx)(x0.Provider,{value:u,children:e})}function x2(){let e=(0,L.useContext)(x0);if(void 0===e)throw Error("useAnalyticsPreferences must be used within an AnalyticsPreferencesProvider");return e}let x5=(0,L.createContext)(null);function x3({children:e,mode:t}){let{client:r,loading:n}=x$(),{isOptedInToAnalytics:i}=x2(),o=(0,L.useMemo)(()=>new yP(r,t,i),[r,t,i]),s=(0,L.useRef)(null);return(0,L.useEffect)(()=>{s.current||!r||n||o.trackInitialization(),s.current=r},[o,n,r]),(0,O.jsx)(x5.Provider,{value:{analytics:o},children:e})}function x9(){let e=(0,L.useContext)(x5);if(!e)throw Error("useAnalytics must be used within an AnalyticsProvider");return e.analytics}let x4=(0,L.createContext)(void 0);function x6({children:e}){let[t,r]=(0,L.useState)(void 0),n=(0,L.useCallback)(e=>{r(e)},[]);return(0,O.jsx)(x4.Provider,{value:{activeTab:t,setActiveTab:n},children:e})}function x7(){let e=(0,L.useContext)(x4);if(!e)throw Error("useActiveTabContext must be used within an ActiveTabProvider");return e}let x8="logout",ke=e=>`${e}-response`,kt=e=>`${e}-error`,kr=(0,L.createContext)(null);function kn({children:e,authUrl:t}){let r=(0,L.useRef)(null),n=(0,L.useMemo)(()=>t,[t]),[i,o]=(0,L.useState)(!1),s=(0,L.useCallback)(()=>{o(!0)},[]);return(0,O.jsx)(kr.Provider,{value:{ref:r,iframeSrc:n,iframeLoaded:i,onIFrameLoad:s},children:e})}function ki(){let e=(0,L.useContext)(kr);if(!e)throw Error("useIFrameContext must be used within an IFrameProvider");return e}let ko=(0,L.createContext)(void 0);function ks({children:e}){let[t,r]=(0,L.useState)(!1),[n,i]=(0,L.useState)(!0),[o,s]=(0,L.useState)(!1),[a,l]=(0,L.useState)(!1),c=(0,L.useRef)(!1),{iframeSrc:u,iframeLoaded:d,ref:h}=ki(),p=x9(),{updateContext:f}=x$(),{isOptedInToEnhancedAnalytics:m}=x2(),g=(0,L.useCallback)(async e=>{if(e.origin===u){if(c.current=!0,"toolbar-authenticated"===e.data.type)p.trackLoginSuccess(),e.data.accountId&&e.data.memberId&&(m&&await f(e.data.accountId,e.data.memberId),r(!0),i(!1));else if("toolbar-authentication-required"===e.data.type)r(!1),i(!1);else if("toolbar-authentication-error"===e.data.type)throw r(!1),i(!1),p.trackAuthError(Error(e.data.error)),Error(e.data.error);else if(e.data.type===ke(x8))r(!1),i(!1);else if(e.data.type===kt(x8))throw r(!1),i(!1),Error(e.data.error)}},[f,u,m]);(0,L.useEffect)(()=>{if(!d||c.current)return;let e=setTimeout(()=>{c.current||(l(!0),i(!1))},5e3);return()=>clearTimeout(e)},[d]);let b=(0,L.useCallback)(()=>{let e=h.current;e?.contentWindow&&e.contentWindow.postMessage({type:x8},u)},[h,u]);return(0,L.useEffect)(()=>(window.addEventListener("message",g),()=>{window.removeEventListener("message",g)}),[g]),(0,O.jsx)(ko.Provider,{value:{authenticated:t,loading:n,authenticating:o,iframeError:a,setAuthenticating:s,logout:b},children:e})}function ka(){let e=(0,L.useContext)(ko);if(!e)throw Error("useAuthContext must be used within an AuthProvider");return e}let kl=(0,L.createContext)(void 0);function kc({children:e}){let[t,r]=(0,L.useState)(""),n=x9();return(0,L.useEffect)(()=>{n.trackSearch(t)},[t,n]),(0,O.jsx)(kl.Provider,{value:{searchTerm:t,setSearchTerm:r},children:e})}let ku=(0,L.createContext)(void 0);function kd({children:e,domId:t,devServerUrl:r}){let{setSearchTerm:n}=function(){let e=(0,L.useContext)(kl);if(!e)throw Error("useSearchContext must be used within a SearchProvider");return e}(),i=x9(),{activeTab:o,setActiveTab:s}=x7(),a=x2(),[l,c]=(0,L.useState)(!1),[u,d]=(0,L.useState)(),[h,p]=(0,L.useState)(!1),[f,m]=(0,L.useState)(!1),[g,b]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return!1;let t=JSON.parse(e);return"boolean"==typeof t.reloadOnFlagChange&&t.reloadOnFlagChange}catch(e){return console.warn("Failed to load reload on flag change from localStorage:",e),!1}})()),[v,y]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return!1;let t=JSON.parse(e);return"boolean"==typeof t.autoCollapse&&t.autoCollapse}catch(e){return console.warn("Failed to load toolbar auto-collapse state from localStorage:",e),!1}})()),[w]=(0,L.useState)(()=>yw(r)),x=(0,L.useRef)(!1),k=(0,L.useRef)(null),S=(0,L.useMemo)(()=>o&&u?yv.indexOf(o)>yv.indexOf(u)?1:-1:1,[o,u]),_=(0,L.useCallback)(e=>{if(!h){if(console.log("newTabId",e),e===o&&l){i.trackToolbarToggle("collapse","tab_toggle"),c(!1);return}m(!1),n(""),i.trackTabChange(o||null,e),d(o),s(e),l||c(!0)}},[o,l,n,h,i,s]),C=(0,L.useCallback)(()=>{i.trackToolbarToggle("collapse","close_button"),c(!1)},[i]),T=(0,L.useCallback)(e=>{n(e)},[n]),I=(0,L.useCallback)(()=>{y(e=>{let t=!e;return yO("autoCollapse",t),t})},[]),E=(0,L.useCallback)(()=>{b(e=>{let t=!e;return yO("reloadOnFlagChange",t),t})},[]),R=(0,L.useCallback)(()=>{l||c(!0)},[l]);(0,L.useEffect)(()=>{l&&(x.current=!0)},[l]),(0,L.useEffect)(()=>{let e=e=>{let r=e.composedPath().some(e=>e.id===t);l&&v&&k.current&&!r&&(i.trackToolbarToggle("collapse","click_outside"),c(!1))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l,v,i,t]);let A=(0,L.useMemo)(()=>({isExpanded:l,previousTab:u,isAnimating:h,searchIsExpanded:f,slideDirection:S,hasBeenExpanded:x.current,reloadOnFlagChangeIsEnabled:g,isAutoCollapseEnabled:v,mode:w,isOptedInToAnalytics:a.isOptedInToAnalytics,isOptedInToEnhancedAnalytics:a.isOptedInToEnhancedAnalytics,isOptedInToSessionReplay:a.isOptedInToSessionReplay,toolbarRef:k,handleTabChange:_,handleClose:C,handleSearch:T,handleToggleReloadOnFlagChange:E,handleToggleAutoCollapse:I,handleCircleClick:R,setIsAnimating:p,setSearchIsExpanded:m,handleToggleAnalyticsOptOut:a.handleToggleAnalyticsOptOut,handleToggleEnhancedAnalyticsOptOut:a.handleToggleEnhancedAnalyticsOptOut,handleToggleSessionReplayOptOut:a.handleToggleSessionReplayOptOut}),[l,u,h,f,S,g,v,w,a,_,C,T,E,I,R]);return(0,O.jsx)(ku.Provider,{value:A,children:e})}function kh(){let e=(0,L.useContext)(ku);if(void 0===e)throw Error("useToolbarState must be used within a ToolbarStateProvider");return e}function kp(e){let{mode:t,baseUrl:r,clientSideId:n,streamUrl:i,eventsUrl:o,backendUrl:s,observabilityOtlpEndpoint:a,children:l}=e;return(0,O.jsx)(x1,{children:(0,O.jsx)(xq,{clientSideId:n,baseUrl:r,streamUrl:i,eventsUrl:o,backendUrl:s,observabilityOtlpEndpoint:a,children:(0,O.jsx)(x3,{mode:t,children:l})})})}let kf=(0,L.createContext)(void 0);function km({children:e,baseUrl:t,flagOverridePlugin:r,eventInterceptionPlugin:n}){return(0,O.jsx)(kf.Provider,{value:{baseUrl:t,flagOverridePlugin:r,eventInterceptionPlugin:n},children:e})}function kg(){let e=(0,L.useContext)(kf);if(void 0===e)throw Error("usePlugins must be used within a PluginsProvider");return e}function kb(e){let{initialPosition:t,domId:r,devServerUrl:n,baseUrl:i,flagOverridePlugin:o,eventInterceptionPlugin:s,children:a}=e;return(0,O.jsx)(yV,{initialPosition:t,children:(0,O.jsx)(kc,{children:(0,O.jsx)(x6,{children:(0,O.jsx)(kd,{domId:r,devServerUrl:n,children:(0,O.jsx)(km,{baseUrl:i,flagOverridePlugin:o,eventInterceptionPlugin:s,children:a})})})})})}let kv=(0,L.createContext)(null),ky=new Map;function kw({children:e}){let{authenticated:t}=ka(),{ref:r,iframeSrc:n}=ki(),[i,o]=(0,L.useState)(!1),s=x9(),a=(0,L.useCallback)(e=>{if(e.origin!==n)return;if("api-ready"===e.data.type)return void o(!0);let{requestId:t}=e.data,r=ky.get(t);if(!r)return;let{command:i,resolve:a,reject:l,timeoutId:c}=r;e.data.type===ke(i)?(clearTimeout(c),ky.delete(t),a(e.data.data)):e.data.type===kt(i)&&(clearTimeout(c),ky.delete(t),s.trackApiError(Error(e.data.error)),l(Error(e.data.error)))},[n,s]),l=(0,L.useCallback)((e,t)=>new Promise((i,o)=>{if(!r.current?.contentWindow)return void o(Error("IFrame not found"));let s=`${e}-${crypto.randomUUID()}`,a=setTimeout(()=>{ky.delete(s),o(Error(`Request timeout: ${e}`))},3e4);ky.set(s,{command:e,resolve:i,reject:o,timeoutId:a}),r.current.contentWindow.postMessage({type:e,requestId:s,...t},n)}),[r,n]);(0,L.useEffect)(()=>(window.addEventListener("message",a),()=>{window.removeEventListener("message",a)}),[a]);let c=(0,L.useCallback)(async()=>t?l("get-projects",{}):{items:[]},[t,l]),u=(0,L.useCallback)(async(e,r)=>t?l("get-flags",{projectKey:e,limit:r?.limit,offset:r?.offset,query:r?.query}):{items:[],totalCount:0},[t,l]);return(0,O.jsx)(kv.Provider,{value:{apiReady:i,getProjects:c,getFlags:u},children:e})}function kx(){let e=(0,L.useContext)(kv);if(!e)throw Error("useApi must be used within an ApiProvider");return e}function kk(e){return e?"kind"in e&&"multi"===e.kind?"multi":"kind"in e&&"string"==typeof e.kind?e.kind:"key"in e?"user":"":""}function kS(e){if(!e)return"";if("kind"in e&&"multi"===e.kind){let t=Object.keys(e).filter(e=>"kind"!==e)[0];if(t){let r=e[t];return r?.key||""}return""}return"key"in e&&e.key||""}function k_(e){if(!e)return"";if("kind"in e&&"multi"===e.kind){let t=Object.keys(e).filter(e=>"kind"!==e)[0];if(t){let r=e[t];return r?.name||r?.key||""}return"multi-kind"}return e.name||e.key||""}function kC(e){if(!e)return"";if("kind"in e&&"multi"===e.kind){let t=Object.keys(e).filter(e=>"kind"!==e).sort(),r=["multi"];for(let n of t){let t=e[n];t?.key&&r.push(n,t.key)}return r.join(":")}let t=kk(e),r=kS(e);return`${t}:${r}`}let kT=(0,L.createContext)(void 0),kI=({children:e})=>{let{flagOverridePlugin:t,eventInterceptionPlugin:r}=kg(),n=x9(),[i,o]=(0,L.useState)(yL),[s,a]=(0,L.useState)(()=>{let e=yN();return e?kC(e):null}),[l,c]=(0,L.useState)(""),[u,d]=(0,L.useState)(!1),h=(0,L.useRef)(null),p=(0,L.useRef)(!1),f=(0,L.useRef)(!1),m=(0,L.useMemo)(()=>s?i.find(e=>kC(e)===s)??null:null,[i,s]),g=t?.getClient()??r?.getClient()??null,b=(0,L.useCallback)(e=>{o(t=>{let r=kC(e),i=t.findIndex(e=>kC(e)===r);if(i>=0){let r=[...t];return r[i]=e,yA(r),r}let o=[...t,e];yA(o);let s=kk(e),a=kS(e)||k_(e);return n.trackContextAdded(s,a,"multi"===s),o})},[n]),v=(0,L.useCallback)(e=>{let t=kC(e);i.some(e=>kC(e)===t),b(e)},[i,b]),y=(0,L.useCallback)(e=>{s===e?console.warn("Cannot delete active context"):o(t=>{let r=t.find(t=>kC(t)===e),i=t.filter(t=>kC(t)!==e);if(yA(i),r){let e=kk(r),t=kS(r);n.trackContextRemoved(e,t)}return i})},[s,n]),w=(0,L.useCallback)((e,t)=>{let r=s===e;o(r=>{let i=r.find(t=>kC(t)===e),o=r.map(r=>kC(r)===e?t:r);if(yA(o),i){let e=kk(i),r=kk(t),o=kS(i)||k_(i),s=kS(t)||k_(t);n.trackContextUpdated(e,o,r,s)}return o}),r&&g?(f.current=!0,g.identify(t).then(()=>{yZ(t)}).catch(e=>{console.error("Failed to update active context in LD client:",e)}).finally(()=>{setTimeout(()=>{f.current=!1},100)})):r&&yZ(t)},[s,n,g]),x=(0,L.useCallback)(async e=>{if(!g)return void console.warn("LD Client not available. Cannot set context.");try{f.current=!0;let t=kC(e);if(s===t){f.current=!1;return}await g.identify(e),a(t),yZ(e);let r=kk(e),i=kS(e)||k_(e);n.trackContextSelected(r,i)}catch(e){throw console.error("Failed to identify context:",e),e}finally{setTimeout(()=>{f.current=!1},100)}},[g,n,s]);(0,L.useEffect)(()=>{if(!g||p.current)return;p.current=!0;let e=yN();if(e){let t=kC(e);i.some(e=>kC(e)===t)?(f.current=!0,g.identify(e).then(()=>{a(t)}).catch(e=>{console.error("Failed to restore saved active context:",e),a(null),yZ(null)}).finally(()=>{setTimeout(()=>{f.current=!1},100)})):(a(null),yZ(null))}},[g,i]),(0,L.useEffect)(()=>{if(!g)return;let e=()=>{if(!f.current)try{let e=g.getContext();if(e){let t=kC(e),r=i.find(e=>kC(e)===t);r?s&&s===t||(a(t),yZ(r)):(b(e),a(t),yZ(e))}}catch(e){console.error("Error syncing active context from LD client:",e)}};return g.on("change",e),e(),()=>{g.off("change",e)}},[g,i,s,b]),(0,L.useEffect)(()=>{if(!g){h.current=null;return}let e=g.getContext();if(!e)return;let t=kC(e);h.current===t||(i.some(e=>kC(e)===t)||b(e),h.current=t)},[g,b,i]);let k=(0,L.useMemo)(()=>{let e=i;if(l.trim()){let t=l.toLowerCase();e=i.filter(e=>{let r=kS(e),n=kk(e),i=k_(e),o=r.toLowerCase().includes(t),s=n.toLowerCase().includes(t),a=i.toLowerCase().includes(t);return o||s||a})}return e.sort((e,t)=>{let r=m&&kC(e)===s,n=m&&kC(t)===s;return r&&!n?-1:!r&&n?1:0})},[i,l,m,s]),S=(0,L.useCallback)(()=>{m&&(o([m]),yA([m]))},[m]);return(0,O.jsx)(kT.Provider,{value:{contexts:k,filter:l,setFilter:c,addContext:v,removeContext:y,updateContext:w,setContext:x,activeContext:m,isAddFormOpen:u,setIsAddFormOpen:d,clearContexts:S},children:e})};function kE(){let e=(0,L.useContext)(kT);if(!e)throw Error("useContextsContext must be used within a ContextsProvider");return e}let kR=(0,L.createContext)(void 0),kO=({children:e,clientSideId:t,providedProjectKey:r})=>{let{authenticated:n}=ka(),{getProjects:i,apiReady:o}=kx(),[s,a]=(0,L.useState)([]),[l,c]=(0,L.useState)(""),[u,d]=(0,L.useState)(!1),[h,p]=(0,L.useState)([]),f=(0,L.useCallback)(async()=>o&&n?await i():{items:[]},[o,n,i]);return(0,L.useEffect)(()=>{if(!s||0===s.length)return;let e=s.find(e=>e.key===l)?.environments;e&&p(e)},[s,l]),(0,L.useEffect)(()=>{let e=!0;return o&&(d(!0),f().then(t=>{e&&(a(t.items),d(!1))})),()=>{e=!1}},[o,f]),(0,L.useEffect)(()=>{r?c(r):o?(d(!0),f().then(e=>{if(!e||e.items?.length===0)throw Error("No projects found");let r=e.items[0],n=[];if(t){if(!(r=e.items.find(e=>e.environments.some(e=>e._id===t))))throw Error(`No project found for clientSideId: ${t}`);n=r.environments}if(!r)throw Error("No project found");c(r.key),p(n),d(!1)}).catch(e=>{console.error("Error loading project:",e),d(!1)})):d(!1)},[r,t,f,o,c]),(0,O.jsx)(kR.Provider,{value:{projectKey:l,setProjectKey:c,getProjects:f,projects:s,environments:h,loading:u},children:e})};function kL(){let e=(0,L.useContext)(kR);if(!e)throw Error("useProjectContext must be used within a ProjectProvider");return e}let kA=(0,L.createContext)(void 0),kN=({children:e,clientSideId:t})=>{let[r,n]=(0,L.useState)("production"),{environments:i}=kL();return(0,L.useEffect)(()=>{if(i.length>0){let e=i.find(e=>e._id===t);e?n(e.key):n(i[0]?.key??"production")}else n("production")},[i,t,n]),(0,O.jsx)(kA.Provider,{value:{environment:r,setEnvironment:n},children:e})},kZ=(0,L.createContext)(void 0),kM=({children:e})=>{let{projectKey:t}=kL(),{authenticated:r}=ka(),{getFlags:n,apiReady:i}=kx(),[o,s]=(0,L.useState)([]),[a,l]=(0,L.useState)(!1),[c,u]=(0,L.useState)(null),[d,h]=(0,L.useState)(!1),p=(0,L.useCallback)(()=>{s([]),u(null),h(!1)},[]),f=(0,L.useCallback)(async e=>i&&r?await n(e):{items:[]},[i,n,r]),m=(0,L.useCallback)(async()=>{if(t&&r&&i){l(!0);try{let e=await f(t);s(e?.items??[]),u(t)}catch(e){console.error("Error refreshing flags:",e)}finally{l(!1)}}},[t,r,i,f]);return(0,L.useEffect)(()=>{if(!r||!i||!t)return;if(c===t){d||h(!0);return}let e=!0;return l(!0),s([]),f(t).then(r=>{e&&(s(r?.items??[]),u(t),h(!0),l(!1))}),()=>{e=!1}},[t,r,i,f,d,c]),(0,O.jsx)(kZ.Provider,{value:{flags:o,loading:a,getProjectFlags:f,resetFlags:p,refreshFlags:m},children:e})};function kG(){let e=(0,L.useContext)(kZ);if(!e)throw Error("useFlagsContext must be used within a FlagsProvider");return e}function kV(){let{ref:e,iframeSrc:t,onIFrameLoad:r}=ki(),{authenticating:n}=ka(),i=n?`${t}/toolbar/authenticating.html?originUrl=${window.location.origin}`:`${t}/toolbar/index.html?originUrl=${window.location.origin}`;return(0,O.jsx)("iframe",{ref:e,src:i,title:"LaunchDarkly Toolbar Auth",style:{display:"none"},onLoad:r})}function kW(e){let{authUrl:t,clientSideId:r,providedProjectKey:n,children:i}=e;return(0,O.jsx)(kn,{authUrl:t,children:(0,O.jsxs)(ks,{children:[(0,O.jsx)(kV,{}),(0,O.jsx)(kw,{children:(0,O.jsx)(kO,{clientSideId:r,providedProjectKey:n,children:(0,O.jsx)(kN,{clientSideId:r,children:(0,O.jsx)(kM,{children:(0,O.jsx)(kI,{children:i})})})})})]})})}class kP{baseUrl;projectKey;constructor(e,t){this.baseUrl=e,this.projectKey=t}async getProjectData(e={}){let{includeOverrides:t=!0,includeAvailableVariations:r=!1}=e,n=new URL(`${this.baseUrl}/dev/projects/${this.projectKey}`);t&&n.searchParams.append("expand","overrides"),r&&n.searchParams.append("expand","availableVariations");try{let e=await fetch(n.toString());if(!e.ok)throw Error(`Dev server error: ${e.status} ${e.statusText}`);return await e.json()}catch(e){if(e instanceof TypeError)throw Error(`Failed to connect to dev server at ${this.baseUrl}. Is ldcli dev-server running?`);throw e}}async setOverride(e,t){let r=`${this.baseUrl}/dev/projects/${this.projectKey}/overrides/${e}`;try{let e=await fetch(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok)throw Error(`Failed to set override: ${e.status} ${e.statusText}`);return await e.json()}catch(e){if(e instanceof TypeError)throw Error(`Failed to connect to dev server at ${this.baseUrl}`);throw e}}async clearOverride(e){let t=`${this.baseUrl}/dev/projects/${this.projectKey}/overrides/${e}`;try{let e=await fetch(t,{method:"DELETE"});if(!e.ok)throw Error(`Failed to clear override: ${e.status} ${e.statusText}`)}catch(e){if(e instanceof TypeError)throw Error(`Failed to connect to dev server at ${this.baseUrl}`);throw e}}async updateProjectContext(e){let t=`${this.baseUrl}/dev/projects/${this.projectKey}`;try{let r=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})});if(!r.ok)throw Error(`Failed to update project context: ${r.status} ${r.statusText}`);return await r.json()}catch(e){if(e instanceof TypeError)throw Error(`Failed to connect to dev server at ${this.baseUrl}`);throw e}}}class kj{devServerClient;listeners=new Set;apiFlags=[];constructor(e){this.devServerClient=e}async getEnhancedFlags(){let e=await this.devServerClient.getProjectData({includeOverrides:!0,includeAvailableVariations:!1});return this.getEnhancedFlagsFromDevServerData(e)}getEnhancedFlagsFromDevServerData(e){let t={},r=new Map;return this.apiFlags.forEach(e=>{r.set(e.key,e)}),Object.entries(e.flagsState).forEach(([n,i])=>{let o=r.get(n),s=e.overrides?.[n],a=e.availableVariations?.[n]||[],l=s?s.value:i.value;t[n]={key:n,name:o?.name||this.formatFlagName(n),currentValue:l,isOverridden:!!s,originalValue:i.value,availableVariations:a,type:this.determineFlagType(a,l),sourceEnvironment:e.sourceEnvironmentKey,enabled:null!==i.value&&void 0!==i.value}}),t}formatFlagName(e){return e.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}determineFlagType(e,t){return 2===e.length&&e.every(e=>"boolean"==typeof e.value)?"boolean":e.length>=2&&!e.some(e=>"object"==typeof e.value)?"multivariate":"string"==typeof t?"string":"number"==typeof t?"number":"object"==typeof t?"object":"boolean"}async setOverride(e,t){await this.devServerClient.setOverride(e,t),await this.notifyListeners()}async clearOverride(e){await this.devServerClient.clearOverride(e),await this.notifyListeners()}setApiFlags(e){this.apiFlags=e}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}async notifyListeners(){try{let e=await this.getEnhancedFlags();this.listeners.forEach(t=>t(e))}catch(e){console.error("Error notifying listeners:",e)}}destroy(){this.listeners.clear()}}let kX=(0,L.createContext)(null),kD=()=>{let e=(0,L.useContext)(kX);if(!e)throw Error("useDevServerContext must be used within DevServerProvider");return e},kF=({children:e,config:t})=>{let{getProjectFlags:r}=kG(),{projectKey:n,getProjects:i}=kL(),{apiReady:o}=kx(),s=kE(),{setContext:a,activeContext:l,updateContext:c,addContext:u}=s,[d,h]=(0,L.useState)(()=>({flags:{},connectionStatus:"disconnected",lastSyncTime:0,isLoading:!0,error:null,sourceEnvironmentKey:null})),p=(0,L.useRef)(0),f=(0,L.useRef)(null),m=(0,L.useRef)(!1),g=(0,L.useRef)(!1),b=(0,L.useRef)(null),v=(0,L.useRef)(!1),y=(0,L.useMemo)(()=>t.devServerUrl?new kP(t.devServerUrl,n):null,[t.devServerUrl,n]),w=(0,L.useMemo)(()=>y?new kj(y):null,[y]),x=(0,L.useCallback)(e=>e instanceof Error?e.message:"Unknown error",[]),k=(0,L.useCallback)((e,r=!0)=>{let n=x(e);t.onError?.(n),h(e=>({...e,...r&&{connectionStatus:"error"},error:n,isLoading:!1}))},[t,x]),S=(0,L.useCallback)(()=>!!w||(k(Error("Flag state manager not available - not in dev-server mode"),!1),!1),[w,k]),_=(0,L.useCallback)(e=>{let t=kC(e);s.contexts.find(e=>kC(e)===t)?c(t,e):u(e)},[s.contexts,c,u]);(0,L.useEffect)(()=>{y&&n&&l&&!m.current&&((f.current?kC(f.current):null)===kC(l)||(async()=>{try{await y.updateProjectContext(l),f.current=l}catch(e){console.error("Failed to sync context to dev server:",e)}})())},[l,y,n]);let C=(0,L.useCallback)(async(e=!1)=>{if(!y||!w||!n)throw Error("Dev server client, flag state manager, or project key not available");if(!g.current){g.current=!0;try{let i=await y.getProjectData({includeOverrides:!0,includeAvailableVariations:!1});b.current=i;let s=i._lastSyncedFromSource!==p.current;if(i.context){let e=f.current?kC(f.current):null,t=kC(i.context);if(e!==t){m.current=!0,f.current=i.context,_(i.context);try{await a(i.context)}catch(e){console.error("Failed to update toolbar context from dev server:",e)}finally{setTimeout(()=>{m.current=!1},100)}}}let l=w.getEnhancedFlagsFromDevServerData(i);h(e=>({...e,connectionStatus:"connected",flags:l,sourceEnvironmentKey:i.sourceEnvironmentKey,lastSyncTime:Date.now(),error:null,isLoading:!1})),(e||0===p.current||s)&&(p.current=i._lastSyncedFromSource),(e||0===p.current||s)&&o&&!v.current&&(v.current=!0,(async()=>{try{let e=await r(n);w.setApiFlags(e.items);let t=b.current;if(t){let e=w.getEnhancedFlagsFromDevServerData(t);h(t=>({...t,flags:e,lastSyncTime:Date.now()}))}}catch(r){let e=x(r);console.error("Failed to fetch API flags metadata:",e),t.onError?.(e)}finally{v.current=!1}})())}finally{g.current=!1}}},[y,w,n,r,o,a,_]),T=(0,L.useCallback)(async()=>{if(!y)throw Error("DevServerClient not available - not in dev-server mode");await i()},[y,i]);(0,L.useEffect)(()=>{(async()=>{if(!t.devServerUrl)return h(e=>({...e,connectionStatus:"disconnected",isLoading:!1,error:null}));try{h(e=>({...e,isLoading:!0,error:null})),await T(),h(e=>({...e,connectionStatus:"connected"}))}catch(e){k(e)}})()},[t.devServerUrl,n,T,k]),(0,L.useEffect)(()=>{(async()=>{if(n&&"connected"===d.connectionStatus&&y&&w)try{h(e=>({...e,isLoading:!0})),await C()}catch(e){k(e)}})()},[d.connectionStatus,y,w,n,C,k]),(0,L.useEffect)(()=>{if("connected"===d.connectionStatus&&w)return w.subscribe(e=>{h(t=>({...t,flags:e,lastSyncTime:Date.now()}))})},[w,d.connectionStatus]),(0,L.useEffect)(()=>{if(!t.devServerUrl||!y||!w)return;let e=setInterval(async()=>{try{n||await T(),await C()}catch(e){k(e)}},t.pollIntervalInMs);return()=>clearInterval(e)},[y,w,t.pollIntervalInMs,t.devServerUrl,n,T,r,C,k]);let I=(0,L.useCallback)(async(e,r)=>{if(S())try{h(e=>({...e,isLoading:!0})),await w.setOverride(e,r),t.onDebugOverride?.(e,r,!0)}catch(e){k(e,!1)}finally{h(e=>({...e,isLoading:!1}))}},[w,t,S,k]),E=(0,L.useCallback)(async e=>{if(S())try{h(e=>({...e,isLoading:!0})),await w.clearOverride(e),t.onDebugOverride?.(e,null,!1)}catch(e){k(e,!1)}finally{h(e=>({...e,isLoading:!1}))}},[w,t,S,k]),R=(0,L.useCallback)(async()=>{if(S())try{h(e=>({...e,isLoading:!0}));let e=Object.entries(d.flags).filter(([e,t])=>t.isOverridden);await Promise.all(e.map(([e])=>w.clearOverride(e))),e.forEach(([e])=>{t.onDebugOverride?.(e,null,!1)})}catch(e){k(e,!1)}finally{h(e=>({...e,isLoading:!1}))}},[w,t,d.flags,S,k]),A=(0,L.useCallback)(async()=>{if(n&&"connected"===d.connectionStatus&&y&&w)try{h(e=>({...e,isLoading:!0})),await C(!0)}catch(e){k(e)}},[n,d.connectionStatus,y,w,C,k]),N=(0,L.useMemo)(()=>({state:d,setOverride:I,clearOverride:E,clearAllOverrides:R,refresh:A,devServerClient:y}),[d,I,E,R,A,y]);return(0,O.jsx)(kX.Provider,{value:N,children:e})};function kz(e,t,r={}){let{syncTabs:n=!1,serialize:i=JSON.stringify,deserialize:o=JSON.parse}=r,s=(0,L.useRef)(i),a=(0,L.useRef)(o);s.current=i,a.current=o;let l=(0,L.useRef)(!1),c=(0,L.useRef)(!1),[u,d]=(0,L.useState)(()=>{if("u"<typeof window)return t;try{let r=localStorage.getItem(e);if(null!==r)return l.current=!0,c.current=!0,a.current(r);return t}catch{return t}}),h=(0,L.useCallback)(e=>{l.current=!0,c.current=!1,d(e)},[d]);return(0,L.useEffect)(()=>{if(!("u"<typeof window)&&l.current){if(c.current){c.current=!1;return}try{localStorage.setItem(e,s.current(u))}catch(t){console.warn(`Failed to save ${e} to localStorage`,t)}}},[e,u]),(0,L.useEffect)(()=>{if(!n||"u"<typeof window)return;let r=r=>{if(r.key===e)if(null!==r.newValue)try{l.current=!0,c.current=!0,d(a.current(r.newValue))}catch{}else l.current=!1,c.current=!0,d(t)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)},[e,n,t]),[u,h,(0,L.useCallback)(()=>{if("u">typeof window)try{l.current=!1,c.current=!0,localStorage.removeItem(e),d(t)}catch{}},[e,t])]}let kB=(0,L.createContext)(null);function kU({children:e}){let[t,r]=kz(yS,[]),n=(0,L.useMemo)(()=>new Set(t),[t]),i=(0,L.useCallback)(e=>{r(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[r]),o=(0,L.useCallback)(e=>n.has(e),[n]),s=(0,L.useCallback)(()=>{r([])},[r]),a=n.size;return(0,O.jsx)(kB.Provider,{value:{toggleStarred:i,isStarred:o,clearAllStarred:s,starredCount:a},children:e})}function kH(){let e=(0,L.useContext)(kB);if(!e)throw Error("useStarredFlags must be used within a StarredFlagsProvider");return e}let kY=[.25,.46,.45,.94],kK=[.22,1,.36,1],kJ={containerExpand:{width:{duration:.25,ease:kY},height:{duration:.25,ease:kY},borderRadius:{duration:.2,ease:kY},boxShadow:{duration:.2,ease:"easeInOut"}},containerCollapse:{width:{duration:.35,ease:kK},height:{duration:.35,ease:kK},borderRadius:{duration:.25,ease:kY},boxShadow:{duration:.25,ease:"easeInOut"}},containerInstant:{width:{duration:.01},height:{duration:.01},borderRadius:{duration:.01},boxShadow:{duration:.01}},container:{width:{duration:.25,ease:kY},height:{duration:.25,ease:kY},borderRadius:{duration:.2,ease:kY},boxShadow:{duration:.2,ease:"easeInOut"}},circleLogo:{opacity:{duration:.15,ease:"easeOut"},scale:{duration:.2,ease:kY},rotate:{duration:.2,ease:kY}},eventList:{liveTail:{dot:{scale:[1,1.2,1],opacity:[.5,1,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}},container:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,ease:kY}}}}},kQ=48,kq=48,k$=24,k0=400,k1=12,k2=1,k5=1;function k3({className:e,onMouseDown:t}){return(0,O.jsx)("svg",{className:e,fill:"currentColor",preserveAspectRatio:"xMidYMid",viewBox:"0 0 64 64",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"LaunchDarkly",onMouseDown:t,style:t?{cursor:"grab"}:void 0,children:(0,O.jsx)("path",{d:"M32.62 60.61c-.445 0-.892-.254-1.147-.7-.191-.444-.191-.889.128-1.27l13.582-18.62-23.785 9.66c-.191.063-.319.126-.51.126-.574 0-1.084-.381-1.212-.89-.191-.508.064-1.08.51-1.397l20.916-12.266-36.794-2.097c-.765-.063-1.211-.635-1.211-1.27 0-.573.382-1.208 1.211-1.272l36.794-2.097-20.916-12.265c-.446-.318-.701-.89-.51-1.398.192-.509.638-.89 1.212-.89.191 0 .319.063.51.127l23.785 9.66L31.601 5.067c-.255-.381-.32-.89-.128-1.271.191-.445.638-.7 1.148-.7.319 0 .638.128.893.382L60.55 30.36c.383.381.574.953.574 1.462 0 .508-.191 1.016-.574 1.461L33.514 60.23a1.26 1.26 0 0 1-.893.38Z"})})}var k9=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js"),k4=r.n(k9),k6=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js"),k7=r.n(k6),k8=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js"),Se=r.n(k8),St=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js"),Sr=r.n(St),Sn=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js"),Si=r.n(Sn),So=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js"),Ss=r.n(So),Sa=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/LaunchDarklyToolbar.css.ts.vanilla.css","source":"#H4sIAAAAAAAAA8VVwXLaMBC98xXqoTPQGWVkCgWUS_-kI0trvIms9UgyIe3k3zuSCQHjJCQ99MIg6e3bp3278o01sfxVbXRAIdifCWMtBYxITrIK92BuJ4z95ugM7CWbF4vVQgixEWm7VPp-66lzhmuy5CXbKT_l3Lb9mm-9euSbpZglNO3AV5YeJKvRGHBpT3c-pLiW0EXwactgaK16lKyysE8byuLWcYzQBMk0POPuuhCxeuSaXAQXX46eJjcndyrynTxu6yjZXLSZsqQYqXlZR69cqMg3nDxu0ckDoo8bUs4zpYXqM4wpbEj4fUxjpPYtukjtuLrFiLoruMZ0LTPVhUfnoB9nIAOV6mxMeZJ_3KAH3XeTJts17sLRED1EXY9amilCVP5C2mrQqqoMZLsIx9suxdfbYx0Oiwc0sZZsse4LUUNf8ef1P3feRyeiJG_AS1a0exbIohlFr8QpmntlsAvHO73jzkpWpLuQq0VdtOhAMkcOXgHyHQYsLZwHzF8TGGpl6IHn1EpH3AHPNP3A9-GcqipAlIzPU52Haev0LuR01xVvnctxzrLO8Qd75wN7n9dU3oGOvMLkGLmoMDdjhTYmE8o8TQ5CmIoZQ7cDH6fF7NjJofbo7iUTZ61SWtL3QzmbUzmF6I266K7x-eAeduDDhT-ba43c_B8j1QcsfOuLMOhycZmpzJkadPw4wMsRmM6wa2e6Vcag20q2bvfs0DCfGea3hJusKAmRrEiHPxswqNi09VCBD9yD6TQY3lDfEf16lsO-5V_GlMNGpWNuOq96nLgRRRPYF2xa8lG5_PyeQjG5mv9p6tKLVVyA81cBryF-mjz9BfPv_eQ1CAAA"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),Sl={};Sl.styleTagTransform=Ss(),Sl.setAttributes=Sr(),Sl.insert=Se().bind(null,"head"),Sl.domAPI=k7(),Sl.insertStyleElement=Si(),k4()(Sa.A,Sl),Sa.A&&Sa.A.locals&&Sa.A.locals;let Sc=(0,L.forwardRef)((e,t)=>{let{onMouseDown:r}=e;return(0,O.jsx)(oG.div,{ref:t,className:"ldtb_f9csi07",onMouseDown:r,tabIndex:-1,initial:{opacity:0,x:"-50%",y:"-50%",scale:.9,rotate:90},animate:{opacity:1,x:"-50%",y:"-50%",scale:1,rotate:0},exit:{opacity:0,x:"-50%",y:"-50%",scale:.9,rotate:90},transition:{...kJ.circleLogo,opacity:{...kJ.circleLogo.opacity,delay:0}},children:(0,O.jsx)(oG.div,{whileHover:{scale:1.1},transition:{duration:.2,ease:"easeInOut"},children:(0,O.jsx)(k3,{className:"ldtb_f9csi08","aria-hidden":"true"})})},"circle-logo")});var Su=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/LoadingScreen/LoadingScreen.css.ts.vanilla.css","source":"#H4sIAAAAAAAAA52TwXLbIBCG73qKvXTGPuBBdmS3-NI3ySCxkjdBoMLKidPxu3dAVWN70jTpiQH-1c_37-r7I57aoHuMYA3X9-OPbk1Gws8CQH7JCwAH7WLrQ68geNaMC2mwW-4LgHMBUMp3lJvthfZcrC5cylxkKA5WnxS0Fp-TLK3CUMCGyTsFjbdj79JNrZvHLvjRGdF464OCow4LIeww7UUX9El8q2S2q30wGBSUwzNEb8m8qd7JSf1Ehg8qs6TtAak7sIKtlEN-lT9iaK1_UnAgY9Dtb2DWb8NoS50TxNhHBQ06xpCOB20MuU6BhHI7GfwPnKg9s-8_ytiTEzNYlW2vGTaZYU6iupseNlfokX1Oon7AhkVLnHrjWFNuTkuWU9x1SHKHMS7kEsgdMfCiXN563X0qr4cxMrUnkfzQ8eVVqlRQ3n6_-uxw_cW504OCMmB_a7C9DGu9qrLkNa3Xk3kONx_q0e_Gsh_-VbG5rgja0BgVVNMAa0e9nhivfuwygiWHOgC5lhwx3oLtMtg7Mzgbt96xiPSCCuTq627m7XXoyCmQaZO8_sxcuar2xfkXfNfCxHMEAAA"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),Sd={};function Sh(e){let{className:t,onMouseDown:r}=e;return(0,O.jsx)("svg",{className:t,fill:"currentColor",preserveAspectRatio:"xMidYMid",viewBox:"0 0 156 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"LaunchDarkly",onMouseDown:r,style:r?{cursor:"grab"}:void 0,children:(0,O.jsx)("path",{d:"M9.33 18.729V16.45H2.578V5.272H0v13.457h9.33Zm6.485-.424a4.01 4.01 0 0 0 1.276-1.67v2.093h2.472v-6.49c0-.688-.16-1.324-.505-1.854s-.85-.954-1.488-1.245c-.638-.291-1.41-.45-2.286-.45a8.26 8.26 0 0 0-1.41.132c-.45.08-.876.212-1.275.371-.399.159-.77.344-1.09.556l.08 2.305a8.662 8.662 0 0 1 1.78-.9 5.624 5.624 0 0 1 1.941-.319c.558 0 1.01.133 1.33.398.318.265.478.609.478 1.033v.662h-2.233c-1.329 0-2.366.265-3.136.821-.771.557-1.143 1.325-1.143 2.305 0 .556.133 1.033.372 1.483.265.45.611.795 1.09 1.034.478.264 1.036.37 1.648.37.85 0 1.541-.212 2.1-.635Zm-2.232-1.67a1.078 1.078 0 0 1-.426-.873c0-.45.186-.795.585-1.034.372-.238.957-.37 1.701-.37h1.595v.37c0 .318-.08.636-.266.98a2.349 2.349 0 0 1-.824.875c-.372.238-.797.37-1.276.37-.452 0-.824-.105-1.09-.317Zm13.848 1.643c.585-.503 1.01-1.192 1.276-2.04v2.49h2.498V8.98h-2.498v4.556c0 .663-.107 1.245-.32 1.749-.212.503-.504.927-.903 1.192a2.23 2.23 0 0 1-1.356.424c-.558 0-.983-.16-1.302-.477-.292-.318-.452-.795-.452-1.404V8.98h-2.498v6.093c0 1.271.292 2.225.903 2.914.612.689 1.41 1.033 2.446 1.033.903 0 1.621-.239 2.206-.742Zm9.01-4.106c0-.662.107-1.245.32-1.748.212-.503.505-.927.877-1.192.372-.292.824-.424 1.329-.424.558 0 .983.159 1.302.477.293.318.452.794.452 1.404v6.066h2.525v-6.093c0-1.271-.292-2.225-.904-2.914-.61-.688-1.408-1.033-2.445-1.033-.877 0-1.595.265-2.18.742-.558.503-.983 1.192-1.275 2.04v-2.49h-2.499v9.748h2.499v-4.583ZM51.7 18.94c.319-.053.638-.132.904-.212.292-.079.531-.185.797-.264l.026-2.358c-.398.212-.824.344-1.275.45a5.923 5.923 0 0 1-1.356.16c-.665 0-1.25-.133-1.701-.372a2.24 2.24 0 0 1-1.01-1.033 3.26 3.26 0 0 1-.32-1.457c0-.53.107-1.006.32-1.457.212-.424.558-.768 1.01-1.033.452-.265 1.01-.37 1.648-.37.505 0 .957.052 1.409.158.451.106.85.265 1.249.45l-.027-2.436c-.292-.106-.558-.212-.824-.265a4.252 4.252 0 0 0-.903-.16 6.336 6.336 0 0 0-1.037-.079c-1.116 0-2.073.239-2.897.689a4.949 4.949 0 0 0-1.914 1.854c-.452.795-.665 1.67-.665 2.676 0 .98.24 1.88.691 2.649a4.646 4.646 0 0 0 1.914 1.801c.824.424 1.781.662 2.871.662.399.027.77 0 1.09-.053Zm6.459-.212v-4.556c0-.662.106-1.245.319-1.748.212-.503.505-.927.904-1.192a2.15 2.15 0 0 1 1.328-.424c.585 0 1.01.159 1.303.477.292.318.452.794.452 1.404v6.066h2.498v-6.093c0-1.271-.292-2.225-.903-2.914-.612-.688-1.41-1.033-2.446-1.033-.877 0-1.621.265-2.18.742-.584.503-1.01 1.192-1.275 2.04V5.27h-2.472v13.457h2.472Zm14.885 0c1.435 0 2.658-.264 3.668-.82 1.01-.557 1.78-1.325 2.312-2.332.532-1.007.798-2.199.798-3.55 0-1.35-.266-2.543-.798-3.55a5.657 5.657 0 0 0-2.312-2.357c-1.01-.556-2.233-.821-3.668-.821H67.86v13.457h5.183v-.026Zm-2.605-2.278v-8.9h2.578c1.303 0 2.313.397 3.03 1.165.745.795 1.09 1.881 1.09 3.285 0 1.404-.372 2.517-1.09 3.285-.744.768-1.754 1.165-3.03 1.165h-2.578Zm15.921 1.855a4.01 4.01 0 0 0 1.276-1.67v2.093h2.472v-6.49c0-.688-.16-1.324-.505-1.854s-.85-.954-1.488-1.245c-.638-.291-1.409-.45-2.286-.45-.479 0-.957.053-1.409.132-.452.08-.877.212-1.276.371-.398.159-.77.344-1.09.556l.08 2.305a8.662 8.662 0 0 1 1.781-.9 5.624 5.624 0 0 1 1.94-.319c.559 0 1.01.133 1.33.398.319.265.478.609.478 1.033v.662h-2.18c-1.329 0-2.365.265-3.136.821-.771.557-1.143 1.325-1.143 2.305 0 .556.133 1.033.372 1.483.266.45.611.795 1.09 1.034.478.264 1.036.37 1.648.37.824 0 1.488-.212 2.046-.635Zm-2.232-1.67a1.078 1.078 0 0 1-.425-.873c0-.45.186-.795.584-1.034.372-.238.957-.37 1.701-.37h1.595v.37c0 .318-.08.636-.266.98a2.349 2.349 0 0 1-.824.875c-.372.238-.77.344-1.249.344-.452.027-.824-.08-1.116-.291Zm11.03 2.093V14.57c0-1.086.24-1.907.692-2.463.452-.556 1.09-.848 1.86-.848.372 0 .718.053 1.037.16V9.006a3.096 3.096 0 0 0-.478-.106c-.16-.027-.346-.027-.532-.027a2.15 2.15 0 0 0-1.568.636c-.426.424-.771 1.033-.984 1.775v-2.33h-2.498v9.748h2.472v.026Zm7.682 0v-3.152l.904-.848 2.924 4h2.977l-4.173-5.695 4.093-4.053h-3.136l-3.562 3.444V5.272h-2.472v13.457h2.445Zm10.819 0V5.271h-2.499v13.457h2.499Zm3.827 3.63c.93 0 1.675-.186 2.259-.557.585-.37 1.064-1.033 1.462-1.96l4.492-10.86h-2.578l-2.631 6.807-2.712-6.808H115.2l4.014 9.722-.213.503c-.133.318-.292.583-.531.716-.213.158-.559.238-1.011.238h-2.073v2.199h2.1ZM144.092 24a.56.56 0 0 1-.478-.291c-.08-.186-.08-.371.053-.53l5.661-7.762-9.914 4.027c-.08.026-.133.053-.213.053a.518.518 0 0 1-.505-.371c-.079-.212.027-.45.213-.583l8.718-5.112-15.337-.875a.525.525 0 0 1-.505-.53c0-.238.16-.503.505-.53l15.337-.873-8.718-5.113c-.186-.133-.292-.37-.213-.583a.544.544 0 0 1 .505-.37c.08 0 .133.026.213.052l9.914 4.027-5.661-7.788c-.106-.16-.133-.371-.053-.53.079-.186.265-.292.478-.292.133 0 .266.053.372.16l11.27 11.205a.88.88 0 0 1 .24.609.93.93 0 0 1-.24.61l-11.27 11.231a.525.525 0 0 1-.372.159Z"})})}function Sp(e){let{onMouseDown:t}=e;return(0,O.jsxs)(oG.div,{className:"ldtb_uqg2id1",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.2},"data-testid":"loading-screen",children:[(0,O.jsx)("div",{className:"ldtb_uqg2id2",children:(0,O.jsx)(Sh,{className:"ldtb_uqg2id3",onMouseDown:t})}),(0,O.jsx)("div",{className:"ldtb_uqg2id4",children:(0,O.jsxs)("div",{className:"ldtb_uqg2id5",children:[(0,O.jsx)("div",{className:"ldtb_uqg2id6"}),(0,O.jsx)("p",{className:"ldtb_uqg2id7",children:"Loading..."})]})})]})}Sd.styleTagTransform=Ss(),Sd.setAttributes=Sr(),Sd.insert=Se().bind(null,"head"),Sd.domAPI=k7(),Sd.insertStyleElement=Si(),k4()(Su.A,Sd),Su.A&&Su.A.locals&&Su.A.locals;var Sf=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/IFrameErrorScreen/IFrameErrorScreen.css.ts.vanilla.css","source":"#H4sIAAAAAAAAA51S227bMAx9z1fwZUDyoEBy4rRVP6aQLdphJ0uGTOfSYf8-SM6lSLNu7ZNAkcS5ceksVy9qGL1dNRJ-zQAsDb0zRw2Nw8PzDPIrLEWsmYLXUAc3dj51KlP_bGMYvRV1cCFq2Jk4F8L1Uy3aaI7iqZSLPB2ixahB9QcYgiN7d_pBTtN7srzVoKT8kcotUrtlDRsp-8wq7DA2Luw1bMla9M-z37PlezXqvhrjqPWCGLtBQ42eMabv3lhLvtUgQW0mhO-oE1VgDt3_iuzIi7OyMsPeiCiyiLMX5Xpidl4xI4fsRfWKNYuGOKXj2VCOpyHHyfAqpnGPwzCXCyC_w8hztfgAtvqSY6_jwNQcRQJEz-9baVODuvG1WN8RuP7qzf2FTWt6DXL5UEbssrPmIE62rYrTyTAeWOT96-YNnTLT-STu4pRcEzyLgd4woT5eYPP3_pyolBOV2JLXkAtHHi-Rq2X5gcHmXwzWdxmo4qr8c7g_2Euc2fMDAAA"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),Sm={};function Sg(e){let{onMouseDown:t}=e,{baseUrl:r}=kg();return(0,O.jsxs)(oG.div,{className:"ldtb_1sund3f0",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.2},"data-testid":"iframe-error-screen",children:[(0,O.jsx)("div",{className:"ldtb_1sund3f1",children:(0,O.jsx)(Sh,{className:"ldtb_1sund3f2",onMouseDown:t})}),(0,O.jsx)("div",{className:"ldtb_1sund3f3",children:(0,O.jsxs)("div",{className:"ldtb_1sund3f4",children:[(0,O.jsx)("p",{className:"ldtb_1sund3f5",children:"Unable to connect to LaunchDarkly"}),(0,O.jsxs)("p",{className:"ldtb_1sund3f6",children:["The toolbar could not connect to LaunchDarkly. This is typically caused by trying to load the toolbar from a domain that is not whitelisted (i.e. a non-localhost domain). If you are running this in a hosted environment, ensure the domain has been whitelisted. Click"," ",(0,O.jsx)("a",{href:`${r}/settings/integrations/launchdarkly-developer-toolbar/new`,target:"_blank",rel:"noopener noreferrer",children:"here to whitelist your domain."})]})]})})]})}Sm.styleTagTransform=Ss(),Sm.setAttributes=Sr(),Sm.insert=Se().bind(null,"head"),Sm.domAPI=k7(),Sm.insertStyleElement=Si(),k4()(Sf.A,Sm),Sf.A&&Sf.A.locals&&Sf.A.locals;var Sb=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/new/Header/ToolbarHeader.module.css.ts.vanilla.css","source":"#H4sIAAAAAAAAA51U207DMAx931f4ER4ydWWrIHwMShM3NYQkStJdQPw7atqtuzFpPLV27eNjH7tzo1L9tiheWldVBXzPABRFb8SOQ2Nw-zoDEIa0ZZTwM3KQaBOG3v3exUTNjklnE9rEIXohkdWYNoi2j_BCKbKaw7PfwqL0Wyjy43X2M5sfF17cVVgLnyH7d9mF6AIHHUTd213EwCIalImDdRZPeCyHpE8RNFlmsEkc2OisXVAYWBCKungITUHYSImc5VAL-aGD66xi0hkXoJiXEVBEvGyIC5lojbmvY441WX0RXeawDanUcijHyi2SbtNk55Ic1iI8MGb8QIHpIHasLIrHC9CnDNo4m1ikL-SwqAag7NqM6FVR_Ad8eb9gyyu6rzLM-Vz5MHUvAto0STPpeYPtMrOdZu4d7VkctqC6Jfi_t3_6NAr5VJ4KubePV0oYc2OLVrx1awx_DOla-8_79u_Uc8UbJ7uYK7kuGbK4H_f1SLamSLXB04z-xKMzpM4rx1Yot2FZi-EyWIbJZMd05pomYn-Rwy_iF-pE_wmbBAAA"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),Sv={};Sv.styleTagTransform=Ss(),Sv.setAttributes=Sr(),Sv.insert=Se().bind(null,"head"),Sv.domAPI=k7(),Sv.insertStyleElement=Si(),k4()(Sb.A,Sv),Sb.A&&Sb.A.locals&&Sb.A.locals;var Sy=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/icons/Icon.css.ts.vanilla.css","source":"LmxkdGJfMW1uZGV2bzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0KLmxkdGJfMW1uZGV2bzEgewogIHdpZHRoOiAxNHB4OwogIGhlaWdodDogMTRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),Sw={};Sw.styleTagTransform=Ss(),Sw.setAttributes=Sr(),Sw.insert=Se().bind(null,"head"),Sw.domAPI=k7(),Sw.insertStyleElement=Si(),k4()(Sy.A,Sw),Sy.A&&Sy.A.locals&&Sy.A.locals;var Sx="ldtb_1mndevo0";function Sk({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M9.47 6.97a.75.75 0 0 1 1.06 0l5 5a.75.75 0 0 1-1.06 1.06L10 8.56l-4.47 4.47a.75.75 0 1 1-1.06-1.06z",clipRule:"evenodd"})})}function SS({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M4.47 6.97a.75.75 0 0 1 1.06 0L10 11.44l4.47-4.47a.75.75 0 1 1 1.06 1.06l-5 5a.75.75 0 0 1-1.06 0l-5-5a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})})}function S_({onClose:e,onHeaderMouseDown:t}){let{position:r}=yG();return(0,O.jsxs)("div",{className:"ldtb_109ho660",children:[(0,O.jsxs)("div",{className:"ldtb_109ho661",onMouseDown:t,children:[(0,O.jsx)(k3,{className:"ldtb_109ho662"}),(0,O.jsx)("span",{className:"ldtb_109ho663",children:"LaunchDarkly"})]}),(0,O.jsx)("div",{className:"ldtb_109ho664",children:(0,O.jsx)("button",{className:"ldtb_109ho665",onClick:e,"aria-label":"Collapse toolbar",children:r.startsWith("top-")?(0,O.jsx)(Sk,{}):(0,O.jsx)(SS,{})})})]})}function SC({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M2.6 5.934A5.75 5.75 0 0 1 6.668 4.25h6.666a5.75 5.75 0 1 1 0 11.5H6.667A5.75 5.75 0 0 1 2.6 5.934m2.358 2.357a2.417 2.417 0 1 1 3.418 3.418A2.417 2.417 0 0 1 4.958 8.29",clipRule:"evenodd"})})}function ST({className:e}){return(0,O.jsxs)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,O.jsx)("path",{"fill-rule":"evenodd",d:"M10 1.75a.75.75 0 0 1 .75.75V5a.75.75 0 0 1-1.5 0V2.5a.75.75 0 0 1 .75-.75M4.138 4.136a.75.75 0 0 1 1.06 0L7.03 5.97a.75.75 0 1 1-1.06 1.06L4.137 5.197a.75.75 0 0 1 0-1.06m11.727 0a.75.75 0 0 1 0 1.061L14.031 7.03a.75.75 0 0 1-1.06-1.06l1.833-1.834a.75.75 0 0 1 1.06 0M1.75 10a.75.75 0 0 1 .75-.75H5a.75.75 0 1 1 0 1.5H2.5a.75.75 0 0 1-.75-.75m5.28 2.97a.75.75 0 0 1 0 1.06l-1.833 1.834a.75.75 0 1 1-1.06-1.061l1.833-1.834a.75.75 0 0 1 1.06 0","clip-rule":"evenodd"}),(0,O.jsx)("path",{d:"M10.238 9.288a.75.75 0 0 0-.949.949l2.5 7.5a.75.75 0 0 0 1.382.098l1.202-2.402 2.597 2.597a.75.75 0 1 0 1.06-1.06l-2.166-2.813 1.972-.986a.75.75 0 0 0-.098-1.383z"})]})}function SI({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M9.23 1.875c-.765 0-1.417.552-1.542 1.306l-.149.893c-.017.1-.095.218-.247.29a6 6 0 0 0-.822.476c-.138.095-.279.104-.374.068l-.85-.318a1.56 1.56 0 0 0-1.901.682l-.768 1.331a1.56 1.56 0 0 0 .36 1.988l.7.576c.079.065.14.191.128.359a6 6 0 0 0 0 .949c.013.167-.049.293-.128.358l-.7.577a1.56 1.56 0 0 0-.36 1.987l.768 1.331c.382.662 1.186.95 1.901.682l.85-.318c.096-.036.236-.027.375.069q.39.268.82.474c.153.074.231.19.248.291l.149.893a1.56 1.56 0 0 0 1.541 1.306h1.537c.764 0 1.415-.552 1.541-1.306l.149-.893c.017-.1.095-.217.247-.29q.43-.207.822-.476c.138-.095.278-.104.374-.069l.85.319a1.56 1.56 0 0 0 1.9-.682l.77-1.331a1.56 1.56 0 0 0-.36-1.988l-.701-.576c-.08-.065-.141-.191-.128-.359a6 6 0 0 0 0-.949c-.013-.167.049-.293.128-.358l.7-.577c.59-.485.742-1.326.36-1.987l-.768-1.331a1.56 1.56 0 0 0-1.901-.682l-.85.318c-.096.036-.236.027-.375-.068a6 6 0 0 0-.821-.475c-.152-.074-.23-.19-.247-.291l-.149-.893a1.56 1.56 0 0 0-1.541-1.306zm.768 11.25a3.125 3.125 0 1 0 0-6.25 3.125 3.125 0 0 0 0 6.25",clipRule:"evenodd"})})}function SE({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{"fill-rule":"evenodd",d:"M2.5 1.75a.75.75 0 0 1 .75.75v5.879c.736-.079 1.272-.273 1.688-.513.554-.32.952-.752 1.351-1.251l.218-.278c.324-.416.695-.893 1.138-1.262C8.24 4.578 8.982 4.25 10 4.25s1.76.328 2.355.825c.443.369.814.846 1.138 1.262q.112.146.218.278c.399.499.797.931 1.351 1.251.546.315 1.298.55 2.438.55a.75.75 0 0 1 0 1.5c-1.36 0-2.379-.284-3.187-.75-.8-.462-1.34-1.072-1.774-1.614l-.28-.355c-.312-.4-.558-.714-.864-.97-.342-.284-.747-.477-1.395-.477s-1.053.193-1.395.477c-.306.256-.552.57-.864.97l-.28.355c-.434.542-.974 1.152-1.774 1.613-.652.377-1.442.635-2.437.72v6.865h2.667v-3.417a.75.75 0 0 1 1.5 0v3.417H9.25v-5.917a.75.75 0 0 1 1.5 0v5.917h1.833v-3.417a.75.75 0 0 1 1.5 0v3.417h1.834V15a.75.75 0 0 1 1.5 0v1.75h.083a.75.75 0 0 1 0 1.5h-15a.75.75 0 0 1-.75-.75v-15a.75.75 0 0 1 .75-.75","clip-rule":"evenodd"})})}function SR({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{d:"M15.333 5.25a.083.083 0 0 0-.083-.083h-10a.08.08 0 0 0-.059.024.08.08 0 0 0-.024.059v10q0 .034.024.059a.08.08 0 0 0 .059.024h10a.083.083 0 0 0 .083-.083zM9.917 9.417a.92.92 0 0 0-.826-.912L9 8.5a.917.917 0 0 0-.917.917v.916h1.834zm2.5 3.333v-5a.75.75 0 0 1 1.5 0v5a.75.75 0 0 1-1.5 0m-1 0a.75.75 0 0 1-1.5 0v-.917H8.083v.917a.75.75 0 0 1-1.5 0V9.417A2.42 2.42 0 0 1 9 7l.24.012a2.42 2.42 0 0 1 2.177 2.405zm5.416-4.917h.917a.75.75 0 0 1 0 1.5h-.917v1.834h.917a.75.75 0 0 1 0 1.5h-.917v2.583a1.58 1.58 0 0 1-1.583 1.583h-2.583v.917a.75.75 0 0 1-1.5 0v-.917H9.333v.917a.75.75 0 0 1-1.5 0v-.917H5.25a1.58 1.58 0 0 1-1.583-1.583v-2.583H2.75a.75.75 0 0 1 0-1.5h.917V9.333H2.75a.75.75 0 0 1 0-1.5h.917V5.25A1.58 1.58 0 0 1 5.25 3.667h2.583V2.75a.75.75 0 0 1 1.5 0v.917h1.834V2.75a.75.75 0 0 1 1.5 0v.917h2.583a1.58 1.58 0 0 1 1.583 1.583z"})})}function SO({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{"fill-rule":"evenodd",d:"M6.75 2.5a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-.083v4.118l3.277 9.01a1.334 1.334 0 0 1-.974 1.86 1 1 0 0 1-.136.012H5.417a1 1 0 0 1-.135-.012 1.334 1.334 0 0 1-.975-1.86l3.276-9.01V3.25H7.5a.75.75 0 0 1-.75-.75m2.334.75V7.5a.8.8 0 0 1-.046.256l-1.567 4.311c.655-.099 1.467-.291 2.194-.655a9 9 0 0 1 2.336-.795h.001l-1.04-2.86a.8.8 0 0 1-.045-.257V3.25z","clip-rule":"evenodd"})})}var SL=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/new/Tooltip.module.css.ts.vanilla.css","source":"LmxkdGJfbDVqZDltMCB7CiAgcG9zaXRpb246IHJlbGF0aXZlOwogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGZsZXgtc2hyaW5rOiAwOwp9Ci5sZHRiX2w1amQ5bTEgewogIHBvc2l0aW9uOiBmaXhlZDsKICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTcwMCk7CiAgY29sb3I6IHdoaXRlOwogIHBhZGRpbmc6IDZweCAxMnB4OwogIGJvcmRlci1yYWRpdXM6IDZweDsKICBmb250LXNpemU6IDEycHg7CiAgZm9udC13ZWlnaHQ6IDUwMDsKICB3aGl0ZS1zcGFjZTogbm93cmFwOwogIHBvaW50ZXItZXZlbnRzOiBub25lOwogIHotaW5kZXg6IDIxNDc0MDAxOTA7CiAgYm94LXNoYWRvdzogMCAycHggOHB4IHJnYmEoMCwgMCwgMCwgMC4yKTsKICB0cmFuc2Zvcm0tb3JpZ2luOiBjZW50ZXIgY2VudGVyOwp9Ci5sZHRiX2w1amQ5bTE6OmFmdGVyIHsKICBjb250ZW50OiAiIjsKICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgdG9wOiAxMDAlOwogIGxlZnQ6IDUwJTsKICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoLTUwJSk7CiAgd2lkdGg6IDA7CiAgaGVpZ2h0OiAwOwogIGJvcmRlci1sZWZ0OiA2cHggc29saWQgdHJhbnNwYXJlbnQ7CiAgYm9yZGVyLXJpZ2h0OiA2cHggc29saWQgdHJhbnNwYXJlbnQ7CiAgYm9yZGVyLXRvcDogNnB4IHNvbGlkIHZhcigtLWxwLWNvbG9yLWdyYXktNzAwKTsKfQ"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),SA={};function SN({content:e,children:t,offsetTop:r=0,offsetLeft:n=0}){let[i,o]=L.useState(!1),[s,a]=L.useState(!1),[l,c]=L.useState({top:0,left:0}),u=L.useRef(null),d=L.useRef(null),h=L.useCallback(()=>{if(u.current&&d.current){let e=u.current.getBoundingClientRect(),t=d.current.getBoundingClientRect();c({top:e.top-e.height/2-16+r,left:e.left+e.width/2-t.width/2-4+n}),a(!0)}},[r,n]);return(0,L.useEffect)(()=>{i&&!s&&requestAnimationFrame(()=>{h()})},[i,s,h]),(0,O.jsxs)("div",{ref:u,className:"ldtb_l5jd9m0",onMouseEnter:()=>{o(!0),a(!1)},onMouseLeave:()=>{o(!1),a(!1)},onClick:()=>{o(!1),a(!1)},children:[t,(0,O.jsx)(oz,{children:i&&(0,O.jsx)(oG.div,{ref:d,className:"ldtb_l5jd9m1",style:{top:`${l.top}px`,left:`${l.left}px`,visibility:s?"visible":"hidden"},initial:{opacity:0,scale:.9},animate:{opacity:+!!s,scale:s?1:.9},exit:{opacity:0,scale:.9},transition:{duration:.15},children:e})})]})}SA.styleTagTransform=Ss(),SA.setAttributes=Sr(),SA.insert=Se().bind(null,"head"),SA.domAPI=k7(),SA.insertStyleElement=Si(),k4()(SL.A,SA),SL.A&&SL.A.locals&&SL.A.locals;var SZ=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/new/IconBar/IconBar.module.css.ts.vanilla.css","source":"#H4sIAAAAAAAAA7VSy27bMBC8-yv22B5oyIqSOszHBCtxJTFluAy5kmMU_fdClB3Hr7ot0CPJ2Zmd4Sydkfp5XL3ZyhfwYwFgbAoOtxpaR-9PCwB0tvPKCr0mDQ15oThdvwxJbLtVDXshLxpSwIYURh68mQABjbG-0_AQMk_N0VBUNYvwq4ZVeIfEzhoYMX5RygXVsOOouohb9a0ovk5DHQYN64ng52L5addV3rXG5nuXBedZDRLRp4CRvBw0NXj2NJ13qEuK1U6xGWKaMIHt3uqHk_WRk4jGDunj9p-DOzxtrJFeQ1XNjD3ZrpfDOZuzYtlrQOegWJYJCFO2Fnj_FMmh2JHOMtM9jxSvJHcpk8d9JtchZYacCrXcDCkL8SDOetp_wUWgGm2ytaPjgfJaQVKPhjcqfw82k1OVafKqu3HFbZtINKjyvDzl_4_gbvYSsLGy1VAsq8_d8iwKneMNmbPB337SSb1v1vmYu8qsu5KVJyWbz8cD938WVO0GuhFUhlza6f5vSplZ1reF7mahX5k1t6rdBAAA"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),SM={};SM.styleTagTransform=Ss(),SM.setAttributes=Sr(),SM.insert=Se().bind(null,"head"),SM.domAPI=k7(),SM.insertStyleElement=Si(),k4()(SZ.A,SM),SZ.A&&SZ.A.locals&&SZ.A.locals;let SG=xJ("enable-ai-icon",!1),SV=xJ("enable-interactive-icon",!1),SW=xJ("enable-optimize-icon",!1),SP=xJ("toolbar-enable-session-replay",!1);var Sj=r("./src/types/constants.ts");function SX(e){if(!e)return!1;if(e.closest('[data-ld-selection-bar="true"]'))return!0;let t=document.getElementById(Sj.D);if(t&&(e===t||t.contains(e)))return!0;let r=e;for(;r;){if(r.id===Sj.D)return!0;let e=r.getRootNode();r=e instanceof ShadowRoot?e.host:r.parentElement}return!1}function SD(e){let t=e.tagName.toLowerCase();if(e.id)t+=`#${e.id}`;else if(e.classList.length>0){let r=Array.from(e.classList).slice(0,2);t+=`.${r.join(".")}`}return t}let SF=["aria-label","aria-describedby","aria-labelledby","role","type","name","href","src","alt","title","placeholder","value","for","action","method"];function Sz(e){if(!e||!(e instanceof Element))throw Error("Invalid element provided to getElementRect. Element must be a valid DOM Element instance.");return e.getBoundingClientRect()}let SB=(0,L.createContext)(void 0);function SU({children:e,onSelectionStart:t,onSelectionEnd:r}){let[n,i]=(0,L.useState)(!1),[o,s]=(0,L.useState)(null),[a,l]=(0,L.useState)(null),[c,u]=(0,L.useState)(null),d=(0,L.useCallback)(()=>{i(!0),s(null),l(null),u(null),t?.()},[t]),h=(0,L.useCallback)(()=>{i(!1),u(null),r?.()},[r]),p=(0,L.useCallback)(e=>{s(e),l(function(e){let t,r,n;if(!e||!(e instanceof Element))throw Error("Invalid element provided to getElementInfo. Element must be a valid DOM Element instance.");let i=e.getBoundingClientRect(),o=null,s=e.textContent?.trim();return s&&s.length>0&&(o=(o=s.length>80?s.substring(0,80)+"...":s).replace(/\s+/g," ")),{tagName:e.tagName.toLowerCase(),id:e.id||null,classes:Array.from(e.classList),textContent:o,selector:function(e){let t=[],r=e;for(;r&&r!==document.body&&r!==document.documentElement;){let e=r.tagName.toLowerCase();if(r.id){e+=`#${r.id}`,t.unshift(e);break}let n=Array.from(r.classList).slice(0,2);n.length>0&&(e+=`.${n.join(".")}`);let i=r.parentElement;if(i){let t=Array.from(i.children).filter(e=>e.tagName===r.tagName);if(t.length>1){let n=t.indexOf(r)+1;e+=`:nth-of-type(${n})`}}if(t.unshift(e),r=r.parentElement,t.length>=4)break}return t.join(" > ")}(e),primaryIdentifier:(t=e.tagName.toLowerCase(),r=`<${t}>`,e.id&&(r+=`#${e.id}`),(n=Array.from(e.classList).slice(0,3)).length>0&&(r+=`.${n.join(".")}`),r),dataAttributes:function(e){let t=[];for(let r of Array.from(e.attributes))r.name.startsWith("data-")&&!r.name.startsWith("data-ld-")&&t.push({name:r.name,value:r.value});return t.sort((e,t)=>{let r=["data-testid","data-test-id","data-cy","data-component"],n=r.indexOf(e.name),i=r.indexOf(t.name);return -1!==n&&-1!==i?n-i:-1!==n?-1:-1!==i?1:e.name.localeCompare(t.name)})}(e),htmlAttributes:function(e){let t=[];for(let r of SF){let n=e.getAttribute(r);n&&t.push({name:r,value:n})}return t}(e),dimensions:{width:Math.round(i.width),height:Math.round(i.height)}}}(e)),i(!1),u(null),r?.()},[r]),f=(0,L.useCallback)(()=>{s(null),l(null),i(!1),u(null)},[]),m=(0,L.useMemo)(()=>({isSelecting:n,selectedElement:o,selectedElementInfo:a,hoveredElement:c,startSelection:d,exitSelection:h,selectElement:p,clearSelection:f,setHoveredElement:u}),[n,o,a,c,d,h,p,f]);return(0,O.jsx)(SB.Provider,{value:m,children:e})}function SH(){let e=(0,L.useContext)(SB);if(void 0===e)throw Error("useElementSelection must be used within an ElementSelectionProvider");return e}function SY({defaultActiveTab:e}){let t=SV(),r=SG(),n=SW(),{activeTab:i,setActiveTab:o}=x7(),{startSelection:s}=SH(),a=x9(),[l,c]=(0,L.useState)(null);(0,L.useEffect)(()=>{i||o(e)},[e,i,o]);let u=[{id:"interactive",Icon:ST,label:"Interactive mode",tooltip:t?"Interactive mode":"Interactive mode (coming soon)",disabled:!t},{id:"flags",Icon:SC,label:"Flags",tooltip:"Feature flags"},{id:"optimize",Icon:SO,label:"Optimize",tooltip:n?"Optimization":"Optimization (coming soon)",disabled:!n},{id:"ai",Icon:SR,label:"AI",tooltip:r?"AI":"AI (coming soon)",disabled:!r},{id:"monitoring",Icon:SE,label:"Analytics",tooltip:"Monitoring"},{id:"settings",Icon:SI,label:"Settings",tooltip:"Settings"}];return(0,O.jsx)("div",{className:"ldtb_v1qi4n0",children:u.map(({id:e,Icon:t,label:r,tooltip:n,disabled:u})=>{var d;let h="interactive"===e&&"interactive"===i&&"interactive"===l;return(0,O.jsx)(SN,{content:"interactive"!==(d={id:e,Icon:t,label:r,tooltip:n,disabled:u}).id||"interactive"!==i||d.disabled?d.tooltip:"Select element",children:(0,O.jsx)("button",{onClick:()=>{!u&&("interactive"===e?("interactive"===i||(a.trackTabChange(i||null,e),o(e)),s()):(i!==e&&a.trackTabChange(i||null,e),o(e)))},onMouseEnter:()=>c(e),onMouseLeave:()=>c(null),className:`ldtb_v1qi4n1 ${e===i?"ldtb_v1qi4n2":""} ${u?"ldtb_v1qi4n3":""} ${h?"ldtb_v1qi4n5":""}`,"aria-label":r,disabled:u,children:(0,O.jsx)(t,{className:"ldtb_v1qi4n4"})})},e)})})}let SK=(0,L.createContext)(void 0);function SJ({children:e}){let[t,r]=(0,L.useState)("flags"),n=(0,L.useMemo)(()=>({activeSubtab:t,setActiveSubtab:r}),[t]);return(0,O.jsx)(SK.Provider,{value:n,children:e})}function SQ(){let e=(0,L.useContext)(SK);if(!e)throw Error("useActiveSubtabContext must be used within ActiveSubtabProvider");return e}let Sq={flags:"",contexts:"",events:"",general:"",workflows:"",privacy:""},S$=(0,L.createContext)({searchTerms:Sq,setSearchTerm:()=>{},clearSearchTerm:()=>{},clearAllSearchTerms:()=>{}});function S0({children:e}){let[t,r]=(0,L.useState)(Sq),n=(0,L.useCallback)((e,t)=>{r(r=>({...r,[e]:t}))},[]),i=(0,L.useCallback)(e=>{r(t=>({...t,[e]:""}))},[]),o=(0,L.useCallback)(()=>{r(Sq)},[]);return(0,O.jsx)(S$.Provider,{value:{searchTerms:t,setSearchTerm:n,clearSearchTerm:i,clearAllSearchTerms:o},children:e})}function S1(){let e=(0,L.useContext)(S$);if(!e)throw Error("useTabSearchContext must be used within TabSearchProvider");return e}function S2(e,t){let[r,n]=(0,L.useState)([]);(0,L.useEffect)(()=>{if(!e)return void n([]);let t=()=>{n([...e.getEvents()].reverse())};return t(),e.subscribe(t)},[e]);let i=(0,L.useMemo)(()=>{if(!t)return r;let e=t.toLowerCase();return r.filter(t=>t.displayName.toLowerCase().includes(e)||t.kind.toLowerCase().includes(e)||t.category.toLowerCase().includes(e)||t.key&&t.key.toLowerCase().includes(e))},[r,t]),o=(0,L.useMemo)(()=>{let e={},t={};return i.forEach(r=>{e[r.kind]=(e[r.kind]||0)+1,r.key&&(t[r.key]=(t[r.key]||0)+1)}),{totalEvents:i.length,eventsByKind:e,eventsByFlag:t}},[i]);return{events:i,eventStats:o}}function S5({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5M6.97 6.97a.75.75 0 0 1 1.06 0L10 8.94l1.97-1.97a.75.75 0 1 1 1.06 1.06L11.062 10l1.97 1.97a.75.75 0 0 1-1.06 1.06L10 11.06l-1.97 1.97a.75.75 0 1 1-1.06-1.06L8.94 10 6.97 8.03a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})})}function S3({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M5.814 2.251a6.583 6.583 0 0 1 7.675 10.177l4.542 4.542a.75.75 0 1 1-1.06 1.06l-4.543-4.542a6.58 6.58 0 0 1-8.75-.5A6.585 6.585 0 0 1 5.815 2.252m2.52.999a5.083 5.083 0 1 0 0 10.166 5.083 5.083 0 0 0 0-10.166",clipRule:"evenodd"})})}function S9({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M10 3.417a.75.75 0 0 1 .75.75V9.25h5.083a.75.75 0 0 1 0 1.5H10.75v5.083a.75.75 0 0 1-1.5 0V10.75H4.167a.75.75 0 0 1 0-1.5H9.25V4.167a.75.75 0 0 1 .75-.75",clipRule:"evenodd"})})}function S4({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M6.229 3.602a7.5 7.5 0 0 1 11.18 5.461.75.75 0 0 1-1.485.207A6 6 0 0 0 5 6.75h1.666a.75.75 0 1 1 0 1.5H3.333a.75.75 0 0 1-.75-.75V4.167a.75.75 0 1 1 1.5 0v1.295a7.5 7.5 0 0 1 2.146-1.86m-3 6.488a.75.75 0 0 1 .847.64 6 6 0 0 0 10.923 2.52h-1.666a.75.75 0 0 1 0-1.5h3.334a.75.75 0 0 1 .75.75v3.333a.75.75 0 0 1-1.5 0v-1.295a7.498 7.498 0 0 1-11.175.695 7.5 7.5 0 0 1-2.152-4.296.75.75 0 0 1 .64-.847",clipRule:"evenodd"})})}function S6({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M8.333 3.25a.083.083 0 0 0-.083.083v1.75h3.5v-1.75a.083.083 0 0 0-.084-.083zm4.917 1.833v-1.75a1.583 1.583 0 0 0-1.584-1.583H8.333A1.583 1.583 0 0 0 6.75 3.333v1.75H3.333a.75.75 0 1 0 0 1.5h.143l.774 9.284a2.417 2.417 0 0 0 2.416 2.383h6.667a2.417 2.417 0 0 0 2.416-2.383l.774-9.284h.143a.75.75 0 1 0 0-1.5zm-8.269 1.5.766 9.188q.003.03.003.062a.917.917 0 0 0 .916.917h6.667a.917.917 0 0 0 .917-.917l.002-.062.766-9.188zm3.352 1.834a.75.75 0 0 1 .75.75v5a.75.75 0 1 1-1.5 0v-5a.75.75 0 0 1 .75-.75m3.333 0a.75.75 0 0 1 .75.75v5a.75.75 0 1 1-1.5 0v-5a.75.75 0 0 1 .75-.75",clipRule:"evenodd"})})}var S7=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@launchpad-ui+components@0.17.12_@react-aria+focus@3.21.3_react-dom@19.2.4_react@19.2.4_50a111fa397731762641d7be31f0c57a/node_modules/@launchpad-ui/components/dist/style.css"),S8={};S8.styleTagTransform=Ss(),S8.setAttributes=Sr(),S8.insert=Se().bind(null,"head"),S8.domAPI=k7(),S8.insertStyleElement=Si(),k4()(S7.A,S8),S7.A&&S7.A.locals&&S7.A.locals;var _e=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@launchpad-ui+icons@0.25.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@launchpad-ui/icons/dist/style.css"),_t={};_t.styleTagTransform=Ss(),_t.setAttributes=Sr(),_t.insert=Se().bind(null,"head"),_t.domAPI=k7(),_t.insertStyleElement=Si(),k4()(_e.A,_t),_e.A&&_e.A.locals&&_e.A.locals;let _r=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,_n=function(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n);else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}(e))&&(n&&(n+=" "),n+=t);return n},_i=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return _n(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(e=>{let t=null==r?void 0:r[e],n=null==o?void 0:o[e];if(null===t)return null;let s=_r(t)||_r(n);return i[e][s]}),a=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return _n(e,s,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...i}=t;return Object.entries(i).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...a}[t]):({...o,...a})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)},_o=_i("kck8EW_base",{variants:{size:{tiny:"kck8EW_tiny",small:"kck8EW_small",medium:"kck8EW_medium",large:"kck8EW_large"},variant:{default:"kck8EW_default",subtle:"kck8EW_subtle"}},defaultVariants:{size:"medium",variant:"default"}}),_s=(0,L.createContext)({}),_a=({name:e,className:t,children:r,focusable:n=!1,role:i="img",size:o="medium",variant:s="default",ref:a,...l})=>{let c=(0,L.useContext)(_s);return(0,O.jsxs)("svg",{"aria-hidden":l["aria-hidden"]??(!l["aria-labelledby"]&&!l["aria-label"]),focusable:n,role:i,className:_o({size:c.size||o,variant:s,className:t}),"data-icon":e,ref:a,...l,children:[e&&(0,O.jsx)("use",{href:`#lp-icon-${e}`}),r]})};_i("HB1-WG_base",{variants:{size:{tiny:"HB1-WG_tiny",small:"HB1-WG_small",medium:"HB1-WG_medium",large:"HB1-WG_large"},variant:{default:"HB1-WG_default",blue:"HB1-WG_blue",cyan:"HB1-WG_cyan",purple:"HB1-WG_purple",pink:"HB1-WG_pink",orange:"HB1-WG_orange",yellow:"HB1-WG_yellow",green:"HB1-WG_green","gradient-1":"HB1-WG_gradient1","gradient-2":"HB1-WG_gradient2","gradient-3":"HB1-WG_gradient3","gradient-4":"HB1-WG_gradient4","gradient-5":"HB1-WG_gradient5","gradient-6":"HB1-WG_gradient6","gradient-7":"HB1-WG_gradient7"}},defaultVariants:{size:"medium",variant:"default"}});let _l=({kind:e,size:t="medium",...r})=>{let n,i="";switch(e){case"success":n="check-circle",i="Success";break;case"warning":n="warning",i="Warning";break;case"error":n="alert-rhombus",i="Error";break;case"info":n="info-circle",i="Info";break;case"notification":n="notifications",i="Notification"}return(0,O.jsx)(_a,{"aria-label":`${i} icon`,role:"img",size:t,...r,name:n})},_c="u">typeof document?null!=(_=L.useInsertionEffect)?_:L.useLayoutEffect:()=>{};function _u(e,t,r){let[n,i]=(0,L.useState)(e||t),o=(0,L.useRef)(n),s=(0,L.useRef)(void 0!==e),a=void 0!==e;(0,L.useEffect)(()=>{s.current,s.current=a},[a]);let l=a?e:n;_c(()=>{o.current=l});let[,c]=(0,L.useReducer)(()=>({}),{});return[l,(0,L.useCallback)((e,...t)=>{let n="function"==typeof e?e(o.current):e;Object.is(o.current,n)||(o.current=n,i(n),c(),null==r||r(n,...t))},[r])]}function _d(e){let t=(0,L.useRef)(null),r=(0,L.useRef)(void 0),n=(0,L.useCallback)(t=>{if("function"==typeof e){let r=e(t);return()=>{"function"==typeof r?r():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,L.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,r.current&&(r.current(),r.current=void 0),null!=value&&(r.current=n(value))}}),[n])}function _h(...e){return 1===e.length&&e[0]?e[0]:t=>{let r=!1,n=e.map(e=>{let n=_p(e,t);return r||(r="function"==typeof n),n});if(r)return()=>{n.forEach((t,r)=>{"function"==typeof t?t():_p(e[r],null)})}}}function _p(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function _f(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let _m="u">typeof document?L.useLayoutEffect:()=>{},_g={prefix:String(Math.round(1e10*Math.random())),current:0},_b=L.createContext(_g),_v=L.createContext(!1),_y=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),_w="function"==typeof L.useId?function(e){let t=L.useId(),[r]=(0,L.useState)(__()),n=r?"react-aria":`react-aria${_g.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,L.useContext)(_b),r=function(e=!1){let t=(0,L.useContext)(_b),r=(0,L.useRef)(null);if(null===r.current&&!e){var n,i;let e=null==(i=L.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=i.ReactCurrentOwner)?void 0:n.current;if(e){let r=_y.get(e);null==r?_y.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,_y.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function _x(){return!1}function _k(){return!0}function _S(e){return()=>{}}function __(){return"function"==typeof L.useSyncExternalStore?L.useSyncExternalStore(_S,_x,_k):(0,L.useContext)(_v)}let _C=!!("u">typeof window&&window.document&&window.document.createElement),_T=new Map;function _I(e){let[t,r]=(0,L.useState)(e),n=(0,L.useRef)(null),i=_w(t),s=(0,L.useRef)(null);if(o&&o.register(s,i),_C){let e=_T.get(i);e&&!e.includes(n)?e.push(n):_T.set(i,[n])}return _m(()=>()=>{o&&o.unregister(s),_T.delete(i)},[i]),(0,L.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),i}function _E(e=[]){let t=_I(),[r,n]=function(e){let[t,r]=(0,L.useState)(e),n=(0,L.useRef)(t),i=(0,L.useRef)(null),o=(0,L.useRef)(()=>{if(!i.current)return;let e=i.current.next();if(e.done){i.current=null;return}n.current===e.value?o.current():r(e.value)});return _m(()=>{n.current=t,i.current&&o.current()}),[t,(0,L.useCallback)(e=>{i.current=e(n.current),o.current()},[o])]}(t),i=(0,L.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return _m(i,[t,i,...e]),r}"u">typeof FinalizationRegistry&&(o=new FinalizationRegistry(e=>{_T.delete(e)}));let _R=function(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}(e))&&(n&&(n+=" "),n+=t);return n};function _O(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],i=n[e];"function"==typeof r&&"function"==typeof i&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=_f(r,i):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof i?t[e]=_R(r,i):"id"===e&&r&&i?t.id=function(e,t){if(e===t)return e;let r=_T.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=_T.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,i):"ref"===e&&r&&i?t.ref=_h(r,i):t[e]=void 0!==i?i:r}}return t}let _L=Symbol("default");function _A({values:e,children:t}){for(let[r,n]of e)t=L.createElement(r.Provider,{value:n},t);return t}function _N(e){let{className:t,style:r,children:n,defaultClassName:i,defaultChildren:o,defaultStyle:s,values:a}=e;return(0,L.useMemo)(()=>{let e,l,c;return e="function"==typeof t?t({...a,defaultClassName:i}):t,l="function"==typeof r?r({...a,defaultStyle:s||{}}):r,c="function"==typeof n?n({...a,defaultChildren:o}):null==n?o:n,{className:null!=e?e:i,style:l||s?{...s,...l}:void 0,children:null!=c?c:o,"data-rac":""}},[t,r,n,i,o,s,a])}function _Z(e,t){return r=>t("function"==typeof e?e(r):e,r)}function _M(e,t){let r=(0,L.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||_L;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function _G(e,t,r){let{ref:n,...i}=_M(r,e.slot)||{},o=_d((0,L.useMemo)(()=>_h(t,n),[t,n])),s=_O(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&("function"==typeof i.style||"function"==typeof e.style?s.style=t=>{let r="function"==typeof i.style?i.style(t):i.style,n={...t.defaultStyle,...r},o="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...o}}:s.style={...i.style,...e.style}),[s,o]}function _V(e=!0){let[t,r]=(0,L.useState)(e),n=(0,L.useRef)(!1),i=(0,L.useCallback)(e=>{n.current=!0,r(!!e)},[]);return _m(()=>{n.current||r(!1)},[]),[i,t]}function _W(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}function _P(){let e=(0,L.useRef)(new Map),t=(0,L.useCallback)((t,r,n,i)=>{let o=(null==i?void 0:i.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:o,options:i}),t.addEventListener(r,o,i)},[]),r=(0,L.useCallback)((t,r,n,i)=>{var o;let s=(null==(o=e.current.get(n))?void 0:o.fn)||n;t.removeEventListener(r,s,i),e.current.delete(n)},[]),n=(0,L.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,L.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}let _j=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},_X=e=>e&&"window"in e&&e.window===e?e:_j(e).defaultView||window;var _D=r("../../node_modules/.pnpm/@react-stately+flags@3.1.2/node_modules/@react-stately/flags/dist/import.mjs");function _F(e,t){if(!(0,_D.Nf)())return!!t&&!!e&&e.contains(t);if(!e||!t)return!1;let r=t;for(;null!==r;){if(r===e)return!0;r="SLOT"===r.tagName&&r.assignedSlot?r.assignedSlot.parentNode:!function(e){return null!==e&&"object"==typeof e&&"nodeType"in e&&"number"==typeof e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}(r)?r.parentNode:r.host}return!1}let _z=(e=document)=>{var t;if(!(0,_D.Nf)())return e.activeElement;let r=e.activeElement;for(;r&&"shadowRoot"in r&&(null==(t=r.shadowRoot)?void 0:t.activeElement);)r=r.shadowRoot.activeElement;return r};function _B(e){if((0,_D.Nf)()&&e.target instanceof Element&&e.target.shadowRoot){var t,r;if("composedPath"in e)return null!=(t=e.composedPath()[0])?t:null;if("composedPath"in e.nativeEvent)return null!=(r=e.nativeEvent.composedPath()[0])?r:null}return e.target}let _U=!1,_H=0;function _Y(e){"touch"===e.pointerType&&(_U=!0,setTimeout(()=>{_U=!1},50))}function _K(){if("u">typeof document)return 0===_H&&"u">typeof PointerEvent&&document.addEventListener("pointerup",_Y),_H++,()=>{!(--_H>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",_Y)}}function _J(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:i}=e,[o,s]=(0,L.useState)(!1),a=(0,L.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,L.useEffect)(_K,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=_P(),{hoverProps:u,triggerHoverEnd:d}=(0,L.useMemo)(()=>{let e=(e,t)=>{let i=a.target;a.pointerType="",a.target=null,"touch"!==t&&a.isHovered&&i&&(a.isHovered=!1,c(),n&&n({type:"hoverend",target:i,pointerType:t}),r&&r(!1),s(!1))},o={};return"u">typeof PointerEvent&&(o.onPointerEnter=n=>{_U&&"mouse"===n.pointerType||((n,o)=>{if(a.pointerType=o,i||"touch"===o||a.isHovered||!_F(n.currentTarget,_B(n)))return;a.isHovered=!0;let c=n.currentTarget;a.target=c,l(_j(_B(n)),"pointerover",t=>{a.isHovered&&a.target&&!_F(a.target,_B(t))&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:c,pointerType:o}),r&&r(!0),s(!0)})(n,n.pointerType)},o.onPointerLeave=t=>{!i&&_F(t.currentTarget,_B(t))&&e(t,t.pointerType)}),{hoverProps:o,triggerHoverEnd:e}},[t,r,n,i,a,l,c]);return(0,L.useEffect)(()=>{i&&d({currentTarget:a.target},a.pointerType)},[i]),{hoverProps:u,isHovered:o}}let _Q="u">typeof Element&&"checkVisibility"in Element.prototype,_q=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],_$=_q.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";function _0(e){if(function(){if(null==_1){_1=!1;try{document.createElement("div").focus({get preventScroll(){return _1=!0,!0}})}catch{}}return _1}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}_q.push('[tabindex]:not([tabindex="-1"]):not([disabled])'),_q.join(':not([hidden]):not([tabindex="-1"]),');let _1=null;function _2(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function _5(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function _3(e){let t=(0,L.useRef)({isFocused:!1,observer:null});return _m(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,L.useCallback)(r=>{let n=_B(r);(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&(t.current.isFocused=!0,n.addEventListener("focusout",r=>{if(t.current.isFocused=!1,n.disabled){let t=_2(r);null==e||e(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null==(e=t.current.observer)||e.disconnect();let r=n===_z()?null:_z();n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]}))},[e])}let _9=!1;function _4(e){var t;if("u"<typeof window||null==window.navigator)return!1;let r=null==(t=window.navigator.userAgentData)?void 0:t.brands;return Array.isArray(r)&&r.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function _6(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function _7(e){let t=null;return()=>(null==t&&(t=e()),t)}let _8=_7(function(){return _6(/^Mac/i)}),Ce=_7(function(){return _6(/^iPhone/i)}),Ct=_7(function(){return _6(/^iPad/i)||_8()&&navigator.maxTouchPoints>1}),Cr=_7(function(){return Ce()||Ct()});_7(function(){return _8()||Cr()});let Cn=_7(function(){return _4(/AppleWebKit/i)&&!Ci()}),Ci=_7(function(){return _4(/Chrome/i)}),Co=_7(function(){return _4(/Android/i)}),Cs=_7(function(){return _4(/Firefox/i)});function Ca(e,t,r=!0){var n,i;let{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}=t;Cs()&&(null==(i=window.event)||null==(n=i.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(_8()?o=!0:s=!0);let c=Cn()&&_8()&&!Ct()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Ca.isOpening=r,_0(e),e.dispatchEvent(c),Ca.isOpening=!1}function Cl(e){return""===e.pointerType&&!!e.isTrusted||(Co()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}Ca.isOpening=!1;let Cc=null,Cu=new Set,Cd=new Map,Ch=!1,Cp=!1,Cf={Tab:!0,Escape:!0};function Cm(e,t){for(let r of Cu)r(e,t)}function Cg(e){Ch=!0,Ca.isOpening||e.metaKey||!_8()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(Cc="keyboard",Cm("keyboard",e))}function Cb(e){Cc="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(Ch=!0,Cm("pointer",e))}function Cv(e){!Ca.isOpening&&Cl(e)&&(Ch=!0,Cc="virtual")}function Cy(e){_B(e)!==window&&_B(e)!==document&&!_9&&e.isTrusted&&(Ch||Cp||(Cc="virtual",Cm("virtual",e)),Ch=!1,Cp=!1)}function Cw(){_9||(Ch=!1,Cp=!0)}function Cx(e){if("u"<typeof window||"u"<typeof document||Cd.get(_X(e)))return;let t=_X(e),r=_j(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ch=!0,n.apply(this,arguments)},r.addEventListener("keydown",Cg,!0),r.addEventListener("keyup",Cg,!0),r.addEventListener("click",Cv,!0),t.addEventListener("focus",Cy,!0),t.addEventListener("blur",Cw,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",Cb,!0),r.addEventListener("pointermove",Cb,!0),r.addEventListener("pointerup",Cb,!0)),t.addEventListener("beforeunload",()=>{Ck(e)},{once:!0}),Cd.set(t,{focus:n})}let Ck=(e,t)=>{let r=_X(e),n=_j(e);t&&n.removeEventListener("DOMContentLoaded",t),Cd.has(r)&&(r.HTMLElement.prototype.focus=Cd.get(r).focus,n.removeEventListener("keydown",Cg,!0),n.removeEventListener("keyup",Cg,!0),n.removeEventListener("click",Cv,!0),r.removeEventListener("focus",Cy,!0),r.removeEventListener("blur",Cw,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",Cb,!0),n.removeEventListener("pointermove",Cb,!0),n.removeEventListener("pointerup",Cb,!0)),Cd.delete(r))};function CS(){return"pointer"!==Cc}"u">typeof document&&("loading"!==(p=_j(void 0)).readyState?Cx(void 0):p.addEventListener("DOMContentLoaded",()=>{Cx(void 0)}));let C_=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function CC(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:i}=e,o=(0,L.useCallback)(e=>{if(_B(e)===e.currentTarget)return n&&n(e),i&&i(!1),!0},[n,i]),s=_3(o),a=(0,L.useCallback)(e=>{let t=_B(e),n=_j(t),o=n?_z(n):_z();t===e.currentTarget&&t===o&&(r&&r(e),i&&i(!0),s(e))},[i,r,s]);return{focusProps:{onFocus:!t&&(r||i||n)?a:void 0,onBlur:!t&&(n||i)?o:void 0}}}function CT(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:i}=e,o=(0,L.useRef)({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=_P(),l=(0,L.useCallback)(e=>{_F(e.currentTarget,_B(e))&&o.current.isFocusWithin&&!_F(e.currentTarget,e.relatedTarget)&&(o.current.isFocusWithin=!1,a(),r&&r(e),i&&i(!1))},[r,i,o,a]),c=_3(l),u=(0,L.useCallback)(e=>{if(!_F(e.currentTarget,_B(e)))return;let t=_B(e),r=_j(t),a=_z(r);if(!o.current.isFocusWithin&&a===t){n&&n(e),i&&i(!0),o.current.isFocusWithin=!0,c(e);let t=e.currentTarget;s(r,"focus",e=>{let n=_B(e);if(o.current.isFocusWithin&&!_F(t,n)){let e=new r.defaultView.FocusEvent("blur",{relatedTarget:n});_5(e,t),l(_2(e))}},{capture:!0})}},[n,i,c,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}function CI(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:i}=e,o=(0,L.useRef)({isFocused:!1,isFocusVisible:r||CS()}),[s,a]=(0,L.useState)(!1),[l,c]=(0,L.useState)(()=>o.current.isFocused&&o.current.isFocusVisible),u=(0,L.useCallback)(()=>c(o.current.isFocused&&o.current.isFocusVisible),[]),d=(0,L.useCallback)(e=>{o.current.isFocused=e,o.current.isFocusVisible=CS(),a(e),u()},[u]);t={enabled:s,isTextInput:n},Cx(),(0,L.useEffect)(()=>{if((null==t?void 0:t.enabled)===!1)return;let e=(e,r)=>{var n;let i,s,a,l,c,d,h;n=!!(null==t?void 0:t.isTextInput),i=_j(r?_B(r):void 0),s=r?_B(r):void 0,a="u">typeof window?_X(s).HTMLInputElement:HTMLInputElement,l="u">typeof window?_X(s).HTMLTextAreaElement:HTMLTextAreaElement,c="u">typeof window?_X(s).HTMLElement:HTMLElement,d="u">typeof window?_X(s).KeyboardEvent:KeyboardEvent,h=_z(i),(n=n||h instanceof a&&!C_.has(h.type)||h instanceof l||h instanceof c&&h.isContentEditable)&&"keyboard"===e&&r instanceof d&&!Cf[r.key]||(e=>{o.current.isFocusVisible=e,u()})(CS())};return Cu.add(e),()=>{Cu.delete(e)}},[n,s]);let{focusProps:h}=CC({isDisabled:i,onFocusChange:d}),{focusWithinProps:p}=CT({isDisabled:!i,onFocusWithinChange:d});return{isFocused:s,isFocusVisible:l,focusProps:i?p:h}}let CE=(0,L.createContext)({}),CR=(0,L.forwardRef)(function(e,t){var r,n;[e,t]=_G(e,t,CE);let{isDisabled:i,isInvalid:o,isReadOnly:s,onHoverStart:a,onHoverChange:l,onHoverEnd:c,...u}=e,{hoverProps:d,isHovered:h}=_J({onHoverStart:a,onHoverChange:l,onHoverEnd:c,isDisabled:i}),{isFocused:p,isFocusVisible:f,focusProps:m}=CI({within:!0});null!=i||(i=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=o||(o=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let g=_N({...e,values:{isHovered:h,isFocusWithin:p,isFocusVisible:f,isDisabled:i,isInvalid:o},defaultClassName:"react-aria-Group"});return L.createElement("div",{..._O(u,m,d),...g,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":p||void 0,"data-hovered":h||void 0,"data-focus-visible":f||void 0,"data-disabled":i||void 0,"data-invalid":o||void 0,"data-readonly":s||void 0},g.children)});"u">typeof HTMLTemplateElement&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(e,t){return this.content.insertBefore(e,t)}}));let CO=(0,L.createContext)(!1);function CL(e){let t=(t,r)=>(0,L.useContext)(CO)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,L.forwardRef)(t)}let CA=(0,L.createContext)({}),CN=new Set(["id"]),CZ=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),CM=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),CG=new Set(["dir","lang","hidden","inert","translate"]),CV=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),CW=/^(data-.*)$/;function CP(e,t={}){let{labelable:r,isLink:n,global:i,events:o=i,propNames:s}=t,a={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(CN.has(t)||r&&CZ.has(t)||n&&CM.has(t)||i&&CG.has(t)||o&&(CV.has(t)||t.endsWith("Capture")&&CV.has(t.slice(0,-7)))||(null==s?void 0:s.has(t))||CW.test(t))&&(a[t]=e[t]);return a}function Cj(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function CX(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":i,labelElementType:o="label"}=e;t=_I(t);let s=_I(),a={};return r&&(n=n?`${s} ${n}`:s,a={id:s,htmlFor:"label"===o?t:void 0}),{labelProps:a,fieldProps:function(e,t){let{id:r,"aria-label":n,"aria-labelledby":i}=e;return r=_I(r),i&&n?i=[...new Set([r,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!n,{id:r,"aria-label":n,"aria-labelledby":i}}({id:t,"aria-label":i,"aria-labelledby":n})}}let CD=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),CF=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]),Cz=Symbol.for("react-aria.i18n.locale");function CB(){let e="u">typeof window&&window[Cz]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:!function(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return CD.has(t.script)}let t=e.split("-")[0];return CF.has(t)}(e)?"ltr":"rtl"}}let CU=CB(),CH=new Set;function CY(){for(let e of(CU=CB(),CH))e(CU)}let CK=L.createContext(null);function CJ(){let e=function(){let e=__(),[t,r]=(0,L.useState)(CU);return((0,L.useEffect)(()=>(0===CH.size&&window.addEventListener("languagechange",CY),CH.add(r),()=>{CH.delete(r),0===CH.size&&window.removeEventListener("languagechange",CY)}),[]),e)?{locale:"u">typeof window&&window[Cz]||"en-US",direction:"ltr"}:t}();return(0,L.useContext)(CK)||e}let CQ=new Map,Cq=!1;try{Cq="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch{}let C$=!1;try{C$="unit"===new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style}catch{}let C0={degree:{narrow:{default:"\xb0","ja-JP":" 度","zh-TW":"度","sl-SI":" \xb0"}}};class C1{format(e){let t="";if(t=Cq||null==this.options.signDisplay?this.numberFormatter.format(e):function(e,t,r){if("auto"===t)return e.format(r);{if("never"===t)return e.format(Math.abs(r));let n=!1;if("always"===t?n=r>0||Object.is(r,0):"exceptZero"===t&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),!n)return e.format(r);{let t=e.format(-r),n=e.format(r),i=t.replace(n,"").replace(/\u200e|\u061C/,"");return 1!=[...i].length&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),t.replace(n,"!!!").replace(i,"+").replace("!!!",n)}}}(this.numberFormatter,this.options.signDisplay,e),"unit"===this.options.style&&!C$){var r;let{unit:e,unitDisplay:n="short",locale:i}=this.resolvedOptions();if(!e)return t;let o=null==(r=C0[e])?void 0:r[n];t+=o[i]||o.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.numberFormatter.formatRange)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.numberFormatter.formatRangeToParts)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),n=this.numberFormatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return Cq||null==this.options.signDisplay||(e={...e,signDisplay:this.options.signDisplay}),C$||"unit"!==this.options.style||(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=function(e,t={}){let{numberingSystem:r}=t;if(r&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${r}`),"unit"===t.style&&!C$){var n;let{unit:e,unitDisplay:r="short"}=t;if(!e)throw Error('unit option must be provided with style: "unit"');if(!(null==(n=C0[e])?void 0:n[r]))throw Error(`Unsupported unit ${e} with unitDisplay = ${r}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(CQ.has(i))return CQ.get(i);let o=new Intl.NumberFormat(e,t);return CQ.set(i,o),o}(e,t),this.options=t}}let C2=(0,L.createContext)(null),C5=(0,L.forwardRef)(function(e,t){[e,t]=_G(e,t,C2);let{value:r=0,minValue:n=0,maxValue:i=100,isIndeterminate:o=!1}=e;r=Cj(r,n,i);let[s,a]=_V(!e["aria-label"]&&!e["aria-labelledby"]),{progressBarProps:l,labelProps:c}=function(e){let{value:t=0,minValue:r=0,maxValue:n=100,valueLabel:i,isIndeterminate:o,formatOptions:s={style:"percent"}}=e,a=CP(e,{labelable:!0}),{labelProps:l,fieldProps:c}=CX({...e,labelElementType:"span"}),u=((t=Cj(t,r,n))-r)/(n-r),d=function(e={}){let{locale:t}=CJ();return(0,L.useMemo)(()=>new C1(t,e),[t,e])}(s);if(!o&&!i){let e="percent"===s.style?u:t;i=d.format(e)}return{progressBarProps:_O(a,{...c,"aria-valuenow":o?void 0:t,"aria-valuemin":r,"aria-valuemax":n,"aria-valuetext":o?void 0:i,role:"progressbar"}),labelProps:l}}({...e,label:a}),u=o?void 0:(r-n)/(i-n)*100,d=_N({...e,defaultClassName:"react-aria-ProgressBar",values:{percentage:u,valueText:l["aria-valuetext"],isIndeterminate:o}}),h=CP(e,{global:!0});return L.createElement("div",{..._O(h,d,l),ref:t,slot:e.slot||void 0},L.createElement(CA.Provider,{value:{...c,ref:s,elementType:"span"}},d.children))}),C3=null;function C9(e,t="assertive",r=7e3){C3?C3.announce(e,t,r):(C3=new C4,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?C3.announce(e,t,r):setTimeout(()=>{(null==C3?void 0:C3.isAttached())&&(null==C3||C3.announce(e,t,r))},100))}class C4{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,i;if(!this.node)return;let o=document.createElement("div");"object"==typeof e?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(o):null==(i=this.politeLog)||i.appendChild(o),""!==e&&setTimeout(()=>{o.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let C6=new Map,C7=new Set;function C8(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{let n=_B(r);if(!e(r)||!n)return;let i=C6.get(n);if(i&&(i.delete(r.propertyName),0===i.size&&(n.removeEventListener("transitioncancel",t),C6.delete(n)),0===C6.size)){for(let e of C7)e();C7.clear()}};document.body.addEventListener("transitionrun",r=>{let n=_B(r);if(!e(r)||!n)return;let i=C6.get(n);i||(i=new Set,C6.set(n,i),n.addEventListener("transitioncancel",t,{once:!0})),i.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function Te(e){requestAnimationFrame(()=>{for(let[e]of C6)"isConnected"in e&&!e.isConnected&&C6.delete(e);0===C6.size?e():C7.add(e)})}"u">typeof document&&("loading"!==document.readyState?C8():document.addEventListener("DOMContentLoaded",C8));let Tt="default",Tr="",Tn=new WeakMap;function Ti(e){if(Cr())"disabled"===Tt&&(Tt="restoring",setTimeout(()=>{Te(()=>{if("restoring"===Tt){let t=_j(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=Tr||""),Tr="",Tt="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Tn.has(e)){let t=Tn.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),Tn.delete(e)}}let To=L.createContext({register:()=>{}});function Ts(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function Ta(e,t,r){var n=Ts(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function Tl(e,t){_m(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}To.displayName="PressResponderContext";let Tc=null!=(C=L.useInsertionEffect)?C:_m;function Tu(e){let t=(0,L.useRef)(null);return Tc(()=>{t.current=e},[e]),(0,L.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}var Td=r("../../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/index.js"),Th=new WeakMap;class Tp{continuePropagation(){Ta(this,Th,!1)}get shouldStopPropagation(){var e;return e=Ts(this,Th,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var i;!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,Th,{writable:!0,value:void 0}),Ta(this,Th,!0);let o=null!=(i=null==n?void 0:n.target)?i:r.currentTarget;const s=null==o?void 0:o.getBoundingClientRect();let a,l=0,c,u=null;null!=r.clientX&&null!=r.clientY&&(c=r.clientX,u=r.clientY),s&&(null!=c&&null!=u?(a=c-s.left,l=u-s.top):(a=s.width/2,l=s.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=a,this.y=l,this.key=r.key}}let Tf=Symbol("linkClicked"),Tm="react-aria-pressable-style",Tg="data-react-aria-pressable";function Tb(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:i,onPressUp:o,onClick:s,isDisabled:a,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:d,ref:h,...p}=function(e){let t=(0,L.useContext)(To);if(t){let{register:r,ref:n,...i}=t;e=_O(i,e),r()}return Tl(t,e.ref),e}(e),[f,m]=(0,L.useState)(!1),g=(0,L.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:b,removeAllGlobalListeners:v,removeGlobalListener:y}=_P(),w=(0,L.useCallback)((e,t)=>{let i=g.current;if(a||i.didFirePressStart)return!1;let o=!0;if(i.isTriggeringEvent=!0,n){let r=new Tp("pressstart",t,e);n(r),o=r.shouldStopPropagation}return r&&r(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,m(!0),o},[a,n,r]),x=(0,L.useCallback)((e,n,o=!0)=>{let s=g.current;if(!s.didFirePressStart)return!1;s.didFirePressStart=!1,s.isTriggeringEvent=!0;let l=!0;if(i){let t=new Tp("pressend",n,e);i(t),l=t.shouldStopPropagation}if(r&&r(!1),m(!1),t&&o&&!a){let r=new Tp("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return s.isTriggeringEvent=!1,l},[a,i,r,t]),k=Tu(x),S=(0,L.useCallback)((e,t)=>{let r=g.current;if(a)return!1;if(o){r.isTriggeringEvent=!0;let n=new Tp("pressup",t,e);return o(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0},[a,o]),_=Tu(S),C=(0,L.useCallback)(e=>{let t=g.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&x(Tw(t.target,e),t.pointerType,!1),t.isPressed=!1,M(null),t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||Ti(t.target),t.disposables))r();t.disposables=[]}},[d,v,x]),T=Tu(C),I=(0,L.useCallback)(e=>{u&&C(e)},[u,C]),E=(0,L.useCallback)(e=>{a||null==s||s(e)},[a,s]),R=(0,L.useCallback)((e,t)=>{if(!a&&s){let r=new MouseEvent("click",e);_5(r,t),s(_2(r))}},[a,s]),O=Tu(R),[A,N]=(0,L.useState)(!1);_m(()=>{let e=g.current;if(A){let t=e.target,r=_f(r=>{t&&Ty(r,t)&&!r.repeat&&_F(t,_B(r))&&e.target&&_(Tw(e.target,r),"keyboard")},t=>{var r,n,i;if(e.isPressed&&e.target&&Ty(t,e.target)){Tx(_B(t),t.key)&&t.preventDefault();let r=_B(t),i=_F(e.target,r);k(Tw(e.target,t),"keyboard",i),i&&O(t,e.target),v(),"Enter"!==t.key&&Tv(e.target)&&_F(e.target,r)&&!t[Tf]&&(t[Tf]=!0,Ca(e.target,t,!1)),e.isPressed=!1,N(!1),null==(n=e.metaKeyEvents)||n.delete(t.key)}else if("Meta"===t.key&&(null==(r=e.metaKeyEvents)?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null==(i=e.target)||i.dispatchEvent(new KeyboardEvent("keyup",r))}});return b(_j(e.target),"keyup",r,!0),()=>{y(_j(e.target),"keyup",r,!0)}}},[A,b,v,y]);let[Z,M]=(0,L.useState)(null);_m(()=>{let e=g.current;if("pointer"===Z){let t=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(_F(e.target,_B(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?T(t):(_0(e.target),e.target.click()))},80);t.currentTarget&&b(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else T(t);e.isOverTarget=!1}},r=e=>{T(e)};return b(_j(e.target),"pointerup",t,!1),b(_j(e.target),"pointercancel",r,!1),()=>{y(_j(e.target),"pointerup",t,!1),y(_j(e.target),"pointercancel",r,!1)}}},[Z,b,y]);let G=(0,L.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(Ty(t.nativeEvent,t.currentTarget)&&_F(t.currentTarget,_B(t))){var r;Tx(_B(t),t.key)&&t.preventDefault();let n=!0;e.isPressed||t.repeat||(e.target=t.currentTarget,e.isPressed=!0,N(!0),e.pointerType="keyboard",n=w(t,"keyboard")),n&&t.stopPropagation(),t.metaKey&&_8()&&(null==(r=e.metaKeyEvents)||r.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||_F(t.currentTarget,_B(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!Ca.isOpening){let r=!0;if(a&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||Cl(t.nativeEvent))){let e=w(t,"virtual"),n=S(t,"virtual"),i=x(t,"virtual");E(t),r=e&&n&&i}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual",i=S(Tw(t.currentTarget,t),n),o=x(Tw(t.currentTarget,t),n,!0);r=i&&o,e.isOverTarget=!1,E(t),C(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}};return"u">typeof PointerEvent&&(t.onPointerDown=t=>{var r;if(0!==t.button||!_F(t.currentTarget,_B(t)))return;if(r=t.nativeEvent,!Co()&&0===r.width&&0===r.height||1===r.width&&1===r.height&&0===r.pressure&&0===r.detail&&"mouse"===r.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let n=!0;if(!e.isPressed){e.isPressed=!0,M("pointer"),e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(Cr()){if("default"===Tt){let t=_j(e);Tr=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Tt="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";Tn.set(e,e.style[t]),e.style[t]="none"}}(e.target),n=w(t,e.pointerType);let r=_B(t);"releasePointerCapture"in r&&("hasPointerCapture"in r?r.hasPointerCapture(t.pointerId)&&r.releasePointerCapture(t.pointerId):r.releasePointerCapture(t.pointerId))}n&&t.stopPropagation()},t.onMouseDown=t=>{if(_F(t.currentTarget,_B(t))&&0===t.button){if(c){let r=function(e){for(var t;e&&!((t=e).matches(_$)&&function e(t,r){return _Q?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):"#comment"!==t.nodeName&&function(e){let t=_X(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,i="none"!==r&&"hidden"!==n&&"collapse"!==n;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);i="none"!==r&&"hidden"!==n&&"collapse"!==n}return i}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(t)&&!function(e){let t=e;for(;null!=t;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}(t));)e=e.parentElement;let r=_X(e),n=r.document.activeElement;if(!n||n===e)return;_9=!0;let i=!1,o=e=>{(_B(e)===n||i)&&e.stopImmediatePropagation()},s=t=>{(_B(t)===n||i)&&(t.stopImmediatePropagation(),e||i||(i=!0,_0(n),c()))},a=t=>{(_B(t)===e||i)&&t.stopImmediatePropagation()},l=t=>{(_B(t)===e||i)&&(t.stopImmediatePropagation(),i||(i=!0,_0(n),c()))};r.addEventListener("blur",o,!0),r.addEventListener("focusout",s,!0),r.addEventListener("focusin",l,!0),r.addEventListener("focus",a,!0);let c=()=>{cancelAnimationFrame(u),r.removeEventListener("blur",o,!0),r.removeEventListener("focusout",s,!0),r.removeEventListener("focusin",l,!0),r.removeEventListener("focus",a,!0),_9=!1,i=!1},u=requestAnimationFrame(c);return c}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{_F(t.currentTarget,_B(t))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||S(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,w(Tw(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(Tw(e.target,t),e.pointerType,!1),I(t))},t.onDragStart=e=>{_F(e.currentTarget,_B(e))&&C(e)}),t},[a,c,v,d,C,I,x,w,S,E,R]);return(0,L.useEffect)(()=>{if(!h)return;let e=_j(h.current);if(!e||!e.head||e.getElementById(Tm))return;let t=e.createElement("style");t.id=Tm,t.textContent=`
|
|
307
|
+
To resolve the conflict:`,gH(l,e))),i=a)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},e}(),gJ=function(){function e(e){this._backingStorages=e}return e.prototype.record=function(e,t,r,n){this._backingStorages.forEach(function(i){i.record(e,t,r,n)})},e}(),gQ=function(){function e(e,t){this._instrumentName=e,this._valueType=t,this._buffer=new gV}return e.prototype.observe=function(e,t){(void 0===t&&(t={}),"number"!=typeof e)?ug.warn("non-number value provided to metric "+this._instrumentName+": "+e):(this._valueType!==cF.INT||Number.isInteger(e)||(ug.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),Number.isInteger(e=Math.trunc(e))))&&this._buffer.set(t,e)},e}(),gq=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(e,t,r){if(void 0===r&&(r={}),gA(e)){var n=this._buffer.get(e);if(null==n&&(n=new gV,this._buffer.set(e,n)),"number"!=typeof t)return void ug.warn("non-number value provided to metric "+e._descriptor.name+": "+t);(e._descriptor.valueType!==cF.INT||Number.isInteger(t)||(ug.warn("INT value type cannot accept a floating-point value for "+e._descriptor.name+", ignoring the fractional digits."),Number.isInteger(t=Math.trunc(t))))&&n.set(r,t)}},e}(),g$=function(e,t,r,n){return new(r||(r=Promise))(function(t,i){function o(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var n;e.done?t(e.value):((n=e.value)instanceof r?n:new r(function(e){e(n)})).then(o,s)}a((n=n.apply(e,[])).next())})},g0=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var l=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},g1=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},g2=function(e,t,r){if(2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},g5=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(e,t){this._findCallback(e,t)>=0||this._callbacks.push({callback:e,instrument:t})},e.prototype.removeCallback=function(e,t){var r=this._findCallback(e,t);r<0||this._callbacks.splice(r,1)},e.prototype.addBatchCallback=function(e,t){var r=new Set(t.filter(gA));0===r.size?ug.error("BatchObservableCallback is not associated with valid instruments",t):this._findBatchCallback(e,r)>=0||this._batchCallbacks.push({callback:e,instruments:r})},e.prototype.removeBatchCallback=function(e,t){var r=new Set(t.filter(gA)),n=this._findBatchCallback(e,r);n<0||this._batchCallbacks.splice(n,1)},e.prototype.observe=function(e,t){return g$(this,void 0,void 0,function(){var r,n;return g0(this,function(i){switch(i.label){case 0:return r=this._observeCallbacks(e,t),n=this._observeBatchCallbacks(e,t),[4,function(e){return mr(this,void 0,void 0,function(){var t=this;return mn(this,function(r){return[2,Promise.all(e.map(function(e){return mr(t,void 0,void 0,function(){return mn(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e];case 1:return[2,{status:"fulfilled",value:t.sent()}];case 2:return[2,{status:"rejected",reason:t.sent()}];case 3:return[2]}})})}))]})})}(g2(g2([],g1(r),!1),g1(n),!1))];case 1:return[2,i.sent().filter(md).map(function(e){return e.reason})]}})})},e.prototype._observeCallbacks=function(e,t){var r=this;return this._callbacks.map(function(n){var i=n.callback,o=n.instrument;return g$(r,void 0,void 0,function(){var r,n;return g0(this,function(s){switch(s.label){case 0:return n=Promise.resolve(i(r=new gQ(o._descriptor.name,o._descriptor.valueType))),null!=t&&(n=mu(n,t)),[4,n];case 1:return s.sent(),o._metricStorages.forEach(function(t){t.record(r._buffer,e)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(e,t){var r=this;return this._batchCallbacks.map(function(n){var i=n.callback,o=n.instruments;return g$(r,void 0,void 0,function(){var r,n;return g0(this,function(s){switch(s.label){case 0:return n=Promise.resolve(i(r=new gq)),null!=t&&(n=mu(n,t)),[4,n];case 1:return s.sent(),o.forEach(function(t){var n=r._buffer.get(t);null!=n&&t._metricStorages.forEach(function(t){t.record(n,e)})}),[2]}})})})},e.prototype._findCallback=function(e,t){return this._callbacks.findIndex(function(r){return r.callback===e&&r.instrument===t})},e.prototype._findBatchCallback=function(e,t){return this._batchCallbacks.findIndex(function(r){return r.callback===e&&function(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var i=ms(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(!t.has(s))return!1}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0}(r.instruments,t)})},e}(),g3=(bV=function(e,t){return(bV=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}bV(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),g9=function(e){function t(t,r,n,i,o){var s=e.call(this,t)||this;return s._attributesProcessor=n,s._aggregationCardinalityLimit=o,s._deltaMetricStorage=new gP(r,s._aggregationCardinalityLimit),s._temporalMetricStorage=new gD(r,i),s}return g3(t,e),t.prototype.record=function(e,t,r,n){t=this._attributesProcessor.process(t,r),this._deltaMetricStorage.record(e,t,r,n)},t.prototype.collect=function(e,t){var r=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,r,t)},t}(gZ),g4=(bW=function(e,t){return(bW=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}bW(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),g6=function(){function e(){}return e.Noop=function(){return be},e}(),g7=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g4(t,e),t.prototype.process=function(e,t){return e},t}(g6);function g8(e){var t=g6.call(this)||this;return t._allowedAttributeNames=e,t}g4(g8,g6),g8.prototype.process=function(e,t){var r=this,n={};return Object.keys(e).filter(function(e){return r._allowedAttributeNames.includes(e)}).forEach(function(t){return n[t]=e[t]}),n};var be=new g7,bt=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var l=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},br=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},bn=function(){function e(e,t){this._meterProviderSharedState=e,this._instrumentationScope=t,this.metricStorageRegistry=new gK,this.observableRegistry=new g5,this.meter=new gN(this)}return e.prototype.registerMetricStorage=function(e){var t=this._registerMetricStorage(e,g9);return 1===t.length?t[0]:new gJ(t)},e.prototype.registerAsyncMetricStorage=function(e){return this._registerMetricStorage(e,gB)},e.prototype.collect=function(e,t,r){var n,i,o;return n=this,i=void 0,o=function(){var n,i,o;return bt(this,function(s){switch(s.label){case 0:return[4,this.observableRegistry.observe(t,r?.timeoutMillis)];case 1:return n=s.sent(),0===(i=this.metricStorageRegistry.getStorages(e)).length?[2,null]:0===(o=i.map(function(r){return r.collect(e,t)}).filter(ma)).length?[2,{errors:n}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:o},errors:n}]}})},new(i||(i=Promise))(function(e,t){function r(e){try{a(o.next(e))}catch(e){t(e)}}function s(e){try{a(o.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):((n=t.value)instanceof i?n:new i(function(e){e(n)})).then(r,s)}a((o=o.apply(n,[])).next())})},e.prototype._registerMetricStorage=function(e,t){var r=this,n=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope).map(function(n){var i,o,s={name:null!=(i=n.name)?i:e.name,description:null!=(o=n.description)?o:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice},a=r.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(null!=a)return a;var l=n.aggregation.createAggregator(s),c=new t(s,l,n.attributesProcessor,r._meterProviderSharedState.metricCollectors,n.aggregationCardinalityLimit);return r.metricStorageRegistry.register(c),c});if(0===n.length){var i=this._meterProviderSharedState.selectAggregations(e.type).map(function(n){var i=br(n,2),o=i[0],s=i[1],a=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(o,e);if(null!=a)return a;var l=s.createAggregator(e),c=o.selectCardinalityLimit(e.type),u=new t(e,l,g6.Noop(),[o],c);return r.metricStorageRegistry.registerForCollector(o,u),u});n=n.concat(i)}return n},e}(),bi=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bo=function(){function e(e){this.resource=e,this.viewRegistry=new gx,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(e){var t,r,n=e.name+":"+(null!=(t=e.version)?t:"")+":"+(null!=(r=e.schemaUrl)?r:""),i=this.meterSharedStates.get(n);return null==i&&(i=new bn(this,e),this.meterSharedStates.set(n,i)),i},e.prototype.selectAggregations=function(e){var t,r,n=[];try{for(var i=bi(this.metricCollectors),o=i.next();!o.done;o=i.next()){var s=o.value;n.push([s,s.selectAggregation(e)])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},e}(),bs=function(e,t,r,n){return new(r||(r=Promise))(function(t,i){function o(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var n;e.done?t(e.value):((n=e.value)instanceof r?n:new r(function(e){e(n)})).then(o,s)}a((n=n.apply(e,[])).next())})},ba=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var l=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},bl=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},bc=function(e,t,r){if(2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},bu=function(){function e(e,t){this._sharedState=e,this._metricReader=t}return e.prototype.collect=function(e){return bs(this,void 0,void 0,function(){var t,r,n,i=this;return ba(this,function(o){switch(o.label){case 0:return t=mK(Date.now()),r=[],n=[],[4,Promise.all(Array.from(this._sharedState.meterSharedStates.values()).map(function(o){return bs(i,void 0,void 0,function(){var i;return ba(this,function(s){switch(s.label){case 0:return[4,o.collect(this,t,e)];case 1:return i=s.sent(),i?.scopeMetrics!=null&&r.push(i.scopeMetrics),i?.errors!=null&&n.push.apply(n,bc([],bl(i.errors),!1)),[2]}})})}))];case 1:return o.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:n}]}})})},e.prototype.forceFlush=function(e){return bs(this,void 0,void 0,function(){return ba(this,function(t){switch(t.label){case 0:return[4,this._metricReader.forceFlush(e)];case 1:return t.sent(),[2]}})})},e.prototype.shutdown=function(e){return bs(this,void 0,void 0,function(){return ba(this,function(t){switch(t.label){case 0:return[4,this._metricReader.shutdown(e)];case 1:return t.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(e){return this._metricReader.selectAggregationTemporality(e)},e.prototype.selectAggregation=function(e){return this._metricReader.selectAggregation(e)},e.prototype.selectCardinalityLimit=function(e){var t,r,n;return null!=(n=null==(r=(t=this._metricReader).selectCardinalityLimit)?void 0:r.call(t,e))?n:2e3},e}(),bd=function(e,t,r,n){return new(r||(r=Promise))(function(t,i){function o(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var n;e.done?t(e.value):((n=e.value)instanceof r?n:new r(function(e){e(n)})).then(o,s)}a((n=n.apply(e,[])).next())})},bh=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var l=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},bp=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bf=function(){function e(e){if(this._shutdown=!1,this._sharedState=new bo((s=null==(o=e?.mergeResourceWithDefaults)||o,a=e?.resource??pu.empty(),s?pu.default().merge(a):a)),e?.views!=null&&e.views.length>0)try{for(var t,r,n,i,o,s,a,l=bp(e.views),c=l.next();!c.done;c=l.next()){var u=c.value;this._sharedState.viewRegistry.addView(u)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}if(e?.readers!=null&&e.readers.length>0)try{for(var d=bp(e.readers),h=d.next();!h.done;h=d.next()){var p=h.value;this.addMetricReader(p)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}return e.prototype.getMeter=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r={}),this._shutdown?(ug.warn("A shutdown MeterProvider cannot provide a Meter"),cI):this._sharedState.getMeterSharedState({name:e,version:t,schemaUrl:r.schemaUrl}).meter},e.prototype.addMetricReader=function(e){var t=new bu(this._sharedState,e);e.setMetricProducer(t),this._sharedState.metricCollectors.push(t)},e.prototype.shutdown=function(e){return bd(this,void 0,void 0,function(){return bh(this,function(t){switch(t.label){case 0:return this._shutdown?(ug.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(t){return t.shutdown(e)}))]);case 1:return t.sent(),[2]}})})},e.prototype.forceFlush=function(e){return bd(this,void 0,void 0,function(){return bh(this,function(t){switch(t.label){case 0:return this._shutdown?(ug.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(t){return t.forceFlush(e)}))];case 1:return t.sent(),[2]}})})},e}();function bm(e,t){return e.dataPoints.map(function(r){var n=e.descriptor.valueType,i={attributes:me(r.attributes),startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)};switch(n){case cF.INT:i.asInt=r.value;break;case cF.DOUBLE:i.asDouble=r.value}return i})}var bg=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bb=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},bv={serializeRequest:function(e){var t,r=(t={useLongBits:!1},{resourceMetrics:[e].map(function(e){var r,n,i;return r=f4(t),{resource:f7(e.resource),schemaUrl:void 0,scopeMetrics:(n=e.scopeMetrics,i=r,Array.from(n.map(function(e){return{scope:f8(e.scope),metrics:e.metrics.map(function(e){return function(e,t){var r,n,i,o,s={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},a=function(e){switch(e){case my.DELTA:return 1;case my.CUMULATIVE:return 2}}(e.aggregationTemporality);switch(e.dataPointType){case mw.SUM:s.sum={aggregationTemporality:a,isMonotonic:e.isMonotonic,dataPoints:bm(e,t)};break;case mw.GAUGE:s.gauge={dataPoints:bm(e,t)};break;case mw.HISTOGRAM:s.histogram={aggregationTemporality:a,dataPoints:(r=e,n=t,r.dataPoints.map(function(e){var t=e.value;return{attributes:me(e.attributes),bucketCounts:t.buckets.counts,explicitBounds:t.buckets.boundaries,count:t.count,sum:t.sum,min:t.min,max:t.max,startTimeUnixNano:n.encodeHrTime(e.startTime),timeUnixNano:n.encodeHrTime(e.endTime)}}))};break;case mw.EXPONENTIAL_HISTOGRAM:s.exponentialHistogram={aggregationTemporality:a,dataPoints:(i=e,o=t,i.dataPoints.map(function(e){var t=e.value;return{attributes:me(e.attributes),count:t.count,min:t.min,max:t.max,sum:t.sum,positive:{offset:t.positive.offset,bucketCounts:t.positive.bucketCounts},negative:{offset:t.negative.offset,bucketCounts:t.negative.bucketCounts},scale:t.scale,zeroCount:t.zeroCount,startTimeUnixNano:o.encodeHrTime(e.startTime),timeUnixNano:o.encodeHrTime(e.endTime)}}))}}return s}(e,i)}),schemaUrl:e.scope.schemaUrl}})))}})});return new TextEncoder().encode(JSON.stringify(r))},deserializeResponse:function(e){return JSON.parse(new TextDecoder().decode(e))}},by={serializeRequest:function(e){var t={resourceSpans:function(e,t){for(var r=function(e){var t,r,n=new Map;try{for(var i=bg(e),o=i.next();!o.done;o=i.next()){var s=o.value,a=n.get(s.resource);a||(a=new Map,n.set(s.resource,a));var l=s.instrumentationLibrary.name+"@"+(s.instrumentationLibrary.version||"")+":"+(s.instrumentationLibrary.schemaUrl||""),c=a.get(l);c||(c=[],a.set(l,c)),c.push(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}(e),n=[],i=r.entries(),o=i.next();!o.done;){for(var s=bb(o.value,2),a=s[0],l=s[1],c=[],u=l.values(),d=u.next();!d.done;){var h=d.value;if(h.length>0){var p=h.map(function(e){return function(e,t){var r,n=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:null==(r=n.traceState)?void 0:r.serialize(),name:e.name,kind:null==e.kind?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:me(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(e){var r,n;return r=e,n=t,{attributes:r.attributes?me(r.attributes):[],name:r.name,timeUnixNano:n.encodeHrTime(r.time),droppedAttributesCount:r.droppedAttributesCount||0}}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(e){return function(e,t){var r;return{attributes:e.attributes?me(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:null==(r=e.context.traceState)?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)}),droppedLinksCount:e.droppedLinksCount}}(e,t)});c.push({scope:f8(h[0].instrumentationLibrary),spans:p,schemaUrl:h[0].instrumentationLibrary.schemaUrl})}d=u.next()}var f={resource:f7(a),scopeSpans:c,schemaUrl:void 0};n.push(f),o=i.next()}return n}(e,f4({useHex:!0,useLongBits:!1}))};return new TextEncoder().encode(JSON.stringify(t))},deserializeResponse:function(e){return JSON.parse(new TextDecoder().decode(e))}},bw=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var l=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},bx=function(){function e(e){this._transport=e}return e.prototype.retry=function(e,t,r){var n=this;return new Promise(function(i,o){setTimeout(function(){n._transport.send(e,t).then(i,o)},r)})},e.prototype.send=function(e,t){var r,n,i,o;return n=this,i=void 0,o=function(){var n,i,o,s,a,l,c;return bw(this,function(u){switch(u.label){case 0:return n=Date.now()+t,[4,this._transport.send(e,t)];case 1:i=u.sent(),o=5,s=1e3,u.label=2;case 2:return"retryable"===i.status&&o>0?(o--,a=Math.max(Math.min(s,5e3)+(.4*Math.random()-.2),0),s*=1.5,(l=null!=(r=i.retryInMillis)?r:a)>(c=n-Date.now())?[2,i]:[4,this.retry(e,c,l)]):[3,4];case 3:return i=u.sent(),[3,2];case 4:return[2,i]}})},new(i||(i=Promise))(function(e,t){function r(e){try{a(o.next(e))}catch(e){t(e)}}function s(e){try{a(o.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):((n=t.value)instanceof i?n:new i(function(e){e(n)})).then(r,s)}a((o=o.apply(n,[])).next())})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function bk(e){return new bx(e.transport)}var bS=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},b_=function(){function e(e){this._parameters=e}return e.prototype.send=function(e,t){var r=this;return new Promise(function(n){var i=new XMLHttpRequest;i.timeout=t,i.open("POST",r._parameters.url),Object.entries(r._parameters.headers()).forEach(function(e){var t=bS(e,2),r=t[0],n=t[1];i.setRequestHeader(r,n)}),i.ontimeout=function(e){n({status:"failure",error:Error("XHR request timed out")})},i.onreadystatechange=function(){i.status>=200&&i.status<=299?(ug.debug("XHR success"),n({status:"success"})):i.status&&[429,502,503,504].includes(i.status)?n({status:"retryable",retryInMillis:function(e){if(null!=e){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?1e3*t:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}}(i.getResponseHeader("Retry-After"))}):0!==i.status&&n({status:"failure",error:Error("XHR request failed with non-retryable status")})},i.onabort=function(){n({status:"failure",error:Error("XHR request aborted")})},i.onerror=function(){n({status:"failure",error:Error("XHR request errored")})},i.send(e)})},e.prototype.shutdown=function(){},e}(),bC=function(){function e(e){this._params=e}return e.prototype.send=function(e){var t=this;return new Promise(function(r){navigator.sendBeacon(t._params.url,new Blob([e],{type:t._params.blobType}))?(ug.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}(),bT=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},bI=function(){return(bI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function bE(e,t,r,n){var i,o,s,a,l,c,u,d,h,p,f,m,g,b,v,y,w,x,k,S,_,C=!!e.headers||"function"!=typeof navigator.sendBeacon,T=(s={url:e.url,timeoutMillis:e.timeoutMillis,headers:function(e){if(null!=e)return function(){return e}}(e.headers),concurrencyLimit:e.concurrencyLimit},a={},l=bI(bI({},{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}),{headers:function(){return n},url:"http://localhost:4318/"+r,agentOptions:{keepAlive:!0}}),bI(bI({},{timeoutMillis:function(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}(null!=(f=null!=(p=s.timeoutMillis)?p:a.timeoutMillis)?f:l.timeoutMillis),concurrencyLimit:null!=(g=null!=(m=s.concurrencyLimit)?m:a.concurrencyLimit)?g:l.concurrencyLimit,compression:null!=(v=null!=(b=s.compression)?b:a.compression)?v:l.compression}),{headers:(y=s.headers,w=function(){var e,t={};return Object.entries(null!=(e=y?.())?e:{}).forEach(function(e){var r=bT(e,2),n=r[0],i=r[1];"u">typeof i?t[n]=String(i):ug.warn('Header "'+n+'" has invalid value ('+i+") and will be ignored")}),t},x=a.headers,k=l.headers,S=bI({},k()),_={},function(){return null!=x&&Object.assign(_,x()),null!=w&&Object.assign(_,w()),Object.assign(_,S)}),url:null!=(u=null!=(c=function(e){if(null!=e)try{return new URL(e),e}catch{throw Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}(s.url))?c:a.url)?u:l.url,agentOptions:null!=(h=null!=(d=s.agentOptions)?d:a.agentOptions)?h:l.agentOptions}));return C?fQ(i=T,t,bk({transport:new b_(i)})):fQ(o=T,t,bk({transport:new bC({url:o.url,blobType:o.headers()["Content-Type"]})}))}var bR,bO,bL,bA,bN,bZ,bM,bG,bV,bW,bP,bj,bX,bD=(bP=function(e,t){return(bP=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}bP(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),bF=function(e){function t(t){return void 0===t&&(t={}),e.call(this,bE(t,by,"v1/traces",{"Content-Type":"application/json"}))||this}return bD(t,e),t}(fz);(vv=bX||(bX={}))[vv.DELTA=0]="DELTA",vv[vv.CUMULATIVE=1]="CUMULATIVE",vv[vv.LOWMEMORY=2]="LOWMEMORY";var bz=(vy=function(e,t){return(vy=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}vy(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),bB=function(){return my.CUMULATIVE},bU=function(e){switch(e){case mk.COUNTER:case mk.OBSERVABLE_COUNTER:case mk.GAUGE:case mk.HISTOGRAM:case mk.OBSERVABLE_GAUGE:return my.DELTA;case mk.UP_DOWN_COUNTER:case mk.OBSERVABLE_UP_DOWN_COUNTER:return my.CUMULATIVE}},bH=function(e){switch(e){case mk.COUNTER:case mk.HISTOGRAM:return my.DELTA;case mk.GAUGE:case mk.UP_DOWN_COUNTER:case mk.OBSERVABLE_UP_DOWN_COUNTER:case mk.OBSERVABLE_COUNTER:case mk.OBSERVABLE_GAUGE:return my.CUMULATIVE}},bY=function(e){function t(t,r){var n,i,o,s,a=e.call(this,t)||this;return a._aggregationSelector=null!=r&&r.aggregationPreference?r.aggregationPreference:function(e){return m3.Default()},a._aggregationTemporalitySelector=null!=(n=r?.temporalityPreference)?n===bX.DELTA?bU:n===bX.LOWMEMORY?bH:bB:"cumulative"===(s=(i=function(e){var t={};for(var r in uU)if("OTEL_LOG_LEVEL"===r)!function(e,t,r){var n=r[e];if("string"==typeof n){var i=uH[n.toUpperCase()];null!=i&&(t[e]=i)}}(r,t,e);else if(uD.indexOf(r)>-1)!function(e,t,r){if("u">typeof r[e]){var n=String(r[e]);t[e]="true"===n.toLowerCase()}}(r,t,e);else if(uF.indexOf(r)>-1)!function(e,t,r,n,i){if(void 0===n&&(n=-1/0),void 0===i&&(i=1/0),"u">typeof r[e]){var o=Number(r[e]);isNaN(o)||(o<n?t[e]=n:o>i?t[e]=i:t[e]=o)}}(r,t,e);else if(uz.indexOf(r)>-1)!function(e,t,r,n){void 0===n&&(n=",");var i=r[e];"string"==typeof i&&(t[e]=i.split(n).map(function(e){return e.trim()}))}(r,t,e);else{var n=e[r];"u">typeof n&&null!==n&&(t[r]=String(n))}return t}(uY),o=Object.assign({},uU,i)).OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase())?bB:"delta"===s?bU:"lowmemory"===s?bH:(ug.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+o.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),bB),a}return bz(t,e),t.prototype.selectAggregation=function(e){return this._aggregationSelector(e)},t.prototype.selectAggregationTemporality=function(e){return this._aggregationTemporalitySelector(e)},t}(fz),bK=(vw=function(e,t){return(vw=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}vw(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),bJ=function(e){function t(t){return e.call(this,bE(t??{},bv,"v1/metrics",{"Content-Type":"application/json"}),t)||this}return bK(t,e),t}(bY);class bQ extends bF{constructor(e,t){super(lv(lb({},e),{headers:{}})),this.sampler=t}export(e,t){let r=function(e,t){if(!t.isSamplingEnabled())return e;let r=[],n={},i={};for(let o of e){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));let e=t.shouldSample(o);e.sample?e.attributes?n[o.spanContext().spanId]=function(e,t){let r=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>r,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.shift(),n=new WeakMap;e.length>0;)r=function e(t,r,n,i){if(void 0===n&&(n=0),!(n>20)){if(n++,dh(t)||dh(r)||du(r))a=da(r);else if(dc(t)){if(a=t.slice(),dc(r))for(var o,s,a,l=0,c=r.length;l<c;l++)a.push(da(r[l]));else if(dd(r))for(var u=Object.keys(r),l=0,c=u.length;l<c;l++){var d=u[l];a[d]=da(r[d])}}else if(dd(t))if(dd(r)){if(o=t,s=r,!ds(o)||!ds(s))return r;a=Object.assign({},t);for(var u=Object.keys(r),l=0,c=u.length;l<c;l++){var d=u[l],h=r[d];if(dh(h))typeof h>"u"?delete a[d]:a[d]=h;else{var p=a[d];if(dl(t,d,i)||dl(r,d,i))delete a[d];else{if(dd(p)&&dd(h)){var f=i.get(p)||[],m=i.get(h)||[];f.push({obj:t,key:d}),m.push({obj:r,key:d}),i.set(p,f),i.set(h,m)}a[d]=e(a[d],h,n,i)}}}}else a=r;return a}}(r,e.shift(),0,n);return r}(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}(o,e.attributes):n[o.spanContext().spanId]=o:r.push(o.spanContext().spanId)}for(;r.length>0;){let e=i[r.shift()];if(e)for(let t of e)delete n[t],r.push(t)}return Object.values(n)}(e,this.sampler);if(0===r.length)return;let n=0,i=e=>e.code===hM.SUCCESS?t({code:hM.SUCCESS}):++n>3?t({code:hM.FAILED,error:e.error}):void new Promise(e=>setTimeout(e,1e3+500*Math.pow(2,n))).then(()=>{super.export(r,i)});super.export(r,i)}}class bq extends bJ{constructor(e){super(lv(lb({},e),{headers:{}}))}export(e,t){let r=0,n=i=>{var o;return i.code===hM.SUCCESS?t({code:hM.SUCCESS}):++r>3?(console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${null==(o=i.error)?void 0:o.message}`,i.error),t({code:hM.FAILED,error:i.error})):void new Promise(e=>setTimeout(e,1e3+500*Math.pow(2,r))).then(()=>{var t;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${null==(t=i.error)?void 0:t.message}`,i.error),super.export(e,n)})};super.export(e,n)}}let b$=["click","input","submit"];function b0(){return!1}let b1=class e extends dO{constructor(t={}){var r;super(e.moduleName,e.version,t),ly(this,"_spansData",new WeakMap),ly(this,"_zonePatched"),ly(this,"_wrappedListeners",new WeakMap),ly(this,"_eventsSpanMap",new WeakMap),ly(this,"_eventNames"),ly(this,"_shouldPreventSpanCreation"),this._eventNames=new Set(null!=(r=t?.eventNames)?r:b$),this._shouldPreventSpanCreation="function"==typeof t?.shouldPreventSpanCreation?t.shouldPreventSpanCreation:b0}init(){}_checkForTimeout(e,t){var r,n,i,o;let s=this._spansData.get(t);s&&("setTimeout"===e.source?(n=uJ(("number"!=typeof(r=uK.timeOrigin)&&(r=uK.timing&&uK.timing.fetchStart),r)),i=uJ(uK.now()),(o=[n[0]+i[0],n[1]+i[1]])[1]>=1e9&&(o[1]-=1e9,o[0]+=1),s.hrTimeLastTimeout=o):"Promise.then"!==e.source&&"setTimeout"!==e.source&&(s.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,t){var r;let n=e?.target,i=e?.type;if(!(n instanceof HTMLElement)||!n.getAttribute||n.hasAttribute("disabled")||!this._allowEventName(i))return;let o=function e(t,r){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=function(e,t){var r=e.nodeType,n=function(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var r=Array.from(e.parentNode.childNodes);return(r=r.filter(function(r){var n=r.localName;return t.indexOf(r.nodeType)>=0&&n===e.localName})).length>=1?r.indexOf(e)+1:0}(e),i="";if(r===Node.ELEMENT_NODE){var o=e.getAttribute("id");if(t&&o)return'//*[@id="'+o+'"]';i=e.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else{if(r!==Node.COMMENT_NODE)return"";i="comment()"}return i&&n>1?"/"+i+"["+n+"]":"/"+i}(t,r);if(r&&n.indexOf("@id")>0)return n;var i="";return t.parentNode&&(i+=e(t.parentNode,!1)),i+=n}(n,!0);try{let s=this.tracer.startSpan(i,{attributes:{"event.type":i,"event.tag":n.tagName,"event.xpath":o,"event.id":n.id,"event.classname":n.className,"event.text":null!=(r=n.textContent)?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},t?uO.setSpan(um.active(),t):void 0);return e instanceof MouseEvent&&(s.setAttribute("event.x",e.clientX),s.setAttribute("event.y",e.clientY),s.setAttribute("event.relativeX",e.clientX/window.innerWidth),s.setAttribute("event.relativeY",e.clientY/window.innerHeight),"scroll"===i&&(s.setAttribute("event.scrollX",window.scrollX),s.setAttribute("event.scrollY",window.scrollY))),!0===this._shouldPreventSpanCreation(i,n,s)?void 0:(this._spansData.set(s,{taskCount:0}),s)}catch(e){this._diag.error("failed to start create new user interaction span",e)}}_decrementTask(e){let t=this._spansData.get(e);t&&(t.taskCount--,0===t.taskCount&&this._tryToEndSpan(e,t.hrTimeLastTimeout))}_getCurrentSpan(e){let t=e.get("OT_ZONE_CONTEXT");return t&&uO.getSpan(t)}_incrementTask(e){let t=this._spansData.get(e);t&&t.taskCount++}addPatchedListener(e,t,r,n){let i=this._wrappedListeners.get(r);i||(i=new Map,this._wrappedListeners.set(r,i));let o=i.get(t);return o||(o=new Map,i.set(t,o)),!o.has(e)&&(o.set(e,n),!0)}removePatchedListener(e,t,r){let n=this._wrappedListeners.get(r);if(!n)return;let i=n.get(t);if(!i)return;let o=i.get(e);return o&&(i.delete(e),0===i.size&&(n.delete(t),0===n.size&&this._wrappedListeners.delete(r))),o}_invokeListener(e,t,r){return"function"==typeof e?e.apply(t,r):e.handleEvent(r[0])}_patchAddEventListener(){let e=this,t=new Map;return r=>function(n,i,o){if(!i)return r.call(this,n,i,o);let s=o&&"object"==typeof o&&o.once,a=function(...r){var o;let a,l=r[0];if(!(null!=l&&l.type)||Date.now()-(null!=(o=t.get(l.type))?o:0)<1e3/60)return e._invokeListener(i,this,r);t.set(l.type,Date.now()),l&&(a=e._eventsSpanMap.get(l)),s&&e.removePatchedListener(this,n,i);let c=e._createSpan(l,a);return c?(l&&e._eventsSpanMap.set(l,c),um.with(uO.setSpan(um.active(),c),()=>{let t=e._invokeListener(i,this,r);return c.end(),t})):e._invokeListener(i,this,r)};if(e.addPatchedListener(this,n,i,a))return r.call(this,n,a,o)}}_patchRemoveEventListener(){let e=this;return t=>function(r,n,i){let o=e.removePatchedListener(this,r,n);return o?t.call(this,r,o,i):t.call(this,r,n,i)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){let e=this;return t=>function(...r){let n=`${location.pathname}${location.hash}${location.search}`,i=t.apply(this,r),o=`${location.pathname}${location.hash}${location.search}`;return n!==o&&e._updateInteractionName(o),i}}_unpatchHistoryApi(){dL(history.replaceState)&&this._unwrap(history,"replaceState"),dL(history.pushState)&&this._unwrap(history,"pushState"),dL(history.back)&&this._unwrap(history,"back"),dL(history.forward)&&this._unwrap(history,"forward"),dL(history.go)&&this._unwrap(history,"go")}_updateInteractionName(e){let t=uO.getSpan(um.active());t&&"function"==typeof t.updateName&&t.updateName(`Navigation: ${e}`)}_patchZoneCancelTask(){let e=this;return t=>function(r){let n=Zone.current,i=e._getCurrentSpan(n);return i&&e._shouldCountTask(r,n)&&e._decrementTask(i),t.call(this,r)}}_patchZoneScheduleTask(){let e=this;return t=>function(r){let n=Zone.current,i=e._getCurrentSpan(n);return i&&e._shouldCountTask(r,n)&&(e._incrementTask(i),e._checkForTimeout(r,i)),t.call(this,r)}}_patchZoneRunTask(){let e=this;return t=>function(r,n,i){let o,s=Array.isArray(i)&&i[0]instanceof Event?i[0]:void 0;if(s?.target){if(o=e._createSpan(s))return e._incrementTask(o),this.run(()=>{try{return um.with(uO.setSpan(um.active(),o),()=>{let e=Zone.current;return r._zone=e,t.call(e,r,n,i)})}finally{e._decrementTask(o)}})}else o=e._getCurrentSpan(this);try{return t.call(this,r,n,i)}finally{o&&e._shouldCountTask(r,this)&&e._decrementTask(o)}}}_shouldCountTask(e,t){if(e._zone&&(t=e._zone),!t||!e.data||e.data.isPeriodic)return!1;let r=this._getCurrentSpan(t);return!!r&&!!this._spansData.get(r)&&("macroTask"===e.type||"microTask"===e.type)}_tryToEndSpan(e,t){e&&this._spansData.get(e)&&(e.end(t),this._spansData.delete(e))}enable(){let t=this._getZoneWithPrototype();this._diag.debug("applying patch to",e.moduleName,e.version,"zone:",!!t),t?(dL(t.prototype.runTask)&&(this._unwrap(t.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),dL(t.prototype.scheduleTask)&&(this._unwrap(t.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),dL(t.prototype.cancelTask)&&(this._unwrap(t.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(t.prototype,"runTask",this._patchZoneRunTask()),this._wrap(t.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(t.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(e=>{dL(e.addEventListener)&&(this._unwrap(e,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),dL(e.removeEventListener)&&(this._unwrap(e,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(e,"addEventListener",this._patchAddEventListener()),this._wrap(e,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){let t=this._getZoneWithPrototype();this._diag.debug("removing patch from",e.moduleName,e.version,"zone:",!!t),t&&this._zonePatched?(dL(t.prototype.runTask)&&this._unwrap(t.prototype,"runTask"),dL(t.prototype.scheduleTask)&&this._unwrap(t.prototype,"scheduleTask"),dL(t.prototype.cancelTask)&&this._unwrap(t.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(e=>{dL(e.addEventListener)&&this._unwrap(e,"addEventListener"),dL(e.removeEventListener)&&this._unwrap(e,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};ly(b1,"version","0.1.1"),ly(b1,"moduleName","user-interaction");let b2={},b5,b3="highlight.record",b9="launchdarkly.js.log",b4="launchdarkly.sampling.ratio",b6="log.severity",b7="log.message";class b8 extends h3{onStart(e,t){e.setAttribute("highlight.session_id",aj()),super.onStart(e,t)}onEnd(e){!1!==e.attributes[b3]&&super.onEnd(e)}}class ve extends u6{constructor(e){super(),ly(this,"highlightEndpoints"),ly(this,"tracingOrigins"),ly(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,t,r){var n;let i=uO.getSpan(e);if(!i||!i.attributes)return;let o=vm(i);("string"!=typeof o||(vc(o,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||i.setAttribute(b3,!1),((e,t,r)=>{var n;if(r.some(t=>e.toLowerCase().includes(t)))return!1;let i=[];!0===t?(i=["localhost",/^\//],null!=(n=window?.location)&&n.host&&i.push(window.location.host)):t instanceof Array&&(i=t);let o=!1;return i.forEach(t=>{e.match(t)&&(o=!0)}),o})(o,null!=(n=this.tracingOrigins)?n:[],this.urlBlocklist)))&&super.inject(e,t,r)}}let vt="highlight-browser",vr=()=>{var e;return null==(e=b2.tracerProvider)?void 0:e.getTracer(vt)},vn=()=>{var e;return null==(e=b2.meterProvider)?void 0:e.getMeter(vt)},vi=(e,t,r,n)=>{var i;if(!e.attributes)return;let o=fP(vm(e)),s=fW(o),a="string"==typeof t?t:String(t);try{let r=t?JSON.parse(a):void 0;null!=r&&r.operationName&&e.setAttribute("graphql.operation.name",r.operationName)}catch{}e.setAttributes({"highlight.type":"http.request",[pG]:o,[aS]:o,[a_]:s.pathname,"url.query":s.search});let l=Array.from(s.searchParams.entries());if(l.length>0&&e.setAttribute("url.query_params",JSON.stringify(Object.fromEntries(l))),null!=n&&n.recordHeadersAndBody){let o=fF(t,n.networkBodyKeysToRedact,n.bodyKeysToRecord,r);e.setAttribute("http.request.body",o);let s=vo(fZ(null!=(i=n.networkHeadersToRedact)?i:[],r,n.headerKeysToRecord),"http.request.header");e.setAttributes(s)}},vo=(e,t)=>{let r={};return Object.entries(e).forEach(([e,n])=>{let i=e.toLowerCase().replace(/_/g,"-"),o=`${t}.${i}`,s=va(i,n);if(r[o]){let e=r[o];Array.isArray(e)?r[o]=[...e,...s]:r[o]=[e,...s]}else r[o]=1===s.length?s[0]:s}),r},vs=new Set(["accept","accept-charset","accept-encoding","accept-language","accept-ranges","allow","cache-control","connection","content-encoding","content-language","expect","if-match","if-none-match","pragma","proxy-authenticate","te","trailer","transfer-encoding","upgrade","vary","via","warning","www-authenticate","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-request-headers"]),va=(e,t)=>vs.has(e)?t.split(",").map(e=>e.trim()).filter(e=>e.length>0):[t],vl=(e,t,r,n)=>{var i;e.setAttribute("http.response.body",r);let o=vo(fZ(null!=(i=n.networkHeadersToRedact)?i:[],t,n.headerKeysToRecord),"http.response.header");e.setAttributes(o)},vc=(e,t,r,n)=>!(null!=n&&n.some(t=>e.toLowerCase().includes(t)))&&((e,t,r)=>!t.some(t=>e.toLocaleLowerCase().includes(t))&&!(e.includes("/sdk/evalx")&&e.match(fj)||e.includes("/eval/")&&e.match(fX))&&!["events.ld.catamorphic.com","events.launchdarkly.com"].some(t=>e.toLocaleLowerCase().includes(t)))(e,t),vu=e=>{var t,r,n;if(!e.events)return;let i=e.events,o={unload:vd("unloadEventStart","unloadEventEnd",i),dom_interactive:vd("fetchStart","domInteractive",i),dom_content_loaded:vd("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:vd("fetchStart","domComplete",i),load_event:vd("loadEventStart","loadEventEnd",i),document_load:vd("fetchStart","loadEventEnd",i),first_paint:vd("fetchStart","firstPaint",i),first_contentful_paint:vd("fetchStart","firstContentfulPaint",i),domain_lookup:vd("domainLookupStart","domainLookupEnd",i),connect:vd("connectStart","connectEnd",i),request:vd("requestStart","requestEnd",i),response:vd("responseStart","responseEnd",i)},s=null!=(r=null==(t=b5?.getIntegrations)?void 0:t.call(b5))?r:[];if(void 0!==o.document_load)for(let e of s)e.recordGauge(null!=(n=b5?.sessionSecureId)?n:"",{name:"document_load",value:o.document_load/1e6});Object.entries(o).forEach(([t,r])=>{void 0!==r&&(e.setAttribute(`timings.${t}.ns`,r),e.setAttribute(`timings.${t}.readable`,vp(r)))})};function vd(e,t,r){let n=r.find(t=>t.name===e),i=r.find(e=>e.name===t);if(!n||!i)return;let o=1e9*n.time[0]+n.time[1];return 1e9*i.time[0]+i.time[1]-o}let vh=(e,t)=>{Object.entries({domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e9,connect:(t.connectEnd-t.connectStart)*1e9,request:(t.responseEnd-t.requestStart)*1e9,response:(t.responseEnd-t.responseStart)*1e9}).forEach(([t,r])=>{e.setAttribute(`timings.${t}.ns`,r),e.setAttribute(`timings.${t}.readable`,vp(r))})},vp=e=>{if(e>=36e11){let t=e/36e11;return`${Number(t.toFixed(1))}h`}if(e>=6e10){let t=e/6e10;return`${Number(t.toFixed(1))}m`}if(e>=1e9){let t=e/1e9;return`${Number(t.toFixed(1))}s`}if(e>=1e6){let t=e/1e6;return`${Number(t.toFixed(1))}ms`}{if(!(e>=1e3))return`${Number(e.toFixed(1))}ns`;let t=e/1e3;return`${Number(t.toFixed(1))}\xb5s`}},vf=e=>!0===e?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(e)?e.map(e=>"string"==typeof e?new RegExp(e):e):/^$/,vm=e=>e.attributes[aS]?e.attributes[aS]:e.attributes[pG],vg=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(r=>e(r-t)))),vb="u">typeof window&&"performance"in window&&"memory"in performance?performance:{memory:{}};var vv,vy,vw,vx,vk,vS,v_,vC,vT=-1,vI=function(e){addEventListener("pageshow",function(t){t.persisted&&(vT=t.timeStamp,e(t))},!0)},vE=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},vR=function(){var e=vE();return e&&e.activationStart||0},vO=function(e,t){var r=vE(),n="navigate";return vT>=0?n="back-forward-cache":r&&(document.prerendering||vR()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(0x82f79cd8fff*Math.random())+1e12),navigationType:n}},vL=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch{}},vA=function(e,t,r,n){var i,o;return function(s){var a;t.value>=0&&(s||n)&&((o=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=o,a=t.value,t.rating=a>r[1]?"poor":a>r[0]?"needs-improvement":"good",e(t))}},vN=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},vZ=function(e){var t=function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},vM=function(e){var t=!1;return function(r){t||(e(r),t=!0)}},vG=-1,vV=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},vW=function(e){"hidden"===document.visibilityState&&vG>-1&&(vG="visibilitychange"===e.type?e.timeStamp:0,vj())},vP=function(){addEventListener("visibilitychange",vW,!0),addEventListener("prerenderingchange",vW,!0)},vj=function(){removeEventListener("visibilitychange",vW,!0),removeEventListener("prerenderingchange",vW,!0)},vX=function(){return vG<0&&(vG=vV(),vP(),vI(function(){setTimeout(function(){vG=vV(),vP()},0)})),{get firstHiddenTime(){return vG}}},vD=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},vF=[1800,3e3],vz=function(e,t){t=t||{},vD(function(){var r,n=vX(),i=vO("FCP"),o=vL("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-vR(),0),i.entries.push(e),r(!0)))})});o&&(r=vA(e,i,vF,t.reportAllChanges),vI(function(n){r=vA(e,i=vO("FCP"),vF,t.reportAllChanges),vN(function(){i.value=performance.now()-n.timeStamp,r(!0)})}))})},vB=[.1,.25],vU=function(e,t){t=t||{},vz(vM(function(){var r,n=vO("CLS",0),i=0,o=[],s=function(e){e.forEach(function(e){if(!e.hadRecentInput){var t=o[0],r=o[o.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}}),i>n.value&&(n.value=i,n.entries=o,r())},a=vL("layout-shift",s);a&&(r=vA(e,n,vB,t.reportAllChanges),vZ(function(){s(a.takeRecords()),r(!0)}),vI(function(){i=0,r=vA(e,n=vO("CLS",0),vB,t.reportAllChanges),vN(function(){return r()})}),setTimeout(r,0))}))},vH={passive:!0,capture:!0},vY=new Date,vK=function(e,t){vx||(vx=t,vk=e,vS=new Date,vq(removeEventListener),vJ())},vJ=function(){if(vk>=0&&vk<vS-vY){var e={entryType:"first-input",name:vx.type,target:vx.target,cancelable:vx.cancelable,startTime:vx.timeStamp,processingStart:vx.timeStamp+vk};v_.forEach(function(t){t(e)}),v_=[]}},vQ=function(e){if(e.cancelable){var t,r,n,i=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(t=function(){vK(i,e),n()},r=function(){n()},n=function(){removeEventListener("pointerup",t,vH),removeEventListener("pointercancel",r,vH)},addEventListener("pointerup",t,vH),addEventListener("pointercancel",r,vH)):vK(i,e)}},vq=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,vQ,vH)})},v$=[100,300],v0=function(e,t){t=t||{},vD(function(){var r,n=vX(),i=vO("FID"),o=function(e){e.startTime<n.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),r(!0))},s=function(e){e.forEach(o)},a=vL("first-input",s);r=vA(e,i,v$,t.reportAllChanges),a&&vZ(vM(function(){s(a.takeRecords()),a.disconnect()})),a&&vI(function(){r=vA(e,i=vO("FID"),v$,t.reportAllChanges),v_=[],vk=-1,vx=null,vq(addEventListener),v_.push(o),vJ()})})},v1=0,v2=1/0,v5=0,v3=function(e){e.forEach(function(e){e.interactionId&&(v2=Math.min(v2,e.interactionId),v1=(v5=Math.max(v5,e.interactionId))?(v5-v2)/7+1:0)})},v9=function(){return vC?v1:performance.interactionCount||0},v4=function(){"interactionCount"in performance||vC||(vC=vL("event",v3,{type:"event",buffered:!0,durationThreshold:0}))},v6=[200,500],v7=0,v8=function(){return v9()-v7},ye=[],yt={},yr=function(e){var t=ye[ye.length-1],r=yt[e.interactionId];if(r||ye.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};yt[n.id]=n,ye.push(n)}ye.sort(function(e,t){return t.latency-e.latency}),ye.splice(10).forEach(function(e){delete yt[e.id]})}},yn=function(e,t){t=t||{},vD(function(){v4();var r,n,i=vO("INP"),o=function(e){e.forEach(function(e){e.interactionId&&yr(e),"first-input"!==e.entryType||ye.some(function(t){return t.entries.some(function(t){return e.duration===t.duration&&e.startTime===t.startTime})})||yr(e)});var t,r=(t=Math.min(ye.length-1,Math.floor(v8()/50)),ye[t]);r&&r.latency!==i.value&&(i.value=r.latency,i.entries=r.entries,n())},s=vL("event",o,{durationThreshold:null!=(r=t.durationThreshold)?r:40});n=vA(e,i,v6,t.reportAllChanges),s&&("interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),vZ(function(){o(s.takeRecords()),i.value<0&&v8()>0&&(i.value=0,i.entries=[]),n(!0)}),vI(function(){ye=[],v7=v9(),n=vA(e,i=vO("INP"),v6,t.reportAllChanges)}))})},yi=[2500,4e3],yo={},ys=function(e,t){t=t||{},vD(function(){var r,n=vX(),i=vO("LCP"),o=function(e){var t=e[e.length-1];t&&t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-vR(),0),i.entries=[t],r())},s=vL("largest-contentful-paint",o);if(s){r=vA(e,i,yi,t.reportAllChanges);var a=vM(function(){yo[i.id]||(o(s.takeRecords()),s.disconnect(),yo[i.id]=!0,r(!0))});["keydown","click"].forEach(function(e){addEventListener(e,function(){return setTimeout(a,0)},!0)}),vZ(a),vI(function(n){r=vA(e,i=vO("LCP"),yi,t.reportAllChanges),vN(function(){i.value=performance.now()-n.timeStamp,yo[i.id]=!0,r(!0)})})}})},ya=[800,1800],yl=function e(t){document.prerendering?vD(function(){return e(t)}):"complete"!==document.readyState?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},yc=function(e,t){t=t||{};var r=vO("TTFB"),n=vA(e,r,ya,t.reportAllChanges);yl(function(){var i=vE();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-vR(),0),r.entries=[i],n(!0),vI(function(){(n=vA(e,r=vO("TTFB",0),ya,t.reportAllChanges))(!0)})}})};let yu="u">typeof navigator&&"connection"in navigator?navigator.connection:{};function yd(e){let t=Math.trunc(e);return 1===t||0!==t&&0===Math.floor(Math.random()*t)}class yh{constructor(e=yd){ly(this,"regexCache",new Map),ly(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,t,r,n;return!!(null!=(t=null==(e=this.config)?void 0:e.logs)&&t.length||null!=(n=null==(r=this.config)?void 0:r.spans)&&n.length)}shouldSample(e){var t,r;return e.name===b9?this.sampleLog(null==(t=this.config)?void 0:t.logs,e):this.sampleSpan(null==(r=this.config)?void 0:r.spans,e)}matchesValue(e,t){if(!e)return!1;if("matchValue"in e)return e.matchValue===t;if("regexValue"in e){let r=e.regexValue;if(null===r)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));let n=this.regexCache.get(r);if("string"==typeof t)return n.test(t)}return!1}matchesAttributes(e,t){if(e)for(let r of e){let e=!1;for(let n of Object.keys(t))if(this.matchesValue(r.key,n)){let i=t[n];if(this.matchesValue(r.attribute,i)){e=!0;break}}if(!e)return!1}return!0}matchEvent(e,t){return!(e.name&&!this.matchesValue(e.name,t.name)||e.attributes&&(!t.attributes||!this.matchesAttributes(e.attributes,t.attributes)))}matchesEvents(e,t){if(e)for(let r of e){let e=!1;for(let n of t)if(this.matchEvent(r,n)){e=!0;break}if(!e)return!1}return!0}matchesSpanConfig(e,t){return!(e.name&&!this.matchesValue(e.name,t.name)||!this.matchesAttributes(e.attributes,t.attributes)||!this.matchesEvents(e.events,t.events))}matchesLogConfig(e,t){if(e.severityText){let r=t[b6];if(!this.matchesValue(e.severityText,r))return!1}if(e.message){let r=t[b7];if(!this.matchesValue(e.message,r))return!1}return!!this.matchesAttributes(e.attributes,t)}sampleSpan(e,t){if(e){for(let r of e)if(this.matchesSpanConfig(r,t))return{sample:this.sampler(r.samplingRatio),attributes:{[b4]:r.samplingRatio}}}return{sample:!0}}sampleLog(e,t){if(e){for(let r of e)if(this.matchesLogConfig(r,t.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[b4]:r.samplingRatio}}}return{sample:!0}}}let yp=()=>{let e={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(t,r)=>e,setAttributes:t=>e,addEvent:(t,r,n)=>e,addLinks:t=>e,setStatus:t=>e,recordException:()=>{},addLink:()=>e,updateName:()=>e,isRecording:()=>!1};return e},yf=function(e,t,r){if(!e)return;let n=lb({},r);"string"==typeof t?n[ax]=t:t&&(t.code?n[ak]=t.code.toString():t.name&&(n[ak]=t.name),t.message&&(n[ax]=t.message),t.stack&&(n["exception.stacktrace"]=t.stack)),n[ak]||n[ax]?e.addEvent("exception",n):oK("otel","recordException","warn",`Failed to record an exception ${t}`)};class ym{constructor(e){ly(this,"organizationID"),ly(this,"_options"),ly(this,"_integrations",[]),ly(this,"_gauges",new Map),ly(this,"_counters",new Map),ly(this,"_histograms",new Map),ly(this,"_up_down_counters",new Map),ly(this,"sampler",new yh),ly(this,"_started",!1),ly(this,"graphqlSDK"),this._options=e,this.organizationID=e.projectId}start(){return lw(this,null,function*(){var e,t,r,n,i,o,s,a,l,c,u,d,h,p,f,m,g;let b;if(this._started)return;this._started=!0,((e,t)=>{var r,n,i,o,s,a,l,c,u,d,h,p,f,m,g;if(b2.tracerProvider||b2.meterProvider)return console.warn("OTEL already initialized. Skipping...");b5=e;let b=e.backendUrl||"https://pub.highlight.io",v=[...null!=(n=null==(r=e.networkRecordingOptions)?void 0:r.urlBlocklist)?n:[],...fG],y=null!=(i=e.environment)?i:"production",w={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},x=new b8(new bQ(w,t),{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:w.timeoutMillis,scheduledDelayMillis:w.timeoutMillis}),k=new pu({"service.name":null!=(o=e.serviceName)?o:"highlight-browser","service.version":e.serviceVersion,"deployment.environment.name":y,"highlight.project_id":e.projectId,"user_agent.original":navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":"9.26.0"});b2.tracerProvider=new p_({resource:k,mergeResourceWithDefaults:!0,spanProcessors:[x]}),uO.setGlobalTracerProvider(b2.tracerProvider),b2.meterProvider=new bf({resource:k,readers:[new gw({exporter:new bq(lv(lb({},w),{url:e.otlpEndpoint+"/v1/metrics"})),exportIntervalMillis:w.timeoutMillis,exportTimeoutMillis:w.timeoutMillis})]}),uy.setGlobalMeterProvider(b2.meterProvider);let S=[];(null==(s=e.instrumentations)?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&S.push(new pX({applyCustomAttributesOnSpan:{documentLoad:vu,documentFetch:vu,resourceFetch:vh}})),(null==(a=e.instrumentations)?void 0:a["@opentelemetry/instrumentation-user-interaction"])!==!1&&S.push(new b1({eventNames:e.eventNames})),null!=(l=e.networkRecordingOptions)&&l.enabled&&((null==(c=e.instrumentations)?void 0:c["@opentelemetry/instrumentation-fetch"])!==!1&&S.push(new fp({propagateTraceHeaderCorsUrls:vf(e.tracingOrigins),applyCustomAttributesOnSpan:(t,r,n)=>lw(void 0,null,function*(){var i,o,s;if(!(!t.attributes||!1===t.attributes[b3])){if(vi(t,r.body,r.headers,e.networkRecordingOptions),!(n instanceof Response))return void t.setAttributes({"http.response.error":n.message,"http.response.status_code":n.status});if(null!=(i=e.networkRecordingOptions)&&i.recordHeadersAndBody){let r,i,a=yield(r=null==(o=e.networkRecordingOptions)?void 0:o.bodyKeysToRecord,i=null==(s=e.networkRecordingOptions)?void 0:s.networkBodyKeysToRedact,lw(void 0,null,function*(){let e;try{let t=n.clone().body;if(t){let o=t.getReader(),s=new TextDecoder,a,l="";for(;!(a=yield o.read()).done;){let e=a.value;l+=s.decode(e)}e=l,e=fF(e,i,r,n.headers)}else e=""}catch(t){e=`Unable to clone response: ${t}`}return e}));vl(t,Object.fromEntries(n.headers.entries()),a,e.networkRecordingOptions)}}})})),(null==(u=e.instrumentations)?void 0:u["@opentelemetry/instrumentation-xml-http-request"])!==!1&&S.push(new fN({propagateTraceHeaderCorsUrls:vf(e.tracingOrigins),applyCustomAttributesOnSpan:(t,r)=>{var n,i,o,s;if(!(!t.attributes||!1===t.attributes[b3])&&(vi(t,r._body,r._requestHeaders,e.networkRecordingOptions),null!=(n=e.networkRecordingOptions)&&n.recordHeadersAndBody)){let n,a="";(""===r.responseType||"text"===r.responseType)&&(a=fF(r.responseText,null==(i=e.networkRecordingOptions)?void 0:i.networkBodyKeysToRedact,null==(o=e.networkRecordingOptions)?void 0:o.bodyKeysToRecord,void 0)),vl(t,(s=r.getAllResponseHeaders(),n={},s&&s.trim().split(/[\r\n]+/).forEach(e=>{let t=e.split(": "),r=t.shift();r&&(n[r]=t.join(": "))}),n),a,e.networkRecordingOptions)}}}))),f=(d={instrumentations:S}).tracerProvider||uO.getTracerProvider(),m=d.meterProvider||uy.getMeterProvider(),g=d.loggerProvider||dw.getLoggerProvider(),function(e,t,r,n){for(var i=0,o=e.length;i<o;i++){var s=e[i];t&&s.setTracerProvider(t),r&&s.setMeterProvider(r),n&&s.setLoggerProvider&&s.setLoggerProvider(n),s.getConfig().enabled||s.enable()}}(null!=(p=null==(h=d.instrumentations)?void 0:h.flat())?p:[],f,m,g);let _=new pk;return _.enable(),b2.tracerProvider.register({contextManager:_,propagator:new uq({propagators:[new uX,new ve({backendUrl:b,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:v})]})})})({backendUrl:null!=(t=null==(e=this._options)?void 0:e.backendUrl)?t:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:null!=(i=null==(n=null==(r=this._options)?void 0:r.otel)?void 0:n.otlpEndpoint)?i:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:null!=(s=null==(o=this._options)?void 0:o.environment)?s:"production",networkRecordingOptions:"object"==typeof(null==(a=this._options)?void 0:a.networkRecording)?this._options.networkRecording:void 0,tracingOrigins:null==(l=this._options)?void 0:l.tracingOrigins,serviceName:null!=(u=null==(c=this._options)?void 0:c.serviceName)?u:"browser",serviceVersion:null==(d=this._options)?void 0:d.version,instrumentations:null==(p=null==(h=this._options)?void 0:h.otel)?void 0:p.instrumentations,eventNames:null==(m=null==(f=this._options)?void 0:f.otel)?void 0:m.eventNames,getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();let v=new s2(null!=(g=this._options.backendUrl)?g:"https://pub.observability.app.launchdarkly.com",{headers:{}});this.graphqlSDK=function(e,t=(e,t,r,n)=>e()){return{PushPayload:(r,n)=>t(t=>e.request(au,r,o4(o4({},n),t)),"PushPayload","mutation",r),PushSessionEvents:(r,n)=>t(t=>e.request(ad,r,o4(o4({},n),t)),"PushSessionEvents","mutation",r),identifySession:(r,n)=>t(t=>e.request(ah,r,o4(o4({},n),t)),"identifySession","mutation",r),addSessionProperties:(r,n)=>t(t=>e.request(ap,r,o4(o4({},n),t)),"addSessionProperties","mutation",r),pushMetrics:(r,n)=>t(t=>e.request(af,r,o4(o4({},n),t)),"pushMetrics","mutation",r),addSessionFeedback:(r,n)=>t(t=>e.request(am,r,o4(o4({},n),t)),"addSessionFeedback","mutation",r),initializeSession:(r,n)=>t(t=>e.request(ag,r,o4(o4({},n),t)),"initializeSession","mutation",r),Ignore:(r,n)=>t(t=>e.request(ab,r,o4(o4({},n),t)),"Ignore","query",r),GetSamplingConfig:(r,n)=>t(t=>e.request(av,r,o4(o4({},n),t)),"GetSamplingConfig","query",r)}}(v,b=(e,t,r,n,i=0)=>o8(void 0,null,function*(){try{return yield e()}catch(s){var o;if(s instanceof sH&&(null==(o=s.response.errors)?void 0:o.find(e=>aU.includes(e.message)))!==void 0)throw s;if(i<3)return yield new Promise(e=>setTimeout(e,1e3+500*Math.pow(2,i))),yield b(e,t,r,n,i+1);throw console.error(`highlight.io: data request failed after ${i} retries`),s}})),yield this.configureSampling(),this.setupListeners()})}stop(){return lw(this,null,function*(){this._started&&(this._started=!1,yield lw(void 0,null,function*(){yield Promise.allSettled([lw(void 0,null,function*(){b2.tracerProvider?(yield b2.tracerProvider.shutdown(),b2.tracerProvider=void 0):console.warn("OTEL shutdown called without initialized tracerProvider.")}),lw(void 0,null,function*(){b2.meterProvider?(yield b2.meterProvider.shutdown(),b2.meterProvider=void 0):console.warn("OTEL shutdown called without initialized meterProvider.")})])}))})}configureSampling(){return lw(this,null,function*(){try{let e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){oY("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}_recordLog(e,t,r,n){this.startSpan(b9,i=>{let o="string"==typeof e?e:ae(e),s=n?ae(n.map(e=>e.toString())):void 0;if(i?.addEvent("log",lb({[b6]:t,[b7]:o,"code.stacktrace":s},r)),this._options.reportConsoleErrors&&"error"===t){i?.recordException(Error(o)),i?.setStatus({code:uV.ERROR,message:o});let e=Error(o);n&&(e.stack=s),this.recordError(e)}})}_recordErrorMessage(e,t){try{e.payload&&(t=lb(lb({},JSON.parse(e.payload)),t||{}))}catch{}this.startSpan("highlight.exception",r=>{var n;yf(r,null!=(n=e.error)?n:Error(e.event),{"launchdarkly.exception.id":e.id}),r?.setAttributes(lb({event:e.event,type:e.type,url:e.url,source:e.source,lineNumber:e.lineNumber,columnNumber:e.columnNumber},t))});let r=((e,t)=>{var r={};for(var n in e)lf.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&lp)for(var n of lp(e))0>t.indexOf(n)&&lm.call(e,n)&&(r[n]=e[n]);return r})(e,["payload"]);for(let e of this._integrations)e.error(aj(),lv(lb({},r),{payload:JSON.stringify(t)}))}recordError(e,t,r,n,i){var o,s,a,l;(e=e||Error("Unknown error"))instanceof Error&&e.cause&&(r=lv(lb({},r),{"exception.cause":JSON.stringify(e.cause)}));let c=t?t+":"+e.message:e.message;"React.ErrorBoundary"===i&&(c="ErrorBoundary: "+c);let u=lF(e),d={error:e,event:c,type:i??"custom",url:window.location.href,source:n??"frontend",lineNumber:null!=(o=u[0])&&o.lineNumber?null==(s=u[0])?void 0:s.lineNumber:0,columnNumber:null!=(a=u[0])&&a.columnNumber?null==(l=u[0])?void 0:l.columnNumber:0,stackTrace:u,timestamp:new Date().toISOString(),id:lQ()};this._recordErrorMessage(d,r)}recordCount(e){var t;let r=this._counters.get(e.name);if(!r){if(!(r=null==(t=vn())?void 0:t.createCounter(e.name)))return;this._counters.set(e.name,r)}r.add(e.value,lv(lb({},e.attributes),{"highlight.session_id":aj()}))}recordGauge(e){var t,r,n,i;let o=this._gauges.get(e.name);if(!o){if(!(o=null==(t=vn())?void 0:t.createGauge(e.name)))return;this._gauges.set(e.name,o)}o.record(e.value,lv(lb({},e.attributes),{"highlight.session_id":aj()}));let s={name:e.name,value:e.value,category:null==(r=e.attributes)?void 0:r.category,group:null==(i=null==(n=e.attributes)?void 0:n.group)?void 0:i.toString(),tags:e.attributes?Object.entries(e.attributes).map(([e,t])=>{var r;return{name:e??"",value:null!=(r=t?.toString())?r:""}}):[]};for(let e of this._integrations)e.recordGauge(aj(),s)}recordIncr(e){this.recordCount(lv(lb({},e),{value:1}))}recordHistogram(e){var t;let r=this._histograms.get(e.name);if(!r){if(!(r=null==(t=vn())?void 0:t.createHistogram(e.name)))return;this._histograms.set(e.name,r)}r.record(e.value,lv(lb({},e.attributes),{"highlight.session_id":aj()}))}recordUpDownCounter(e){var t;let r=this._up_down_counters.get(e.name);if(!r){if(!(r=null==(t=vn())?void 0:t.createUpDownCounter(e.name)))return;this._up_down_counters.set(e.name,r)}r.add(e.value,lv(lb({},e.attributes),{"highlight.session_id":aj()}))}startSpan(e,t,r,n){let i=vr();if(!i){let e=yp();return void 0===n&&void 0===r?t(e):void 0===n?r(e):n(e)}let o=(e,t)=>{let r=t(e);return r instanceof Promise?r.finally(()=>e.end()):(e.end(),r)};return void 0===n&&void 0===r?i.startActiveSpan(e,e=>o(e,t)):void 0===n?i.startActiveSpan(e,t,e=>o(e,r)):i.startActiveSpan(e,t,r,e=>o(e,n))}startManualSpan(e,t,r,n){let i=vr();if(!i){let e=yp();return void 0===n&&void 0===r?t(e):void 0===n?r(e):n(e)}return void 0===n&&void 0===r?i.startActiveSpan(e,t):void 0===n?i.startActiveSpan(e,t,r):i.startActiveSpan(e,t,r,n)}register(e,t){this._integrations.push(new lt(e,t))}getHooks(e){return this._integrations.flatMap(t=>{var r,n;return null!=(n=null==(r=t.getHooks)?void 0:r.call(t,e))?n:[]})}submitViewportMetrics({height:e,width:t,availHeight:r,availWidth:n}){this.recordGauge({name:lW.ViewportHeight,value:e,attributes:{category:lP.Device,group:window.location.href}}),this.recordGauge({name:lW.ViewportWidth,value:t,attributes:{category:lP.Device,group:window.location.href}}),this.recordGauge({name:lW.ScreenHeight,value:r,attributes:{category:lP.Device,group:window.location.href}}),this.recordGauge({name:lW.ScreenWidth,value:n,attributes:{category:lP.Device,group:window.location.href}}),this.recordGauge({name:lW.ViewportArea,value:e*t,attributes:{category:lP.Device,group:window.location.href}})}setupListeners(){var e,t,r,n,i,o;let s,a,l,c,u,d,h,p,f,m,g,b,v,y,w;this._options.disableConsoleRecording||function(e,t){let r,n=t.logger;r=window[n];let i=[];if(t.level.includes("error")&&window){let r=r=>{let{message:n,error:i}=r,o=[];i&&(o=lF(i));let s=[aw(n,t.stringifyOptions)];e({type:"Error",trace:o,time:Date.now(),value:s})};window.addEventListener("error",r),i.push(()=>{window&&window.removeEventListener("error",r)})}for(let n of t.level)i.push(function(r,n){return r[n]?function(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}}(r,n,r=>(...i)=>{r.apply(this,i);try{e(function(e,t,...r){let n=lF(Error());return{type:e,trace:n,value:t.serializeConsoleAttributes?r.map(e=>"object"==typeof e?aw(e,t.stringifyOptions):e):r.filter(e=>"object"!=typeof e).map(e=>`${e}`),attributes:aw(r.filter(e=>"object"==typeof e).reduce((e,t)=>lb(lb({},e),t),{}),t.stringifyOptions),time:Date.now()}}(n,t,...i))}catch(e){r("highlight logger error:",e,...i)}}):()=>{}}(r,n))}(e=>{var t;this._recordLog(null==(t=e.value)?void 0:t.join(" "),e.type,e.attributes?JSON.parse(e.attributes):{},e.trace)},{level:null!=(e=this._options.consoleMethodsToRecord)?e:[...lx],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),!1!==this._options.enablePerformanceRecording&&(t=e=>{Object.entries(e).filter(([e])=>"relativeTimestamp"!==e).forEach(([e,t])=>t&&this.recordGauge({name:e,value:t,attributes:{category:lP.Performance,group:window.location.href}}))},s=0,(a=()=>{let e=(new Date().getTime()-0)/1e3;t({jsHeapSizeLimit:vb.memory.jsHeapSizeLimit||0,usedJSHeapSize:vb.memory.usedJSHeapSize||0,relativeTimestamp:e,fps:s})})(),setInterval(()=>{a()},1e3),l=0,c=Date.now(),(u=function(){var e=Date.now();l++,e>1e3+c&&(s=Math.round(1e3*l/(e-c)),l=0,c=e),requestAnimationFrame(u)})(),r=e=>{this.recordGauge({name:"Jank",value:e.jankAmount,attributes:{category:lP.WebVital,group:e.querySelector}})},d={},h=16.666666666666668,lw(void 0,null,function*(){let e=[];for(let t=0;t<30;t++)e.push((yield vg()));return e.reduce((e,t)=>e+t,0)/e.length}).then(e=>h=e),p=e=>{var t;null!=d&&d.event||(d={event:e,location:window.location.href,timerStart:null==(t=window.performance)?void 0:t.now()},window.requestAnimationFrame(f))},f=()=>{null!=d&&d.timerStart&&(m(window.performance.now()-d.timerStart-h),d={})},m=e=>{r({relativeTimestamp:(new Date().getTime()-0)/1e3,jankAmount:e,querySelector:g(),newLocation:window.location.href!=d.location?window.location.href:void 0})},g=()=>{var e;return null!=(e=d?.event)&&e.target?function(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(let r of e.classList)t.push(`.${r}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}(d.event.target):""},window.addEventListener("click",p,!0),window.addEventListener("keydown",p,!0)),((e,{enablePromisePatch:t})=>{if(typeof window>"u")return()=>{};let r=window.onerror=(t,r,n,i,o)=>{lq(e,t,r,o)},n=window.onunhandledrejection=t=>{if(t.reason){let r=t.promise;r.getStack?lq(e,t.reason,t.type,r.getStack()):lq(e,t.reason,t.type)}},i=window.Promise,o=class extends i{constructor(e){super(e),ly(this,"promiseCreationError"),this.promiseCreationError=Error()}getStack(){return this.promiseCreationError}static shouldPatch(){let e=typeof window.Zone>"u";return t&&e}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=n,window.onerror=r}})(e=>{var t;if(l0.includes(e.event)||l1.some(t=>e.event.includes(t)))return;let r=Error(e.event);r.stack=ae(e.stackTrace.map(e=>e.toString()));let n={};try{e.payload&&(n=JSON.parse(e.payload))}catch{}this._recordErrorMessage(lv(lb({},e),{error:null!=(t=e.error)?t:r}),n)},{enablePromisePatch:!!this._options.enablePromisePatch}),vU(b=e=>{let{name:t,value:r}=e,{hostname:n,pathname:i,href:o}=window.location;this.recordGauge({name:t,value:r,attributes:{group:window.location.pathname,category:lP.WebVital,[aS]:fP(o),[a_]:i,"server.address":n}})}),vz(b),v0(b),ys(b),yc(b),yn(b),n=e=>{this.submitViewportMetrics(e)},y=()=>{clearTimeout(v),v=setTimeout(()=>{var e,t;n({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:null!=(t=null==(e=window.screen.orientation)?void 0:e.angle)?t:0})},500)},window.addEventListener("resize",y),y(),i=e=>{let t={category:lP.Performance,group:window.location.href};void 0!==e.saveData&&(t.saveData=e.saveData.toString()),void 0!==e.effectiveType&&(t.effectiveType=e.effectiveType.toString()),void 0!==e.type&&(t.type=e.type.toString()),Object.entries(e).filter(([e])=>"relativeTimestamp"!==e).forEach(([e,r])=>{"number"==typeof r&&!isNaN(r)&&isFinite(r)&&this.recordGauge({name:e,value:r,attributes:t})})},o=new Date().getTime(),(w=()=>{i({relativeTimestamp:(new Date().getTime()-o)/1e3,downlink:yu.downlink,downlinkMax:yu.downlinkMax,effectiveType:yu.effectiveType,rtt:yu.rtt,saveData:yu.saveData,type:yu.type})})(),setInterval(()=>{w()},1e3);let{getDeviceDetails:x}=(()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};let e=window.performance;return{getDeviceDetails:()=>({deviceMemory:1024*(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>({jsHeapSizeLimit:e.memory.jsHeapSizeLimit/1e6,totalJSHeapSize:e.memory.totalJSHeapSize/1e6,usedJSHeapSize:e.memory.usedJSHeapSize/1e6})}})();x&&this.recordGauge({name:lW.DeviceMemory,value:x().deviceMemory,attributes:{category:lP.Device,group:window.location.href}})}recordLog(e,t,r){return this._recordLog(e,t,r)}}class yg extends la{constructor(e){super(e),ly(this,"observe"),ly(this,"options"),this.options=e}initialize(e,t){try{if(typeof window>"u"||typeof document>"u")return void console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");if(!e)return void console.warn("@launchdarkly/observability is not initializing because the SDK credential is undefined.");this.configureSession(e,t),this.observe=new ym(lv(lb({},t),{projectId:e,sessionSecureId:this.sessionSecureID})),null!=t&&t.manualStart||this.observe.start(),i.load(this.observe)}catch(e){oY("Error initializing @launchdarkly/observability SDK","error",e)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(e,t){var r;null==(r=this.observe)||r.register(e,t)}getHooks(e){var t,r,n,i;let o=lb(lb({"telemetry.sdk.name":e.sdk.name,"telemetry.sdk.version":e.sdk.version,[aK]:e.clientSideId,[a0]:"LaunchDarkly"},null!=(t=e.application)&&t.id?{[a5]:e.application.id}:{}),null!=(r=e.application)&&r.version?{[a3]:e.application.version}:{});return this.initialize(null!=(i=null!=(n=e.sdkKey)?n:e.mobileKey)?i:e.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(t,r,n)=>{var i,s,a,l,c,u,d,h;for(let o of null!=(a=null==(s=null==(i=this.observe)?void 0:i.getHooks)?void 0:s.call(i,e))?a:[])null==(l=o.afterIdentify)||l.call(o,t,r,n);if("completed"===n.status){let e=lv(lb({},a8(t.context)),{key:null!=(d=null==(u=null==(c=this.options)?void 0:c.contextFriendlyName)?void 0:u.call(c,t.context))?d:a7(t.context),timeout:t.timeout,canonicalKey:a7(t.context),"result.status":n.status});null==(h=this.observe)||h.recordLog("LD.identify","info",lb(lb({},o),e))}return r},afterEvaluation:(t,r,n)=>{var i,s,a,l,c;for(let o of null!=(a=null==(s=null==(i=this.observe)?void 0:i.getHooks)?void 0:s.call(i,e))?a:[])null==(l=o.afterEvaluation)||l.call(o,t,r,n);let u=lb({[aJ]:t.flagKey,[a$]:JSON.stringify(n.value)},n.variationIndex?{[a2]:n.variationIndex}:{});if(n.reason)for(let e in a1){let t=n.reason[e];t&&(u[a1[e]]=t)}t.context&&(u[aQ]=JSON.stringify(a8(t.context)),u[aq]=a7(t.context));let d=lb(lb({},o),u);return null==(c=this.observe)||c.startSpan("evaluation",e=>{e&&e.addEvent(aH,d)}),r},afterTrack:t=>{var r,n,i,s,a;for(let o of null!=(i=null==(n=null==(r=this.observe)?void 0:r.getHooks)?void 0:n.call(r,e))?i:[])null==(s=o.afterTrack)||s.call(o,t);null==(a=this.observe)||a.recordLog("LD.track","info",lb(lv(lb({},o),{key:t.key,value:t.metricValue}),"object"==typeof t.data?t.data:{}))}}]}}var yb=r("../../node_modules/.pnpm/@launchdarkly+session-replay@1.0.2/node_modules/@launchdarkly/session-replay/dist/index-Cxm-TAmp.js");let yv=["flag-sdk","flag-dev-server","events","settings"],yy=["flags","monitoring","interactive","settings"];function yw(e){return e?"dev-server":"sdk"}let yx=["top-left","top-right","bottom-left","bottom-right"],yk="ld-toolbar-settings",yS="ld-toolbar-starred-flags",y_="ld-toolbar-mcp-alert-dismissed",yC="ld-toolbar-analytics-consent-shown",yT="ld-toolbar-contexts",yI="ld-toolbar-active-context",yE=["cursor","windsurf","vscode","github-copilot"],yR="cursor";function yO(e,t){try{let r=localStorage.getItem(yk),n={};r&&(n=JSON.parse(r));let i={...n,[e]:t};localStorage.setItem(yk,JSON.stringify(i))}catch(t){console.warn(`Failed to save toolbar ${e} to localStorage:`,t)}}function yL(){try{let e=localStorage.getItem(yT);if(e){let t=JSON.parse(e);return Array.isArray(t)?t:[]}}catch(e){console.error("Error reading contexts from localStorage:",e)}return[]}function yA(e){try{let t=JSON.stringify(e);localStorage.setItem(yT,t)}catch(e){console.error("Error saving contexts to localStorage:",e)}}function yN(){try{let e=localStorage.getItem(yI);if(e){let t=JSON.parse(e);if(t&&"object"==typeof t&&t.kind)return t}}catch(e){console.error("Error reading active context from localStorage:",e)}return null}function yZ(e){try{if(e){let t=JSON.stringify(e);localStorage.setItem(yI,t)}else localStorage.removeItem(yI)}catch(e){console.error("Error saving active context to localStorage:",e)}}let yM=(0,L.createContext)(null),yG=()=>{let e=(0,L.useContext)(yM);if(!e)throw Error("useToolbarUIContext must be used within ToolbarUIProvider");return e},yV=({children:e,initialPosition:t})=>{let r=t&&yx.includes(t)?t:void 0,[n,i]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return null;let t=JSON.parse(e);if(!t.position)return null;return yx.includes(t.position)?t.position:null}catch(e){return console.warn("Failed to load toolbar position from localStorage:",e),null}})()||r||"bottom-right"),o=(0,L.useCallback)(e=>{i(e),yO("position",e)},[]),s=(0,L.useMemo)(()=>({position:n,handlePositionChange:o}),[n,o]);return(0,O.jsx)(yM.Provider,{value:s,children:e})};function yW(){let e;return"u">typeof window&&window.navigator&&(e=void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack),1===e||!0===e||"1"===e||"yes"===e}class yP{ldClient=null;mode=null;isOptedInToAnalytics=!1;searchDebounceTimer=null;constructor(e,t,r){this.ldClient=e||null,this.mode=t||null,this.isOptedInToAnalytics=r||!1}track(e,t){let r=`ld.toolbar.${e}`;if(!this.ldClient)return void console.debug("ToolbarAnalytics: LDClient not available, skipping track event:",r);if(yW()||!this.isOptedInToAnalytics)return;let n={...t,mode:this.mode};try{this.ldClient.track(r,n)}catch(e){console.error("ToolbarAnalytics: Failed to track event:",r,e)}}trackInitialization(){this.track("initialized",{})}trackPositionChange(e,t,r){this.track("position.changed",{oldPosition:e,newPosition:t,source:r})}trackAutoCollapseToggle(e){this.track("auto.collapse.toggled",{action:e})}trackTabChange(e,t){this.track("tab.changed",{fromTab:e,toTab:t})}trackSubtabChange(e,t){this.track("subtab.changed",{fromSubtab:e,toSubtab:t})}trackSearch(e){this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=setTimeout(()=>{e&&(this.track("search",{query:e}),this.searchDebounceTimer=null)},1e3)}trackToolbarToggle(e,t){this.track("toggle",{action:e,trigger:t})}trackFlagOverride(e,t,r){this.track("toggle.flag",{flagKey:e,value:"remove"===r?null:t,action:r})}trackStarredFlag(e,t){this.track("star.flag",{flagKey:e,action:t})}trackFilterChange(e,t){this.track("filter.changed",{filter:e,action:t})}trackOpenFlagDeeplink(e,t){this.track("open.flag.deeplink",{flagKey:e,baseUrl:t})}trackClearEvents(){this.track("clear.events",{})}trackEventClick(e){this.track("event.click",{eventName:e})}trackReloadOnFlagChangeToggle(e){this.track("reload.on.flag.change.toggle",{enabled:e})}trackLoginSuccess(){this.track("login.success",{})}trackLoginCancelled(){this.track("login.cancelled",{})}trackLogout(){this.track("logout",{})}trackAuthError(e){this.track("auth.error",{error:e instanceof Error?e.message:String(e)})}trackProjectSwitch(e,t){this.track("project.switched",{fromProject:e,toProject:t})}trackApiError(e){this.track("api.error",{error:e instanceof Error?e.message:String(e)})}trackRefresh(){this.track("refresh",{})}trackFeedback(e,t,r){if(this.track("feedback.submitted",{sentiment:t,comment:e}),r?.flagKey){if(!this.ldClient)return void console.debug("ToolbarAnalytics: LDClient not available, skipping feedback event:",r.flagKey);if(!yW()&&this.isOptedInToAnalytics)try{!function(e,t){let{flagKey:r,feedback:n,sentiment:i,prompt:o,customProperties:s}=t,a={feedback_answer:n,flag_key:r,sentiment:i??"neutral",custom_properties:s},l=yb.t?.getSession()?.sessionSecureID;l&&(a.o11y_session_id=l),o&&(a.feedback_prompt=o),e.track("$ld:feedback",a),e.flush()}(this.ldClient,{flagKey:r.flagKey,feedback:e,sentiment:t,prompt:r.prompt,customProperties:r.customProperties})}catch(e){console.error("ToolbarAnalytics: Failed to send feedback event:",e)}}}trackFlagKeyCopy(e){this.track("copy.flag.key",{flagKey:e})}trackContextAdded(e,t,r){this.track("context.added",{contextKind:e,contextKey:t,isMultiKind:r})}trackContextRemoved(e,t){this.track("context.removed",{contextKind:e,contextKey:t})}trackContextUpdated(e,t,r,n){this.track("context.updated",{oldKind:e,oldKey:t,newKind:r,newKey:n})}trackContextSelected(e,t){this.track("context.selected",{contextKind:e,contextKey:t})}trackContextEditStarted(e,t){this.track("context.edit.started",{contextKind:e,contextKey:t})}trackContextEditCancelled(e,t){this.track("context.edit.cancelled",{contextKind:e,contextKey:t})}trackContextKeyCopy(e){this.track("context.key.copied",{contextKey:e})}trackShareState(e){this.track("share.state",{includeSettings:e.includeSettings,overrideCount:e.overrideCount,contextCount:e.contextCount,starredFlagCount:e.starredFlagCount})}}function yj(e){function t(e,t){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=e,this.code=t}return t.prototype=Error(),t.prototype.name=e,t.prototype.constructor=t,t}let yX=yj("LaunchDarklyUnexpectedResponseError"),yD=yj("LaunchDarklyInvalidEnvironmentIdError"),yF=yj("LaunchDarklyInvalidUserError"),yz=yj("LaunchDarklyInvalidEventKeyError"),yB=yj("LaunchDarklyInvalidArgumentError"),yU=yj("LaunchDarklyFlagFetchError");for(var yH={LDUnexpectedResponseError:yX,LDInvalidEnvironmentIdError:yD,LDInvalidUserError:yF,LDInvalidEventKeyError:yz,LDInvalidArgumentError:yB,LDInvalidDataError:yj("LaunchDarklyInvalidDataError"),LDFlagFetchError:yU,LDTimeoutError:yj("LaunchDarklyTimeoutError"),isHttpErrorRecoverable:function(e){return!(e>=400&&e<500)||400===e||408===e||429===e}},yY=[],yK=[],yJ=("u">typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),yQ=0;yQ<64;++yQ)yY[yQ]=yJ[yQ],yK[yJ.charCodeAt(yQ)]=yQ;yK[45]=62,yK[95]=63;var yq=function(e){for(var t,r=e.length,n=r%3,i=[],o=0,s=r-n;o<s;o+=16383)i.push(function(e,t,r){for(var n,i=[],o=t;o<r;o+=3)i.push(yY[(n=(e[o]<<16&0xff0000)+(e[o+1]<<8&65280)+(255&e[o+2]))>>18&63]+yY[n>>12&63]+yY[n>>6&63]+yY[63&n]);return i.join("")}(e,o,o+16383>s?s:o+16383));return 1===n?i.push(yY[(t=e[r-1])>>2]+yY[t<<4&63]+"=="):2===n&&i.push(yY[(t=(e[r-2]<<8)+e[r-1])>>10]+yY[t>>4&63]+yY[t<<2&63]+"="),i.join("")},y$=Array.isArray,y0=Object.keys,y1=Object.prototype.hasOwnProperty,y2=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){var n,i,o,s=y$(t),a=y$(r);if(s&&a){if((i=t.length)!=r.length)return!1;for(n=i;0!=n--;)if(!e(t[n],r[n]))return!1;return!0}if(s!=a)return!1;var l=t instanceof Date,c=r instanceof Date;if(l!=c)return!1;if(l&&c)return t.getTime()==r.getTime();var u=t instanceof RegExp,d=r instanceof RegExp;if(u!=d)return!1;if(u&&d)return t.toString()==r.toString();var h=y0(t);if((i=h.length)!==y0(r).length)return!1;for(n=i;0!=n--;)if(!y1.call(r,h[n]))return!1;for(n=i;0!=n--;)if(!e(t[o=h[n]],r[o]))return!1;return!0}return t!=t&&r!=r};let y5=["key","ip","country","email","firstName","lastName","avatar","name"];function y3(e){return yq(function(e){let t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return t}(unescape(encodeURIComponent(e))))}function y9(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var y4,y6={appendUrlPath:function(e,t){return(e.endsWith("/")?e.substring(0,e.length-1):e)+(t.startsWith("/")?"":"/")+t},base64URLEncode:function(e){return y3(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},btoa:y3,clone:function(e){return JSON.parse(JSON.stringify(e))},deepEquals:function(e,t){return y2(e,t)},extend:function(...e){return e.reduce((e,t)=>({...e,...t}),{})},getLDUserAgentString:function(e){let t=e.version||"?";return e.userAgent+"/"+t},objectHasOwnProperty:y9,onNextTick:function(e){setTimeout(e,0)},sanitizeContext:function(e){let t;return e?(null!==e.kind&&void 0!==e.kind||y5.forEach(r=>{let n=e[r];void 0!==n&&"string"!=typeof n&&((t=t||{...e})[r]=String(n))}),t||e):e},transformValuesToVersionedValues:function(e){let t={};for(let r in e)y9(e,r)&&(t[r]={value:e[r],version:0});return t},transformVersionedValuesToValues:function(e){let t={};for(let r in e)y9(e,r)&&(t[r]=e[r].value);return t},wrapPromiseCallback:function(e,t){let r=e.then(e=>(t&&setTimeout(()=>{t(null,e)},0),e),e=>{if(!t)return Promise.reject(e);setTimeout(()=>{t(e,null)},0)});return t?void 0:r},once:function(e){let t,r=!1;return function(...n){return r||(r=!0,t=e.apply(this,n)),t}}},y7=new Uint8Array(16);function y8(){if(!y4&&!(y4="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"u">typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return y4(y7)}var we=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function wt(e){return"string"==typeof e&&we.test(e)}for(var wr,wn,wi=[],wo=0;wo<256;++wo)wi.push((wo+256).toString(16).substr(1));function ws(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(wi[e[t+0]]+wi[e[t+1]]+wi[e[t+2]]+wi[e[t+3]]+"-"+wi[e[t+4]]+wi[e[t+5]]+"-"+wi[e[t+6]]+wi[e[t+7]]+"-"+wi[e[t+8]]+wi[e[t+9]]+"-"+wi[e[t+10]]+wi[e[t+11]]+wi[e[t+12]]+wi[e[t+13]]+wi[e[t+14]]+wi[e[t+15]]).toLowerCase();if(!wt(r))throw TypeError("Stringified UUID is invalid");return r}var wa=0,wl=0;function wc(e){if(!wt(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/0x10000000000&255,r[11]=t/0x100000000&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function wu(e,t,r){function n(e,n,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=wc(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(n),s.set(e,n.length),(s=r(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,i){o=o||0;for(var a=0;a<16;++a)i[o+a]=s[a];return i}return ws(s)}try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function wd(e){return 14+(e+64>>>9<<4)+1}function wh(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function wp(e,t,r,n,i,o){var s;return wh((s=wh(wh(t,e),wh(n,o)))<<i|s>>>32-i,r)}function wf(e,t,r,n,i,o,s){return wp(t&r|~t&n,e,t,i,o,s)}function wm(e,t,r,n,i,o,s){return wp(t&n|r&~n,e,t,i,o,s)}function wg(e,t,r,n,i,o,s){return wp(t^r^n,e,t,i,o,s)}function wb(e,t,r,n,i,o,s){return wp(r^(t|~n),e,t,i,o,s)}function wv(e,t){return e<<t|e>>>32-t}var wy=Object.freeze({__proto__:null,v1:function(e,t,r){var n=t&&r||0,i=t||Array(16),o=(e=e||{}).node||wr,s=void 0!==e.clockseq?e.clockseq:wn;if(null==o||null==s){var a=e.random||(e.rng||y8)();null==o&&(o=wr=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=wn=16383&(a[6]<<8|a[7]))}var l=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:wl+1,u=l-wa+(c-wl)/1e4;if(u<0&&void 0===e.clockseq&&(s=s+1&16383),(u<0||l>wa)&&void 0===e.nsecs&&(c=0),c>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");wa=l,wl=c,wn=s;var d=(1e4*(0xfffffff&(l+=122192928e5))+c)%0x100000000;i[n++]=d>>>24&255,i[n++]=d>>>16&255,i[n++]=d>>>8&255,i[n++]=255&d;var h=l/0x100000000*1e4&0xfffffff;i[n++]=h>>>8&255,i[n++]=255&h,i[n++]=h>>>24&15|16,i[n++]=h>>>16&255,i[n++]=s>>>8|128,i[n++]=255&s;for(var p=0;p<6;++p)i[n+p]=o[p];return t||ws(i)},v3:wu("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){for(var t=[],r=32*e.length,n="0123456789abcdef",i=0;i<r;i+=8){var o=e[i>>5]>>>i%32&255,s=parseInt(n.charAt(o>>>4&15)+n.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[wd(t)-1]=t;for(var r=0x67452301,n=-0x10325477,i=-0x67452302,o=0x10325476,s=0;s<e.length;s+=16){var a=r,l=n,c=i,u=o;r=wf(r,n,i,o,e[s],7,-0x28955b88),o=wf(o,r,n,i,e[s+1],12,-0x173848aa),i=wf(i,o,r,n,e[s+2],17,0x242070db),n=wf(n,i,o,r,e[s+3],22,-0x3e423112),r=wf(r,n,i,o,e[s+4],7,-0xa83f051),o=wf(o,r,n,i,e[s+5],12,0x4787c62a),i=wf(i,o,r,n,e[s+6],17,-0x57cfb9ed),n=wf(n,i,o,r,e[s+7],22,-0x2b96aff),r=wf(r,n,i,o,e[s+8],7,0x698098d8),o=wf(o,r,n,i,e[s+9],12,-0x74bb0851),i=wf(i,o,r,n,e[s+10],17,-42063),n=wf(n,i,o,r,e[s+11],22,-0x76a32842),r=wf(r,n,i,o,e[s+12],7,0x6b901122),o=wf(o,r,n,i,e[s+13],12,-0x2678e6d),i=wf(i,o,r,n,e[s+14],17,-0x5986bc72),r=wm(r,n=wf(n,i,o,r,e[s+15],22,0x49b40821),i,o,e[s+1],5,-0x9e1da9e),o=wm(o,r,n,i,e[s+6],9,-0x3fbf4cc0),i=wm(i,o,r,n,e[s+11],14,0x265e5a51),n=wm(n,i,o,r,e[s],20,-0x16493856),r=wm(r,n,i,o,e[s+5],5,-0x29d0efa3),o=wm(o,r,n,i,e[s+10],9,0x2441453),i=wm(i,o,r,n,e[s+15],14,-0x275e197f),n=wm(n,i,o,r,e[s+4],20,-0x182c0438),r=wm(r,n,i,o,e[s+9],5,0x21e1cde6),o=wm(o,r,n,i,e[s+14],9,-0x3cc8f82a),i=wm(i,o,r,n,e[s+3],14,-0xb2af279),n=wm(n,i,o,r,e[s+8],20,0x455a14ed),r=wm(r,n,i,o,e[s+13],5,-0x561c16fb),o=wm(o,r,n,i,e[s+2],9,-0x3105c08),i=wm(i,o,r,n,e[s+7],14,0x676f02d9),r=wg(r,n=wm(n,i,o,r,e[s+12],20,-0x72d5b376),i,o,e[s+5],4,-378558),o=wg(o,r,n,i,e[s+8],11,-0x788e097f),i=wg(i,o,r,n,e[s+11],16,0x6d9d6122),n=wg(n,i,o,r,e[s+14],23,-0x21ac7f4),r=wg(r,n,i,o,e[s+1],4,-0x5b4115bc),o=wg(o,r,n,i,e[s+4],11,0x4bdecfa9),i=wg(i,o,r,n,e[s+7],16,-0x944b4a0),n=wg(n,i,o,r,e[s+10],23,-0x41404390),r=wg(r,n,i,o,e[s+13],4,0x289b7ec6),o=wg(o,r,n,i,e[s],11,-0x155ed806),i=wg(i,o,r,n,e[s+3],16,-0x2b10cf7b),n=wg(n,i,o,r,e[s+6],23,0x4881d05),r=wg(r,n,i,o,e[s+9],4,-0x262b2fc7),o=wg(o,r,n,i,e[s+12],11,-0x1924661b),i=wg(i,o,r,n,e[s+15],16,0x1fa27cf8),r=wb(r,n=wg(n,i,o,r,e[s+2],23,-0x3b53a99b),i,o,e[s],6,-0xbd6ddbc),o=wb(o,r,n,i,e[s+7],10,0x432aff97),i=wb(i,o,r,n,e[s+14],15,-0x546bdc59),n=wb(n,i,o,r,e[s+5],21,-0x36c5fc7),r=wb(r,n,i,o,e[s+12],6,0x655b59c3),o=wb(o,r,n,i,e[s+3],10,-0x70f3336e),i=wb(i,o,r,n,e[s+10],15,-1051523),n=wb(n,i,o,r,e[s+1],21,-0x7a7ba22f),r=wb(r,n,i,o,e[s+8],6,0x6fa87e4f),o=wb(o,r,n,i,e[s+15],10,-0x1d31920),i=wb(i,o,r,n,e[s+6],15,-0x5cfebcec),n=wb(n,i,o,r,e[s+13],21,0x4e0811a1),r=wb(r,n,i,o,e[s+4],6,-0x8ac817e),o=wb(o,r,n,i,e[s+11],10,-0x42c50dcb),i=wb(i,o,r,n,e[s+2],15,0x2ad7d2bb),n=wb(n,i,o,r,e[s+9],21,-0x14792c6f),r=wh(r,a),n=wh(n,l),i=wh(i,c),o=wh(o,u)}return[r,n,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(wd(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length))}),v4:function(e,t,r){var n=(e=e||{}).random||(e.rng||y8)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return ws(n)},v5:wu("v5",80,function(e){var t=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],r=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var i=0;i<n.length;++i)e.push(n.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=Array(s),l=0;l<s;++l){for(var c=new Uint32Array(16),u=0;u<16;++u)c[u]=e[64*l+4*u]<<24|e[64*l+4*u+1]<<16|e[64*l+4*u+2]<<8|e[64*l+4*u+3];a[l]=c}a[s-1][14]=8*(e.length-1)/0x100000000,a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)|0;for(var d=0;d<s;++d){for(var h=new Uint32Array(80),p=0;p<16;++p)h[p]=a[d][p];for(var f=16;f<80;++f)h[f]=wv(h[f-3]^h[f-8]^h[f-14]^h[f-16],1);for(var m=r[0],g=r[1],b=r[2],v=r[3],y=r[4],w=0;w<80;++w){var x=Math.floor(w/20),k=wv(m,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}(x,g,b,v)+y+t[x]+h[w]>>>0;y=v,v=b,b=wv(g,30)>>>0,g=m,m=k}r[0]=r[0]+m>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+b>>>0,r[3]=r[3]+v>>>0,r[4]=r[4]+y>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}),NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(!wt(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},validate:wt,stringify:ws,parse:wc});let ww=["debug","info","warn","error","none"];var wx={commonBasicLogger:function(e,t){if(e&&e.destination&&"function"!=typeof e.destination)throw Error("destination for basicLogger was set to a non-function");function r(e){return function(t){console&&console[e]&&console[e].call(console,t)}}let n=e&&e.destination?[e.destination,e.destination,e.destination,e.destination]:[r("log"),r("info"),r("warn"),r("error")],i=!(!e||!e.destination),o=e&&void 0!==e.prefix&&null!==e.prefix?e.prefix:"[LaunchDarkly] ",s=1;if(e&&e.level)for(let t=0;t<ww.length;t++)ww[t]===e.level&&(s=t);let a={};for(let e=0;e<ww.length;e++){let r=ww[e];if("none"!==r)if(e<s)a[r]=()=>{};else{let s=e;a[r]=function(){!function(e,r,s){let a;if(s.length<1)return;let l=i?r+": "+o:o;if(1!==s.length&&t){let e=[...s];e[0]=l+e[0],a=t(...e)}else a=l+s[0];try{n[e](a)}catch(e){console&&console.log&&console.log("[LaunchDarkly] Configured logger's "+r+" method threw an exception: "+e)}}(s,r,arguments)}}}return a},validateLogger:function(e){ww.forEach(t=>{if("none"!==t&&(!e[t]||"function"!=typeof e[t]))throw Error("Provided logger instance must support logger."+t+"(...) method")})}};function wk(e){return e&&e.message?e.message:"string"==typeof e||e instanceof String?e:JSON.stringify(e)}let wS=" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initialize-the-client for instructions on SDK initialization.";var w_={bootstrapInvalid:function(){return"LaunchDarkly bootstrap data is not available because the back end could not read the flags."},bootstrapOldFormat:function(){return"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."+wS},clientInitialized:function(){return"LaunchDarkly client initialized"},clientNotReady:function(){return"LaunchDarkly client is not ready"},debugEnqueueingEvent:function(e){return'enqueueing "'+e+'" event'},debugPostingDiagnosticEvent:function(e){return"sending diagnostic event ("+e.kind+")"},debugPostingEvents:function(e){return"sending "+e+" events"},debugStreamDelete:function(e){return'received streaming deletion for flag "'+e+'"'},debugStreamDeleteIgnored:function(e){return'received streaming deletion for flag "'+e+'" but ignored due to version check'},debugStreamPatch:function(e){return'received streaming update for flag "'+e+'"'},debugStreamPatchIgnored:function(e){return'received streaming update for flag "'+e+'" but ignored due to version check'},debugStreamPing:function(){return"received ping message from stream"},debugPolling:function(e){return"polling for feature flags at "+e},debugStreamPut:function(){return"received streaming update for all flags"},deprecated:function(e,t){return t?'"'+e+'" is deprecated, please use "'+t+'"':'"'+e+'" is deprecated'},environmentNotFound:function(){return"Environment not found. Double check that you specified a valid environment/client-side ID."+wS},environmentNotSpecified:function(){return"No environment/client-side ID was specified."+wS},errorFetchingFlags:function(e){return"Error fetching flag settings: "+wk(e)},eventCapacityExceeded:function(){return"Exceeded event queue capacity. Increase capacity to avoid dropping events."},eventWithoutContext:function(){return"Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"},httpErrorMessage:function(e,t,r){return"Received error "+e+(401===e?" (invalid SDK key)":"")+" for "+t+" - "+(yH.isHttpErrorRecoverable(e)?r:"giving up permanently")},httpUnavailable:function(){return"Cannot make HTTP requests in this environment."+wS},identifyDisabled:function(){return"identify() has no effect here; it must be called on the main client instance"},inspectorMethodError:(e,t)=>`an inspector: "${t}" of type: "${e}" generated an exception`,invalidContentType:function(e){return'Expected application/json content type but got "'+e+'"'},invalidData:function(){return"Invalid data received from LaunchDarkly; connection may have been interrupted"},invalidInspector:(e,t)=>`an inspector: "${t}" of an invalid type (${e}) was configured`,invalidKey:function(){return"Event key must be a string"},invalidMetricValue:e=>`The track function was called with a non-numeric "metricValue" (${e}), only numeric metric values are supported.`,invalidContext:function(){return"Invalid context specified."+wS},invalidTagValue:e=>`Config option "${e}" must only contain letters, numbers, ., _ or -.`,localStorageUnavailable:function(e){return"local storage is unavailable: "+wk(e)},networkError:e=>"network error"+(e?" ("+e+")":""),optionBelowMinimum:(e,t,r)=>'Config option "'+e+'" was set to '+t+", changing to minimum value of "+r,streamClosing:function(){return"Closing stream connection"},streamConnecting:function(e){return"Opening stream connection to "+e},streamError:function(e,t){return"Error on stream connection: "+wk(e)+", will continue retrying after "+t+" milliseconds."},tagValueTooLong:e=>`Value of "${e}" was longer than 64 characters and was discarded.`,unknownCustomEventKey:function(e){return'Custom event "'+e+'" does not exist'},unknownOption:e=>'Ignoring unknown config option "'+e+'"',contextNotSpecified:function(){return"No context specified."+wS},unrecoverableStreamError:e=>`Error on stream connection ${wk(e)}, giving up permanently`,wrongOptionType:(e,t,r)=>'Config option "'+e+'" should be of type '+t+", got "+r+", using default value",wrongOptionTypeBoolean:(e,t)=>'Config option "'+e+'" should be a boolean, got '+t+", converting to boolean"};let{validateLogger:wC}=wx,wT={baseUrl:{default:"https://app.launchdarkly.com"},streamUrl:{default:"https://clientstream.launchdarkly.com"},eventsUrl:{default:"https://events.launchdarkly.com"},sendEvents:{default:!0},streaming:{type:"boolean"},sendLDHeaders:{default:!0},requestHeaderTransform:{type:"function"},sendEventsOnlyForVariation:{default:!1},useReport:{default:!1},evaluationReasons:{default:!1},eventCapacity:{default:100,minimum:1},flushInterval:{default:2e3,minimum:2e3},samplingInterval:{default:0,minimum:0},streamReconnectDelay:{default:1e3,minimum:0},allAttributesPrivate:{default:!1},privateAttributes:{default:[]},bootstrap:{type:"string|object"},diagnosticRecordingInterval:{default:9e5,minimum:2e3},diagnosticOptOut:{default:!1},wrapperName:{type:"string"},wrapperVersion:{type:"string"},stateProvider:{type:"object"},application:{validator:function(e,t,r){let n={};return t.id&&(n.id=wR(`${e}.id`,t.id,r)),t.version&&(n.version=wR(`${e}.version`,t.version,r)),n}},inspectors:{default:[]},hooks:{default:[]},plugins:{default:[]}},wI=/^(\w|\.|-)+$/;function wE(e){return e&&e.replace(/\/+$/,"")}function wR(e,t,r){if("string"==typeof t&&t.match(wI)){if(!(t.length>64))return t;r.warn(w_.tagValueTooLong(e))}else r.warn(w_.invalidTagValue(e))}var wO={baseOptionDefs:wT,validate:function(e,t,r,n){var i,o,s;let a,l,c,u=y6.extend({logger:{default:n}},wT,r),d={};function h(e){y6.onNextTick(()=>{t&&t.maybeReportError(new yH.LDInvalidArgumentError(e))})}let p=y6.extend({},e||{});return i=p,Object.keys(d).forEach(e=>{if(void 0!==i[e]){let t=d[e];n&&n.warn(w_.deprecated(e,t)),t&&(void 0===i[t]&&(i[t]=i[e]),delete i[e])}}),o=p,a=y6.extend({},o),Object.keys(u).forEach(e=>{void 0!==a[e]&&null!==a[e]||(a[e]=u[e]&&u[e].default)}),s=p=a,l=y6.extend({},s),c=e=>{if(null===e)return"any";if(void 0===e)return;if(Array.isArray(e))return"array";let t=typeof e;return"boolean"===t||"string"===t||"number"===t||"function"===t?t:"object"},Object.keys(s).forEach(e=>{let t=s[e];if(null!=t){let r=u[e];if(void 0===r)h(w_.unknownOption(e));else{let i=r.type||c(r.default),o=r.validator;if(o){let t=o(e,s[e],n);void 0!==t?l[e]=t:delete l[e]}else if("any"!==i){let n=i.split("|"),o=c(t);0>n.indexOf(o)?"boolean"===i?(l[e]=!!t,h(w_.wrongOptionTypeBoolean(e,o))):(h(w_.wrongOptionType(e,i,o)),l[e]=r.default):"number"===o&&void 0!==r.minimum&&t<r.minimum&&(h(w_.optionBelowMinimum(e,t,r.minimum)),l[e]=r.minimum)}}}}),l.baseUrl=wE(l.baseUrl),l.streamUrl=wE(l.streamUrl),l.eventsUrl=wE(l.eventsUrl),wC((p=l).logger),p},getTags:function(e){let t={};return e&&(e.application&&void 0!==e.application.id&&null!==e.application.id&&(t["application-id"]=[e.application.id]),e.application&&void 0!==e.application.version&&null!==e.application.id&&(t["application-version"]=[e.application.version])),t}};let{getLDUserAgentString:wL}=y6;var wA={getLDHeaders:function(e,t){if(t&&!t.sendLDHeaders)return{};let r={};r[e.userAgentHeaderName||"User-Agent"]=wL(e),t&&t.wrapperName&&(r["X-LaunchDarkly-Wrapper"]=t.wrapperVersion?t.wrapperName+"/"+t.wrapperVersion:t.wrapperName);let n=wO.getTags(t),i=Object.keys(n);return i.length&&(r["x-launchdarkly-tags"]=i.sort().map(e=>Array.isArray(n[e])?n[e].sort().map(t=>`${e}/${t}`):[`${e}/${n[e]}`]).reduce((e,t)=>e.concat(t),[]).join(" ")),r},transformHeaders:function(e,t){return t&&t.requestHeaderTransform?t.requestHeaderTransform({...e}):e}};let{v1:wN}=wy,{getLDHeaders:wZ,transformHeaders:wM}=wA;var wG=function(e,t,r){let n=y6.extend({"Content-Type":"application/json"},wZ(e,r)),i={};return i.sendEvents=(t,i,o)=>{if(!e.httpRequest)return Promise.resolve();let s=JSON.stringify(t),a=o?null:wN();return(function t(l){let c=o?n:y6.extend({},n,{"X-LaunchDarkly-Event-Schema":"4","X-LaunchDarkly-Payload-ID":a});return e.httpRequest("POST",i,wM(c,r),s).promise.then(e=>{if(e)return e.status>=400&&yH.isHttpErrorRecoverable(e.status)&&l?t(!1):function(e){let t={status:e.status},r=e.header("date");if(r){let e=Date.parse(r);e&&(t.serverTime=e)}return t}(e)}).catch(()=>l?t(!1):Promise.reject())})(!0).catch(()=>{})},i},wV=function e(t,r=[]){if(null===t||"object"!=typeof t)return JSON.stringify(t);if(r.includes(t))throw Error("Cycle detected");return Array.isArray(t)?`[${t.map(n=>e(n,[...r,t])).map(e=>void 0===e?"null":e).join(",")}]`:`{${Object.keys(t).sort().map(n=>{let i=e(t[n],[...r,t]);if(void 0!==i)return`${JSON.stringify(n)}:${i}`}).filter(e=>void 0!==e).join(",")}}`};let{commonBasicLogger:wW}=wx;function wP(e){return"string"==typeof e&&"kind"!==e&&e.match(/^(\w|\.|-)+$/)}function wj(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}var wX={checkContext:function(e,t){if(e){if(t&&(void 0===e.kind||null===e.kind))return void 0!==e.key&&null!==e.key;let r=e.key,n=void 0===e.kind?"user":e.kind,i=wP(n),o="multi"===n||null!=r&&""!==r;if("multi"===n){let t=Object.keys(e).filter(e=>"kind"!==e);return o&&t.every(e=>wP(e))&&t.every(t=>{let r=e[t].key;return null!=r&&""!==r})}return o&&i}return!1},getContextKeys:function(e,t=wW()){if(!e)return;let r={},{kind:n,key:i}=e;switch(n){case void 0:r.user=`${i}`;break;case"multi":Object.entries(e).filter(([e])=>"kind"!==e).forEach(([e,t])=>{t&&t.key&&(r[e]=t.key)});break;case null:t.warn(`null is not a valid context kind: ${e}`);break;case"":t.warn(`'' is not a valid context kind: ${e}`);break;default:r[n]=`${i}`}return r},getContextKinds:function(e){return e?null===e.kind||void 0===e.kind?["user"]:"multi"!==e.kind?[e.kind]:Object.keys(e).filter(e=>"kind"!==e):[]},getCanonicalKey:function(e){if(e){if((void 0===e.kind||null===e.kind||"user"===e.kind)&&e.key)return e.key;if("multi"!==e.kind&&e.key)return`${e.kind}:${wj(e.key)}`;if("multi"===e.kind)return Object.keys(e).sort().filter(e=>"kind"!==e).map(t=>`${t}:${wj(e[t].key)}`).join(":")}}};let{getContextKinds:wD}=wX;var wF=function(){let e={},t=0,r=0,n={},i={};return e.summarizeEvent=e=>{if("feature"===e.kind){let o=e.key+":"+(null!==e.variation&&void 0!==e.variation?e.variation:"")+":"+(null!==e.version&&void 0!==e.version?e.version:""),s=n[o],a=i[e.key];a||(a=new Set,i[e.key]=a),(e.context?wD(e.context):e.contextKeys?Object.keys(e.contextKeys):[]).forEach(e=>a.add(e)),s?s.count=s.count+1:n[o]={count:1,key:e.key,version:e.version,variation:e.variation,value:e.value,default:e.default},(0===t||e.creationDate<t)&&(t=e.creationDate),e.creationDate>r&&(r=e.creationDate)}},e.getSummary=()=>{let e={},o=!0;for(let t of Object.values(n)){let r=e[t.key];r||(r={default:t.default,counters:[],contextKinds:[...i[t.key]]},e[t.key]=r);let n={value:t.value,count:t.count};void 0!==t.variation&&null!==t.variation&&(n.variation=t.variation),void 0!==t.version&&null!==t.version?n.version=t.version:n.unknown=!0,r.counters.push(n),o=!1}return o?null:{startDate:t,endDate:r,features:e,kind:"summary"}},e.clearSummary=()=>{t=0,r=0,n={},i={}},e},wz=function(e){let t={},r={};return{summarizeEvent:function(e){if("feature"===e.kind){let n=wV(e.context);if(!n)return;let i=t[n];i||(t[n]=wF(),i=t[n],r[n]=e.context),i.summarizeEvent(e)}},getSummaries:function(){let n=t,i=r;return t={},r={},Object.entries(n).map(([t,r])=>{let n=r.getSummary();return n.context=e.filter(i[t]),n})}}};function wB(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function wU(e){return(e.startsWith("/")?e.substring(1):e).split("/").map(e=>e.indexOf("~")>=0?e.replace(/~1/g,"/").replace(/~0/g,"~"):e)}function wH(e){return!e.startsWith("/")}function wY(e,t){let r=wH(e),n=wH(t);if(r&&n)return e===t;if(r){let r=wU(t);return 1===r.length&&e===r[0]}if(n){let r=wU(e);return 1===r.length&&t===r[0]}return e===t}function wK(e){return`/${wB(e)}`}var wJ=function(e,t){let r=[],n={},i=[];for(r.push(...Object.keys(e).map(t=>({key:t,ptr:wK(t),source:e,parent:n,visited:[e]})));r.length;){let e=r.pop();if(t.some(t=>wY(t,e.ptr)))i.push(e.ptr);else{let t=e.source[e.key];if(null===t)e.parent[e.key]=t;else if(Array.isArray(t))e.parent[e.key]=[...t];else if("object"==typeof t){if(e.visited.includes(t))continue;e.parent[e.key]={},r.push(...Object.keys(t).map(r=>{var n,i;return{key:r,ptr:(n=e.ptr,i=wB(r),`${n}/${i}`),source:t,parent:e.parent[e.key],visited:[...e.visited,t]}}))}else e.parent[e.key]=t}}return{cloned:n,excluded:i.sort()}},wQ=function(e){let t={},r=e.allAttributesPrivate,n=e.privateAttributes||[],i=["key","kind","_meta","anonymous"],o=["name","ip","firstName","lastName","email","avatar","country"],s=(e,t)=>{if("object"!=typeof e||null===e||Array.isArray(e))return;let{cloned:o,excluded:s}=wJ(e,(r||t&&e.anonymous?Object.keys(e):[...n,...e._meta&&e._meta.privateAttributes||[]]).filter(e=>!i.some(t=>wY(e,t))));return o.key=String(o.key),s.length&&(o._meta||(o._meta={}),o._meta.redactedAttributes=s),o._meta&&(delete o._meta.privateAttributes,0===Object.keys(o._meta).length&&delete o._meta),void 0!==o.anonymous&&(o.anonymous=!!o.anonymous),o};return t.filter=(e,t=!1)=>void 0===e.kind||null===e.kind?s((e=>{let t={...e.custom||{},kind:"user",key:e.key};for(let r of(void 0!==e.anonymous&&(t.anonymous=!!e.anonymous),o))delete t[r],void 0!==e[r]&&null!==e[r]&&(t[r]=String(e[r]));return void 0!==e.privateAttributeNames&&null!==e.privateAttributeNames&&(t._meta=t._meta||{},t._meta.privateAttributes=e.privateAttributeNames.map(e=>e.startsWith("/")?wK(e):e)),t})(e),t):"multi"===e.kind?((e,t)=>{let r={kind:e.kind};for(let n of Object.keys(e))if("kind"!==n){let i=s(e[n],t);i&&(r[n]=i)}return r})(e,t):s(e,t),t};let{getContextKeys:wq}=wX;var w$=function(e,t,r,n=null,i=null,o=null){let s={},a=o||wG(e,r,t),l=y6.appendUrlPath(t.eventsUrl,"/events/bulk/"+r),c=wQ(t),u=wz(c),d=t.samplingInterval,h=t.eventCapacity,p=t.flushInterval,f=t.logger,m,g=[],b=0,v=!1,y=!1;function w(){return 0===d||0===Math.floor(Math.random()*d)}function x(e){g.length<h?(g.push(e),y=!1):(y||(y=!0,f.warn(w_.eventCapacityExceeded())),n&&n.incrementDroppedEvents())}return s.enqueue=function(e){let t;if(v)return;let r=!1,n=!1;if(u.summarizeEvent(e),"feature"===e.kind?w()&&(r=!!e.trackEvents,n=!!e.debugEventsUntilDate&&e.debugEventsUntilDate>b&&e.debugEventsUntilDate>(new Date).getTime()):r=w(),r&&x((t=y6.extend({},e),"identify"===e.kind||"feature"===e.kind||"custom"===e.kind?t.context=c.filter(e.context):(t.contextKeys=wq(e.context,f),delete t.context),"feature"===e.kind&&(delete t.trackEvents,delete t.debugEventsUntilDate),t)),n){let t=y6.extend({},e,{kind:"debug"});t.context=c.filter(t.context),delete t.trackEvents,delete t.debugEventsUntilDate,x(t)}},s.flush=async function(){if(v)return Promise.resolve();let e=g;return u.getSummaries().forEach(t=>{Object.keys(t.features).length&&e.push(t)}),n&&n.setEventsInLastBatch(e.length),0===e.length?Promise.resolve():(g=[],f.debug(w_.debugPostingEvents(e.length)),a.sendEvents(e,l).then(e=>{e&&(e.serverTime&&(b=e.serverTime),yH.isHttpErrorRecoverable(e.status)||(v=!0),e.status>=400&&y6.onNextTick(()=>{i.maybeReportError(new yH.LDUnexpectedResponseError(w_.httpErrorMessage(e.status,"event posting","some events were dropped")))}))}))},s.start=function(){let e=()=>{s.flush(),m=setTimeout(e,p)};m=setTimeout(e,p)},s.stop=function(){clearTimeout(m)},s},w0=function(e){let t={},r={};return t.on=function(e,t,n){r[e]=r[e]||[],r[e]=r[e].concat({handler:t,context:n})},t.off=function(e,t,n){if(r[e])for(let i=0;i<r[e].length;i++)r[e][i].handler===t&&r[e][i].context===n&&(r[e]=r[e].slice(0,i).concat(r[e].slice(i+1)))},t.emit=function(e){if(!r[e])return;let t=r[e].slice(0);for(let e=0;e<t.length;e++)t[e].handler.apply(t[e].context,Array.prototype.slice.call(arguments,1))},t.getEvents=function(){return Object.keys(r)},t.getEventListenerCount=function(e){return r[e]?r[e].length:0},t.maybeReportError=function(t){t&&(r.error?this.emit("error",t):(e||console).error(t.message))},t};let w1="ready",w2="initialized",w5="failed";var w3=function(e){let t=!1,r=!1,n=null,i=null,o=new Promise(t=>{let r=()=>{e.off(w1,r),t()};e.on(w1,r)}).catch(()=>{});return{getInitializationPromise:()=>i||(t?Promise.resolve():r?Promise.reject(n):i=new Promise((t,r)=>{let n=()=>{e.off(w2,n),t()},i=t=>{e.off(w5,i),r(t)};e.on(w2,n),e.on(w5,i)})),getReadyPromise:()=>o,signalSuccess:()=>{t||r||(t=!0,e.emit(w2),e.emit(w1))},signalFailure:i=>{t||r||(r=!0,n=i,e.emit(w5,i),e.emit(w1)),e.maybeReportError(i)}}},w9=function(e,t,r,n){let i={};function o(){let e="",i=n.getContext();return i&&(e=r||y6.btoa(JSON.stringify(i))),"ld:"+t+":"+e}return i.loadFlags=()=>e.get(o()).then(e=>{if(null==e)return null;try{let t=JSON.parse(e);if(t){let e=t.$schema;void 0===e||e<1?t=y6.transformValuesToVersionedValues(t):delete t.$schema}return t}catch(e){return i.clearFlags().then(()=>null)}}),i.saveFlags=t=>{let r=y6.extend({},t,{$schema:1});return e.set(o(),JSON.stringify(r))},i.clearFlags=()=>e.clear(o()),i},w4=function(e,t){let r={},n=!1,i=e=>{n||(n=!0,t.warn(w_.localStorageUnavailable(e)))};return r.isEnabled=()=>!!e,r.get=t=>new Promise(r=>{e?e.get(t).then(r).catch(e=>{i(e),r(void 0)}):r(void 0)}),r.set=(t,r)=>new Promise(n=>{e?e.set(t,r).then(()=>n(!0)).catch(e=>{i(e),n(!1)}):n(!1)}),r.clear=t=>new Promise(r=>{e?e.clear(t).then(()=>r(!0)).catch(e=>{i(e),r(!1)}):r(!1)}),r};let{appendUrlPath:w6,base64URLEncode:w7,objectHasOwnProperty:w8}=y6,{getLDHeaders:xe,transformHeaders:xt}=wA,{isHttpErrorRecoverable:xr}=yH;var xn=function(e,t,r,n){let i=t.streamUrl,o=t.logger,s={},a=w6(i,"/eval/"+r),l=t.useReport,c=t.evaluationReasons,u=t.streamReconnectDelay,d=xe(e,t),h,p=!1,f=null,m=null,g=null,b=null,v=null,y=0;function w(e){var t;let r,n;if(e.status&&"number"==typeof e.status&&!xr(e.status))return S(),o.error(w_.unrecoverableStreamError(e)),void(m&&(clearTimeout(m),m=null));let i=(n=(t=(r=u*Math.pow(2,y))>3e4?3e4:r)-Math.trunc(.5*Math.random()*t),y+=1,n);p||(o.warn(w_.streamError(e,i)),p=!0),_(!1),S(),x(i)}function x(e){m||(e?m=setTimeout(k,e):k())}function k(){let n;m=null;let s="",u={headers:d,readTimeoutMillis:3e5};if(e.eventSourceFactory){for(let d in null!=b&&(s="h="+b),l?e.eventSourceAllowsReport?(n=a,u.method="REPORT",u.headers["Content-Type"]="application/json",u.body=JSON.stringify(g)):(n=w6(i,"/ping/"+r),s=""):n=a+"/"+w7(JSON.stringify(g)),u.headers=xt(u.headers,t),c&&(s=s+(s?"&":"")+"withReasons=true"),n=n+(s?"?":"")+s,S(),o.info(w_.streamConnecting(n)),h=(new Date).getTime(),f=e.eventSourceFactory(n,u),v)w8(v,d)&&f.addEventListener(d,v[d]);f.onerror=w,f.onopen=()=>{y=0}}}function S(){f&&(o.info(w_.streamClosing()),f.close(),f=null)}function _(e){h&&n&&n.recordStreamInit(h,!e,(new Date).getTime()-h),h=null}return s.connect=function(e,t,r){for(let n in g=e,b=t,v={},r||{})v[n]=function(e){p=!1,_(!0),r[n]&&r[n](e)};x()},s.disconnect=function(){clearTimeout(m),m=null,S()},s.isConnected=function(){return!!(f&&e.eventSourceIsActive&&e.eventSourceIsActive(f))},s},xi=function(e){let t,r,n,i,o={addPromise:(o,s)=>{t=o,r&&r(),r=s,o.then(r=>{t===o&&(n(r),e&&e())},r=>{t===o&&(i(r),e&&e())})}};return o.resultPromise=new Promise((e,t)=>{n=e,i=t}),o};let{transformHeaders:xo,getLDHeaders:xs}=wA,xa="application/json";var xl=function(e,t,r){let n=t.baseUrl,i=t.useReport,o=t.evaluationReasons,s=t.logger,a={},l={};function c(r,n){if(!e.httpRequest)return new Promise((e,t)=>{t(new yH.LDFlagFetchError(w_.httpUnavailable()))});let i=xs(e,t);n&&(i["Content-Type"]=xa);let o=l[r];o||(o=xi(()=>{delete l[r]}),l[r]=o);let s=e.httpRequest(n?"REPORT":"GET",r,xo(i,t),n),a=s.promise.then(e=>{if(200===e.status){if(e.header("content-type")&&e.header("content-type").substring(0,16)===xa)return JSON.parse(e.body);{let t=w_.invalidContentType(e.header("content-type")||"");return Promise.reject(new yH.LDFlagFetchError(t))}}return Promise.reject(404===e.status?new yH.LDInvalidEnvironmentIdError(w_.environmentNotFound()):new yH.LDFlagFetchError(w_.errorFetchingFlags(e.statusText||String(e.status))))},e=>Promise.reject(new yH.LDFlagFetchError(w_.networkError(e))));return o.addPromise(a,()=>{s.cancel&&s.cancel()}),o.resultPromise}return a.fetchJSON=function(e){return c(y6.appendUrlPath(n,e),null)},a.fetchFlagSettings=function(e,t){let a,l,u="";return i?(a=n+"/sdk/evalx/"+r+"/context",l=JSON.stringify(e)):a=n+"/sdk/evalx/"+r+"/contexts/"+y6.base64URLEncode(JSON.stringify(e)),t&&(u="h="+t),o&&(u=u+(u?"&":"")+"withReasons=true"),a=a+(u?"?":"")+u,s.debug(w_.debugPolling(a)),c(a,l)},a},xc=function(e,t){let r,n={};return n.setContext=function(e){(r=y6.sanitizeContext(e))&&t&&t(y6.clone(r))},n.getContext=function(){return r?y6.clone(r):null},e&&n.setContext(e),n};let{v1:xu}=wy,{getContextKinds:xd}=wX;var xh=function(e){function t(e){return null==e||"user"===e?"ld:$anonUserId":`ld:$contextKey:${e}`}function r(r,n){return null!==n.key&&void 0!==n.key?(n.key=n.key.toString(),Promise.resolve(n)):n.anonymous?e.get(t(r)).then(i=>{if(i)return n.key=i,n;{let i=xu();return n.key=i,e.set(t(r),i).then(()=>n)}}):Promise.reject(new yH.LDInvalidUserError(w_.invalidContext()))}this.processContext=e=>{if(!e)return Promise.reject(new yH.LDInvalidUserError(w_.contextNotSpecified()));let t=y6.clone(e);return"multi"===e.kind?Promise.all(xd(t).map(e=>r(e,t[e]))).then(()=>t):r(e.kind,t)}};let{v1:xp}=wy,{baseOptionDefs:xf}=wO,{appendUrlPath:xm}=y6;var xg=function(e){let t={diagnosticId:xp()};return e&&(t.sdkKeySuffix=e.length>6?e.substring(e.length-6):e),t},xb=function(e){let t,r,n,i;function o(e){t=e,r=0,n=0,i=[]}return o(e),{getProps:()=>({dataSinceDate:t,droppedEvents:r,eventsInLastBatch:n,streamInits:i}),setProps:e=>{t=e.dataSinceDate,r=e.droppedEvents||0,n=e.eventsInLastBatch||0,i=e.streamInits||[]},incrementDroppedEvents:()=>{r++},setEventsInLastBatch:e=>{n=e},recordStreamInit:(e,t,r)=>{i.push({timestamp:e,failed:t,durationMillis:r})},reset:o}},xv=function(e,t,r,n,i,o,s){let a=!!e.diagnosticUseCombinedEvent,l="ld:"+i+":$diagnostics",c=xm(o.eventsUrl,"/events/diagnostic/"+i),u=o.diagnosticRecordingInterval,d,h,p=!!o.streaming,f={};function m(){let t;return{sdk:(t={...e.diagnosticSdkData},o.wrapperName&&(t.wrapperName=o.wrapperName),o.wrapperVersion&&(t.wrapperVersion=o.wrapperVersion),t),configuration:{customBaseURI:o.baseUrl!==xf.baseUrl.default,customStreamURI:o.streamUrl!==xf.streamUrl.default,customEventsURI:o.eventsUrl!==xf.eventsUrl.default,eventsCapacity:o.eventCapacity,eventsFlushIntervalMillis:o.flushInterval,reconnectTimeMillis:o.streamReconnectDelay,streamingDisabled:!p,allAttributesPrivate:!!o.allAttributesPrivate,diagnosticRecordingIntervalMillis:o.diagnosticRecordingInterval,usingSecureMode:!!o.hash,bootstrapMode:!!o.bootstrap,fetchGoalsDisabled:!o.fetchGoals,sendEventsOnlyForVariation:!!o.sendEventsOnlyForVariation},platform:e.diagnosticPlatformData}}function g(e){o.logger&&o.logger.debug(w_.debugPostingDiagnosticEvent(e)),n.sendEvents(e,c,!0).then(()=>{}).catch(()=>{})}function b(){let e,n;g((n={kind:a?"diagnostic-combined":"diagnostic",id:s,creationDate:e=(new Date).getTime(),...r.getProps()},a&&(n={...n,...m()}),r.reset(e),n)),h=setTimeout(b,u),d=(new Date).getTime(),a&&function(){if(t.isEnabled()){let e={...r.getProps()};t.set(l,JSON.stringify(e))}}()}return f.start=()=>{a?function(e){if(!t.isEnabled())return e(!1);t.get(l).then(t=>{if(t)try{let e=JSON.parse(t);r.setProps(e),d=e.dataSinceDate}catch(e){}e(!0)}).catch(()=>{e(!1)})}(e=>{if(e){let e=(d||0)+u,t=(new Date).getTime();t>=e?b():h=setTimeout(b,e-t)}else 0===Math.floor(4*Math.random())?b():h=setTimeout(b,u)}):(g({kind:"diagnostic-init",id:s,creationDate:r.getProps().dataSinceDate,...m()}),h=setTimeout(b,u))},f.stop=()=>{h&&clearTimeout(h)},f.setStreaming=e=>{p=e},f},xy=function(e,t){let r=!1,n={type:e.type,name:e.name,synchronous:e.synchronous,method:(...i)=>{try{e.method(...i)}catch{r||(r=!0,t.warn(w_.inspectorMethodError(n.type,n.name)))}}};return n};let{onNextTick:xw}=y6,xx={flagUsed:"flag-used",flagDetailsChanged:"flag-details-changed",flagDetailChanged:"flag-detail-changed",clientIdentityChanged:"client-identity-changed"};Object.freeze(xx);let{LDTimeoutError:xk}=yH,xS="unknown hook";function x_(e,t,r,n,i){try{return n()}catch(n){return e?.error(`An error was encountered in "${t}" of the "${r}" hook: ${n}`),i}}function xC(e,t){try{return t.getMetadata().name||xS}catch{return e.error("Exception thrown getting metadata for hook. Unable to get hook name."),xS}}var xT=function(e,t){let r=t?[...t]:[];return{withEvaluation:function(t,n,i,o){if(0===r.length)return o();let s=[...r],a={flagKey:t,context:n,defaultValue:i},l=s.map(t=>x_(e,"beforeEvaluation",xC(e,t),()=>t?.beforeEvaluation?.(a,{})??{},{})),c=o();return function(e,t,r,n,i){for(let o=t.length-1;o>=0;o-=1){let s=t[o],a=n[o];x_(e,"afterEvaluation",xC(e,s),()=>s?.afterEvaluation?.(r,a,i)??{},{})}}(e,s,a,l,c),c},identify:function(t,n){let i=[...r],o={context:t,timeout:n},s=i.map(t=>x_(e,"beforeIdentify",xC(e,t),()=>t?.beforeIdentify?.(o,{})??{},{}));return t=>{for(let r=i.length-1;r>=0;r-=1){let n=i[r],a=s[r];x_(e,"afterIdentify",xC(e,n),()=>n?.afterIdentify?.(o,a,t)??{},{})}}},addHook:function(e){r.push(e)},afterTrack:function(t){if(0!==r.length){var n=[...r];for(let r=n.length-1;r>=0;r-=1){let i=n[r];x_(e,"afterTrack",xC(e,i),()=>i?.afterTrack?.(t),void 0)}}}}},xI=function(){let e,t={};function r(r){return e&&y6.objectHasOwnProperty(e,r)&&e[r]?e[r]:t&&y6.objectHasOwnProperty(t,r)&&t[r]&&!t[r].deleted?t[r]:null}return{clearAllOverrides:function(){if(!e)return{};let t={...e};return e=void 0,t},get:r,getFlagOverrides:function(){return e||{}},getFlags:function(){return t},getFlagsWithOverrides:function(){let n={};for(let e in t){let t=r(e);t&&(n[e]=t)}if(e)for(let t in e){let e=r(t);e&&(n[t]=e)}return n},removeOverride:function(t){e&&e[t]&&(delete e[t],0===Object.keys(e).length&&(e=void 0))},setFlags:function(e){t={...e}},setOverride:function(t,r){e||(e={}),e[t]={value:r}}}};let xE="unknown plugin";function xR(e,t){try{return t.getMetadata().name||xE}catch(t){return e.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),xE}}let{commonBasicLogger:xO}=wx,{checkContext:xL,getContextKeys:xA}=wX,{InspectorTypes:xN,InspectorManager:xZ}={InspectorTypes:xx,InspectorManager:function(e,t){let r={},n={[xx.flagUsed]:[],[xx.flagDetailsChanged]:[],[xx.flagDetailChanged]:[],[xx.clientIdentityChanged]:[]},i={[xx.flagUsed]:[],[xx.flagDetailsChanged]:[],[xx.flagDetailChanged]:[],[xx.clientIdentityChanged]:[]},o=e&&e.map(e=>xy(e,t));return o&&o.forEach(e=>{Object.prototype.hasOwnProperty.call(n,e.type)&&!e.synchronous?n[e.type].push(e):Object.prototype.hasOwnProperty.call(i,e.type)&&e.synchronous?i[e.type].push(e):t.warn(w_.invalidInspector(e.type,e.name))}),r.hasListeners=e=>n[e]&&n[e].length||i[e]&&i[e].length,r.onFlagUsed=(e,t,r)=>{let o=xx.flagUsed;i[o].length&&i[o].forEach(n=>n.method(e,t,r)),n[o].length&&xw(()=>{n[o].forEach(n=>n.method(e,t,r))})},r.onFlags=e=>{let t=xx.flagDetailsChanged;i[t].length&&i[t].forEach(t=>t.method(e)),n[t].length&&xw(()=>{n[t].forEach(t=>t.method(e))})},r.onFlagChanged=(e,t)=>{let r=xx.flagDetailChanged;i[r].length&&i[r].forEach(r=>r.method(e,t)),n[r].length&&xw(()=>{n[r].forEach(r=>r.method(e,t))})},r.onIdentityChanged=e=>{let t=xx.clientIdentityChanged;i[t].length&&i[t].forEach(t=>t.method(e)),n[t].length&&xw(()=>{n[t].forEach(t=>t.method(e))})},r}},{getPluginHooks:xM,registerPlugins:xG,registerPluginsForDebugOverride:xV,createPluginEnvironment:xW}={getPluginHooks:function(e,t,r){let n=[];return r.forEach(r=>{try{let i=r.getHooks?.(t);void 0===i?e.error(`Plugin ${xR(e,r)} returned undefined from getHooks.`):i&&i.length>0&&n.push(...i)}catch(t){e.error(`Exception thrown getting hooks for plugin ${xR(e,r)}. Unable to get hooks.`)}}),n},registerPlugins:function(e,t,r,n){n.forEach(n=>{try{n.register(r,t)}catch(t){e.error(`Exception thrown registering plugin ${xR(e,n)}.`)}})},registerPluginsForDebugOverride:function(e,t,r){r.forEach(r=>{try{r.registerDebug?.(t)}catch(t){e.error(`Exception thrown registering debug override with plugin ${xR(e,r)}.`)}})},createPluginEnvironment:function(e,t,r){let n={};e.userAgent&&(n.name=e.userAgent),e.version&&(n.version=e.version),r.wrapperName&&(n.wrapperName=r.wrapperName),r.wrapperVersion&&(n.wrapperVersion=r.wrapperVersion);let i={};r.application&&(r.application.name&&(i.name=r.application.name),r.application.version&&(i.version=r.application.version));let o={sdk:n,clientSideId:t};return Object.keys(i).length>0&&(o.application=i),o}},xP="change",xj="internal-change";var xX=function(e,t,r,n,i){var o;let s,a,l,c,u,d=r&&r.logger?r.logger:i&&i.logger&&i.logger.default||xO("warn"),h=w0(d),p=w3(h),f=wO.validate(r,h,i,d),m=xZ(f.inspectors,d),g=f.sendEvents,b=e,v=f.hash,y=[...f.plugins],w=xW(n,e,f),x=xM(d,w,y),k=xT(d,[...f.hooks,...x]),S=w4(n.localStorage,d),_=wG(n,b,f),C=f.sendEvents&&!f.diagnosticOptOut,T=C?xg(b):null,I=C?xb((new Date).getTime()):null,E=C?xv(n,S,I,_,b,f,T):null,R=xn(n,f,b,I),O=f.eventProcessor||w$(n,f,b,I,h,_),L=xl(n,f,b),A=xI(),N,Z,M,G=f.streaming,V=!1,W=!1,P=!0,j=f.stateProvider,X=xc(null,function(e){!j&&e&&z({kind:"identify",context:e,creationDate:(new Date).getTime()}),m.hasListeners(xN.clientIdentityChanged)&&m.onIdentityChanged(X.getContext())}),D=new xh(S),F=S.isEnabled()?w9(S,b,v,X):null;function z(e){b&&(j&&j.enqueueEvent&&j.enqueueEvent(e)||(e.context?(P=!1,!g||W||n.isDoNotTrack()||(d.debug(w_.debugEnqueueingEvent(e.kind)),O.enqueue(e))):P&&(d.warn(w_.eventWithoutContext()),P=!1)))}function B(e,t){m.hasListeners(xN.flagDetailChanged)&&m.onFlagChanged(e.key,J(t))}function U(){m.hasListeners(xN.flagDetailsChanged)&&m.onFlags(Object.entries(A.getFlagsWithOverrides()).map(([e,t])=>({key:e,detail:J(t)})).reduce((e,t)=>(e[t.key]=t.detail,e),{}))}function H(e,t,r,n){let i=X.getContext(),o=new Date,s={kind:"feature",key:e,context:i,value:t?t.value:null,variation:t?t.variationIndex:null,default:r,creationDate:o.getTime()},a=A.getFlags()[e];a&&(s.version=a.flagVersion?a.flagVersion:a.version,s.trackEvents=a.trackEvents,s.debugEventsUntilDate=a.debugEventsUntilDate),(n||a&&a.trackReason)&&t&&(s.reason=t.reason),z(s)}function Y(e){return xL(e,!1)?Promise.resolve(e):Promise.reject(new yH.LDInvalidUserError(w_.invalidContext()))}function K(e,t,r,n,i,o){var s;let a,l=A.get(e);return l?(a=J(l),null!==l.value&&void 0!==l.value||(a.value=t)):a={value:t,variationIndex:null,reason:{kind:"ERROR",errorKind:"FLAG_NOT_FOUND"}},r&&(i||l?.prerequisites?.forEach(e=>{K(e,void 0,r,!1,!1,!1)}),H(e,a,t,n)),!i&&o&&(s=a,m.hasListeners(xN.flagUsed)&&m.onFlagUsed(e,s,X.getContext())),a}function J(e){return{value:e.value,variationIndex:void 0===e.variation?null:e.variation,reason:e.reason||null}}function Q(){if(Z=!0,!X.getContext())return;let e=e=>{try{return JSON.parse(e)}catch(e){return void h.maybeReportError(new yH.LDInvalidDataError(w_.invalidData()))}};R.connect(X.getContext(),v,{ping:function(){d.debug(w_.debugStreamPing());let e=X.getContext();L.fetchFlagSettings(e,v).then(t=>{y6.deepEquals(e,X.getContext())&&$(t||{})}).catch(e=>{h.maybeReportError(new yH.LDFlagFetchError(w_.errorFetchingFlags(e)))})},put:function(t){let r=e(t.data);r&&(d.debug(w_.debugStreamPut()),$(r))},patch:function(t){let r=e(t.data);if(!r)return;let n=A.getFlags(),i=n[r.key];if(i&&i.version&&r.version&&!(i.version<r.version))d.debug(w_.debugStreamPatchIgnored(r.key));else{d.debug(w_.debugStreamPatch(r.key));let e={},t=y6.extend({},r);delete t.key,n[r.key]=t,A.setFlags(n);let o=J(t);e[r.key]=i?{previous:i.value,current:o}:{current:o},B(r,t),ee(e)}},delete:function(t){let r=e(t.data);if(!r)return;let n=A.getFlags();if(!n[r.key]||n[r.key].version<r.version){d.debug(w_.debugStreamDelete(r.key));let e={};n[r.key]&&!n[r.key].deleted&&(e[r.key]={previous:n[r.key].value}),n[r.key]={version:r.version,deleted:!0},A.setFlags(n),B(r,n[r.key]),ee(e)}else d.debug(w_.debugStreamDeleteIgnored(r.key))}})}function q(){Z&&(R.disconnect(),Z=!1)}function $(e){let t={};if(!e)return Promise.resolve();let r=A.getFlags();for(let n in r)y6.objectHasOwnProperty(r,n)&&r[n]&&(e[n]&&!y6.deepEquals(e[n].value,r[n].value)?t[n]={previous:r[n].value,current:J(e[n])}:e[n]&&!e[n].deleted||(t[n]={previous:r[n].value}));for(let n in e)y6.objectHasOwnProperty(e,n)&&e[n]&&(!r[n]||r[n].deleted)&&(t[n]={current:J(e[n])});return A.setFlags({...e}),U(),ee(t).catch(()=>{})}function ee(e){let t=Object.keys(e);if(t.length>0){let r={};t.forEach(t=>{let n=e[t].current,i=n?n.value:void 0,o=e[t].previous;h.emit(xP+":"+t,i,o),r[t]=n?{current:i,previous:o}:{previous:o}}),h.emit(xP,r),h.emit(xj,A.getFlagsWithOverrides()),f.sendEventsOnlyForVariation||j||t.forEach(t=>{H(t,e[t].current)})}return N&&F?F.saveFlags(A.getFlags()):Promise.resolve()}function et(){let e=G||M&&void 0===G;e&&!Z?Q():!e&&Z&&q(),E&&E.setStreaming(e)}function er(e){return e===xP||e.substr(0,7)===xP+":"}if("string"==typeof f.bootstrap&&"LOCALSTORAGE"===f.bootstrap.toUpperCase()&&(F?N=!0:d.warn(w_.localStorageUnavailable())),"object"==typeof f.bootstrap&&A.setFlags((s=Object.keys(o=f.bootstrap),l="$valid",(c=o[a="$flagsState"])||!s.length||d.warn(w_.bootstrapOldFormat()),!1===o[l]&&d.warn(w_.bootstrapInvalid()),u={},s.forEach(e=>{if(e!==a&&e!==l){let t={value:o[e]};c&&c[e]?t=y6.extend(t,c[e]):t.version=0,u[e]=t}}),u)),j){let e=j.getInitialState();e?en(e):j.on("init",en),j.on("update",function(e){e.context&&X.setContext(e.context),e.flags&&$(e.flags)})}else{let r;(!e?Promise.reject(new yH.LDInvalidEnvironmentIdError(w_.environmentNotSpecified())):D.processContext(t).then(Y).then(e=>(r=y6.once(k.identify(e,void 0)),e)).then(e=>(r?.({status:"completed"}),X.setContext(e),"object"==typeof f.bootstrap?ei():N?F.loadFlags().then(e=>null==e?(A.setFlags({}),L.fetchFlagSettings(X.getContext(),v).then(e=>$(e||{})).then(ei).catch(e=>{eo(new yH.LDFlagFetchError(w_.errorFetchingFlags(e)))})):(A.setFlags(e),y6.onNextTick(ei),L.fetchFlagSettings(X.getContext(),v).then(e=>$(e)).catch(e=>h.maybeReportError(e)))):L.fetchFlagSettings(X.getContext(),v).then(e=>{A.setFlags(e||{}),U(),ei()}).catch(e=>{A.setFlags({}),eo(e)}))).catch(e=>{throw r?.({status:"error"}),e})).catch(eo)}function en(e){b=e.environment,X.setContext(e.context),A.setFlags({...e.flags}),y6.onNextTick(ei)}function ei(){d.info(w_.clientInitialized()),V=!0,et(),p.signalSuccess()}function eo(e){p.signalFailure(e)}let es={waitForInitialization:function(e){if(null!=e){if("number"==typeof e){let t;return e>5&&d.warn("The waitForInitialization function was called with a timeout greater than 5 seconds. We recommend a timeout of 5 seconds or less."),t=p.getInitializationPromise(),Promise.race([new Promise((t,r)=>{setTimeout(()=>{r(new xk(`waitForInitialization timed out after ${e} seconds.`))},1e3*e)}),t]).catch(e=>{throw e instanceof yH.LDTimeoutError&&d.error(`waitForInitialization error: ${e}`),e})}d.warn("The waitForInitialization method was provided with a non-numeric timeout.")}return d.warn("The waitForInitialization function was called without a timeout specified. In a future version a default timeout will be applied."),p.getInitializationPromise()},waitUntilReady:()=>p.getReadyPromise(),identify:function(e,t,r){let n;if(W)return y6.wrapPromiseCallback(Promise.resolve({}),r);if(j)return d.warn(w_.identifyDisabled()),y6.wrapPromiseCallback(Promise.resolve(y6.transformVersionedValuesToValues(A.getFlagsWithOverrides())),r);let i=N&&F?F.clearFlags():Promise.resolve();return y6.wrapPromiseCallback(i.then(()=>D.processContext(e)).then(Y).then(e=>(n=y6.once(k.identify(e,void 0)),e)).then(e=>L.fetchFlagSettings(e,t).then(r=>{let n=y6.transformVersionedValuesToValues(r);return X.setContext(e),v=t,r?$(r).then(()=>n):n})).then(e=>(n?.({status:"completed"}),Z&&Q(),e)).catch(e=>(n?.({status:"error"}),h.maybeReportError(e),Promise.reject(e))),r)},getContext:function(){return X.getContext()},variation:function(e,t){let{value:r}=k.withEvaluation(e,X.getContext(),t,()=>K(e,t,!0,!1,!1,!0));return r},variationDetail:function(e,t){return k.withEvaluation(e,X.getContext(),t,()=>K(e,t,!0,!0,!1,!0))},track:function(e,t,r){if("string"!=typeof e)return void h.maybeReportError(new yH.LDInvalidEventKeyError(w_.unknownCustomEventKey(e)));void 0!==r&&"number"!=typeof r&&d.warn(w_.invalidMetricValue(typeof r)),n.customEventFilter&&!n.customEventFilter(e)&&d.warn(w_.unknownCustomEventKey(e));let i=X.getContext(),o={kind:"custom",key:e,context:i,url:n.getCurrentUrl(),creationDate:(new Date).getTime()};i&&i.anonymous&&(o.contextKind=i.anonymous?"anonymousUser":"user"),null!=t&&(o.data=t),null!=r&&(o.metricValue=r),z(o),k.afterTrack({context:i,key:e,data:t,metricValue:r})},on:function(e,t,r){er(e)?(M=!0,V&&et(),h.on(e,t,r)):h.on(...arguments)},off:function(e){if(h.off(...arguments),er(e)){let e=!1;h.getEvents().forEach(t=>{er(t)&&h.getEventListenerCount(t)>0&&(e=!0)}),e||(M=!1,Z&&void 0===G&&q())}},setStreaming:function(e){let t=null===e?void 0:e;t!==G&&(G=t,et())},flush:function(e){return y6.wrapPromiseCallback(g?O.flush():Promise.resolve(),e)},allFlags:function(){let e={},t=A.getFlagsWithOverrides();if(!t)return e;for(let r in t)e[r]=K(r,null,!f.sendEventsOnlyForVariation,!1,!0,!1).value;return e},close:function(e){if(W)return y6.wrapPromiseCallback(Promise.resolve(),e);let t=()=>{W=!0,A.setFlags({})},r=Promise.resolve().then(()=>{if(q(),E&&E.stop(),g)return O.stop(),O.flush()}).then(t).catch(t);return y6.wrapPromiseCallback(r,e)},addHook:function(e){k.addHook(e)}};return xG(d,w,es,y),xV(d,{setOverride:function(e,t){let r={},n=A.get(e),i=n?n.value:null;if(i===t)return void d.debug(`setOverride: No change needed for ${e}, value already ${t}`);A.setOverride(e,t);let o=A.get(e),s=J(o);r[e]={previous:i,current:s},B({key:e},o),ee(r)},removeOverride:function(e){let t=A.getFlagOverrides();if(!t[e])return;let r={},n=t[e],i=A.getFlags()[e];r[e]={previous:n.value,current:i?J(i):void 0},A.removeOverride(e),B({key:e},i),ee(r)},clearAllOverrides:function(){let e=A.getFlagOverrides();if(0===Object.keys(e).length)return;let t={},r=A.getFlags();Object.keys(e).forEach(n=>{let i=e[n],o=r[n];t[n]={previous:i.value,current:o?J(o):void 0}}),A.clearAllOverrides(),Object.keys(t).length>0&&ee(t)},getAllOverrides:function(){let e=A.getFlagOverrides();if(!e)return{};let t={};return Object.keys(e).forEach(r=>{let n=e[r];n&&(t[r]=n.value)}),t}},y),{client:es,options:f,emitter:h,ident:X,logger:d,requestor:L,start:function(){g&&(E&&E.start(),O.start())},enqueueEvent:z,getFlagsInternal:function(){return A.getFlagsWithOverrides()},getEnvironmentId:()=>b,internalChangeEventName:xj}};function xD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xF(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xD(Object(r),!0).forEach(function(t){!function(e,t,r){var n;(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:n+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xD(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var xz={promise:Promise.resolve({status:200,header:function(){return null},body:null})},xB=e=>{if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function xU(e,t){for(var r={},n=null,i=[],o=0;o<e.length;o++)for(var s=e[o],a=s.urls||[],l=0;l<a.length;l++)if(function(e,t,r,n){var i,o,s=(("substring"===e.kind||"regex"===e.kind)&&n.includes("/")?t:t.replace(n,"")).replace(r,"");switch(e.kind){case"exact":o=t,i=RegExp("^"+xB(e.url)+"/?$");break;case"canonical":o=s,i=RegExp("^"+xB(e.url)+"/?$");break;case"substring":o=s,i=RegExp(".*"+xB(e.substring)+".*$");break;case"regex":o=s,i=new RegExp(e.pattern);break;default:return!1}return i.test(o)}(a[l],window.location.href,window.location.search,window.location.hash)){"pageview"===s.kind?t("pageview",s):(i.push(s),t("click_pageview",s));break}return i.length>0&&(n=function(e){for(var r=function(e,t){for(var r=[],n=0;n<t.length;n++)for(var i=e.target,o=t[n],s=o.selector,a=document.querySelectorAll(s);i&&a.length>0;){for(var l=0;l<a.length;l++)i===a[l]&&r.push(o);i=i.parentNode}return r}(e,i),n=0;n<r.length;n++)t("click",r[n])},document.addEventListener("click",n)),r.dispose=function(){document.removeEventListener("click",n)},r}var xH="goalsReady",xY={fetchGoals:{default:!0},hash:{type:"string"},eventProcessor:{type:"object"},eventUrlTransformer:{type:"function"},disableSyncEventPost:{default:!1}};let xK=null;function xJ(e,t){return()=>xK?xK.variation(e,t):t}let xQ=(0,L.createContext)(null);function xq({children:e,clientSideId:t,initialContext:r,baseUrl:n,streamUrl:i,eventsUrl:o,backendUrl:s,observabilityOtlpEndpoint:a}){let[l,c]=(0,L.useState)(null),[u,d]=(0,L.useState)(!1),[h,p]=(0,L.useState)(null);(0,L.useEffect)(()=>{if(!t)return;let e=!0,l=null;return(async()=>{try{d(!0),p(null);let u=new yg({manualStart:!0,...s&&{backendUrl:s},...a&&{otel:{otlpEndpoint:a}},networkRecording:{enabled:!0,recordHeadersAndBody:!0},reportConsoleErrors:!0}),h=new yb.q({manualStart:!0,privacySetting:"default",...s&&{backendUrl:s},blockSelector:"body > *:not(#ld-toolbar)"}),f={...n&&{baseUrl:n},...i&&{streamUrl:i},...o&&{eventsUrl:o},plugins:[u,h]},m=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=function(e){var t,r={userAgentHeaderName:"X-LaunchDarkly-User-Agent",synchronousFlush:!1};if(window.XMLHttpRequest){var n=e&&e.disableSyncEventPost;r.httpRequest=function(e,t,i,o){var s=!n&r.synchronousFlush;return r.synchronousFlush=!1,function(e,t,r,n,i){if(i&&!function(){var e=window.navigator&&window.navigator.userAgent;if(e){var t=e.match(/Chrom(e|ium)\/([0-9]+)\./);if(t)return 73>parseInt(t[2],10)}return!0}())return xz;var o,s=new window.XMLHttpRequest;for(var a in s.open(e,t,!i),r||{})Object.prototype.hasOwnProperty.call(r,a)&&s.setRequestHeader(a,r[a]);if(i){try{s.send(n)}catch(e){}return xz}return{promise:new Promise(function(e,t){s.addEventListener("load",function(){o||e({status:s.status,header:function(e){return s.getResponseHeader(e)},body:s.responseText})}),s.addEventListener("error",function(){o||t(Error())}),s.send(n)}),cancel:function(){o=!0,s.abort()}}}(e,t,i,o,s)}}r.httpAllowsPost=function(){return void 0===t&&(t=!!window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest),t},r.httpFallbackPing=function(e){(new window.Image).src=e};var i,o=e&&e.eventUrlTransformer;r.getCurrentUrl=function(){return o?o(window.location.href):window.location.href},r.isDoNotTrack=function(){var e;return 1===(e=window.navigator&&void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:window.navigator&&void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack)||!0===e||"1"===e||"yes"===e};try{window.localStorage&&(r.localStorage={get:function(e){return new Promise(function(t){t(window.localStorage.getItem(e))})},set:function(e,t){return new Promise(function(r){window.localStorage.setItem(e,t),r()})},clear:function(e){return new Promise(function(t){window.localStorage.removeItem(e),t()})}})}catch(e){r.localStorage=null}return e&&e.useReport&&"function"==typeof window.EventSourcePolyfill&&window.EventSourcePolyfill.supportedOptions&&window.EventSourcePolyfill.supportedOptions.method?(r.eventSourceAllowsReport=!0,i=window.EventSourcePolyfill):(r.eventSourceAllowsReport=!1,i=window.EventSource),window.EventSource&&(r.eventSourceFactory=function(e,t){var r=xF(xF({},{heartbeatTimeout:3e5,silentTimeout:3e5,skipDefaultHeaders:!0}),t);return new i(e,r)},r.eventSourceIsActive=function(e){return e.readyState===window.EventSource.OPEN||e.readyState===window.EventSource.CONNECTING}),r.userAgent="JSClient",r.version="3.9.0",r.diagnosticSdkData={name:"js-client-sdk",version:"3.9.0"},r.diagnosticPlatformData={name:"JS"},r.diagnosticUseCombinedEvent=!0,r}(r),i=xX(e,t,r,n,xY),o=i.client,s=i.options,a=i.emitter,l=new Promise(function(e){var t=a.on(xH,function(){a.off(xH,t),e()})});o.waitUntilGoalsReady=function(){return l},s.fetchGoals?function(e,t){var r,n;function i(){n&&n.dispose(),r&&r.length&&(n=xU(r,o))}function o(t,r){var n=e.ident.getContext(),i={kind:t,key:r.key,data:null,url:window.location.href,creationDate:(new Date).getTime(),context:n};return"click"===t&&(i.selector=r.selector),e.enqueueEvent(i)}e.requestor.fetchJSON("/sdk/goals/"+e.getEnvironmentId()).then(function(e){e&&e.length>0&&(n=xU(r=e,o),function(e,t){var r,n=window.location.href;function i(){(r=window.location.href)!==n&&(n=r,t())}!function e(t,r){t(),setTimeout(function(){e(t,r)},r)}(i,300),window.history&&window.history.pushState?window.addEventListener("popstate",i):window.addEventListener("hashchange",i)}(0,i)),t()}).catch(function(r){e.emitter.maybeReportError(new yH.LDUnexpectedResponseError((r&&r.message,r.message))),t()})}(i,function(){return a.emit(xH)}):a.emit(xH),"complete"!==document.readyState?window.addEventListener("load",i.start):i.start();var c=function(){n.synchronousFlush=!0,o.flush().catch(function(){}),n.synchronousFlush=!1};return document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&c()}),window.addEventListener("pagehide",c),o}(t,r||{kind:"user",key:"toolbar-anonymous",anonymous:!0},f);l=m,await m.waitForInitialization(5),e&&(c(m),xK=m,d(!1),console.log("[InternalClientProvider] Internal client initialized"))}catch(t){console.error("[InternalClientProvider] Failed to initialize internal client:",t),e&&(p(t instanceof Error?t:Error("Failed to initialize client")),d(!1))}})(),()=>{(e=!1,l)&&(xK=null,l.close())}},[t,r,n,i,o,s,a]);let f=(0,L.useCallback)(async(e,t)=>{if(l)return new Promise(r=>{l.identify({kind:"multi",account:{key:e},user:{key:t}},void 0,e=>{e&&console.error("[InternalClientProvider] Failed to update context:",e),r()})})},[l]);return(0,O.jsx)(xQ.Provider,{value:{client:l,loading:u,error:h,updateContext:f},children:e})}function x$(){let e=(0,L.useContext)(xQ);if(!e)throw Error("useInternalClient must be used within InternalClientProvider");return e}let x0=(0,L.createContext)(void 0);function x1({children:e}){let[t,r]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return!1;let t=JSON.parse(e);return"boolean"==typeof t.isOptedInToAnalytics&&t.isOptedInToAnalytics}catch(e){return console.warn("Failed to load is opted in to analytics from localStorage:",e),!1}})()),[n,i]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return!1;let t=JSON.parse(e);return"boolean"==typeof t.isOptedInToEnhancedAnalytics&&t.isOptedInToEnhancedAnalytics}catch(e){return console.warn("Failed to load is opted in to enhanced analytics from localStorage:",e),!1}})()),[o,s]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return!1;let t=JSON.parse(e);return"boolean"==typeof t.isOptedInToSessionReplay&&t.isOptedInToSessionReplay}catch(e){return console.warn("Failed to load is opted in to session replay from localStorage:",e),!1}})()),a=(0,L.useCallback)(e=>{yO("isOptedInToEnhancedAnalytics",e),i(e)},[]),l=(0,L.useCallback)(e=>{yO("isOptedInToSessionReplay",e),s(e)},[]),c=(0,L.useCallback)(e=>{yO("isOptedInToAnalytics",e),r(e),e||(a(!1),l(!1))},[a,l]),u=(0,L.useMemo)(()=>({isOptedInToAnalytics:t,isOptedInToEnhancedAnalytics:n,isOptedInToSessionReplay:o,handleToggleAnalyticsOptOut:c,handleToggleEnhancedAnalyticsOptOut:a,handleToggleSessionReplayOptOut:l}),[t,n,o,c,a,l]);return(0,O.jsx)(x0.Provider,{value:u,children:e})}function x2(){let e=(0,L.useContext)(x0);if(void 0===e)throw Error("useAnalyticsPreferences must be used within an AnalyticsPreferencesProvider");return e}let x5=(0,L.createContext)(null);function x3({children:e,mode:t}){let{client:r,loading:n}=x$(),{isOptedInToAnalytics:i}=x2(),o=(0,L.useMemo)(()=>new yP(r,t,i),[r,t,i]),s=(0,L.useRef)(null);return(0,L.useEffect)(()=>{s.current||!r||n||o.trackInitialization(),s.current=r},[o,n,r]),(0,O.jsx)(x5.Provider,{value:{analytics:o},children:e})}function x9(){let e=(0,L.useContext)(x5);if(!e)throw Error("useAnalytics must be used within an AnalyticsProvider");return e.analytics}let x4=(0,L.createContext)(void 0);function x6({children:e}){let[t,r]=(0,L.useState)(void 0),n=(0,L.useCallback)(e=>{r(e)},[]);return(0,O.jsx)(x4.Provider,{value:{activeTab:t,setActiveTab:n},children:e})}function x7(){let e=(0,L.useContext)(x4);if(!e)throw Error("useActiveTabContext must be used within an ActiveTabProvider");return e}let x8="logout",ke=e=>`${e}-response`,kt=e=>`${e}-error`,kr=(0,L.createContext)(null);function kn({children:e,authUrl:t}){let r=(0,L.useRef)(null),n=(0,L.useMemo)(()=>t,[t]),[i,o]=(0,L.useState)(!1),s=(0,L.useCallback)(()=>{o(!0)},[]);return(0,O.jsx)(kr.Provider,{value:{ref:r,iframeSrc:n,iframeLoaded:i,onIFrameLoad:s},children:e})}function ki(){let e=(0,L.useContext)(kr);if(!e)throw Error("useIFrameContext must be used within an IFrameProvider");return e}let ko=(0,L.createContext)(void 0);function ks({children:e}){let[t,r]=(0,L.useState)(!1),[n,i]=(0,L.useState)(!0),[o,s]=(0,L.useState)(!1),[a,l]=(0,L.useState)(!1),c=(0,L.useRef)(!1),{iframeSrc:u,iframeLoaded:d,ref:h}=ki(),p=x9(),{updateContext:f}=x$(),{isOptedInToEnhancedAnalytics:m}=x2(),g=(0,L.useCallback)(async e=>{if(e.origin===u){if(c.current=!0,"toolbar-authenticated"===e.data.type)p.trackLoginSuccess(),e.data.accountId&&e.data.memberId&&(m&&await f(e.data.accountId,e.data.memberId),r(!0),i(!1));else if("toolbar-authentication-required"===e.data.type)r(!1),i(!1);else if("toolbar-authentication-error"===e.data.type)throw r(!1),i(!1),p.trackAuthError(Error(e.data.error)),Error(e.data.error);else if(e.data.type===ke(x8))r(!1),i(!1);else if(e.data.type===kt(x8))throw r(!1),i(!1),Error(e.data.error)}},[f,u,m]);(0,L.useEffect)(()=>{if(!d||c.current)return;let e=setTimeout(()=>{c.current||(l(!0),i(!1))},5e3);return()=>clearTimeout(e)},[d]);let b=(0,L.useCallback)(()=>{let e=h.current;e?.contentWindow&&e.contentWindow.postMessage({type:x8},u)},[h,u]);return(0,L.useEffect)(()=>(window.addEventListener("message",g),()=>{window.removeEventListener("message",g)}),[g]),(0,O.jsx)(ko.Provider,{value:{authenticated:t,loading:n,authenticating:o,iframeError:a,setAuthenticating:s,logout:b},children:e})}function ka(){let e=(0,L.useContext)(ko);if(!e)throw Error("useAuthContext must be used within an AuthProvider");return e}let kl=(0,L.createContext)(void 0);function kc({children:e}){let[t,r]=(0,L.useState)(""),n=x9();return(0,L.useEffect)(()=>{n.trackSearch(t)},[t,n]),(0,O.jsx)(kl.Provider,{value:{searchTerm:t,setSearchTerm:r},children:e})}let ku=(0,L.createContext)(void 0);function kd({children:e,domId:t,devServerUrl:r}){let{setSearchTerm:n}=function(){let e=(0,L.useContext)(kl);if(!e)throw Error("useSearchContext must be used within a SearchProvider");return e}(),i=x9(),{activeTab:o,setActiveTab:s}=x7(),a=x2(),[l,c]=(0,L.useState)(!1),[u,d]=(0,L.useState)(),[h,p]=(0,L.useState)(!1),[f,m]=(0,L.useState)(!1),[g,b]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return!1;let t=JSON.parse(e);return"boolean"==typeof t.reloadOnFlagChange&&t.reloadOnFlagChange}catch(e){return console.warn("Failed to load reload on flag change from localStorage:",e),!1}})()),[v,y]=(0,L.useState)(()=>(function(){try{let e=localStorage.getItem(yk);if(!e)return!1;let t=JSON.parse(e);return"boolean"==typeof t.autoCollapse&&t.autoCollapse}catch(e){return console.warn("Failed to load toolbar auto-collapse state from localStorage:",e),!1}})()),[w]=(0,L.useState)(()=>yw(r)),x=(0,L.useRef)(!1),k=(0,L.useRef)(null),S=(0,L.useMemo)(()=>o&&u?yv.indexOf(o)>yv.indexOf(u)?1:-1:1,[o,u]),_=(0,L.useCallback)(e=>{if(!h){if(console.log("newTabId",e),e===o&&l){i.trackToolbarToggle("collapse","tab_toggle"),c(!1);return}m(!1),n(""),i.trackTabChange(o||null,e),d(o),s(e),l||c(!0)}},[o,l,n,h,i,s]),C=(0,L.useCallback)(()=>{i.trackToolbarToggle("collapse","close_button"),c(!1)},[i]),T=(0,L.useCallback)(e=>{n(e)},[n]),I=(0,L.useCallback)(()=>{y(e=>{let t=!e;return yO("autoCollapse",t),t})},[]),E=(0,L.useCallback)(()=>{b(e=>{let t=!e;return yO("reloadOnFlagChange",t),t})},[]),R=(0,L.useCallback)(()=>{l||c(!0)},[l]);(0,L.useEffect)(()=>{l&&(x.current=!0)},[l]),(0,L.useEffect)(()=>{let e=e=>{let r=e.composedPath().some(e=>e.id===t);l&&v&&k.current&&!r&&(i.trackToolbarToggle("collapse","click_outside"),c(!1))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l,v,i,t]);let A=(0,L.useMemo)(()=>({isExpanded:l,previousTab:u,isAnimating:h,searchIsExpanded:f,slideDirection:S,hasBeenExpanded:x.current,reloadOnFlagChangeIsEnabled:g,isAutoCollapseEnabled:v,mode:w,isOptedInToAnalytics:a.isOptedInToAnalytics,isOptedInToEnhancedAnalytics:a.isOptedInToEnhancedAnalytics,isOptedInToSessionReplay:a.isOptedInToSessionReplay,toolbarRef:k,handleTabChange:_,handleClose:C,handleSearch:T,handleToggleReloadOnFlagChange:E,handleToggleAutoCollapse:I,handleCircleClick:R,setIsAnimating:p,setSearchIsExpanded:m,handleToggleAnalyticsOptOut:a.handleToggleAnalyticsOptOut,handleToggleEnhancedAnalyticsOptOut:a.handleToggleEnhancedAnalyticsOptOut,handleToggleSessionReplayOptOut:a.handleToggleSessionReplayOptOut}),[l,u,h,f,S,g,v,w,a,_,C,T,E,I,R]);return(0,O.jsx)(ku.Provider,{value:A,children:e})}function kh(){let e=(0,L.useContext)(ku);if(void 0===e)throw Error("useToolbarState must be used within a ToolbarStateProvider");return e}function kp(e){let{mode:t,baseUrl:r,clientSideId:n,streamUrl:i,eventsUrl:o,backendUrl:s,observabilityOtlpEndpoint:a,children:l}=e;return(0,O.jsx)(x1,{children:(0,O.jsx)(xq,{clientSideId:n,baseUrl:r,streamUrl:i,eventsUrl:o,backendUrl:s,observabilityOtlpEndpoint:a,children:(0,O.jsx)(x3,{mode:t,children:l})})})}let kf=(0,L.createContext)(void 0);function km({children:e,baseUrl:t,flagOverridePlugin:r,eventInterceptionPlugin:n}){return(0,O.jsx)(kf.Provider,{value:{baseUrl:t,flagOverridePlugin:r,eventInterceptionPlugin:n},children:e})}function kg(){let e=(0,L.useContext)(kf);if(void 0===e)throw Error("usePlugins must be used within a PluginsProvider");return e}function kb(e){let{initialPosition:t,domId:r,devServerUrl:n,baseUrl:i,flagOverridePlugin:o,eventInterceptionPlugin:s,children:a}=e;return(0,O.jsx)(yV,{initialPosition:t,children:(0,O.jsx)(kc,{children:(0,O.jsx)(x6,{children:(0,O.jsx)(kd,{domId:r,devServerUrl:n,children:(0,O.jsx)(km,{baseUrl:i,flagOverridePlugin:o,eventInterceptionPlugin:s,children:a})})})})})}let kv=(0,L.createContext)(null),ky=new Map;function kw({children:e}){let{authenticated:t}=ka(),{ref:r,iframeSrc:n}=ki(),[i,o]=(0,L.useState)(!1),s=x9(),a=(0,L.useCallback)(e=>{if(e.origin!==n)return;if("api-ready"===e.data.type)return void o(!0);let{requestId:t}=e.data,r=ky.get(t);if(!r)return;let{command:i,resolve:a,reject:l,timeoutId:c}=r;e.data.type===ke(i)?(clearTimeout(c),ky.delete(t),a(e.data.data)):e.data.type===kt(i)&&(clearTimeout(c),ky.delete(t),s.trackApiError(Error(e.data.error)),l(Error(e.data.error)))},[n,s]),l=(0,L.useCallback)((e,t)=>new Promise((i,o)=>{if(!r.current?.contentWindow)return void o(Error("IFrame not found"));let s=`${e}-${crypto.randomUUID()}`,a=setTimeout(()=>{ky.delete(s),o(Error(`Request timeout: ${e}`))},3e4);ky.set(s,{command:e,resolve:i,reject:o,timeoutId:a}),r.current.contentWindow.postMessage({type:e,requestId:s,...t},n)}),[r,n]);(0,L.useEffect)(()=>(window.addEventListener("message",a),()=>{window.removeEventListener("message",a)}),[a]);let c=(0,L.useCallback)(async()=>t?l("get-projects",{}):{items:[]},[t,l]),u=(0,L.useCallback)(async(e,r)=>{if(!t)return{items:[]};let n=[],i=0,o=0,s=!0;for(;s&&o<100;){let t={limit:String(50),offset:String(i)};r?.query&&(t.query=r.query);let a=await l("get-flags",{projectKey:e,queryParams:t});n.push(...a.items),s=50===a.items.length,i+=50,o++}return{items:n}},[t,l]);return(0,O.jsx)(kv.Provider,{value:{apiReady:i,getProjects:c,getFlags:u},children:e})}function kx(){let e=(0,L.useContext)(kv);if(!e)throw Error("useApi must be used within an ApiProvider");return e}function kk(e){return e?"kind"in e&&"multi"===e.kind?"multi":"kind"in e&&"string"==typeof e.kind?e.kind:"key"in e?"user":"":""}function kS(e){if(!e)return"";if("kind"in e&&"multi"===e.kind){let t=Object.keys(e).filter(e=>"kind"!==e)[0];if(t){let r=e[t];return r?.key||""}return""}return"key"in e&&e.key||""}function k_(e){if(!e)return"";if("kind"in e&&"multi"===e.kind){let t=Object.keys(e).filter(e=>"kind"!==e)[0];if(t){let r=e[t];return r?.name||r?.key||""}return"multi-kind"}return e.name||e.key||""}function kC(e){if(!e)return"";if("kind"in e&&"multi"===e.kind){let t=Object.keys(e).filter(e=>"kind"!==e).sort(),r=["multi"];for(let n of t){let t=e[n];t?.key&&r.push(n,t.key)}return r.join(":")}let t=kk(e),r=kS(e);return`${t}:${r}`}let kT=(0,L.createContext)(void 0),kI=({children:e})=>{let{flagOverridePlugin:t,eventInterceptionPlugin:r}=kg(),n=x9(),[i,o]=(0,L.useState)(yL),[s,a]=(0,L.useState)(()=>{let e=yN();return e?kC(e):null}),[l,c]=(0,L.useState)(""),[u,d]=(0,L.useState)(!1),h=(0,L.useRef)(null),p=(0,L.useRef)(!1),f=(0,L.useRef)(!1),m=(0,L.useMemo)(()=>s?i.find(e=>kC(e)===s)??null:null,[i,s]),g=t?.getClient()??r?.getClient()??null,b=(0,L.useCallback)(e=>{o(t=>{let r=kC(e),i=t.findIndex(e=>kC(e)===r);if(i>=0){let r=[...t];return r[i]=e,yA(r),r}let o=[...t,e];yA(o);let s=kk(e),a=kS(e)||k_(e);return n.trackContextAdded(s,a,"multi"===s),o})},[n]),v=(0,L.useCallback)(e=>{let t=kC(e);i.some(e=>kC(e)===t),b(e)},[i,b]),y=(0,L.useCallback)(e=>{s===e?console.warn("Cannot delete active context"):o(t=>{let r=t.find(t=>kC(t)===e),i=t.filter(t=>kC(t)!==e);if(yA(i),r){let e=kk(r),t=kS(r);n.trackContextRemoved(e,t)}return i})},[s,n]),w=(0,L.useCallback)((e,t)=>{let r=s===e;o(r=>{let i=r.find(t=>kC(t)===e),o=r.map(r=>kC(r)===e?t:r);if(yA(o),i){let e=kk(i),r=kk(t),o=kS(i)||k_(i),s=kS(t)||k_(t);n.trackContextUpdated(e,o,r,s)}return o}),r&&g?(f.current=!0,g.identify(t).then(()=>{yZ(t)}).catch(e=>{console.error("Failed to update active context in LD client:",e)}).finally(()=>{setTimeout(()=>{f.current=!1},100)})):r&&yZ(t)},[s,n,g]),x=(0,L.useCallback)(async e=>{if(!g)return void console.warn("LD Client not available. Cannot set context.");try{f.current=!0;let t=kC(e);if(s===t){f.current=!1;return}await g.identify(e),a(t),yZ(e);let r=kk(e),i=kS(e)||k_(e);n.trackContextSelected(r,i)}catch(e){throw console.error("Failed to identify context:",e),e}finally{setTimeout(()=>{f.current=!1},100)}},[g,n,s]);(0,L.useEffect)(()=>{if(!g||p.current)return;p.current=!0;let e=yN();if(e){let t=kC(e);i.some(e=>kC(e)===t)?(f.current=!0,g.identify(e).then(()=>{a(t)}).catch(e=>{console.error("Failed to restore saved active context:",e),a(null),yZ(null)}).finally(()=>{setTimeout(()=>{f.current=!1},100)})):(a(null),yZ(null))}},[g,i]),(0,L.useEffect)(()=>{if(!g)return;let e=()=>{if(!f.current)try{let e=g.getContext();if(e){let t=kC(e),r=i.find(e=>kC(e)===t);r?s&&s===t||(a(t),yZ(r)):(b(e),a(t),yZ(e))}}catch(e){console.error("Error syncing active context from LD client:",e)}};return g.on("change",e),e(),()=>{g.off("change",e)}},[g,i,s,b]),(0,L.useEffect)(()=>{if(!g){h.current=null;return}let e=g.getContext();if(!e)return;let t=kC(e);h.current===t||(i.some(e=>kC(e)===t)||b(e),h.current=t)},[g,b,i]);let k=(0,L.useMemo)(()=>{let e=i;if(l.trim()){let t=l.toLowerCase();e=i.filter(e=>{let r=kS(e),n=kk(e),i=k_(e),o=r.toLowerCase().includes(t),s=n.toLowerCase().includes(t),a=i.toLowerCase().includes(t);return o||s||a})}return e.sort((e,t)=>{let r=m&&kC(e)===s,n=m&&kC(t)===s;return r&&!n?-1:!r&&n?1:0})},[i,l,m,s]),S=(0,L.useCallback)(()=>{m&&(o([m]),yA([m]))},[m]);return(0,O.jsx)(kT.Provider,{value:{contexts:k,filter:l,setFilter:c,addContext:v,removeContext:y,updateContext:w,setContext:x,activeContext:m,isAddFormOpen:u,setIsAddFormOpen:d,clearContexts:S},children:e})};function kE(){let e=(0,L.useContext)(kT);if(!e)throw Error("useContextsContext must be used within a ContextsProvider");return e}let kR=(0,L.createContext)(void 0),kO=({children:e,clientSideId:t,providedProjectKey:r})=>{let{authenticated:n}=ka(),{getProjects:i,apiReady:o}=kx(),[s,a]=(0,L.useState)([]),[l,c]=(0,L.useState)(""),[u,d]=(0,L.useState)(!1),[h,p]=(0,L.useState)([]),f=(0,L.useCallback)(async()=>o&&n?await i():{items:[]},[o,n,i]);return(0,L.useEffect)(()=>{if(!s||0===s.length)return;let e=s.find(e=>e.key===l)?.environments;e&&p(e)},[s,l]),(0,L.useEffect)(()=>{let e=!0;return o&&(d(!0),f().then(t=>{e&&(a(t.items),d(!1))})),()=>{e=!1}},[o,f]),(0,L.useEffect)(()=>{r?c(r):o?(d(!0),f().then(e=>{if(!e||e.items?.length===0)throw Error("No projects found");let r=e.items[0],n=[];if(t){if(!(r=e.items.find(e=>e.environments.some(e=>e._id===t))))throw Error(`No project found for clientSideId: ${t}`);n=r.environments}if(!r)throw Error("No project found");c(r.key),p(n),d(!1)}).catch(e=>{console.error("Error loading project:",e),d(!1)})):d(!1)},[r,t,f,o,c]),(0,O.jsx)(kR.Provider,{value:{projectKey:l,setProjectKey:c,getProjects:f,projects:s,environments:h,loading:u},children:e})};function kL(){let e=(0,L.useContext)(kR);if(!e)throw Error("useProjectContext must be used within a ProjectProvider");return e}let kA=(0,L.createContext)(void 0),kN=({children:e,clientSideId:t})=>{let[r,n]=(0,L.useState)("production"),{environments:i}=kL();return(0,L.useEffect)(()=>{if(i.length>0){let e=i.find(e=>e._id===t);e?n(e.key):n(i[0]?.key??"production")}else n("production")},[i,t,n]),(0,O.jsx)(kA.Provider,{value:{environment:r,setEnvironment:n},children:e})},kZ=(0,L.createContext)(void 0),kM=({children:e})=>{let{projectKey:t}=kL(),{authenticated:r}=ka(),{getFlags:n,apiReady:i}=kx(),[o,s]=(0,L.useState)([]),[a,l]=(0,L.useState)(!1),[c,u]=(0,L.useState)(null),[d,h]=(0,L.useState)(!1),p=(0,L.useCallback)(()=>{s([]),u(null),h(!1)},[]),f=(0,L.useCallback)(async e=>i&&r?await n(e):{items:[]},[i,n,r]),m=(0,L.useCallback)(async()=>{if(t&&r&&i){l(!0);try{let e=await f(t);s(e?.items??[]),u(t)}catch(e){console.error("Error refreshing flags:",e)}finally{l(!1)}}},[t,r,i,f]);return(0,L.useEffect)(()=>{if(!r||!i||!t)return;if(c===t){d||h(!0);return}let e=!0;return l(!0),s([]),f(t).then(r=>{e&&(s(r?.items??[]),u(t),h(!0),l(!1))}),()=>{e=!1}},[t,r,i,f,d,c]),(0,O.jsx)(kZ.Provider,{value:{flags:o,loading:a,getProjectFlags:f,resetFlags:p,refreshFlags:m},children:e})};function kG(){let e=(0,L.useContext)(kZ);if(!e)throw Error("useFlagsContext must be used within a FlagsProvider");return e}function kV(){let{ref:e,iframeSrc:t,onIFrameLoad:r}=ki(),{authenticating:n}=ka(),i=n?`${t}/toolbar/authenticating.html?originUrl=${window.location.origin}`:`${t}/toolbar/index.html?originUrl=${window.location.origin}`;return(0,O.jsx)("iframe",{ref:e,src:i,title:"LaunchDarkly Toolbar Auth",style:{display:"none"},onLoad:r})}function kW(e){let{authUrl:t,clientSideId:r,providedProjectKey:n,children:i}=e;return(0,O.jsx)(kn,{authUrl:t,children:(0,O.jsxs)(ks,{children:[(0,O.jsx)(kV,{}),(0,O.jsx)(kw,{children:(0,O.jsx)(kO,{clientSideId:r,providedProjectKey:n,children:(0,O.jsx)(kN,{clientSideId:r,children:(0,O.jsx)(kM,{children:(0,O.jsx)(kI,{children:i})})})})})]})})}class kP{baseUrl;projectKey;constructor(e,t){this.baseUrl=e,this.projectKey=t}async getProjectData(e={}){let{includeOverrides:t=!0,includeAvailableVariations:r=!1}=e,n=new URL(`${this.baseUrl}/dev/projects/${this.projectKey}`);t&&n.searchParams.append("expand","overrides"),r&&n.searchParams.append("expand","availableVariations");try{let e=await fetch(n.toString());if(!e.ok)throw Error(`Dev server error: ${e.status} ${e.statusText}`);return await e.json()}catch(e){if(e instanceof TypeError)throw Error(`Failed to connect to dev server at ${this.baseUrl}. Is ldcli dev-server running?`);throw e}}async setOverride(e,t){let r=`${this.baseUrl}/dev/projects/${this.projectKey}/overrides/${e}`;try{let e=await fetch(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok)throw Error(`Failed to set override: ${e.status} ${e.statusText}`);return await e.json()}catch(e){if(e instanceof TypeError)throw Error(`Failed to connect to dev server at ${this.baseUrl}`);throw e}}async clearOverride(e){let t=`${this.baseUrl}/dev/projects/${this.projectKey}/overrides/${e}`;try{let e=await fetch(t,{method:"DELETE"});if(!e.ok)throw Error(`Failed to clear override: ${e.status} ${e.statusText}`)}catch(e){if(e instanceof TypeError)throw Error(`Failed to connect to dev server at ${this.baseUrl}`);throw e}}async updateProjectContext(e){let t=`${this.baseUrl}/dev/projects/${this.projectKey}`;try{let r=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})});if(!r.ok)throw Error(`Failed to update project context: ${r.status} ${r.statusText}`);return await r.json()}catch(e){if(e instanceof TypeError)throw Error(`Failed to connect to dev server at ${this.baseUrl}`);throw e}}}class kj{devServerClient;listeners=new Set;apiFlags=[];constructor(e){this.devServerClient=e}async getEnhancedFlags(){let e=await this.devServerClient.getProjectData({includeOverrides:!0,includeAvailableVariations:!1});return this.getEnhancedFlagsFromDevServerData(e)}getEnhancedFlagsFromDevServerData(e){let t={},r=new Map;return this.apiFlags.forEach(e=>{r.set(e.key,e)}),Object.entries(e.flagsState).forEach(([n,i])=>{let o=r.get(n),s=e.overrides?.[n],a=e.availableVariations?.[n]||[],l=s?s.value:i.value;t[n]={key:n,name:o?.name||this.formatFlagName(n),currentValue:l,isOverridden:!!s,originalValue:i.value,availableVariations:a,type:this.determineFlagType(a,l),sourceEnvironment:e.sourceEnvironmentKey,enabled:null!==i.value&&void 0!==i.value}}),t}formatFlagName(e){return e.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}determineFlagType(e,t){return 2===e.length&&e.every(e=>"boolean"==typeof e.value)?"boolean":e.length>=2&&!e.some(e=>"object"==typeof e.value)?"multivariate":"string"==typeof t?"string":"number"==typeof t?"number":"object"==typeof t?"object":"boolean"}async setOverride(e,t){await this.devServerClient.setOverride(e,t),await this.notifyListeners()}async clearOverride(e){await this.devServerClient.clearOverride(e),await this.notifyListeners()}setApiFlags(e){this.apiFlags=e}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}async notifyListeners(){try{let e=await this.getEnhancedFlags();this.listeners.forEach(t=>t(e))}catch(e){console.error("Error notifying listeners:",e)}}destroy(){this.listeners.clear()}}let kX=(0,L.createContext)(null),kD=()=>{let e=(0,L.useContext)(kX);if(!e)throw Error("useDevServerContext must be used within DevServerProvider");return e},kF=({children:e,config:t})=>{let{getProjectFlags:r}=kG(),{projectKey:n,getProjects:i}=kL(),{apiReady:o}=kx(),s=kE(),{setContext:a,activeContext:l,updateContext:c,addContext:u}=s,[d,h]=(0,L.useState)(()=>({flags:{},connectionStatus:"disconnected",lastSyncTime:0,isLoading:!0,error:null,sourceEnvironmentKey:null})),p=(0,L.useRef)(0),f=(0,L.useRef)(null),m=(0,L.useRef)(!1),g=(0,L.useRef)(!1),b=(0,L.useRef)(null),v=(0,L.useRef)(!1),y=(0,L.useMemo)(()=>t.devServerUrl?new kP(t.devServerUrl,n):null,[t.devServerUrl,n]),w=(0,L.useMemo)(()=>y?new kj(y):null,[y]),x=(0,L.useCallback)(e=>e instanceof Error?e.message:"Unknown error",[]),k=(0,L.useCallback)((e,r=!0)=>{let n=x(e);t.onError?.(n),h(e=>({...e,...r&&{connectionStatus:"error"},error:n,isLoading:!1}))},[t,x]),S=(0,L.useCallback)(()=>!!w||(k(Error("Flag state manager not available - not in dev-server mode"),!1),!1),[w,k]),_=(0,L.useCallback)(e=>{let t=kC(e);s.contexts.find(e=>kC(e)===t)?c(t,e):u(e)},[s.contexts,c,u]);(0,L.useEffect)(()=>{y&&n&&l&&!m.current&&((f.current?kC(f.current):null)===kC(l)||(async()=>{try{await y.updateProjectContext(l),f.current=l}catch(e){console.error("Failed to sync context to dev server:",e)}})())},[l,y,n]);let C=(0,L.useCallback)(async(e=!1)=>{if(!y||!w||!n)throw Error("Dev server client, flag state manager, or project key not available");if(!g.current){g.current=!0;try{let i=await y.getProjectData({includeOverrides:!0,includeAvailableVariations:!1});b.current=i;let s=i._lastSyncedFromSource!==p.current;if(i.context){let e=f.current?kC(f.current):null,t=kC(i.context);if(e!==t){m.current=!0,f.current=i.context,_(i.context);try{await a(i.context)}catch(e){console.error("Failed to update toolbar context from dev server:",e)}finally{setTimeout(()=>{m.current=!1},100)}}}let l=w.getEnhancedFlagsFromDevServerData(i);h(e=>({...e,connectionStatus:"connected",flags:l,sourceEnvironmentKey:i.sourceEnvironmentKey,lastSyncTime:Date.now(),error:null,isLoading:!1})),(e||0===p.current||s)&&(p.current=i._lastSyncedFromSource),(e||0===p.current||s)&&o&&!v.current&&(v.current=!0,(async()=>{try{let e=await r(n);w.setApiFlags(e.items);let t=b.current;if(t){let e=w.getEnhancedFlagsFromDevServerData(t);h(t=>({...t,flags:e,lastSyncTime:Date.now()}))}}catch(r){let e=x(r);console.error("Failed to fetch API flags metadata:",e),t.onError?.(e)}finally{v.current=!1}})())}finally{g.current=!1}}},[y,w,n,r,o,a,_]),T=(0,L.useCallback)(async()=>{if(!y)throw Error("DevServerClient not available - not in dev-server mode");await i()},[y,i]);(0,L.useEffect)(()=>{(async()=>{if(!t.devServerUrl)return h(e=>({...e,connectionStatus:"disconnected",isLoading:!1,error:null}));try{h(e=>({...e,isLoading:!0,error:null})),await T(),h(e=>({...e,connectionStatus:"connected"}))}catch(e){k(e)}})()},[t.devServerUrl,n,T,k]),(0,L.useEffect)(()=>{(async()=>{if(n&&"connected"===d.connectionStatus&&y&&w)try{h(e=>({...e,isLoading:!0})),await C()}catch(e){k(e)}})()},[d.connectionStatus,y,w,n,C,k]),(0,L.useEffect)(()=>{if("connected"===d.connectionStatus&&w)return w.subscribe(e=>{h(t=>({...t,flags:e,lastSyncTime:Date.now()}))})},[w,d.connectionStatus]),(0,L.useEffect)(()=>{if(!t.devServerUrl||!y||!w)return;let e=setInterval(async()=>{try{n||await T(),await C()}catch(e){k(e)}},t.pollIntervalInMs);return()=>clearInterval(e)},[y,w,t.pollIntervalInMs,t.devServerUrl,n,T,r,C,k]);let I=(0,L.useCallback)(async(e,r)=>{if(S())try{h(e=>({...e,isLoading:!0})),await w.setOverride(e,r),t.onDebugOverride?.(e,r,!0)}catch(e){k(e,!1)}finally{h(e=>({...e,isLoading:!1}))}},[w,t,S,k]),E=(0,L.useCallback)(async e=>{if(S())try{h(e=>({...e,isLoading:!0})),await w.clearOverride(e),t.onDebugOverride?.(e,null,!1)}catch(e){k(e,!1)}finally{h(e=>({...e,isLoading:!1}))}},[w,t,S,k]),R=(0,L.useCallback)(async()=>{if(S())try{h(e=>({...e,isLoading:!0}));let e=Object.entries(d.flags).filter(([e,t])=>t.isOverridden);await Promise.all(e.map(([e])=>w.clearOverride(e))),e.forEach(([e])=>{t.onDebugOverride?.(e,null,!1)})}catch(e){k(e,!1)}finally{h(e=>({...e,isLoading:!1}))}},[w,t,d.flags,S,k]),A=(0,L.useCallback)(async()=>{if(n&&"connected"===d.connectionStatus&&y&&w)try{h(e=>({...e,isLoading:!0})),await C(!0)}catch(e){k(e)}},[n,d.connectionStatus,y,w,C,k]),N=(0,L.useMemo)(()=>({state:d,setOverride:I,clearOverride:E,clearAllOverrides:R,refresh:A,devServerClient:y}),[d,I,E,R,A,y]);return(0,O.jsx)(kX.Provider,{value:N,children:e})};function kz(e,t,r={}){let{syncTabs:n=!1,serialize:i=JSON.stringify,deserialize:o=JSON.parse}=r,s=(0,L.useRef)(i),a=(0,L.useRef)(o);s.current=i,a.current=o;let l=(0,L.useRef)(!1),c=(0,L.useRef)(!1),[u,d]=(0,L.useState)(()=>{if("u"<typeof window)return t;try{let r=localStorage.getItem(e);if(null!==r)return l.current=!0,c.current=!0,a.current(r);return t}catch{return t}}),h=(0,L.useCallback)(e=>{l.current=!0,c.current=!1,d(e)},[d]);return(0,L.useEffect)(()=>{if(!("u"<typeof window)&&l.current){if(c.current){c.current=!1;return}try{localStorage.setItem(e,s.current(u))}catch(t){console.warn(`Failed to save ${e} to localStorage`,t)}}},[e,u]),(0,L.useEffect)(()=>{if(!n||"u"<typeof window)return;let r=r=>{if(r.key===e)if(null!==r.newValue)try{l.current=!0,c.current=!0,d(a.current(r.newValue))}catch{}else l.current=!1,c.current=!0,d(t)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)},[e,n,t]),[u,h,(0,L.useCallback)(()=>{if("u">typeof window)try{l.current=!1,c.current=!0,localStorage.removeItem(e),d(t)}catch{}},[e,t])]}let kB=(0,L.createContext)(null);function kU({children:e}){let[t,r]=kz(yS,[]),n=(0,L.useMemo)(()=>new Set(t),[t]),i=(0,L.useCallback)(e=>{r(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[r]),o=(0,L.useCallback)(e=>n.has(e),[n]),s=(0,L.useCallback)(()=>{r([])},[r]),a=n.size;return(0,O.jsx)(kB.Provider,{value:{toggleStarred:i,isStarred:o,clearAllStarred:s,starredCount:a},children:e})}function kH(){let e=(0,L.useContext)(kB);if(!e)throw Error("useStarredFlags must be used within a StarredFlagsProvider");return e}let kY=[.25,.46,.45,.94],kK=[.22,1,.36,1],kJ={containerExpand:{width:{duration:.25,ease:kY},height:{duration:.25,ease:kY},borderRadius:{duration:.2,ease:kY},boxShadow:{duration:.2,ease:"easeInOut"}},containerCollapse:{width:{duration:.35,ease:kK},height:{duration:.35,ease:kK},borderRadius:{duration:.25,ease:kY},boxShadow:{duration:.25,ease:"easeInOut"}},containerInstant:{width:{duration:.01},height:{duration:.01},borderRadius:{duration:.01},boxShadow:{duration:.01}},container:{width:{duration:.25,ease:kY},height:{duration:.25,ease:kY},borderRadius:{duration:.2,ease:kY},boxShadow:{duration:.2,ease:"easeInOut"}},circleLogo:{opacity:{duration:.15,ease:"easeOut"},scale:{duration:.2,ease:kY},rotate:{duration:.2,ease:kY}},eventList:{liveTail:{dot:{scale:[1,1.2,1],opacity:[.5,1,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}},container:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,ease:kY}}}}},kQ=48,kq=48,k$=24,k0=400,k1=12,k2=1,k5=1;function k3({className:e,onMouseDown:t}){return(0,O.jsx)("svg",{className:e,fill:"currentColor",preserveAspectRatio:"xMidYMid",viewBox:"0 0 64 64",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"LaunchDarkly",onMouseDown:t,style:t?{cursor:"grab"}:void 0,children:(0,O.jsx)("path",{d:"M32.62 60.61c-.445 0-.892-.254-1.147-.7-.191-.444-.191-.889.128-1.27l13.582-18.62-23.785 9.66c-.191.063-.319.126-.51.126-.574 0-1.084-.381-1.212-.89-.191-.508.064-1.08.51-1.397l20.916-12.266-36.794-2.097c-.765-.063-1.211-.635-1.211-1.27 0-.573.382-1.208 1.211-1.272l36.794-2.097-20.916-12.265c-.446-.318-.701-.89-.51-1.398.192-.509.638-.89 1.212-.89.191 0 .319.063.51.127l23.785 9.66L31.601 5.067c-.255-.381-.32-.89-.128-1.271.191-.445.638-.7 1.148-.7.319 0 .638.128.893.382L60.55 30.36c.383.381.574.953.574 1.462 0 .508-.191 1.016-.574 1.461L33.514 60.23a1.26 1.26 0 0 1-.893.38Z"})})}var k9=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js"),k4=r.n(k9),k6=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js"),k7=r.n(k6),k8=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js"),Se=r.n(k8),St=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js"),Sr=r.n(St),Sn=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js"),Si=r.n(Sn),So=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js"),Ss=r.n(So),Sa=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/LaunchDarklyToolbar.css.ts.vanilla.css","source":"#H4sIAAAAAAAAA8VVwXLaMBC98xXqoTPQGWVkCgWUS_-kI0trvIms9UgyIe3k3zuSCQHjJCQ99MIg6e3bp3278o01sfxVbXRAIdifCWMtBYxITrIK92BuJ4z95ugM7CWbF4vVQgixEWm7VPp-66lzhmuy5CXbKT_l3Lb9mm-9euSbpZglNO3AV5YeJKvRGHBpT3c-pLiW0EXwactgaK16lKyysE8byuLWcYzQBMk0POPuuhCxeuSaXAQXX46eJjcndyrynTxu6yjZXLSZsqQYqXlZR69cqMg3nDxu0ckDoo8bUs4zpYXqM4wpbEj4fUxjpPYtukjtuLrFiLoruMZ0LTPVhUfnoB9nIAOV6mxMeZJ_3KAH3XeTJts17sLRED1EXY9amilCVP5C2mrQqqoMZLsIx9suxdfbYx0Oiwc0sZZsse4LUUNf8ef1P3feRyeiJG_AS1a0exbIohlFr8QpmntlsAvHO73jzkpWpLuQq0VdtOhAMkcOXgHyHQYsLZwHzF8TGGpl6IHn1EpH3AHPNP3A9-GcqipAlIzPU52Haev0LuR01xVvnctxzrLO8Qd75wN7n9dU3oGOvMLkGLmoMDdjhTYmE8o8TQ5CmIoZQ7cDH6fF7NjJofbo7iUTZ61SWtL3QzmbUzmF6I266K7x-eAeduDDhT-ba43c_B8j1QcsfOuLMOhycZmpzJkadPw4wMsRmM6wa2e6Vcag20q2bvfs0DCfGea3hJusKAmRrEiHPxswqNi09VCBD9yD6TQY3lDfEf16lsO-5V_GlMNGpWNuOq96nLgRRRPYF2xa8lG5_PyeQjG5mv9p6tKLVVyA81cBryF-mjz9BfPv_eQ1CAAA"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),Sl={};Sl.styleTagTransform=Ss(),Sl.setAttributes=Sr(),Sl.insert=Se().bind(null,"head"),Sl.domAPI=k7(),Sl.insertStyleElement=Si(),k4()(Sa.A,Sl),Sa.A&&Sa.A.locals&&Sa.A.locals;let Sc=(0,L.forwardRef)((e,t)=>{let{onMouseDown:r}=e;return(0,O.jsx)(oG.div,{ref:t,className:"ldtb_f9csi07",onMouseDown:r,tabIndex:-1,initial:{opacity:0,x:"-50%",y:"-50%",scale:.9,rotate:90},animate:{opacity:1,x:"-50%",y:"-50%",scale:1,rotate:0},exit:{opacity:0,x:"-50%",y:"-50%",scale:.9,rotate:90},transition:{...kJ.circleLogo,opacity:{...kJ.circleLogo.opacity,delay:0}},children:(0,O.jsx)(oG.div,{whileHover:{scale:1.1},transition:{duration:.2,ease:"easeInOut"},children:(0,O.jsx)(k3,{className:"ldtb_f9csi08","aria-hidden":"true"})})},"circle-logo")});var Su=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/LoadingScreen/LoadingScreen.css.ts.vanilla.css","source":"#H4sIAAAAAAAAA52TwXLbIBCG73qKvXTGPuBBdmS3-NI3ySCxkjdBoMLKidPxu3dAVWN70jTpiQH-1c_37-r7I57aoHuMYA3X9-OPbk1Gws8CQH7JCwAH7WLrQ68geNaMC2mwW-4LgHMBUMp3lJvthfZcrC5cylxkKA5WnxS0Fp-TLK3CUMCGyTsFjbdj79JNrZvHLvjRGdF464OCow4LIeww7UUX9El8q2S2q30wGBSUwzNEb8m8qd7JSf1Ehg8qs6TtAak7sIKtlEN-lT9iaK1_UnAgY9Dtb2DWb8NoS50TxNhHBQ06xpCOB20MuU6BhHI7GfwPnKg9s-8_ytiTEzNYlW2vGTaZYU6iupseNlfokX1Oon7AhkVLnHrjWFNuTkuWU9x1SHKHMS7kEsgdMfCiXN563X0qr4cxMrUnkfzQ8eVVqlRQ3n6_-uxw_cW504OCMmB_a7C9DGu9qrLkNa3Xk3kONx_q0e_Gsh_-VbG5rgja0BgVVNMAa0e9nhivfuwygiWHOgC5lhwx3oLtMtg7Mzgbt96xiPSCCuTq627m7XXoyCmQaZO8_sxcuar2xfkXfNfCxHMEAAA"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),Sd={};function Sh(e){let{className:t,onMouseDown:r}=e;return(0,O.jsx)("svg",{className:t,fill:"currentColor",preserveAspectRatio:"xMidYMid",viewBox:"0 0 156 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"LaunchDarkly",onMouseDown:r,style:r?{cursor:"grab"}:void 0,children:(0,O.jsx)("path",{d:"M9.33 18.729V16.45H2.578V5.272H0v13.457h9.33Zm6.485-.424a4.01 4.01 0 0 0 1.276-1.67v2.093h2.472v-6.49c0-.688-.16-1.324-.505-1.854s-.85-.954-1.488-1.245c-.638-.291-1.41-.45-2.286-.45a8.26 8.26 0 0 0-1.41.132c-.45.08-.876.212-1.275.371-.399.159-.77.344-1.09.556l.08 2.305a8.662 8.662 0 0 1 1.78-.9 5.624 5.624 0 0 1 1.941-.319c.558 0 1.01.133 1.33.398.318.265.478.609.478 1.033v.662h-2.233c-1.329 0-2.366.265-3.136.821-.771.557-1.143 1.325-1.143 2.305 0 .556.133 1.033.372 1.483.265.45.611.795 1.09 1.034.478.264 1.036.37 1.648.37.85 0 1.541-.212 2.1-.635Zm-2.232-1.67a1.078 1.078 0 0 1-.426-.873c0-.45.186-.795.585-1.034.372-.238.957-.37 1.701-.37h1.595v.37c0 .318-.08.636-.266.98a2.349 2.349 0 0 1-.824.875c-.372.238-.797.37-1.276.37-.452 0-.824-.105-1.09-.317Zm13.848 1.643c.585-.503 1.01-1.192 1.276-2.04v2.49h2.498V8.98h-2.498v4.556c0 .663-.107 1.245-.32 1.749-.212.503-.504.927-.903 1.192a2.23 2.23 0 0 1-1.356.424c-.558 0-.983-.16-1.302-.477-.292-.318-.452-.795-.452-1.404V8.98h-2.498v6.093c0 1.271.292 2.225.903 2.914.612.689 1.41 1.033 2.446 1.033.903 0 1.621-.239 2.206-.742Zm9.01-4.106c0-.662.107-1.245.32-1.748.212-.503.505-.927.877-1.192.372-.292.824-.424 1.329-.424.558 0 .983.159 1.302.477.293.318.452.794.452 1.404v6.066h2.525v-6.093c0-1.271-.292-2.225-.904-2.914-.61-.688-1.408-1.033-2.445-1.033-.877 0-1.595.265-2.18.742-.558.503-.983 1.192-1.275 2.04v-2.49h-2.499v9.748h2.499v-4.583ZM51.7 18.94c.319-.053.638-.132.904-.212.292-.079.531-.185.797-.264l.026-2.358c-.398.212-.824.344-1.275.45a5.923 5.923 0 0 1-1.356.16c-.665 0-1.25-.133-1.701-.372a2.24 2.24 0 0 1-1.01-1.033 3.26 3.26 0 0 1-.32-1.457c0-.53.107-1.006.32-1.457.212-.424.558-.768 1.01-1.033.452-.265 1.01-.37 1.648-.37.505 0 .957.052 1.409.158.451.106.85.265 1.249.45l-.027-2.436c-.292-.106-.558-.212-.824-.265a4.252 4.252 0 0 0-.903-.16 6.336 6.336 0 0 0-1.037-.079c-1.116 0-2.073.239-2.897.689a4.949 4.949 0 0 0-1.914 1.854c-.452.795-.665 1.67-.665 2.676 0 .98.24 1.88.691 2.649a4.646 4.646 0 0 0 1.914 1.801c.824.424 1.781.662 2.871.662.399.027.77 0 1.09-.053Zm6.459-.212v-4.556c0-.662.106-1.245.319-1.748.212-.503.505-.927.904-1.192a2.15 2.15 0 0 1 1.328-.424c.585 0 1.01.159 1.303.477.292.318.452.794.452 1.404v6.066h2.498v-6.093c0-1.271-.292-2.225-.903-2.914-.612-.688-1.41-1.033-2.446-1.033-.877 0-1.621.265-2.18.742-.584.503-1.01 1.192-1.275 2.04V5.27h-2.472v13.457h2.472Zm14.885 0c1.435 0 2.658-.264 3.668-.82 1.01-.557 1.78-1.325 2.312-2.332.532-1.007.798-2.199.798-3.55 0-1.35-.266-2.543-.798-3.55a5.657 5.657 0 0 0-2.312-2.357c-1.01-.556-2.233-.821-3.668-.821H67.86v13.457h5.183v-.026Zm-2.605-2.278v-8.9h2.578c1.303 0 2.313.397 3.03 1.165.745.795 1.09 1.881 1.09 3.285 0 1.404-.372 2.517-1.09 3.285-.744.768-1.754 1.165-3.03 1.165h-2.578Zm15.921 1.855a4.01 4.01 0 0 0 1.276-1.67v2.093h2.472v-6.49c0-.688-.16-1.324-.505-1.854s-.85-.954-1.488-1.245c-.638-.291-1.409-.45-2.286-.45-.479 0-.957.053-1.409.132-.452.08-.877.212-1.276.371-.398.159-.77.344-1.09.556l.08 2.305a8.662 8.662 0 0 1 1.781-.9 5.624 5.624 0 0 1 1.94-.319c.559 0 1.01.133 1.33.398.319.265.478.609.478 1.033v.662h-2.18c-1.329 0-2.365.265-3.136.821-.771.557-1.143 1.325-1.143 2.305 0 .556.133 1.033.372 1.483.266.45.611.795 1.09 1.034.478.264 1.036.37 1.648.37.824 0 1.488-.212 2.046-.635Zm-2.232-1.67a1.078 1.078 0 0 1-.425-.873c0-.45.186-.795.584-1.034.372-.238.957-.37 1.701-.37h1.595v.37c0 .318-.08.636-.266.98a2.349 2.349 0 0 1-.824.875c-.372.238-.77.344-1.249.344-.452.027-.824-.08-1.116-.291Zm11.03 2.093V14.57c0-1.086.24-1.907.692-2.463.452-.556 1.09-.848 1.86-.848.372 0 .718.053 1.037.16V9.006a3.096 3.096 0 0 0-.478-.106c-.16-.027-.346-.027-.532-.027a2.15 2.15 0 0 0-1.568.636c-.426.424-.771 1.033-.984 1.775v-2.33h-2.498v9.748h2.472v.026Zm7.682 0v-3.152l.904-.848 2.924 4h2.977l-4.173-5.695 4.093-4.053h-3.136l-3.562 3.444V5.272h-2.472v13.457h2.445Zm10.819 0V5.271h-2.499v13.457h2.499Zm3.827 3.63c.93 0 1.675-.186 2.259-.557.585-.37 1.064-1.033 1.462-1.96l4.492-10.86h-2.578l-2.631 6.807-2.712-6.808H115.2l4.014 9.722-.213.503c-.133.318-.292.583-.531.716-.213.158-.559.238-1.011.238h-2.073v2.199h2.1ZM144.092 24a.56.56 0 0 1-.478-.291c-.08-.186-.08-.371.053-.53l5.661-7.762-9.914 4.027c-.08.026-.133.053-.213.053a.518.518 0 0 1-.505-.371c-.079-.212.027-.45.213-.583l8.718-5.112-15.337-.875a.525.525 0 0 1-.505-.53c0-.238.16-.503.505-.53l15.337-.873-8.718-5.113c-.186-.133-.292-.37-.213-.583a.544.544 0 0 1 .505-.37c.08 0 .133.026.213.052l9.914 4.027-5.661-7.788c-.106-.16-.133-.371-.053-.53.079-.186.265-.292.478-.292.133 0 .266.053.372.16l11.27 11.205a.88.88 0 0 1 .24.609.93.93 0 0 1-.24.61l-11.27 11.231a.525.525 0 0 1-.372.159Z"})})}function Sp(e){let{onMouseDown:t}=e;return(0,O.jsxs)(oG.div,{className:"ldtb_uqg2id1",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.2},"data-testid":"loading-screen",children:[(0,O.jsx)("div",{className:"ldtb_uqg2id2",children:(0,O.jsx)(Sh,{className:"ldtb_uqg2id3",onMouseDown:t})}),(0,O.jsx)("div",{className:"ldtb_uqg2id4",children:(0,O.jsxs)("div",{className:"ldtb_uqg2id5",children:[(0,O.jsx)("div",{className:"ldtb_uqg2id6"}),(0,O.jsx)("p",{className:"ldtb_uqg2id7",children:"Loading..."})]})})]})}Sd.styleTagTransform=Ss(),Sd.setAttributes=Sr(),Sd.insert=Se().bind(null,"head"),Sd.domAPI=k7(),Sd.insertStyleElement=Si(),k4()(Su.A,Sd),Su.A&&Su.A.locals&&Su.A.locals;var Sf=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/IFrameErrorScreen/IFrameErrorScreen.css.ts.vanilla.css","source":"#H4sIAAAAAAAAA51S227bMAx9z1fwZUDyoEBy4rRVP6aQLdphJ0uGTOfSYf8-SM6lSLNu7ZNAkcS5ceksVy9qGL1dNRJ-zQAsDb0zRw2Nw8PzDPIrLEWsmYLXUAc3dj51KlP_bGMYvRV1cCFq2Jk4F8L1Uy3aaI7iqZSLPB2ixahB9QcYgiN7d_pBTtN7srzVoKT8kcotUrtlDRsp-8wq7DA2Luw1bMla9M-z37PlezXqvhrjqPWCGLtBQ42eMabv3lhLvtUgQW0mhO-oE1VgDt3_iuzIi7OyMsPeiCiyiLMX5Xpidl4xI4fsRfWKNYuGOKXj2VCOpyHHyfAqpnGPwzCXCyC_w8hztfgAtvqSY6_jwNQcRQJEz-9baVODuvG1WN8RuP7qzf2FTWt6DXL5UEbssrPmIE62rYrTyTAeWOT96-YNnTLT-STu4pRcEzyLgd4woT5eYPP3_pyolBOV2JLXkAtHHi-Rq2X5gcHmXwzWdxmo4qr8c7g_2Euc2fMDAAA"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),Sm={};function Sg(e){let{onMouseDown:t}=e,{baseUrl:r}=kg();return(0,O.jsxs)(oG.div,{className:"ldtb_1sund3f0",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.2},"data-testid":"iframe-error-screen",children:[(0,O.jsx)("div",{className:"ldtb_1sund3f1",children:(0,O.jsx)(Sh,{className:"ldtb_1sund3f2",onMouseDown:t})}),(0,O.jsx)("div",{className:"ldtb_1sund3f3",children:(0,O.jsxs)("div",{className:"ldtb_1sund3f4",children:[(0,O.jsx)("p",{className:"ldtb_1sund3f5",children:"Unable to connect to LaunchDarkly"}),(0,O.jsxs)("p",{className:"ldtb_1sund3f6",children:["The toolbar could not connect to LaunchDarkly. This is typically caused by trying to load the toolbar from a domain that is not whitelisted (i.e. a non-localhost domain). If you are running this in a hosted environment, ensure the domain has been whitelisted. Click"," ",(0,O.jsx)("a",{href:`${r}/settings/integrations/launchdarkly-developer-toolbar/new`,target:"_blank",rel:"noopener noreferrer",children:"here to whitelist your domain."})]})]})})]})}Sm.styleTagTransform=Ss(),Sm.setAttributes=Sr(),Sm.insert=Se().bind(null,"head"),Sm.domAPI=k7(),Sm.insertStyleElement=Si(),k4()(Sf.A,Sm),Sf.A&&Sf.A.locals&&Sf.A.locals;var Sb=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/new/Header/ToolbarHeader.module.css.ts.vanilla.css","source":"#H4sIAAAAAAAAA51U207DMAx931f4ER4ydWWrIHwMShM3NYQkStJdQPw7atqtuzFpPLV27eNjH7tzo1L9tiheWldVBXzPABRFb8SOQ2Nw-zoDEIa0ZZTwM3KQaBOG3v3exUTNjklnE9rEIXohkdWYNoi2j_BCKbKaw7PfwqL0Wyjy43X2M5sfF17cVVgLnyH7d9mF6AIHHUTd213EwCIalImDdRZPeCyHpE8RNFlmsEkc2OisXVAYWBCKungITUHYSImc5VAL-aGD66xi0hkXoJiXEVBEvGyIC5lojbmvY441WX0RXeawDanUcijHyi2SbtNk55Ic1iI8MGb8QIHpIHasLIrHC9CnDNo4m1ikL-SwqAag7NqM6FVR_Ad8eb9gyyu6rzLM-Vz5MHUvAto0STPpeYPtMrOdZu4d7VkctqC6Jfi_t3_6NAr5VJ4KubePV0oYc2OLVrx1awx_DOla-8_79u_Uc8UbJ7uYK7kuGbK4H_f1SLamSLXB04z-xKMzpM4rx1Yot2FZi-EyWIbJZMd05pomYn-Rwy_iF-pE_wmbBAAA"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),Sv={};Sv.styleTagTransform=Ss(),Sv.setAttributes=Sr(),Sv.insert=Se().bind(null,"head"),Sv.domAPI=k7(),Sv.insertStyleElement=Si(),k4()(Sb.A,Sv),Sb.A&&Sb.A.locals&&Sb.A.locals;var Sy=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/icons/Icon.css.ts.vanilla.css","source":"LmxkdGJfMW1uZGV2bzAgewogIHdpZHRoOiAyNHB4OwogIGhlaWdodDogMjRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0KLmxkdGJfMW1uZGV2bzEgewogIHdpZHRoOiAxNHB4OwogIGhlaWdodDogMTRweDsKICBmaWxsOiBjdXJyZW50Q29sb3I7Cn0"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),Sw={};Sw.styleTagTransform=Ss(),Sw.setAttributes=Sr(),Sw.insert=Se().bind(null,"head"),Sw.domAPI=k7(),Sw.insertStyleElement=Si(),k4()(Sy.A,Sw),Sy.A&&Sy.A.locals&&Sy.A.locals;var Sx="ldtb_1mndevo0";function Sk({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M9.47 6.97a.75.75 0 0 1 1.06 0l5 5a.75.75 0 0 1-1.06 1.06L10 8.56l-4.47 4.47a.75.75 0 1 1-1.06-1.06z",clipRule:"evenodd"})})}function SS({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M4.47 6.97a.75.75 0 0 1 1.06 0L10 11.44l4.47-4.47a.75.75 0 1 1 1.06 1.06l-5 5a.75.75 0 0 1-1.06 0l-5-5a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})})}function S_({onClose:e,onHeaderMouseDown:t}){let{position:r}=yG();return(0,O.jsxs)("div",{className:"ldtb_109ho660",children:[(0,O.jsxs)("div",{className:"ldtb_109ho661",onMouseDown:t,children:[(0,O.jsx)(k3,{className:"ldtb_109ho662"}),(0,O.jsx)("span",{className:"ldtb_109ho663",children:"LaunchDarkly"})]}),(0,O.jsx)("div",{className:"ldtb_109ho664",children:(0,O.jsx)("button",{className:"ldtb_109ho665",onClick:e,"aria-label":"Collapse toolbar",children:r.startsWith("top-")?(0,O.jsx)(Sk,{}):(0,O.jsx)(SS,{})})})]})}function SC({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M2.6 5.934A5.75 5.75 0 0 1 6.668 4.25h6.666a5.75 5.75 0 1 1 0 11.5H6.667A5.75 5.75 0 0 1 2.6 5.934m2.358 2.357a2.417 2.417 0 1 1 3.418 3.418A2.417 2.417 0 0 1 4.958 8.29",clipRule:"evenodd"})})}function ST({className:e}){return(0,O.jsxs)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,O.jsx)("path",{"fill-rule":"evenodd",d:"M10 1.75a.75.75 0 0 1 .75.75V5a.75.75 0 0 1-1.5 0V2.5a.75.75 0 0 1 .75-.75M4.138 4.136a.75.75 0 0 1 1.06 0L7.03 5.97a.75.75 0 1 1-1.06 1.06L4.137 5.197a.75.75 0 0 1 0-1.06m11.727 0a.75.75 0 0 1 0 1.061L14.031 7.03a.75.75 0 0 1-1.06-1.06l1.833-1.834a.75.75 0 0 1 1.06 0M1.75 10a.75.75 0 0 1 .75-.75H5a.75.75 0 1 1 0 1.5H2.5a.75.75 0 0 1-.75-.75m5.28 2.97a.75.75 0 0 1 0 1.06l-1.833 1.834a.75.75 0 1 1-1.06-1.061l1.833-1.834a.75.75 0 0 1 1.06 0","clip-rule":"evenodd"}),(0,O.jsx)("path",{d:"M10.238 9.288a.75.75 0 0 0-.949.949l2.5 7.5a.75.75 0 0 0 1.382.098l1.202-2.402 2.597 2.597a.75.75 0 1 0 1.06-1.06l-2.166-2.813 1.972-.986a.75.75 0 0 0-.098-1.383z"})]})}function SI({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M9.23 1.875c-.765 0-1.417.552-1.542 1.306l-.149.893c-.017.1-.095.218-.247.29a6 6 0 0 0-.822.476c-.138.095-.279.104-.374.068l-.85-.318a1.56 1.56 0 0 0-1.901.682l-.768 1.331a1.56 1.56 0 0 0 .36 1.988l.7.576c.079.065.14.191.128.359a6 6 0 0 0 0 .949c.013.167-.049.293-.128.358l-.7.577a1.56 1.56 0 0 0-.36 1.987l.768 1.331c.382.662 1.186.95 1.901.682l.85-.318c.096-.036.236-.027.375.069q.39.268.82.474c.153.074.231.19.248.291l.149.893a1.56 1.56 0 0 0 1.541 1.306h1.537c.764 0 1.415-.552 1.541-1.306l.149-.893c.017-.1.095-.217.247-.29q.43-.207.822-.476c.138-.095.278-.104.374-.069l.85.319a1.56 1.56 0 0 0 1.9-.682l.77-1.331a1.56 1.56 0 0 0-.36-1.988l-.701-.576c-.08-.065-.141-.191-.128-.359a6 6 0 0 0 0-.949c-.013-.167.049-.293.128-.358l.7-.577c.59-.485.742-1.326.36-1.987l-.768-1.331a1.56 1.56 0 0 0-1.901-.682l-.85.318c-.096.036-.236.027-.375-.068a6 6 0 0 0-.821-.475c-.152-.074-.23-.19-.247-.291l-.149-.893a1.56 1.56 0 0 0-1.541-1.306zm.768 11.25a3.125 3.125 0 1 0 0-6.25 3.125 3.125 0 0 0 0 6.25",clipRule:"evenodd"})})}function SE({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{"fill-rule":"evenodd",d:"M2.5 1.75a.75.75 0 0 1 .75.75v5.879c.736-.079 1.272-.273 1.688-.513.554-.32.952-.752 1.351-1.251l.218-.278c.324-.416.695-.893 1.138-1.262C8.24 4.578 8.982 4.25 10 4.25s1.76.328 2.355.825c.443.369.814.846 1.138 1.262q.112.146.218.278c.399.499.797.931 1.351 1.251.546.315 1.298.55 2.438.55a.75.75 0 0 1 0 1.5c-1.36 0-2.379-.284-3.187-.75-.8-.462-1.34-1.072-1.774-1.614l-.28-.355c-.312-.4-.558-.714-.864-.97-.342-.284-.747-.477-1.395-.477s-1.053.193-1.395.477c-.306.256-.552.57-.864.97l-.28.355c-.434.542-.974 1.152-1.774 1.613-.652.377-1.442.635-2.437.72v6.865h2.667v-3.417a.75.75 0 0 1 1.5 0v3.417H9.25v-5.917a.75.75 0 0 1 1.5 0v5.917h1.833v-3.417a.75.75 0 0 1 1.5 0v3.417h1.834V15a.75.75 0 0 1 1.5 0v1.75h.083a.75.75 0 0 1 0 1.5h-15a.75.75 0 0 1-.75-.75v-15a.75.75 0 0 1 .75-.75","clip-rule":"evenodd"})})}function SR({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{d:"M15.333 5.25a.083.083 0 0 0-.083-.083h-10a.08.08 0 0 0-.059.024.08.08 0 0 0-.024.059v10q0 .034.024.059a.08.08 0 0 0 .059.024h10a.083.083 0 0 0 .083-.083zM9.917 9.417a.92.92 0 0 0-.826-.912L9 8.5a.917.917 0 0 0-.917.917v.916h1.834zm2.5 3.333v-5a.75.75 0 0 1 1.5 0v5a.75.75 0 0 1-1.5 0m-1 0a.75.75 0 0 1-1.5 0v-.917H8.083v.917a.75.75 0 0 1-1.5 0V9.417A2.42 2.42 0 0 1 9 7l.24.012a2.42 2.42 0 0 1 2.177 2.405zm5.416-4.917h.917a.75.75 0 0 1 0 1.5h-.917v1.834h.917a.75.75 0 0 1 0 1.5h-.917v2.583a1.58 1.58 0 0 1-1.583 1.583h-2.583v.917a.75.75 0 0 1-1.5 0v-.917H9.333v.917a.75.75 0 0 1-1.5 0v-.917H5.25a1.58 1.58 0 0 1-1.583-1.583v-2.583H2.75a.75.75 0 0 1 0-1.5h.917V9.333H2.75a.75.75 0 0 1 0-1.5h.917V5.25A1.58 1.58 0 0 1 5.25 3.667h2.583V2.75a.75.75 0 0 1 1.5 0v.917h1.834V2.75a.75.75 0 0 1 1.5 0v.917h2.583a1.58 1.58 0 0 1 1.583 1.583z"})})}function SO({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{"fill-rule":"evenodd",d:"M6.75 2.5a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-.083v4.118l3.277 9.01a1.334 1.334 0 0 1-.974 1.86 1 1 0 0 1-.136.012H5.417a1 1 0 0 1-.135-.012 1.334 1.334 0 0 1-.975-1.86l3.276-9.01V3.25H7.5a.75.75 0 0 1-.75-.75m2.334.75V7.5a.8.8 0 0 1-.046.256l-1.567 4.311c.655-.099 1.467-.291 2.194-.655a9 9 0 0 1 2.336-.795h.001l-1.04-2.86a.8.8 0 0 1-.045-.257V3.25z","clip-rule":"evenodd"})})}var SL=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/new/Tooltip.module.css.ts.vanilla.css","source":"LmxkdGJfbDVqZDltMCB7CiAgcG9zaXRpb246IHJlbGF0aXZlOwogIGRpc3BsYXk6IGlubGluZS1mbGV4OwogIGZsZXgtc2hyaW5rOiAwOwp9Ci5sZHRiX2w1amQ5bTEgewogIHBvc2l0aW9uOiBmaXhlZDsKICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1scC1jb2xvci1ncmF5LTcwMCk7CiAgY29sb3I6IHdoaXRlOwogIHBhZGRpbmc6IDZweCAxMnB4OwogIGJvcmRlci1yYWRpdXM6IDZweDsKICBmb250LXNpemU6IDEycHg7CiAgZm9udC13ZWlnaHQ6IDUwMDsKICB3aGl0ZS1zcGFjZTogbm93cmFwOwogIHBvaW50ZXItZXZlbnRzOiBub25lOwogIHotaW5kZXg6IDIxNDc0MDAxOTA7CiAgYm94LXNoYWRvdzogMCAycHggOHB4IHJnYmEoMCwgMCwgMCwgMC4yKTsKICB0cmFuc2Zvcm0tb3JpZ2luOiBjZW50ZXIgY2VudGVyOwp9Ci5sZHRiX2w1amQ5bTE6OmFmdGVyIHsKICBjb250ZW50OiAiIjsKICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgdG9wOiAxMDAlOwogIGxlZnQ6IDUwJTsKICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoLTUwJSk7CiAgd2lkdGg6IDA7CiAgaGVpZ2h0OiAwOwogIGJvcmRlci1sZWZ0OiA2cHggc29saWQgdHJhbnNwYXJlbnQ7CiAgYm9yZGVyLXJpZ2h0OiA2cHggc29saWQgdHJhbnNwYXJlbnQ7CiAgYm9yZGVyLXRvcDogNnB4IHNvbGlkIHZhcigtLWxwLWNvbG9yLWdyYXktNzAwKTsKfQ"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),SA={};function SN({content:e,children:t,offsetTop:r=0,offsetLeft:n=0}){let[i,o]=L.useState(!1),[s,a]=L.useState(!1),[l,c]=L.useState({top:0,left:0}),u=L.useRef(null),d=L.useRef(null),h=L.useCallback(()=>{if(u.current&&d.current){let e=u.current.getBoundingClientRect(),t=d.current.getBoundingClientRect();c({top:e.top-e.height/2-16+r,left:e.left+e.width/2-t.width/2-4+n}),a(!0)}},[r,n]);return(0,L.useEffect)(()=>{i&&!s&&requestAnimationFrame(()=>{h()})},[i,s,h]),(0,O.jsxs)("div",{ref:u,className:"ldtb_l5jd9m0",onMouseEnter:()=>{o(!0),a(!1)},onMouseLeave:()=>{o(!1),a(!1)},onClick:()=>{o(!1),a(!1)},children:[t,(0,O.jsx)(oz,{children:i&&(0,O.jsx)(oG.div,{ref:d,className:"ldtb_l5jd9m1",style:{top:`${l.top}px`,left:`${l.left}px`,visibility:s?"visible":"hidden"},initial:{opacity:0,scale:.9},animate:{opacity:+!!s,scale:s?1:.9},exit:{opacity:0,scale:.9},transition:{duration:.15},children:e})})]})}SA.styleTagTransform=Ss(),SA.setAttributes=Sr(),SA.insert=Se().bind(null,"head"),SA.domAPI=k7(),SA.insertStyleElement=Si(),k4()(SL.A,SA),SL.A&&SL.A.locals&&SL.A.locals;var SZ=r('../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/core/ui/Toolbar/components/new/IconBar/IconBar.module.css.ts.vanilla.css","source":"#H4sIAAAAAAAAA7VSy27bMBC8-yv22B5oyIqSOszHBCtxJTFluAy5kmMU_fdClB3Hr7ot0CPJ2Zmd4Sydkfp5XL3ZyhfwYwFgbAoOtxpaR-9PCwB0tvPKCr0mDQ15oThdvwxJbLtVDXshLxpSwIYURh68mQABjbG-0_AQMk_N0VBUNYvwq4ZVeIfEzhoYMX5RygXVsOOouohb9a0ovk5DHQYN64ng52L5addV3rXG5nuXBedZDRLRp4CRvBw0NXj2NJ13qEuK1U6xGWKaMIHt3uqHk_WRk4jGDunj9p-DOzxtrJFeQ1XNjD3ZrpfDOZuzYtlrQOegWJYJCFO2Fnj_FMmh2JHOMtM9jxSvJHcpk8d9JtchZYacCrXcDCkL8SDOetp_wUWgGm2ytaPjgfJaQVKPhjcqfw82k1OVafKqu3HFbZtINKjyvDzl_4_gbvYSsLGy1VAsq8_d8iwKneMNmbPB337SSb1v1vmYu8qsu5KVJyWbz8cD938WVO0GuhFUhlza6f5vSplZ1reF7mahX5k1t6rdBAAA"}!../../node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.3.25_webpack@5.105.2_esbuild@0.27.4_/node_modules/@vanilla-extract/webpack-plugin/extracted.js'),SM={};SM.styleTagTransform=Ss(),SM.setAttributes=Sr(),SM.insert=Se().bind(null,"head"),SM.domAPI=k7(),SM.insertStyleElement=Si(),k4()(SZ.A,SM),SZ.A&&SZ.A.locals&&SZ.A.locals;let SG=xJ("enable-ai-icon",!1),SV=xJ("enable-interactive-icon",!1),SW=xJ("enable-optimize-icon",!1),SP=xJ("toolbar-enable-session-replay",!1);var Sj=r("./src/types/constants.ts");function SX(e){if(!e)return!1;if(e.closest('[data-ld-selection-bar="true"]'))return!0;let t=document.getElementById(Sj.D);if(t&&(e===t||t.contains(e)))return!0;let r=e;for(;r;){if(r.id===Sj.D)return!0;let e=r.getRootNode();r=e instanceof ShadowRoot?e.host:r.parentElement}return!1}function SD(e){let t=e.tagName.toLowerCase();if(e.id)t+=`#${e.id}`;else if(e.classList.length>0){let r=Array.from(e.classList).slice(0,2);t+=`.${r.join(".")}`}return t}let SF=["aria-label","aria-describedby","aria-labelledby","role","type","name","href","src","alt","title","placeholder","value","for","action","method"];function Sz(e){if(!e||!(e instanceof Element))throw Error("Invalid element provided to getElementRect. Element must be a valid DOM Element instance.");return e.getBoundingClientRect()}let SB=(0,L.createContext)(void 0);function SU({children:e,onSelectionStart:t,onSelectionEnd:r}){let[n,i]=(0,L.useState)(!1),[o,s]=(0,L.useState)(null),[a,l]=(0,L.useState)(null),[c,u]=(0,L.useState)(null),d=(0,L.useCallback)(()=>{i(!0),s(null),l(null),u(null),t?.()},[t]),h=(0,L.useCallback)(()=>{i(!1),u(null),r?.()},[r]),p=(0,L.useCallback)(e=>{s(e),l(function(e){let t,r,n;if(!e||!(e instanceof Element))throw Error("Invalid element provided to getElementInfo. Element must be a valid DOM Element instance.");let i=e.getBoundingClientRect(),o=null,s=e.textContent?.trim();return s&&s.length>0&&(o=(o=s.length>80?s.substring(0,80)+"...":s).replace(/\s+/g," ")),{tagName:e.tagName.toLowerCase(),id:e.id||null,classes:Array.from(e.classList),textContent:o,selector:function(e){let t=[],r=e;for(;r&&r!==document.body&&r!==document.documentElement;){let e=r.tagName.toLowerCase();if(r.id){e+=`#${r.id}`,t.unshift(e);break}let n=Array.from(r.classList).slice(0,2);n.length>0&&(e+=`.${n.join(".")}`);let i=r.parentElement;if(i){let t=Array.from(i.children).filter(e=>e.tagName===r.tagName);if(t.length>1){let n=t.indexOf(r)+1;e+=`:nth-of-type(${n})`}}if(t.unshift(e),r=r.parentElement,t.length>=4)break}return t.join(" > ")}(e),primaryIdentifier:(t=e.tagName.toLowerCase(),r=`<${t}>`,e.id&&(r+=`#${e.id}`),(n=Array.from(e.classList).slice(0,3)).length>0&&(r+=`.${n.join(".")}`),r),dataAttributes:function(e){let t=[];for(let r of Array.from(e.attributes))r.name.startsWith("data-")&&!r.name.startsWith("data-ld-")&&t.push({name:r.name,value:r.value});return t.sort((e,t)=>{let r=["data-testid","data-test-id","data-cy","data-component"],n=r.indexOf(e.name),i=r.indexOf(t.name);return -1!==n&&-1!==i?n-i:-1!==n?-1:-1!==i?1:e.name.localeCompare(t.name)})}(e),htmlAttributes:function(e){let t=[];for(let r of SF){let n=e.getAttribute(r);n&&t.push({name:r,value:n})}return t}(e),dimensions:{width:Math.round(i.width),height:Math.round(i.height)}}}(e)),i(!1),u(null),r?.()},[r]),f=(0,L.useCallback)(()=>{s(null),l(null),i(!1),u(null)},[]),m=(0,L.useMemo)(()=>({isSelecting:n,selectedElement:o,selectedElementInfo:a,hoveredElement:c,startSelection:d,exitSelection:h,selectElement:p,clearSelection:f,setHoveredElement:u}),[n,o,a,c,d,h,p,f]);return(0,O.jsx)(SB.Provider,{value:m,children:e})}function SH(){let e=(0,L.useContext)(SB);if(void 0===e)throw Error("useElementSelection must be used within an ElementSelectionProvider");return e}function SY({defaultActiveTab:e}){let t=SV(),r=SG(),n=SW(),{activeTab:i,setActiveTab:o}=x7(),{startSelection:s}=SH(),a=x9(),[l,c]=(0,L.useState)(null);(0,L.useEffect)(()=>{i||o(e)},[e,i,o]);let u=[{id:"interactive",Icon:ST,label:"Interactive mode",tooltip:t?"Interactive mode":"Interactive mode (coming soon)",disabled:!t},{id:"flags",Icon:SC,label:"Flags",tooltip:"Feature flags"},{id:"optimize",Icon:SO,label:"Optimize",tooltip:n?"Optimization":"Optimization (coming soon)",disabled:!n},{id:"ai",Icon:SR,label:"AI",tooltip:r?"AI":"AI (coming soon)",disabled:!r},{id:"monitoring",Icon:SE,label:"Analytics",tooltip:"Monitoring"},{id:"settings",Icon:SI,label:"Settings",tooltip:"Settings"}];return(0,O.jsx)("div",{className:"ldtb_v1qi4n0",children:u.map(({id:e,Icon:t,label:r,tooltip:n,disabled:u})=>{var d;let h="interactive"===e&&"interactive"===i&&"interactive"===l;return(0,O.jsx)(SN,{content:"interactive"!==(d={id:e,Icon:t,label:r,tooltip:n,disabled:u}).id||"interactive"!==i||d.disabled?d.tooltip:"Select element",children:(0,O.jsx)("button",{onClick:()=>{!u&&("interactive"===e?("interactive"===i||(a.trackTabChange(i||null,e),o(e)),s()):(i!==e&&a.trackTabChange(i||null,e),o(e)))},onMouseEnter:()=>c(e),onMouseLeave:()=>c(null),className:`ldtb_v1qi4n1 ${e===i?"ldtb_v1qi4n2":""} ${u?"ldtb_v1qi4n3":""} ${h?"ldtb_v1qi4n5":""}`,"aria-label":r,disabled:u,children:(0,O.jsx)(t,{className:"ldtb_v1qi4n4"})})},e)})})}let SK=(0,L.createContext)(void 0);function SJ({children:e}){let[t,r]=(0,L.useState)("flags"),n=(0,L.useMemo)(()=>({activeSubtab:t,setActiveSubtab:r}),[t]);return(0,O.jsx)(SK.Provider,{value:n,children:e})}function SQ(){let e=(0,L.useContext)(SK);if(!e)throw Error("useActiveSubtabContext must be used within ActiveSubtabProvider");return e}let Sq={flags:"",contexts:"",events:"",general:"",workflows:"",privacy:""},S$=(0,L.createContext)({searchTerms:Sq,setSearchTerm:()=>{},clearSearchTerm:()=>{},clearAllSearchTerms:()=>{}});function S0({children:e}){let[t,r]=(0,L.useState)(Sq),n=(0,L.useCallback)((e,t)=>{r(r=>({...r,[e]:t}))},[]),i=(0,L.useCallback)(e=>{r(t=>({...t,[e]:""}))},[]),o=(0,L.useCallback)(()=>{r(Sq)},[]);return(0,O.jsx)(S$.Provider,{value:{searchTerms:t,setSearchTerm:n,clearSearchTerm:i,clearAllSearchTerms:o},children:e})}function S1(){let e=(0,L.useContext)(S$);if(!e)throw Error("useTabSearchContext must be used within TabSearchProvider");return e}function S2(e,t){let[r,n]=(0,L.useState)([]);(0,L.useEffect)(()=>{if(!e)return void n([]);let t=()=>{n([...e.getEvents()].reverse())};return t(),e.subscribe(t)},[e]);let i=(0,L.useMemo)(()=>{if(!t)return r;let e=t.toLowerCase();return r.filter(t=>t.displayName.toLowerCase().includes(e)||t.kind.toLowerCase().includes(e)||t.category.toLowerCase().includes(e)||t.key&&t.key.toLowerCase().includes(e))},[r,t]),o=(0,L.useMemo)(()=>{let e={},t={};return i.forEach(r=>{e[r.kind]=(e[r.kind]||0)+1,r.key&&(t[r.key]=(t[r.key]||0)+1)}),{totalEvents:i.length,eventsByKind:e,eventsByFlag:t}},[i]);return{events:i,eventStats:o}}function S5({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5M6.97 6.97a.75.75 0 0 1 1.06 0L10 8.94l1.97-1.97a.75.75 0 1 1 1.06 1.06L11.062 10l1.97 1.97a.75.75 0 0 1-1.06 1.06L10 11.06l-1.97 1.97a.75.75 0 1 1-1.06-1.06L8.94 10 6.97 8.03a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})})}function S3({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M5.814 2.251a6.583 6.583 0 0 1 7.675 10.177l4.542 4.542a.75.75 0 1 1-1.06 1.06l-4.543-4.542a6.58 6.58 0 0 1-8.75-.5A6.585 6.585 0 0 1 5.815 2.252m2.52.999a5.083 5.083 0 1 0 0 10.166 5.083 5.083 0 0 0 0-10.166",clipRule:"evenodd"})})}function S9({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M10 3.417a.75.75 0 0 1 .75.75V9.25h5.083a.75.75 0 0 1 0 1.5H10.75v5.083a.75.75 0 0 1-1.5 0V10.75H4.167a.75.75 0 0 1 0-1.5H9.25V4.167a.75.75 0 0 1 .75-.75",clipRule:"evenodd"})})}function S4({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M6.229 3.602a7.5 7.5 0 0 1 11.18 5.461.75.75 0 0 1-1.485.207A6 6 0 0 0 5 6.75h1.666a.75.75 0 1 1 0 1.5H3.333a.75.75 0 0 1-.75-.75V4.167a.75.75 0 1 1 1.5 0v1.295a7.5 7.5 0 0 1 2.146-1.86m-3 6.488a.75.75 0 0 1 .847.64 6 6 0 0 0 10.923 2.52h-1.666a.75.75 0 0 1 0-1.5h3.334a.75.75 0 0 1 .75.75v3.333a.75.75 0 0 1-1.5 0v-1.295a7.498 7.498 0 0 1-11.175.695 7.5 7.5 0 0 1-2.152-4.296.75.75 0 0 1 .64-.847",clipRule:"evenodd"})})}function S6({className:e}){return(0,O.jsx)("svg",{className:`${Sx} ${e}`,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,O.jsx)("path",{fillRule:"evenodd",d:"M8.333 3.25a.083.083 0 0 0-.083.083v1.75h3.5v-1.75a.083.083 0 0 0-.084-.083zm4.917 1.833v-1.75a1.583 1.583 0 0 0-1.584-1.583H8.333A1.583 1.583 0 0 0 6.75 3.333v1.75H3.333a.75.75 0 1 0 0 1.5h.143l.774 9.284a2.417 2.417 0 0 0 2.416 2.383h6.667a2.417 2.417 0 0 0 2.416-2.383l.774-9.284h.143a.75.75 0 1 0 0-1.5zm-8.269 1.5.766 9.188q.003.03.003.062a.917.917 0 0 0 .916.917h6.667a.917.917 0 0 0 .917-.917l.002-.062.766-9.188zm3.352 1.834a.75.75 0 0 1 .75.75v5a.75.75 0 1 1-1.5 0v-5a.75.75 0 0 1 .75-.75m3.333 0a.75.75 0 0 1 .75.75v5a.75.75 0 1 1-1.5 0v-5a.75.75 0 0 1 .75-.75",clipRule:"evenodd"})})}var S7=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@launchpad-ui+components@0.17.12_@react-aria+focus@3.21.3_react-dom@19.2.4_react@19.2.4_50a111fa397731762641d7be31f0c57a/node_modules/@launchpad-ui/components/dist/style.css"),S8={};S8.styleTagTransform=Ss(),S8.setAttributes=Sr(),S8.insert=Se().bind(null,"head"),S8.domAPI=k7(),S8.insertStyleElement=Si(),k4()(S7.A,S8),S7.A&&S7.A.locals&&S7.A.locals;var _e=r("../../node_modules/.pnpm/@rsbuild+core@1.7.3/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[2].use[2]!../../node_modules/.pnpm/@launchpad-ui+icons@0.25.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@launchpad-ui/icons/dist/style.css"),_t={};_t.styleTagTransform=Ss(),_t.setAttributes=Sr(),_t.insert=Se().bind(null,"head"),_t.domAPI=k7(),_t.insertStyleElement=Si(),k4()(_e.A,_t),_e.A&&_e.A.locals&&_e.A.locals;let _r=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,_n=function(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n);else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}(e))&&(n&&(n+=" "),n+=t);return n},_i=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return _n(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(e=>{let t=null==r?void 0:r[e],n=null==o?void 0:o[e];if(null===t)return null;let s=_r(t)||_r(n);return i[e][s]}),a=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return _n(e,s,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...i}=t;return Object.entries(i).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...a}[t]):({...o,...a})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)},_o=_i("kck8EW_base",{variants:{size:{tiny:"kck8EW_tiny",small:"kck8EW_small",medium:"kck8EW_medium",large:"kck8EW_large"},variant:{default:"kck8EW_default",subtle:"kck8EW_subtle"}},defaultVariants:{size:"medium",variant:"default"}}),_s=(0,L.createContext)({}),_a=({name:e,className:t,children:r,focusable:n=!1,role:i="img",size:o="medium",variant:s="default",ref:a,...l})=>{let c=(0,L.useContext)(_s);return(0,O.jsxs)("svg",{"aria-hidden":l["aria-hidden"]??(!l["aria-labelledby"]&&!l["aria-label"]),focusable:n,role:i,className:_o({size:c.size||o,variant:s,className:t}),"data-icon":e,ref:a,...l,children:[e&&(0,O.jsx)("use",{href:`#lp-icon-${e}`}),r]})};_i("HB1-WG_base",{variants:{size:{tiny:"HB1-WG_tiny",small:"HB1-WG_small",medium:"HB1-WG_medium",large:"HB1-WG_large"},variant:{default:"HB1-WG_default",blue:"HB1-WG_blue",cyan:"HB1-WG_cyan",purple:"HB1-WG_purple",pink:"HB1-WG_pink",orange:"HB1-WG_orange",yellow:"HB1-WG_yellow",green:"HB1-WG_green","gradient-1":"HB1-WG_gradient1","gradient-2":"HB1-WG_gradient2","gradient-3":"HB1-WG_gradient3","gradient-4":"HB1-WG_gradient4","gradient-5":"HB1-WG_gradient5","gradient-6":"HB1-WG_gradient6","gradient-7":"HB1-WG_gradient7"}},defaultVariants:{size:"medium",variant:"default"}});let _l=({kind:e,size:t="medium",...r})=>{let n,i="";switch(e){case"success":n="check-circle",i="Success";break;case"warning":n="warning",i="Warning";break;case"error":n="alert-rhombus",i="Error";break;case"info":n="info-circle",i="Info";break;case"notification":n="notifications",i="Notification"}return(0,O.jsx)(_a,{"aria-label":`${i} icon`,role:"img",size:t,...r,name:n})},_c="u">typeof document?null!=(_=L.useInsertionEffect)?_:L.useLayoutEffect:()=>{};function _u(e,t,r){let[n,i]=(0,L.useState)(e||t),o=(0,L.useRef)(n),s=(0,L.useRef)(void 0!==e),a=void 0!==e;(0,L.useEffect)(()=>{s.current,s.current=a},[a]);let l=a?e:n;_c(()=>{o.current=l});let[,c]=(0,L.useReducer)(()=>({}),{});return[l,(0,L.useCallback)((e,...t)=>{let n="function"==typeof e?e(o.current):e;Object.is(o.current,n)||(o.current=n,i(n),c(),null==r||r(n,...t))},[r])]}function _d(e){let t=(0,L.useRef)(null),r=(0,L.useRef)(void 0),n=(0,L.useCallback)(t=>{if("function"==typeof e){let r=e(t);return()=>{"function"==typeof r?r():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,L.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,r.current&&(r.current(),r.current=void 0),null!=value&&(r.current=n(value))}}),[n])}function _h(...e){return 1===e.length&&e[0]?e[0]:t=>{let r=!1,n=e.map(e=>{let n=_p(e,t);return r||(r="function"==typeof n),n});if(r)return()=>{n.forEach((t,r)=>{"function"==typeof t?t():_p(e[r],null)})}}}function _p(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function _f(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let _m="u">typeof document?L.useLayoutEffect:()=>{},_g={prefix:String(Math.round(1e10*Math.random())),current:0},_b=L.createContext(_g),_v=L.createContext(!1),_y=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),_w="function"==typeof L.useId?function(e){let t=L.useId(),[r]=(0,L.useState)(__()),n=r?"react-aria":`react-aria${_g.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,L.useContext)(_b),r=function(e=!1){let t=(0,L.useContext)(_b),r=(0,L.useRef)(null);if(null===r.current&&!e){var n,i;let e=null==(i=L.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(n=i.ReactCurrentOwner)?void 0:n.current;if(e){let r=_y.get(e);null==r?_y.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,_y.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function _x(){return!1}function _k(){return!0}function _S(e){return()=>{}}function __(){return"function"==typeof L.useSyncExternalStore?L.useSyncExternalStore(_S,_x,_k):(0,L.useContext)(_v)}let _C=!!("u">typeof window&&window.document&&window.document.createElement),_T=new Map;function _I(e){let[t,r]=(0,L.useState)(e),n=(0,L.useRef)(null),i=_w(t),s=(0,L.useRef)(null);if(o&&o.register(s,i),_C){let e=_T.get(i);e&&!e.includes(n)?e.push(n):_T.set(i,[n])}return _m(()=>()=>{o&&o.unregister(s),_T.delete(i)},[i]),(0,L.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),i}function _E(e=[]){let t=_I(),[r,n]=function(e){let[t,r]=(0,L.useState)(e),n=(0,L.useRef)(t),i=(0,L.useRef)(null),o=(0,L.useRef)(()=>{if(!i.current)return;let e=i.current.next();if(e.done){i.current=null;return}n.current===e.value?o.current():r(e.value)});return _m(()=>{n.current=t,i.current&&o.current()}),[t,(0,L.useCallback)(e=>{i.current=e(n.current),o.current()},[o])]}(t),i=(0,L.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return _m(i,[t,i,...e]),r}"u">typeof FinalizationRegistry&&(o=new FinalizationRegistry(e=>{_T.delete(e)}));let _R=function(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}(e))&&(n&&(n+=" "),n+=t);return n};function _O(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],i=n[e];"function"==typeof r&&"function"==typeof i&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=_f(r,i):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof i?t[e]=_R(r,i):"id"===e&&r&&i?t.id=function(e,t){if(e===t)return e;let r=_T.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=_T.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,i):"ref"===e&&r&&i?t.ref=_h(r,i):t[e]=void 0!==i?i:r}}return t}let _L=Symbol("default");function _A({values:e,children:t}){for(let[r,n]of e)t=L.createElement(r.Provider,{value:n},t);return t}function _N(e){let{className:t,style:r,children:n,defaultClassName:i,defaultChildren:o,defaultStyle:s,values:a}=e;return(0,L.useMemo)(()=>{let e,l,c;return e="function"==typeof t?t({...a,defaultClassName:i}):t,l="function"==typeof r?r({...a,defaultStyle:s||{}}):r,c="function"==typeof n?n({...a,defaultChildren:o}):null==n?o:n,{className:null!=e?e:i,style:l||s?{...s,...l}:void 0,children:null!=c?c:o,"data-rac":""}},[t,r,n,i,o,s,a])}function _Z(e,t){return r=>t("function"==typeof e?e(r):e,r)}function _M(e,t){let r=(0,L.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||_L;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function _G(e,t,r){let{ref:n,...i}=_M(r,e.slot)||{},o=_d((0,L.useMemo)(()=>_h(t,n),[t,n])),s=_O(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&("function"==typeof i.style||"function"==typeof e.style?s.style=t=>{let r="function"==typeof i.style?i.style(t):i.style,n={...t.defaultStyle,...r},o="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...o}}:s.style={...i.style,...e.style}),[s,o]}function _V(e=!0){let[t,r]=(0,L.useState)(e),n=(0,L.useRef)(!1),i=(0,L.useCallback)(e=>{n.current=!0,r(!!e)},[]);return _m(()=>{n.current||r(!1)},[]),[i,t]}function _W(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}function _P(){let e=(0,L.useRef)(new Map),t=(0,L.useCallback)((t,r,n,i)=>{let o=(null==i?void 0:i.once)?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:o,options:i}),t.addEventListener(r,o,i)},[]),r=(0,L.useCallback)((t,r,n,i)=>{var o;let s=(null==(o=e.current.get(n))?void 0:o.fn)||n;t.removeEventListener(r,s,i),e.current.delete(n)},[]),n=(0,L.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,L.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}let _j=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},_X=e=>e&&"window"in e&&e.window===e?e:_j(e).defaultView||window;var _D=r("../../node_modules/.pnpm/@react-stately+flags@3.1.2/node_modules/@react-stately/flags/dist/import.mjs");function _F(e,t){if(!(0,_D.Nf)())return!!t&&!!e&&e.contains(t);if(!e||!t)return!1;let r=t;for(;null!==r;){if(r===e)return!0;r="SLOT"===r.tagName&&r.assignedSlot?r.assignedSlot.parentNode:!function(e){return null!==e&&"object"==typeof e&&"nodeType"in e&&"number"==typeof e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}(r)?r.parentNode:r.host}return!1}let _z=(e=document)=>{var t;if(!(0,_D.Nf)())return e.activeElement;let r=e.activeElement;for(;r&&"shadowRoot"in r&&(null==(t=r.shadowRoot)?void 0:t.activeElement);)r=r.shadowRoot.activeElement;return r};function _B(e){if((0,_D.Nf)()&&e.target instanceof Element&&e.target.shadowRoot){var t,r;if("composedPath"in e)return null!=(t=e.composedPath()[0])?t:null;if("composedPath"in e.nativeEvent)return null!=(r=e.nativeEvent.composedPath()[0])?r:null}return e.target}let _U=!1,_H=0;function _Y(e){"touch"===e.pointerType&&(_U=!0,setTimeout(()=>{_U=!1},50))}function _K(){if("u">typeof document)return 0===_H&&"u">typeof PointerEvent&&document.addEventListener("pointerup",_Y),_H++,()=>{!(--_H>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",_Y)}}function _J(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:i}=e,[o,s]=(0,L.useState)(!1),a=(0,L.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,L.useEffect)(_K,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=_P(),{hoverProps:u,triggerHoverEnd:d}=(0,L.useMemo)(()=>{let e=(e,t)=>{let i=a.target;a.pointerType="",a.target=null,"touch"!==t&&a.isHovered&&i&&(a.isHovered=!1,c(),n&&n({type:"hoverend",target:i,pointerType:t}),r&&r(!1),s(!1))},o={};return"u">typeof PointerEvent&&(o.onPointerEnter=n=>{_U&&"mouse"===n.pointerType||((n,o)=>{if(a.pointerType=o,i||"touch"===o||a.isHovered||!_F(n.currentTarget,_B(n)))return;a.isHovered=!0;let c=n.currentTarget;a.target=c,l(_j(_B(n)),"pointerover",t=>{a.isHovered&&a.target&&!_F(a.target,_B(t))&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:c,pointerType:o}),r&&r(!0),s(!0)})(n,n.pointerType)},o.onPointerLeave=t=>{!i&&_F(t.currentTarget,_B(t))&&e(t,t.pointerType)}),{hoverProps:o,triggerHoverEnd:e}},[t,r,n,i,a,l,c]);return(0,L.useEffect)(()=>{i&&d({currentTarget:a.target},a.pointerType)},[i]),{hoverProps:u,isHovered:o}}let _Q="u">typeof Element&&"checkVisibility"in Element.prototype,_q=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],_$=_q.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";function _0(e){if(function(){if(null==_1){_1=!1;try{document.createElement("div").focus({get preventScroll(){return _1=!0,!0}})}catch{}}return _1}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}_q.push('[tabindex]:not([tabindex="-1"]):not([disabled])'),_q.join(':not([hidden]):not([tabindex="-1"]),');let _1=null;function _2(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function _5(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function _3(e){let t=(0,L.useRef)({isFocused:!1,observer:null});return _m(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,L.useCallback)(r=>{let n=_B(r);(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&(t.current.isFocused=!0,n.addEventListener("focusout",r=>{if(t.current.isFocused=!1,n.disabled){let t=_2(r);null==e||e(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){var e;null==(e=t.current.observer)||e.disconnect();let r=n===_z()?null:_z();n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]}))},[e])}let _9=!1;function _4(e){var t;if("u"<typeof window||null==window.navigator)return!1;let r=null==(t=window.navigator.userAgentData)?void 0:t.brands;return Array.isArray(r)&&r.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function _6(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function _7(e){let t=null;return()=>(null==t&&(t=e()),t)}let _8=_7(function(){return _6(/^Mac/i)}),Ce=_7(function(){return _6(/^iPhone/i)}),Ct=_7(function(){return _6(/^iPad/i)||_8()&&navigator.maxTouchPoints>1}),Cr=_7(function(){return Ce()||Ct()});_7(function(){return _8()||Cr()});let Cn=_7(function(){return _4(/AppleWebKit/i)&&!Ci()}),Ci=_7(function(){return _4(/Chrome/i)}),Co=_7(function(){return _4(/Android/i)}),Cs=_7(function(){return _4(/Firefox/i)});function Ca(e,t,r=!0){var n,i;let{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}=t;Cs()&&(null==(i=window.event)||null==(n=i.type)?void 0:n.startsWith("key"))&&"_blank"===e.target&&(_8()?o=!0:s=!0);let c=Cn()&&_8()&&!Ct()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:s,altKey:a,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Ca.isOpening=r,_0(e),e.dispatchEvent(c),Ca.isOpening=!1}function Cl(e){return""===e.pointerType&&!!e.isTrusted||(Co()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}Ca.isOpening=!1;let Cc=null,Cu=new Set,Cd=new Map,Ch=!1,Cp=!1,Cf={Tab:!0,Escape:!0};function Cm(e,t){for(let r of Cu)r(e,t)}function Cg(e){Ch=!0,Ca.isOpening||e.metaKey||!_8()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(Cc="keyboard",Cm("keyboard",e))}function Cb(e){Cc="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(Ch=!0,Cm("pointer",e))}function Cv(e){!Ca.isOpening&&Cl(e)&&(Ch=!0,Cc="virtual")}function Cy(e){_B(e)!==window&&_B(e)!==document&&!_9&&e.isTrusted&&(Ch||Cp||(Cc="virtual",Cm("virtual",e)),Ch=!1,Cp=!1)}function Cw(){_9||(Ch=!1,Cp=!0)}function Cx(e){if("u"<typeof window||"u"<typeof document||Cd.get(_X(e)))return;let t=_X(e),r=_j(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ch=!0,n.apply(this,arguments)},r.addEventListener("keydown",Cg,!0),r.addEventListener("keyup",Cg,!0),r.addEventListener("click",Cv,!0),t.addEventListener("focus",Cy,!0),t.addEventListener("blur",Cw,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",Cb,!0),r.addEventListener("pointermove",Cb,!0),r.addEventListener("pointerup",Cb,!0)),t.addEventListener("beforeunload",()=>{Ck(e)},{once:!0}),Cd.set(t,{focus:n})}let Ck=(e,t)=>{let r=_X(e),n=_j(e);t&&n.removeEventListener("DOMContentLoaded",t),Cd.has(r)&&(r.HTMLElement.prototype.focus=Cd.get(r).focus,n.removeEventListener("keydown",Cg,!0),n.removeEventListener("keyup",Cg,!0),n.removeEventListener("click",Cv,!0),r.removeEventListener("focus",Cy,!0),r.removeEventListener("blur",Cw,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",Cb,!0),n.removeEventListener("pointermove",Cb,!0),n.removeEventListener("pointerup",Cb,!0)),Cd.delete(r))};function CS(){return"pointer"!==Cc}"u">typeof document&&("loading"!==(p=_j(void 0)).readyState?Cx(void 0):p.addEventListener("DOMContentLoaded",()=>{Cx(void 0)}));let C_=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function CC(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:i}=e,o=(0,L.useCallback)(e=>{if(_B(e)===e.currentTarget)return n&&n(e),i&&i(!1),!0},[n,i]),s=_3(o),a=(0,L.useCallback)(e=>{let t=_B(e),n=_j(t),o=n?_z(n):_z();t===e.currentTarget&&t===o&&(r&&r(e),i&&i(!0),s(e))},[i,r,s]);return{focusProps:{onFocus:!t&&(r||i||n)?a:void 0,onBlur:!t&&(n||i)?o:void 0}}}function CT(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:i}=e,o=(0,L.useRef)({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=_P(),l=(0,L.useCallback)(e=>{_F(e.currentTarget,_B(e))&&o.current.isFocusWithin&&!_F(e.currentTarget,e.relatedTarget)&&(o.current.isFocusWithin=!1,a(),r&&r(e),i&&i(!1))},[r,i,o,a]),c=_3(l),u=(0,L.useCallback)(e=>{if(!_F(e.currentTarget,_B(e)))return;let t=_B(e),r=_j(t),a=_z(r);if(!o.current.isFocusWithin&&a===t){n&&n(e),i&&i(!0),o.current.isFocusWithin=!0,c(e);let t=e.currentTarget;s(r,"focus",e=>{let n=_B(e);if(o.current.isFocusWithin&&!_F(t,n)){let e=new r.defaultView.FocusEvent("blur",{relatedTarget:n});_5(e,t),l(_2(e))}},{capture:!0})}},[n,i,c,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}function CI(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:i}=e,o=(0,L.useRef)({isFocused:!1,isFocusVisible:r||CS()}),[s,a]=(0,L.useState)(!1),[l,c]=(0,L.useState)(()=>o.current.isFocused&&o.current.isFocusVisible),u=(0,L.useCallback)(()=>c(o.current.isFocused&&o.current.isFocusVisible),[]),d=(0,L.useCallback)(e=>{o.current.isFocused=e,o.current.isFocusVisible=CS(),a(e),u()},[u]);t={enabled:s,isTextInput:n},Cx(),(0,L.useEffect)(()=>{if((null==t?void 0:t.enabled)===!1)return;let e=(e,r)=>{var n;let i,s,a,l,c,d,h;n=!!(null==t?void 0:t.isTextInput),i=_j(r?_B(r):void 0),s=r?_B(r):void 0,a="u">typeof window?_X(s).HTMLInputElement:HTMLInputElement,l="u">typeof window?_X(s).HTMLTextAreaElement:HTMLTextAreaElement,c="u">typeof window?_X(s).HTMLElement:HTMLElement,d="u">typeof window?_X(s).KeyboardEvent:KeyboardEvent,h=_z(i),(n=n||h instanceof a&&!C_.has(h.type)||h instanceof l||h instanceof c&&h.isContentEditable)&&"keyboard"===e&&r instanceof d&&!Cf[r.key]||(e=>{o.current.isFocusVisible=e,u()})(CS())};return Cu.add(e),()=>{Cu.delete(e)}},[n,s]);let{focusProps:h}=CC({isDisabled:i,onFocusChange:d}),{focusWithinProps:p}=CT({isDisabled:!i,onFocusWithinChange:d});return{isFocused:s,isFocusVisible:l,focusProps:i?p:h}}let CE=(0,L.createContext)({}),CR=(0,L.forwardRef)(function(e,t){var r,n;[e,t]=_G(e,t,CE);let{isDisabled:i,isInvalid:o,isReadOnly:s,onHoverStart:a,onHoverChange:l,onHoverEnd:c,...u}=e,{hoverProps:d,isHovered:h}=_J({onHoverStart:a,onHoverChange:l,onHoverEnd:c,isDisabled:i}),{isFocused:p,isFocusVisible:f,focusProps:m}=CI({within:!0});null!=i||(i=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=o||(o=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let g=_N({...e,values:{isHovered:h,isFocusWithin:p,isFocusVisible:f,isDisabled:i,isInvalid:o},defaultClassName:"react-aria-Group"});return L.createElement("div",{..._O(u,m,d),...g,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":p||void 0,"data-hovered":h||void 0,"data-focus-visible":f||void 0,"data-disabled":i||void 0,"data-invalid":o||void 0,"data-readonly":s||void 0},g.children)});"u">typeof HTMLTemplateElement&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(e,t){return this.content.insertBefore(e,t)}}));let CO=(0,L.createContext)(!1);function CL(e){let t=(t,r)=>(0,L.useContext)(CO)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,L.forwardRef)(t)}let CA=(0,L.createContext)({}),CN=new Set(["id"]),CZ=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),CM=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),CG=new Set(["dir","lang","hidden","inert","translate"]),CV=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),CW=/^(data-.*)$/;function CP(e,t={}){let{labelable:r,isLink:n,global:i,events:o=i,propNames:s}=t,a={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(CN.has(t)||r&&CZ.has(t)||n&&CM.has(t)||i&&CG.has(t)||o&&(CV.has(t)||t.endsWith("Capture")&&CV.has(t.slice(0,-7)))||(null==s?void 0:s.has(t))||CW.test(t))&&(a[t]=e[t]);return a}function Cj(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function CX(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":i,labelElementType:o="label"}=e;t=_I(t);let s=_I(),a={};return r&&(n=n?`${s} ${n}`:s,a={id:s,htmlFor:"label"===o?t:void 0}),{labelProps:a,fieldProps:function(e,t){let{id:r,"aria-label":n,"aria-labelledby":i}=e;return r=_I(r),i&&n?i=[...new Set([r,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!n,{id:r,"aria-label":n,"aria-labelledby":i}}({id:t,"aria-label":i,"aria-labelledby":n})}}let CD=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),CF=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]),Cz=Symbol.for("react-aria.i18n.locale");function CB(){let e="u">typeof window&&window[Cz]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:!function(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return CD.has(t.script)}let t=e.split("-")[0];return CF.has(t)}(e)?"ltr":"rtl"}}let CU=CB(),CH=new Set;function CY(){for(let e of(CU=CB(),CH))e(CU)}let CK=L.createContext(null);function CJ(){let e=function(){let e=__(),[t,r]=(0,L.useState)(CU);return((0,L.useEffect)(()=>(0===CH.size&&window.addEventListener("languagechange",CY),CH.add(r),()=>{CH.delete(r),0===CH.size&&window.removeEventListener("languagechange",CY)}),[]),e)?{locale:"u">typeof window&&window[Cz]||"en-US",direction:"ltr"}:t}();return(0,L.useContext)(CK)||e}let CQ=new Map,Cq=!1;try{Cq="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch{}let C$=!1;try{C$="unit"===new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style}catch{}let C0={degree:{narrow:{default:"\xb0","ja-JP":" 度","zh-TW":"度","sl-SI":" \xb0"}}};class C1{format(e){let t="";if(t=Cq||null==this.options.signDisplay?this.numberFormatter.format(e):function(e,t,r){if("auto"===t)return e.format(r);{if("never"===t)return e.format(Math.abs(r));let n=!1;if("always"===t?n=r>0||Object.is(r,0):"exceptZero"===t&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),!n)return e.format(r);{let t=e.format(-r),n=e.format(r),i=t.replace(n,"").replace(/\u200e|\u061C/,"");return 1!=[...i].length&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),t.replace(n,"!!!").replace(i,"+").replace("!!!",n)}}}(this.numberFormatter,this.options.signDisplay,e),"unit"===this.options.style&&!C$){var r;let{unit:e,unitDisplay:n="short",locale:i}=this.resolvedOptions();if(!e)return t;let o=null==(r=C0[e])?void 0:r[n];t+=o[i]||o.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.numberFormatter.formatRange)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.numberFormatter.formatRangeToParts)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),n=this.numberFormatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return Cq||null==this.options.signDisplay||(e={...e,signDisplay:this.options.signDisplay}),C$||"unit"!==this.options.style||(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=function(e,t={}){let{numberingSystem:r}=t;if(r&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${r}`),"unit"===t.style&&!C$){var n;let{unit:e,unitDisplay:r="short"}=t;if(!e)throw Error('unit option must be provided with style: "unit"');if(!(null==(n=C0[e])?void 0:n[r]))throw Error(`Unsupported unit ${e} with unitDisplay = ${r}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(CQ.has(i))return CQ.get(i);let o=new Intl.NumberFormat(e,t);return CQ.set(i,o),o}(e,t),this.options=t}}let C2=(0,L.createContext)(null),C5=(0,L.forwardRef)(function(e,t){[e,t]=_G(e,t,C2);let{value:r=0,minValue:n=0,maxValue:i=100,isIndeterminate:o=!1}=e;r=Cj(r,n,i);let[s,a]=_V(!e["aria-label"]&&!e["aria-labelledby"]),{progressBarProps:l,labelProps:c}=function(e){let{value:t=0,minValue:r=0,maxValue:n=100,valueLabel:i,isIndeterminate:o,formatOptions:s={style:"percent"}}=e,a=CP(e,{labelable:!0}),{labelProps:l,fieldProps:c}=CX({...e,labelElementType:"span"}),u=((t=Cj(t,r,n))-r)/(n-r),d=function(e={}){let{locale:t}=CJ();return(0,L.useMemo)(()=>new C1(t,e),[t,e])}(s);if(!o&&!i){let e="percent"===s.style?u:t;i=d.format(e)}return{progressBarProps:_O(a,{...c,"aria-valuenow":o?void 0:t,"aria-valuemin":r,"aria-valuemax":n,"aria-valuetext":o?void 0:i,role:"progressbar"}),labelProps:l}}({...e,label:a}),u=o?void 0:(r-n)/(i-n)*100,d=_N({...e,defaultClassName:"react-aria-ProgressBar",values:{percentage:u,valueText:l["aria-valuetext"],isIndeterminate:o}}),h=CP(e,{global:!0});return L.createElement("div",{..._O(h,d,l),ref:t,slot:e.slot||void 0},L.createElement(CA.Provider,{value:{...c,ref:s,elementType:"span"}},d.children))}),C3=null;function C9(e,t="assertive",r=7e3){C3?C3.announce(e,t,r):(C3=new C4,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?C3.announce(e,t,r):setTimeout(()=>{(null==C3?void 0:C3.isAttached())&&(null==C3||C3.announce(e,t,r))},100))}class C4{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,i;if(!this.node)return;let o=document.createElement("div");"object"==typeof e?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(o):null==(i=this.politeLog)||i.appendChild(o),""!==e&&setTimeout(()=>{o.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let C6=new Map,C7=new Set;function C8(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{let n=_B(r);if(!e(r)||!n)return;let i=C6.get(n);if(i&&(i.delete(r.propertyName),0===i.size&&(n.removeEventListener("transitioncancel",t),C6.delete(n)),0===C6.size)){for(let e of C7)e();C7.clear()}};document.body.addEventListener("transitionrun",r=>{let n=_B(r);if(!e(r)||!n)return;let i=C6.get(n);i||(i=new Set,C6.set(n,i),n.addEventListener("transitioncancel",t,{once:!0})),i.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function Te(e){requestAnimationFrame(()=>{for(let[e]of C6)"isConnected"in e&&!e.isConnected&&C6.delete(e);0===C6.size?e():C7.add(e)})}"u">typeof document&&("loading"!==document.readyState?C8():document.addEventListener("DOMContentLoaded",C8));let Tt="default",Tr="",Tn=new WeakMap;function Ti(e){if(Cr())"disabled"===Tt&&(Tt="restoring",setTimeout(()=>{Te(()=>{if("restoring"===Tt){let t=_j(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=Tr||""),Tr="",Tt="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Tn.has(e)){let t=Tn.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),Tn.delete(e)}}let To=L.createContext({register:()=>{}});function Ts(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function Ta(e,t,r){var n=Ts(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}function Tl(e,t){_m(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}To.displayName="PressResponderContext";let Tc=null!=(C=L.useInsertionEffect)?C:_m;function Tu(e){let t=(0,L.useRef)(null);return Tc(()=>{t.current=e},[e]),(0,L.useCallback)((...e)=>{let r=t.current;return null==r?void 0:r(...e)},[])}var Td=r("../../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/index.js"),Th=new WeakMap;class Tp{continuePropagation(){Ta(this,Th,!1)}get shouldStopPropagation(){var e;return e=Ts(this,Th,"get"),e.get?e.get.call(this):e.value}constructor(e,t,r,n){var i;!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,Th,{writable:!0,value:void 0}),Ta(this,Th,!0);let o=null!=(i=null==n?void 0:n.target)?i:r.currentTarget;const s=null==o?void 0:o.getBoundingClientRect();let a,l=0,c,u=null;null!=r.clientX&&null!=r.clientY&&(c=r.clientX,u=r.clientY),s&&(null!=c&&null!=u?(a=c-s.left,l=u-s.top):(a=s.width/2,l=s.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=a,this.y=l,this.key=r.key}}let Tf=Symbol("linkClicked"),Tm="react-aria-pressable-style",Tg="data-react-aria-pressable";function Tb(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:i,onPressUp:o,onClick:s,isDisabled:a,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:d,ref:h,...p}=function(e){let t=(0,L.useContext)(To);if(t){let{register:r,ref:n,...i}=t;e=_O(i,e),r()}return Tl(t,e.ref),e}(e),[f,m]=(0,L.useState)(!1),g=(0,L.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:b,removeAllGlobalListeners:v,removeGlobalListener:y}=_P(),w=(0,L.useCallback)((e,t)=>{let i=g.current;if(a||i.didFirePressStart)return!1;let o=!0;if(i.isTriggeringEvent=!0,n){let r=new Tp("pressstart",t,e);n(r),o=r.shouldStopPropagation}return r&&r(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,m(!0),o},[a,n,r]),x=(0,L.useCallback)((e,n,o=!0)=>{let s=g.current;if(!s.didFirePressStart)return!1;s.didFirePressStart=!1,s.isTriggeringEvent=!0;let l=!0;if(i){let t=new Tp("pressend",n,e);i(t),l=t.shouldStopPropagation}if(r&&r(!1),m(!1),t&&o&&!a){let r=new Tp("press",n,e);t(r),l&&(l=r.shouldStopPropagation)}return s.isTriggeringEvent=!1,l},[a,i,r,t]),k=Tu(x),S=(0,L.useCallback)((e,t)=>{let r=g.current;if(a)return!1;if(o){r.isTriggeringEvent=!0;let n=new Tp("pressup",t,e);return o(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0},[a,o]),_=Tu(S),C=(0,L.useCallback)(e=>{let t=g.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&x(Tw(t.target,e),t.pointerType,!1),t.isPressed=!1,M(null),t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||Ti(t.target),t.disposables))r();t.disposables=[]}},[d,v,x]),T=Tu(C),I=(0,L.useCallback)(e=>{u&&C(e)},[u,C]),E=(0,L.useCallback)(e=>{a||null==s||s(e)},[a,s]),R=(0,L.useCallback)((e,t)=>{if(!a&&s){let r=new MouseEvent("click",e);_5(r,t),s(_2(r))}},[a,s]),O=Tu(R),[A,N]=(0,L.useState)(!1);_m(()=>{let e=g.current;if(A){let t=e.target,r=_f(r=>{t&&Ty(r,t)&&!r.repeat&&_F(t,_B(r))&&e.target&&_(Tw(e.target,r),"keyboard")},t=>{var r,n,i;if(e.isPressed&&e.target&&Ty(t,e.target)){Tx(_B(t),t.key)&&t.preventDefault();let r=_B(t),i=_F(e.target,r);k(Tw(e.target,t),"keyboard",i),i&&O(t,e.target),v(),"Enter"!==t.key&&Tv(e.target)&&_F(e.target,r)&&!t[Tf]&&(t[Tf]=!0,Ca(e.target,t,!1)),e.isPressed=!1,N(!1),null==(n=e.metaKeyEvents)||n.delete(t.key)}else if("Meta"===t.key&&(null==(r=e.metaKeyEvents)?void 0:r.size)){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))null==(i=e.target)||i.dispatchEvent(new KeyboardEvent("keyup",r))}});return b(_j(e.target),"keyup",r,!0),()=>{y(_j(e.target),"keyup",r,!0)}}},[A,b,v,y]);let[Z,M]=(0,L.useState)(null);_m(()=>{let e=g.current;if("pointer"===Z){let t=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(_F(e.target,_B(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?T(t):(_0(e.target),e.target.click()))},80);t.currentTarget&&b(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else T(t);e.isOverTarget=!1}},r=e=>{T(e)};return b(_j(e.target),"pointerup",t,!1),b(_j(e.target),"pointercancel",r,!1),()=>{y(_j(e.target),"pointerup",t,!1),y(_j(e.target),"pointercancel",r,!1)}}},[Z,b,y]);let G=(0,L.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(Ty(t.nativeEvent,t.currentTarget)&&_F(t.currentTarget,_B(t))){var r;Tx(_B(t),t.key)&&t.preventDefault();let n=!0;e.isPressed||t.repeat||(e.target=t.currentTarget,e.isPressed=!0,N(!0),e.pointerType="keyboard",n=w(t,"keyboard")),n&&t.stopPropagation(),t.metaKey&&_8()&&(null==(r=e.metaKeyEvents)||r.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||_F(t.currentTarget,_B(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!Ca.isOpening){let r=!0;if(a&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||Cl(t.nativeEvent))){let e=w(t,"virtual"),n=S(t,"virtual"),i=x(t,"virtual");E(t),r=e&&n&&i}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual",i=S(Tw(t.currentTarget,t),n),o=x(Tw(t.currentTarget,t),n,!0);r=i&&o,e.isOverTarget=!1,E(t),C(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}};return"u">typeof PointerEvent&&(t.onPointerDown=t=>{var r;if(0!==t.button||!_F(t.currentTarget,_B(t)))return;if(r=t.nativeEvent,!Co()&&0===r.width&&0===r.height||1===r.width&&1===r.height&&0===r.pressure&&0===r.detail&&"mouse"===r.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let n=!0;if(!e.isPressed){e.isPressed=!0,M("pointer"),e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(Cr()){if("default"===Tt){let t=_j(e);Tr=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Tt="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";Tn.set(e,e.style[t]),e.style[t]="none"}}(e.target),n=w(t,e.pointerType);let r=_B(t);"releasePointerCapture"in r&&("hasPointerCapture"in r?r.hasPointerCapture(t.pointerId)&&r.releasePointerCapture(t.pointerId):r.releasePointerCapture(t.pointerId))}n&&t.stopPropagation()},t.onMouseDown=t=>{if(_F(t.currentTarget,_B(t))&&0===t.button){if(c){let r=function(e){for(var t;e&&!((t=e).matches(_$)&&function e(t,r){return _Q?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):"#comment"!==t.nodeName&&function(e){let t=_X(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,i="none"!==r&&"hidden"!==n&&"collapse"!==n;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);i="none"!==r&&"hidden"!==n&&"collapse"!==n}return i}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!r||"SUMMARY"===r.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(t)&&!function(e){let t=e;for(;null!=t;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}(t));)e=e.parentElement;let r=_X(e),n=r.document.activeElement;if(!n||n===e)return;_9=!0;let i=!1,o=e=>{(_B(e)===n||i)&&e.stopImmediatePropagation()},s=t=>{(_B(t)===n||i)&&(t.stopImmediatePropagation(),e||i||(i=!0,_0(n),c()))},a=t=>{(_B(t)===e||i)&&t.stopImmediatePropagation()},l=t=>{(_B(t)===e||i)&&(t.stopImmediatePropagation(),i||(i=!0,_0(n),c()))};r.addEventListener("blur",o,!0),r.addEventListener("focusout",s,!0),r.addEventListener("focusin",l,!0),r.addEventListener("focus",a,!0);let c=()=>{cancelAnimationFrame(u),r.removeEventListener("blur",o,!0),r.removeEventListener("focusout",s,!0),r.removeEventListener("focusin",l,!0),r.removeEventListener("focus",a,!0),_9=!1,i=!1},u=requestAnimationFrame(c);return c}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{_F(t.currentTarget,_B(t))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||S(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,w(Tw(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(Tw(e.target,t),e.pointerType,!1),I(t))},t.onDragStart=e=>{_F(e.currentTarget,_B(e))&&C(e)}),t},[a,c,v,d,C,I,x,w,S,E,R]);return(0,L.useEffect)(()=>{if(!h)return;let e=_j(h.current);if(!e||!e.head||e.getElementById(Tm))return;let t=e.createElement("style");t.id=Tm,t.textContent=`
|
|
308
308
|
@layer {
|
|
309
309
|
[${Tg}] {
|
|
310
310
|
touch-action: pan-x pan-y pinch-zoom;
|