@vkontakte/videoplayer-interactive 1.0.23-beta.0 → 1.0.23-dev.d35f212e.0

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/es5.umd.js ADDED
@@ -0,0 +1 @@
1
+ function _array_like_to_array(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _array_without_holes(arr){if(Array.isArray(arr))return _array_like_to_array(arr)}function _assert_this_initialized(self1){if(self1===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self1}function _call_super(_this,derived,args){derived=_get_prototype_of(derived);return _possible_constructor_return(_this,_is_native_reflect_construct()?Reflect.construct(derived,args||[],_get_prototype_of(_this).constructor):derived.apply(_this,args))}function _class_call_check(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _create_class(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _get(target,property,receiver){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get}else{_get=function get(target,property,receiver){var base=_super_prop_base(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(receiver||target)}return desc.value}}return _get(target,property,receiver||target)}function _get_prototype_of(o){_get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _get_prototype_of(o)}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_set_prototype_of(subClass,superClass)}function _instanceof(left,right){if(right!=null&&typeof Symbol!=="undefined"&&right[Symbol.hasInstance]){return!!right[Symbol.hasInstance](left)}else{return left instanceof right}}function _iterable_to_array(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}function _iterable_to_array_limit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"]!=null)_i["return"]()}finally{if(_d)throw _e}}return _arr}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _possible_constructor_return(self1,call){if(call&&(_type_of(call)==="object"||typeof call==="function")){return call}return _assert_this_initialized(self1)}function _set_prototype_of(o,p){_set_prototype_of=Object.setPrototypeOf||function setPrototypeOf(o,p){o.__proto__=p;return o};return _set_prototype_of(o,p)}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _super_prop_base(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_get_prototype_of(object);if(object===null)break}return object}function _to_consumable_array(arr){return _array_without_holes(arr)||_iterable_to_array(arr)||_unsupported_iterable_to_array(arr)||_non_iterable_spread()}function _type_of(obj){"@swc/helpers - typeof";return obj&&typeof Symbol!=="undefined"&&obj.constructor===Symbol?"symbol":typeof obj}function _unsupported_iterable_to_array(o,minLen){if(!o)return;if(typeof o==="string")return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}function _is_native_reflect_construct(){try{var result=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(_){}return(_is_native_reflect_construct=function(){return!!result})()}function _ts_generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),"throw":verb(1),"return":verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(op[0]===6&&_.label<t[1]){_.label=t[1];t=op;break}if(t&&_.label<t[2]){_.label=t[2];_.ops.push(op);break}if(t[2])_.ops.pop();_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e];y=0}finally{f=t=0}if(op[0]&5)throw op[1];return{value:op[0]?op[1]:void 0,done:true}}}(function(g,f){if((typeof exports==="undefined"?"undefined":_type_of(exports))=="object"&&(typeof module==="undefined"?"undefined":_type_of(module))<"u"){module.exports=f(require)}else if("function"==typeof define&&define.amd){define("VKInteractive",["@vkontakte/videoplayer-core","@vkontakte/videoplayer-statistics"],function(_d_0,_d_1){var d1={"@vkontakte/videoplayer-core":_d_0,"@vkontakte/videoplayer-statistics":_d_1},r=function r(m){if(m in d1)return d1[m];if(typeof require=="function")return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else{var gN={"@vkontakte/videoplayer-core":"@vkontakte/videoplayer-core","@vkontakte/videoplayer-statistics":"@vkontakte/videoplayer-statistics"},gReq=function gReq(r){var mod=r in gN?g[gN[r]]:g[r];return mod};g["VKInteractive"]=f(gReq)}})((typeof globalThis==="undefined"?"undefined":_type_of(globalThis))<"u"?globalThis:(typeof self==="undefined"?"undefined":_type_of(self))<"u"?self:this,function(require1){var exports1={};var __exports=exports1;var module1={exports:exports1};"use strict";var Ii=Object.defineProperty,Mb=Object.defineProperties,Ib=Object.getOwnPropertyDescriptor,Nb=Object.getOwnPropertyDescriptors,Pb=Object.getOwnPropertyNames,Mi=Object.getOwnPropertySymbols;var sc=Object.prototype.hasOwnProperty,Pp=Object.prototype.propertyIsEnumerable;var Dp=function(t){throw TypeError(t)};var Np=function(t,e,i){return e in t?Ii(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},K=function(t,e){for(var i in e||(e={}))sc.call(e,i)&&Np(t,i,e[i]);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(Mi)try{for(var _iterator=Mi(e)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var i=_step.value;Pp.call(e,i)&&Np(t,i,e[i])}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return t},it=function(t,e){return Mb(t,Nb(e))};var Wt=function(t,e){var i={};for(var c in t)sc.call(t,c)&&e.indexOf(c)<0&&(i[c]=t[c]);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(t!=null&&Mi)try{for(var _iterator=Mi(t)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var c=_step.value;e.indexOf(c)<0&&Pp.call(t,c)&&(i[c]=t[c])}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return i};var Db=function(t,e){return function(){return t&&(e=t(t=0)),e}};var kp=function(t,e){for(var i in e)Ii(t,i,{get:e[i],enumerable:!0})},kb=function(t,e,i,c){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(e&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"||typeof e=="function")try{var _loop=function(){var d1=_step.value;!sc.call(t,d1)&&d1!==i&&Ii(t,d1,{get:function(){return e[d1]},enumerable:!(c=Ib(e,d1))||c.enumerable})};for(var _iterator=Pb(e)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true)_loop()}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return t};var Vb=function(t){return kb(Ii({},"__esModule",{value:!0}),t)};var cc=function(t,e,i){return e.has(t)||Dp("Cannot "+i)};var Et=function(t,e,i){return cc(t,e,"read from private field"),i?i.call(t):e.get(t)},me=function(t,e,i){return e.has(t)?Dp("Cannot add the same private member more than once"):_instanceof(e,WeakSet)?e.add(t):e.set(t,i)},Ht=function(t,e,i,c){return cc(t,e,"write to private field"),c?c.call(t,i):e.set(t,i),i},so=function(t,e,i){return cc(t,e,"access private method"),i};var Vp=function(t,e,i,c){return{set _(d){Ht(t,e,d,i)},get _(){return Et(t,e,c)}}};var Tt=function(t,e,i){return new Promise(function(c,d1){var l=function(g){try{v(i.next(g))}catch(S){d1(S)}},m=function(g){try{v(i.throw(g))}catch(S){d1(S)}},v=function(g){return g.done?c(g.value):Promise.resolve(g.value).then(l,m)};v((i=i.apply(t,e)).next())})};var IE={};kp(IE,{ChapterError:function(){return lI},DEFAULT_GRAPH_DESIGN:function(){return uI},DEFAULT_MANIFEST_VERSION:function(){return dI},GraphEditor:function(){return pI},ManifestParsingError:function(){return hI},TEST_VERSION_REGEX:function(){return fI},addBranchToChapter:function(){return mI},addControlToChapter:function(){return vI},applyContainerTemplate:function(){return yI},containersTemplateCreator:function(){return _I},copyChapter:function(){return gI},createChapter:function(){return EI},createChapterBranch:function(){return TI},createContainerEvent:function(){return SI},createControl:function(){return bI},createControlEvent:function(){return CI},createManifest:function(){return wI},getChapterSuspenseActionType:function(){return AI},getEventByType:function(){return OI},getEventIndexByType:function(){return LI},migrateManifestToLatestVersion:function(){return xI},normalize:function(){return RI},parseManifest:function(){return MI},removeBranchesFromChapter:function(){return II},removeControlFromChapter:function(){return NI},updateChapterSuspenseAction:function(){return PI},updateContainerSuspenseAction:function(){return DI},updateControlActionEventLegacy:function(){return kI},validateChapter:function(){return VI}});function ce(t){var e=ME[t];if(e!==void 0)return e.exports;var i=ME[t]={exports:{}};return cI[t](i,i.exports,ce),i.exports}var cI,ME,Lt,lI,uI,dI,pI,hI,fI,mI,vI,yI,_I,gI,EI,TI,SI,bI,CI,wI,AI,OI,LI,xI,RI,MI,II,NI,PI,DI,kI,VI,NE=Db(function(){"use strict";cI={996:function(t){var c=function c(S,b){return b.clone!==!1&&b.isMergeableObject(S)?v((A=S,Array.isArray(A)?[]:{}),S,b):S;var A};var d1=function d1(S,b,A){return S.concat(b).map(function(L){return c(L,A)})};var l=function l(S){return Object.keys(S).concat(function(b){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(b).filter(function(A){return Object.propertyIsEnumerable.call(b,A)}):[]}(S))};var m=function m(S,b){try{return b in S}catch(A){return!1}};var e=function e(S){return function(b){return!!b&&(typeof b==="undefined"?"undefined":_type_of(b))=="object"}(S)&&!function(b){var A=Object.prototype.toString.call(b);return A==="[object RegExp]"||A==="[object Date]"||function(L){return L.$$typeof===i}(b)}(S)},i=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function v(S,b,A){(A=A||{}).arrayMerge=A.arrayMerge||d1,A.isMergeableObject=A.isMergeableObject||e,A.cloneUnlessOtherwiseSpecified=c;var L=Array.isArray(b);return L===Array.isArray(S)?L?A.arrayMerge(S,b,A):function(N,F,z){var j={};return z.isMergeableObject(N)&&l(N).forEach(function(P){j[P]=c(N[P],z)}),l(F).forEach(function(P){(function(k,U){return m(k,U)&&!(Object.hasOwnProperty.call(k,U)&&Object.propertyIsEnumerable.call(k,U))})(N,P)||(m(N,P)&&z.isMergeableObject(F[P])?j[P]=(function(k,U){if(!U.customMerge)return v;var I=U.customMerge(k);return typeof I=="function"?I:v})(P,z)(N[P],F[P],z):j[P]=c(F[P],z))}),j}(S,b,A):c(b,A)}v.all=function(S,b){if(!Array.isArray(S))throw new Error("first argument should be an array");return S.reduce(function(A,L){return v(A,L,b)},{})};var g=v;t.exports=g},96:function(t,e,i){var k=function k(I){var H=typeof I==="undefined"?"undefined":_type_of(I);return!!I&&(H=="object"||H=="function")};var U=function U(I){if(typeof I=="number")return I;if(function(st){return(typeof st==="undefined"?"undefined":_type_of(st))=="symbol"||function(mt){return!!mt&&(typeof mt==="undefined"?"undefined":_type_of(mt))=="object"}(st)&&F.call(st)==l}(I))return d1;if(k(I)){var H=typeof I.valueOf=="function"?I.valueOf():I;I=k(H)?H+"":H}if(typeof I!="string")return I===0?I:+I;I=I.replace(m,"");var Q=g.test(I);return Q||S.test(I)?b(I.slice(2),Q?2:8):v.test(I)?d1:+I};var c="Expected a function",d1=NaN,l="[object Symbol]",m=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,g=/^0b[01]+$/i,S=/^0o[0-7]+$/i,b=parseInt,A=_type_of(i.g)=="object"&&i.g&&i.g.Object===Object&&i.g,L=(typeof self==="undefined"?"undefined":_type_of(self))=="object"&&self&&self.Object===Object&&self,N=A||L||Function("return this")(),F=Object.prototype.toString,z=Math.max,j=Math.min,P=function P(){return N.Date.now()};t.exports=function(I,H,Q){var st=!0,mt=!0;if(typeof I!="function")throw new TypeError(c);return k(Q)&&(st="leading"in Q?!!Q.leading:st,mt="trailing"in Q?!!Q.trailing:mt),function(rt,at,pt){var vt,Ct,Ft,Bt,Nt,wt,Ee=0,Vt=!1,oe=!1,qt=!0;if(typeof rt!="function")throw new TypeError(c);function De(Yt){var te=vt,tn=Ct;return vt=Ct=void 0,Ee=Yt,Bt=rt.apply(tn,te)}function Qt(Yt){var te=Yt-wt;return wt===void 0||te>=at||te<0||oe&&Yt-Ee>=Ft}function Jt(){var Yt=P();if(Qt(Yt))return le(Yt);Nt=setTimeout(Jt,function(te){var tn=at-(te-wt);return oe?j(tn,Ft-(te-Ee)):tn}(Yt))}function le(Yt){return Nt=void 0,qt&&vt?De(Yt):(vt=Ct=void 0,Bt)}function Gt(){var Yt=P(),te=Qt(Yt);if(vt=arguments,Ct=this,wt=Yt,te){if(Nt===void 0)return function(tn){return Ee=tn,Nt=setTimeout(Jt,at),Vt?De(tn):Bt}(wt);if(oe)return Nt=setTimeout(Jt,at),De(wt)}return Nt===void 0&&(Nt=setTimeout(Jt,at)),Bt}return at=U(at)||0,k(pt)&&(Vt=!!pt.leading,Ft=(oe="maxWait"in pt)?z(U(pt.maxWait)||0,at):Ft,qt="trailing"in pt?!!pt.trailing:qt),Gt.cancel=function(){Nt!==void 0&&clearTimeout(Nt),Ee=0,vt=wt=Ct=Nt=void 0},Gt.flush=function(){return Nt===void 0?Bt:le(P())},Gt}(I,H,{leading:st,maxWait:H,trailing:mt})}},254:function(t,e,i){var d1=function d1(m){var v=l(m);return i(v)};var l=function l(m){if(!i.o(c,m)){var v=new Error("Cannot find module '"+m+"'");throw v.code="MODULE_NOT_FOUND",v}return c[m]};var c={"./icon_action.svg":485,"./icon_action_area.svg":492,"./icon_action_button.svg":580,"./icon_add.svg":490,"./icon_arrow.svg":706,"./icon_copy.svg":418,"./icon_end_node.svg":181,"./icon_end_of_video.svg":71,"./icon_etc.svg":161,"./icon_inaction.svg":577,"./icon_legend_navigation.svg":893,"./icon_location.svg":978,"./icon_lock.svg":628,"./icon_minus.svg":246,"./icon_move.svg":696,"./icon_node.svg":872,"./icon_pencil.svg":469,"./icon_pencil_filled.svg":288,"./icon_play.svg":363,"./icon_plus.svg":52,"./icon_random.svg":716,"./icon_start_node.svg":916,"./icon_trash_can.svg":228,"./icon_video.svg":691,"./icon_warning.svg":123};d1.keys=function(){return Object.keys(c)},d1.resolve=l,t.exports=d1,d1.id=254},521:function(t){t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTM1IDgxVjM3YTIgMiAwIDAgMSAyLTJoNjRhMiAyIDAgMCAxIDIgMnY0NGEyIDIgMCAwIDEtMiAySDM3YTIgMiAwIDAgMS0yLTJaIiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9Ii4wNiIvPjxwYXRoIGQ9Ik0yNyA4OVY0NWEyIDIgMCAwIDEgMi0yaDY0YTIgMiAwIDAgMSAyIDJ2NDRhMiAyIDAgMCAxLTIgMkgyOWEyIDIgMCAwIDEtMi0yWiIgZmlsbD0iI2ZmZiIgZmlsbC1vcGFjaXR5PSIuMTEiLz4KPC9zdmc+Cg=="},485:function(t){t.exports='<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M2.94559 5.07445L1.54456 6.40055L4.22088 8.93219C4.70945 9.3593 5.35248 9.15608 5.55006 8.93219L8.00186 6.54693L10.4537 4.16168L9.07059 2.81836L5.19063 6.52268C4.99911 6.70553 4.69825 6.70736 4.50452 6.52687L2.94559 5.07445Z" fill="currentColor"/>\n</svg>\n'},492:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M13.75 9C14.1642 9 14.5 9.33579 14.5 9.75V10.5C14.5 10.5 14.5 11.0055 14.4634 11.4531C14.4256 11.9163 14.3449 12.3347 14.1458 12.7255C13.8342 13.337 13.337 13.8342 12.7255 14.1458C12.3347 14.3449 11.9163 14.4256 11.4531 14.4634C11.0055 14.5 10.4999 14.5 10.4999 14.5L9.75 14.5C9.33579 14.5 9 14.1642 9 13.75C9 13.3358 9.33579 13 9.75 13L10.4685 13C10.4685 13 10.9517 12.9994 11.3309 12.9684C11.7014 12.9382 11.9004 12.8827 12.0445 12.8093C12.3738 12.6415 12.6415 12.3738 12.8093 12.0445C12.8827 11.9004 12.9382 11.7014 12.9684 11.3309C12.9994 10.9517 13 10.4686 13 10.4686V9.75C13 9.33579 13.3358 9 13.75 9Z" fill="currentColor"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9 2.25C9 1.83579 9.33579 1.5 9.75 1.5H10.5C10.5 1.5 11.0054 1.50001 11.453 1.53657C11.9162 1.57442 12.3346 1.65516 12.7254 1.85425C13.3369 2.16584 13.8341 2.66303 14.1457 3.27455C14.3448 3.66529 14.4255 4.08369 14.4634 4.54695C14.4999 4.99452 14.4999 5.50002 14.4999 5.50002L14.5 6.25C14.5 6.66421 14.1642 7 13.75 7C13.3358 7 13 6.66421 13 6.25L12.9999 5.53143C12.9999 5.53143 12.9993 5.04836 12.9683 4.6691C12.9381 4.2986 12.8826 4.09958 12.8092 3.95554C12.6414 3.62626 12.3737 3.35854 12.0444 3.19076C11.9004 3.11737 11.7013 3.06186 11.3308 3.03159C10.9516 3.00061 10.4686 3 10.4686 3H9.75C9.33579 3 9 2.66421 9 2.25Z" fill="currentColor"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7 13.75C7 14.1642 6.66421 14.5 6.25 14.5H5.5C5.5 14.5 4.99466 14.5 4.5471 14.4634C4.08383 14.4256 3.66544 14.3449 3.2747 14.1458C2.66317 13.8342 2.16598 13.337 1.85439 12.7255C1.6553 12.3347 1.57457 11.9163 1.53672 11.4531C1.50015 11.0055 1.50025 10.5 1.50025 10.5L1.5 9.75C1.5 9.33579 1.83579 9 2.25 9C2.66421 9 3 9.33579 3 9.75L3.00025 10.4686C3.00025 10.4686 3.00075 10.9517 3.03173 11.3309C3.06201 11.7014 3.11751 11.9004 3.1909 12.0445C3.35868 12.3738 3.6264 12.6415 3.95568 12.8093C4.09972 12.8827 4.29874 12.9382 4.66924 12.9684C5.0485 12.9994 5.53141 13 5.53141 13H6.25C6.66421 13 7 13.3358 7 13.75Z" fill="currentColor"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 7C1.83579 7 1.5 6.66421 1.5 6.25V5.5C1.5 5.5 1.49999 4.9945 1.53655 4.54693C1.5744 4.08367 1.65514 3.66527 1.85423 3.27453C2.16582 2.66301 2.66301 2.16582 3.27453 1.85423C3.66527 1.65514 4.08367 1.5744 4.54693 1.53655C4.9945 1.49999 5.50008 1.50002 5.50008 1.50002L6.25 1.5C6.66421 1.5 7 1.83579 7 2.25C7 2.66421 6.66421 3 6.25 3L5.53149 3.00002C5.53149 3.00002 5.04834 3.00058 4.66908 3.03157C4.29858 3.06184 4.09956 3.11735 3.95552 3.19074C3.62623 3.35852 3.35852 3.62623 3.19074 3.95552C3.11735 4.09956 3.06184 4.29858 3.03157 4.66908C3.00058 5.04834 3 5.53141 3 5.53141V6.25C3 6.66421 2.66421 7 2.25 7Z" fill="currentColor"/>\n<path d="M8 11C9.65685 11 11 9.65685 11 8C11 6.34315 9.65685 5 8 5C6.34315 5 5 6.34315 5 8C5 9.65685 6.34315 11 8 11Z" fill="currentColor"/>\n</svg>\n'},580:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M8 11.5C9.933 11.5 11.5 9.933 11.5 8C11.5 6.067 9.933 4.5 8 4.5C6.067 4.5 4.5 6.067 4.5 8C4.5 9.933 6.067 11.5 8 11.5Z" fill="currentColor"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM13.5 8C13.5 11.0376 11.0376 13.5 8 13.5C4.96243 13.5 2.5 11.0376 2.5 8C2.5 4.96243 4.96243 2.5 8 2.5C11.0376 2.5 13.5 4.96243 13.5 8Z" fill="currentColor"/>\n</svg>\n'},490:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 9v4.334c0 .666.448 1 1 1 .553 0 1-.334 1-1V9h4.334c.666 0 1-.447 1-1 0-.552-.334-1-1-1H9V2.667c0-.667-.447-1-1-1-.552 0-1 .333-1 1V7H2.667c-.667 0-1 .448-1 1 0 .553.333 1 1 1H7Z" fill="currentColor"/>\n</svg>\n'},706:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M5.75 3C5.33579 3 5 3.33579 5 3.75C5 4.16421 5.33579 4.5 5.75 4.5H10.4393L3.21967 11.7197C2.92678 12.0126 2.92678 12.4874 3.21967 12.7803C3.51256 13.0732 3.98744 13.0732 4.28033 12.7803L11.5 5.56066V10.25C11.5 10.6642 11.8358 11 12.25 11C12.6642 11 13 10.6642 13 10.25V3.75C13 3.33579 12.6642 3 12.25 3H5.75Z"\n fill="currentColor"/>\n</svg>\n'},418:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M1.82698 2.63803C1.5 3.27976 1.5 4.11984 1.5 5.8V8.8C1.5 9.9201 1.5 10.4802 1.71799 10.908C1.90973 11.2843 2.21569 11.5903 2.59202 11.782C2.71398 11.8442 2.8467 11.8886 3.00007 11.9203L3 11.7015V5.7C3 4.5799 3 4.01984 3.21799 3.59202C3.40973 3.21569 3.71569 2.90973 4.09202 2.71799C4.51984 2.5 5.0799 2.5 6.2 2.5H11.1966L11.4203 2.50007C11.3886 2.3467 11.3442 2.21399 11.282 2.09202C11.0903 1.71569 10.7843 1.40973 10.408 1.21799C9.98016 1 9.4201 1 8.3 1H6.3C4.61984 1 3.77976 1 3.13803 1.32698C2.57354 1.6146 2.1146 2.07354 1.82698 2.63803ZM7.7 5.5H11.3C11.8848 5.5 12.2332 5.50117 12.4914 5.52227C12.6491 5.53514 12.7153 5.55214 12.7331 5.55765C12.8224 5.60469 12.8953 5.67765 12.9424 5.76693C12.9479 5.78468 12.9649 5.85094 12.9777 6.00855C12.9988 6.26681 13 6.6152 13 7.2V11.8C13 12.3848 12.9988 12.7332 12.9777 12.9914C12.9649 13.1491 12.9479 13.2153 12.9424 13.2331C12.8953 13.3224 12.8224 13.3953 12.7331 13.4424C12.7153 13.4479 12.6491 13.4649 12.4914 13.4777C12.2332 13.4988 11.8848 13.5 11.3 13.5H7.7C7.1152 13.5 6.76681 13.4988 6.50855 13.4777C6.35094 13.4649 6.28468 13.4479 6.26693 13.4424C6.17765 13.3953 6.10469 13.3224 6.05765 13.2331C6.05214 13.2153 6.03514 13.1491 6.02227 12.9914C6.00117 12.7332 6 12.3848 6 11.8V7.2C6 6.6152 6.00117 6.26681 6.02227 6.00855C6.03514 5.85093 6.05214 5.78468 6.05765 5.76693C6.10469 5.67765 6.17765 5.60469 6.26692 5.55765C6.28468 5.55214 6.35093 5.53514 6.50855 5.52227C6.76681 5.50117 7.1152 5.5 7.7 5.5ZM12.7383 5.55945L12.7352 5.55833C12.7374 5.55904 12.7383 5.55943 12.7383 5.55945ZM12.9405 5.76175C12.9406 5.76169 12.941 5.76264 12.9417 5.76478L12.9405 5.76175ZM12.9417 13.2353L12.9405 13.2382C12.9406 13.2383 12.9407 13.2381 12.9409 13.2375C12.9411 13.237 12.9413 13.2363 12.9417 13.2353ZM12.7383 13.4405C12.7383 13.4406 12.7374 13.441 12.7352 13.4417L12.7383 13.4405ZM6.26478 13.4417L6.26175 13.4405C6.26171 13.4406 6.26221 13.4408 6.26333 13.4412C6.26373 13.4413 6.26421 13.4415 6.26478 13.4417ZM6.05945 13.2383C6.05943 13.2383 6.05904 13.2374 6.05833 13.2352L6.05945 13.2383ZM6.05833 5.76478L6.05945 5.76175C6.05944 5.7617 6.05918 5.7623 6.05873 5.76361C6.05861 5.76395 6.05848 5.76434 6.05833 5.76478ZM6.26175 5.55945C6.26169 5.55943 6.26264 5.55904 6.26478 5.55833L6.26175 5.55945ZM4.5 7.2C4.5 6.0799 4.5 5.51984 4.71799 5.09202C4.90973 4.71569 5.21569 4.40973 5.59202 4.21799C6.01984 4 6.5799 4 7.7 4H11.3C12.4201 4 12.9802 4 13.408 4.21799C13.7843 4.40973 14.0903 4.71569 14.282 5.09202C14.5 5.51984 14.5 6.0799 14.5 7.2V11.8C14.5 12.9201 14.5 13.4802 14.282 13.908C14.0903 14.2843 13.7843 14.5903 13.408 14.782C12.9802 15 12.4201 15 11.3 15H7.7C6.5799 15 6.01984 15 5.59202 14.782C5.21569 14.5903 4.90973 14.2843 4.71799 13.908C4.5 13.4802 4.5 12.9201 4.5 11.8V7.2Z"\n fill="currentColor"/>\n</svg>\n'},181:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M4 2.75C4 2.25 3.57655 2 3.25 2C2.83579 2 2.5 2.33579 2.5 2.75V14.25C2.5 14.6642 2.83579 15 3.25 15C3.66421 15 4 14.6642 4 14.25V10H12.2461C12.6603 10 12.9961 9.66421 12.9961 9.25V3.75C12.9961 3.33579 12.6603 3 12.2461 3H4V2.75ZM7.01562 8.5H9.01562V6.5H7.01562V8.5ZM7.01562 4.5V6.5H5.01562V4.5H7.01562ZM9.01562 4.5H11V6.5H9.01562V4.5Z" fill="currentColor"/>\n</svg>\n'},71:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.93736 6.59854L6.22562 4.56868C5.49267 4.16785 5.1262 3.96744 4.82659 4.00385C4.56514 4.03562 4.32901 4.17562 4.17569 4.38976C3.99998 4.63517 3.99998 5.05286 3.99998 5.88825V10.1232C3.99998 10.9598 3.99998 11.3781 4.17592 11.6236C4.32944 11.8378 4.56585 11.9777 4.82751 12.0093C5.12738 12.0454 5.49408 11.8442 6.22749 11.4418L9.93934 9.40504C10.4254 9.13835 10.7699 8.94933 11 8.77819V11.2498C11 11.664 11.3358 11.9998 11.75 11.9998C12.1642 11.9998 12.5 11.664 12.5 11.2498V4.74999C12.5 4.33577 12.1642 3.99999 11.75 3.99999C11.3358 3.99999 11 4.33577 11 4.74999V7.2247C10.7696 7.05367 10.4245 6.86496 9.93736 6.59854Z" fill="currentColor"/>\n</svg>\n'},161:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.333 8a1.333 1.333 0 1 1-2.666 0 1.333 1.333 0 0 1 2.666 0ZM14 8a1.333 1.333 0 1 1-2.667 0A1.333 1.333 0 0 1 14 8ZM4.667 8A1.333 1.333 0 1 1 2 8a1.333 1.333 0 0 1 2.667 0Z" fill="currentColor"/>\n</svg>\n'},577:function(t){t.exports='<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4.26103 6.00006L2.53537 7.72572C2.34011 7.92098 2.34011 8.23756 2.53537 8.43283L3.56723 9.46469C3.76249 9.65995 4.07908 9.65995 4.27434 9.46469L6 7.73903L7.72566 9.46469C7.92092 9.65996 8.2375 9.65996 8.43277 9.46469L9.46463 8.43283C9.65989 8.23757 9.65989 7.92099 9.46463 7.72572L7.73897 6.00006L9.46461 4.27441C9.65987 4.07915 9.65987 3.76257 9.4646 3.5673L8.43274 2.53544C8.23748 2.34018 7.9209 2.34018 7.72563 2.53544L6 4.26108L4.27436 2.53544C4.0791 2.34018 3.76252 2.34018 3.56725 2.53544L2.53539 3.56731C2.34013 3.76257 2.34013 4.07915 2.53539 4.27441L4.26103 6.00006Z" fill="currentColor"/>\n</svg>\n'},893:function(t){t.exports='<svg viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="path-1-inside-1_2354_299569" fill="white">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M14.7071 26.7071C14.3166 27.0976 13.6834 27.0976 13.2929 26.7071L11.2929 24.7071C10.9024 24.3166 10.9024 23.6834 11.2929 23.2929C11.6834 22.9024 12.3166 22.9024 12.7071 23.2929L14 24.5858L15.2929 23.2929C15.6834 22.9024 16.3166 22.9024 16.7071 23.2929C17.0976 23.6834 17.0976 24.3166 16.7071 24.7071L14.7071 26.7071Z"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M1.29289 14.7071C0.902369 14.3166 0.902369 13.6834 1.29289 13.2929L3.29289 11.2929C3.68342 10.9024 4.31658 10.9024 4.70711 11.2929C5.09763 11.6834 5.09763 12.3166 4.70711 12.7071L3.41421 14L4.70711 15.2929C5.09763 15.6834 5.09763 16.3166 4.70711 16.7071C4.31658 17.0976 3.68342 17.0976 3.29289 16.7071L1.29289 14.7071Z"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M26.7071 13.2929C27.0976 13.6834 27.0976 14.3166 26.7071 14.7071L24.7071 16.7071C24.3166 17.0976 23.6834 17.0976 23.2929 16.7071C22.9024 16.3166 22.9024 15.6834 23.2929 15.2929L24.5858 14L23.2929 12.7071C22.9024 12.3166 22.9024 11.6834 23.2929 11.2929C23.6834 10.9024 24.3166 10.9024 24.7071 11.2929L26.7071 13.2929Z"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M13.2929 1.29289C13.6834 0.902369 14.3166 0.902369 14.7071 1.29289L16.7071 3.29289C17.0976 3.68342 17.0976 4.31658 16.7071 4.70711C16.3166 5.09763 15.6834 5.09763 15.2929 4.70711L14 3.41421L12.7071 4.70711C12.3166 5.09763 11.6834 5.09763 11.2929 4.70711C10.9024 4.31658 10.9024 3.68342 11.2929 3.29289L13.2929 1.29289Z"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M13.8624 6.99995C13.067 6.99952 12.4764 6.9992 11.9647 7.1363C10.5844 7.50617 9.50616 8.58436 9.1363 9.96472C8.9992 10.4764 8.99952 11.067 8.99995 11.8624L9 16C9 18.7614 11.2386 21 14 21C16.7614 21 19 18.7614 19 16L19 11.8624C19.0005 11.067 19.0008 10.4764 18.8637 9.96472C18.4938 8.58436 17.4156 7.50617 16.0353 7.1363C15.5236 6.9992 14.933 6.99952 14.1376 6.99995H13.8624ZM14 9V13C14 13.5523 13.5523 14 13 14H11V16C11 17.6569 12.3431 19 14 19C15.6569 19 17 17.6569 17 16V12C17 11.0056 16.9914 10.7046 16.9319 10.4824C16.7469 9.79218 16.2078 9.25308 15.5176 9.06815C15.2954 9.00859 14.9944 9 14 9Z"/>\n</mask>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M14.7071 26.7071C14.3166 27.0976 13.6834 27.0976 13.2929 26.7071L11.2929 24.7071C10.9024 24.3166 10.9024 23.6834 11.2929 23.2929C11.6834 22.9024 12.3166 22.9024 12.7071 23.2929L14 24.5858L15.2929 23.2929C15.6834 22.9024 16.3166 22.9024 16.7071 23.2929C17.0976 23.6834 17.0976 24.3166 16.7071 24.7071L14.7071 26.7071Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M1.29289 14.7071C0.902369 14.3166 0.902369 13.6834 1.29289 13.2929L3.29289 11.2929C3.68342 10.9024 4.31658 10.9024 4.70711 11.2929C5.09763 11.6834 5.09763 12.3166 4.70711 12.7071L3.41421 14L4.70711 15.2929C5.09763 15.6834 5.09763 16.3166 4.70711 16.7071C4.31658 17.0976 3.68342 17.0976 3.29289 16.7071L1.29289 14.7071Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M26.7071 13.2929C27.0976 13.6834 27.0976 14.3166 26.7071 14.7071L24.7071 16.7071C24.3166 17.0976 23.6834 17.0976 23.2929 16.7071C22.9024 16.3166 22.9024 15.6834 23.2929 15.2929L24.5858 14L23.2929 12.7071C22.9024 12.3166 22.9024 11.6834 23.2929 11.2929C23.6834 10.9024 24.3166 10.9024 24.7071 11.2929L26.7071 13.2929Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M13.2929 1.29289C13.6834 0.902369 14.3166 0.902369 14.7071 1.29289L16.7071 3.29289C17.0976 3.68342 17.0976 4.31658 16.7071 4.70711C16.3166 5.09763 15.6834 5.09763 15.2929 4.70711L14 3.41421L12.7071 4.70711C12.3166 5.09763 11.6834 5.09763 11.2929 4.70711C10.9024 4.31658 10.9024 3.68342 11.2929 3.29289L13.2929 1.29289Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M13.8624 6.99995C13.067 6.99952 12.4764 6.9992 11.9647 7.1363C10.5844 7.50617 9.50616 8.58436 9.1363 9.96472C8.9992 10.4764 8.99952 11.067 8.99995 11.8624L9 16C9 18.7614 11.2386 21 14 21C16.7614 21 19 18.7614 19 16L19 11.8624C19.0005 11.067 19.0008 10.4764 18.8637 9.96472C18.4938 8.58436 17.4156 7.50617 16.0353 7.1363C15.5236 6.9992 14.933 6.99952 14.1376 6.99995H13.8624ZM14 9V13C14 13.5523 13.5523 14 13 14H11V16C11 17.6569 12.3431 19 14 19C15.6569 19 17 17.6569 17 16V12C17 11.0056 16.9914 10.7046 16.9319 10.4824C16.7469 9.79218 16.2078 9.25308 15.5176 9.06815C15.2954 9.00859 14.9944 9 14 9Z" fill="white"/>\n<path d="M13.2929 26.7071L12.5858 27.4142L13.2929 26.7071ZM14.7071 26.7071L15.4142 27.4142L14.7071 26.7071ZM11.2929 23.2929L12 24V24L11.2929 23.2929ZM12.7071 23.2929L13.4142 22.5858V22.5858L12.7071 23.2929ZM14 24.5858L13.2929 25.2929C13.4804 25.4804 13.7348 25.5858 14 25.5858C14.2652 25.5858 14.5196 25.4804 14.7071 25.2929L14 24.5858ZM15.2929 23.2929L14.5858 22.5858V22.5858L15.2929 23.2929ZM16.7071 23.2929L17.4142 22.5858L16.7071 23.2929ZM16.7071 24.7071L17.4142 25.4142L16.7071 24.7071ZM1.29289 13.2929L0.585786 12.5858H0.585786L1.29289 13.2929ZM1.29289 14.7071L0.585786 15.4142H0.585786L1.29289 14.7071ZM3.29289 11.2929L2.58579 10.5858L3.29289 11.2929ZM4.70711 11.2929L4 12H4L4.70711 11.2929ZM4.70711 12.7071L5.41421 13.4142L4.70711 12.7071ZM3.41421 14L2.70711 13.2929C2.31658 13.6834 2.31658 14.3166 2.70711 14.7071L3.41421 14ZM4.70711 15.2929L5.41421 14.5858L4.70711 15.2929ZM4.70711 16.7071L5.41421 17.4142L4.70711 16.7071ZM3.29289 16.7071L2.58579 17.4142H2.58579L3.29289 16.7071ZM26.7071 14.7071L27.4142 15.4142L26.7071 14.7071ZM26.7071 13.2929L27.4142 12.5858L26.7071 13.2929ZM23.2929 16.7071L24 16H24L23.2929 16.7071ZM23.2929 15.2929L22.5858 14.5858H22.5858L23.2929 15.2929ZM24.5858 14L25.2929 14.7071C25.4804 14.5196 25.5858 14.2652 25.5858 14C25.5858 13.7348 25.4804 13.4804 25.2929 13.2929L24.5858 14ZM23.2929 12.7071L22.5858 13.4142H22.5858L23.2929 12.7071ZM23.2929 11.2929L22.5858 10.5858L23.2929 11.2929ZM24.7071 11.2929L25.4142 10.5858L24.7071 11.2929ZM14.7071 1.29289L15.4142 0.585786V0.585786L14.7071 1.29289ZM13.2929 1.29289L12.5858 0.585786V0.585786L13.2929 1.29289ZM16.7071 3.29289L17.4142 2.58579L16.7071 3.29289ZM16.7071 4.70711L16 4V4L16.7071 4.70711ZM15.2929 4.70711L14.5858 5.41421L15.2929 4.70711ZM14 3.41421L14.7071 2.70711C14.3166 2.31658 13.6834 2.31658 13.2929 2.70711L14 3.41421ZM12.7071 4.70711L13.4142 5.41421L12.7071 4.70711ZM11.2929 4.70711L10.5858 5.41421L11.2929 4.70711ZM11.2929 3.29289L10.5858 2.58579V2.58579L11.2929 3.29289ZM13.8624 6.99995L13.8619 7.99995H13.8624V6.99995ZM11.9647 7.1363L11.7059 6.17037L11.9647 7.1363ZM9.1363 9.96472L8.17037 9.7059L9.1363 9.96472ZM8.99995 11.8624L9.99995 11.8624L9.99995 11.8619L8.99995 11.8624ZM9 16H10V16L9 16ZM19 16L18 16V16H19ZM19 11.8624L18 11.8619V11.8624L19 11.8624ZM18.8637 9.96472L19.8296 9.7059V9.7059L18.8637 9.96472ZM16.0353 7.1363L15.7765 8.10222L16.0353 7.1363ZM14.1376 6.99995V7.99995H14.1381L14.1376 6.99995ZM14 9V8H13V9H14ZM11 14V13H10V14H11ZM16.9319 10.4824L17.8978 10.2235V10.2235L16.9319 10.4824ZM15.5176 9.06815L15.7765 8.10222H15.7765L15.5176 9.06815ZM12.5858 27.4142C13.3668 28.1953 14.6332 28.1953 15.4142 27.4142L14 26L12.5858 27.4142ZM10.5858 25.4142L12.5858 27.4142L14 26L12 24L10.5858 25.4142ZM10.5858 22.5858C9.80474 23.3668 9.80474 24.6332 10.5858 25.4142L12 24L10.5858 22.5858ZM13.4142 22.5858C12.6332 21.8047 11.3668 21.8047 10.5858 22.5858L12 24V24L13.4142 22.5858ZM14.7071 23.8787L13.4142 22.5858L12 24L13.2929 25.2929L14.7071 23.8787ZM14.5858 22.5858L13.2929 23.8787L14.7071 25.2929L16 24L14.5858 22.5858ZM17.4142 22.5858C16.6332 21.8047 15.3668 21.8047 14.5858 22.5858L16 24L17.4142 22.5858ZM17.4142 25.4142C18.1953 24.6332 18.1953 23.3668 17.4142 22.5858L16 24L17.4142 25.4142ZM15.4142 27.4142L17.4142 25.4142L16 24L14 26L15.4142 27.4142ZM0.585786 12.5858C-0.195262 13.3668 -0.195262 14.6332 0.585786 15.4142L2 14L0.585786 12.5858ZM2.58579 10.5858L0.585786 12.5858L2 14L4 12L2.58579 10.5858ZM5.41421 10.5858C4.63316 9.80474 3.36684 9.80474 2.58579 10.5858L4 12L5.41421 10.5858ZM5.41421 13.4142C6.19526 12.6332 6.19526 11.3668 5.41421 10.5858L4 12H4L5.41421 13.4142ZM4.12132 14.7071L5.41421 13.4142L4 12L2.70711 13.2929L4.12132 14.7071ZM5.41421 14.5858L4.12132 13.2929L2.70711 14.7071L4 16L5.41421 14.5858ZM5.41421 17.4142C6.19526 16.6332 6.19526 15.3668 5.41421 14.5858L4 16L5.41421 17.4142ZM2.58579 17.4142C3.36684 18.1953 4.63316 18.1953 5.41421 17.4142L4 16L2.58579 17.4142ZM0.585786 15.4142L2.58579 17.4142L4 16L2 14L0.585786 15.4142ZM27.4142 15.4142C28.1953 14.6332 28.1953 13.3668 27.4142 12.5858L26 14L27.4142 15.4142ZM25.4142 17.4142L27.4142 15.4142L26 14L24 16L25.4142 17.4142ZM22.5858 17.4142C23.3668 18.1953 24.6332 18.1953 25.4142 17.4142L24 16L22.5858 17.4142ZM22.5858 14.5858C21.8047 15.3668 21.8047 16.6332 22.5858 17.4142L24 16H24L22.5858 14.5858ZM23.8787 13.2929L22.5858 14.5858L24 16L25.2929 14.7071L23.8787 13.2929ZM22.5858 13.4142L23.8787 14.7071L25.2929 13.2929L24 12L22.5858 13.4142ZM22.5858 10.5858C21.8047 11.3668 21.8047 12.6332 22.5858 13.4142L24 12L22.5858 10.5858ZM25.4142 10.5858C24.6332 9.80474 23.3668 9.80474 22.5858 10.5858L24 12L25.4142 10.5858ZM27.4142 12.5858L25.4142 10.5858L24 12L26 14L27.4142 12.5858ZM15.4142 0.585786C14.6332 -0.195262 13.3668 -0.195262 12.5858 0.585786L14 2L15.4142 0.585786ZM17.4142 2.58579L15.4142 0.585786L14 2L16 4L17.4142 2.58579ZM17.4142 5.41421C18.1953 4.63316 18.1953 3.36684 17.4142 2.58579L16 4L17.4142 5.41421ZM14.5858 5.41421C15.3668 6.19526 16.6332 6.19526 17.4142 5.41421L16 4V4L14.5858 5.41421ZM13.2929 4.12132L14.5858 5.41421L16 4L14.7071 2.70711L13.2929 4.12132ZM13.4142 5.41421L14.7071 4.12132L13.2929 2.70711L12 4L13.4142 5.41421ZM10.5858 5.41421C11.3668 6.19526 12.6332 6.19526 13.4142 5.41421L12 4L10.5858 5.41421ZM10.5858 2.58579C9.80474 3.36684 9.80474 4.63316 10.5858 5.41421L12 4L10.5858 2.58579ZM12.5858 0.585786L10.5858 2.58579L12 4L14 2L12.5858 0.585786ZM12.2235 8.10222C12.5804 8.00661 13.0225 7.9995 13.8619 7.99995L13.863 5.99995C13.1116 5.99954 12.3724 5.99179 11.7059 6.17037L12.2235 8.10222ZM10.1022 10.2235C10.3796 9.18827 11.1883 8.37962 12.2235 8.10222L11.7059 6.17037C9.98044 6.63271 8.63271 7.98044 8.17037 9.7059L10.1022 10.2235ZM9.99995 11.8619C9.9995 11.0225 10.0066 10.5804 10.1022 10.2235L8.17037 9.7059C7.99179 10.3724 7.99954 11.1116 7.99995 11.863L9.99995 11.8619ZM14 20C11.7909 20 10 18.2091 10 16H8C8 19.3137 10.6863 22 14 22V20ZM18 16C18 18.2091 16.2091 20 14 20V22C17.3137 22 20 19.3137 20 16H18ZM17.8978 10.2235C17.9934 10.5804 18.0005 11.0225 18 11.8619L20 11.863C20.0005 11.1116 20.0082 10.3724 19.8296 9.7059L17.8978 10.2235ZM15.7765 8.10222C16.8117 8.37962 17.6204 9.18827 17.8978 10.2235L19.8296 9.7059C19.3673 7.98044 18.0196 6.63271 16.2941 6.17037L15.7765 8.10222ZM14.1381 7.99995C14.9775 7.9995 15.4196 8.00661 15.7765 8.10222L16.2941 6.17037C15.6276 5.99179 14.8884 5.99954 14.137 5.99995L14.1381 7.99995ZM13 9V13H15V9H13ZM13 13V15C14.1046 15 15 14.1046 15 13H13ZM13 13H11V15H13V13ZM10 14V16H12V14H10ZM10 16C10 18.2091 11.7909 20 14 20V18C12.8954 18 12 17.1046 12 16H10ZM14 20C16.2091 20 18 18.2091 18 16H16C16 17.1046 15.1046 18 14 18V20ZM18 16V12H16V16H18ZM18 12C18 11.0776 18.0004 10.6065 17.8978 10.2235L15.9659 10.7412C15.9677 10.7478 15.9807 10.7937 15.9892 10.9938C15.9977 11.1963 16 11.4985 16 12H18ZM17.8978 10.2235C17.6204 9.18827 16.8117 8.37962 15.7765 8.10222L15.2588 10.0341C15.6039 10.1265 15.8735 10.3961 15.9659 10.7412L17.8978 10.2235ZM15.7765 8.10222C15.3935 7.9996 14.9224 8 14 8V10C14.5015 10 14.8037 10.0023 15.0062 10.0109C15.2063 10.0193 15.2522 10.0323 15.2588 10.0341L15.7765 8.10222ZM13.8624 7.99995H14.1376V5.99995H13.8624V7.99995ZM10 16L9.99995 11.8624L7.99995 11.8624L8 16L10 16ZM18 11.8624L18 16L20 16L20 11.8624L18 11.8624Z" fill="white" mask="url(#path-1-inside-1_2354_299569)"/>\n</svg>\n'},978:function(t){t.exports='<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6 12C6 16.0237 8.93828 21.8231 14.8148 29.3979L14.8148 29.3979C15.3226 30.0525 16.2649 30.1714 16.9194 29.6637C17.0188 29.5866 17.1081 29.4973 17.1852 29.3979C23.0617 21.8231 26 16.0237 26 12C26 6.47143 21.5286 2 16 2C10.4714 2 6 6.47143 6 12ZM12.5014 12.0015C12.5014 10.0695 14.0694 8.50148 16.0014 8.50148C17.9334 8.50148 19.5014 10.0695 19.5014 12.0015C19.5014 13.9335 17.9334 15.5015 16.0014 15.5015C14.0694 15.5015 12.5014 13.9335 12.5014 12.0015Z" fill="currentColor"/>\n</svg>\n'},628:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M14 10V11C14 12.4001 14 13.1002 13.7275 13.635C13.4878 14.1054 13.1054 14.4878 12.635 14.7275C12.1002 15 11.4001 15 10 15H6C4.59987 15 3.8998 15 3.36502 14.7275C2.89462 14.4878 2.51217 14.1054 2.27248 13.635C2 13.1002 2 12.4001 2 11V10C2 8.59987 2 7.8998 2.27248 7.36502C2.51217 6.89462 2.89462 6.51217 3.36502 6.27248C3.54965 6.17841 3.75397 6.11682 4 6.07649V5C4 2.79086 5.79086 1 8 1C10.2091 1 12 2.79086 12 5V6.07649C12.246 6.11682 12.4504 6.17841 12.635 6.27248C13.1054 6.51217 13.4878 6.89462 13.7275 7.36502C14 7.8998 14 8.59987 14 10ZM10 5V6H6V5C6 3.89543 6.89543 3 8 3C9.10457 3 10 3.89543 10 5Z" fill="currentColor"/>\n</svg>\n'},246:function(t){t.exports='<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M1.96875 6.00013C1.96875 5.64868 2.25366 5.36377 2.60511 5.36377H9.39299C9.74445 5.36377 10.0294 5.64868 10.0294 6.00013C10.0294 6.35159 9.74445 6.6365 9.39299 6.6365H2.60511C2.25366 6.6365 1.96875 6.35159 1.96875 6.00013Z" fill="currentColor"/>\n</svg>\n'},696:function(t){t.exports='<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="m10 3.5.53-.53a.75.75 0 0 0-1.06 0l.53.53Zm0 14-.53.53a.75.75 0 0 0 1.06 0L10 17.5Zm7-7 .53.53a.75.75 0 0 0 0-1.06l-.53.53Zm-14 0-.53-.53a.75.75 0 0 0 0 1.06L3 10.5Zm4.37-5.43a.75.75 0 0 0 1.06 1.06L7.37 5.07Zm4.2 1.06a.75.75 0 1 0 1.06-1.06l-1.06 1.06Zm3.86 1.74a.75.75 0 1 0-1.06 1.06l1.06-1.06Zm-1.06 4.2a.75.75 0 1 0 1.06 1.06l-1.06-1.06ZM5.63 8.93a.75.75 0 0 0-1.06-1.06l1.06 1.06Zm-1.06 4.2a.75.75 0 0 0 1.06-1.06l-1.06 1.06Zm8.06 2.8a.75.75 0 1 0-1.06-1.06l1.06 1.06Zm-4.2-1.06a.75.75 0 0 0-1.06 1.06l1.06-1.06ZM9.25 3.5v7h1.5v-7h-1.5Zm0 7v7h1.5v-7h-1.5Zm.75.75h7v-1.5h-7v1.5Zm0-1.5H3v1.5h7v-1.5Zm-.53-6.78-2.1 2.1 1.06 1.06 2.1-2.1-1.06-1.06Zm0 1.06 2.1 2.1 1.06-1.06-2.1-2.1-1.06 1.06Zm8.06 5.94-2.1-2.1-1.06 1.06 2.1 2.1 1.06-1.06Zm-1.06 0-2.1 2.1 1.06 1.06 2.1-2.1-1.06-1.06ZM3.53 11.03l2.1-2.1-1.06-1.06-2.1 2.1 1.06 1.06Zm-1.06 0 2.1 2.1 1.06-1.06-2.1-2.1-1.06 1.06Zm8.06 7 2.1-2.1-1.06-1.06-2.1 2.1 1.06 1.06Zm0-1.06-2.1-2.1-1.06 1.06 2.1 2.1 1.06-1.06Z" fill="currentColor"/>\n</svg>\n'},872:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M4.6 12.5001C3.71634 12.5001 3 11.7541 3 10.8338V9.00003L1.5 9.00003C0.947716 9.00003 0.5 8.55231 0.5 8.00003C0.5 7.44774 0.947715 7.00003 1.5 7.00003H3V5.1663C3 4.24603 3.71634 3.5 4.6 3.5H11.4C12.2837 3.5 13 4.24603 13 5.1663V7.00003H14.5C15.0523 7.00003 15.5 7.44774 15.5 8.00003C15.5 8.55231 15.0523 9.00003 14.5 9.00003H13V10.8338C13 11.7541 12.2837 12.5001 11.4 12.5001H4.6Z" fill="currentColor"/>\n</svg>\n'},469:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M12.5358 1.66419C12.0373 1.44527 11.4698 1.44527 10.9713 1.66419C10.7686 1.75324 10.6042 1.87791 10.4581 2.00627C10.3207 2.12698 10.1662 2.28155 9.99267 2.45507L2.60308 9.84464C2.3076 10.1398 2.075 10.3721 1.90431 10.6506C1.75389 10.8961 1.64304 11.1637 1.57583 11.4437C1.49957 11.7613 1.49978 12.5562 1.50003 12.9738C1.5 13.0957 1.49997 13.2278 1.50931 13.3422C1.51989 13.4716 1.54606 13.6427 1.63595 13.8191C1.75551 14.0537 1.94628 14.2445 2.18093 14.364C2.35734 14.4539 2.52836 14.4801 2.65781 14.4907C2.77218 14.5 2.90431 14.5 3.02618 14.5C3.44381 14.5002 4.23866 14.5004 4.55633 14.4242C4.83626 14.3569 5.10387 14.2461 5.34934 14.0957C5.62789 13.925 5.86021 13.6924 6.15534 13.3969L13.5449 6.00734C13.7184 5.83382 13.873 5.67925 13.9937 5.54185C14.1221 5.39577 14.2467 5.23142 14.3358 5.02864C14.5547 4.53014 14.5547 3.96272 14.3358 3.46421C14.2467 3.26144 14.1221 3.09709 13.9937 2.951C13.873 2.81363 13.7184 2.65908 13.5449 2.48559L13.5145 2.45512C13.341 2.28158 13.1864 2.12699 13.049 2.00627C12.9029 1.87791 12.7385 1.75324 12.5358 1.66419ZM11.573 3.03434C11.6881 2.98382 11.819 2.98382 11.9341 3.03434C11.9376 3.03587 11.9697 3.04997 12.0612 3.13043C12.1579 3.21536 12.2781 3.33507 12.4715 3.52846C12.6649 3.72185 12.7846 3.84208 12.8695 3.93874C12.95 4.03031 12.9641 4.06242 12.9656 4.06592C13.0162 4.18096 13.0161 4.31195 12.9656 4.42698C12.9641 4.43048 12.95 4.46255 12.8695 4.55412C12.7846 4.65078 12.6649 4.77101 12.4715 4.9644L11.7483 5.68764L10.3123 4.25171L11.0356 3.52846C11.229 3.33507 11.3492 3.21536 11.4459 3.13043C11.5374 3.04997 11.5695 3.03587 11.573 3.03434ZM9.25167 5.31237L3.71237 10.8517C3.3421 11.222 3.2466 11.3243 3.18024 11.4325C3.11187 11.5441 3.06148 11.6658 3.03093 11.793C3.0199 11.839 3.01279 12.018 3.00803 12.2249C2.9984 12.6435 2.99359 12.8528 3.01561 12.8971C3.0442 12.9546 3.04794 12.9583 3.10536 12.987C3.1496 13.009 3.35813 13.0045 3.77519 12.9954C3.98467 12.9909 4.14811 12.9832 4.20699 12.9691C4.33423 12.9385 4.45587 12.8881 4.56745 12.8197C4.67573 12.7534 4.77803 12.6579 5.1483 12.2876L10.6876 6.7483L9.25167 5.31237Z"\n fill="currentColor"/>\n</svg>\n'},288:function(t){t.exports='<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M9.99876 1.29326C9.60775 0.902248 8.9738 0.902248 8.58279 1.29326L7.87481 2.00124L9.99876 4.12519L10.7067 3.41721C11.0978 3.0262 11.0978 2.39225 10.7067 2.00124L9.99876 1.29326Z"\n fill="currentColor"/>\n <path\n d="M9.0182 5.10575L6.89425 2.9818L2.55647 7.31958C2.11682 7.75922 1.78558 8.29519 1.58896 8.88503L1.01593 10.6041C0.937661 10.8389 1.16106 11.0623 1.39588 10.9841L3.11497 10.411C3.70481 10.2144 4.24078 9.88318 4.68042 9.44353L9.0182 5.10575Z"\n fill="currentColor"/>\n</svg>\n'},363:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M5.53333 2C5.77779 2 6.03098 2.10178 6.30252 2.29553L12.6733 6.84364C13.0986 7.14726 13.333 7.55795 13.333 8.00023C13.333 8.44236 13.0986 8.85274 12.6733 9.15683L6.30252 13.7042C6.03098 13.8974 5.77764 14.0003 5.53272 14C4.99535 14 4.66634 13.5213 4.66634 12.7808V3.21931C4.66634 2.47885 4.99535 2 5.53333 2Z"\n fill="currentColor"/>\n</svg>\n\n'},52:function(t){t.exports='<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.75 1.75105C6.75 1.33684 6.41421 1.00105 6 1.00105C5.58579 1.00105 5.25 1.33684 5.25 1.75105V5.25105H1.75C1.33579 5.25105 1 5.58684 1 6.00105C1 6.41527 1.33579 6.75105 1.75 6.75105H5.25V10.2511C5.25 10.6653 5.58579 11.0011 6 11.0011C6.41421 11.0011 6.75 10.6653 6.75 10.2511V6.75105H10.25C10.6642 6.75105 11 6.41527 11 6.00105C11 5.58684 10.6642 5.25105 10.25 5.25105H6.75V1.75105Z" fill="currentColor"/>\n</svg>\n'},716:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M12.713 2.55708C12.9932 2.441 13.3158 2.50516 13.5303 2.71966L14.7803 3.96966C15.0732 4.26255 15.0732 4.73743 14.7803 5.03032L13.5303 6.28032C13.3158 6.49482 12.9932 6.55899 12.713 6.4429C12.4327 6.32682 12.25 6.05334 12.25 5.74999V5.25155C11.3851 5.27952 10.6303 5.68239 9.85664 6.36406C9.54585 6.6379 9.07192 6.60795 8.79809 6.29717C8.52425 5.98639 8.5542 5.51246 8.86498 5.23862C9.78862 4.42478 10.8814 3.78015 12.25 3.75101V3.24999C12.25 2.94664 12.4327 2.67317 12.713 2.55708ZM1 4.49999C1 4.08577 1.33579 3.74999 1.75 3.74999C4.59632 3.74999 6.40513 5.8005 7.87948 7.51019C7.93447 7.57396 7.98901 7.63731 8.04315 7.70019C8.74976 8.52099 9.38845 9.26288 10.0789 9.82432C10.7759 10.391 11.4671 10.7231 12.25 10.7484V10.25C12.25 9.94664 12.4327 9.67317 12.713 9.55708C12.9932 9.441 13.3158 9.50516 13.5303 9.71966L14.7803 10.9697C15.0732 11.2626 15.0732 11.7374 14.7803 12.0303L13.5303 13.2803C13.3158 13.4948 12.9932 13.559 12.713 13.4429C12.4327 13.3268 12.25 13.0533 12.25 12.75V12.249C11.0124 12.2226 9.99878 11.6924 9.13262 10.9881C8.48049 10.4579 7.8782 9.79958 7.30755 9.14373C5.93869 10.6759 4.24592 12.25 1.75 12.25C1.33579 12.25 1 11.9142 1 11.5C1 11.0858 1.33579 10.75 1.75 10.75C3.61653 10.75 4.93343 9.56285 6.31646 8.00027C4.93633 6.44253 3.6229 5.24999 1.75 5.24999C1.33579 5.24999 1 4.9142 1 4.49999Z" fill="currentColor"/>\n</svg>\n'},916:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M4.75 2C5.16421 2 5.5 2.33579 5.5 2.75V3.02132L12.0658 6.06975C12.3306 6.19268 12.5 6.45808 12.5 6.75C12.5 7.04193 12.3306 7.30733 12.0658 7.43026L5.5 10.4787V14.2461C5.5 14.6603 5.16421 14.9961 4.75 14.9961C4.33579 14.9961 4 14.6603 4 14.2461V2.75C4 2.33579 4.33579 2 4.75 2Z" fill="currentColor"/>\n</svg>\n'},228:function(t){t.exports='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M5.04148 3H1.75C1.33579 3 1 3.33579 1 3.75C1 4.16421 1.33579 4.5 1.75 4.5H2.29744L3.03566 11.6983C3.07233 12.0561 3.10416 12.3665 3.15066 12.6219C3.19999 12.8928 3.27483 13.1592 3.42741 13.4122C3.65663 13.7922 3.99309 14.0959 4.39449 14.2851C4.66168 14.4111 4.93432 14.4584 5.20888 14.4798C5.46769 14.5 5.77973 14.5 6.13935 14.5H9.8607C10.2203 14.5 10.5323 14.5 10.7911 14.4798C11.0657 14.4584 11.3383 14.4111 11.6055 14.2851C12.0069 14.0959 12.3434 13.7922 12.5726 13.4122C12.7252 13.1593 12.8 12.8929 12.8494 12.6219C12.8959 12.3665 12.9277 12.0562 12.9644 11.6984L13.7027 4.5H14.25C14.6642 4.5 15 4.16421 15 3.75C15 3.33579 14.6642 3 14.25 3H10.9585C10.7205 1.58114 9.4865 0.5 8 0.5C6.5135 0.5 5.27952 1.58114 5.04148 3ZM6.58535 3H9.41465C9.20873 2.4174 8.65311 2 8 2C7.34689 2 6.79127 2.4174 6.58535 3ZM12.1949 4.5H3.8053L4.52507 11.5183C4.56531 11.9108 4.59164 12.1623 4.6264 12.3532C4.65949 12.5349 4.69091 12.6027 4.71183 12.6374C4.78823 12.7641 4.90039 12.8653 5.03419 12.9284C5.07081 12.9456 5.14146 12.97 5.32562 12.9844C5.51905 12.9995 5.77198 13 6.16646 13H9.83358C10.2281 13 10.481 12.9995 10.6744 12.9844C10.8586 12.97 10.9292 12.9456 10.9658 12.9284C11.0996 12.8653 11.2118 12.7641 11.2882 12.6374C11.3091 12.6027 11.3405 12.5349 11.3736 12.3532C11.4084 12.1623 11.4347 11.9108 11.475 11.5184L12.1949 4.5ZM6.21255 5.50094C6.62624 5.48025 6.97838 5.79885 6.99906 6.21255L7.24906 11.2125C7.26975 11.6262 6.95115 11.9784 6.53745 11.9991C6.12376 12.0197 5.77162 11.7011 5.75094 11.2875L5.50094 6.28745C5.48025 5.87376 5.79885 5.52162 6.21255 5.50094ZM9.78745 5.50094C10.2011 5.52162 10.5197 5.87376 10.4991 6.28745L10.2491 11.2875C10.2284 11.7011 9.87624 12.0197 9.46255 11.9991C9.04885 11.9784 8.73025 11.6262 8.75094 11.2125L9.00094 6.21255C9.02162 5.79885 9.37376 5.48025 9.78745 5.50094Z"\n fill="currentColor"/>\n</svg>\n'},691:function(t){t.exports='<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M5.33333 1.50001C4.32081 1.50001 3.5 2.32083 3.5 3.33335V12.6667C3.5 13.6792 4.32081 14.5 5.33333 14.5H11.3333C12.3459 14.5 13.1667 13.6792 13.1667 12.6667V6.00001C13.1667 5.86741 13.114 5.74023 13.0202 5.64646L9.02022 1.64646C8.92645 1.55269 8.79927 1.50001 8.66667 1.50001H5.33333ZM4.5 3.33335C4.5 2.87311 4.8731 2.50001 5.33333 2.50001H8.16667V5.33335C8.16667 5.97768 8.689 6.50001 9.33333 6.50001H12.1667V12.6667C12.1667 13.1269 11.7936 13.5 11.3333 13.5H5.33333C4.8731 13.5 4.5 13.1269 4.5 12.6667V3.33335Z"\n fill="currentColor"/>\n <path\n d="M7.33333 7.74842V10.9183C7.33333 11.2722 7.74679 11.4632 8.01441 11.2328L9.85592 9.64789C10.048 9.48255 10.048 9.18414 9.85592 9.01881L8.01441 7.43388C7.74679 7.20354 7.33333 7.39449 7.33333 7.74842Z"\n fill="currentColor"/>\n</svg>\n'},123:function(t){t.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M19.81 12.84a.608.608 0 0 0-.45-.194h-2.24v-3l1.73-1.765a.634.634 0 0 0 .19-.46.634.634 0 0 0-.19-.459.609.609 0 0 0-.45-.194.609.609 0 0 0-.45.194l-1.73 1.766H7.78L6.05 6.962a.609.609 0 0 0-.45-.194.61.61 0 0 0-.45.194.634.634 0 0 0-.19.46c0 .176.063.33.19.459l1.73 1.765v3H4.64a.609.609 0 0 0-.45.194.634.634 0 0 0-.19.459c0 .177.063.33.19.46.127.128.277.193.45.193h2.24c0 1.088.193 2.02.58 2.796l-2.02 2.316a.659.659 0 0 0-.155.475.66.66 0 0 0 .205.454c.127.109.27.163.43.163a.633.633 0 0 0 .48-.214l1.83-2.112.15.143c.093.088.238.199.435.331.197.133.417.265.66.398.243.133.533.245.87.337a3.84 3.84 0 0 0 1.015.138v-9.143h1.28v9.143c.32 0 .643-.044.97-.133.326-.088.6-.187.82-.296a6.31 6.31 0 0 0 .65-.372c.213-.14.353-.236.42-.291.066-.055.116-.099.15-.133l1.98 2.01c.12.13.27.194.45.194a.59.59 0 0 0 .45-.194.636.636 0 0 0 .19-.459.635.635 0 0 0-.19-.459l-2.08-2.133c.447-.81.67-1.796.67-2.959h2.24a.608.608 0 0 0 .45-.194.634.634 0 0 0 .19-.459.633.633 0 0 0-.19-.46Z" fill="currentColor"/><path d="M14.265 5.11A3.054 3.054 0 0 0 12 4.156c-.887 0-1.642.318-2.265.954-.623.636-.935 1.407-.935 2.312h6.4c0-.905-.312-1.676-.935-2.312Z" fill="currentColor"/>\n</svg>\n'}},ME={};ce.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return ce.d(e,{a:e}),e},ce.d=function(t,e){for(var i in e)ce.o(e,i)&&!ce.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},ce.g=function(){if((typeof globalThis==="undefined"?"undefined":_type_of(globalThis))=="object")return globalThis;try{return this||new Function("return this")()}catch(t){if((typeof window==="undefined"?"undefined":_type_of(window))=="object")return window}}(),ce.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};Lt={};(function(){var F=function F(){};var z=function z(n){return n==null?F:function(){return this.querySelector(n)}};var j=function j(){return[]};var P=function P(n){return n==null?j:function(){return this.querySelectorAll(n)}};var k=function k(n){return function(){return this.matches(n)}};var U=function U(n){return function(o){return o.matches(n)}};var H=function H(){return this.firstElementChild};var st=function st(){return Array.from(this.children)};var mt=function mt(n){return new Array(n.length)};var rt=function rt(n,o){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=o};var at=function at(n,o,r,a,s,u){for(var p,h=0,f=o.length,y=u.length;h<y;++h)(p=o[h])?(p.__data__=u[h],a[h]=p):r[h]=new rt(n,u[h]);for(;h<f;++h)(p=o[h])&&(s[h]=p)};var pt=function pt(n,o,r,a,s,u,p){var h,f,y,_=new Map,E=o.length,T=u.length,C=new Array(E);for(h=0;h<E;++h)(f=o[h])&&(C[h]=y=p.call(f,f.__data__,h,o)+"",_.has(y)?s[h]=f:_.set(y,f));for(h=0;h<T;++h)y=p.call(n,u[h],h,u)+"",(f=_.get(y))?(a[h]=f,f.__data__=u[h],_.delete(y)):r[h]=new rt(n,u[h]);for(h=0;h<E;++h)(f=o[h])&&_.get(C[h])===f&&(s[h]=f)};var vt=function vt(n){return n.__data__};var Ct=function Ct(n){return(typeof n==="undefined"?"undefined":_type_of(n))=="object"&&"length"in n?n:Array.from(n)};var Ft=function Ft(n,o){return n<o?-1:n>o?1:n>=o?0:NaN};var wt=function wt(n){var o=n+="",r=o.indexOf(":");return r>=0&&(o=n.slice(0,r))!=="xmlns"&&(n=n.slice(r+1)),Nt.hasOwnProperty(o)?{space:Nt[o],local:n}:n};var Ee=function Ee(n){return function(){this.removeAttribute(n)}};var Vt=function Vt(n){return function(){this.removeAttributeNS(n.space,n.local)}};var oe=function oe(n,o){return function(){this.setAttribute(n,o)}};var qt=function qt(n,o){return function(){this.setAttributeNS(n.space,n.local,o)}};var De=function De(n,o){return function(){var r=o.apply(this,arguments);r==null?this.removeAttribute(n):this.setAttribute(n,r)}};var Qt=function Qt(n,o){return function(){var r=o.apply(this,arguments);r==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,r)}};var Jt=function Jt(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView};var le=function le(n){return function(){this.style.removeProperty(n)}};var Gt=function Gt(n,o,r){return function(){this.style.setProperty(n,o,r)}};var Yt=function Yt(n,o,r){return function(){var a=o.apply(this,arguments);a==null?this.style.removeProperty(n):this.style.setProperty(n,a,r)}};var te=function te(n,o){return n.style.getPropertyValue(o)||Jt(n).getComputedStyle(n,null).getPropertyValue(o)};var tn=function tn(n){return function(){delete this[n]}};var yT=function yT(n,o){return function(){this[n]=o}};var _T=function _T(n,o){return function(){var r=o.apply(this,arguments);r==null?delete this[n]:this[n]=r}};var tu=function tu(n){return n.trim().split(/^|\s+/)};var es=function es(n){return n.classList||new eu(n)};var eu=function eu(n){this._node=n,this._names=tu(n.getAttribute("class")||"")};var nu=function nu(n,o){for(var r=es(n),a=-1,s=o.length;++a<s;)r.add(o[a])};var ru=function ru(n,o){for(var r=es(n),a=-1,s=o.length;++a<s;)r.remove(o[a])};var gT=function gT(n){return function(){nu(this,n)}};var ET=function ET(n){return function(){ru(this,n)}};var TT=function TT(n,o){return function(){(o.apply(this,arguments)?nu:ru)(this,n)}};var ST=function ST(){this.textContent=""};var bT=function bT(n){return function(){this.textContent=n}};var CT=function CT(n){return function(){var o=n.apply(this,arguments);this.textContent=o==null?"":o}};var wT=function wT(){this.innerHTML=""};var AT=function AT(n){return function(){this.innerHTML=n}};var OT=function OT(n){return function(){var o=n.apply(this,arguments);this.innerHTML=o==null?"":o}};var LT=function LT(){this.nextSibling&&this.parentNode.appendChild(this)};var xT=function xT(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)};var RT=function RT(n){return function(){var o=this.ownerDocument,r=this.namespaceURI;return r===Bt&&o.documentElement.namespaceURI===Bt?o.createElement(n):o.createElementNS(r,n)}};var MT=function MT(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}};var ns=function ns(n){var o=wt(n);return(o.local?MT:RT)(o)};var IT=function IT(){return null};var NT=function NT(){var n=this.parentNode;n&&n.removeChild(this)};var PT=function PT(){var n=this.cloneNode(!1),o=this.parentNode;return o?o.insertBefore(n,this.nextSibling):n};var DT=function DT(){var n=this.cloneNode(!0),o=this.parentNode;return o?o.insertBefore(n,this.nextSibling):n};var kT=function kT(n){return function(){var o=this.__on;if(o){for(var r,a=0,s=-1,u=o.length;a<u;++a)r=o[a],n.type&&r.type!==n.type||r.name!==n.name?o[++s]=r:this.removeEventListener(r.type,r.listener,r.options);++s?o.length=s:delete this.__on}}};var VT=function VT(n,o,r){return function(){var a,s=this.__on,u=function(f){return function(y){f.call(this,y,this.__data__)}}(o);if(s){for(var p=0,h=s.length;p<h;++p)if((a=s[p]).type===n.type&&a.name===n.name)return this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=u,a.options=r),void(a.value=o)}this.addEventListener(n.type,u,r),a={type:n.type,name:n.name,value:o,listener:u,options:r},s?s.push(a):this.__on=[a]}};var ou=function ou(n,o,r){var a=Jt(n),s=a.CustomEvent;typeof s=="function"?s=new s(o,r):(s=a.document.createEvent("Event"),r?(s.initEvent(o,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(o,!1,!1)),n.dispatchEvent(s)};var BT=function BT(n,o){return function(){return ou(this,n,o)}};var UT=function UT(n,o){return function(){return ou(this,n,o.apply(this,arguments))}};var Te=function Te(n,o){this._groups=n,this._parents=o};var au=function au(){return new Te([[document.documentElement]],iu)};var su=function su(){for(var n,o=0,r=arguments.length,a={};o<r;++o){if(!(n=arguments[o]+"")||n in a||/[\s.]/.test(n))throw new Error("illegal type: "+n);a[n]=[]}return new Zo(a)};var Zo=function Zo(n){this._=n};var FT=function FT(n,o){for(var r,a=0,s=n.length;a<s;++a)if((r=n[a]).name===o)return r.value};var cu=function cu(n,o,r){for(var a=0,s=n.length;a<s;++a)if(n[a].name===o){n[a]=jT,n=n.slice(0,a).concat(n.slice(a+1));break}return r!=null&&n.push({name:o,value:r}),n};var os=function os(){return An||(uu(HT),An=zr.now()+Xo)};var HT=function HT(){An=0};var Ko=function Ko(){this._call=this._time=this._next=null};var du=function du(n,o,r){var a=new Ko;return a.restart(n,o,r),a};var pu=function pu(){An=($o=zr.now())+Xo,er=Fr=0;try{(function(){os(),++er;for(var n,o=Wo;o;)(n=An-o._time)>=0&&o._call.call(void 0,n),o=o._next;--er})()}finally{er=0,function(){for(var n,o,r=Wo,a=1/0;r;)r._call?(a>r._time&&(a=r._time),n=r,r=r._next):(o=r._next,r._next=null,r=n?n._next=o:Wo=o);jr=n,is(a)}(),An=0}};var zT=function zT(){var n=zr.now(),o=n-$o;o>lu&&(Xo-=o,$o=n)};var is=function is(n){er||(Fr&&(Fr=clearTimeout(Fr)),n-An>24?(n<1/0&&(Fr=setTimeout(pu,n-zr.now()-Xo)),Hr&&(Hr=clearInterval(Hr))):(Hr||($o=zr.now(),Hr=setInterval(zT,lu)),er=1,uu(pu)))};var hu=function hu(n,o,r){var a=new Ko;return o=o==null?0:+o,a.restart(function(s){a.stop(),n(s+o)},o,r),a};var Qo=function Qo(n,o,r,a,s,u){var p=n.__transition;if(p){if(r in p)return}else n.__transition={};(function(h,f,y){var _,E=h.__transition;function T(O){var D,V,Z,Y;if(y.state!==1)return R();for(D in E)if((Y=E[D]).name===y.name){if(Y.state===qo)return hu(T);Y.state===4?(Y.state=6,Y.timer.stop(),Y.on.call("interrupt",h,h.__data__,Y.index,Y.group),delete E[D]):+D<f&&(Y.state=6,Y.timer.stop(),Y.on.call("cancel",h,h.__data__,Y.index,Y.group),delete E[D])}if(hu(function(){y.state===qo&&(y.state=4,y.timer.restart(C,y.delay,y.time),C(O))}),y.state=2,y.on.call("start",h,h.__data__,y.index,y.group),y.state===2){for(y.state=qo,_=new Array(Z=y.tween.length),D=0,V=-1;D<Z;++D)(Y=y.tween[D].value.call(h,h.__data__,y.index,y.group))&&(_[++V]=Y);_.length=V+1}}function C(O){for(var D=O<y.duration?y.ease.call(null,O/y.duration):(y.timer.restart(R),y.state=5,1),V=-1,Z=_.length;++V<Z;)_[V].call(h,D);y.state===5&&(y.on.call("end",h,h.__data__,y.index,y.group),R())}function R(){for(var O in y.state=6,y.timer.stop(),delete E[f],E)return;delete h.__transition}E[f]=y,y.timer=du(function(O){y.state=1,y.timer.restart(T,y.delay,y.time),y.delay<=O&&T(O-y.delay)},0,y.time)})(n,r,{name:o,index:a,group:s,on:GT,tween:YT,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:fu})};var as=function as(n,o){var r=ke(n,o);if(r.state>fu)throw new Error("too late; already scheduled");return r};var Ge=function Ge(n,o){var r=ke(n,o);if(r.state>qo)throw new Error("too late; already running");return r};var ke=function ke(n,o){var r=n.__transition;if(!r||!(r=r[o]))throw new Error("transition not found");return r};var Gr=function Gr(n,o){var r,a,s,u=n.__transition,p=!0;if(u){for(s in o=o==null?null:o+"",u)(r=u[s]).name===o?(a=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(a?"interrupt":"cancel",n,n.__data__,r.index,r.group),delete u[s]):p=!1;p&&delete n.__transition}};var Ve=function Ve(n,o){return n=+n,o=+o,function(r){return n*(1-r)+o*r}};var vu=function vu(n,o,r,a,s,u){var p,h,f;return(p=Math.sqrt(n*n+o*o))&&(n/=p,o/=p),(f=n*r+o*a)&&(r-=n*f,a-=o*f),(h=Math.sqrt(r*r+a*a))&&(r/=h,a/=h,f/=h),n*a<o*r&&(n=-n,o=-o,f=-f,p=-p),{translateX:s,translateY:u,rotate:Math.atan2(o,n)*mu,skewX:Math.atan(f)*mu,scaleX:p,scaleY:h}};var yu=function yu(n,o,r,a){function s(u){return u.length?u.pop()+" ":""}return function(u,p){var h=[],f=[];return u=n(u),p=n(p),function(y,_,E,T,C,R){if(y!==E||_!==T){var O=C.push("translate(",null,o,null,r);R.push({i:O-4,x:Ve(y,E)},{i:O-2,x:Ve(_,T)})}else(E||T)&&C.push("translate("+E+o+T+r)}(u.translateX,u.translateY,p.translateX,p.translateY,h,f),function(y,_,E,T){y!==_?(y-_>180?_+=360:_-y>180&&(y+=360),T.push({i:E.push(s(E)+"rotate(",null,a)-2,x:Ve(y,_)})):_&&E.push(s(E)+"rotate("+_+a)}(u.rotate,p.rotate,h,f),function(y,_,E,T){y!==_?T.push({i:E.push(s(E)+"skewX(",null,a)-2,x:Ve(y,_)}):_&&E.push(s(E)+"skewX("+_+a)}(u.skewX,p.skewX,h,f),function(y,_,E,T,C,R){if(y!==E||_!==T){var O=C.push(s(C)+"scale(",null,",",null,")");R.push({i:O-4,x:Ve(y,E)},{i:O-2,x:Ve(_,T)})}else E===1&&T===1||C.push(s(C)+"scale("+E+","+T+")")}(u.scaleX,u.scaleY,p.scaleX,p.scaleY,h,f),u=p=null,function(y){for(var _,E=-1,T=f.length;++E<T;)h[(_=f[E]).i]=_.x(y);return h.join("")}}};var $T=function $T(n,o){var r,a;return function(){var s=Ge(this,n),u=s.tween;if(u!==r){for(var p=0,h=(a=r=u).length;p<h;++p)if(a[p].name===o){(a=a.slice()).splice(p,1);break}}s.tween=a}};var XT=function XT(n,o,r){var a,s;if(typeof r!="function")throw new Error;return function(){var u=Ge(this,n),p=u.tween;if(p!==a){s=(a=p).slice();for(var h={name:o,value:r},f=0,y=s.length;f<y;++f)if(s[f].name===o){s[f]=h;break}f===y&&s.push(h)}u.tween=s}};var cs=function cs(n,o,r){var a=n._id;return n.each(function(){var s=Ge(this,a);(s.value||(s.value={}))[o]=r.apply(this,arguments)}),function(s){return ke(s,a).value[o]}};var ls=function ls(n,o,r){n.prototype=o.prototype=r,r.constructor=n};var _u=function _u(n,o){var r=Object.create(n.prototype);for(var a in o)r[a]=o[a];return r};var Yr=function Yr(){};var Eu=function Eu(){return this.rgb().formatHex()};var Tu=function Tu(){return this.rgb().formatRgb()};var On=function On(n){var o,r;return n=(n+"").trim().toLowerCase(),(o=KT.exec(n))?(r=o[1].length,o=parseInt(o[1],16),r===6?Su(o):r===3?new ue(o>>8&15|o>>4&240,o>>4&15|240&o,(15&o)<<4|15&o,1):r===8?ei(o>>24&255,o>>16&255,o>>8&255,(255&o)/255):r===4?ei(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|240&o,((15&o)<<4|15&o)/255):null):(o=qT.exec(n))?new ue(o[1],o[2],o[3],1):(o=QT.exec(n))?new ue(255*o[1]/100,255*o[2]/100,255*o[3]/100,1):(o=JT.exec(n))?ei(o[1],o[2],o[3],o[4]):(o=tS.exec(n))?ei(255*o[1]/100,255*o[2]/100,255*o[3]/100,o[4]):(o=eS.exec(n))?wu(o[1],o[2]/100,o[3]/100,1):(o=nS.exec(n))?wu(o[1],o[2]/100,o[3]/100,o[4]):gu.hasOwnProperty(n)?Su(gu[n]):n==="transparent"?new ue(NaN,NaN,NaN,0):null};var Su=function Su(n){return new ue(n>>16&255,n>>8&255,255&n,1)};var ei=function ei(n,o,r,a){return a<=0&&(n=o=r=NaN),new ue(n,o,r,a)};var ni=function ni(n,o,r,a){return arguments.length===1?(_instanceof(s=n,Yr)||(s=On(s)),s?new ue((s=s.rgb()).r,s.g,s.b,s.opacity):new ue):new ue(n,o,r,a==null?1:a);var s};var ue=function ue(n,o,r,a){this.r=+n,this.g=+o,this.b=+r,this.opacity=+a};var bu=function bu(){return"#".concat(xn(this.r)).concat(xn(this.g)).concat(xn(this.b))};var Cu=function Cu(){var n=ri(this.opacity);return"".concat(n===1?"rgb(":"rgba(").concat(Ln(this.r),", ").concat(Ln(this.g),", ").concat(Ln(this.b)).concat(n===1?")":", ".concat(n,")"))};var ri=function ri(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))};var Ln=function Ln(n){return Math.max(0,Math.min(255,Math.round(n)||0))};var xn=function xn(n){return((n=Ln(n))<16?"0":"")+n.toString(16)};var wu=function wu(n,o,r,a){return a<=0?n=o=r=NaN:r<=0||r>=1?n=o=NaN:o<=0&&(n=NaN),new Be(n,o,r,a)};var Au=function Au(n){if(_instanceof(n,Be))return new Be(n.h,n.s,n.l,n.opacity);if(_instanceof(n,Yr)||(n=On(n)),!n)return new Be;if(_instanceof(n,Be))return n;var o=(n=n.rgb()).r/255,r=n.g/255,a=n.b/255,s=Math.min(o,r,a),u=Math.max(o,r,a),p=NaN,h=u-s,f=(u+s)/2;return h?(p=o===u?(r-a)/h+6*(r<a):r===u?(a-o)/h+2:(o-r)/h+4,h/=f<.5?u+s:2-u-s,p*=60):h=f>0&&f<1?0:p,new Be(p,h,f,n.opacity)};var Be=function Be(n,o,r,a){this.h=+n,this.s=+o,this.l=+r,this.opacity=+a};var Ou=function Ou(n){return(n=(n||0)%360)<0?n+360:n};var oi=function oi(n){return Math.max(0,Math.min(1,n||0))};var us=function us(n,o,r){return 255*(n<60?o+(r-o)*n/60:n<180?r:n<240?o+(r-o)*(240-n)/60:o)};var Lu=function Lu(n,o,r,a,s){var u=n*n,p=u*n;return((1-3*n+3*u-p)*o+(4-6*u+3*p)*r+(1+3*n+3*u-3*p)*a+p*s)/6};var xu=function xu(n,o){var r=o-n;return r?function(a,s){return function(u){return a+u*s}}(n,r):ds(isNaN(n)?o:n)};var Ru=function Ru(n){return function(o){var r,a,s=o.length,u=new Array(s),p=new Array(s),h=new Array(s);for(r=0;r<s;++r)a=ni(o[r]),u[r]=a.r||0,p[r]=a.g||0,h[r]=a.b||0;return u=n(u),p=n(p),h=n(h),a.opacity=1,function(f){return a.r=u(f),a.g=p(f),a.b=h(f),a+""}}};var Mu=function Mu(n,o){var r,a,s,u=ps.lastIndex=hs.lastIndex=0,p=-1,h=[],f=[];for(n+="",o+="";(r=ps.exec(n))&&(a=hs.exec(o));)(s=a.index)>u&&(s=o.slice(u,s),h[p]?h[p]+=s:h[++p]=s),(r=r[0])===(a=a[0])?h[p]?h[p]+=a:h[++p]=a:(h[++p]=null,f.push({i:p,x:Ve(r,a)})),u=hs.lastIndex;return u<o.length&&(s=o.slice(u),h[p]?h[p]+=s:h[++p]=s),h.length<2?f[0]?function(y){return function(_){return y(_)+""}}(f[0].x):function(y){return function(){return y}}(o):(o=f.length,function(y){for(var _,E=0;E<o;++E)h[(_=f[E]).i]=_.x(y);return h.join("")})};var Iu=function Iu(n,o){var r;return(typeof o=="number"?Ve:_instanceof(o,On)?ii:(r=On(o))?(o=r,ii):Mu)(n,o)};var rS=function rS(n){return function(){this.removeAttribute(n)}};var oS=function oS(n){return function(){this.removeAttributeNS(n.space,n.local)}};var iS=function iS(n,o,r){var a,s,u=r+"";return function(){var p=this.getAttribute(n);return p===u?null:p===a?s:s=o(a=p,r)}};var aS=function aS(n,o,r){var a,s,u=r+"";return function(){var p=this.getAttributeNS(n.space,n.local);return p===u?null:p===a?s:s=o(a=p,r)}};var sS=function sS(n,o,r){var a,s,u;return function(){var p,h,f=r(this);if(f!=null)return(p=this.getAttribute(n))===(h=f+"")?null:p===a&&h===s?u:(s=h,u=o(a=p,f));this.removeAttribute(n)}};var cS=function cS(n,o,r){var a,s,u;return function(){var p,h,f=r(this);if(f!=null)return(p=this.getAttributeNS(n.space,n.local))===(h=f+"")?null:p===a&&h===s?u:(s=h,u=o(a=p,f));this.removeAttributeNS(n.space,n.local)}};var lS=function lS(n,o){var r,a;function s(){var u=o.apply(this,arguments);return u!==a&&(r=(a=u)&&function(p,h){return function(f){this.setAttributeNS(p.space,p.local,h.call(this,f))}}(n,u)),r}return s._value=o,s};var uS=function uS(n,o){var r,a;function s(){var u=o.apply(this,arguments);return u!==a&&(r=(a=u)&&function(p,h){return function(f){this.setAttribute(p,h.call(this,f))}}(n,u)),r}return s._value=o,s};var dS=function dS(n,o){return function(){as(this,n).delay=+o.apply(this,arguments)}};var pS=function pS(n,o){return o=+o,function(){as(this,n).delay=o}};var hS=function hS(n,o){return function(){Ge(this,n).duration=+o.apply(this,arguments)}};var fS=function fS(n,o){return o=+o,function(){Ge(this,n).duration=o}};var Nu=function Nu(n){return function(){this.style.removeProperty(n)}};var en=function en(n,o,r,a){this._groups=n,this._parents=o,this._name=r,this._id=a};var Pu=function Pu(){return++vS};var _S=function _S(n,o){for(var r;!(r=n.__transition)||!(r=r[o]);)if(!(n=n.parentNode))throw new Error("transition ".concat(o," not found"));return r};var fs=function fs(n){return{type:n}};var _t=function _t(n){return typeof n=="string"?new Te([[document.querySelector(n)]],[document.documentElement]):new Te([[n]],iu)};var de=function de(n,o){if(n=function(u){var p;for(;p=u.sourceEvent;)u=p;return u}(n),o===void 0&&(o=n.currentTarget),o){var r=o.ownerSVGElement||o;if(r.createSVGPoint){var a=r.createSVGPoint();return a.x=n.clientX,a.y=n.clientY,[(a=a.matrixTransform(o.getScreenCTM().inverse())).x,a.y]}if(o.getBoundingClientRect){var s=o.getBoundingClientRect();return[n.clientX-s.left-o.clientLeft,n.clientY-s.top-o.clientTop]}}return[n.pageX,n.pageY]};var ms=function ms(n){n.stopImmediatePropagation()};var rr=function rr(n){n.preventDefault(),n.stopImmediatePropagation()};var Du=function Du(n){var o=n.document.documentElement,r=_t(n).on("dragstart.drag",rr,$r);"onselectstart"in o?r.on("selectstart.drag",rr,$r):(o.__noselect=o.style.MozUserSelect,o.style.MozUserSelect="none")};var ku=function ku(n,o){var r=n.document.documentElement,a=_t(n).on("dragstart.drag",null);o&&(a.on("click.drag",rr,$r),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in r?a.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)};var vs=function vs(n,param){var o=param.sourceEvent,r=param.subject,a=param.target,s=param.identifier,u=param.active,p=param.x,h=param.y,f=param.dx,y=param.dy,_=param.dispatch;Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:o,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:p,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:y,enumerable:!0,configurable:!0},_:{value:_}})};var ES=function ES(n){return!n.ctrlKey&&!n.button};var TS=function TS(){return this.parentNode};var SS=function SS(n,o){return o==null?{x:n.x,y:n.y}:o};var bS=function bS(){return navigator.maxTouchPoints||"ontouchstart"in this};var ys=function ys(){var n,o,r,a,s=ES,u=TS,p=SS,h=bS,f={},y=rs("start","drag","end"),_=0,E=0;function T(x){x.on("mousedown.drag",C).filter(h).on("touchstart.drag",D).on("touchmove.drag",V,gS).on("touchend.drag touchcancel.drag",Z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function C(x,W){if(!a&&s.call(this,x,W)){var q=Y(this,u.call(this,x,W),x,W,"mouse");q&&(_t(x.view).on("mousemove.drag",R,$r).on("mouseup.drag",O,$r),Du(x.view),ms(x),r=!1,n=x.clientX,o=x.clientY,q("start",x))}}function R(x){if(rr(x),!r){var W=x.clientX-n,q=x.clientY-o;r=W*W+q*q>E}f.mouse("drag",x)}function O(x){_t(x.view).on("mousemove.drag mouseup.drag",null),ku(x.view,r),rr(x),f.mouse("end",x)}function D(x,W){if(s.call(this,x,W)){var q,et,ct=x.changedTouches,ut=u.call(this,x,W),Ut=ct.length;for(q=0;q<Ut;++q)(et=Y(this,ut,x,W,ct[q].identifier,ct[q]))&&(ms(x),et("start",x,ct[q]))}}function V(x){var W,q,et=x.changedTouches,ct=et.length;for(W=0;W<ct;++W)(q=f[et[W].identifier])&&(rr(x),q("drag",x,et[W]))}function Z(x){var W,q,et=x.changedTouches,ct=et.length;for(a&&clearTimeout(a),a=setTimeout(function(){a=null},500),W=0;W<ct;++W)(q=f[et[W].identifier])&&(ms(x),q("end",x,et[W]))}function Y(x,W,q,et,ct,ut){var Ut,xt,ot,It=y.copy(),Pt=de(ut||q,W);if((ot=p.call(x,new vs("beforestart",{sourceEvent:q,target:T,identifier:ct,active:_,x:Pt[0],y:Pt[1],dx:0,dy:0,dispatch:It}),et))!=null)return Ut=ot.x-Pt[0]||0,xt=ot.y-Pt[1]||0,function Fe(ae,M,J){var $,X=Pt;switch(ae){case"start":f[ct]=Fe,$=_++;break;case"end":delete f[ct],--_;case"drag":Pt=de(J||M,W),$=_}It.call(ae,x,new vs(ae,{sourceEvent:M,subject:ot,target:T,identifier:ct,active:$,x:Pt[0]+Ut,y:Pt[1]+xt,dx:Pt[0]-X[0],dy:Pt[1]-X[1],dispatch:It}),et)}}return T.filter=function(x){return arguments.length?(s=typeof x=="function"?x:ai(!!x),T):s},T.container=function(x){return arguments.length?(u=typeof x=="function"?x:ai(x),T):u},T.subject=function(x){return arguments.length?(p=typeof x=="function"?x:ai(x),T):p},T.touchable=function(x){return arguments.length?(h=typeof x=="function"?x:ai(!!x),T):h},T.on=function(){var x=y.on.apply(y,arguments);return x===y?T:x},T.clickDistance=function(x){return arguments.length?(E=(x=+x)*x,T):Math.sqrt(E)},T};var Vu=function Vu(n,o,r){var a=(o-n)/Math.max(0,r),s=Math.floor(Math.log(a)/Math.LN10),u=a/Math.pow(10,s);return s>=0?(u>=_s?10:u>=gs?5:u>=Es?2:1)*Math.pow(10,s):-Math.pow(10,-s)/(u>=_s?10:u>=gs?5:u>=Es?2:1)};var si=function si(n,o){return n==null||o==null?NaN:n<o?-1:n>o?1:n>=o?0:NaN};var CS=function CS(n,o){return n==null||o==null?NaN:o<n?-1:o>n?1:o>=n?0:NaN};var Bu=function Bu(n){var o,r,a;function s(u,p){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:u.length;if(h<f){if(o(p,p)!==0)return f;do{var y=h+f>>>1;r(u[y],p)<0?h=y+1:f=y}while(h<f)}return h}return n.length!==2?(o=si,r=function(u,p){return si(n(u),p)},a=function(u,p){return n(u)-p}):(o=n===si||n===CS?n:wS,r=n,a=n),{left:s,center:function center(u,p){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:u.length;var y=s(u,p,h,f-1);return y>h&&a(u[y-1],p)>-a(u[y],p)?y-1:y},right:function right(u,p){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:u.length;if(h<f){if(o(p,p)!==0)return f;do{var y=h+f>>>1;r(u[y],p)<=0?h=y+1:f=y}while(h<f)}return h}}};var wS=function wS(){return 0};var LS=function LS(n,o){var r,a=o?o.length:0,s=n?Math.min(a,n.length):0,u=new Array(s),p=new Array(a);for(r=0;r<s;++r)u[r]=Ts(n[r],o[r]);for(;r<a;++r)p[r]=o[r];return function(h){for(r=0;r<s;++r)p[r]=u[r](h);return p}};var xS=function xS(n,o){var r=new Date;return n=+n,o=+o,function(a){return r.setTime(n*(1-a)+o*a),r}};var RS=function RS(n,o){var r,a={},s={};for(r in n!==null&&(typeof n==="undefined"?"undefined":_type_of(n))=="object"||(n={}),o!==null&&(typeof o==="undefined"?"undefined":_type_of(o))=="object"||(o={}),o)r in n?a[r]=Ts(n[r],o[r]):s[r]=o[r];return function(u){for(r in a)s[r]=a[r](u);return s}};var MS=function MS(n,o){o||(o=[]);var r,a=n?Math.min(o.length,n.length):0,s=o.slice();return function(u){for(r=0;r<a;++r)s[r]=n[r]*(1-u)+o[r]*u;return s}};var Ts=function Ts(n,o){var r,a,s=typeof o==="undefined"?"undefined":_type_of(o);return o==null||s==="boolean"?ds(o):(s==="number"?Ve:s==="string"?(r=On(o))?(o=r,ii):Mu:_instanceof(o,On)?ii:_instanceof(o,Date)?xS:(a=o,!ArrayBuffer.isView(a)||_instanceof(a,DataView)?Array.isArray(o)?LS:typeof o.valueOf!="function"&&typeof o.toString!="function"||isNaN(o)?RS:Ve:MS))(n,o)};var IS=function IS(n,o){return n=+n,o=+o,function(r){return Math.round(n*(1-r)+o*r)}};var NS=function NS(n){return+n};var or=function or(n){return n};var Ss=function Ss(n,o){return(o-=n=+n)?function(a){return(a-n)/o}:(r=isNaN(o)?NaN:.5,function(){return r});var r};var PS=function PS(n,o,r){var a=n[0],s=n[1],u=o[0],p=o[1];return s<a?(a=Ss(s,a),u=r(p,u)):(a=Ss(a,s),u=r(u,p)),function(h){return u(a(h))}};var DS=function DS(n,o,r){var a=Math.min(n.length,o.length)-1,s=new Array(a),u=new Array(a),p=-1;for(n[a]<n[0]&&(n=n.slice().reverse(),o=o.slice().reverse());++p<a;)s[p]=Ss(n[p],n[p+1]),u[p]=r(o[p],o[p+1]);return function(h){var f=OS(n,h,1,a)-1;return u[f](s[f](h))}};var kS=function kS(n,o){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(o).domain(n)}return this};var ci=function ci(n){if(!(o=VS.exec(n)))throw new Error("invalid format: "+n);var o;return new bs({fill:o[1],align:o[2],sign:o[3],symbol:o[4],zero:o[5],width:o[6],comma:o[7],precision:o[8]&&o[8].slice(1),trim:o[9],type:o[10]})};var bs=function bs(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""};var li=function li(n,o){if((r=(n=o?n.toExponential(o-1):n.toExponential()).indexOf("e"))<0)return null;var r,a=n.slice(0,r);return[a.length>1?a[0]+a.slice(2):a,+n.slice(r+1)]};var ir=function ir(n){return(n=li(Math.abs(n)))?n[1]:NaN};var Hu=function Hu(n,o){var r=li(n,o);if(!r)return n+"";var a=r[0],s=r[1];return s<0?"0."+new Array(-s).join("0")+a:a.length>s+1?a.slice(0,s+1)+"."+a.slice(s+1):a+new Array(s-a.length+2).join("0")};var Gu=function Gu(n){return n};var BS=function BS(n){var o=n.domain;return n.ticks=function(r){var a=o();return function(s,u,p){var h,f,y,_,E=-1;if(p=+p,(s=+s)==(u=+u)&&p>0)return[s];if((h=u<s)&&(f=s,s=u,u=f),(_=Vu(s,u,p))===0||!isFinite(_))return[];if(_>0){var T=Math.round(s/_),C=Math.round(u/_);for(T*_<s&&++T,C*_>u&&--C,y=new Array(f=C-T+1);++E<f;)y[E]=(T+E)*_}else{_=-_;var T1=Math.round(s*_),C1=Math.round(u*_);for(T1/_<s&&++T1,C1/_>u&&--C1,y=new Array(f=C1-T1+1);++E<f;)y[E]=(T1+E)/_}return h&&y.reverse(),y}(a[0],a[a.length-1],r==null?10:r)},n.tickFormat=function(r,a){var s=o();return function(u,p,h,f){var y,_=function(T,C,R){var O=Math.abs(C-T)/Math.max(0,R),D=Math.pow(10,Math.floor(Math.log(O)/Math.LN10)),V=O/D;return V>=_s?D*=10:V>=gs?D*=5:V>=Es&&(D*=2),C<T?-D:D}(u,p,h);switch((f=ci(f==null?",f":f)).type){case"s":var E=Math.max(Math.abs(u),Math.abs(p));return f.precision!=null||isNaN(y=function(T,C){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ir(C)/3)))-ir(Math.abs(T)))}(_,E))||(f.precision=y),Zu(f,E);case"":case"e":case"g":case"p":case"r":f.precision!=null||isNaN(y=function(T,C){return T=Math.abs(T),C=Math.abs(C)-T,Math.max(0,ir(C)-ir(T))+1}(_,Math.max(Math.abs(u),Math.abs(p))))||(f.precision=y-(f.type==="e"));break;case"f":case"%":f.precision!=null||isNaN(y=function(T){return Math.max(0,-ir(Math.abs(T)))}(_))||(f.precision=y-2*(f.type==="%"))}return Yu(f)}(s[0],s[s.length-1],r==null?10:r,a)},n.nice=function(r){r==null&&(r=10);var a,s,u=o(),p=0,h=u.length-1,f=u[p],y=u[h],_=10;for(y<f&&(s=f,f=y,y=s,s=p,p=h,h=s);_-- >0;){if((s=Vu(f,y,r))===a)return u[p]=f,u[h]=y,o(u);if(s>0)f=Math.floor(f/s)*s,y=Math.ceil(y/s)*s;else{if(!(s<0))break;f=Math.ceil(f*s)/s,y=Math.floor(y*s)/s}a=s}return n},n};var gt=function gt(n){return _t(ns(n).call(document.documentElement))};var Os=function Os(){this._x0=this._y0=this._x1=this._y1=null,this._=""};var Ku=function Ku(){return new Os};var qu=function qu(n){return function(){return n}};var zS=function zS(n){return n[0]};var GS=function GS(n){return n[1]};var YS=function YS(n){return n.source};var ZS=function ZS(n){return n.target};var Qu=function Qu(n){return((n=Math.exp(n))+1/n)/2};var $S=function $S(n,param){var o=param.sourceEvent,r=param.target,a=param.transform,s=param.dispatch;Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:o,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:s}})};var Ue=function Ue(n,o,r){this.k=n,this.x=o,this.y=r};var xs=function xs(n){n.stopImmediatePropagation()};var Xr=function Xr(n){n.preventDefault(),n.stopImmediatePropagation()};var XS=function XS(n){return!(n.ctrlKey&&n.type!=="wheel"||n.button)};var KS=function KS(){var n=this;return _instanceof(n,SVGElement)?(n=n.ownerSVGElement||n).hasAttribute("viewBox")?[[(n=n.viewBox.baseVal).x,n.y],[n.x+n.width,n.y+n.height]]:[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]:[[0,0],[n.clientWidth,n.clientHeight]]};var Ju=function Ju(){return this.__zoom||Mn};var qS=function qS(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)};var QS=function QS(){return navigator.maxTouchPoints||"ontouchstart"in this};var JS=function JS(n,o,r){var a=n.invertX(o[0][0])-r[0][0],s=n.invertX(o[1][0])-r[1][0],u=n.invertY(o[0][1])-r[0][1],p=n.invertY(o[1][1])-r[1][1];return n.translate(s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s),p>u?(u+p)/2:Math.min(0,u)||Math.max(0,p))};var td=function td(n,o){var r=!1;n[0]==="#"&&(n=n.slice(1),r=!0);var a=parseInt(n,16),s=(a>>16)+o;s>255?s=255:s<0&&(s=0);var u=(a>>8&255)+o;u>255?u=255:u<0&&(u=0);var p=(255&a)+o;p>255?p=255:p<0&&(p=0);var h=p|u<<8|s<<16;return r?"#"+h.toString(16):h.toString(16)};var n2=function n2(){if(!pi&&(pi=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pi(e2)};var v2=function v2(n,o){n===void 0&&(n=!1),o===void 0&&(o="[Untitled]");var r=new Date().toISOString(),a=Ae(),s={chapters:[{branches:[],containers:[],id:a,label:o,order:"start",events:[]}],metadata:{id:Ae(),build:0,version:Kr,initChapterId:a,created:r,updated:r},media:{videos:[]},graph:yd([_d(a,[0,0])])};return n?JSON.stringify(s):s};var Ps=function Ps(n){return typeof n=="number"};var E2=function E2(n,o){var r,a=((r={})[lt.Flip]=1,r[lt.Action]=2,r[lt.Inaction]=3,r);return a[n]<a[o]?-1:a[n]>a[o]?1:0};var Qd=function Qd(n,o){if(n<o||n>2){if(n<o)return o;if(n>2)return 2}return n};var Jd=function Jd(n,o,r){var a=o[0]-r[0]*n.k,s=o[1]-r[1]*n.k;return a===n.x&&s===n.y?n:new Ue(n.k,a,s)};var lp=function lp(n,o){if(l.isViewOrPreViewMode()){var r=o?n.stylesWithDefaults.hover.borderColor:n.stylesWithDefaults.header.backgroundColor;Xe(n.id).select(".headerBg").attr("fill",r)}Qs(n.id,o,!1)};var fp=function fp(n,o){l.isViewOrPreViewMode()&&Xe(n.id).select(".".concat(pp)).attr("fill",o?n.stylesWithDefaults.hover.borderColor:n.stylesWithDefaults.header.backgroundColor)};ce.d(Lt,{Wk:function(){return sr},QS:function(){return ks},bc:function(){return Kr},$D:function(){return Rb},U0:function(){return qr},xi:function(){return ad},Ql:function(){return hd},Qf:function(){return u2},Db:function(){return _2},vW:function(){return y2},sY:function(){return dd},gH:function(){return ud},ZW:function(){return pd},vF:function(){return mi},q8:function(){return i2},I7:function(){return In},aP:function(){return v2},ws:function(){return md},jb:function(){return vi},S3:function(){return f2},vR:function(){return Ns},Fv:function(){return je},GP:function(){return m2},BZ:function(){return Is},Hi:function(){return d2},RW:function(){return fd},d0:function(){return vd},ql:function(){return cd},Kh:function(){return l2}});var t={enableSkeletonsOnNodesCount:300,renderSkeletonOnZoomLessThan:.2,minSectorWidthInPixels:500,sectorsCount:200,sectorsVirtualBorderWidth:.2,renderAfterZoomThrottleInMs:10},e={node:{width:186,defaultHeight:115,heightWithPreview:151,heightWithPreviewEov:196,heightFull:237,borderRadius:12,headerHeight:36,componentAddActionHeight:40,componentPreviewHeight:114,componentControlHeight:44,componentOrderRadius:12,defaultConnectorPositionY:57,connectorPositionY:93,connectorPositionDiff:20,control:{connectorRadius:8,actionLinkY:12,inactionLinkY:32,lineLength:22},previewPlaceholder:{textColor:"#76787A",borderColor:"#5D5F61",backgroundColor:"#19191A"}},tool:{menuItemWidth:210,menuItemHeight:32,menuItemTooltipOffset:214,borderRadius:4,strokeColor:"#35383C",textColor:"#F2F5FF",eov:{size:22,radius:10},copyPasteDx:50,copyPasteDy:50},strokeSize:1,iconSize:16,controlConnectorIconSize:12,color:{percentDiff:20,error:"#E94848",activeError:"#CC0E0E",text:"#FFFFFF",stroke:"#FFFFFF",disabledStroke:"#86898F",tooltipBackground:"#282A2E",elementBackground:"#232324",elementBackgroundAlt:"#1A1D20",elementBackgroundHover:"#363738",elementBackgroundHover2:"#505358",elementStroke:"#141414",nodeStroke:"#232324",shadowNodeFill:"rgba(255, 255, 255, 0.11)",shadowNodeStroke:"rgba(255, 255, 255, 0.48)",connectorStroke:"#797B82"},prefix:{nodeEOV:"eov_",nodeBorder:"border_",nodeFlipConnector:"flip_connector_",nodeActionConnector:"action_connector_",nodeInactionConnector:"inaction_connector_",nodeError:"error_"},grid:{size:18.6,steps:10}},i={node_video_error:"No video",node_video_choose:"Choose video",node_video_change:"Change video",node_open_editor:"Open editor",node_eov:"Flip to",node_add_control:"Add action",node_not_visited:"Not visited",node_watch_again_from:"Watch again",tool_menu_item_rename:"Rename",tool_menu_item_copy:"Copy",tool_menu_item_paste:"Paste",tool_menu_item_delete:"Delete",tool_menu_item_add_node:"Add node",tool_menu_item_as_start_node:"Set as Start node",tool_menu_item_as_end_node:"Set as End node",tool_menu_items_as_end_node:"Set as End nodes",tool_menu_item_as_node:"Set as node",tool_menu_items_as_node:"Set as nodes",tool_menu_item_start_preview:"Start preview",tool_menu_item_focus_on_node:"Focus on node",tool_menu_item_replace_video:"Replace video",tool_menu_item_next_node:"Next node",tool_menu_item_random:"Random",tool_menu_item_random_tooltip:'Add action to use "Random"',tool_menu_item_control_area:"Area",tool_menu_item_control_button:"Button",tool_shadow_node_text:"Click on the left mouse \nbutton to create a node. \nClick on the right \nbutton to cancel \nthe action.",tool_shadow_node_link_text:"New node",tool_shadow_node_error:"The area must\nnot be in contact\nwith other nodes",popup_error_title:"Error",popup_error_message_1:"Manifest is broken",popup_error_message_2:"Manifest media metadata should be parsed",new_chapter_label:"[Untitled]",copied_chapter_suffix:"Copy",new_text_label:"Text",new_text_content:"Enter text",new_button_label:"Button",new_area_label:"Area",tooltip_inaction_not_available:'Not available because the <br/>"Waiting for interaction" option is enabled',tooltip_video_was_changed:"Check your interactive settings. The video file was replaced in the node.",copy_chapter:"Node copied",copy_multiple_chapters:"Multiple nodes copied",remove_initial_chapter:"Start node cannot be removed",graph_node_start:"Start",graph_node_end:"End",graph_location:"Current position",navigation_controls:"Zoom"},c={node_video_error:"Нет видео",node_video_choose:"Выбрать видео",node_video_change:"Заменить видео",node_open_editor:"Открыть редактор",node_eov:"Перейти к",node_add_control:"Добавить действие",node_not_visited:"Не пройдено",node_watch_again_from:"Пересмотреть",tool_menu_item_rename:"Переименовать",tool_menu_item_copy:"Копировать",tool_menu_item_paste:"Вставить",tool_menu_item_delete:"Удалить",tool_menu_item_add_node:"Новый нод",tool_menu_item_as_start_node:"Назначить стартовым",tool_menu_item_as_end_node:"Назначить финальным",tool_menu_items_as_end_node:"Назначить финальными",tool_menu_item_as_node:"Назначить обычным",tool_menu_items_as_node:"Назначить обычными",tool_menu_item_start_preview:"Начать предпросмотр",tool_menu_item_focus_on_node:"Перейти к ноду",tool_menu_item_replace_video:"Заменить видео",tool_menu_item_next_node:"Следующий нод",tool_menu_item_random:"Случайный",tool_menu_item_random_tooltip:'Добавьте действие чтобы использовать "Случайный"',tool_menu_item_control_area:"Область",tool_menu_item_control_button:"Кнопка",tool_shadow_node_text:"Нажмите на левую кнопку \nмыши, чтобы создать нод. \nНажмите на правую кнопку \nмыши, чтобы отменить \nдействие.",tool_shadow_node_link_text:"Новый нод",tool_shadow_node_error:"Область не должна\nзадевать другие ноды",popup_error_title:"Ошибка",popup_error_message_1:"Манифест сломан",popup_error_message_2:"Необходим парсинг поля 'metadata.media'",new_chapter_label:"[Без названия]",copied_chapter_suffix:"Копия",new_text_label:"Текст",new_text_content:"Введите текст",new_button_label:"Кнопка",new_area_label:"Область",tooltip_inaction_not_available:'Недоступно, так как включен параметр <br/>"Ожидание взаимодействия"',tooltip_video_was_changed:"Проверьте настройки интерактивов. В ноде был заменен видеофайл",copy_chapter:"Нод скопирован",copy_multiple_chapters:"Несколько нод скопированы",remove_initial_chapter:"Стартовый нод нельзя удалить",graph_node_start:"Начало",graph_node_end:"Конец",graph_location:"Моя позиция",navigation_controls:"Перемещение"},d1=function d2(){return d1=Object.assign||function(n){for(var o,r=1,a=arguments.length;r<a;r++)for(var s in o=arguments[r])Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s]);return n},d1.apply(this,arguments)};var l=new function(){var n=this;this.init=function(o){o&&(n._mode=o.mode||n._mode,o.lang&&(n.translation=o.lang==="en"?i:c),o.translation&&(n.translation=d1(d1({},n.translation),o.translation)),o.performance&&(n.performance=d1(d1({},n.performance),o.performance)))},this.isViewMode=function(){return n._mode==="read"},this.isEditMode=function(){return n._mode==="edit"},this.isPreViewMode=function(){return n._mode==="pre_view"},this.isViewOrPreViewMode=function(){return n.isViewMode()||n.isPreViewMode()},this.isEditOrPreViewMode=function(){return n.isEditMode()||n.isPreViewMode()},this.switchMode=function(o){n._mode=o},this._mode="edit",this.render=e,this.translation=i,this.performance=t},m=new(function(){function n(){var o=this;this.on=function(r,a){o._listeners[r].push(a)},this.off=function(r,a){o._listeners[r]=o._listeners[r].filter(function(s){return s!==a})},this.emit=function(r){for(var a=[],s=1;s<arguments.length;s++)a[s-1]=arguments[s];o._listeners[r].forEach(function(u){return u.apply(void 0,function(p,h,f){if(f||arguments.length===2)for(var y,_=0,E=h.length;_<E;_++)!y&&_ in h||(y||(y=Array.prototype.slice.call(h,0,_)),y[_]=h[_]);return p.concat(y||Array.prototype.slice.call(h))}([],function(p,h){var f=typeof Symbol=="function"&&p[Symbol.iterator];if(!f)return p;var y,_,E=f.call(p),T=[];try{for(;(h===void 0||h-- >0)&&!(y=E.next()).done;)T.push(y.value)}catch(C){_={error:C}}finally{try{y&&!y.done&&(f=E.return)&&f.call(E)}finally{if(_)throw _.error}}return T}(a),!1))})},this.dispose=function(){o.resetListeners()},this.resetListeners()}return n.prototype.resetListeners=function(){this._listeners={manifestUpdate:[],selectBranches:[],control:[],zoom:[],notification:[],actions:[],events:[]}},n}());var v;(function(n){n.Node="icon_node",n.StartNode="icon_start_node",n.EndNode="icon_end_node",n.EndOfVideo="icon_end_of_video",n.ActionButton="icon_action_button",n.ActionArea="icon_action_area",n.Arrow="icon_arrow",n.Etc="icon_etc",n.Add="icon_add",n.Random="icon_random",n.Warning="icon_warning",n.Move="icon_move",n.Plus="icon_plus",n.Play="icon_play",n.Minus="icon_minus",n.Action="icon_action",n.Inaction="icon_inaction",n.Location="icon_location",n.Lock="icon_lock",n.LegendNavigation="icon_legend_navigation",n.PencilFilled="icon_pencil_filled",n.Pencil="icon_pencil",n.Copy="icon_copy",n.TrashCan="icon_trash_can",n.Video="icon_video"})(v||(v={}));var g,S=[v.Plus,v.Minus,v.Action,v.Inaction],b=function b(n){var o,r,a;try{for(var s=function(h){var f=typeof Symbol=="function"&&Symbol.iterator,y=f&&h[f],_=0;if(y)return y.call(h);if(h&&typeof h.length=="number")return{next:function next(){return h&&_>=h.length&&(h=void 0),{value:h&&h[_++],done:!h}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")}((a=v,Object.keys(a).filter(function(h){return Number.isNaN(+h)}))),u=s.next();!u.done;u=s.next()){var p=u.value;n.append("svg").attr("id",v[p]).attr("class","icon").attr("height",S.includes(v[p])?l.render.controlConnectorIconSize:l.render.iconSize).attr("width",S.includes(v[p])?l.render.controlConnectorIconSize:l.render.iconSize).html(ce(254)("./".concat(v[p],".svg")))}}catch(h){o={error:h}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}},A="M 0, 0 m -5, 0 a 5,5 0 1,0 10,0 a 5,5 0 1,0 -10,0",L="-7 -7 14 14";(function(n){n.Circle="marker_circle",n.CircleDisabled="marker_circle_disabled",n.Connector="marker_connector"})(g||(g={}));var N=[{name:g.Circle,path:A,viewBox:L,stroke:l.render.color.stroke,strokeWidth:2,size:8,fill:l.render.color.stroke},{name:g.CircleDisabled,path:A,viewBox:L,stroke:"#76787A",strokeWidth:2,size:8,fill:"#76787A"},{name:g.Connector,path:A,viewBox:L,stroke:"#F2F5FF",strokeWidth:2,size:16,fill:"#35383C"}];var I=Array.prototype.find;var Q=Array.prototype.filter;rt.prototype={constructor:rt,appendChild:function appendChild(n){return this._parent.insertBefore(n,this._next)},insertBefore:function insertBefore(n,o){return this._parent.insertBefore(n,o)},querySelector:function querySelector(n){return this._parent.querySelector(n)},querySelectorAll:function querySelectorAll(n){return this._parent.querySelectorAll(n)}};var Bt="http://www.w3.org/1999/xhtml";var Nt={svg:"http://www.w3.org/2000/svg",xhtml:Bt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};eu.prototype={add:function add(n){this._names.indexOf(n)<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function remove(n){var o=this._names.indexOf(n);o>=0&&(this._names.splice(o,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function contains(n){return this._names.indexOf(n)>=0}};var iu=[null];Te.prototype=au.prototype=_define_property({constructor:Te,select:function select(n){typeof n!="function"&&(n=z(n));for(var o=this._groups,r=o.length,a=new Array(r),s=0;s<r;++s)for(var u,p,h=o[s],f=h.length,y=a[s]=new Array(f),_=0;_<f;++_)(u=h[_])&&(p=n.call(u,u.__data__,_,h))&&("__data__"in u&&(p.__data__=u.__data__),y[_]=p);return new Te(a,this._parents)},selectAll:function selectAll(n){n=typeof n=="function"?function(_){return function(){return(E=_.apply(this,arguments))==null?[]:Array.isArray(E)?E:Array.from(E);var E}}(n):P(n);for(var o=this._groups,r=o.length,a=[],s=[],u=0;u<r;++u)for(var p,h=o[u],f=h.length,y=0;y<f;++y)(p=h[y])&&(a.push(n.call(p,p.__data__,y,h)),s.push(p));return new Te(a,s)},selectChild:function selectChild(n){return this.select(n==null?H:function(o){return function(){return I.call(this.children,o)}}(typeof n=="function"?n:U(n)))},selectChildren:function selectChildren(n){return this.selectAll(n==null?st:function(o){return function(){return Q.call(this.children,o)}}(typeof n=="function"?n:U(n)))},filter:function filter(n){typeof n!="function"&&(n=k(n));for(var o=this._groups,r=o.length,a=new Array(r),s=0;s<r;++s)for(var u,p=o[s],h=p.length,f=a[s]=[],y=0;y<h;++y)(u=p[y])&&n.call(u,u.__data__,y,p)&&f.push(u);return new Te(a,this._parents)},data:function data(n,o){if(!arguments.length)return Array.from(this,vt);var r,a=o?pt:at,s=this._parents,u=this._groups;typeof n!="function"&&(r=n,n=function n(){return r});for(var p=u.length,h=new Array(p),f=new Array(p),y=new Array(p),_=0;_<p;++_){var E=s[_],T=u[_],C=T.length,R=Ct(n.call(E,E&&E.__data__,_,s)),O=R.length,D=f[_]=new Array(O),V=h[_]=new Array(O);a(E,T,D,V,y[_]=new Array(C),R,o);for(var Z,Y,x=0,W=0;x<O;++x)if(Z=D[x]){for(x>=W&&(W=x+1);!(Y=V[W])&&++W<O;);Z._next=Y||null}}return(h=new Te(h,s))._enter=f,h._exit=y,h},enter:function enter(){return new Te(this._enter||this._groups.map(mt),this._parents)},exit:function exit(){return new Te(this._exit||this._groups.map(mt),this._parents)},join:function join(n,o,r){var a=this.enter(),s=this,u=this.exit();return typeof n=="function"?(a=n(a))&&(a=a.selection()):a=a.append(n+""),o!=null&&(s=o(s))&&(s=s.selection()),r==null?u.remove():r(u),a&&s?a.merge(s).order():s},merge:function merge(n){for(var o=n.selection?n.selection():n,r=this._groups,a=o._groups,s=r.length,u=a.length,p=Math.min(s,u),h=new Array(s),f=0;f<p;++f)for(var y,_=r[f],E=a[f],T=_.length,C=h[f]=new Array(T),R=0;R<T;++R)(y=_[R]||E[R])&&(C[R]=y);for(;f<s;++f)h[f]=r[f];return new Te(h,this._parents)},selection:function selection(){return this},order:function order(){for(var n=this._groups,o=-1,r=n.length;++o<r;)for(var a,s=n[o],u=s.length-1,p=s[u];--u>=0;)(a=s[u])&&(p&&4^a.compareDocumentPosition(p)&&p.parentNode.insertBefore(a,p),p=a);return this},sort:function sort(n){function o(E,T){return E&&T?n(E.__data__,T.__data__):!E-!T}n||(n=Ft);for(var r=this._groups,a=r.length,s=new Array(a),u=0;u<a;++u){for(var p,h=r[u],f=h.length,y=s[u]=new Array(f),_=0;_<f;++_)(p=h[_])&&(y[_]=p);y.sort(o)}return new Te(s,this._parents).order()},call:function call(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this},nodes:function nodes(){return Array.from(this)},node:function node(){for(var n=this._groups,o=0,r=n.length;o<r;++o)for(var a=n[o],s=0,u=a.length;s<u;++s){var p=a[s];if(p)return p}return null},size:function size(){var n=0;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=this[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var o=_step.value;++n}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return n},empty:function empty(){return!this.node()},each:function each(n){for(var o=this._groups,r=0,a=o.length;r<a;++r)for(var s,u=o[r],p=0,h=u.length;p<h;++p)(s=u[p])&&n.call(s,s.__data__,p,u);return this},attr:function attr(n,o){var r=wt(n);if(arguments.length<2){var a=this.node();return r.local?a.getAttributeNS(r.space,r.local):a.getAttribute(r)}return this.each((o==null?r.local?Vt:Ee:typeof o=="function"?r.local?Qt:De:r.local?qt:oe)(r,o))},style:function style(n,o,r){return arguments.length>1?this.each((o==null?le:typeof o=="function"?Yt:Gt)(n,o,r==null?"":r)):te(this.node(),n)},property:function property(n,o){return arguments.length>1?this.each((o==null?tn:typeof o=="function"?_T:yT)(n,o)):this.node()[n]},classed:function classed(n,o){var r=tu(n+"");if(arguments.length<2){for(var a=es(this.node()),s=-1,u=r.length;++s<u;)if(!a.contains(r[s]))return!1;return!0}return this.each((typeof o=="function"?TT:o?gT:ET)(r,o))},text:function text(n){return arguments.length?this.each(n==null?ST:(typeof n=="function"?CT:bT)(n)):this.node().textContent},html:function html(n){return arguments.length?this.each(n==null?wT:(typeof n=="function"?OT:AT)(n)):this.node().innerHTML},raise:function raise(){return this.each(LT)},lower:function lower(){return this.each(xT)},append:function append(n){var o=typeof n=="function"?n:ns(n);return this.select(function(){return this.appendChild(o.apply(this,arguments))})},insert:function insert(n,o){var r=typeof n=="function"?n:ns(n),a=o==null?IT:typeof o=="function"?o:z(o);return this.select(function(){return this.insertBefore(r.apply(this,arguments),a.apply(this,arguments)||null)})},remove:function remove(){return this.each(NT)},clone:function clone(n){return this.select(n?DT:PT)},datum:function datum(n){return arguments.length?this.property("__data__",n):this.node().__data__},on:function on(n,o,r){var a,s,u=function(E){return E.trim().split(/^|\s+/).map(function(T){var C="",R=T.indexOf(".");return R>=0&&(C=T.slice(R+1),T=T.slice(0,R)),{type:T,name:C}})}(n+""),p=u.length;if(!(arguments.length<2)){for(h=o?VT:kT,a=0;a<p;++a)this.each(h(u[a],o,r));return this}var h=this.node().__on;if(h){for(var f,y=0,_=h.length;y<_;++y)for(a=0,f=h[y];a<p;++a)if((s=u[a]).type===f.type&&s.name===f.name)return f.value}},dispatch:function dispatch(n,o){return this.each((typeof o=="function"?UT:BT)(n,o))}},Symbol.iterator,function(){var n,o,r,a,s,u,p,_tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:n=this._groups,o=0,r=n.length;_state.label=1;case 1:if(!(o<r))return[3,7];s=n[o],u=0,p=s.length;_state.label=2;case 2:if(!(u<p))return[3,6];_tmp=a=s[u];if(!_tmp)return[3,4];return[4,a];case 3:_tmp=_state.sent();_state.label=4;case 4:_tmp;_state.label=5;case 5:++u;return[3,2];case 6:++o;return[3,1];case 7:return[2]}})});var Ur=au;var jT={value:function(){}};Zo.prototype=su.prototype={constructor:Zo,on:function on(n,o){var r,a,s=this._,u=(a=s,(n+"").trim().split(/^|\s+/).map(function(f){var y="",_=f.indexOf(".");if(_>=0&&(y=f.slice(_+1),f=f.slice(0,_)),f&&!a.hasOwnProperty(f))throw new Error("unknown type: "+f);return{type:f,name:y}})),p=-1,h=u.length;if(!(arguments.length<2)){if(o!=null&&typeof o!="function")throw new Error("invalid callback: "+o);for(;++p<h;)if(r=(n=u[p]).type)s[r]=cu(s[r],n.name,o);else if(o==null)for(r in s)s[r]=cu(s[r],n.name,null);return this}for(;++p<h;)if((r=(n=u[p]).type)&&(r=FT(s[r],n.name)))return r},copy:function copy(){var n={},o=this._;for(var r in o)n[r]=o[r].slice();return new Zo(n)},call:function call(n,o){if((r=arguments.length-2)>0)for(var r,a,s=new Array(r),u=0;u<r;++u)s[u]=arguments[u+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(u=0,r=(a=this._[n]).length;u<r;++u)a[u].value.apply(o,s)},apply:function apply(n,o,r){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var a=this._[n],s=0,u=a.length;s<u;++s)a[s].value.apply(o,r)}};var rs=su;var Wo,jr,er=0,Fr=0,Hr=0,lu=1e3,$o=0,An=0,Xo=0,zr=(typeof performance==="undefined"?"undefined":_type_of(performance))=="object"&&performance.now?performance:Date,uu=(typeof window==="undefined"?"undefined":_type_of(window))=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function uu(n){setTimeout(n,17)};Ko.prototype=du.prototype={constructor:Ko,restart:function restart(n,o,r){if(typeof n!="function")throw new TypeError("callback is not a function");r=(r==null?os():+r)+(o==null?0:+o),this._next||jr===this||(jr?jr._next=this:Wo=this,jr=this),this._call=n,this._time=r,is()},stop:function stop(){this._call&&(this._call=null,this._time=1/0,is())}};var GT=rs("start","end","cancel","interrupt"),YT=[],fu=0,qo=3;var Jo,mu=180/Math.PI,ss={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};var ZT=yu(function(n){var o=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return o.isIdentity?ss:vu(o.a,o.b,o.c,o.d,o.e,o.f)},"px, ","px)","deg)"),WT=yu(function(n){return n==null?ss:(Jo||(Jo=document.createElementNS("http://www.w3.org/2000/svg","g")),Jo.setAttribute("transform",n),(n=Jo.transform.baseVal.consolidate())?vu((n=n.matrix).a,n.b,n.c,n.d,n.e,n.f):ss)},", ",")",")");var Zr=.7,ti=1/Zr,nr="\\s*([+-]?\\d+)\\s*",Wr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ye="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KT=/^#([0-9a-f]{3,8})$/,qT=new RegExp("^rgb\\(".concat(nr,",").concat(nr,",").concat(nr,"\\)$")),QT=new RegExp("^rgb\\(".concat(Ye,",").concat(Ye,",").concat(Ye,"\\)$")),JT=new RegExp("^rgba\\(".concat(nr,",").concat(nr,",").concat(nr,",").concat(Wr,"\\)$")),tS=new RegExp("^rgba\\(".concat(Ye,",").concat(Ye,",").concat(Ye,",").concat(Wr,"\\)$")),eS=new RegExp("^hsl\\(".concat(Wr,",").concat(Ye,",").concat(Ye,"\\)$")),nS=new RegExp("^hsla\\(".concat(Wr,",").concat(Ye,",").concat(Ye,",").concat(Wr,"\\)$")),gu={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};ls(Yr,On,{copy:function copy(n){return Object.assign(new this.constructor,this,n)},displayable:function displayable(){return this.rgb().displayable()},hex:Eu,formatHex:Eu,formatHex8:function formatHex8(){return this.rgb().formatHex8()},formatHsl:function formatHsl(){return Au(this).formatHsl()},formatRgb:Tu,toString:Tu}),ls(ue,ni,_u(Yr,{brighter:function brighter(n){return n=n==null?ti:Math.pow(ti,n),new ue(this.r*n,this.g*n,this.b*n,this.opacity)},darker:function darker(n){return n=n==null?Zr:Math.pow(Zr,n),new ue(this.r*n,this.g*n,this.b*n,this.opacity)},rgb:function rgb(){return this},clamp:function clamp(){return new ue(Ln(this.r),Ln(this.g),Ln(this.b),ri(this.opacity))},displayable:function displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:bu,formatHex:bu,formatHex8:function formatHex8(){return"#".concat(xn(this.r)).concat(xn(this.g)).concat(xn(this.b)).concat(xn(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:Cu,toString:Cu})),ls(Be,function(n,o,r,a){return arguments.length===1?Au(n):new Be(n,o,r,a==null?1:a)},_u(Yr,{brighter:function brighter(n){return n=n==null?ti:Math.pow(ti,n),new Be(this.h,this.s,this.l*n,this.opacity)},darker:function darker(n){return n=n==null?Zr:Math.pow(Zr,n),new Be(this.h,this.s,this.l*n,this.opacity)},rgb:function rgb(){var n=this.h%360+360*(this.h<0),o=isNaN(n)||isNaN(this.s)?0:this.s,r=this.l,a=r+(r<.5?r:1-r)*o,s=2*r-a;return new ue(us(n>=240?n-240:n+120,s,a),us(n,s,a),us(n<120?n+240:n-120,s,a),this.opacity)},clamp:function clamp(){return new Be(Ou(this.h),oi(this.s),oi(this.l),ri(this.opacity))},displayable:function displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function formatHsl(){var n=ri(this.opacity);return"".concat(n===1?"hsl(":"hsla(").concat(Ou(this.h),", ").concat(100*oi(this.s),"%, ").concat(100*oi(this.l),"%").concat(n===1?")":", ".concat(n,")"))}}));var ds=function(n){return function(){return n}};var ii=function n(o){var r=function(s){return(s=+s)==1?xu:function(u,p){return p-u?function(h,f,y){return h=Math.pow(h,y),f=Math.pow(f,y)-h,y=1/y,function(_){return Math.pow(h+_*f,y)}}(u,p,s):ds(isNaN(u)?p:u)}}(o);function a(s,u){var p=r((s=ni(s)).r,(u=ni(u)).r),h=r(s.g,u.g),f=r(s.b,u.b),y=xu(s.opacity,u.opacity);return function(_){return s.r=p(_),s.g=h(_),s.b=f(_),s.opacity=y(_),s+""}}return a.gamma=n,a}(1);Ru(function(n){var o=n.length-1;return function(r){var a=r<=0?r=0:r>=1?(r=1,o-1):Math.floor(r*o),s=n[a],u=n[a+1],p=a>0?n[a-1]:2*s-u,h=a<o-1?n[a+2]:2*u-s;return Lu((r-a/o)*o,p,s,u,h)}}),Ru(function(n){var o=n.length;return function(r){var a=Math.floor(((r%=1)<0?++r:r)*o),s=n[(a+o-1)%o],u=n[a%o],p=n[(a+1)%o],h=n[(a+2)%o];return Lu((r-a/o)*o,s,u,p,h)}});var ps=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hs=new RegExp(ps.source,"g");var mS=Ur.prototype.constructor;var vS=0;var nn=Ur.prototype;en.prototype=(function(n){return Ur().transition(n)}).prototype=_define_property({constructor:en,select:function select(n){var o=this._name,r=this._id;typeof n!="function"&&(n=z(n));for(var a=this._groups,s=a.length,u=new Array(s),p=0;p<s;++p)for(var h,f,y=a[p],_=y.length,E=u[p]=new Array(_),T=0;T<_;++T)(h=y[T])&&(f=n.call(h,h.__data__,T,y))&&("__data__"in h&&(f.__data__=h.__data__),E[T]=f,Qo(E[T],o,r,T,E,ke(h,r)));return new en(u,this._parents,o,r)},selectAll:function selectAll(n){var o=this._name,r=this._id;typeof n!="function"&&(n=P(n));for(var a=this._groups,s=a.length,u=[],p=[],h=0;h<s;++h)for(var f,y=a[h],_=y.length,E=0;E<_;++E)if(f=y[E]){for(var T,C=n.call(f,f.__data__,E,y),R=ke(f,r),O=0,D=C.length;O<D;++O)(T=C[O])&&Qo(T,o,r,O,C,R);u.push(C),p.push(f)}return new en(u,p,o,r)},selectChild:nn.selectChild,selectChildren:nn.selectChildren,filter:function filter(n){typeof n!="function"&&(n=k(n));for(var o=this._groups,r=o.length,a=new Array(r),s=0;s<r;++s)for(var u,p=o[s],h=p.length,f=a[s]=[],y=0;y<h;++y)(u=p[y])&&n.call(u,u.__data__,y,p)&&f.push(u);return new en(a,this._parents,this._name,this._id)},merge:function merge(n){if(n._id!==this._id)throw new Error;for(var o=this._groups,r=n._groups,a=o.length,s=r.length,u=Math.min(a,s),p=new Array(a),h=0;h<u;++h)for(var f,y=o[h],_=r[h],E=y.length,T=p[h]=new Array(E),C=0;C<E;++C)(f=y[C]||_[C])&&(T[C]=f);for(;h<a;++h)p[h]=o[h];return new en(p,this._parents,this._name,this._id)},selection:function selection(){return new mS(this._groups,this._parents)},transition:function transition(){for(var n=this._name,o=this._id,r=Pu(),a=this._groups,s=a.length,u=0;u<s;++u)for(var p,h=a[u],f=h.length,y=0;y<f;++y)if(p=h[y]){var _=ke(p,o);Qo(p,n,r,y,h,{time:_.time+_.delay+_.duration,delay:0,duration:_.duration,ease:_.ease})}return new en(a,this._parents,n,r)},call:nn.call,nodes:nn.nodes,node:nn.node,size:nn.size,empty:nn.empty,each:nn.each,on:function on(n,o){var r=this._id;return arguments.length<2?ke(this.node(),r).on.on(n):this.each(function(a,s,u){var p,h,f=function(y){return(y+"").trim().split(/^|\s+/).every(function(_){var E=_.indexOf(".");return E>=0&&(_=_.slice(0,E)),!_||_==="start"})}(s)?as:Ge;return function(){var y=f(this,a),_=y.on;_!==p&&(h=(p=_).copy()).on(s,u),y.on=h}}(r,n,o))},attr:function attr(n,o){var r=wt(n),a=r==="transform"?WT:Iu;return this.attrTween(n,typeof o=="function"?(r.local?cS:sS)(r,a,cs(this,"attr."+n,o)):o==null?(r.local?oS:rS)(r):(r.local?aS:iS)(r,a,o))},attrTween:function attrTween(n,o){var r="attr."+n;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(o==null)return this.tween(r,null);if(typeof o!="function")throw new Error;var a=wt(n);return this.tween(r,(a.local?lS:uS)(a,o))},style:function style(n,o,r){var a=(n+="")=="transform"?ZT:Iu;return o==null?this.styleTween(n,function(s,u){var p,h,f;return function(){var y=te(this,s),_=(this.style.removeProperty(s),te(this,s));return y===_?null:y===p&&_===h?f:f=u(p=y,h=_)}}(n,a)).on("end.style."+n,Nu(n)):typeof o=="function"?this.styleTween(n,function(s,u,p){var h,f,y;return function(){var _=te(this,s),E=p(this),T=E+"";return E==null&&(this.style.removeProperty(s),T=E=te(this,s)),_===T?null:_===h&&T===f?y:(f=T,y=u(h=_,E))}}(n,a,cs(this,"style."+n,o))).each(function(s,u){var p,h,f,y,_="style."+u,E="end."+_;return function(){var T=Ge(this,s),C=T.on,R=T.value[_]==null?y||(y=Nu(u)):void 0;C===p&&f===R||(h=(p=C).copy()).on(E,f=R),T.on=h}}(this._id,n)):this.styleTween(n,function(s,u,p){var h,f,y=p+"";return function(){var _=te(this,s);return _===y?null:_===h?f:f=u(h=_,p)}}(n,a,o),r).on("end.style."+n,null)},styleTween:function styleTween(n,o,r){var a="style."+(n+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(o==null)return this.tween(a,null);if(typeof o!="function")throw new Error;return this.tween(a,function(s,u,p){var h,f;function y(){var _=u.apply(this,arguments);return _!==f&&(h=(f=_)&&function(E,T,C){return function(R){this.style.setProperty(E,T.call(this,R),C)}}(s,_,p)),h}return y._value=u,y}(n,o,r==null?"":r))},text:function text(n){return this.tween("text",typeof n=="function"?function(o){return function(){var r=o(this);this.textContent=r==null?"":r}}(cs(this,"text",n)):function(o){return function(){this.textContent=o}}(n==null?"":n+""))},textTween:function textTween(n){var o="text";if(arguments.length<1)return(o=this.tween(o))&&o._value;if(n==null)return this.tween(o,null);if(typeof n!="function")throw new Error;return this.tween(o,function(r){var a,s;function u(){var p=r.apply(this,arguments);return p!==s&&(a=(s=p)&&function(h){return function(f){this.textContent=h.call(this,f)}}(p)),a}return u._value=r,u}(n))},remove:function remove(){return this.on("end.remove",function(n){return function(){var o=this.parentNode;for(var r in this.__transition)if(+r!==n)return;o&&o.removeChild(this)}}(this._id))},tween:function tween(n,o){var r=this._id;if(n+="",arguments.length<2){for(var a,s=ke(this.node(),r).tween,u=0,p=s.length;u<p;++u)if((a=s[u]).name===n)return a.value;return null}return this.each((o==null?$T:XT)(r,n,o))},delay:function delay(n){var o=this._id;return arguments.length?this.each((typeof n=="function"?dS:pS)(o,n)):ke(this.node(),o).delay},duration:function duration(n){var o=this._id;return arguments.length?this.each((typeof n=="function"?hS:fS)(o,n)):ke(this.node(),o).duration},ease:function ease(n){var o=this._id;return arguments.length?this.each(function(r,a){if(typeof a!="function")throw new Error;return function(){Ge(this,r).ease=a}}(o,n)):ke(this.node(),o).ease},easeVarying:function easeVarying(n){if(typeof n!="function")throw new Error;return this.each(function(o,r){return function(){var a=r.apply(this,arguments);if(typeof a!="function")throw new Error;Ge(this,o).ease=a}}(this._id,n))},end:function end(){var n,o,r=this,a=r._id,s=r.size();return new Promise(function(u,p){var h={value:p},f={value:function value(){--s==0&&u()}};r.each(function(){var y=Ge(this,a),_=y.on;_!==n&&((o=(n=_).copy())._.cancel.push(h),o._.interrupt.push(h),o._.end.push(f)),y.on=o}),s===0&&u()})}},Symbol.iterator,nn[Symbol.iterator]);var yS={time:null,delay:0,duration:250,ease:function ease(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}};Ur.prototype.interrupt=function(n){return this.each(function(){Gr(this,n)})},Ur.prototype.transition=function(n){var o,r;_instanceof(n,en)?(o=n._id,n=n._name):(o=Pu(),(r=yS).time=os(),n=n==null?null:n+"");for(var a=this._groups,s=a.length,u=0;u<s;++u)for(var p,h=a[u],f=h.length,y=0;y<f;++y)(p=h[y])&&Qo(p,n,o,y,h,r||_S(p,o));return new en(a,this._parents,n,o)};var p7=Math.abs,h7=Math.max,f7=Math.min;["w","e"].map(fs),["n","s"].map(fs),["n","w","e","s","nw","ne","sw","se"].map(fs);var gS={passive:!1},$r={capture:!0,passive:!1};var ai=function(n){return function(){return n}};vs.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};var _s=Math.sqrt(50),gs=Math.sqrt(10),Es=Math.sqrt(2);var Uu=Bu(si),AS=Uu.right,OS=(Uu.left,Bu(function(n){return n===null?NaN:+n}).center,AS);var ju=[0,1];var Fu,VS=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;ci.prototype=bs.prototype,bs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,0|this.width))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var zu={"%":function(n,o){return(100*n).toFixed(o)},b:function(n){return Math.round(n).toString(2)},c:function(n){return n+""},d:function d1(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)},e:function(n,o){return n.toExponential(o)},f:function(n,o){return n.toFixed(o)},g:function(n,o){return n.toPrecision(o)},o:function(n){return Math.round(n).toString(8)},p:function(n,o){return Hu(100*n,o)},r:Hu,s:function s(n,o){var r=li(n,o);if(!r)return n+"";var a=r[0],s=r[1],u=s-(Fu=3*Math.max(-8,Math.min(8,Math.floor(s/3))))+1,p=a.length;return u===p?a:u>p?a+new Array(u-p+1).join("0"):u>0?a.slice(0,u)+"."+a.slice(u):"0."+new Array(1-u).join("0")+li(n,Math.max(0,o+u-1))[0]},X:function(n){return Math.round(n).toString(16).toUpperCase()},x:function(n){return Math.round(n).toString(16)}};var Cs,Yu,Zu,Wu=Array.prototype.map,$u=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function Xu(){var n=(function(){var o,r,a,s,u,p,h=ju,f=ju,y=Ts,_=or;function E(){var C,R,O,D=Math.min(h.length,f.length);return _!==or&&(C=h[0],R=h[D-1],C>R&&(O=C,C=R,R=O),_=function _(V){return Math.max(C,Math.min(R,V))}),s=D>2?DS:PS,u=p=null,T}function T(C){return C==null||isNaN(C=+C)?a:(u||(u=s(h.map(o),f,y)))(o(_(C)))}return T.invert=function(C){return _(r((p||(p=s(f,h.map(o),Ve)))(C)))},T.domain=function(C){return arguments.length?(h=Array.from(C,NS),E()):h.slice()},T.range=function(C){return arguments.length?(f=Array.from(C),E()):f.slice()},T.rangeRound=function(C){return f=Array.from(C),y=IS,E()},T.clamp=function(C){return arguments.length?(_=!!C||or,E()):_!==or},T.interpolate=function(C){return arguments.length?(y=C,E()):y},T.unknown=function(C){return arguments.length?(a=C,T):a},function(C,R){return o=C,r=R,E()}})()(or,or);return n.copy=function(){return o=n,Xu().domain(o.domain()).range(o.range()).interpolate(o.interpolate()).clamp(o.clamp()).unknown(o.unknown());var o},kS.apply(n,arguments),BS(n)}Cs=function(n){var o,r,a=n.grouping===void 0||n.thousands===void 0?Gu:(o=Wu.call(n.grouping,Number),r=n.thousands+"",function a(T,C){for(var R=T.length,O=[],D=0,V=o[0],Z=0;R>0&&V>0&&(Z+V+1>C&&(V=Math.max(1,C-Z)),O.push(T.substring(R-=V,R+V)),!((Z+=V+1)>C));)V=o[D=(D+1)%o.length];return O.reverse().join(r)}),s=n.currency===void 0?"":n.currency[0]+"",u=n.currency===void 0?"":n.currency[1]+"",p=n.decimal===void 0?".":n.decimal+"",h=n.numerals===void 0?Gu:function(T){return function(C){return C.replace(/[0-9]/g,function(R){return T[+R]})}}(Wu.call(n.numerals,String)),f=n.percent===void 0?"%":n.percent+"",y=n.minus===void 0?"−":n.minus+"",_=n.nan===void 0?"NaN":n.nan+"";function E(T){var C=(T=ci(T)).fill,R=T.align,O=T.sign,D=T.symbol,V=T.zero,Z=T.width,Y=T.comma,x=T.precision,W=T.trim,q=T.type;q==="n"?(Y=!0,q="g"):zu[q]||(x===void 0&&(x=12),W=!0,q="g"),(V||C==="0"&&R==="=")&&(V=!0,C="0",R="=");var et=D==="$"?s:D==="#"&&/[boxX]/.test(q)?"0"+q.toLowerCase():"",ct=D==="$"?u:/[%p]/.test(q)?f:"",ut=zu[q],Ut=/[defgprs%]/.test(q);function xt(ot){var It,Pt,Fe,ae=et,M=ct;if(q==="c")M=ut(ot)+M,ot="";else{var J=(ot=+ot)<0||1/ot<0;if(ot=isNaN(ot)?_:ut(Math.abs(ot),x),W&&(ot=function(nt){t:for(var ht,yt=nt.length,bt=1,ft=-1;bt<yt;++bt)switch(nt[bt]){case".":ft=ht=bt;break;case"0":ft===0&&(ft=bt),ht=bt;break;default:if(!+nt[bt])break t;ft>0&&(ft=0)}return ft>0?nt.slice(0,ft)+nt.slice(ht+1):nt}(ot)),J&&+ot==0&&O!=="+"&&(J=!1),ae=(J?O==="("?O:y:O==="-"||O==="("?"":O)+ae,M=(q==="s"?$u[8+Fu/3]:"")+M+(J&&O==="("?")":""),Ut){for(It=-1,Pt=ot.length;++It<Pt;)if(48>(Fe=ot.charCodeAt(It))||Fe>57){M=(Fe===46?p+ot.slice(It+1):ot.slice(It))+M,ot=ot.slice(0,It);break}}}Y&&!V&&(ot=a(ot,1/0));var $=ae.length+ot.length+M.length,X=$<Z?new Array(Z-$+1).join(C):"";switch(Y&&V&&(ot=a(X+ot,X.length?Z-M.length:1/0),X=""),R){case"<":ot=ae+ot+M+X;break;case"=":ot=ae+X+ot+M;break;case"^":ot=X.slice(0,$=X.length>>1)+ae+ot+M+X.slice($);break;default:ot=X+ae+ot+M}return h(ot)}return x=x===void 0?6:/[gprs]/.test(q)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),xt.toString=function(){return T+""},xt}return{format:E,formatPrefix:function formatPrefix(T,C){var R=E(((T=ci(T)).type="f",T)),O=3*Math.max(-8,Math.min(8,Math.floor(ir(C)/3))),D=Math.pow(10,-O),V=$u[8+O/3];return function(Z){return R(D*Z)+V}}}}({thousands:",",grouping:[3],currency:["$",""]}),Yu=Cs.format,Zu=Cs.formatPrefix;var ws=Math.PI,As=2*ws,Rn=1e-6,US=As-Rn;Os.prototype=Ku.prototype={constructor:Os,moveTo:function moveTo(n,o){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+o)},closePath:function closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function lineTo(n,o){this._+="L"+(this._x1=+n)+","+(this._y1=+o)},quadraticCurveTo:function quadraticCurveTo(n,o,r,a){this._+="Q"+ +n+","+ +o+","+(this._x1=+r)+","+(this._y1=+a)},bezierCurveTo:function bezierCurveTo(n,o,r,a,s,u){this._+="C"+ +n+","+ +o+","+ +r+","+ +a+","+(this._x1=+s)+","+(this._y1=+u)},arcTo:function arcTo(n,o,r,a,s){n=+n,o=+o,r=+r,a=+a,s=+s;var u=this._x1,p=this._y1,h=r-n,f=a-o,y=u-n,_=p-o,E=y*y+_*_;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=n)+","+(this._y1=o);else if(E>Rn)if(Math.abs(_*h-f*y)>Rn&&s){var T=r-u,C=a-p,R=h*h+f*f,O=T*T+C*C,D=Math.sqrt(R),V=Math.sqrt(E),Z=s*Math.tan((ws-Math.acos((R+E-O)/(2*D*V)))/2),Y=Z/V,x=Z/D;Math.abs(Y-1)>Rn&&(this._+="L"+(n+Y*y)+","+(o+Y*_)),this._+="A"+s+","+s+",0,0,"+ +(_*T>y*C)+","+(this._x1=n+x*h)+","+(this._y1=o+x*f)}else this._+="L"+(this._x1=n)+","+(this._y1=o)},arc:function arc(n,o,r,a,s,u){n=+n,o=+o,u=!!u;var p=(r=+r)*Math.cos(a),h=r*Math.sin(a),f=n+p,y=o+h,_=1^u,E=u?a-s:s-a;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+f+","+y:(Math.abs(this._x1-f)>Rn||Math.abs(this._y1-y)>Rn)&&(this._+="L"+f+","+y),r&&(E<0&&(E=E%As+As),E>US?this._+="A"+r+","+r+",0,1,"+_+","+(n-p)+","+(o-h)+"A"+r+","+r+",0,1,"+_+","+(this._x1=f)+","+(this._y1=y):E>Rn&&(this._+="A"+r+","+r+",0,"+ +(E>=ws)+","+_+","+(this._x1=n+r*Math.cos(s))+","+(this._y1=o+r*Math.sin(s))))},rect:function rect(n,o,r,a){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+o)+"h"+ +r+"v"+ +a+"h"+-r+"Z"},toString:function toString(){return this._}};var jS=Ku;var FS=Array.prototype.slice;var HS=/*#__PURE__*/function(){function HS(o,r){_class_call_check(this,HS);this._context=o,this._x=r}_create_class(HS,[{key:"areaStart",value:function areaStart(){this._line=0}},{key:"areaEnd",value:function areaEnd(){this._line=NaN}},{key:"lineStart",value:function lineStart(){this._point=0}},{key:"lineEnd",value:function lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}},{key:"point",value:function point(o,r){switch(o=+o,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(o,r):this._context.moveTo(o,r);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+o)/2,this._y0,this._x0,r,o,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,o,this._y0,o,r)}this._x0=o,this._y0=r}}]);return HS}();var WS=function n(o,r,a){function s(u,p){var h,f,y=u[0],_=u[1],E=u[2],T=p[0],C=p[1],R=p[2],O=T-y,D=C-_,V=O*O+D*D;if(V<1e-12)f=Math.log(R/E)/o,h=function h(et){return[y+et*O,_+et*D,E*Math.exp(o*et*f)]};else{var Z=Math.sqrt(V),Y=(R*R-E*E+a*V)/(2*E*r*Z),x=(R*R-E*E-a*V)/(2*R*r*Z),W=Math.log(Math.sqrt(Y*Y+1)-Y),q=Math.log(Math.sqrt(x*x+1)-x);f=(q-W)/o,h=function h(et){var ct,ut=et*f,Ut=Qu(W),xt=E/(r*Z)*(Ut*(ct=o*ut+W,((ct=Math.exp(2*ct))-1)/(ct+1))-function(ot){return((ot=Math.exp(ot))-1/ot)/2}(W));return[y+xt*O,_+xt*D,E*Ut/Qu(o*ut+W)]}}return h.duration=1e3*f*o/Math.SQRT2,h}return s.rho=function(u){var p=Math.max(.001,+u),h=p*p;return n(p,h,h*h)},s}(Math.SQRT2,2,4),ui=function(n){return function(){return n}};Ue.prototype={constructor:Ue,scale:function scale(n){return n===1?this:new Ue(this.k*n,this.x,this.y)},translate:function translate(n,o){return n===0&o===0?this:new Ue(this.k,this.x+this.k*n,this.y+this.k*o)},apply:function apply(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function applyX(n){return n*this.k+this.x},applyY:function applyY(n){return n*this.k+this.y},invert:function invert(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function invertX(n){return(n-this.x)/this.k},invertY:function invertY(n){return(n-this.y)/this.k},rescaleX:function rescaleX(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function rescaleY(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function toString(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ls,Mn=new Ue(1,0,0);Ue.prototype,function(n){n.ErrorMarker="error_marker"}(Ls||(Ls={}));var $t,Ze=function Ze(n){var o=n.x,r=n.y,a=n.w,s=n.h,u=n.r,p=u===void 0?0:u,h=n.border,f={tl:!1,tr:!1,br:!1,bl:!1};p&&(h?(f.tl=h[0],f.tr=h[1],f.br=h[3],f.bl=h[2]):(f.tl=!0,f.tr=!0,f.br=!0,f.bl=!0));var y="M"+(o+p)+","+r+"h"+(a-2*p);return f.tr?y+="a"+p+","+p+" 0 0 1 "+p+","+p:(y+="h"+p,y+="v"+p),y+="v"+(s-2*p),f.br?y+="a"+p+","+p+" 0 0 1 "+-p+","+p:(y+="v"+p,y+="h"+-p),y+="h"+(2*p-a),f.bl?y+="a"+p+","+p+" 0 0 1 "+-p+","+-p:(y+="h"+-p,y+="v"+-p),y+="v"+(2*p-s),f.tl?y+="a"+p+","+p+" 0 0 1 "+p+","+-p:(y+="v"+-p,y+="h"+p),y+"z"},ed="clip-border-",nd="clip-",ar=l.render.strokeSize/2,di=2*ar,rd=function rd(n){var o=n.id,r=n.width,a=n.height,s=n.element,u=n.r;s.append("clipPath").attr("id",nd+o).append("path").attr("d",Ze({x:ar,y:ar,w:r-2*ar,h:a-2*ar,r:u})),s.attr("clip-path","url(#".concat(nd).concat(o,")"))},we=function we(n,o,r){o===void 0&&(o=!1),r===void 0&&(r=!1);var a=gt("svg:g");return a.append("circle").attr("class","connector_circle").attr("r",l.render.node.control.connectorRadius-l.render.strokeSize).attr("fill",l.render.color.elementBackground).attr("stroke",r?l.render.color.disabledStroke:l.render.color.stroke).attr("stroke-width",l.render.strokeSize).attr("cx",l.render.node.control.connectorRadius).attr("cy",l.render.node.control.connectorRadius),a.append("use").style("color",l.render.tool.textColor).attr("x",2).attr("y",2).attr("href","#".concat(n)).style("opacity",r?.4:1),o&&a.on("mouseover",function(){_t(this).select(".connector_circle").attr("fill",l.render.color.elementBackgroundHover2)}).on("mouseout",function(){_t(this).select(".connector_circle").attr("fill",l.render.color.elementBackground)}),a},Se=(function(n){var o=YS,r=ZS,a=zS,s=GS,u=null,p=null;function h(){var f,y=FS.call(arguments),_=o.apply(this,y),E=r.apply(this,y);if(u==null&&(p=n(f=jS())),p.lineStart(),y[0]=_,p.point(+a.apply(this,y),+s.apply(this,y)),y[0]=E,p.point(+a.apply(this,y),+s.apply(this,y)),p.lineEnd(),f)return p=null,f+""||null}return h.source=function(f){return arguments.length?(o=f,h):o},h.target=function(f){return arguments.length?(r=f,h):r},h.x=function(f){return arguments.length?(a=typeof f=="function"?f:qu(+f),h):a},h.y=function(f){return arguments.length?(s=typeof f=="function"?f:qu(+f),h):s},h.context=function(f){return arguments.length?(f==null?u=p=null:p=n(u=f),h):u},h})(function(n){return new HS(n,!0)}).x(function(n){return n[0]}).y(function(n){return n[1]}),od=function od(n){var o=n.text,r=n.posX,a=n.posY,s=n.width,u=n.height,p=u===void 0?16:u,h=n.fontSize,f=n.fontWeight,y=n.lineHeight,_=n.color,E=gt("svg:foreignObject");return E.attr("x",r).attr("y",a).attr("width",s).attr("height",p).attr("class","mge-text").html(o),h&&h!==12&&E.style("font-size",h),_&&_!=="rgb(255, 255, 255)"&&_!=="#FFFFFF"&&E.style("color",_),f&&f!==500&&E.style("font-weight",f),y&&E.style("line-height",y),E},id=function id(n){return od(n).node()};(function(n){n.Order="node_order",n.TagCover="tag_cover",n.PreviewPlaceholder="preview_placeholder",n.PreviewClipPath="preview_clip_path",n.Connector="node_connector",n.ConnectorDisabled="node_connector_disabled",n.LinearGradient="linear_gradient"})($t||($t={}));var sr,t2=function t2(n){var o,r=this;this._defsDOMElement=n,this.dispose=function(){r._defsDOMElement.selectAll("*").remove()},b(n),n.selectAll("marker").data(N).join("marker").attr("id",function(a){return a.name}).attr("stroke",function(a){return a.stroke}).attr("stroke-width",function(a){return a.strokeWidth}).attr("markerHeight",function(a){return a.size}).attr("markerWidth",function(a){return a.size}).attr("markerUnits","strokeWidth").attr("orient","auto").attr("refX",0).attr("refY",0).attr("viewBox",function(a){return a.viewBox}).append("path").attr("d",function(a){return a.path}).attr("fill",function(a){return a.fill}),(o=n).append(function(){return(a=gt("svg:g").attr("id",$t.PreviewPlaceholder)).append("rect").attr("x",2).attr("y",0).attr("width",l.render.node.width-4).attr("height",l.render.node.componentPreviewHeight).attr("fill",l.render.node.previewPlaceholder.backgroundColor),a.append("path").attr("d",Ze({x:8,y:8,w:l.render.node.width-16,h:l.render.node.componentPreviewHeight-16,r:8})).attr("stroke-width",l.render.strokeSize).attr("stroke",l.render.node.previewPlaceholder.borderColor).style("stroke-dasharray","2, 4").attr("fill","none"),a.append("text").text(l.translation.node_video_error).attr("text-anchor","middle").attr("font-weight",600).attr("font-size",15).style("fill",l.render.node.previewPlaceholder.textColor).attr("x",l.render.node.width/2).attr("y",l.render.node.componentPreviewHeight/2+6).attr("text-rendering","optimizeSpeed"),a.node();var a}),o.append(function(){return gt("svg:path").attr("id",$t.Connector).attr("d","M0,0 L1,1z").attr("fill","none").style("marker-start","url(#".concat(g.Circle,")")).node()}),o.append(function(){return gt("svg:path").attr("id",$t.ConnectorDisabled).attr("d","M0,0 L1,1z").attr("fill","none").style("marker-start","url(#".concat(g.CircleDisabled,")")).node()}),o.append(function(){return(a=gt("svg").attr("id",$t.Order)).append("circle").attr("r",l.render.node.componentOrderRadius).attr("fill","#FFFFFF").attr("cx",l.render.node.componentOrderRadius).attr("cy",l.render.node.componentOrderRadius),a.node();var a}),o.append(function(){return function(){var a=Xu().range([l.render.color.nodeStroke,"rgba(0, 0, 0, 0)"]).domain([1,2]),s=gt("svg:linearGradient").attr("id",$t.LinearGradient);return s.append("stop").attr("offset","5%").attr("stop-color",a(1)),s.append("stop").attr("offset","70%").attr("stop-color",a(2)),s.node()}()}),o.append(function(){return(a=gt("svg:clipPath").attr("id",$t.PreviewClipPath)).append("path").attr("d",Ze({x:2,y:l.render.node.headerHeight+1,w:l.render.node.width-4,h:l.render.node.componentPreviewHeight-1,r:8})),a.node();var a}),function(a){a.append(function(){return s=l.render.iconSize+8,(u=gt("svg:g").attr("id",Ls.ErrorMarker)).append("svg").attr("width",s).attr("height",s).attr("viewBox","0 0 ".concat(l.render.iconSize," ").concat(l.render.iconSize)).append("use").style("color",l.render.color.error).attr("href","#".concat(v.Warning)),u.append("rect").attr("fill","transparent").attr("width",s).attr("height",s),u.node();var s,u})}(n)};(function(n){n[n.NoVideo=0]="NoVideo",n[n.NoEOV=1]="NoEOV",n[n.NoBranches=2]="NoBranches"})(sr||(sr={}));var Kr="3.3",ad=/[3-9]{1}\.[3-9]{1}/;var sd={randomUUID:typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},pi,e2=new Uint8Array(16);var Xt=[];for(var n=0;n<256;++n)Xt.push((n+256).toString(16).slice(1));var Ae=function Ae(n,o,r){if(sd.randomUUID&&!o&&!n)return sd.randomUUID();var a=(n=n||{}).random||(n.rng||n2)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,o){r=r||0;for(var s=0;s<16;++s)o[r+s]=a[s];return o}return function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(Xt[s[u+0]]+Xt[s[u+1]]+Xt[s[u+2]]+Xt[s[u+3]]+"-"+Xt[s[u+4]]+Xt[s[u+5]]+"-"+Xt[s[u+6]]+Xt[s[u+7]]+"-"+Xt[s[u+8]]+Xt[s[u+9]]+"-"+Xt[s[u+10]]+Xt[s[u+11]]+Xt[s[u+12]]+Xt[s[u+13]]+Xt[s[u+14]]+Xt[s[u+15]]).toLowerCase()}(a)};var qr,ie=function ie1(){return ie=Object.assign||function(n){for(var o,r=1,a=arguments.length;r<a;r++)for(var s in o=arguments[r])Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s]);return n},ie.apply(this,arguments)},r2=["Button"],o2=["Button"],Rs=Object.freeze({background:"#0D0F12",border:"#0D0F12",text:"#F2F5FF"}),i2=function i2(n,o,r){return{id:Ae(),type:n,label:o,layoutParams:a2(n),props:s2(n,r),events:n!=="Text"?[In("onClick","continuePlayback")]:[]}},In=function In(n,o,r){switch(o){case"setNextBranch":return{type:n,action:{type:o,args:{branchId:r,shouldOpenNow:!0}}};case"continuePlayback":return{type:n,action:{type:o,args:{shouldOpenNow:!0}}}}},a2=function a2(n){var o=n==="Text";return{x:.5,y:o?0:.3,width:.4,height:o?.12:.09,angle:0,innerSizesDependOn:"video"}},s2=function s2(n,o){var r=n==="Text",a=r?"start":"center",s=r?"top":"center";return ie({background:{type:"color",color:Rs.background,alpha:r2.includes(n)?1:0},shape:{border:{width:.005,color:Rs.border,alpha:o2.includes(n)?1:0},type:"rectangle",roundCorners:.02}},o&&{text:{value:o,gravityHorizontal:a,gravityVertical:s,color:Rs.text,size:r?.1:.03,alpha:1}})},cd=function cd(n,o,r,a){var s,u=(s=n.containers.find(function(_){return _.id===o}))===null||s===void 0?void 0:s.controls.find(function(_){return _.id===r}),p=(u==null?void 0:u.events)||[],h=vi("onClick",u==null?void 0:u.events),f=h==null?void 0:h.action.args.branchId;a!=="setNextBranch"&&a!=="continuePlayback"||(h?p=p.map(function(_){return _===h?ie(ie({},_),{action:ie(ie({},_.action),{type:a,args:ie(ie({},_.action.args),{branchId:a==="setNextBranch"?_.action.args.branchId:void 0})})}):_}):p.push(In("onClick",a)));var y=a!=="setNextBranch"?n.branches.filter(function(_){return _.id!==f}):n.branches;return ie(ie({},n),{branches:y,containers:n.containers.map(function(_){return _.id===o?ie(ie({},_),{controls:_.controls.map(function(E){return E.id===r?ie(ie({},E),{events:p}):E})}):_})})},We=function We1(){return We=Object.assign||function(n){for(var o,r=1,a=arguments.length;r<a;r++)for(var s in o=arguments[r])Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s]);return n},We.apply(this,arguments)},ld=function ld(n,o){var r={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&o.indexOf(a)<0&&(r[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function"){var s=0;for(a=Object.getOwnPropertySymbols(n);s<a.length;s++)o.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(n,a[s])&&(r[a[s]]=n[a[s]])}return r},hi=function hi(n){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&n[o],a=0;if(r)return r.call(n);if(n&&typeof n.length=="number")return{next:function next(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},fi=function fi1(){return fi=Object.assign||function(n){for(var o,r=1,a=arguments.length;r<a;r++)for(var s in o=arguments[r])Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s]);return n},fi.apply(this,arguments)},tt=function tt1(){return tt=Object.assign||function(n){for(var o,r=1,a=arguments.length;r<a;r++)for(var s in o=arguments[r])Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s]);return n},tt.apply(this,arguments)},_n=function _n(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},pe=function pe(n,o,r){if(r||arguments.length===2)for(var a,s=0,u=o.length;s<u;s++)!a&&s in o||(a||(a=Array.prototype.slice.call(o,0,s)),a[s]=o[s]);return n.concat(a||Array.prototype.slice.call(o))},ud=function ud(n){return n===void 0&&(n=l.translation.new_chapter_label),{id:Ae(),label:n,order:"simple",branches:[],containers:[],events:[]}},c2=function c2(n){for(var o=1,r=A2(),a=function a(){return"".concat(n," (").concat(l.translation.copied_chapter_suffix).concat(o,")")},s=a();r.has(s);)o+=1,s=a();return s},dd=function dd(n){var o;return tt(tt({},n),{label:c2(n.label),id:Ae(),order:n.order==="start"?"simple":n.order,branches:[],containers:n.containers.map(function(r){return tt(tt({},r),{id:Ae(),controls:r.controls.map(function(a){return tt(tt({},a),{id:Ae(),events:a.type!=="Text"?[In("onClick","continuePlayback")]:[]})}),events:[mi("continuePlayback")]})}),events:(o=n.events)===null||o===void 0?void 0:o.map(function(r){return r.type==="onSuspense"&&r.action.type==="setNextBranch"?tt(tt({},r),{action:tt(tt({},r.action),{args:tt(tt({},r.action.args),{branchId:void 0})})}):r})})},l2=function l2(n){var o=[];if(n.videoId||o.push(sr.NoVideo),n.order!=="end"){var r=!n.events||n.events.some(function(s){return s.type==="onSuspense"&&s.action.type==="setNextBranch"&&!s.action.args.branchId});r&&o.push(sr.NoEOV);var a=n.containers.flatMap(function(s){return s.controls});(!a.length&&r||a.some(function(s){var u;return s.type!=="Text"&&!(!((u=s==null?void 0:s.events)===null||u===void 0)&&u.length)}))&&o.push(sr.NoBranches)}return o},pd=function pd(n){return{id:Ae(),chapterId:n}},mi=function mi(n,o){return{type:"onSuspense",action:{type:n,args:{branchId:o,shouldOpenNow:!0}}}},u2=function u2(n,o){var r=n.containers.reduce(function(u,p){return u+p.controls.filter(function(h){return h.type===o.type}).length},0)+1,a=r%2==0?.5:.05,s=o.layoutParams.y+.17*Math.round(r/2);return tt(tt({},n),{containers:pe(pe([],_n(n.containers),!1),[{id:Ae(),startTime:0,endTime:null,controls:[tt(tt({},o),{layoutParams:tt(tt({},o.layoutParams),{x:a,y:s})})],events:[{type:"onSuspense",action:{type:"continuePlayback",args:{shouldOpenNow:!0}}}],layout:{type:"Relative"},type:"Choice"}],!1)})},d2=function d2(n,o,r){if(!n.containers.find(function(u){return u.id===r}))return n;var a=[],s=n.containers.filter(function(u){var p;return u.id===r&&(u.controls.forEach(function(h){var f;h.id===o&&!((f=h.events)===null||f===void 0)&&f.length&&a.push.apply(a,pe([],_n(h.events.map(function(y){return y.action.args.branchId})),!1))}),!((p=u.events)===null||p===void 0)&&p.length&&a.push.apply(a,pe([],_n(u.events.map(function(h){return h.action.args.branchId})),!1))),u.id!==r});return tt(tt({},n),{containers:s,branches:n.branches.filter(function(u){return!a.includes(u.id)}),events:p2(n.events,!s.length)})},p2=function p2(n,o){o===void 0&&(o=!1);var r=n.find(function(a){return a.type==="onSuspense"&&a.action.type==="setNextBranch"});return o&&!r?[]:n},hd=function hd(n,o,r,a){var s;return tt(tt({},n),r?{containers:n.containers.map(function(u){return tt(tt({},u),{controls:u.controls.map(function(p){return p.id===r?tt(tt({},p),{events:[In("onClick","setNextBranch",o.id)]}):p})})}),branches:pe(pe([],_n(n.branches),!1),[o],!1)}:a?{containers:n.containers.map(function(u){return u.id===a?tt(tt({},u),{events:[mi("setNextBranch",o.id)]}):u}),branches:pe(pe([],_n(n.branches),!1),[o],!1)}:{branches:pe(pe([],_n(n.branches),!1),[o],!1),events:(s=n.events)===null||s===void 0?void 0:s.map(function(u){return u.type==="onSuspense"?tt(tt({},u),{action:tt(tt({},u.action),{args:{branchId:o.id,shouldOpenNow:!0}})}):u})})},Ms=function Ms(n,o){return o.map(function(r){return r.action.args.branchId&&n.includes(r.action.args.branchId)?tt(tt({},r),{action:tt(tt({},r.action),{args:tt(tt({},r.action.args),{branchId:void 0})})}):r})},Is=function Is(n,o){return o.length?tt(tt({},n),{branches:n.branches.filter(function(r){return!o.includes(r.id)}),containers:n.containers.map(function(r){return tt(tt({},r),{controls:r.controls.map(function(a){return tt(tt({},a),{events:Ms(o,a.events)})}),events:Ms(o,r.events)})}),events:Ms(o,n.events)}):n},fd=function fd(n,o){var r,a=n.events||[],s=(r=n.events)===null||r===void 0?void 0:r.find(function(p){return p.type==="onSuspense"}),u=s==null?void 0:s.action.args.branchId;return o&&(a=s?a.map(function(p){return p.type==="onSuspense"?tt(tt({},p),{action:tt(tt({},p.action),{type:o,args:tt(tt({},p.action.args),{branchId:o==="setNextBranch"?p.action.args.branchId:void 0})})}):p}):pe(pe([],_n(a),!1),[{type:"onSuspense",action:{type:o,args:{shouldOpenNow:!0}}}],!1)),tt(tt({},n),{events:a,branches:o!=="setNextBranch"?n.branches.filter(function(p){return p.id!==u}):n.branches})},md=function md(n){if(n.events){var o=n.events.find(function(r){return r.type==="onSuspense"});return o==null?void 0:o.action.type}},vd=function vd(n,o,r){var a=o.events||[],s=vi("onSuspense",o.events),u=s==null?void 0:s.action.args.branchId;r&&(a=s?a.map(function(f){return f.type==="onSuspense"?tt(tt({},f),{action:tt(tt({},f.action),{type:r,args:tt(tt({},f.action.args),{branchId:r==="setNextBranch"?f.action.args.branchId:void 0})})}):f}):pe(pe([],_n(a),!1),[{type:"onSuspense",action:{type:r,args:{shouldOpenNow:!0}}}],!1));var p=r!=="setNextBranch"?n.branches.filter(function(f){return f.id!==u}):n.branches,h=tt(tt({},o),{events:a});return tt(tt({},n),{branches:p,containers:n.containers.map(function(f){return f.id===o.id?h:f})})},yd=function yd(n){return n===void 0&&(n=[]),{edit:{chapters:n},view:{}}},_d=function _d(n,o){var r=function(a,s){var u=typeof Symbol=="function"&&a[Symbol.iterator];if(!u)return a;var p,h,f=u.call(a),y=[];try{for(;(s===void 0||s-- >0)&&!(p=f.next()).done;)y.push(p.value)}catch(_){h={error:_}}finally{try{p&&!p.done&&(u=f.return)&&u.call(f)}finally{if(h)throw h.error}}return y}(o,2);return{id:n,x:r[0],y:r[1]}},Oe=function Oe1(){return Oe=Object.assign||function(n){for(var o,r=1,a=arguments.length;r<a;r++)for(var s in o=arguments[r])Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s]);return n},Oe.apply(this,arguments)},gd=function gd(n,o){var r={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&o.indexOf(a)<0&&(r[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function"){var s=0;for(a=Object.getOwnPropertySymbols(n);s<a.length;s++)o.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(n,a[s])&&(r[a[s]]=n[a[s]])}return r},h2=[{version:"3.0",migrate:function migrate(n){var o,r,a,s,u,p,h,f,y=[];try{for(var _=hi(n.chapters),E=_.next();!E.done;E=_.next()){var T=E.value,C=void 0,R=[];try{for(var O=(a=void 0,hi(T.branches)),D=O.next();!D.done;D=O.next()){var V=D.value,Z=V.isDefault,Y=ld(V,["isDefault"]);Z&&(C=Y.id),R.push(Y)}}catch(Pt){a={error:Pt}}finally{try{D&&!D.done&&(s=O.return)&&s.call(O)}finally{if(a)throw a.error}}var x=void 0,W=[];try{for(var q=(u=void 0,hi(T.containers)),et=q.next();!et.done;et=q.next()){var ct=et.value,ut=ct.fallbackStrategy,Ut=ld(ct,["fallbackStrategy"]);switch(ut){case"await":x=[];break;case"default":x=[{type:"onSuspense",action:{type:"setNextBranch",args:{branchId:C,shouldOpenNow:!0}}}];break;case"weightlessRandom":case"random":x=[{type:"onSuspense",action:{type:"setRandomBranch",args:{shouldOpenNow:!0}}}]}try{for(var xt=(h=void 0,hi(Ut.controls)),ot=xt.next();!ot.done;ot=xt.next()){var It=ot.value;W.push(We(We({},Ut),{controls:[We(We({},It),{events:It.subtype==="Text"||It.events.length?It.events:[In("onClick","continuePlayback")]})],id:Ae(),events:[{type:"onSuspense",action:{type:"continuePlayback",args:{shouldOpenNow:!0}}}]}))}}catch(Pt){h={error:Pt}}finally{try{ot&&!ot.done&&(f=xt.return)&&f.call(xt)}finally{if(h)throw h.error}}}}catch(Pt){u={error:Pt}}finally{try{et&&!et.done&&(p=q.return)&&p.call(q)}finally{if(u)throw u.error}}y.push(We(We({},T),{containers:W,events:x,branches:R}))}}catch(Pt){o={error:Pt}}finally{try{E&&!E.done&&(r=_.return)&&r.call(_)}finally{if(o)throw o.error}}return n.metadata.version="3.1",n.metadata.updated=new Date().toISOString(),We(We({},n),{chapters:y})}},{version:"3.1",migrate:function migrate(n){var o=n.metadata,r=o.media,a=function(s,u){var p={};for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&u.indexOf(h)<0&&(p[h]=s[h]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(h=Object.getOwnPropertySymbols(s);f<h.length;f++)u.indexOf(h[f])<0&&Object.prototype.propertyIsEnumerable.call(s,h[f])&&(p[h[f]]=s[h[f]])}return p}(o,["media"]);if(typeof r=="string")throw new Error("Manifest media should be parsed");return{chapters:n.chapters,metadata:fi(fi({},a),{version:"3.2"}),media:r}}},{version:"3.2",migrate:function migrate(n){var o,r,a=[],s=[],u=function u(f){var y=f.x,_=f.y,E=gd(f,["x","y"]),T=Array.isArray(f.events)&&!f.events.length,C=[],R=E.containers.map(function(O){var D;return Oe(Oe({},O),{events:(T?(D=O.events)===null||D===void 0?void 0:D.map(function(V){return V.type==="onSuspense"?(V.action.args.branchId&&C.push(V.action.args.branchId),mi("expect")):V}):O.events)||[],controls:O.controls.map(function(V){var Z=V.subtype,Y=gd(V,["subtype"]);return Oe(Oe({},Y),{type:Z,events:Y.events||[In("onClick","continuePlayback")]})})})});a.push(Is(Oe(Oe({},E),{containers:R,events:f.events||[]}),C)),s.push({id:E.id,x:y,y:_})};try{for(var p=function(f){var y=typeof Symbol=="function"&&Symbol.iterator,_=y&&f[y],E=0;if(_)return _.call(f);if(f&&typeof f.length=="number")return{next:function next(){return f&&E>=f.length&&(f=void 0),{value:f&&f[E++],done:!f}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")}(n.chapters),h=p.next();!h.done;h=p.next())u(h.value)}catch(f){o={error:f}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(o)throw o.error}}return Oe(Oe({},n),{chapters:a,graph:yd(s),metadata:Oe(Oe({},n.metadata),{version:Kr})})}}],Ns=function Ns(n){return h2.reduce(function(o,r){return o.metadata.version===r.version?r.migrate(o):o},n)},vi=function vi(n,o){return o==null?void 0:o.find(function(r){return r.type===n})},f2=function f2(n,o){return o?o.findIndex(function(r){return r.type===n}):-1},je=function je(n,o){var r,a;o===void 0&&(o=function o(f){return f.id});var s={};try{for(var u=function(f){var y=typeof Symbol=="function"&&Symbol.iterator,_=y&&f[y],E=0;if(_)return _.call(f);if(f&&typeof f.length=="number")return{next:function next(){return f&&E>=f.length&&(f=void 0),{value:f&&f[E++],done:!f}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),p=u.next();!p.done;p=u.next()){var h=p.value;s[o(h)]=h}}catch(f){r={error:f}}finally{try{p&&!p.done&&(a=u.return)&&a.call(u)}finally{if(r)throw r.error}}return s},cr=function cr1(){return cr=Object.assign||function(n){for(var o,r=1,a=arguments.length;r<a;r++)for(var s in o=arguments[r])Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s]);return n},cr.apply(this,arguments)};(function(n){n.Failed="ManifestParsingFailed",n.UnsupportedVersion="ManifestUnsupportedVersion"})(qr||(qr={}));var m2=function m2(n){var o;try{o=JSON.parse(n)}catch(p){throw new Error(qr.Failed)}o.metadata.version!==Kr&&(o=Ns(o));var r=o.chapters,a=o.metadata,s=o.media,u=o.graph;if(!ad.test(a.version))throw new Error(qr.UnsupportedVersion);return{chapters:je(r,function(p){return p.id}),metadata:a,media:s,graph:{edit:cr(cr({},u.edit),{chapters:je(u.edit.chapters,function(p){return p.id})}),view:cr(cr({},u.view),{chapters:u.view.chapters?je(u.view.chapters,function(p){return p.id}):void 0})}}};var Ed={id:"generate_id"},y2=function y2(n){return{id:Ae(),name:"Template",chapterType:n.order,template:JSON.stringify(n.containers,function(o,r){return Ed[o]||r}),type:"container",manifestVersion:Kr}},yi=function yi1(){return yi=Object.assign||function(n){for(var o,r=1,a=arguments.length;r<a;r++)for(var s in o=arguments[r])Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s]);return n},yi.apply(this,arguments)},_2=function _2(n,o){try{var r=JSON.parse(o.template,function(a,s){return Ed[a]&&s==="generate_id"?Ae():s});return yi(yi({},n),{branches:[],containers:r})}catch(a){return console.error("The following template is broken:",o.id),n}},Td=function Td(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},Sd=function Sd(n,o,r){if(r||arguments.length===2)for(var a,s=0,u=o.length;s<u;s++)!a&&s in o||(a||(a=Array.prototype.slice.call(o,0,s)),a[s]=o[s]);return n.concat(a||Array.prototype.slice.call(o))};function Qr(n){var o={};return Object.keys(n).forEach(function(r){(function(a){return a!==null&&(typeof a==="undefined"?"undefined":_type_of(a))=="object"})(n[r])&&(o[r]=Qr(n[r])),n[r]!==null&&(o[r]=n[r])}),o}var Jr=function Jr(n){m.emit("events",{name:"chapterUpdated",context:n})},Ds=function Ds(n){m.emit("actions",{name:"updateChapterOrder",context:n})},bd=function bd(n){m.emit("actions",{name:"deleteChapters",context:n.map(function(o){return{id:o}})})},Cd=function Cd(n){m.emit("events",{name:"chaptersSelected",context:Sd([],Td(n),!1).map(function(o){return{id:o}})})},wd=function wd(n){m.emit("events",{name:"chaptersAdded",context:n.map(function(o){var r=St(o);return{chapter:r.chapter,graphChapter:r.styles}})})},to=function to(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},Ad=function Ad(n,o,r){if(r||arguments.length===2)for(var a,s=0,u=o.length;s<u;s++)!a&&s in o||(a||(a=Array.prototype.slice.call(o,0,s)),a[s]=o[s]);return n.concat(a||Array.prototype.slice.call(o))},g2=function(){function n(){this._renderedNodesData={},this._renderedBranchesData={},this._previousNodesToRenderCount=0}return Object.defineProperty(n.prototype,"previousNodesToRenderCount",{set:function set(o){this._previousNodesToRenderCount=o},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"renderedNodesData",{set:function set(o){this._renderedNodesData=o},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"renderedBranchesData",{get:function get(){return this._renderedBranchesData},set:function set(o){this._renderedBranchesData=o},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasRenderedNodes",{get:function get(){return!!Object.values(this._renderedNodesData).length},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasRenderedBranches",{get:function get(){return!!Object.values(this._renderedBranchesData).length},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldRenderFullLayout",{get:function get(){var o=w.inputs.zoom.zoomFactor>l.performance.renderSkeletonOnZoomLessThan;return this.isPerformanceBoostDisabled()||o},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"visibleMapLayoutCoordinates",{get:function get(){var o=w.dom.getEditorWindowSize(),r=o.width,a=o.height,s=w.inputs.zoom.zoomPosition,u=s.x,p=s.y,h=w.inputs.zoom.zoomFactor;return[[-u/h,-p/h],[(-u+r)/h,(-p+a)/h]]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"branchesToRender",{get:function get(){var o=to(this.visibleMapLayoutCoordinates,2),r=to(o[0],2),a=r[0],s=r[1],u=to(o[1],2),p=u[0],h=u[1];return this.isPerformanceBoostDisabled()?B.manifest.branches:B.manifest.branches.filter(function(f){var y=ur(f.target.chapterId),_=ur(f.source.chapterId);if([y,_].some(function(O){return B.sectors.isNodeVisible(O.id)}))return!0;var E=y.y>h&&_.y>h,T=y.y<s&&_.y<s,C=y.x>p&&_.x>p,R=y.x<a&&_.x<a;return!(E||T||C||R)})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nodesToRender",{get:function get(){var o=B.manifest.nodes;return B.layout.isPerformanceBoostDisabled()?o:o.filter(function(r){return B.sectors.isNodeVisible(r.id)})},enumerable:!1,configurable:!0}),n.prototype.layoutChanged=function(){if(this.isPerformanceBoostDisabled())return!1;var o=B.manifest.nodes.length,r=this._previousNodesToRenderCount,a=l.performance.enableSkeletonsOnNodesCount;return r<a&&o>=a||r>=a&&o<a},n.prototype.isPerformanceBoostDisabled=function(){return B.manifest.nodes.length<l.performance.enableSkeletonsOnNodesCount},n.prototype.getChangedBranches=function(){var o=this.branchesToRender;if(!this.hasRenderedBranches||this.layoutChanged())return{deleted:[],edited:o};var r=Object.values(this._renderedBranchesData);return this.getChangedAfterRenderBranches({renderedBranches:r,branchesToRender:o})},n.prototype.getChangedNodes=function(){if(!this.hasRenderedNodes||this.layoutChanged())return{deletedNodes:[],editedNodes:this.nodesToRender};var o=Object.values(this._renderedNodesData);return this.getChangedAfterRenderNodes({renderedNodes:o,nodesToRender:this.nodesToRender})},n.prototype.getChangedAfterRenderBranches=function(o){var r=o.renderedBranches,a=o.branchesToRender,s=[],u=[],p=je(a);return r.forEach(function(h){var f=p[h.id];f?h.isEqual(f)||u.push(f):s.push(h),delete p[h.id]}),u.push.apply(u,Ad([],to(Object.values(p)),!1)),{deleted:s,edited:u}},n.prototype.getChangedAfterRenderNodes=function(o){var r=o.renderedNodes,a=o.nodesToRender,s=[],u=[],p=je(a);return r.forEach(function(h){var f=p[h.id];f?h.isEqual(f)||u.push(f):s.push(h),delete p[h.id]}),u.push.apply(u,Ad([],to(Object.values(p)),!1)),{deletedNodes:s,editedNodes:u}},n}();var lt,ks={edit:{background:{color:"#0D0F12",grid:{enabled:!0,color:"#474747"}},defaultChapter:{flipTo:{enabled:!0,backgroundColor:"#232324",textColor:"#FFFFFF"},controls:{enabled:!0,backgroundColor:"#232324",textColor:"#FFFFFF"},hover:{enabled:!0,borderColor:"#7B68EE"}},chapters:[]},view:{background:{color:"#0D0F12",grid:{enabled:!1,color:"#474747"}},defaultChapter:{header:{enabled:!0,backgroundColor:"#232324",textColor:"#FFFFFF"},flipTo:{enabled:!1,backgroundColor:"#232324",textColor:"#FFFFFF"},controls:{enabled:!1,backgroundColor:"#232324",textColor:"#FFFFFF"},hover:{enabled:!0,borderColor:"#2688EB"},watchAgain:{enabled:!0,backgroundColor:"#2688EB",textColor:"#FFFFFF"},preview:{visible:!1,backgroundColor:"#19191A",textColor:"#5D5F61"},goBlind:!1}}},_i=function _i(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p};(function(n){n.Flip="flip",n.Action="action",n.Inaction="inaction"})(lt||(lt={}));var T2=function(){function n(o,r,a,s,u){var p=this;this._parentNode=s,this._targetedNode=u,this.updateSourceAbsolutePosition=function(y){var _=_i(y,2),E=_[0],T=_[1];return p.source.position.absolute=[E+p.source.position.relative[0],T+p.source.position.relative[1]],p},this.updateTargetAbsolutePosition=function(y){var _=_i(y,2),E=_[0],T=_[1];return p.target.position.absolute=[E+p.target.position.relative[0],T+p.target.position.relative[1]],p},this.isAssociatedNodeLocked=function(){return!(B.visitedNodes.has(p.source.chapterId)&&B.visitedNodes.has(p.target.chapterId))},this.updateInitialTargetCoordinates=function(){var y=p._targetedNode.getIncomingConnectorsCoordinates()[p.connectorType];return y&&(p.target.position.absolute[1]=p._targetedNode.styles.y+y[1],p.target.position.relative[1]=y[1]),p},this.id=o.id,this.type=r,this.connectorType=a,this.isHidden=this._parentNode.isEndNode();var h=this._parentNode.render.previewMiddleYCoordinate,f=this._targetedNode.render.previewMiddleYCoordinate;this.source={chapterId:this._parentNode.chapter.id,position:{absolute:[this._parentNode.styles.x+this._parentNode.render.width,this._parentNode.styles.y+h],relative:[this._parentNode.render.width,h]}},this.target={chapterId:o.chapterId,position:{absolute:[this._targetedNode.styles.x,this._targetedNode.styles.y+f],relative:[0,f]}},this.updateSourceCoordinates(o)}return n.prototype.isEqual=function(o){var r=this;return["id","type","connectorType","source","target"].every(function(a){return JSON.stringify(r[a])===JSON.stringify(o[a])})},n.prototype.updateSourceCoordinates=function(o){var r,a,s,u;switch(this.type){case lt.Flip:if(l.isEditMode()||l.isViewOrPreViewMode()&&!((r=this._parentNode.stylesWithDefaults.flipTo)===null||r===void 0)&&r.enabled){var p=_i((u=(s=this._parentNode).render.flipToYCoordinate,[s.styles.x+s.render.width+44,s.styles.y+u+l.render.node.componentControlHeight/2]),2),h=p[0],f=p[1];this.source.position.absolute=[h,f],this.source.position.relative=[h-this._parentNode.styles.x,f-this._parentNode.styles.y]}break;case lt.Action:case lt.Inaction:if(l.isEditMode()||l.isViewOrPreViewMode()&&!((a=this._parentNode.stylesWithDefaults.controls)===null||a===void 0)&&a.enabled){var y=_i(function(_,E){var T=_.controls().findIndex(function(O){var D;return(D=O.events)===null||D===void 0?void 0:D.some(function(V){return V.action.args.branchId===E})}),C=T===-1;C&&(T=_.containers().reverse().findIndex(function(O){var D;return(D=O.events)===null||D===void 0?void 0:D.some(function(V){return V.action.args.branchId===E})}));var R=_.render.controlsContainerYCoordinate;return[_.styles.x+_.render.width,_.styles.y+R+l.render.node.componentControlHeight*T+(C?l.render.node.control.inactionLinkY:l.render.node.control.actionLinkY)]}(this._parentNode,o.id),2);h=y[0],f=y[1],this.source.position.absolute=[h,f],this.source.position.relative=[h-this._parentNode.styles.x,f-this._parentNode.styles.y]}}},n}(),S2=ce(996),Vs=ce.n(S2),Od=function Od(n){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&n[o],a=0;if(r)return r.call(n);if(n&&typeof n.length=="number")return{next:function next(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},Ld=function(){function n(o,r){var a,s=this;this.branches=[],this.saveViewChapterDesign=!1,this.parentChaptersConnections=[],this.chapterErrors=[],this.isDragged=!1,this._modified=!1,this.getContainerControls=function(h){var f;return((f=s.chapter.containers.find(function(y){return y.id===h}))===null||f===void 0?void 0:f.controls.filter(function(y){return y.type!=="Text"}))||[]},this.controls=function(){return s.chapter.containers.flatMap(function(h){return h.controls}).reverse().filter(function(h){return h.type!=="Text"})},this.containers=function(){return s.chapter.containers.filter(function(h){return h.controls.some(function(f){return f.type!=="Text"})})},this.hasParentChapters=function(h){return h?s.parentChaptersConnections.some(function(f){return f.type===h}):!!s.parentChaptersConnections.length},this.getParentChaptersByType=function(h){return s.parentChaptersConnections.filter(function(f){return f.type===h})},this.hasBranches=function(h){return h?s.branches.some(function(f){return f.type===h}):!!s.branches.length},this.isConnected=function(){return s.hasParentChapters()||s.hasBranches()||s.chapter.order==="start"},this.isEndNode=function(){return s.chapter.order==="end"},this.hasErrors=function(){return!!s.chapterErrors.length},this.getPolygon=function(){return[[s.styles.x,s.styles.y],[s.styles.x+s.render.width,s.styles.y],[s.styles.x+s.render.width,s.styles.y+s.render.height],[s.styles.x,s.styles.y+s.render.height]]},this.getBBox=function(){return{minX:s.styles.x,minY:s.styles.y,maxX:s.styles.x+s.render.width,maxY:s.styles.y+s.render.height}},this.getCenter=function(){return[s.styles.x+s.render.width/2,s.styles.y+s.render.height/2]},this.updatePosition=function(h,f){return s.styles.x=h,s.styles.y=f,l.isPreViewMode()&&(s.saveViewChapterDesign=!0),s},this.addBranch=function(h,f,y){var _=pd(h);return s.chapter=hd(s.chapter,_,f,y),s},this.deleteBranch=function(h){return s.chapter=Is(s.chapter,[h]),s},this.updateChapterSuspenseAction=function(h){return s.chapter=fd(s.chapter,h),s},this.getIncomingConnectorsCoordinates=function(){return s._incomingConnectorsCoordinates?s._incomingConnectorsCoordinates:s.updateIncomingConnectorsCoordinates()},this.updateIncomingConnectorsCoordinates=function(h){return h===void 0&&(h=null),h&&(s.parentChaptersConnections.find(function(f){return h.type===f.type})||s.parentChaptersConnections.push(h)),s._incomingConnectorsCoordinates=s.getConnectorCoordinatesForBranchTypes(s.getUniqueParentConnectionTypes()),s._incomingConnectorsCoordinates},this.getConnectorCoordinatesForBranchTypes=function(h){var f=h.sort(E2),y=(f.length-1)*l.render.node.connectorPositionDiff/2,_=l.render.node.connectorPositionY-y;return f.reduce(function(E,T,C){return E[T]=[0,_+l.render.node.connectorPositionDiff*C],E},{})},this.id=o.id,this._chapter=o,this.chapterErrors=B.nodesErrors[this.id]||[];var u=(a=r.view.chapters)===null||a===void 0?void 0:a.find(function(h){return h.id===o.id}),p=r.edit.chapters.find(function(h){return h.id===o.id});l.isEditMode()?(this.styles=Qr(p),this._stylesWithDefaults=Vs()(r.edit.defaultChapter,this.styles)):(this.styles=Qr(u||p),this._stylesWithDefaults=Vs()(r.view.defaultChapter,this.styles)),this.saveViewChapterDesign=l.isPreViewMode()&&!!u,this.render=this.getGraphNodeRender()}return Object.defineProperty(n.prototype,"chapter",{get:function get(){return this._chapter},set:function set(o){this.setModified(),this._chapter=o},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"stylesWithDefaults",{get:function get(){return this._stylesWithDefaults},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLocked",{get:function get(){return!!l.isViewOrPreViewMode()&&this.chapter.order!=="start"&&!B.visitedNodes.has(this.id)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"displayLockedContent",{get:function get(){return!l.isViewOrPreViewMode()||this.chapter.order==="start"||!!this.stylesWithDefaults.preview.visible||!this.isLocked},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"modified",{get:function get(){return this._modified},enumerable:!1,configurable:!0}),n.prototype.resetModified=function(){this._modified&&(this._modified=!1)},n.prototype.setModified=function(){this._modified||(this._modified=!0)},n.prototype.getSuspenseActionType=function(){return md(this.chapter)},n.prototype.getSuspenseBranchId=function(){var o,r;return(r=(o=this.chapter.events)===null||o===void 0?void 0:o.find(function(a){return a.type==="onSuspense"}))===null||r===void 0?void 0:r.action.args.branchId},n.prototype.getContainerBranchIds=function(){var o,r,a,s,u=[];try{for(var p=Od(this.containers().reverse()),h=p.next();!h.done;h=p.next()){var f=h.value;try{for(var y=(a=void 0,Od(f.events||[])),_=y.next();!_.done;_=y.next()){var E=_.value;E.type==="onSuspense"&&E.action.args.branchId&&u.push(E.action.args.branchId)}}catch(T){a={error:T}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}}}catch(T){o={error:T}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(o)throw o.error}}return u},n.prototype.updateControlActionEvent=function(o,r,a){return this.chapter=cd(this.chapter,o.id,r.id,a),this},n.prototype.updateContainerSuspenseAction=function(o,r){return this.chapter=vd(this.chapter,o,r),this},n.prototype.isEqual=function(o){var r=this;if(this.modified||o.modified||this.chapter!==o.chapter)return!1;var a=["id","type","connectorType","source","target","isHidden"],s=function s(u){return u.map(function(p){return a.map(function(h){return p[h]}).join()}).join()};return s(o.branches)===s(this.branches)&&["id","parentChaptersConnections","render","isDragged","chapterErrors","videoInfo","saveViewChapterDesign"].every(function(u){return JSON.stringify(o[u])===JSON.stringify(r[u])})},n.prototype.getGraphNodeRender=function(){var o,r,a,s=this.calculateNodeHeight(),u=l.render.node.connectorPositionY,p=l.render.node.heightWithPreview,h=l.render.node.heightWithPreviewEov+l.render.node.componentAddActionHeight+1;return l.isViewOrPreViewMode()&&(!((o=this.stylesWithDefaults.header)===null||o===void 0)&&o.enabled||(u=l.render.node.defaultConnectorPositionY),!((r=this.stylesWithDefaults.flipTo)===null||r===void 0)&&r.enabled&&(p=l.render.node.heightWithPreview),h=!((a=this.stylesWithDefaults.flipTo)===null||a===void 0)&&a.enabled?l.render.node.heightWithPreviewEov+1:p+1),{height:s,width:l.render.node.width,previewMiddleYCoordinate:u,flipToYCoordinate:p,controlsContainerYCoordinate:h}},n.prototype.calculateNodeHeight=function(){var o,r,a,s;return this.chapter.order==="end"?l.isViewOrPreViewMode()&&!(!((o=this.stylesWithDefaults.header)===null||o===void 0)&&o.enabled)?l.render.node.defaultHeight:l.render.node.heightWithPreview:l.isViewOrPreViewMode()?(!((r=this.stylesWithDefaults.header)===null||r===void 0)&&r.enabled?l.render.node.heightWithPreview:l.render.node.defaultHeight)+(!((a=this.stylesWithDefaults.flipTo)===null||a===void 0)&&a.enabled?l.render.node.componentControlHeight:0)+(!((s=this.stylesWithDefaults.controls)===null||s===void 0)&&s.enabled?this.controls().length*l.render.node.componentControlHeight:0):l.render.node.heightFull+this.controls().length*l.render.node.componentControlHeight},n.prototype.getControlTypeLabelTranslation=function(o){switch(o){case"Text":return l.translation.new_text_label;case"Button":return l.translation.new_button_label;case"Area":return l.translation.new_area_label}},n.prototype.getUniqueParentConnectionTypes=function(){return Array.from(new Set(this.parentChaptersConnections.map(function(o){return o.connectorType})))},n}(),Le=function Le1(){return Le=Object.assign||function(n){for(var o,r=1,a=arguments.length;r<a;r++)for(var s in o=arguments[r])Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s]);return n},Le.apply(this,arguments)},Nn=function Nn(n){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&n[o],a=0;if(r)return r.call(n);if(n&&typeof n.length=="number")return{next:function next(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},b2=function(){function n(){var o=this;this._graphDesign=ks,this._nodes={},this._branches={},this.setAllNodesAsModified=function(){o.nodes.forEach(function(r){return r.setModified()})},this.getBranchById=function(r){return o._branches[r]},this.selectBranch=function(r){return o._branches[r]},this.reset=function(){o._metadata=void 0,o._media=void 0,o._videosDict={},o._nodes={},o._branches={},o._graphDesign=ks},this.rebuildNodesAndBranches=function(){o.buildNodesAndBranches()},this.set=function(r){r=Ns(r),o._metadata=r.metadata,o._media=r.media,o._videosDict=je(r.media.videos,function(a){return a.id}),o._chapters=r.chapters,o._graphDesign=Vs()(o._graphDesign,{edit:Qr(r.graph.edit),view:Qr(r.graph.view)}),o.buildNodesAndBranches()},this.save=function(){var r,a;if(o._metadata&&o._media&&o._graphDesign){o._metadata.updated=new Date().toISOString();var s=Object.values(o._nodes),u=[],p=[],h=l.isEditMode()?"edit":"view";try{for(var f=Nn(s),y=f.next();!y.done;y=f.next()){var _=y.value,E=_.chapter,T=_.styles,C=_.saveViewChapterDesign;u.push(E),(h==="view"&&C||h==="edit")&&p.push(T)}}catch(O){r={error:O}}finally{try{y&&!y.done&&(a=f.return)&&a.call(f)}finally{if(r)throw r.error}}var R={chapters:u,metadata:o._metadata,media:o._media,graph:Le(Le({},o._graphDesign),{edit:Le(Le({},o._graphDesign.edit),h==="edit"?{chapters:p}:{}),view:Le(Le({},o._graphDesign.view),h==="view"?{chapters:p}:{})})};m.emit("manifestUpdate",R)}},this.updateBranches=function(){var r,a,s,u,p,h;o._branches={};try{for(var f=Nn(Object.values(o._nodes)),y=f.next();!y.done;y=f.next())(T=y.value).parentChaptersConnections=[]}catch(O){r={error:O}}finally{try{y&&!y.done&&(a=f.return)&&a.call(f)}finally{if(r)throw r.error}}try{for(var _=Nn(Object.values(o._nodes)),E=_.next();!E.done;E=_.next()){var T=E.value;o.buildNodeBranches(T)}}catch(O){s={error:O}}finally{try{E&&!E.done&&(u=_.return)&&u.call(_)}finally{if(s)throw s.error}}try{for(var C=Nn(Object.values(o._branches)),R=C.next();!R.done;R=C.next())R.value.updateInitialTargetCoordinates()}catch(O){p={error:O}}finally{try{R&&!R.done&&(h=C.return)&&h.call(C)}finally{if(p)throw p.error}}return o},this.createNode=function(r,a,s){var u=ud(l.translation.new_chapter_label),p=_d(u.id,r);return o._graphDesign.edit.chapters.push(p),o._nodes[u.id]=new Ld(u,o._graphDesign),s==null||s(u.id),a||wd([u.id]),o},this.setNodeOrder=function(r,a){var s=St(r);return s.chapter.order==="start"&&o._metadata&&(o._metadata.initChapterId=void 0),s.chapter=Le(Le({},s.chapter),{order:a}),o},this.duplicateNode=function(r,a,s){var u=function(C,R){var O=typeof Symbol=="function"&&C[Symbol.iterator];if(!O)return C;var D,V,Z=O.call(C),Y=[];try{for(;(R===void 0||R-- >0)&&!(D=Z.next()).done;)Y.push(D.value)}catch(x){V={error:x}}finally{try{D&&!D.done&&(O=Z.return)&&O.call(Z)}finally{if(V)throw V.error}}return Y}(a,2),p=u[0],h=u[1],f=o._nodes[r],y=f.styles,_=f.chapter,E=dd(_),T=JSON.parse(JSON.stringify(Le(Le({},y),{id:E.id,x:o._nodes[r].styles.x+p,y:o._nodes[r].styles.y+h})));return o._graphDesign.edit.chapters.push(T),o.buildNodeFromChapter(E),s==null||s(E.id),o},this.getManifestBoundingBox=function(){var r,a,s=0,u=0,p=0,h=0;try{for(var f=Nn(Object.values(o._nodes)),y=f.next();!y.done;y=f.next()){var _=y.value.getBBox();s=_.minX<s?_.minX:s,u=_.minY<u?_.minY:u,p=_.maxX>p?_.maxX:p,h=_.maxY>h?_.maxY:h}}catch(E){r={error:E}}finally{try{y&&!y.done&&(a=f.return)&&a.call(f)}finally{if(r)throw r.error}}return{minX:s,minY:u,maxX:p,maxY:h}}}return Object.defineProperty(n.prototype,"metadata",{get:function get(){return this._metadata},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nodesDict",{get:function get(){return this._nodes},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"branchesDict",{get:function get(){return this._branches},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nodes",{get:function get(){var o=this;return l.isViewMode()?Object.values(this._nodes).filter(function(r){return!(r.isLocked&&o.styles.defaultChapter.goBlind)}):Object.values(this._nodes)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"styles",{get:function get(){var o=l.isEditMode()?"edit":"view";return this._graphDesign[o]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"branches",{get:function get(){if(l.isViewOrPreViewMode()){var o=!!l.isViewMode()&&this.styles.defaultChapter.goBlind;return Object.values(this._branches).filter(function(r){return!(r.isHidden||r.isAssociatedNodeLocked()&&o)})}return Object.values(this._branches).filter(function(r){return!r.isHidden})},enumerable:!1,configurable:!0}),n.prototype.deleteGraphBranches=function(o){var r,a,s,u;return(a=(r=this._graphDesign)===null||r===void 0?void 0:r.edit.branches)===null||a===void 0||a.filter(function(p){return!o.includes(p.id)}),(u=(s=this._graphDesign)===null||s===void 0?void 0:s.view.branches)===null||u===void 0||u.filter(function(p){return!o.includes(p.id)}),this},n.prototype.buildNodesAndBranches=function(){var o,r;if(this._chapters){try{for(var a=Nn(this._chapters),s=a.next();!s.done;s=a.next()){var u=s.value;this.buildNodeFromChapter(u)}}catch(p){o={error:p}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}this.updateBranches()}},n.prototype.buildNodeBranches=function(o){var r,a,s,u,p=[];o.branches=[];var h=function h(T){var C=Zt(T.chapterId);if(!C)return f.showErrorMessage(l.translation.popup_error_message_1),{value:void 0};var R,O=void 0;if(O=R=o.getSuspenseBranchId()===T.id?lt.Flip:o.getContainerBranchIds().includes(T.id)?lt.Inaction:lt.Action,l.isViewOrPreViewMode()&&(R===lt.Flip&&!(!((s=o.stylesWithDefaults.flipTo)===null||s===void 0)&&s.enabled)||!(!((u=o.stylesWithDefaults.controls)===null||u===void 0)&&u.enabled))){if(O=lt.Flip,p.find(function(V){return V.connectorType===lt.Flip&&V.targetNodeId===C.id}))return"continue";p.push({connectorType:lt.Flip,targetNodeId:C.id})}var D=new T2(T,R,O,o,C);if(f._branches[T.id]=D,o.branches.push(D),f._branches[T.id].isHidden)return{value:void 0};f._nodes[T.chapterId].parentChaptersConnections.push({chapterId:o.id,type:D.type,connectorType:D.connectorType,branchId:D.id})},f=this;try{for(var y=Nn(o.chapter.branches),_=y.next();!_.done;_=y.next()){var E=h(_.value);if((typeof E==="undefined"?"undefined":_type_of(E))=="object")return E.value}}catch(T){r={error:T}}finally{try{_&&!_.done&&(a=y.return)&&a.call(y)}finally{if(r)throw r.error}}},n.prototype.buildNodeFromChapter=function(o){var r;if(this._videosDict&&(this._nodes[o.id]=new Ld(o,this._graphDesign),o.videoId)){var a=this._videosDict[o.videoId];if(!a)return void console.warn("videoId ".concat(o.videoId," for chapter ").concat(o.id," not found}"));var s=B.videosInfo[a.id];this._nodes[o.id].videoInfo={id:(s==null?void 0:s.id)||a.id,cover:(s==null?void 0:s.cover)||((r=a.variants.find(function(u){return u.cover}))===null||r===void 0?void 0:r.cover)||"",title:(s==null?void 0:s.title)||a.title}}},n.prototype.showErrorMessage=function(o){w.popups.show(o,l.translation.popup_error_title),this.reset()},n}(),Bs=[[0,0],[0,0]],Us=function Us(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},rn=function rn(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},gi=function gi(n,o,r){if(r||arguments.length===2)for(var a,s=0,u=o.length;s<u;s++)!a&&s in o||(a||(a=Array.prototype.slice.call(o,0,s)),a[s]=o[s]);return n.concat(a||Array.prototype.slice.call(o))},C2=function(){function n(){this._sectors={},this.sectorsByNodes={},this.sectorsByCoordinates={},this.prevNodesMapCoordinates=Bs,this._hasHiddenSectors=!1}return Object.defineProperty(n.prototype,"sectors",{get:function get(){return Object.values(this._sectors)},set:function set(o){this._sectors=je(o)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasHiddenSectors",{get:function get(){return this._hasHiddenSectors},enumerable:!1,configurable:!0}),n.prototype.updateSectors=function(o,r){var a=this;if(r===void 0&&(r=B.manifest.nodes),!B.layout.isPerformanceBoostDisabled()){this._hasHiddenSectors=!1;var s=this.getNodesMapCoordinates();(this.sectors.length===0||this.nodesMapSizeChanged())&&(this.initSectors(),this.prevNodesMapCoordinates=s);var u=r.map(function(p){return p.id});this.seedSectorsWithNodes(u),this.sectors.forEach(function(p){var h,f,y,_,E,T,C,R,O,D,V,Z,Y,x,W,q,et,ct,ut,Ut=(f=o,y=s,_=(h=p).size,E=h.indexes,T=Us(y,1),C=Us(T[0],2),R=C[0],O=C[1],D=Us(E,2),V=D[0],Z=D[1],Y=l.performance.sectorsVirtualBorderWidth,x=[(V-Y)*_,(V+Y)*_+_].map(function(xt){return(xt+R)*f.scale+f.transformX}),W=[(Z-Y)*_,(Z+Y)*_+_].map(function(xt){return(xt+O)*f.scale+f.transformY}),q=x.some(function(xt){return xt>=0&&xt<=f.viewWidth}),et=x[0]<0&&x[1]>f.viewWidth,ct=W.some(function(xt){return xt>=0&&xt<=f.viewHeight}),ut=W[0]<0&&W[1]>f.viewHeight,(q||et)&&(ct||ut));p.visible=Ut,a._hasHiddenSectors||Ut||(a._hasHiddenSectors=!0)})}},n.prototype.isNodeVisible=function(o){var r=this.sectorsByNodes[o];return this._sectors[r].visible},n.prototype.getNodesMapCoordinates=function(){if(B.manifest.nodes.length===0)return Bs;var o=[],r=[];return B.manifest.nodes.forEach(function(a){o.push(a.styles.x),r.push(a.styles.y)}),[[Math.min.apply(Math,gi([],rn(o),!1)),Math.min.apply(Math,gi([],rn(r),!1))],[Math.max.apply(Math,gi([],rn(o),!1)),Math.max.apply(Math,gi([],rn(r),!1))]]},n.prototype.initSectors=function(){var o=this;this.reset();var r={},a=this.getLayoutInfo(),s=a.sectorWidth,u=a.sectorsInRow,p=a.sectorsCount;this.sectors=new Array(p).fill(null).map(function(h,f){var y=o.createSector(f,s,u);return r[y.indexes.join()]=y.id,y}),this.sectorsByCoordinates=r},n.prototype.reset=function(){this.sectors=[],this.sectorsByCoordinates={},this.sectorsByNodes={},this.prevNodesMapCoordinates=Bs},n.prototype.seedSectorsWithNodes=function(o){var r=this;this.sectors.forEach(function(f){return f.nodes=new Set}),this.sectorsByNodes={};var a=this.getLayoutInfo().sectorWidth,s=rn(this.getNodesMapCoordinates(),1),u=rn(s[0],2),p=u[0],h=u[1];o.forEach(function(f){var y=St(f),_=Math.floor((y.styles.x-p)/a),E=Math.floor((y.styles.y-h)/a),T=r.sectorsByCoordinates[[_,E].join()];if(!T)throw new Error("No sector with coordinates ".concat([_,E]));r.sectorsByNodes[f]=T,r._sectors[T].nodes.add(f)})},n.prototype.nodesMapSizeChanged=function(){return!!this.prevNodesMapCoordinates&&this.prevNodesMapCoordinates.join()!==this.getNodesMapCoordinates().join()},n.prototype.getLayoutInfo=function(){var o=this.getNodesMapCoordinates(),r=rn(o,2),a=rn(r[0],2),s=a[0],u=a[1],p=rn(r[1],2),h=p[0],f=p[1],y=Math.abs(h-s),_=Math.abs(f-u),E=Math.ceil(Math.sqrt(y*_/l.performance.sectorsCount)),T=Math.max(E,l.performance.minSectorWidthInPixels),C=Math.ceil(y/T);return{sectorsInRow:C,sectorWidth:T,sectorsCount:Math.ceil(_/T)*C}},n.prototype.createSector=function(o,r,a){return{indexes:[o%a,Math.floor(o/a)],size:r,nodes:new Set,visible:!1,id:"".concat(o)}},n}(),Zt=function Zt(n){if(n)return B.manifest.nodesDict[n]},St=function St(n){var o=Zt(n);if(!o)throw new Error("Can't get node with id=".concat(n));return o},w2=new Set,lr=function lr(n){var o=function(r){if(r)return B.manifest.branchesDict[r]}(n);if(!o)throw new Error("Can't get branch with id=".concat(n));return o},ur=function ur(n){var o=Zt(n);if(!o)throw new Error("Can't get node with id=".concat(n));return o.styles},A2=function A2(){var n=new Set;return B.manifest.nodes.forEach(function(o){return n.add(o.chapter.label)}),n},js=function js1(){return js=Object.assign||function(n){for(var o,r=1,a=arguments.length;r<a;r++)for(var s in o=arguments[r])Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s]);return n},js.apply(this,arguments)},eo=function eo(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},Ei=function Ei(n,o,r){if(r||arguments.length===2)for(var a,s=0,u=o.length;s<u;s++)!a&&s in o||(a||(a=Array.prototype.slice.call(o,0,s)),a[s]=o[s]);return n.concat(a||Array.prototype.slice.call(o))},xd=function xd(n){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&n[o],a=0;if(r)return r.call(n);if(n&&typeof n.length=="number")return{next:function next(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},O2=function(){function n(){var o=this;this.zoomFactor=1,this.isGraphFrozen=!1,this.selectedNodes=new Set,this.selectedBranches=new Set,this.copiedNodes=new Set,this.visitedNodes=new Set,this.hoveredNodes=new Set,this.nodesErrors={},this.videosInfo={},this.chaptersTags={},this.updateVideosInfo=function(r){o.videosInfo=je(r,function(a){return a.id})},this.selectNodes=function(r,a){a===void 0&&(a=!0);var s,u,p=new Set(r);s=o.selectedNodes,u=p,(s.size!==u.size||!Sd([],Td(s),!1).every(function(h){return u.has(h)}))&&(o.selectedNodes=p,a&&Cd(Ei([],eo(r),!1)))},this.clearSelectedNodes=function(r){r===void 0&&(r=!0),r&&o.selectedNodes.size&&Cd([]),o.selectedNodes.clear()},this.addNodesToHovered=function(r){r.forEach(function(a){return o.hoveredNodes.add(a)})},this.removeNodesFromHovered=function(r){r.forEach(function(a){return o.hoveredNodes.delete(a)})},this.clearHoveredNodes=function(){o.hoveredNodes.clear()},this.selectBranches=function(r){o.selectedBranches=new Set(r),m.emit("selectBranches",Ei([],eo(o.selectedBranches),!1))},this.clearSelectedBranches=function(){o.selectedBranches.clear(),m.emit("selectBranches",[])},this.copySelectedNodes=function(){o.setCopiedNodes(Ei([],eo(o.selectedNodes),!1))},this.setCopiedNodes=function(r){o.selectedNodes.size&&(o.copiedNodes=new Set(r),o.copiedNodes.size===1?m.emit("notification",{id:"copy_chapter",defaultTranslation:l.translation.copy_chapter}):m.emit("notification",{id:"copy_multiple_chapters",defaultTranslation:l.translation.copy_multiple_chapters}))},this.pasteNodes=function(r){var a,s;if(o.copiedNodes.size){var u=l.render.tool.copyPasteDx,p=l.render.tool.copyPasteDy;if(r){var h=eo(o.copiedNodes,1)[0],f=ur(h);u=r[0]-f.x,p=r[1]-f.y}var y=[],_={},E=function E(R){o.manifest.duplicateNode(R,[u,p],function(O){y.push(O),_[R]=O})};try{for(var T=xd(o.copiedNodes),C=T.next();!C.done;C=T.next())E(C.value)}catch(R){a={error:R}}finally{try{C&&!C.done&&(s=T.return)&&s.call(T)}finally{if(a)throw a.error}}o.copyNodeBranches(_),wd(y),o.manifest.updateBranches(),w.layers.update(),w.layers.updateSelected(y)}},this.deleteSelection=function(r){var a,s,u,p,h;if(o.selectedBranches.size){try{for(var f=xd(o.selectedBranches),y=f.next();!y.done;y=f.next()){var _=y.value,E=o.manifest.selectBranch(_);(u=Zt(E.source.chapterId))===null||u===void 0||u.deleteBranch(E.id),(p=St(E.target.chapterId))===null||p===void 0||p.setModified()}}catch(T){a={error:T}}finally{try{y&&!y.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}o.clearSelectedBranches(),o.manifest.deleteGraphBranches(Array.from(o.selectedBranches)).updateBranches().save(),r==null||r()}o.selectedNodes.size&&(!((h=o.manifest.metadata)===null||h===void 0)&&h.initChapterId&&o.selectedNodes.has(o.manifest.metadata.initChapterId)?m.emit("notification",{id:"remove_init_chapter",defaultTranslation:l.translation.remove_initial_chapter}):bd(Ei([],eo(o.selectedNodes),!1)),r==null||r())},this.setVisitedNodes=function(r){o.visitedNodes=new Set(r)},this.updatedSelectedBranches=function(){o.selectedBranches.forEach(function(r){o.manifest.branchesDict[r]||o.selectedBranches.delete(r)})},this.clearSelection=function(){o.clearSelectedNodes(),o.clearSelectedBranches()},this.reset=function(){o.manifest.reset(),o.clearSelectedNodes(!1)},this.manifest=new b2,this.sectors=new C2,this.layout=new g2,this.reset()}return Object.defineProperty(n.prototype,"nodesWithErrors",{get:function get(){return Object.keys(this.nodesErrors).map(St)},enumerable:!1,configurable:!0}),n.prototype.setNodeErrors=function(o){Object.keys(this.nodesErrors).filter(function(r){return!o[r]}).forEach(function(r){var a=St(r);a.chapterErrors=[],a.setModified()}),Object.keys(o).forEach(function(r){var a=St(r);a.chapterErrors=o[r],a.setModified()}),this.nodesErrors=js({},o)},n.prototype.getCopiedBranchControlId=function(o,r){if(o.type===lt.Action){var a=St(o.source.chapterId).chapter.containers.flatMap(function(s){return s.controls}).findIndex(function(s){return s.events.find(function(u){var p;return((p=u.action.args)===null||p===void 0?void 0:p.branchId)===o.id})});return r.chapter.containers.flatMap(function(s){return s.controls})[a].id}},n.prototype.getCopiedBranchContainerId=function(o,r){if(o.type===lt.Inaction){var a=St(o.source.chapterId).chapter.containers.findIndex(function(s){return s.events.find(function(u){var p;return((p=u.action.args)===null||p===void 0?void 0:p.branchId)===o.id})});return r.chapter.containers[a].id}},n.prototype.copyNodeBranches=function(o){var r=this;Object.keys(o).map(St).forEach(function(a){var s=a.branches.filter(function(h){return o[h.target.chapterId]}),u=o[a.id],p=St(u);s.forEach(function(h){var f=o[h.target.chapterId],y=r.getCopiedBranchControlId(h,p),_=r.getCopiedBranchContainerId(h,p);p.addBranch(f,y,_)})})},n}();var B=new O2;var he,L2=function(){function n(o){var r=this;this.dispose=function(){r._root.selectAll("*").remove(),r._root.remove()},this.getRelativeEventCoordinates=function(a,s){return de(a,s||r._map.node())},this.getEditorWindowSize=function(){var a,s=(a=r._root.node())===null||a===void 0?void 0:a.getBoundingClientRect();return{width:(s==null?void 0:s.width)||0,height:(s==null?void 0:s.height)||0}},this.updateEditorBackgroundColor=function(){r._root.style("background-color",B.manifest.styles.background.color)},this._root=_t(o).append("div").attr("id","movika-graph-editor").style("position","relative").style("width","100%").style("height","100%").style("padding",0).style("margin",0).on("contextmenu",function(a){a.preventDefault()}),this.initStyles(),this._svg=this._root.append("svg").style("width","100%").style("height","100%"),this._grid=this._svg.append("g").attr("id","grid-group"),this._map=this._svg.append("g").attr("id","map-group").attr("transform","translate(0, 0) scale(1)").style("will-change","transform"),this._staticTools=this._svg.append("g").attr("id","static-tools-group"),this._defs=this._svg.append("defs"),m.on("zoom",function(a){var s=Math.round(a.x),u=Math.round(a.y),p=a.value;r._map.attr("transform","translate(".concat(s,", ").concat(u,") scale(").concat(p,")"))})}return Object.defineProperty(n.prototype,"root",{get:function get(){return this._root},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"svg",{get:function get(){return this._svg},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"grid",{get:function get(){return this._grid},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"map",{get:function get(){return this._map},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"staticTools",{get:function get(){return this._staticTools},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"defs",{get:function get(){return this._defs},enumerable:!1,configurable:!0}),n.prototype.select=function(o){return this._root.select(o)},n.prototype.selectAll=function(o){return this._root.selectAll(o)},Object.defineProperty(n.prototype,"viewPosition",{get:function get(){var o=this.getEditorWindowSize();return{scale:w.inputs.zoom.zoomFactor,viewWidth:o.width,viewHeight:o.height,transformY:w.inputs.zoom.zoomPosition.y,transformX:w.inputs.zoom.zoomPosition.x}},enumerable:!1,configurable:!0}),n.prototype.getClientCenterCoordinates=function(){var o=this.viewPosition,r=o.viewWidth,a=o.viewHeight,s=o.scale,u=o.transformY;return[(r/2-o.transformX)/s,(a/2-u)/s]},n.prototype.initStyles=function(){this._root.append("style").html("\n #movika-graph-editor {\n background-color: ".concat(B.manifest.styles.background.color,";\n font-family: inherit;\n font-size: 12px;\n }\n\n #movika-graph-editor * { box-sizing: border-box; }\n\n #movika-graph-editor.zoom_hand_tool { cursor: grab; }\n\n #movika-graph-editor.zoom_hand_tool_active { cursor: grabbing; }\n\n #movika-graph-editor.zoom_hand_tool #map-group,\n #movika-graph-editor.zoom_hand_tool_active #map-group { pointer-events: none; }\n\n #movika-graph-editor svg { user-select: none; -webkit-user-select: none; }\n\n #movika-graph-editor svg text, #movika-graph-editor svg div { pointer-events: none; }\n\n .mge-editorPopup {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n font-size: 11px;\n line-height: 16px;\n background-color: ").concat(l.render.color.tooltipBackground,";\n color: ").concat(l.render.color.text,';\n border-radius: 4px;\n padding: 8px 12px;\n position: absolute;\n will-change: transform;\n color: #F2F5FF;\n font-weight: 400;\n h5 {\n margin-top: 12px;\n font-size: 12px;\n margin-bottom: 2px;\n font-weight: 800;\n }\n h5:first-child {\n margin-top: 0;\n }\n }\n\n .mge-editorPopup.arrow-down::after {\n content: "";\n position: absolute;\n width: 11px;\n height: 11px;\n border-radius: 30px 0 8px 0;\n background: #282A2E;\n transform: translateX(-50%) translateY(-50%) rotate(45deg);\n bottom: -11px;\n left: 50%;\n box-shadow: 0px 4px 4px 0px #00000040;\n }\n\n .mge-editorPopup.arrow-right::after {\n content: "";\n position: absolute;\n width: 10px;\n height: 10px;\n background: #282A2E;\n transform: translateX(-50%) translateY(-50%) rotate(45deg);\n top: 50%;\n right: -10px;\n }\n\n #movika-graph-editor .mge-legend {\n display: flex;\n align-items: center;\n background-color: rgba(17, 17, 17, 0.8);\n border-radius: 8px;\n padding: 2px 4px;\n color: #FFFFFF;\n font-weight: 400;\n text-shadow: 0px 0px 4px rgba(21, 18, 49, 0.23);\n position: absolute;\n top: calc(10px + env(safe-area-inset-top));\n user-select: none;\n pointer-events: none;\n }\n #movika-graph-editor .mge-legend.mge-graph { left: 10px; }\n #movika-graph-editor .mge-legend.mge-navigation { right: 10px; }\n #movika-graph-editor .mge-legend.mge-navigation .mge-icon {\n width: 28px;\n height: 28px;\n }\n #movika-graph-editor .mge-legendItem {\n display: flex;\n align-items: center;\n position: relative;\n height: 36px;\n padding: 8px;\n }\n #movika-graph-editor .mge-legendItem:not(:last-child) { margin-right: 12px; }\n #movika-graph-editor .mge-legendItem:not(:last-child)::after {\n content: "•";\n color: rgba(255, 255, 255, 0.4);\n position: absolute;\n right: -8px;\n top: 10px;\n }\n #movika-graph-editor .mge-legendItem .mge-icon {\n color: #FFFFFF;\n width: 20px;\n height: 20px;\n margin-right: 8px;\n }\n #movika-graph-editor .mge-legendItem .mge-icon.withBg {\n color: #222222;\n background-color: #FFFFFF;\n border-radius: 50%;\n padding: 4px;\n }\n #movika-graph-editor .mge-text {\n font-size: 12px;\n font-weight: 500;\n color: rgb(255, 255, 255);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n #movika-graph-editor .mge-legendItem .mge-icon svg { display: inline-block; }\n @media screen and (max-device-width: 600px) and (orientation: portrait) {\n #movika-graph-editor .mge-legend.mge-navigation { display: none; }\n }\n @media screen and (max-device-width: 900px) and (orientation: landscape) {\n #movika-graph-editor .mge-legend.mge-navigation { display: none; }\n }\n '))},n}(),Fs=l.render.grid.size*l.render.grid.steps,Hs=[{id:"grid",numberOfCells:1,strokeWidth:.2,fillOpacity:1},{id:"inner_grid",numberOfCells:l.render.grid.steps,strokeWidth:.2,fillOpacity:.8}],x2=function(){function n(o){var r=this;this._gridDomElement=o,this._zoom={value:1,x:0,y:0},this._displayGrid=B.manifest.styles.background.grid.enabled,this.dispose=function(){r._gridDomElement.selectAll("*").remove()},this.getSnappedCoordinates=function(a){var s=function(h,f){var y=typeof Symbol=="function"&&h[Symbol.iterator];if(!y)return h;var _,E,T=y.call(h),C=[];try{for(;(f===void 0||f-- >0)&&!(_=T.next()).done;)C.push(_.value)}catch(R){E={error:R}}finally{try{_&&!_.done&&(y=T.return)&&y.call(T)}finally{if(E)throw E.error}}return C}(a,2),u=s[0],p=s[1];return[r.getSnappedCoordinateValue(u),r.getSnappedCoordinateValue(p)]},this.getSnappedCoordinateValue=function(a){return w.inputs.keydown.shiftHold&&r._displayGrid?+(Math.floor(a/l.render.grid.size)*l.render.grid.size).toFixed(2):a},this.update=function(){r._displayGrid=B.manifest.styles.background.grid.enabled,r.updateGridVisibility(),r._displayGrid&&r.updateGridColor()},this.renderPatterns(o),this.renderRect(o),this.updateGridColor(),this.updateGridVisibility(),m.on("zoom",function(a){r._zoom=a,r._displayGrid&&r.updateGridSize()})}return n.prototype.updateGridColor=function(){w.dom.select("#grid rect").attr("stroke",B.manifest.styles.background.grid.color),w.dom.select("#inner_grid rect").attr("stroke",B.manifest.styles.background.grid.color)},n.prototype.updateGridSize=function(){var o=this;Hs.forEach(function(r){if(r.id==="inner_grid"){if(o._zoom.value<=.3)return void w.dom.select("#inner_grid_rect").style("display","none");w.dom.select("#inner_grid_rect").style("display",null)}var a=o._zoom.value*Fs/r.numberOfCells;w.dom.select("#".concat(r.id)).attr("x",o._zoom.x%a).attr("y",o._zoom.y%a).attr("width",a).attr("height",a)})},n.prototype.updateGridVisibility=function(){this._displayGrid?(this.updateGridSize(),this._gridDomElement.style("display",null)):this._gridDomElement.style("display","none")},n.prototype.renderPatterns=function(o){o.selectAll("pattern").data(Hs).join("pattern").attr("id",function(r){return r.id}).attr("width",function(r){return Fs/r.numberOfCells}).attr("height",function(r){return Fs/r.numberOfCells}).attr("patternUnits","userSpaceOnUse").append("rect").attr("width","100%").attr("height","100%").attr("stroke-width",function(r){return r.strokeWidth}).attr("fill","none")},n.prototype.renderRect=function(o){Hs.forEach(function(r){o.append("rect").attr("x",0).attr("y",0).attr("id",r.id+"_rect").attr("width","100%").attr("height","100%").attr("fill","url(#".concat(r.id,")")).attr("fill-opacity",r.fillOpacity)})},n}();(function(n){n.C="KeyC",n.V="KeyV",n.G="KeyG",n.H="KeyH",n.Equal="Equal",n.Minus="Minus",n.NumpadAdd="NumpadAdd",n.NumpadSubtract="NumpadSubtract",n.Delete="Delete",n.Backspace="Backspace",n.ShiftLeft="ShiftLeft",n.Space="Space"})(he||(he={}));var Ti,Ot,R2=function(){function n(){var o=this;this._shiftHold=!1,this._spaceHold=!1,this.dispose=function(){document.removeEventListener("keydown",o.shortcutsHandler),document.removeEventListener("keydown",o.holdKeyHandler),document.removeEventListener("keyup",o.holdKeyHandler),window.removeEventListener("blur",o.resetHoldKey)},this.shortcutsHandler=function(r){if(!o.ignoreKeyboardEvent(r)){switch(r.code){case he.Equal:case he.NumpadAdd:o.handleZoomIn();break;case he.Minus:case he.NumpadSubtract:o.handleZoomOut()}if(l.isEditMode()){if(r.repeat)return;if(r.ctrlKey||r.metaKey){if(r.code===he.C)return void o.handleCopy();if(r.code===he.V)return void o.handlePaste()}switch(r.code){case he.Backspace:case he.Delete:o.handleDelete();break;case he.H:w.inputs.zoom.toggleMousedownZoom();break;default:return}}else if(l.isPreViewMode()){if(r.repeat||r.code!==he.H)return;w.inputs.zoom.toggleMousedownZoom()}}},this.holdKeyHandler=function(r){if(!o.ignoreKeyboardEvent(r)&&!r.repeat){var a=r.type==="keydown";switch(r.code){case he.ShiftLeft:o._shiftHold=a;break;case he.Space:o._spaceHold=a,a?w.inputs.zoom.enableMousedownZoom():w.inputs.zoom.disableMousedownZoom();break;default:return}}},this.resetHoldKey=function(){o._shiftHold=!1,o._spaceHold=!1},document.addEventListener("keydown",this.shortcutsHandler),document.addEventListener("keydown",this.holdKeyHandler),document.addEventListener("keyup",this.holdKeyHandler),window.addEventListener("blur",this.resetHoldKey)}return Object.defineProperty(n.prototype,"shiftHold",{get:function get(){return this._shiftHold},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"spaceHold",{get:function get(){return this._spaceHold},enumerable:!1,configurable:!0}),n.prototype.handleCopy=function(){B.copySelectedNodes()},n.prototype.handlePaste=function(){B.pasteNodes()},n.prototype.handleDelete=function(){B.deleteSelection(function(){w.tools.disable()})},n.prototype.handleZoomIn=function(){w.inputs.zoom.update(function(o){return o+.1})},n.prototype.handleZoomOut=function(){w.inputs.zoom.update(function(o){return o-.1})},n.prototype.ignoreKeyboardEvent=function(o){return B.isGraphFrozen||o.defaultPrevented||["INPUT","TEXTAREA"].includes(o.target.nodeName)},n}(),Si=function(){function n(o){this.toolId=o,this.toolElement=gt("svg:g").datum([0,0]).attr("id",o).attr("transform","translate(0, 0)").style("display","none").call(w.inputs.nullableDrag())}return n.prototype.render=function(o){var r=this;o.append(function(){return r.toolElement.node()})},n.prototype.start=function(){w.inputs.zoom.disable(),this.toolElement.style("display","inline")},n.prototype.stop=function(){w.inputs.zoom.enable(),this.toolElement.style("display","none")},n.prototype.clear=function(){this.toolElement.selectAll("*").remove()},n.prototype.position=function(o){var r=function(u,p){var h=typeof Symbol=="function"&&u[Symbol.iterator];if(!h)return u;var f,y,_=h.call(u),E=[];try{for(;(p===void 0||p-- >0)&&!(f=_.next()).done;)E.push(f.value)}catch(T){y={error:T}}finally{try{f&&!f.done&&(h=_.return)&&h.call(_)}finally{if(y)throw y.error}}return E}(o,2),a=r[0],s=r[1];return this.toolElement.datum([a,s]).attr("transform",function(){return"translate(".concat(a,", ").concat(s,")")}),this},n.test=!0,n}(),no=186,$e=12*l.render.grid.size,Rd=function Rd(n){return n.append("path").attr("d",function(){return Ze({x:0,y:0,w:no,h:$e,r:l.render.node.borderRadius})}).attr("width",no).attr("height",$e).attr("stroke-width",l.render.strokeSize).style("stroke-dasharray","3, 3").attr("stroke",l.render.color.shadowNodeStroke).attr("fill",l.render.color.shadowNodeFill)},Md=function Md(n,o,r){return{primaryTextContainer:Id(n,o),secondaryTextContainer:r?Id(n,r,!0):void 0}},Id=function Id(n,o,r){r===void 0&&(r=!1);var a=o.split("\n"),s=n.append("text").style("display",r?"none":"inline").style("fill","#F2F5FF").attr("font-weight",500).attr("y",$e/2.2).attr("transform","translate(".concat(93,")")).attr("text-rendering","optimizeSpeed");return a.forEach(function(u){s.append("tspan").text(u).attr("text-anchor","middle").attr("x",0).attr("dy",17)}),s},Nd=function Nd(n,o){return!(n.minX>o.maxX||n.maxX<o.minX||n.minY>o.maxY||n.maxY<o.minY)},Pd=function Pd(n){return B.manifest.nodes.some(function(o){return Nd(n,o.getBBox())})},ro=function ro(n){var o=typeof n=="string"?n:n.id;return!!B.nodesErrors[o]&&B.nodesErrors[o].length>0},zs=function zs(n,o){return ro(n)?o?l.render.color.activeError:l.render.color.error:n.stylesWithDefaults.hover.borderColor},M2=(Ti=function M2(n,o){return Ti=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(r,a){r.__proto__=a}||function(r,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(r[s]=a[s])},Ti(n,o)},function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=n}Ti(n,o),n.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}),oo=function oo(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},I2=function(n){function o(){var r=n.call(this,"area-select")||this;return r._rectBoundingBox={minX:0,minY:0,maxX:0,maxY:0},r._needForRAF=!0,r._selectedNodeIds=[],r.render=function(a){n.prototype.render.call(r,a),r._rectElement=r.toolElement.append("rect").attr("id","select-area-rect").attr("fill","#7b68ee").attr("fill-opacity","0.05").attr("stroke","#8978F0").attr("stroke-width","0.5").attr("shape-rendering","crispEdges")},r}return M2(o,n),o.prototype.start=function(){var r=this;n.prototype.start.call(this),w.dom.svg.on("mousedown.areaSelect",function(){var a;(a=r._rectElement)===null||a===void 0||a.attr("width",0).attr("height",0)}).on("mousemove.areaSelect",function(a){if(r._needForRAF){r._needForRAF=!1,w.dom.select("#nodes").attr("pointer-events","none"),w.dom.select("#branches").attr("pointer-events","none");var s=oo(r.toolElement.datum(),2),u=s[0],p=s[1],h=oo(de(a),2),f=h[0],y=h[1];r.animationFrame=requestAnimationFrame(function(){var _,E=Math.abs(u-f),T=Math.abs(p-y),C=u<f?0:-E,R=p<y?0:-T;(_=r._rectElement)===null||_===void 0||_.attr("x",C).attr("y",R).attr("width",E).attr("height",T),r._selectedNodeIds=w.inputs.keydown.shiftHold?function(W,q,et){if(et||arguments.length===2)for(var ct,ut=0,Ut=q.length;ut<Ut;ut++)!ct&&ut in q||(ct||(ct=Array.prototype.slice.call(q,0,ut)),ct[ut]=q[ut]);return W.concat(ct||Array.prototype.slice.call(q))}([],oo(B.selectedNodes),!1):[];var O=oo(w.inputs.zoom.getRelativeCoordinates([u,p]),2),D=O[0],V=O[1],Z=oo(w.inputs.zoom.getRelativeCoordinates([f,y]),2),Y=Z[0],x=Z[1];r._rectBoundingBox.minX=Y<D?Y:D,r._rectBoundingBox.maxX=Y<D?D:Y,r._rectBoundingBox.minY=x<V?x:V,r._rectBoundingBox.maxY=x<V?V:x,B.manifest.nodes.forEach(function(W){Nd(r._rectBoundingBox,W.getBBox())&&r._selectedNodeIds.push(W.id)}),w.layers.updateSelected(r._selectedNodeIds),r._needForRAF=!0})}}).on("mouseup.areaSelect",function(){w.layers.updateSelected(r._selectedNodeIds),r.stop()})},o.prototype.data=function(){return this},o.prototype.stop=function(){var r;w.dom.svg.on("mousemove.areaSelect",null).on("mouseup.areaSelect",null),this.animationFrame&&cancelAnimationFrame(this.animationFrame),(r=this._rectElement)===null||r===void 0||r.attr("x",0).attr("y",0).attr("width",0).attr("height",0),this._rectBoundingBox.minX=0,this._rectBoundingBox.maxX=0,this._rectBoundingBox.minY=0,this._rectBoundingBox.maxY=0,this._needForRAF=!0,this._selectedNodeIds.length=0,w.dom.select("#nodes").attr("pointer-events",null),w.dom.select("#branches").attr("pointer-events",null),n.prototype.stop.call(this)},o}(Si),N2=function(){var n=function n1(o,r){return n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=o}n(o,r),o.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),Dd=function Dd(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},io=function(n){function o(){var r=n!==null&&n.apply(this,arguments)||this;return r._numberOfItems=0,r._numberOfSplitters=0,r._isTooltipActive=!1,r.showContextMenu=function(a,s){a.forEach(function(u){u.type==="splitter"?r.addMenuSplitter():r.addMenuItem(u)}),r.createMenu(s)},r}return N2(o,n),o.prototype.start=function(){n.prototype.start.call(this),this._numberOfItems=0,this._numberOfSplitters=0,this.clear()},o.prototype.position=function(r){var a=Dd(r,2),s=a[0],u=a[1],p=this.getSafeMenuToolArea(),h=p.minXPosition,f=p.minYPosition,y=p.horizontal,_=p.vertical,E=y-l.render.tool.menuItemWidth,T=_-l.render.tool.menuItemHeight*this._numberOfItems,C=Math.min(E,Math.max(h,s)),R=Math.min(T,Math.max(f,u));return this.toolElement.datum([s,u]).attr("transform",function(){return"translate(".concat(C,", ").concat(R,")")}),this},o.prototype.addMenuSplitter=function(){var r=l.render.tool.menuItemWidth;this.toolElement.append(function(){return(function(a,s,u){a===void 0&&(a=l.render.node.width),s===void 0&&(s=1),u===void 0&&(u="#35383C");var p=gt("svg:g");return p.append("rect").attr("x",0).attr("y",0).attr("width",a).attr("height",s).attr("fill",u),p})(r).node()}).attr("transform","translate(0, ".concat(this.currentYPosition,")")),this._numberOfSplitters+=1},o.prototype.addMenuItem=function(r){var a=this,s=(function(p){var h=p.label,f=p.icon,y=p.disabled,_=y!==void 0&&y,E=p.width,T=E===void 0?l.render.node.width:E,C=p.height,R=p.onClick,O=p.color,D=O===void 0?l.render.tool.textColor:O,V=_?"#797B82":D,Z=gt("svg:g").on("click",function(){_||R()});return Z.append("rect").attr("x",0).attr("y",0).attr("width",T).attr("height",C||l.render.node.componentControlHeight).attr("fill",_?l.render.color.elementBackgroundAlt:l.render.color.elementBackground).on("mouseenter",function(){_||_t(this).attr("fill",l.render.color.elementBackgroundHover)}).on("mouseleave",function(){_||_t(this).attr("fill",l.render.color.elementBackground)}).style("cursor",_?"not-allowed":"pointer"),f&&Z.append("use").style("color",V).attr("x",8).attr("y",8).attr("href","#"+f),Z.append("text").text(h).attr("x",f?30:8).attr("y",20).attr("font-size",12).attr("font-weight",500).attr("text-anchor","start").style("fill",V).attr("text-rendering","optimizeSpeed"),Z})({label:r.label,icon:r.icon,disabled:r.disabled,color:r.color,width:l.render.tool.menuItemWidth,height:l.render.tool.menuItemHeight,onClick:function onClick(){r.onClick(),a.stop()}}).attr("transform","translate(0, ".concat(this.currentYPosition,")"));if(r.tooltip){var u=r.tooltip;s.on("mouseenter",function(){if(!a._isTooltipActive){a._isTooltipActive=!0;var p=Dd(a.toolElement.datum(),2),h=p[0],f=p[1];w.popups.position([h+l.render.tool.menuItemTooltipOffset,f+a.currentYPosition-10]).show(u,void 0,"tooltip")}}).on("mouseleave",function(){a._isTooltipActive&&(a._isTooltipActive=!1,w.popups.hide())})}this.toolElement.append(function(){return s.node()}),this._numberOfItems+=1},o.prototype.createMenu=function(r){(function(a){var s=a.id,u=a.width,p=a.height,h=a.element,f=a.strokeColor,y=f===void 0?l.render.color.nodeStroke:f,_=a.r,E=_===void 0?l.render.node.borderRadius:_;(function(T){var C=T.id,R=T.width,O=T.height,D=T.element,V=T.strokeColor,Z=T.r;D.append("path").attr("id",ed+C).attr("d",Ze({x:di,y:di,w:R-2*di,h:O-2*di,r:Z-ar})).attr("fill","none").attr("stroke-width",l.render.strokeSize).attr("stroke",V)})({id:s,width:u,height:p,element:h,strokeColor:y,r:E}),rd({id:s,width:u,height:p,element:h,r:E})})({id:this.toolId,width:l.render.tool.menuItemWidth,height:l.render.tool.menuItemHeight*this._numberOfItems,element:this.toolElement,strokeColor:r||l.render.tool.strokeColor,r:l.render.tool.borderRadius})},Object.defineProperty(o.prototype,"currentYPosition",{get:function get(){return l.render.tool.menuItemHeight*this._numberOfItems+this._numberOfSplitters},enumerable:!1,configurable:!0}),o.prototype.getSafeMenuToolArea=function(){var r=w.dom.getEditorWindowSize();return{minXPosition:10,minYPosition:10,horizontal:r.width-10,vertical:r.height-10}},o}(Si),P2=function(){var n=function n1(o,r){return n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=o}n(o,r),o.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),D2=function(n){function o(){return n.call(this,"control-menu")||this}return P2(o,n),o.prototype.start=function(){var r;n.prototype.start.call(this);var a=Zt((r=this._node)===null||r===void 0?void 0:r.id);if(!a||!this._control)throw new Error("[Tool]: ControlMenuTool requires 'GraphNode' and 'Control' data");this.renderMenuItems(a,this._control)},o.prototype.data=function(r,a){return this._node=r,this._control=a,this},o.prototype.renderMenuItems=function(r,a){var s=r.chapter.containers.find(function(u){return!!u.controls.find(function(p){return p.id===a.id})}).id;this.addMenuItem({label:l.translation.tool_menu_item_rename,disabled:l.isPreViewMode(),onClick:function onClick(){m.emit("control",{name:"renameControl",chapterId:r.id,containerId:s,control:a})}}),this.addMenuItem({label:l.translation.tool_menu_item_delete,disabled:l.isPreViewMode(),onClick:function onClick(){m.emit("control",{name:"deleteControl",chapterId:r.id,controlId:a.id,containerId:s})}}),this.createMenu()},o}(io),k2=function(){var n=function n1(o,r){return n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=o}n(o,r),o.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),V2=function(n){function o(){return n.call(this,"control-type-menu")||this}return k2(o,n),o.prototype.start=function(){if(n.prototype.start.call(this),!this._node)throw new Error("[Tool]: ControlTypeMenuTool requires 'GraphNode' data");this.renderMenuItems(this._node)},o.prototype.data=function(r){return this._node=r,this},o.prototype.renderMenuItems=function(r){this.addMenuItem({label:l.translation.tool_menu_item_control_button,icon:v.ActionButton,onClick:function onClick(){m.emit("control",{name:"addControl",type:"Button",nodeId:r.id})}}),this.addMenuItem({label:l.translation.tool_menu_item_control_area,icon:v.ActionArea,onClick:function onClick(){m.emit("control",{name:"addControl",type:"Area",nodeId:r.id})}}),this.createMenu()},o}(io),B2=function(){var n=function n1(o,r){return n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=o}n(o,r),o.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),U2=function(n){function o(){return n.call(this,"editor-context-menu")||this}return B2(o,n),o.prototype.start=function(){n.prototype.start.call(this),this.renderMenuItems()},o.prototype.data=function(){return this},o.prototype.renderMenuItems=function(){var r=this;this.addMenuItem({label:l.translation.tool_menu_item_add_node,disabled:l.isPreViewMode(),onClick:function onClick(){var a=w.inputs.zoom.getRelativeCoordinates(r.toolElement.datum());B.manifest.createNode(a),w.layers.update()}}),this.addMenuItem({label:l.translation.tool_menu_item_copy,disabled:!B.selectedNodes.size||l.isPreViewMode(),onClick:function onClick(){B.copySelectedNodes()}}),this.addMenuItem({label:l.translation.tool_menu_item_paste,disabled:!B.copiedNodes.size||l.isPreViewMode(),onClick:function onClick(){var a=w.inputs.zoom.getRelativeCoordinates(r.toolElement.datum());B.pasteNodes(a)}}),this.addMenuItem({label:l.translation.tool_menu_item_delete,disabled:!B.selectedNodes.size||l.isPreViewMode(),onClick:function onClick(){B.deleteSelection()}}),this.createMenu()},o}(io),j2=function(){var n=function n1(o,r){return n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=o}n(o,r),o.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),F2=function(n){function o(){return n.call(this,"eov-menu")||this}return j2(o,n),o.prototype.start=function(){var r;n.prototype.start.call(this);var a=Zt((r=this._node)===null||r===void 0?void 0:r.id);if(!a)throw new Error("[Tool]: EOVMenuTool requires 'GraphNode' data");this.renderMenuItems(a)},o.prototype.data=function(r){return this._node=r,this},o.prototype.renderMenuItems=function(r){this.addMenuItem({label:l.translation.tool_menu_item_next_node,icon:v.Node,onClick:function onClick(){r.updateChapterSuspenseAction("setNextBranch"),Jr(r.chapter),B.manifest.updateBranches()}});var a=!!r.containers().length;this.addMenuItem({label:l.translation.tool_menu_item_random,icon:v.Random,disabled:!a,tooltip:a?void 0:l.translation.tool_menu_item_random_tooltip,onClick:function onClick(){r.updateChapterSuspenseAction("setRandomBranch"),B.manifest.updateBranches(),Jr(r.chapter)}}),this.createMenu(l.render.color.stroke)},o}(io),H2=function(){var n=function n1(o,r){return n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=o}n(o,r),o.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),kd=function kd(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},Vd=function Vd(n,o,r){if(r||arguments.length===2)for(var a,s=0,u=o.length;s<u;s++)!a&&s in o||(a||(a=Array.prototype.slice.call(o,0,s)),a[s]=o[s]);return n.concat(a||Array.prototype.slice.call(o))},z2=function(n){function o(){return n.call(this,"node-menu")||this}return H2(o,n),o.prototype.start=function(){var r;n.prototype.start.call(this);var a=Zt((r=this._node)===null||r===void 0?void 0:r.id);if(!a)throw new Error("[Tool]: NodeMenuTool requires 'GraphNode' data");this.renderMenuItems(a)},o.prototype.data=function(r){return this._node=r,this},o.prototype.renderMenuItems=function(r){var a,s=Vd([],kd(B.selectedNodes),!1),u=s.map(St),p=(a=B.manifest.metadata)===null||a===void 0?void 0:a.initChapterId,h=u.length>1,f=!!p&&B.selectedNodes.has(p),y=u.some(function(T){return T.chapter.order!=="end"})&&u.every(function(T){return!T.getSuspenseBranchId()&&!T.controls().length&&T.chapter.order!=="start"}),_=u.some(function(T){return T.chapter.order!=="simple"}),E=[{label:l.translation.tool_menu_item_start_preview,icon:v.Play,onClick:function onClick(){m.emit("control",{name:"openPreview",chapterId:r.id})},disabled:h||!r.chapter.videoId},{label:l.translation.tool_menu_item_focus_on_node,icon:v.Arrow,onClick:function onClick(){w.inputs.zoom.enable(),w.inputs.zoom.focusChapter(r.id,1),w.inputs.zoom.disable()}},{label:l.translation.tool_menu_item_replace_video,icon:v.Video,onClick:function onClick(){m.emit("control",{name:"changeVideo",chapterIds:s})}},{type:"splitter"},{label:l.translation.tool_menu_item_rename,icon:v.Pencil,onClick:function onClick(){m.emit("actions",{name:"renameChapters",context:{triggerNodeId:r.id,selectedNodesIds:s}})}},{label:l.translation.tool_menu_item_copy,icon:v.Copy,disabled:l.isPreViewMode(),onClick:function onClick(){B.copySelectedNodes()}},{label:l.translation.tool_menu_item_delete,icon:v.TrashCan,color:"#EC5959",disabled:f,onClick:function onClick(){return bd(Vd([],kd(B.selectedNodes),!1))}},{type:"splitter"},{label:l.translation.tool_menu_item_as_start_node,icon:v.StartNode,disabled:r.chapter.order==="start"||h,onClick:function onClick(){Ds({id:r.chapter.id,order:"start"})}},{label:h?l.translation.tool_menu_items_as_node:l.translation.tool_menu_item_as_node,icon:v.Node,disabled:!_,onClick:function onClick(){var T=u.filter(function(C){return C.chapter.order!=="simple"});T.length===1?Ds({id:r.chapter.id,order:"simple"}):(T.forEach(function(C){return B.manifest.setNodeOrder(C.id,"simple")}),B.manifest.save())}},{label:h?l.translation.tool_menu_items_as_end_node:l.translation.tool_menu_item_as_end_node,icon:v.EndNode,disabled:!y,onClick:function onClick(){u.length===1?Ds({id:r.chapter.id,order:"end"}):(u.forEach(function(T){return B.manifest.setNodeOrder(T.id,"end")}),B.manifest.save())}}];this.showContextMenu(E)},o}(io),G2=function(){var n=function n1(o,r){return n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=o}n(o,r),o.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),Bd=function Bd(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},Ud=$e/3.3,Y2=function(n){function o(){var r=n.call(this,"shadow-node")||this;return r._displayToolError=!1,r.render=function(a){n.prototype.render.call(r,a),r._shadowNode=Rd(r.toolElement),r.toolElement.append("svg").attr("x",83).attr("y",Ud).attr("width",l.render.iconSize+5).attr("height",l.render.iconSize+5).attr("viewBox","0 0 ".concat(l.render.iconSize," ").concat(l.render.iconSize)).append("use").style("color",l.render.tool.textColor).attr("href","#".concat(v.Move));var s=Md(r.toolElement,l.translation.tool_shadow_node_text,l.translation.tool_shadow_node_error),u=s.primaryTextContainer,p=s.secondaryTextContainer;r._primaryText=u,r._secondaryText=p,r.toolElement.on("click",function(h){return h.preventDefault()}).on("contextmenu",function(h){return h.preventDefault()})},r}return G2(o,n),o.prototype.start=function(){n.prototype.start.call(this),this.redraw(),this.enableMouseMove()},o.prototype.data=function(){return this},o.prototype.stop=function(){w.dom.svg.style("cursor",null).on("click.shadowNode",null).on("mousemove.shadowNode",null).on("contextmenu.shadowNode",null),m.emit("control",{name:"addChapterStopped"}),n.prototype.stop.call(this)},o.prototype.enableMouseMove=function(){var r=this;w.dom.svg.style("cursor","none"),w.dom.svg.on("click.shadowNode",function(a){a.preventDefault(),r._displayToolError||(B.manifest.createNode(r.toolElement.datum()),w.layers.update()),r.stop()}).on("mousemove.shadowNode",function(a){var s=Bd(w.dom.getRelativeEventCoordinates(a),2),u=s[0],p=s[1],h=w.grid.getSnappedCoordinates([u-93,p-Ud]);r.toolElement.datum(h).attr("transform",function(){return"translate(".concat(h[0],", ").concat(h[1],")")}),r.redraw()}).on("contextmenu.shadowNode",function(a){a.preventDefault(),r.stop()})},o.prototype.redraw=function(){var r=Pd(this.getShadowNodeBox());this._displayToolError!==r&&(this._displayToolError=r,this.renderToolError())},o.prototype.renderToolError=function(){var r,a,s;(r=this._shadowNode)===null||r===void 0||r.attr("fill",this._displayToolError?l.render.color.error:l.render.color.shadowNodeFill).attr("fill-opacity","0.21").attr("stroke",this._displayToolError?l.render.color.error:l.render.color.shadowNodeStroke).attr("stroke-opacity","0.3"),(a=this._primaryText)===null||a===void 0||a.style("display",this._displayToolError?"none":"inline"),(s=this._secondaryText)===null||s===void 0||s.style("display",this._displayToolError?"inline":"none")},o.prototype.getShadowNodeBox=function(){var r=Bd(this.toolElement.datum(),2),a=r[0],s=r[1];return{minX:a,minY:s,maxX:a+no,maxY:s+$e}},o}(Si),jd="mge-node",Fd="mge-branch",Hd=function Hd(n){return"#node-"+n},bi=function bi(n,o){return"".concat(Hd(n)," .").concat(o)},Xe=function Xe(n){return w.dom.select(Hd(n))},zd=function zd(){return w.dom.selectAll("g.".concat(jd))},Ci=function Ci(n){return w.dom.select(function(o){return"#branch-"+o}(n))},Gs=function Gs(){return w.dom.selectAll("g.".concat(Fd))},Ys=function Ys(n){return w.dom.select("#".concat(l.render.prefix.nodeBorder).concat(n))},Gd=function Gd(n){return w.dom.select(bi(n,"previewControls"))},Yd=function Yd(n,o){var r="nodeConnector";return o===lt.Action?r="nodeActionConnector":o===lt.Inaction&&(r="nodeInactionConnector"),w.dom.select(bi(n,r))},wi=function wi(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},Zd=function Zd(n,o){n.append("rect").attr("fill","transparent").attr("height",o).attr("width",o).attr("x",-o/2).attr("y",-o/2)},Wd=function Wd(n,o){var r=wi(o,2),a=r[0],s=r[1],u=gt("svg:g").attr("id",l.render.prefix.nodeFlipConnector+n.id).attr("class","nodeConnector").style("transform","translate(".concat(a,"px, ").concat(s,"px)")).style("display","inline");return Zd(u,8),u.append("svg:use").attr("href","#".concat(n.displayLockedContent?$t.Connector:$t.ConnectorDisabled)),u.node()},$d=function $d(n,o){if(n.hasParentChapters(lt.Flip)){var r=wi(n.getIncomingConnectorsCoordinates()[lt.Flip]||[0,n.render.previewMiddleYCoordinate],2)[1],a=gt("svg:g").attr("class","nodeConnector").style("transform","translateY(".concat(r,"px)")).style("display",n.hasParentChapters(lt.Flip)?"inline":"none");Zd(a,8),a.append("svg:use").attr("href","#".concat($t.Connector)),o.append(function(){return a.node()})}},Zs=function Zs(n,o){if(n.hasParentChapters(lt.Action)){var r=wi(n.getIncomingConnectorsCoordinates()[lt.Action]||[0,n.render.previewMiddleYCoordinate],2),a=r[0],s=r[1];a-=l.render.node.control.connectorRadius,s-=l.render.node.control.connectorRadius;var u=we(v.Action).attr("transform","translate(".concat(a,", ").concat(s,")")).attr("class","nodeActionConnector");o.append(function(){return u.node()})}},Ws=function Ws(n,o){if(n.hasParentChapters(lt.Inaction)){var r=wi(n.getIncomingConnectorsCoordinates()[lt.Inaction]||[0,n.render.previewMiddleYCoordinate],2),a=r[0],s=r[1];a-=l.render.node.control.connectorRadius,s-=l.render.node.control.connectorRadius;var u=we(v.Inaction).attr("transform","translate(".concat(a,", ").concat(s,")")).attr("class","nodeInactionConnector");o.append(function(){return u.node()})}},Z2=function(){var n=function n1(o,r){return n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=o}n(o,r),o.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),$s=function $s(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},W2=function(n){function o(){var r=n.call(this,"shadow-node-link")||this;return r._displayToolError=!1,r.render=function(a){n.prototype.render.call(r,a),r._shadowNodeContainer=r.toolElement.append("g").style("display","none"),r._shadowNode=Rd(r._shadowNodeContainer);var s=Md(r._shadowNodeContainer,l.translation.tool_shadow_node_link_text,l.translation.tool_shadow_node_error),u=s.primaryTextContainer,p=s.secondaryTextContainer;r._primaryText=u,r._secondaryText=p,r._shadowBranch=r.toolElement.append("path").attr("fill","none").attr("stroke",l.render.color.stroke),r.renderDefaultLine(),r.toolElement.append("rect").attr("fill","transparent").attr("x",-l.render.iconSize/2).attr("y",-l.render.iconSize/2).attr("width",l.render.iconSize).attr("height",l.render.iconSize).style("cursor","pointer"),r.toggleHoverEffects(!0)},r.stop=function(){r.renderDefaultLine(),r._node=void 0,r._parentControl=void 0,r._parentContainer=void 0,r._type=void 0,r.toolElement.call(w.inputs.nullableDrag()),n.prototype.stop.call(r)},r.createSetNextBranchEvent=function(){if(!r._hasSetNextBranchEvent&&r._type!==lt.Flip){if(!r.node)throw new Error("Node doesn't exist");switch(r._type){case lt.Action:r.node.updateControlActionEvent(r._parentContainer,r._parentControl,"setNextBranch");break;case lt.Inaction:r.node.updateContainerSuspenseAction(r._parentContainer,"setNextBranch")}Jr(r.node.chapter)}},r.renderDefaultLine=function(){var a;(a=r._shadowBranch)===null||a===void 0||a.attr("d",Se({source:[0,0],target:[0,0]})).style("marker-start","").style("marker-end","")},r}return Z2(o,n),Object.defineProperty(o.prototype,"node",{get:function get(){var r;return Zt((r=this._node)===null||r===void 0?void 0:r.id)},enumerable:!1,configurable:!0}),o.prototype.start=function(){if(n.prototype.start.call(this),!this.node)throw new Error("[Tool]: ShadowNodeLinkTool requires 'GraphNode' data");this.redraw(this.toolElement.datum()),this.enableDrag(this.node)},o.prototype.data=function(r,a,s,u,p){return p===void 0&&(p=!0),this._node=r,this._parentContainer=s,this._parentControl=u,this._type=a,this._hasSetNextBranchEvent=p,this},o.prototype.enableDrag=function(r){var a,s,u,p=this,h=!1;ys().on("start",function(f){var y;B.selectedNodes.has(r.id)||w.layers.updateSelected([r.id]),w.dom.select("#nodes").attr("pointer-events","none"),w.dom.select("#branches").attr("pointer-events","none"),p._type===lt.Flip?p.updateEOVTool():((y=p._shadowBranch)===null||y===void 0||y.style("marker-start","url(#".concat(g.Connector,")")),p.updateControlTool());var _=w.grid.getSnappedCoordinates(f.subject);s=f.subject[0]-_[0],u=f.subject[1]-_[1],p.toggleHoverEffects(!1)}).on("drag",function(f){var y,_,E;p.toolElement.style("display","inline");var T,C=w.grid.getSnappedCoordinates([f.x-f.subject[0],f.y-f.subject[1]]),R=C[0]-s,O=C[1]-u;if((y=p._shadowBranch)===null||y===void 0||y.attr("d",Se({source:[0,0],target:[R,O]})).style("marker-start","").style("marker-end","url(#".concat(g.Connector,")")),(a=p.pointInsideNodeBBox(w.dom.getRelativeEventCoordinates(f)))&&r.id!==a.id){h=!1,(_=p._shadowNodeContainer)===null||_===void 0||_.style("display","none");var D=Yd(a.id,p._type),V={chapterId:r.id,type:p._type||lt.Flip,connectorType:p._type||lt.Flip,branchId:null};if(a.updateIncomingConnectorsCoordinates(V),!D){var Z=(T=a.id,w.dom.select(bi(T,"nodeTools")));p._type===lt.Action?Zs(a,Z):p._type===lt.Inaction?Ws(a,Z):$d(a,Z)}}else{h=!0,(E=p._shadowNodeContainer)===null||E===void 0||E.attr("transform","translate(".concat(R,", ").concat(O-$e/2,")")).style("display","inline"),p.redraw(w.dom.getRelativeEventCoordinates(f));var Y=$s(w.grid.getSnappedCoordinates(w.dom.getRelativeEventCoordinates(f)),2),x=Y[0],W=Y[1];w.layers.shiftLayersOnDragToEdge([[x,W],[x+no,W+$e]])}}).on("end",function(f){var y;if((y=p._shadowNodeContainer)===null||y===void 0||y.style("display","none"),p._type===lt.Flip?p.updateEOVTool(!1):p.updateControlTool(!1),w.dom.select("#nodes").attr("pointer-events",null),w.dom.select("#branches").attr("pointer-events",null),h)if(p._displayToolError)p.createSetNextBranchEvent();else{var _=$s(w.grid.getSnappedCoordinates(w.dom.getRelativeEventCoordinates(f)),2),E=_[0],T=_[1];B.manifest.createNode([E,w.grid.getSnappedCoordinateValue(T-$e/2)],r.id,function(C){return p.createNodeBranch(C)}).updateBranches().save(),w.layers.update()}else a?(p.createNodeBranch(a.id),a.setModified(),B.manifest.updateBranches().save()):p.createSetNextBranchEvent();h=!1,a=void 0,p.toggleHoverEffects(!0),p.stop()})(this.toolElement)},o.prototype.createNodeBranch=function(r){var a,s,u,p;this._parentControl?(a=this.node)===null||a===void 0||a.addBranch(r,this._type===lt.Action?(s=this._parentControl)===null||s===void 0?void 0:s.id:void 0,this._type===lt.Inaction?(u=this._parentContainer)===null||u===void 0?void 0:u.id:void 0):(p=this.node)===null||p===void 0||p.addBranch(r)},o.prototype.redraw=function(r){var a=Pd(this.getShadowNodeBox(r));this._displayToolError!==a&&(this._displayToolError=a,this.renderToolError())},o.prototype.renderToolError=function(){var r,a,s;(r=this._shadowNode)===null||r===void 0||r.attr("fill",this._displayToolError?l.render.color.error:l.render.color.shadowNodeFill).attr("fill-opacity","0.21").attr("stroke",this._displayToolError?l.render.color.error:l.render.color.shadowNodeStroke).attr("stroke-opacity","0.3"),(a=this._primaryText)===null||a===void 0||a.style("display",this._displayToolError?"none":"inline"),(s=this._secondaryText)===null||s===void 0||s.style("display",this._displayToolError?"inline":"none")},o.prototype.getShadowNodeBox=function(r){var a=$s(r,2),s=a[0],u=a[1];return{minX:s,minY:u-$e/2,maxX:s+no,maxY:u+$e/2}},o.prototype.pointInsideNodeBBox=function(r){var a,s=this;return zd().each(function(u){var p=St(u);a||(a=function(h,f){for(var y,_,E=h.length,T=h[E-1],C=f[0],R=f[1],O=T[0],D=T[1],V=!1,Z=0;Z<E;++Z)y=(T=h[Z])[0],(_=T[1])>R!=D>R&&C<(O-y)*(R-_)/(D-_)+y&&(V=!V),O=y,D=_;return V}(p.getPolygon(),[r[0]+0,r[1]])?p:void 0),a||p.hasParentChapters(s._type)||Yd(p.id,s._type).remove(),w.dom.select(function(h){return"#"+ed+h}(p.id)).attr("stroke",zs(p,!1)).attr("stroke-opacity",1)}),a},o.prototype.updateEOVTool=function(r){r===void 0&&(r=!0),this.node&&!this._parentControl&&w.dom.select("#".concat(l.render.prefix.nodeEOV+this.node.id)).select(".eovTypeLine").style("marker-start","url(#".concat(g.Circle)).style("marker-end",r?"":"url(#".concat(g.Circle))},o.prototype.updateControlTool=function(r){var a,s,u,p;r===void 0&&(r=!0),w.dom.select(".control_add_link_button_".concat((a=this._parentControl)===null||a===void 0?void 0:a.id)).style("display","none"),w.dom.select(".control_link_choice_".concat((s=this._parentContainer)===null||s===void 0?void 0:s.id)).style("display","none");var h=this._type==="action"?(u=this._parentControl)===null||u===void 0?void 0:u.id:(p=this._parentContainer)===null||p===void 0?void 0:p.id;w.dom.select(".control_connector_".concat(h)).style("display",r?"none":"inline"),w.dom.select(".start_link_".concat(h)).style("display","inline")},o.prototype.toggleHoverEffects=function(r){var a=this;r?this.toolElement.on("mouseenter",function(){var s;a.toolElement.style("display","inline"),(s=a._shadowBranch)===null||s===void 0||s.style("marker-start",a._hasSetNextBranchEvent?"url(#".concat(g.Connector,")"):"")}).on("mouseleave",function(){var s;(s=a._shadowBranch)===null||s===void 0||s.style("marker-start",a._hasSetNextBranchEvent?"url(#".concat(g.Circle,")"):"")}):this.toolElement.on("mouseenter",null).on("mouseleave",null)},o}(Si);(function(n){n.ShadowNode="shadow-node",n.ShadowNodeLink="shadow-node-link",n.NodeMenu="node-menu",n.EOVMenu="eov-menu",n.ControlMenu="control-menu",n.ControlTypeMenu="control-type-menu",n.EditorContextMenu="editor-context-menu",n.AreaSelectTool="area-select-tool"})(Ot||(Ot={}));var $2=function(){function n(o){this._svgDOMElement=o,this.handleOutsideClick=function(r){r.defaultPrevented||w.inputs.zoom.isMousedownZoomEnabled||w.tools.disableContextMenu()},this._svgDOMElement.on("contextmenu",function(r){r.defaultPrevented||w.inputs.zoom.isMousedownZoomEnabled||w.tools.use(Ot.EditorContextMenu).position(de(r)).start()}),this._svgDOMElement.on("mousedown",function(r){r.defaultPrevented||w.inputs.zoom.isMousedownZoomEnabled||w.tools.use(Ot.AreaSelectTool).position(de(r)).start()}),this._svgDOMElement.on("click",function(r){r.defaultPrevented||w.inputs.zoom.isMousedownZoomEnabled||(B.selectedBranches.size&&B.clearSelectedBranches(),w.tools.disable())}),document.addEventListener("click",this.handleOutsideClick)}return n.prototype.dispose=function(){this._svgDOMElement.on("contextmenu",null),document.removeEventListener("click",this.handleOutsideClick)},n}(),X2=ce(96),Xd=ce.n(X2),Kd=function Kd(n,o,r,a){return new(r||(r=Promise))(function(s,u){function p(y){try{f(a.next(y))}catch(_){u(_)}}function h(y){try{f(a.throw(y))}catch(_){u(_)}}function f(y){y.done?s(y.value):(function(_){return _instanceof(_,r)?_:new r(function(E){E(_)})})(y.value).then(p,h)}f((a=a.apply(n,o||[])).next())})},qd=function qd(n,o){var r,a,s,u,p={label:0,sent:function sent(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return u={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function h(f){return function(y){return function(_){if(r)throw new TypeError("Generator is already executing.");for(;p;)try{if(r=1,a&&(s=2&_[0]?a.return:_[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,_[1])).done)return s;switch(a=0,s&&(_=[2&_[0],s.value]),_[0]){case 0:case 1:s=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,a=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(!((s=(s=p.trys).length>0&&s[s.length-1])||_[0]!==6&&_[0]!==2)){p=0;continue}if(_[0]===3&&(!s||_[1]>s[0]&&_[1]<s[3])){p.label=_[1];break}if(_[0]===6&&p.label<s[1]){p.label=s[1],s=_;break}if(s&&p.label<s[2]){p.label=s[2],p.ops.push(_);break}s[2]&&p.ops.pop(),p.trys.pop();continue}_=o.call(n,p)}catch(E){_=[6,E],a=0}finally{r=s=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}([f,y])}}},Pn=function Pn(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},Xs=.05,K2=function(){function n(o){var r=this;this._svgDOMElement=o,this._zoomTransform=Mn,this._wheelDelay=300,this._wheel=null,this._mouse=[[0,0],[0,0]],this._mousedownZoomEnabled=!1,this._isZoomActive=!1,this._isZoomDisabled=!1,this.update=function(a){var s;r._isZoomDisabled||(s=Qd(s=typeof a=="function"?a(r._zoomTransform.k):a,r.minZoomFactor),r._zoom.scaleExtent([r.minZoomFactor,2]).scaleTo(r._svgDOMElement,s))},this.focusChapter=function(a,s){s===void 0&&(s=r.zoomConfig.max/2);var u=Zt(a);u&&r.translateToFromCenter(u.getCenter(),s).then(function(){B.layout.isPerformanceBoostDisabled()||(w.layers.clear(),w.layers.update())})},this.translateToFromCenter=function(a,s){var u=Pn(a,2),p=u[0],h=u[1];return s===void 0&&(s=r._zoomTransform.k),Kd(r,void 0,void 0,function(){var f,y,_,E,T;return qd(this,function(C){return this._isZoomDisabled?[2]:(f=this._svgDOMElement.node())?(y=f.getBoundingClientRect(),_=y.width,E=y.height,_&&E?(T=Qd(s,this.minZoomFactor),[2,this._svgDOMElement.transition().duration(750).call(this._zoom.transform,Mn.translate(_/2,E/2).scale(T).translate(-p,-h)).end()]):[2]):[2]})})},this.translateToCoordinates=function(a,s){var u=Pn(a,2),p=u[0],h=u[1];return s===void 0&&(s=r._zoomTransform.k),Kd(r,void 0,void 0,function(){return qd(this,function(f){return this._isZoomDisabled?[2]:[2,this._svgDOMElement.transition().duration(750).call(this._zoom.transform,Mn.translate(p,h).scale(s)).end()]})})},this.shiftTo=function(a){var s=Pn(a,2),u=s[0],p=s[1],h=r.zoomPosition,f=h.x,y=h.y;r._svgDOMElement.call(r._zoom.transform,Mn.translate(f+u,y+p).scale(r._zoomTransform.k))},this.getRelativeCoordinates=function(a,s){return s?r._zoomTransform.apply(a):r._zoomTransform.invert(a)},this.toggleMousedownZoom=function(){r._mousedownZoomEnabled?r.disableMousedownZoom():r.enableMousedownZoom()},this.enableMousedownZoom=function(){r._isZoomDisabled||(r._mousedownZoomEnabled=!0,w.dom.root.attr("class","zoom_hand_tool"))},this.disableMousedownZoom=function(){r._isZoomDisabled||(r._mousedownZoomEnabled=!1,r._isZoomActive||w.dom.root.attr("class",null))},this.enable=function(){r._isZoomDisabled=!1},this.disable=function(){r._isZoomDisabled=!0},this._zoom=(function(){var a,s,u,p=XS,h=KS,f=JS,y=qS,_=QS,E=[0,1/0],T=[[-1/0,-1/0],[1/0,1/0]],C=250,R=WS,O=rs("start","zoom","end"),D=500,V=150,Z=0,Y=10;function x(M){M.property("__zoom",Ju).on("wheel.zoom",xt,{passive:!1}).on("mousedown.zoom",ot).on("dblclick.zoom",It).filter(_).on("touchstart.zoom",Pt).on("touchmove.zoom",Fe).on("touchend.zoom touchcancel.zoom",ae).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function W(M,J){return(J=Math.max(E[0],Math.min(E[1],J)))===M.k?M:new Ue(J,M.x,M.y)}function q(M,J,$){var X=J[0]-$[0]*M.k,nt=J[1]-$[1]*M.k;return X===M.x&&nt===M.y?M:new Ue(M.k,X,nt)}function et(M){return[(+M[0][0]+ +M[1][0])/2,(+M[0][1]+ +M[1][1])/2]}function ct(M,J,$,X){M.on("start.zoom",function(){ut(this,arguments).event(X).start()}).on("interrupt.zoom end.zoom",function(){ut(this,arguments).event(X).end()}).tween("zoom",function(){var nt=this,ht=arguments,yt=ut(nt,ht).event(X),bt=h.apply(nt,ht),ft=$==null?et(bt):typeof $=="function"?$.apply(nt,ht):$,ee=Math.max(bt[1][0]-bt[0][0],bt[1][1]-bt[0][1]),fe=nt.__zoom,xe=typeof J=="function"?J.apply(nt,ht):J,on=R(fe.invert(ft).concat(ee/fe.k),xe.invert(ft).concat(ee/xe.k));return function(be){if(be===1)be=xe;else{var an=on(be),ac=ee/an[2];be=new Ue(ac,ft[0]-an[0]*ac,ft[1]-an[1]*ac)}yt.zoom(null,be)}})}function ut(M,J,$){return!$&&M.__zooming||new Ut(M,J)}function Ut(M,J){this.that=M,this.args=J,this.active=0,this.sourceEvent=null,this.extent=h.apply(M,J),this.taps=0}function xt(M){for(var _len=arguments.length,J=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){J[_key-1]=arguments[_key]}if(p.apply(this,arguments)){var $=ut(this,J).event(M),X=this.__zoom,nt=Math.max(E[0],Math.min(E[1],X.k*Math.pow(2,y.apply(this,arguments)))),ht=de(M);if($.wheel)$.mouse[0][0]===ht[0]&&$.mouse[0][1]===ht[1]||($.mouse[1]=X.invert($.mouse[0]=ht)),clearTimeout($.wheel);else{if(X.k===nt)return;$.mouse=[ht,X.invert(ht)],Gr(this),$.start()}Xr(M),$.wheel=setTimeout(function(){$.wheel=null,$.end()},V),$.zoom("mouse",f(q(W(X,nt),$.mouse[0],$.mouse[1]),$.extent,T))}}function ot(M){for(var _len=arguments.length,J=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){J[_key-1]=arguments[_key]}if(!u&&p.apply(this,arguments)){var $=M.currentTarget,X=ut(this,J,!0).event(M),nt=_t(M.view).on("mousemove.zoom",function(ft){if(Xr(ft),!X.moved){var ee=ft.clientX-yt,fe=ft.clientY-bt;X.moved=ee*ee+fe*fe>Z}X.event(ft).zoom("mouse",f(q(X.that.__zoom,X.mouse[0]=de(ft,$),X.mouse[1]),X.extent,T))},!0).on("mouseup.zoom",function(ft){nt.on("mousemove.zoom mouseup.zoom",null),ku(ft.view,X.moved),Xr(ft),X.event(ft).end()},!0),ht=de(M,$),yt=M.clientX,bt=M.clientY;Du(M.view),xs(M),X.mouse=[ht,this.__zoom.invert(ht)],Gr(this),X.start()}}function It(M){for(var _len=arguments.length,J=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){J[_key-1]=arguments[_key]}if(p.apply(this,arguments)){var $=this.__zoom,X=de(M.changedTouches?M.changedTouches[0]:M,this),nt=$.invert(X),ht=$.k*(M.shiftKey?.5:2),yt=f(q(W($,ht),X,nt),h.apply(this,J),T);Xr(M),C>0?_t(this).transition().duration(C).call(ct,yt,X,M):_t(this).call(x.transform,yt,X,M)}}function Pt(M){for(var _len=arguments.length,J=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){J[_key-1]=arguments[_key]}if(p.apply(this,arguments)){var $,X,nt,ht,yt=M.touches,bt=yt.length,ft=ut(this,J,M.changedTouches.length===bt).event(M);for(xs(M),X=0;X<bt;++X)ht=[ht=de(nt=yt[X],this),this.__zoom.invert(ht),nt.identifier],ft.touch0?ft.touch1||ft.touch0[2]===ht[2]||(ft.touch1=ht,ft.taps=0):(ft.touch0=ht,$=!0,ft.taps=1+!!a);a&&(a=clearTimeout(a)),$&&(ft.taps<2&&(s=ht[0],a=setTimeout(function(){a=null},D)),Gr(this),ft.start())}}function Fe(M){for(var _len=arguments.length,J=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){J[_key-1]=arguments[_key]}if(this.__zooming){var $,X,nt,ht,yt=ut(this,J).event(M),bt=M.changedTouches,ft=bt.length;for(Xr(M),$=0;$<ft;++$)nt=de(X=bt[$],this),yt.touch0&&yt.touch0[2]===X.identifier?yt.touch0[0]=nt:yt.touch1&&yt.touch1[2]===X.identifier&&(yt.touch1[0]=nt);if(X=yt.that.__zoom,yt.touch1){var ee=yt.touch0[0],fe=yt.touch0[1],xe=yt.touch1[0],on=yt.touch1[1],be=(be=xe[0]-ee[0])*be+(be=xe[1]-ee[1])*be,an=(an=on[0]-fe[0])*an+(an=on[1]-fe[1])*an;X=W(X,Math.sqrt(be/an)),nt=[(ee[0]+xe[0])/2,(ee[1]+xe[1])/2],ht=[(fe[0]+on[0])/2,(fe[1]+on[1])/2]}else{if(!yt.touch0)return;nt=yt.touch0[0],ht=yt.touch0[1]}yt.zoom("touch",f(q(X,nt,ht),yt.extent,T))}}function ae(M){for(var _len=arguments.length,J=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){J[_key-1]=arguments[_key]}if(this.__zooming){var $,X,nt=ut(this,J).event(M),ht=M.changedTouches,yt=ht.length;for(xs(M),u&&clearTimeout(u),u=setTimeout(function(){u=null},D),$=0;$<yt;++$)X=ht[$],nt.touch0&&nt.touch0[2]===X.identifier?delete nt.touch0:nt.touch1&&nt.touch1[2]===X.identifier&&delete nt.touch1;if(nt.touch1&&!nt.touch0&&(nt.touch0=nt.touch1,delete nt.touch1),nt.touch0)nt.touch0[1]=this.__zoom.invert(nt.touch0[0]);else if(nt.end(),nt.taps===2&&(X=de(X,this),Math.hypot(s[0]-X[0],s[1]-X[1])<Y)){var bt=_t(this).on("dblclick.zoom");bt&&bt.apply(this,arguments)}}}return x.transform=function(M,J,$,X){var nt=M.selection?M.selection():M;nt.property("__zoom",Ju),M!==nt?ct(M,J,$,X):nt.interrupt().each(function(){ut(this,arguments).event(X).start().zoom(null,typeof J=="function"?J.apply(this,arguments):J).end()})},x.scaleBy=function(M,J,$,X){x.scaleTo(M,function(){return this.__zoom.k*(typeof J=="function"?J.apply(this,arguments):J)},$,X)},x.scaleTo=function(M,J,$,X){x.transform(M,function(){var nt=h.apply(this,arguments),ht=this.__zoom,yt=$==null?et(nt):typeof $=="function"?$.apply(this,arguments):$,bt=ht.invert(yt),ft=typeof J=="function"?J.apply(this,arguments):J;return f(q(W(ht,ft),yt,bt),nt,T)},$,X)},x.translateBy=function(M,J,$,X){x.transform(M,function(){return f(this.__zoom.translate(typeof J=="function"?J.apply(this,arguments):J,typeof $=="function"?$.apply(this,arguments):$),h.apply(this,arguments),T)},null,X)},x.translateTo=function(M,J,$,X,nt){x.transform(M,function(){var ht=h.apply(this,arguments),yt=this.__zoom,bt=X==null?et(ht):typeof X=="function"?X.apply(this,arguments):X;return f(Mn.translate(bt[0],bt[1]).scale(yt.k).translate(typeof J=="function"?-J.apply(this,arguments):-J,typeof $=="function"?-$.apply(this,arguments):-$),ht,T)},X,nt)},Ut.prototype={event:function event(M){return M&&(this.sourceEvent=M),this},start:function start(){return++this.active==1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function zoom(M,J){return this.mouse&&M!=="mouse"&&(this.mouse[1]=J.invert(this.mouse[0])),this.touch0&&M!=="touch"&&(this.touch0[1]=J.invert(this.touch0[0])),this.touch1&&M!=="touch"&&(this.touch1[1]=J.invert(this.touch1[0])),this.that.__zoom=J,this.emit("zoom"),this},end:function end(){return--this.active==0&&(delete this.that.__zooming,this.emit("end")),this},emit:function emit(M){var J=_t(this.that).datum();O.call(M,this.that,new $S(M,{sourceEvent:this.sourceEvent,target:x,type:M,transform:this.that.__zoom,dispatch:O}),J)}},x.wheelDelta=function(M){return arguments.length?(y=typeof M=="function"?M:ui(+M),x):y},x.filter=function(M){return arguments.length?(p=typeof M=="function"?M:ui(!!M),x):p},x.touchable=function(M){return arguments.length?(_=typeof M=="function"?M:ui(!!M),x):_},x.extent=function(M){return arguments.length?(h=typeof M=="function"?M:ui([[+M[0][0],+M[0][1]],[+M[1][0],+M[1][1]]]),x):h},x.scaleExtent=function(M){return arguments.length?(E[0]=+M[0],E[1]=+M[1],x):[E[0],E[1]]},x.translateExtent=function(M){return arguments.length?(T[0][0]=+M[0][0],T[1][0]=+M[1][0],T[0][1]=+M[0][1],T[1][1]=+M[1][1],x):[[T[0][0],T[0][1]],[T[1][0],T[1][1]]]},x.constrain=function(M){return arguments.length?(f=M,x):f},x.duration=function(M){return arguments.length?(C=+M,x):C},x.interpolate=function(M){return arguments.length?(R=M,x):R},x.on=function(){var M=O.on.apply(O,arguments);return M===O?x:M},x.clickDistance=function(M){return arguments.length?(Z=(M=+M)*M,x):Math.sqrt(Z)},x.tapDistance=function(M){return arguments.length?(Y=+M,x):Y},x})().scaleExtent([this.minZoomFactor,2]).clickDistance(50).on("start",function(){r._isZoomActive=!0,r._mousedownZoomEnabled&&w.dom.root.attr("class","zoom_hand_tool_active")}).on("zoom",function(a){var s=a.transform;r._zoomTransform=s,r.zoom(),r.emitZoomEvent(!1)}).on("end",function(){if(r._isZoomActive=!1,r.emitZoomEvent(!0),w.dom.root.attr("class",r._mousedownZoomEnabled?"zoom_hand_tool":null),w.dom.map.attr("pointer-events",null),r.zoomBreakpointPassed()){B.manifest.setAllNodesAsModified();var a=function(s,u,p){if(p||arguments.length===2)for(var h,f=0,y=u.length;f<y;f++)!h&&f in u||(h||(h=Array.prototype.slice.call(u,0,f)),h[f]=u[f]);return s.concat(h||Array.prototype.slice.call(u))}([],Pn(B.selectedNodes),!1);w.layers.clear(),w.layers.update(),B.clearSelectedNodes(!1),w.layers.updateSelected(a)}B.zoomFactor=r.zoomFactor}),l.isEditOrPreViewMode()?(this._zoom.filter(function(a){var s=a.type==="touchstart",u=a.type==="mousedown";return!(r._isZoomDisabled||s&&a.defaultPrevented)&&(u&&a.button===1||s?(w.dom.root.attr("class","zoom_hand_tool_active"),!0):u&&r._mousedownZoomEnabled)}),this._svgDOMElement.call(this._zoom).on("dblclick.zoom",null).on("wheel.zoom",function(a){if(!r._isZoomDisabled){a.preventDefault(),a.stopImmediatePropagation();var s=Math.max(r.minZoomFactor,Math.min(2,r._zoomTransform.k*Math.pow(2,function(p){return-p.deltaY*(p.deltaMode===1?.05:p.deltaMode?1:.002)*(p.ctrlKey||p.metaKey?5:1)}(a)))),u=de(a);r._wheel?(r._mouse[0][0]===u[0]&&r._mouse[0][1]===u[1]||(r._mouse[1]=r._zoomTransform.invert(r._mouse[0]=u)),clearTimeout(r._wheel)):(r._mouse=[u,r._zoomTransform.invert(u)],Gr(r._svgDOMElement.node()),w.dom.map.attr("pointer-events","none")),r._wheel=window.setTimeout(function(){r._wheel=null,r._svgDOMElement.call(r._zoom.transform,Mn.translate(r._zoomTransform.x,r._zoomTransform.y).scale(r._zoomTransform.k))},r._wheelDelay),a.ctrlKey||a.metaKey?r._zoomTransform=Jd(function(p,h,f){return(h=Math.max(f,Math.min(2,h)))===p.k?p:new Ue(h,p.x,p.y)}(r._zoomTransform,s,r.minZoomFactor),r._mouse[0],r._mouse[1]):r._zoomTransform=Jd(r._zoomTransform,[r._mouse[0][0]-a.deltaX,r._mouse[0][1]-a.deltaY],r._mouse[1]),r._mouse[1]=r._zoomTransform.invert(r._mouse[0]),r.zoom()}},{passive:!1})):this._svgDOMElement.call(this._zoom)}return Object.defineProperty(n.prototype,"zoomConfig",{get:function get(){return{min:this.minZoomFactor,max:2,step:+((2-this.minZoomFactor)/100).toFixed(5)}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"zoomFactor",{get:function get(){return this._zoomTransform.k},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isExtraLowZoomRatio",{get:function get(){return this.zoomFactor<Xs},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"minZoomFactor",{get:function get(){var o=Pn(B.sectors.getNodesMapCoordinates(),2),r=Pn(o[0],2),a=r[0],s=r[1],u=Pn(o[1],2),p=u[0],h=u[1],f=w.dom.getEditorWindowSize(),y=f.width,_=f.height,E=120*(p-a)/100,T=120*(h-s)/100;return Math.min(Xs,y/E,_/T)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"zoomPosition",{get:function get(){return{x:this._zoomTransform.x,y:this._zoomTransform.y}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"centeredZoom",{get:function get(){var o=B.manifest.getManifestBoundingBox(),r=w.dom.getEditorWindowSize(),a=(o.maxX+o.minX)/2,s=(o.maxY+o.minY)/2,u=r.width/(o.maxX-o.minX),p=r.height/(o.maxY-o.minY),h=Math.min(Math.min(u,p),1)-.05;return{x:a,y:s,scale:Math.max(this.minZoomFactor,h)}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isMousedownZoomEnabled",{get:function get(){return this._mousedownZoomEnabled},enumerable:!1,configurable:!0}),n.prototype.zoom=function(){m.emit("zoom",{value:this._zoomTransform.k,x:this._zoomTransform.x,y:this._zoomTransform.y})},n.prototype.zoomBreakpointPassed=function(){var o=B.zoomFactor,r=this.zoomFactor;return[l.performance.renderSkeletonOnZoomLessThan,Xs].some(function(a){return!(o===r||o>a&&r>a||o<a&&r<a)})},n.prototype.getCurrentZoomState=function(o){return o===void 0&&(o=!1),{value:this.zoomFactor,x:this.zoomPosition.x,y:this.zoomPosition.y,minZoom:this.minZoomFactor,maxZoom:2,fullGraphZoom:this.centeredZoom.scale,isZoomFinished:o,clientRectCenterCoordinates:w.dom.getClientCenterCoordinates()}},n.prototype.emitZoomEvent=function(o){var r=this;o===void 0&&(o=!1),Xd()(function(){m.emit("events",{name:"zoom",context:r.getCurrentZoomState(o)})},1e3/30)()},n}();var q2=function(){function n(o){var r=this;this.dispose=function(){var a,s;(a=r._keydownEvents)===null||a===void 0||a.dispose(),(s=r._mouseEvents)===null||s===void 0||s.dispose()},this.nullableDrag=function(){return ys().on("drag",null)},this._zoom=new K2(o),this._keydownEvents=new R2,l.isEditOrPreViewMode()&&(this._mouseEvents=new $2(o))}return Object.defineProperty(n.prototype,"zoom",{get:function get(){return this._zoom},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"keydown",{get:function get(){return this._keydownEvents},enumerable:!1,configurable:!0}),n}(),Dn="branchElement",tp="#654BDD",Q2=function Q2(n){var o=lr(n),r=gt("svg:path").attr("class",Dn);return r.attr("d",Se({source:o.source.position.absolute,target:o.target.position.absolute})).attr("fill","none").attr("stroke",Ks(n)).attr("stroke-width",l.render.strokeSize),r.node()},ep=function ep(n){var o=lr(n),r=gt("svg:path").attr("class",Dn),a=function(s,u,p){if(p||arguments.length===2)for(var h,f=0,y=u.length;f<y;f++)!h&&f in u||(h||(h=Array.prototype.slice.call(u,0,f)),h[f]=u[f]);return s.concat(h||Array.prototype.slice.call(u))}([],function(s,u){var p=typeof Symbol=="function"&&s[Symbol.iterator];if(!p)return s;var h,f,y=p.call(s),_=[];try{for(;(u===void 0||u-- >0)&&!(h=y.next()).done;)_.push(h.value)}catch(E){f={error:E}}finally{try{h&&!h.done&&(p=y.return)&&p.call(y)}finally{if(f)throw f.error}}return _}(o.source.position.absolute),!1);return o.type===lt.Flip&&(a[0]=a[0]-42),r.attr("d",Se({source:a,target:o.target.position.absolute})).attr("fill","none").attr("stroke",Ks(n))},J2=function J2(n){var o=ep(n);return o.attr("stroke-width",l.render.strokeSize+2),o.node()},tb=function tb(n){var o=ep(n);return o.attr("stroke-width",l.render.strokeSize+4),o.node()},eb=function eb(n){var o=lr(n),r=gt("svg:path").attr("class","shadowBranchElement");return r.attr("d",Se({source:o.source.position.absolute,target:o.target.position.absolute})).attr("fill","none").attr("stroke","transparent").attr("stroke-width",l.render.strokeSize+5),r.node()},Ks=function Ks(n){var o=lr(n);return l.isViewMode()?o.isAssociatedNodeLocked()?"#76787A":l.render.color.stroke:B.selectedBranches.has(o.id)?tp:l.render.color.stroke},qs=function qs(n,o){var r=this;this.clear=function(){r._layer.selectAll("*").remove()},this.allowReRendering=function(){return!0},this._layer=n.append("g").attr("id",o)},nb=function(){var n=function n1(o,r){return n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=o}n(o,r),o.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),np=function np(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},rp=function rp(n,o,r){if(r||arguments.length===2)for(var a,s=0,u=o.length;s<u;s++)!a&&s in o||(a||(a=Array.prototype.slice.call(o,0,s)),a[s]=o[s]);return n.concat(a||Array.prototype.slice.call(o))},rb=function(n){function o(){var r=n!==null&&n.apply(this,arguments)||this;return r.render=function(){var a=B.layout.getChangedBranches(),s=a.deleted,u=a.edited;if(u.length+s.length!==0){r.destroyBranches(rp(rp([],np(s),!1),np(u),!1));var p=!!u.length;p&&r.renderBranches(u),(p||s.length)&&r.saveRenderResults()}},r.updateSelected=function(){Gs().each(function(a){r.applyBranchColor(a)})},r.setHovered=function(){},r.clear=function(){r._layer.selectAll("*").remove(),B.layout.renderedBranchesData={}},r.createBranchesSelection=function(a){var s=r._layer.selectAll("g.NotExistingClassName").data(a.map(function(u){return u.id})).join("g").attr("class",Fd).attr("id",function(u){return"branch-".concat(u)});return l.isEditOrPreViewMode()&&s.style("cursor","pointer"),s},r.renderBranches=function(a){var s=r.createBranchesSelection(a);B.layout.shouldRenderFullLayout?r.renderFullLayout(s):r.renderSkeleton(s)},r}return nb(o,n),o.prototype.addEventListeners=function(r){var a=this;r.on("contextmenu",function(s){s.preventDefault()}).on("click",function(s,u){l.isViewMode()||(s.preventDefault(),B.selectBranches([u]),a.updateSelected())}).on("mouseenter",function(s,u){l.isViewMode()||B.selectedBranches.has(u)||a.applySelectedBranch(u)}).on("mouseleave",function(s,u){l.isViewMode()||B.selectedBranches.has(u)||a.applyDefaultBranch(u)})},o.prototype.renderFullLayout=function(r){r.append(eb),r.append(Q2),this.addEventListeners(r)},o.prototype.renderSkeleton=function(r){w.inputs.zoom.isExtraLowZoomRatio?r.append(tb):r.append(J2)},o.prototype.saveRenderResults=function(){var r=Gs().data().map(lr);B.layout.renderedBranchesData=je(r)},o.prototype.destroyBranches=function(r){if(r.length!==0&&B.layout.hasRenderedBranches){var a=B.layout.renderedBranchesData;r.forEach(function(s){a[s.id]&&Ci(s.id).remove()})}},o.prototype.applyBranchColor=function(r){Ci(r).select(".".concat(Dn)).attr("stroke",Ks(r))},o.prototype.applySelectedBranch=function(r){Ci(r).select(".".concat(Dn)).attr("stroke",tp)},o.prototype.applyDefaultBranch=function(r){Ci(r).select(".".concat(Dn)).attr("stroke",l.render.color.stroke)},o}(qs),ob=function(){var n=function n1(o,r){return n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=o}n(o,r),o.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),ib=function(n){function o(){var r=n!==null&&n.apply(this,arguments)||this;return r._hadInitialRender=!1,r.setHovered=function(){},r.allowReRendering=function(){return!r._hadInitialRender},r}return ob(o,n),o.prototype.render=function(){var r,a;this._marker=(r=this._layer,a=r.append("g").attr("class","navigationMarker"),a.append("svg").attr("x",-l.render.iconSize).attr("y",0).attr("width",2*l.render.iconSize).attr("height",2*l.render.iconSize).attr("viewBox","0 0 ".concat(l.render.iconSize," ").concat(l.render.iconSize)).append("use").attr("href","#".concat(v.Location)),a).style("display","none"),this._hadInitialRender=!0},o.prototype.updateSelected=function(r){if(this._marker)if(r.length){var a=function(h,f){var y=typeof Symbol=="function"&&h[Symbol.iterator];if(!y)return h;var _,E,T=y.call(h),C=[];try{for(;(f===void 0||f-- >0)&&!(_=T.next()).done;)C.push(_.value)}catch(R){E={error:R}}finally{try{_&&!_.done&&(y=T.return)&&y.call(T)}finally{if(E)throw E.error}}return C}(r,1)[0],s=Zt(a);if(!s)throw new Error("Can't get first selected graph node");var u=s.styles.x+s.render.width/2,p=s.styles.y-40;this._marker.attr("transform","translate(".concat(u,", ").concat(p,")")).style("display","inline").style("color",s.stylesWithDefaults.hover.borderColor)}else this._marker.style("display","none")},o}(qs),op=function op(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},ip=l.render.node.headerHeight-8,ap=l.render.node.width-l.render.node.headerHeight,sp=l.render.iconSize+4,cp=function cp(n,o,r){var a=n.append("g").attr("class","header");sb(a,r),ab(a,o,r),l.isEditMode()&&cb(a,o,r),a.on("mouseenter",function(){return function(s){var u=St(s);if(ro(u.id)&&!u.isDragged){var p=16*u.chapterErrors.reduce(function(f,y){return Math.ceil(y.message.length/33)+f},0)+(30*(u.chapterErrors.length-1)+18)+30,h=u.chapterErrors.map(function(f){return"<h5>".concat(f.title,"</h5><div>").concat(f.message,"</div>")}).join("");w.popups.position([u.styles.x-24,u.styles.y-p]).withScale().show(h,void 0,"tooltip",{width:"224px",arrow:"down"})}}(r.id)}).on("mouseleave",function(){return w.popups.hide()})},Qs=function Qs(n,o,r){if(ro(n)){var a=l.render.color.elementBackground;r&&(a=l.render.color.error),o&&(a=l.render.color.activeError),Xe(n).select(".headerBg").attr("fill",a)}};var ab=function ab(n,o,r){var a=op(o,2),s=a[0],u=a[1];n.append(function(){var p;return id({text:r.displayLockedContent?r.chapter.label:l.translation.node_not_visited,posX:s+12,posY:u+10,width:140,fontWeight:600,color:l.isViewOrPreViewMode()?(p=r.stylesWithDefaults.header)===null||p===void 0?void 0:p.textColor:void 0})})},sb=function sb(n,o){n.append("rect").attr("class","headerBg").attr("width",l.render.node.width).attr("height",l.render.node.headerHeight).attr("fill",l.isViewOrPreViewMode()?o.stylesWithDefaults.header.backgroundColor:l.render.color.elementBackground)},cb=function cb(n,o,r){var a=op(o,2)[1],s="rgba(0,0,0,0)",u=function u(){return ro(r)?B.selectedNodes.has(r.id)?"#E53737":"#F06A6A":"#363738"},p=n.append("g").attr("id","options").style("cursor","pointer").on("click",function(h){h.preventDefault(),w.inputs.keydown.shiftHold&&h.stopImmediatePropagation();var f=w.inputs.zoom.getRelativeCoordinates([ur(r.id).x+r.render.width+5,ur(r.id).y],!0);w.tools.use(Ot.NodeMenu).data(r).position(f).start(),_t(this).selectChild().attr("fill",u())}).on("mousedown",function(){_t(this).selectChild().attr("fill",u())}).on("mouseenter",function(){_t(this).selectChild().attr("fill",u())}).on("mouseleave",function(){_t(this).selectChild().attr("fill",s)});p.append("path").attr("d",Ze({x:ap+4,y:a+4,w:ip,h:ip,r:10})).attr("fill",s),p.append("use").style("color",l.render.color.text).attr("x",ap+sp/2).attr("y",a+sp/2).attr("href","#".concat(v.Etc))},up=function up(n){var o=St(n);if(o.chapter.order!=="simple"){var r=o.render.width-l.render.node.componentOrderRadius,a=-l.render.node.componentOrderRadius,s=gt("svg:g").attr("class","nodeOrder").attr("transform","translate(".concat(r,", ").concat(a,")")).style("color","#19191A");s.append("use").attr("href","#".concat($t.Order)),s.append("use").attr("y",l.render.node.componentOrderRadius-l.render.iconSize/2).attr("x",l.render.node.componentOrderRadius-l.render.iconSize/2).attr("href","#".concat(function(u){switch(u.chapter.order){case"start":return v.StartNode;case"end":return v.EndNode;case"simple":return v.Node}}(o))).raise(),Xe(o.id).append(function(){return s.node()})}},Ke=function Ke(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},dp="previewControls",pp="previewBackground",hp=function hp(n,o,r){var a=Ke(o,2),s=a[0],u=a[1],p=n.append("g").attr("class","preview");p.append("rect").attr("class",pp).attr("x",s).attr("y",u-1).attr("width",l.render.node.width).attr("height",l.render.node.componentPreviewHeight+4).attr("fill",l.isViewOrPreViewMode()?r.stylesWithDefaults.header.backgroundColor:l.render.color.elementBackground);var h=p.append("g").attr("class","previewContainer").attr("clip-path","url(#".concat($t.PreviewClipPath,")")),f=[s,u+1],y=h.append("g").attr("class","previewContent");lb(y,f,r),l.isEditMode()&&ub(h,f,r),p.on("mouseenter",function(){!r.isDragged&&r.displayLockedContent&&(Gd(r.id).node()||function(_,E){var T,C,R=(C=_.id,w.dom.select(bi(C,"previewContainer")));l.isEditMode()?db(R,E,_):l.isViewOrPreViewMode()&&!((T=_.stylesWithDefaults.watchAgain)===null||T===void 0)&&T.enabled&&pb(R,E,_)}(r,f))}).on("mouseleave",function(){!r.isDragged&&r.displayLockedContent&&Gd(r.id).remove()})};var Js=function Js(n,o,r,a){var s=Ke(o,2),u=s[0],p=s[1];n.append("rect").attr("x",u).attr("y",p).attr("width",r.render.width-2).attr("height",l.render.node.componentPreviewHeight).attr("fill",a)},mp=function mp(n,o,r){var a=Ke(o,2)[1];n.append("svg").attr("x",l.render.node.width/2-10).attr("y",a+l.render.node.componentPreviewHeight/2-10).attr("width",l.render.iconSize+4).attr("height",l.render.iconSize+4).attr("viewBox","0 0 ".concat(l.render.iconSize," ").concat(l.render.iconSize)).append("use").style("color",r.stylesWithDefaults.preview.textColor).attr("href","#".concat(v.Lock))},vp=function vp(n,o,r){var a=Ke(o,2),s=a[0],u=a[1];if(!r.videoInfo)throw new Error("No video info to render cover");n.append("svg:image").attr("id","dropZone_".concat(r.id)).attr("x",s).attr("y",u).attr("width",r.render.width-2).attr("height",l.render.node.componentPreviewHeight).attr("preserveAspectRatio","xMidYMid meet").attr("href",r.videoInfo.cover).on("error",function(p){_t(p.target).attr("href",function(){return ce(521)})})},yp=function yp(n,o,r){var a=Ke(o,2),s=a[0],u=a[1];n.append("use").attr("id","dropZone_".concat(r.id)).attr("x",s).attr("y",u).attr("href","#".concat($t.PreviewPlaceholder))},lb=function lb(n,o,r){var a=Ke(o,2),s=a[0],u=a[1];if(!r.displayLockedContent){var p=r.stylesWithDefaults.preview.backgroundColor;return Js(n,[s,u],r,p),void mp(n,[s,u],r)}r.videoInfo?(p=l.render.node.previewPlaceholder.backgroundColor,Js(n,[s,u],r,p),vp(n,[s,u],r)):yp(n,[s,u],r)},_p=function _p(n,o,r){var a=Ke(o,2),s=a[0],u=a[1];if(!r.displayLockedContent){var p=r.stylesWithDefaults.preview.backgroundColor;return Js(n,[s,u],r,p),void mp(n,[s,u],r)}r.videoInfo?vp(n,[s,u],r):yp(n,[s,u],r)},ub=function ub(n,o,r){var a,s=Ke(o,2),u=s[0],p=s[1];!((a=r.videoInfo)===null||a===void 0)&&a.title&&(n.append("rect").attr("class","previewContentTitle").attr("x",u).attr("y",p+l.render.node.componentPreviewHeight-32).attr("width",r.render.width-2).attr("height",32).attr("fill","rgba(13, 15, 18, 0.89)"),n.append(function(){var h;return id({text:((h=r.videoInfo)===null||h===void 0?void 0:h.title)||"",posX:u+8,posY:l.render.node.componentPreviewHeight+12,width:l.render.node.width-16,fontSize:14,fontWeight:600,lineHeight:1})}))},db=function db(n,o,r){var a=Ke(o,2),s=a[0],u=a[1],p=n.append("g").attr("class",dp).attr("transform","translate(".concat(s,", ").concat(u,")"));p.append("rect").attr("width",r.render.width-2).attr("height",l.render.node.componentPreviewHeight).attr("fill","rgba(0, 0, 0, 0.8)"),p.append(function(){return tc(r.chapter.videoId?l.translation.node_video_change:l.translation.node_video_choose,"rgba(255, 255, 255, 0.17)","rgba(255, 255, 255, 0.22)","rgba(255, 255, 255, 0.27)",(h=r.id,function(){m.emit("control",{name:"changeVideo",chapterIds:[h]})})).attr("transform","translate(16, 25)").node();var h}),p.append(function(){return tc(l.translation.node_open_editor,"#7B68EE","#8978F0","#9889F2",(h=r.id,function(){m.emit("control",{name:"openEditor",chapterId:h})})).attr("transform","translate(16, 61)").node();var h})},pb=function pb(n,o,r){var a=Ke(o,2),s=a[0],u=a[1],p=n.append("g").attr("class",dp).attr("transform","translate(".concat(s,", ").concat(u,")"));p.append("rect").attr("width",r.render.width-2).attr("height",l.render.node.componentPreviewHeight).attr("fill","rgba(0, 0, 0, 0.8)"),p.append(function(){return tc(l.translation.node_watch_again_from,r.stylesWithDefaults.watchAgain.backgroundColor,r.stylesWithDefaults.watchAgain.backgroundColor,r.stylesWithDefaults.watchAgain.backgroundColor,(h=r.id,function(){m.emit("control",{name:"openPreview",chapterId:h})}),r.stylesWithDefaults.watchAgain.textColor,130,30,8).attr("transform","translate(28, 42)").node();var h})},tc=function tc(n,o,r,a,s,u,p,h,f){u===void 0&&(u=l.render.color.text),p===void 0&&(p=l.render.node.width-32),h===void 0&&(h=28),f===void 0&&(f=4);var y=gt("svg:g").attr("class","previewControlButton").on("mouseenter",function(){_t(this).select(".buttonBg").attr("fill",r)}).on("mouseleave",function(){_t(this).select(".buttonBg").attr("fill",o)}).on("mousedown",function(){_t(this).select(".buttonBg").attr("fill",a)}).on("click",function(_){_t(this).select(".buttonBg").attr("fill",r),s(_)});return y.append("path").attr("class","buttonBg").attr("d",Ze({x:0,y:0,w:p,h:h,r:f})).attr("fill",o).style("cursor","pointer"),y.append("text").text(n).attr("class","buttonText").attr("x",p/2).attr("y",h-10).attr("font-weight",500).attr("font-size",14).attr("text-anchor","middle").style("fill",u).attr("text-rendering","optimizeSpeed"),y},ec=function ec(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},gp="rgba(255, 255, 255, 0.17)",Ep=function Ep(n,o,r){var a=ec(o,2),s=a[0],u=a[1];n.append("path").attr("class","addActionRect").attr("d",function(){return Ze({x:s+8,y:u+8,w:r.render.width-16,h:l.render.node.componentAddActionHeight-16,r:8})}).attr("fill",gp)},Tp=function Tp(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},Sp=function Sp(n){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&n[o],a=0;if(r)return r.call(n);if(n&&typeof n.length=="number")return{next:function next(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},hb=function hb(n){return n.label||n.type},bp=function bp(n,o){return od({text:hb(n),posX:l.render.iconSize+14,posY:l.render.node.componentControlHeight/2-8,width:l.render.node.width-(l.render.iconSize+30),color:o.stylesWithDefaults.controls.textColor})},fb=function fb(n,o){var r=gt("svg:g").append("g").attr("class","nodeControl").style("cursor","pointer");return function(a,s,u){a.on("mouseenter",function(){w.dom.select(".control_add_link_button_".concat(s.id)).attr("display","inline"),_t(this).select(".controlElementRect").attr("fill",td(u.stylesWithDefaults.controls.backgroundColor,l.render.color.percentDiff))}).on("mouseleave",function(){w.dom.select(".control_add_link_button_".concat(s.id)).attr("display","none"),_t(this).select(".controlElementRect").attr("fill",u.stylesWithDefaults.controls.backgroundColor)}).on("contextmenu",function(p){p.preventDefault(),p.stopImmediatePropagation();var h=w.dom.getRelativeEventCoordinates(p,w.dom.staticTools.node());w.tools.use(Ot.ControlMenu).data(u,s).position(h).start()})}(r,o,n),function(a,s){a.append("rect").attr("class","controlElementRect").attr("width",l.render.node.width).attr("height",l.render.node.componentControlHeight).attr("fill",s.stylesWithDefaults.controls.backgroundColor).attr("stroke-width",l.render.strokeSize).attr("stroke",l.render.color.elementStroke)}(r,n),function(a,s){a.append("use").style("color",l.render.color.text).attr("x",8).attr("y",l.render.node.componentControlHeight/2-l.render.iconSize/2).attr("href","#".concat(function(u){switch(u.type){case"Area":return v.ActionArea;case"Button":return v.ActionButton}}(s)))}(r,o),r.append(function(){return bp(o,n).node()}),r},mb=function mb(n,o){return bp(o,n)},Cp=function Cp(n,o,r){var a,s,u=Tp(o,2),p=u[0],h=u[1],f=n.append("g").attr("class","controls"),y=0;try{for(var _=Sp(r.containers().reverse()),E=_.next();!E.done;E=_.next()){var T=E.value;r.getContainerControls(T.id).forEach(function(C){f.append(function(){var R=h+l.render.node.componentControlHeight*y++;return fb(r,C).attr("transform","translate(".concat(p,", ").concat(R,")")).node()})})}}catch(C){a={error:C}}finally{try{E&&!E.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}},nc=function nc(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},wp=function wp(n,o,r){var a=nc(o,2),s=a[0],u=a[1],p=n.append("g").attr("class","eov");(function(h,f){h.style("cursor","pointer").on("mouseenter",function(){_t(this).select(".endOfVideoRect").attr("fill",td(f.stylesWithDefaults.flipTo.backgroundColor,l.render.color.percentDiff))}).on("mouseleave",function(){_t(this).select(".endOfVideoRect").attr("fill",f.stylesWithDefaults.flipTo.backgroundColor)})})(p,r),function(h,f,y){h.append("rect").attr("class","endOfVideoRect").attr("width",l.render.node.width).attr("height",l.render.node.componentControlHeight).attr("fill",y.stylesWithDefaults.flipTo.backgroundColor).attr("y",f)}(p,u,r),function(h,f){var y=nc(f,2),_=y[0],E=y[1];h.append("use").style("color",l.render.color.text).attr("x",_+8).attr("y",E+14).attr("href","#".concat(v.EndOfVideo))}(p,[s,u]),function(h,f,y){var _=nc(f,2),E=_[0],T=_[1];h.append("text").text(l.translation.node_eov).attr("font-weight",400).attr("x",E+8+l.render.iconSize+6).attr("y",T+26).style("fill",y.stylesWithDefaults.flipTo.textColor).attr("text-rendering","optimizeSpeed")}(p,[s,u],r)},vb=function vb(n){var o,r,a,s=St(n),u=gt("svg:g");if(l.isEditMode()){var p=l.render.node.heightWithPreviewEov,h=p+l.render.node.componentAddActionHeight;cp(u,[0,0],s),hp(u,[0,l.render.node.headerHeight],s),s.isEndNode()||(wp(u,[0,l.render.node.heightWithPreview+1],s),function(f,y,_){var E=f.append("g").attr("class","addAction").style("cursor","pointer");(function(T,C){T.on("click",function(R){var O=w.dom.getRelativeEventCoordinates(R,w.dom.staticTools.node());w.tools.use(Ot.ControlTypeMenu).data(C).position(O).start()}).on("mouseenter",function(){_t(this).select(".addActionRect").attr("fill","#626366")}).on("mouseleave",function(){_t(this).select(".addActionRect").attr("fill",gp)})})(E,_),function(T,C,R){var O=ec(C,2),D=O[0],V=O[1];T.append("rect").attr("x",D).attr("y",V).attr("width",R.render.width).attr("height",l.render.node.componentAddActionHeight).attr("fill",l.render.color.elementBackground).attr("stroke-width",l.render.strokeSize).attr("stroke",l.render.color.elementStroke)}(E,y,_),Ep(E,y,_),function(T,C,R){var O=ec(C,2)[1];T.append("text").text(l.translation.node_add_control).attr("font-weight",600).attr("text-anchor","middle").style("fill",l.render.color.text).attr("x",R.render.width/2).attr("y",O+24).attr("text-rendering","optimizeSpeed")}(E,y,_)}(u,[0,p],s),Cp(u,[0,h],s))}else h=!((o=s.stylesWithDefaults.flipTo)===null||o===void 0)&&o.enabled?l.render.node.heightWithPreviewEov:l.render.node.heightWithPreview+1,cp(u,[0,0],s),hp(u,[0,l.render.node.headerHeight],s),s.isEndNode()||(!((r=s.stylesWithDefaults.flipTo)===null||r===void 0)&&r.enabled&&wp(u,[0,l.render.node.heightWithPreview+1],s),!((a=s.stylesWithDefaults.controls)===null||a===void 0)&&a.enabled&&Cp(u,[0,h],s));return rd({id:s.id,width:s.render.width,height:s.render.height,element:u,r:l.render.node.borderRadius}),u.node()},rc=function rc(n,o,r){var a=zs(r,o);return n.attr("stroke-width",l.render.strokeSize+Number(o)).attr("stroke",a)},Ap=function Ap(n,o){o===void 0&&(o=!0);var r=St(n),a=zs(r,o),s=gt("svg:path").attr("class","border").attr("id",l.render.prefix.nodeBorder+n).attr("d",function(){return Ze({x:1,y:1,w:r.render.width-2,h:r.render.height-2,r:l.render.node.borderRadius})}).attr("fill","none").attr("stroke",a).style("pointer-events","none");return rc(s,o,r),s.node()},yb=function yb(n){var o=St(n);if(o.hasErrors()){var r=B.selectedNodes.has(o.id);Xe(n).append(function(){return Ap(o.id,r)})}},Ai=l.render.iconSize/2,Op=function Op(n){var o=gt("svg:g");return o.append("path").attr("fill","none").attr("stroke",l.render.color.stroke).attr("d",Se({source:[0,0],target:[23,0]})).attr("pointer-events","none"),o.append(function(){return we(n).attr("transform","translate(".concat(-l.render.node.control.connectorRadius,", ").concat(-l.render.node.control.connectorRadius,")")).node()}),o},Oi=l.render.iconSize/2,Li=l.render.iconSize/2,Lp="#7B68EE",xp=function xp(n){var o=n.render.width,r=l.render.node.heightWithPreview+l.render.node.componentControlHeight/2,a=n.getSuspenseActionType(),s=a==="setNextBranch"?2*l.render.tool.eov.size:l.render.tool.eov.size,u=gt("svg:g").attr("id",l.render.prefix.nodeEOV+n.id).attr("stroke",l.render.color.stroke).attr("stroke-width",l.render.strokeSize);return u.append("path").attr("class","eovTypeLine").attr("fill","none").attr("d",Se({source:[o,r],target:[o+s,r]})).attr("pointer-events","none").style("marker-start","url(#".concat(g.Circle)).style("marker-end",n.getSuspenseBranchId()?"":"url(#".concat(g.Circle)),a!=="setNextBranch"||n.getSuspenseBranchId()||u.append("rect").attr("fill","transparent").attr("stroke","none").attr("x",o+s-Li/2).attr("y",r-Li/2).attr("width",Li).attr("height",Li).on("mouseenter",function(p){if(!p.buttons){var h=St(n.id);w.tools.use(Ot.ShadowNodeLink).data(h,lt.Flip).position([h.styles.x+o+s,r+h.styles.y]).start()}}).on("mouseleave",function(){}),u.append(function(){return _b(n,[o+11,r-16]).attr("transform","translate(".concat(o+12,", ").concat(r-12,")")).node()}),u.node()},_b=function _b(n,o){var r=function(p,h){var f=typeof Symbol=="function"&&p[Symbol.iterator];if(!f)return p;var y,_,E=f.call(p),T=[];try{for(;(h===void 0||h-- >0)&&!(y=E.next()).done;)T.push(y.value)}catch(C){_={error:C}}finally{try{y&&!y.done&&(f=E.return)&&f.call(E)}finally{if(_)throw _.error}}return T}(o,2),a=r[0],s=r[1],u=gt("svg:g");return u.on("click",function(p){if(!l.isViewOrPreViewMode()){p.preventDefault();var h=Zt(n.id)||n,f=w.inputs.zoom.getRelativeCoordinates([h.styles.x+a,h.styles.y+s],!0);w.tools.use(Ot.EOVMenu).data(h).position(f).start(),_t(this).select(".eovButtonBg").attr("stroke",l.render.color.stroke).attr("fill",l.render.color.elementBackground)}}).on("mouseenter",function(){l.isViewOrPreViewMode()||_t(this).select(".eovButtonBg").attr("stroke",Lp).attr("fill",Lp)}).on("mouseleave",function(){l.isViewOrPreViewMode()||_t(this).select(".eovButtonBg").attr("stroke",l.render.color.stroke).attr("fill",l.render.color.elementBackground)}).call(w.inputs.nullableDrag()),u.append("path").attr("class","eovButtonBg").attr("stroke",l.render.color.stroke).attr("fill",l.render.color.elementBackground).attr("d",Ze({x:0,y:0,w:l.render.tool.eov.size,h:l.render.tool.eov.size,r:l.render.tool.eov.radius})),u.append("use").style("color",l.render.tool.textColor).attr("x",5).attr("y",5).attr("width",12).attr("height",12).attr("viewBox","0 0 ".concat(l.render.iconSize," ").concat(l.render.iconSize)).attr("href","#".concat(gb(n.getSuspenseActionType()))),u},gb=function gb(n){switch(n){case"setNextBranch":return v.Node;case"setRandomBranch":return v.Random;default:return v.Add}},Rp=function Rp(n){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&n[o],a=0;if(r)return r.call(n);if(n&&typeof n.length=="number")return{next:function next(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},Eb=function Eb(n){var o,r;if(!l.isEditMode())return Tb(n);var a=St(n),s=gt("svg:g").attr("class","nodeTools");if($d(a,s),Zs(a,s),Ws(a,s),a.isEndNode())return s.node();s.append(function(){return xp(a)});var u=0,p=function p(y){a.getContainerControls(y.id).forEach(function(_){var E,T,C=(E=_.events)===null||E===void 0?void 0:E.some(function(O){return O.type==="onClick"&&O.action.type==="setNextBranch"}),R=(T=y.events)===null||T===void 0?void 0:T.some(function(O){return O.type==="onSuspense"&&O.action.type==="setNextBranch"});C&&R||s.append(function(){return function(O,D,V,Z){var Y,x,W,q,et=!1,ct=(Y=D.events)===null||Y===void 0?void 0:Y.some(function($){return $.type==="onSuspense"&&$.action.type==="setNextBranch"}),ut=(x=V.events)===null||x===void 0?void 0:x.some(function($){return $.type==="onClick"&&$.action.type==="setNextBranch"});q=ct||ut?ut?l.render.node.control.inactionLinkY:l.render.node.control.actionLinkY:(l.render.node.control.actionLinkY+l.render.node.control.inactionLinkY)/2;var Ut=l.render.node.componentControlHeight*Z,xt=O.render.controlsContainerYCoordinate+Ut,ot=gt("svg:g").attr("class","controlAddLinks").attr("transform","translate(".concat(O.render.width,", ").concat(xt,")")).call(w.inputs.nullableDrag()),It=gt("svg:g").attr("class","control_link_choice_".concat(D.id)).attr("display","none").on("mouseenter",function(){_t(this).attr("display","inline"),M.attr("display","inline"),J.attr("stroke",l.render.color.stroke)}).on("mouseleave",function($){$.toElement.closest("#shadow-node-link")||(_t(this).attr("display","none"),M.attr("display","none"),J.attr("stroke",l.render.color.connectorStroke))});if(It.append("rect").attr("fill","transparent").attr("x",0).attr("y",0).attr("width",l.render.node.componentControlHeight).attr("height",l.render.node.componentControlHeight),!ut){It.append(function(){return we(v.Action).attr("transform","translate(15, ".concat(l.render.node.control.actionLinkY-l.render.node.control.connectorRadius,")")).on("mouseenter",function($){$.buttons||w.tools.use(Ot.ShadowNodeLink).data(O,lt.Action,D,V,!1).position([O.styles.x+O.render.width+23,O.styles.y+xt+l.render.node.control.actionLinkY]).start()}).node()}),It.append("path").attr("fill","none").attr("stroke",l.render.color.stroke).attr("d",Se({source:[7,q],target:[16,l.render.node.control.actionLinkY]})).attr("pointer-events","none");var Pt=Op(v.Action).attr("class","start_link_".concat(V.id)).attr("transform","translate(0, ".concat(l.render.node.control.actionLinkY,")")).attr("display","none");ot.append(function(){return Pt.node()})}if(!ct){var Fe=((W=vi("onSuspense",D.events))===null||W===void 0?void 0:W.action.type)==="expect";It.append(function(){return we(v.Inaction,!1,Fe).attr("transform","translate(15, ".concat(l.render.node.control.inactionLinkY-l.render.node.control.connectorRadius,")")).on("mouseenter",function($){if(!Fe||et)$.buttons||w.tools.use(Ot.ShadowNodeLink).data(O,lt.Inaction,D,V,!1).position([O.styles.x+O.render.width+23,O.styles.y+xt+l.render.node.control.inactionLinkY]).start();else{et=!0;var X=function(yt,bt){var ft=typeof Symbol=="function"&&yt[Symbol.iterator];if(!ft)return yt;var ee,fe,xe=ft.call(yt),on=[];try{for(;(bt===void 0||bt-- >0)&&!(ee=xe.next()).done;)on.push(ee.value)}catch(be){fe={error:be}}finally{try{ee&&!ee.done&&(ft=xe.return)&&ft.call(xe)}finally{if(fe)throw fe.error}}return on}(w.dom.getRelativeEventCoordinates($,w.dom.staticTools.node()),2),nt=X[0],ht=X[1];w.popups.position([nt,ht+10]).show(l.translation.tooltip_inaction_not_available,void 0,"tooltip")}}).on("mouseleave",function(){Fe&&et&&(et=!1,w.popups.hide())}).node()}),It.append("path").attr("fill","none").attr("stroke",l.render.color.stroke).attr("d",Se({source:[7,q],target:[16,l.render.node.control.inactionLinkY]})).attr("pointer-events","none");var ae=Op(v.Inaction).attr("class","start_link_".concat(D.id)).attr("transform","translate(0, ".concat(l.render.node.control.inactionLinkY,")")).attr("display","none");ot.append(function(){return ae.node()})}ot.append(function(){return It.node()});var M=we(v.Plus,!0).attr("transform","translate(".concat(-l.render.node.control.connectorRadius,", ").concat(q-l.render.node.control.connectorRadius,")")).attr("class","control_add_link_button_".concat(V.id)).attr("display","none").on("mouseenter",function(){_t(this).attr("display","inline"),It.attr("display","inline"),J.attr("stroke",l.render.color.stroke)}).on("mouseleave",function(){_t(this).attr("display","none"),It.attr("display","none"),J.attr("stroke",l.render.color.connectorStroke)}),J=M.select(".connector_circle");return J.attr("stroke",l.render.color.connectorStroke),ot.append(function(){return M.node()}),ot.node()}(a,y,_,u)}),C&&s.append(function(){return function(O,D,V,Z){var Y,x=l.render.node.componentControlHeight*Z,W=O.render.controlsContainerYCoordinate+l.render.node.control.actionLinkY+x,q=!!(!((Y=V.events)===null||Y===void 0)&&Y.some(function(ut){return ut.action.args.branchId})),et=gt("svg:g").attr("class","controlActionLink").attr("transform","translate(".concat(O.render.width,", ").concat(W,")"));et.append(function(){return we(v.Action).attr("transform","translate(".concat(-l.render.node.control.connectorRadius,", ").concat(-l.render.node.control.connectorRadius,")")).on("mouseenter",function(){q||ct.style("display","inline")}).node()});var ct=we(v.Minus,!0).attr("transform","translate(".concat(-l.render.node.control.connectorRadius,", ").concat(-l.render.node.control.connectorRadius,")")).style("display","none").on("mouseleave",function(){ct.style("display","none")}).on("click",function(){O.updateControlActionEvent(D,V,"continuePlayback"),Jr(O.chapter),w.tools.use(Ot.ShadowNodeLink).stop()});return et.append(function(){return ct.node()}),q||(et.on("mouseenter",function(ut){ut.buttons||w.tools.use(Ot.ShadowNodeLink).data(O,lt.Action,D,V).position([O.styles.x+O.render.width+l.render.node.control.lineLength,O.styles.y+W]).start()}).on("mouseleave",function(){}).call(w.inputs.nullableDrag()),et.append("rect").attr("fill","transparent").attr("x",l.render.node.control.lineLength-Ai/2).attr("y",-Ai/2).attr("width",Ai).attr("height",Ai),et.append("path").attr("fill","none").attr("stroke",l.render.color.stroke).attr("d",Se({source:[7,0],target:[l.render.node.control.lineLength,0]})).attr("pointer-events","none"),et.append("use").attr("class","control_connector_".concat(V.id)).attr("x",l.render.node.control.lineLength).attr("y",0).attr("href","#".concat($t.Connector))),et.node()}(a,y,_,u)}),R&&s.append(function(){return function(O,D,V,Z){var Y,x=l.render.node.componentControlHeight*Z,W=O.render.controlsContainerYCoordinate+l.render.node.control.inactionLinkY+x,q=!!(!((Y=D.events)===null||Y===void 0)&&Y.some(function(ut){return ut.action.args.branchId})),et=gt("svg:g").attr("class","controlInactionLink").attr("transform","translate(".concat(O.render.width,", ").concat(W,")"));et.append(function(){return we(v.Inaction).attr("transform","translate(".concat(-l.render.node.control.connectorRadius,", ").concat(-l.render.node.control.connectorRadius,")")).on("mouseenter",function(){q||ct.style("display","inline")}).node()});var ct=we(v.Minus,!0).attr("transform","translate(".concat(-l.render.node.control.connectorRadius,", ").concat(-l.render.node.control.connectorRadius,")")).style("display","none").on("mouseleave",function(){ct.style("display","none")}).on("click",function(){O.updateContainerSuspenseAction(D,"continuePlayback"),Jr(O.chapter),w.tools.use(Ot.ShadowNodeLink).stop()});return et.append(function(){return ct.node()}),q||(et.on("mouseenter",function(ut){ut.buttons||w.tools.use(Ot.ShadowNodeLink).data(O,lt.Inaction,D,V).position([O.styles.x+O.render.width+l.render.node.control.lineLength,O.styles.y+W]).start()}).on("mouseleave",function(){}).call(w.inputs.nullableDrag()),et.append("rect").attr("fill","transparent").attr("x",l.render.node.control.lineLength-Oi/2).attr("y",-Oi/2).attr("width",Oi).attr("height",Oi),et.append("path").attr("fill","none").attr("stroke",l.render.color.stroke).attr("d",Se({source:[7,0],target:[l.render.node.control.lineLength,0]})).attr("pointer-events","none"),et.append("use").attr("class","control_connector_".concat(D.id)).attr("x",l.render.node.control.lineLength).attr("y",0).attr("href","#".concat($t.Connector))),et.node()}(a,y,_,u)}),u++})};try{for(var h=Rp(a.containers().reverse()),f=h.next();!f.done;f=h.next())p(f.value)}catch(y){o={error:y}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(o)throw o.error}}return s.node()},Tb=function Tb(n){var o,r,a,s,u,p,h,f=St(n),y=gt("svg:g").attr("class","nodeTools"),_=f.getIncomingConnectorsCoordinates();if(Object.keys(_).forEach(function(O){switch(O){case lt.Flip:y.append(function(){return Wd(f,_[O])});break;case lt.Action:Zs(f,y);break;case lt.Inaction:Ws(f,y)}}),((a=f.stylesWithDefaults.controls)===null||a===void 0?void 0:a.enabled)&&!f.isEndNode()){var E=0,T=function T(O){f.getContainerControls(O.id).forEach(function(D){var V,Z,Y=(V=D.events)===null||V===void 0?void 0:V.some(function(W){return W.type==="onClick"&&W.action.type==="setNextBranch"}),x=(Z=O.events)===null||Z===void 0?void 0:Z.some(function(W){return W.type==="onSuspense"&&W.action.type==="setNextBranch"});Y&&y.append(function(){return function(W,q){var et=l.render.node.componentControlHeight*q,ct=W.render.controlsContainerYCoordinate+l.render.node.control.actionLinkY+et,ut=gt("svg:g").attr("transform","translate(".concat(W.render.width,", ").concat(ct,")"));return ut.append(function(){return we(v.Action).attr("transform","translate(".concat(-l.render.node.control.connectorRadius,", ").concat(-l.render.node.control.connectorRadius,")")).node()}),ut.node()}(f,E)}),x&&y.append(function(){return function(W,q){var et=l.render.node.componentControlHeight*q,ct=W.render.controlsContainerYCoordinate+l.render.node.control.inactionLinkY+et,ut=gt("svg:g").attr("transform","translate(".concat(W.render.width,", ").concat(ct,")"));return ut.append(function(){return we(v.Inaction).attr("transform","translate(".concat(-l.render.node.control.connectorRadius,", ").concat(-l.render.node.control.connectorRadius,")")).node()}),ut.node()}(f,E)}),E++})};try{for(var C=Rp(f.containers().reverse()),R=C.next();!R.done;R=C.next())T(R.value)}catch(O){o={error:O}}finally{try{R&&!R.done&&(r=C.return)&&r.call(C)}finally{if(o)throw o.error}}}return f.isEndNode()||((!(!((s=f.stylesWithDefaults.flipTo)===null||s===void 0)&&s.enabled)&&f.hasBranches(lt.Flip)||!(!((u=f.stylesWithDefaults.controls)===null||u===void 0)&&u.enabled)&&f.hasBranches(lt.Action)||!(!((p=f.stylesWithDefaults.controls)===null||p===void 0)&&p.enabled)&&f.hasBranches(lt.Inaction))&&y.append(function(){return Wd(f,[f.render.width,f.render.previewMiddleYCoordinate])}),!((h=f.stylesWithDefaults.flipTo)===null||h===void 0)&&h.enabled&&y.append(function(){return xp(f)})),y.node()},Mp=function Mp(n,o,r){var a=function(h,f){var y=typeof Symbol=="function"&&h[Symbol.iterator];if(!y)return h;var _,E,T=y.call(h),C=[];try{for(;(f===void 0||f-- >0)&&!(_=T.next()).done;)C.push(_.value)}catch(R){E={error:R}}finally{try{_&&!_.done&&(y=T.return)&&y.call(T)}finally{if(E)throw E.error}}return C}(r,2),s=a[0],u=a[1],p=n.append("rect").attr("width",l.render.node.width).attr("height",o.render.height-u).attr("fill",l.render.color.elementBackground);(s||u)&&p.attr("x",s).attr("y",u)},Sb=function Sb(n){var o=St(n),r=gt("svg:g"),a=l.render.node,s=a.headerHeight,u=a.heightWithPreviewEov,p=a.componentAddActionHeight;return Mp(r,o,[0,0]),_p(r,[0,s+1],o),l.isEditMode()&&!o.isEndNode()&&(function(h,f,y){Ep(h,f,y)}(r,[0,u],o),function(h,f,y){var _,E,T=Tp(f,2),C=T[0],R=T[1],O=0;try{for(var D=Sp(y.containers().reverse()),V=D.next();!V.done;V=D.next()){var Z=V.value;y.getContainerControls(Z.id).forEach(function(Y){h.append(function(){var x=R+l.render.node.componentControlHeight*O++;return mb(y,Y).attr("transform","translate(".concat(C,", ").concat(x,")")).node()})})}}catch(Y){_={error:Y}}finally{try{V&&!V.done&&(E=D.return)&&E.call(D)}finally{if(_)throw _.error}}}(r,[0,u+p],o)),r.node()},bb=function bb(n){var o=St(n),r=gt("svg:g"),a=l.render.node.headerHeight;return Mp(r,o,[0,0]),_p(r,[0,a+1],o),r.node()},Cb=function(){var n=function n1(o,r){return n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=o}n(o,r),o.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),dr=function dr(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},ao=function ao(n,o,r){if(r||arguments.length===2)for(var a,s=0,u=o.length;s<u;s++)!a&&s in o||(a||(a=Array.prototype.slice.call(o,0,s)),a[s]=o[s]);return n.concat(a||Array.prototype.slice.call(o))},xi=function xi(n){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&n[o],a=0;if(r)return r.call(n);if(n&&typeof n.length=="number")return{next:function next(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},wb=function(n){function o(r,a){var s=n.call(this,r,a)||this;return s._needForRAF=!0,s.render=function(){var u=B.layout.getChangedNodes(),p=u.deletedNodes,h=u.editedNodes;s.destroyNodes(ao(ao([],dr(p),!1),dr(h),!1)),h.length&&(s.renderNodes(h),s.updateSelected(ao([],dr(B.selectedNodes),!1),!0)),s.saveRenderResults()},s.clear=function(){s._layer.selectAll("*").remove(),B.layout.renderedNodesData={}},s.updateSelected=function(u,p){var h,f,y,_;p===void 0&&(p=!1);var E=p?new Set:B.selectedNodes,T=new Set(u);try{for(var C=xi(E),R=C.next();!R.done;R=C.next()){var O=R.value;(Z=Zt(O))&&!T.has(O)&&(s.removeNodeHighlight(O),fp(Z,!1),lp(Z,!1))}}catch(Y){h={error:Y}}finally{try{R&&!R.done&&(f=C.return)&&f.call(C)}finally{if(h)throw h.error}}try{for(var D=xi(T),V=D.next();!V.done;V=D.next()){var Z;O=V.value,(Z=Zt(O))&&!E.has(Z.id)&&(s.createNodeHighlight(Z),fp(Z,!0),lp(Z,!0))}}catch(Y){y={error:Y}}finally{try{V&&!V.done&&(_=D.return)&&_.call(D)}finally{if(y)throw y.error}}u.forEach(function(Y){return Xe(Y).raise()})},s.setHovered=function(u){var p,h,f,y,_=new Set(u);try{for(var E=xi(B.hoveredNodes.values()),T=E.next();!T.done;T=E.next()){var C=T.value,R=Zt(C);R&&!_.has(R.id)&&s.onNodeMouseLeave(R.id)}}catch(Z){p={error:Z}}finally{try{T&&!T.done&&(h=E.return)&&h.call(E)}finally{if(p)throw p.error}}try{for(var O=xi(_.values()),D=O.next();!D.done;D=O.next()){var V=D.value;B.hoveredNodes.has(V)||s.onNodeMouseEnter(V)}}catch(Z){f={error:Z}}finally{try{D&&!D.done&&(y=O.return)&&y.call(O)}finally{if(f)throw f.error}}},s.createNodeCards=function(u){var p=u.map(function(h){return h.id});return s._layer.selectAll("g.NotExistingClassName").data(p).join("g").attr("class",jd).attr("id",function(h){return"node-"+h}).attr("transform",function(h){var f=ur(h);return"translate(".concat(Math.round(f.x),", ").concat(Math.round(f.y),")")})},s.subscribeForZoomEvent(),s}return Cb(o,n),o.prototype.subscribeForZoomEvent=function(){var r=l.performance.renderAfterZoomThrottleInMs,a=Xd()(function(){w.layers.update()},r);m.on("zoom",a)},o.prototype.destroyNodes=function(r){r.forEach(function(a){return Xe(a.id).remove()})},o.prototype.saveRenderResults=function(){var r=zd().data().map(St);B.layout.renderedNodesData=je(r),B.layout.previousNodesToRenderCount=B.manifest.nodes.length},o.prototype.renderNodeFullLayout=function(r){r.append(vb),r.each(yb),r.append(Eb),r.each(function(a){(function(s){var u,p=function(_){return B.chaptersTags[_]||w2}(s);if(p.size!==0){var h=St(s),f=((u=h.stylesWithDefaults.hover)===null||u===void 0?void 0:u.borderColor)||"#7B68EE",y=gt("svg:g").attr("transform","translate(-9, -9)").on("mouseenter",function(){w.popups.position([h.styles.x-180,h.styles.y-34]).withScale().show(l.translation.tooltip_video_was_changed,void 0,"tooltip",{width:"160px",arrow:"right"})}).on("mouseleave",function(){w.popups.hide()}).style("color",l.render.color.text);p.has("video_changed")&&(y.append(function(){return function(_,E){_===void 0&&(_="#7B68EE"),E===void 0&&(E=10);var T=gt("svg").attr("id",$t.TagCover);return T.append("circle").attr("r",E).attr("fill",_).attr("cx",E).attr("cy",E),T.node()}(f)}),y.append("use").attr("y",l.render.node.componentOrderRadius-l.render.iconSize/2).attr("x",l.render.node.componentOrderRadius-l.render.iconSize/2).attr("href","#".concat(v.PencilFilled)).raise()),Xe(h.id).append(function(){return y.node()})}})(a),up(a)})},o.prototype.renderNodeSkeletons=function(r){w.inputs.zoom.isExtraLowZoomRatio?r.append(bb):(r.append(Sb),r.each(up))},o.prototype.renderNodes=function(r){var a=this.createNodeCards(r);this.addEventsToNodes(a),B.layout.shouldRenderFullLayout?this.renderNodeFullLayout(a):this.renderNodeSkeletons(a),a.each(function(s){St(s).resetModified()})},o.prototype.addEventsToNodes=function(r){var a=this;r.on("contextmenu",function(s,u){var p=St(u);s.preventDefault();var h=w.dom.getRelativeEventCoordinates(s,w.dom.staticTools.node());w.tools.use(Ot.NodeMenu).data(p).position(h).start()}).on("click",function(s,u){if(!l.isViewMode()){var p=St(u);s.preventDefault(),a.onNodeSelection(p)}}).on("mousedown",function(s,u){if(!l.isViewMode()&&s.button!==1&&!B.selectedNodes.has(u)){var p=St(u);w.inputs.keydown.shiftHold||a.onNodeSelection(p)}}).on("mouseenter touchstart",function(s,u){return a.onNodeMouseEnter(u)},{passive:!0}).on("mouseleave",function(s,u){return a.onNodeMouseLeave(u)}).call(l.isEditOrPreViewMode()?this.initNodeDrag():function(){return null})},o.prototype.onNodeMouseEnter=function(r){if(!B.selectedNodes.has(r)){var a=St(r);this.createNodeHighlight(a,!1),B.addNodesToHovered([r]),Qs(r,!1,!0)}},o.prototype.onNodeMouseLeave=function(r){B.selectedNodes.has(r)||(this.removeNodeHighlight(r),B.removeNodesFromHovered([r]),Qs(r,!1,!1))},o.prototype.createNodeHighlight=function(r,a){a===void 0&&(a=!0);var s=Ys(r.id);s.node()?rc(s,a,r):Xe(r.id).insert(function(u){return Ap(u,a)},"g.nodeTools")},o.prototype.removeNodeHighlight=function(r){if(ro(r)){var a=Ys(r);rc(a,!1,St(r))}else(function(s){(typeof s=="string"?[s]:s).forEach(function(u){return Ys(u).remove()})})(r)},o.prototype.onNodeSelection=function(r){var a=new Set(B.selectedNodes);w.inputs.keydown.shiftHold?a.has(r.id)?a.delete(r.id):a.add(r.id):(a.clear(),a.add(r.id));var s=ao([],dr(a),!1);w.layers.updateSelected(s)},o.prototype.initNodeDrag=function(){var r=this,a=0,s=0,u=!1,p=ys().clickDistance(50).on("start",function(h,f){var y=St(f);w.tools.disable(),w.popups.hide(),a=h.x-y.styles.x,s=h.y-y.styles.y}).on("drag",function(h,f){B.selectedNodes.has(f)&&r._needForRAF&&(r._needForRAF=!1,u=!0,requestAnimationFrame(function(){var y=St(f);y.isDragged=!0;var _=dr(w.grid.getSnappedCoordinates([h.x,h.y]),2),E=_[0],T=_[1],C=E-a-y.styles.x,R=T-s-y.styles.y;B.selectedNodes.forEach(function(V){var Z=Zt(V);if(Z){var Y=Math.round(Z.styles.x+C),x=Math.round(Z.styles.y+R);Z.updatePosition(Y,x),Xe(V).attr("transform","translate(".concat(Y,", ").concat(x,")"))}}),B.selectedNodes.forEach(function(V){var Z=Zt(V);Z&&function(Y){Gs().each(function(x){var W=lr(x);W.source.chapterId===Y.id?(W.updateSourceAbsolutePosition([Y.styles.x,Y.styles.y]),_t(this).datum(W.id).select(".".concat(Dn)).attr("d",Se({source:W.source.position.absolute,target:W.target.position.absolute}))):W.target.chapterId===Y.id&&(W.updateTargetAbsolutePosition([Y.styles.x,Y.styles.y]),_t(this).datum(x).select(".".concat(Dn)).attr("d",Se({source:W.source.position.absolute,target:W.target.position.absolute})))})}(Z)}),r._needForRAF=!0;var O=y.styles,D=[[O.x,O.y],[O.x+y.render.width,O.y+y.render.height]];w.layers.shiftLayersOnDragToEdge(D)}))}).on("end",function(){var h=ao([],dr(B.selectedNodes),!1).map(function(f){var y=St(f);return y.isDragged&&(y.isDragged=!1),{id:f,x:y.styles.x,y:y.styles.y}});u&&m.emit("events",{name:"coordinatesUpdated",context:h}),r._needForRAF=!0,u=!1});return p},o}(qs),oc=function oc(n){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&n[o],a=0;if(r)return r.call(n);if(n&&typeof n.length=="number")return{next:function next(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},Ri=function Ri(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},Ab=function Ab(n){var o=this;this._editorMapElement=n,this.update=function(){var r,a;B.sectors.updateSectors(w.dom.viewPosition);try{for(var s=oc(o._layers),u=s.next();!u.done;u=s.next()){var p=u.value;p.allowReRendering()&&p.render()}}catch(h){r={error:h}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(r)throw r.error}}},this.updateSelected=function(r,a){var s,u;a===void 0&&(a=!0);try{for(var p=oc(o._layers),h=p.next();!h.done;h=p.next())h.value.updateSelected(r)}catch(f){s={error:f}}finally{try{h&&!h.done&&(u=p.return)&&u.call(p)}finally{if(s)throw s.error}}B.selectNodes(r,a)},this.updateHovered=function(r){var a,s;try{for(var u=oc(o._layers),p=u.next();!p.done;p=u.next())p.value.setHovered(r)}catch(h){a={error:h}}finally{try{p&&!p.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}},this.clear=function(){o._layers.forEach(function(r){return r.clear()})},this.dispose=function(){o._editorMapElement.selectAll("*").remove()},this.shiftLayersOnDragToEdge=function(r){var a=Ri(r,2),s=Ri(a[0],2),u=s[0],p=s[1],h=Ri(a[1],2),f=h[0],y=h[1],_=30*Math.max(w.inputs.zoom.zoomFactor,.4);o.shiftNodesMapOnLeftBorderTouche(u,_),o.shiftNodesMapOnTopBorderTouche(p,_),o.shiftNodesMapOnRightBorderTouche(f,_),o.shiftNodesMapOnBottomBorderTouche(y,_)},this.shiftNodesMapOnLeftBorderTouche=function(r,a){var s=w.inputs.zoom,u=s.zoomFactor,p=s.shiftTo;s.zoomPosition.x+r*u<40&&p([a,0])},this.shiftNodesMapOnTopBorderTouche=function(r,a){var s=w.inputs.zoom,u=s.zoomFactor,p=s.shiftTo;s.zoomPosition.y+r*u<40&&p([0,a])},this.shiftNodesMapOnRightBorderTouche=function(r,a){var s=w.inputs.zoom,u=s.zoomFactor,p=s.shiftTo,h=s.zoomPosition,f=w.dom.getEditorWindowSize().width;h.x+r*u>f-40&&p([-a,0])},this.shiftNodesMapOnBottomBorderTouche=function(r,a){var s=w.inputs.zoom,u=s.zoomFactor,p=s.shiftTo,h=s.zoomPosition,f=w.dom.getEditorWindowSize().height;h.y+r*u>f-40&&p([0,-a])},this._layers=function(r,a,s){if(s||arguments.length===2)for(var u,p=0,h=a.length;p<h;p++)!u&&p in a||(u||(u=Array.prototype.slice.call(a,0,p)),u[p]=a[p]);return r.concat(u||Array.prototype.slice.call(a))}([new rb(n,"branches"),new wb(n,"nodes")],Ri(l.isViewMode()?[new ib(n,"navigation")]:[]),!1)},Ob=function(){function n(o){var r=this;this._editorDOMElement=o,this._withScale=!1,this._zoom={x:0,y:0,value:1},this.show=function(a,s,u,p){u===void 0&&(u="popup"),p===void 0&&(p={}),r.renderPopup(a,s,u,p)},this.hide=function(){var a;r._currentPopupType="popup",r._popupPosition=void 0,r._withScale=!1,(a=r._popup)===null||a===void 0||a.remove()},this.position=function(a){return r._popupPosition=a,r},this.withScale=function(){return r._withScale=!0,r},this._currentPopupType="popup",m.on("zoom",function(a){r._zoom=a,r._currentPopupType!=="popup"&&r.hide()})}return n.prototype.renderPopup=function(o,r,a,s){this._currentPopupType=a;var u=["mge-editorPopup",s.arrow?"arrow-"+s.arrow:""].filter(Boolean).join(" ");if(this._popup=this._editorDOMElement.append("div").attr("class",u).style("width",s.width||"auto").style("min-width",a==="popup"?"324px":"160px").style("pointer-events",a==="popup"?"all":"none"),r&&this._popup.append("div").style("font-size",17).style("font-weight",600).html(r),this._popup.append("div").html(o),this._popupPosition)if(this._popup.style("top","0").style("left","0").style("transform-origin","top left"),this._withScale){var p=this._popupPosition[0]*this._zoom.value+this._zoom.x,h=this._popupPosition[1]*this._zoom.value+this._zoom.y;this._popup.style("transform","translate(".concat(p,"px, ").concat(h,"px) scale(").concat(this._zoom.value,")"))}else p=this._popupPosition[0],h=this._popupPosition[1],this._popup.style("transform","translate(".concat(p,"px, ").concat(h,"px)"));else this._popup.style("top","50%").style("left","50%"),this._withScale?this._popup.style("transform","translate(-50%, -50%) scale(".concat(this._zoom.value,")")):this._popup.style("transform","translate(-50%, -50%)")},n}(),Lb=function(){function n(o,r){var a,s=this;this.use=function(p){return s.disable(),s._activeTool=p,s._tools[p].tool},this.disable=function(){s._activeTool&&(s._tools[s._activeTool].tool.stop(),s._activeTool=null)},this.disableContextMenu=function(){s._activeTool&&[Ot.NodeMenu,Ot.EOVMenu,Ot.ControlMenu,Ot.ControlTypeMenu,Ot.EditorContextMenu].includes(s._activeTool)&&(s._tools[s._activeTool].tool.stop(),s._activeTool=null)},this._activeTool=null,this._tools=((a={})[Ot.ShadowNode]={render:"map",tool:new Y2},a[Ot.ShadowNodeLink]={render:"map",tool:new W2},a[Ot.NodeMenu]={render:"staticTools",tool:new z2},a[Ot.EOVMenu]={render:"staticTools",tool:new F2},a[Ot.ControlMenu]={render:"staticTools",tool:new D2},a[Ot.ControlTypeMenu]={render:"staticTools",tool:new V2},a[Ot.EditorContextMenu]={render:"staticTools",tool:new U2},a[Ot.AreaSelectTool]={render:"staticTools",tool:new I2},a);var u=o.append("g").attr("id","editor-tools");Object.values(this._tools).forEach(function(p){switch(p.render){case"map":p.tool.render(u);break;case"staticTools":p.tool.render(r)}})}return Object.defineProperty(n.prototype,"activeTool",{get:function get(){return this._activeTool},enumerable:!1,configurable:!0}),n}(),xb=function(){function n(o){this._editorDOMElement=o,this.renderGraphLegend(),this.renderNavigationLegend()}return n.prototype.dispose=function(){},n.prototype.renderGraphLegend=function(){var o=this._editorDOMElement.append("div").attr("class","mge-legend mge-graph");this.renderLegendItem(o,l.translation.graph_node_start,v.StartNode,12,!0),this.renderLegendItem(o,l.translation.graph_node_end,v.EndNode,12,!0),this.renderLegendItem(o,l.translation.graph_location,v.Location)},n.prototype.renderNavigationLegend=function(){var o=this._editorDOMElement.append("div").attr("class","mge-legend mge-navigation");this.renderLegendItem(o,l.translation.navigation_controls,v.LegendNavigation,28)},n.prototype.renderLegendItem=function(o,r,a,s,u){s===void 0&&(s=20),u===void 0&&(u=!1);var p=o.append("div").attr("class","mge-legendItem");p.append("div").attr("class",u?"mge-icon withBg":"mge-icon").append("svg").attr("x",0).attr("y",0).attr("width",s).attr("height",s).attr("viewBox","0 0 ".concat(l.render.iconSize," ").concat(l.render.iconSize)).append("use").attr("href","#".concat(a)),p.append("div").text(r)},n}();var w=new(function(){function n(){}return n.prototype.init=function(o){this._dom=new L2(o),this._grid=new x2(this._dom.grid),this._defs=new t2(this._dom.defs),this._inputs=new q2(this._dom.svg),this._layers=new Ab(this._dom.map),this._popups=new Ob(this._dom.root),l.isEditOrPreViewMode()&&(this._tools=new Lb(this._dom.map,this._dom.staticTools)),l.isViewMode()&&(this._legend=new xb(this._dom.root))},n.prototype.dispose=function(){var o,r,a,s,u,p,h,f;(o=this._legend)===null||o===void 0||o.dispose(),(r=this._tools)===null||r===void 0||r.disable(),(a=this._popups)===null||a===void 0||a.hide(),(s=this._layers)===null||s===void 0||s.dispose(),(u=this._inputs)===null||u===void 0||u.dispose(),(p=this._defs)===null||p===void 0||p.dispose(),(h=this._grid)===null||h===void 0||h.dispose(),(f=this._dom)===null||f===void 0||f.dispose()},Object.defineProperty(n.prototype,"dom",{get:function get(){return this._dom||this.throwModuleError("DOM"),this._dom},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"layers",{get:function get(){return this._layers||this.throwModuleError("Layers"),this._layers},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"inputs",{get:function get(){return this._inputs||this.throwModuleError("Inputs"),this._inputs},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"popups",{get:function get(){return this._popups||this.throwModuleError("Popups"),this._popups},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tools",{get:function get(){return this._tools||this.throwModuleError("Tools"),this._tools},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"grid",{get:function get(){return this._grid||this.throwModuleError("Grid"),this._grid},enumerable:!1,configurable:!0}),n.prototype.throwModuleError=function(o){throw new Error(o+" manager was not initialized. Did you forget to init()?")},n}());var ic=function ic(n,o){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var a,s,u=r.call(n),p=[];try{for(;(o===void 0||o-- >0)&&!(a=u.next()).done;)p.push(a.value)}catch(h){s={error:h}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return p},Ip=function Ip(n,o,r){if(r||arguments.length===2)for(var a,s=0,u=o.length;s<u;s++)!a&&s in o||(a||(a=Array.prototype.slice.call(o,0,s)),a[s]=o[s]);return n.concat(a||Array.prototype.slice.call(o))},Rb=function(){function n(o,r){var a=this;this.update=function(s){var u=Ip([],ic(B.selectedNodes),!1);B.manifest.nodes.length===0&&s.chapters.length>l.performance.enableSkeletonsOnNodesCount&&a.zoom(w.inputs.zoom.minZoomFactor),B.reset(),B.manifest.set(s),B.setVisitedNodes([s.metadata.initChapterId]),a.reRenderAfterUpdate(u)},this.updateVideosInfo=function(s){try{B.updateVideosInfo(s),B.manifest.rebuildNodesAndBranches(),w.layers.update()}catch(u){throw new Error("Argument type mismatch.")}},this.setGraphFrozen=function(s){B.isGraphFrozen=s},this.dispose=function(){B.reset(),m.dispose(),w.dispose()},this.zoom=function(s){Ps(s)&&w.inputs.zoom.update(s)},this.zoomTo=function(s,u){u===void 0&&(u=w.inputs.zoom.zoomFactor),function(p){return Array.isArray(p)&&Ps(p[0])&&Ps(p[1])}(s)&&w.inputs.zoom.translateToCoordinates(s,u)},this.zoomConfig=function(){return w.inputs.zoom.zoomConfig},this.zoomEnable=function(){w.inputs.zoom.enable()},this.zoomDisable=function(){w.inputs.zoom.disable()},this.selectChapter=function(s,u){u===void 0&&(u=!1);var p=typeof s=="string"?[s]:s;w.layers.updateSelected(p,!1);var h=typeof s=="string"?s:s[0];u&&h&&a.focusChapter(h)},this.hoverOverChapters=function(s){var u=Array.isArray(s)?s:[s];w.layers.updateHovered(u)},this.focusChapter=function(s,u){u===void 0&&(u=a.zoomConfig().max/2),w.inputs.zoom.focusChapter(s,u)},this.recenterGraph=function(){if(B.manifest.nodes.length){var s=w.inputs.zoom.centeredZoom,u=s.x,p=s.y,h=s.scale;w.inputs.zoom.translateToFromCenter([u,p],h)}},this.setChaptersValidationErrors=function(s){if(!l.isEditMode())throw new Error("Only applicable in 'edit' mode");B.setNodeErrors(s),a.reRenderAfterUpdate()},this.toggleAddChapterTool=function(s){if(s===void 0&&(s=!0),!l.isEditMode())throw new Error("Only applicable in 'edit' mode");if(s){var u=w.inputs.zoom.getRelativeCoordinates([100,100]);w.tools.use(Ot.ShadowNode).position(u).start()}else w.tools.disable()},this.toggleHandTool=function(s){w.inputs.zoom.toggleMousedownZoom(),s(w.inputs.zoom.isMousedownZoomEnabled)},this.setVisitedChapters=function(s){if(!l.isViewMode())throw new Error("Only applicable in 'view' mode");B.setVisitedNodes(s),w.layers.update()},this.setMode=function(s){if(["edit","pre_view"].includes(s)){if(!l.isEditOrPreViewMode())throw new Error("Only applicable in 'edit' mode");l.switchMode(s),B.manifest.rebuildNodesAndBranches(),a.reRenderAfterUpdate()}},this.setCopiedNodes=function(s){B.setCopiedNodes(s)},this.setChaptersTags=function(s){var u=Object.entries(s).map(function(p){var h=ic(p,2),f=h[0],y=h[1];return[f,new Set(y)]});B.chaptersTags=Object.fromEntries(u),Object.keys(s).forEach(function(p){var h;return(h=Zt(p))===null||h===void 0?void 0:h.setModified()}),a.reRenderAfterUpdate(Ip([],ic(B.selectedNodes),!1))},this.on=function(s,u){m.on(s,u)},l.init(r),w.init(o),w.layers.clear()}return n.prototype.reRenderAfterUpdate=function(o){o===void 0&&(o=[]),w.dom.updateEditorBackgroundColor(),w.grid.update(),w.layers.update(),B.updatedSelectedBranches();var r=o.filter(function(a){return Zt(a)});w.layers.updateSelected(r,!1)},n}()})();lI=Lt.Wk,uI=Lt.QS,dI=Lt.bc,pI=Lt.$D,hI=Lt.U0,fI=Lt.xi,mI=Lt.Ql,vI=Lt.Qf,yI=Lt.Db,_I=Lt.vW,gI=Lt.sY,EI=Lt.gH,TI=Lt.ZW,SI=Lt.vF,bI=Lt.q8,CI=Lt.I7,wI=Lt.aP,AI=Lt.ws,OI=Lt.jb,LI=Lt.S3,xI=Lt.vR,RI=Lt.Fv,MI=Lt.GP,II=Lt.BZ,NI=Lt.Hi,PI=Lt.RW,DI=Lt.d0,kI=Lt.ql,VI=Lt.Kh});var d7={};kp(d7,{CustomError:function(){return re},EVENT_NAMES:function(){return dt},Interactives:function(){return Yo},ManifestController:function(){return Kn},SDKInfo:function(){return u7},chapterIdsToVKVideoIds:function(){return Xa},compareVersions:function(){return fn},getChapterIdByVkVideoId:function(){return hT},getVKVideoIdByMedia:function(){return Ql},getVideoRawIdByMedia:function(){return dT},graphEventTypes:function(){return Dr},hasEndTemplate:function(){return Fo},interactivesEventTypes:function(){return Rt},isLastChapter:function(){return ze},isSupportedManifest:function(){return Uo},isVKVariantItem:function(){return pT},utils:function(){return vT},vkVideoIdsToChapterIds:function(){return Jl}});module1.exports=Vb(d7);var Bp="__VERSION__";function lc(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;var i="0",c="0",d1="0";return t.length===4?(i="0x"+t[1]+t[1],c="0x"+t[2]+t[2],d1="0x"+t[3]+t[3]):t.length===7&&(i="0x"+t[1]+t[2],c="0x"+t[3]+t[4],d1="0x"+t[5]+t[6]),"rgba(".concat(+i,",").concat(+c,",").concat(+d1,",").concat(e,")")}var Ce="interactive",Bb="interactive-controls-container",Ni=function(){return document.querySelector(".".concat(Bb))},Up=.4,ve={textColor:"#000",textSize:.4,textContent:"",roundCorners:0,borderWidth:0,borderColor:"#000",borderAlpha:1,backgroundColor:"#fff",backgroundAlpha:1,innerSizesDependOn:"self",angle:0},jp=function(c){return c.top="flex-start",c.bottom="flex-end",c.center="center",c}(jp||{}),Fp=function(c){return c.start="flex-start",c.end="flex-end",c.center="center",c}(Fp||{}),Hp=function(c){return c.start="left",c.end="right",c.center="center",c}(Hp||{}),Pi=function(param){var t=param.target,e=param.props;var i,c,d1,l,m,v;t.style.alignItems=(c=((i=e.text)==null?void 0:i.gravityVertical)&&jp[e.text.gravityVertical])!=null?c:"center",t.style.justifyContent=(l=((d1=e.text)==null?void 0:d1.gravityHorizontal)&&Fp[e.text.gravityHorizontal])!=null?l:"center",t.style.textAlign=(v=((m=e.text)==null?void 0:m.alignment)&&Hp[e.text.alignment])!=null?v:"left"},Di=function(param){var t=param.target,e=param.props,i=param.fallback,c=param.dependsOn;var d1,l,m,v,g,S;t.style.color=(l=(d1=e==null?void 0:e.text)==null?void 0:d1.color)!=null?l:i.textColor,t.style.fontSize="calc(".concat(c.height," * ").concat((v=(m=e==null?void 0:e.text)==null?void 0:m.size)!=null?v:i.textSize,")"),t.textContent=(S=(g=e==null?void 0:e.text)==null?void 0:g.value)!=null?S:i.textContent},ki=function(param){var t=param.target,e=param.props,i=param.fallback;var c,d1,l,m;t.style.backgroundColor=lc((d1=(c=e==null?void 0:e.background)==null?void 0:c.color)!=null?d1:i.backgroundColor,(m=(l=e==null?void 0:e.background)==null?void 0:l.alpha)!=null?m:i.backgroundAlpha)},Vi=function(param){var t=param.target,e=param.props,i=param.fallback,c=param.dependsOn;var d1,l,m,v,g,S,b,A,L,N,F;t.style.border="calc(".concat(c.height," * ").concat((m=(l=(d1=e==null?void 0:e.shape)==null?void 0:d1.border)==null?void 0:l.width)!=null?m:i.borderWidth,") solid ").concat(lc((S=(g=(v=e==null?void 0:e.shape)==null?void 0:v.border)==null?void 0:g.color)!=null?S:i.borderColor,(L=(A=(b=e==null?void 0:e.shape)==null?void 0:b.border)==null?void 0:A.alpha)!=null?L:i.borderAlpha)),t.style.borderRadius="calc(".concat(c.height," * ").concat((F=(N=e==null?void 0:e.shape)==null?void 0:N.roundCorners)!=null?F:i.roundCorners,")")},pr=function(param){var t=param.target,e=param.layoutParams,i=param.fallback;var d1;var c=(d1=e.angle)!=null?d1:i.angle;c=c&&c*-1,t.style.transform="rotate(".concat(c,"rad)")};var sn=/*#__PURE__*/function(){"use strict";function sn(e){_class_call_check(this,sn);this.control=e;this.container=null;this.controlElement=null;this.clickListener=null}_create_class(sn,[{key:"createContainerElement",value:function createContainerElement(e){var d1;var i=document.createElement("div");i.classList.add("".concat(Ce,"-control-container-").concat(this.control.id)),e(i,this.control.layoutParams);var c=((d1=this.control.layoutParams.innerSizesDependOn)!=null?d1:ve.innerSizesDependOn)==="self"?{height:i.style.height,width:i.style.width}:{height:"var(--interactive-content-height)",width:"var(--interactive-content-width)"};this.container={element:i,dimensions:c}}},{key:"createClickListener",value:function createClickListener(e){return function(i){i.stopPropagation(),e()}}},{key:"setEvents",value:function setEvents(e){var _this=this;!this.container||!this.control.events||this.control.events.forEach(function(i){var d1;switch(i.type.trim().toLowerCase()){case"onclick":_this.clickListener=_this.createClickListener(function(){return e({action:i.action,controlId:_this.control.id,controlType:_this.control.type})}),(d1=_this.container)==null||d1.element.addEventListener("click",_this.clickListener);break;default:break}})}},{key:"removeListeners",value:function removeListeners(){var e,i;(e=this.container)!=null&&e.element&&this.clickListener&&((i=this.container)==null||i.element.removeEventListener("click",this.clickListener))}}]);return sn}();var uc="int",kn=function(c){return c.AREA="".concat(uc,"_area"),c.TEXT="".concat(uc,"_text"),c.BUTTON="".concat(uc,"_bttn"),c}(kn||{});var Bi=function(t){if(t.type.trim().toLowerCase()==="area")return new dc(t)},dc=/*#__PURE__*/function(sn){"use strict";_inherits(dc,sn);function dc(e){_class_call_check(this,dc);return _call_super(this,dc,[e])}_create_class(dc,[{key:"createView",value:function createView(param){var e=param.parentElement,i=param.layoutCallback;if(_get(_get_prototype_of(dc.prototype),"createContainerElement",this).call(this,i),!this.container)return;var c=document.createElement("button");c.type="button",c.classList.add("".concat(Ce,"-").concat(this.control.id)),c.setAttribute("data-testid",kn.AREA),c.style.display="flex",c.style.width="100%",c.style.height="100%",c.style.cursor="pointer",ki({target:c,props:this.control.props,fallback:it(K({},ve),{backgroundColor:"transparent"})}),Vi({target:c,props:this.control.props,fallback:it(K({},ve),{borderAlpha:0}),dependsOn:this.container.dimensions}),pr({target:c,layoutParams:this.control.layoutParams,fallback:ve}),this.container.element.append(c),e.append(this.container.element),this.controlElement=c}},{key:"disable",value:function disable(){this.controlElement&&(this.controlElement.style.cursor="default")}},{key:"enable",value:function enable(){this.controlElement&&(this.controlElement.style.cursor="pointer")}},{key:"getElement",value:function getElement(){return this.controlElement}}]);return dc}(sn);var Ui=function(){var t=document.createElement("span");return t.style.display="inline-block",t.style.whiteSpace="pre",t.style.overflow="hidden",t.style.textOverflow="ellipsis",t.style.maxWidth="100%",t.style.maxHeight="100%",t};var ji=function(t){if(t.type.trim().toLowerCase()==="button")return new pc(t)},pc=/*#__PURE__*/function(sn){"use strict";_inherits(pc,sn);function pc(e){_class_call_check(this,pc);return _call_super(this,pc,[e])}_create_class(pc,[{key:"createView",value:function createView(param){var e=param.parentElement,i=param.layoutCallback;if(_get(_get_prototype_of(pc.prototype),"createContainerElement",this).call(this,i),!this.container)return;var c=document.createElement("button");c.type="button",c.classList.add("".concat(Ce,"-").concat(this.control.id)),c.setAttribute("data-testid",kn.BUTTON),c.style.display="flex",c.style.width="100%",c.style.height="100%",c.style.cursor="pointer",c.style.fontFamily="inherit",pr({target:c,layoutParams:this.control.layoutParams,fallback:ve}),ki({target:c,props:this.control.props,fallback:ve}),Vi({target:c,props:this.control.props,fallback:ve,dependsOn:this.container.dimensions}),Pi({target:c,props:this.control.props});var d1=Ui();Di({target:d1,props:this.control.props,fallback:ve,dependsOn:this.container.dimensions}),c.append(d1),this.container.element.append(c),e.append(this.container.element),this.controlElement=c}},{key:"disable",value:function disable(){this.controlElement&&(this.controlElement.style.cursor="default")}},{key:"enable",value:function enable(){this.controlElement&&(this.controlElement.style.cursor="pointer")}},{key:"getElement",value:function getElement(){return this.controlElement}}]);return pc}(sn);var zp=function(t){if(t.type.trim().toLowerCase()==="text")return new hc(t)},hc=/*#__PURE__*/function(sn){"use strict";_inherits(hc,sn);function hc(e){_class_call_check(this,hc);return _call_super(this,hc,[e])}_create_class(hc,[{key:"createView",value:function createView(param){var e=param.parentElement,i=param.layoutCallback;if(_get(_get_prototype_of(hc.prototype),"createContainerElement",this).call(this,i),!this.container)return;var c=document.createElement("div");c.classList.add("".concat(Ce,"-").concat(this.control.id)),c.setAttribute("data-testid",kn.TEXT),c.style.display="flex",c.style.width="100%",c.style.height="100%",c.style.fontFamily="inherit",pr({target:c,layoutParams:this.control.layoutParams,fallback:ve}),Pi({target:c,props:this.control.props});var d1=Ui();Di({target:d1,props:this.control.props,fallback:ve,dependsOn:this.container.dimensions}),c.append(d1),this.container.element.append(c),e.append(this.container.element),this.controlElement=c}},{key:"disable",value:function disable(){}},{key:"enable",value:function enable(){}},{key:"getElement",value:function getElement(){return this.controlElement}}]);return hc}(sn);var fc=function fc(e){"use strict";_class_call_check(this,fc);this.layout=e},Fi=/*#__PURE__*/function(fc){"use strict";_inherits(Fi,fc);function Fi(e){_class_call_check(this,Fi);return _call_super(this,Fi,[e])}_create_class(Fi,[{key:"setContainerLayout",value:function setContainerLayout(e){e.style.position="relative"}},{key:"setControlLayout",value:function setControlLayout(e,i){e.style.position="absolute",e.style.width="calc(var(--interactive-content-width) * ".concat(i.width,")"),e.style.height="calc(var(--interactive-content-height) * ".concat(i.height,")"),e.style.left="calc(var(--interactive-content-width) * ".concat(i.x," + ((var(--interactive-width) - var(--interactive-content-width)) / 2))"),e.style.top="calc(var(--interactive-content-height) * ".concat(i.y," + ((var(--interactive-height) - var(--interactive-content-height)) / 2))")}}]);return Fi}(fc);var gn,Hi,Gp,hr=/*#__PURE__*/function(){"use strict";function hr(e){_class_call_check(this,hr);me(this,gn);this.container=e,this.factories=new Map,so(this,gn,Hi).call(this)}_create_class(hr,[{key:"addControlFactory",value:function addControlFactory(e,i){this.factories.set(e.trim().toLowerCase(),i),so(this,gn,Hi).call(this)}},{key:"removeControlFactory",value:function removeControlFactory(e){this.factories.delete(e.trim().toLowerCase()),so(this,gn,Hi).call(this)}}]);return hr}();gn=new WeakSet,Hi=function Hi(){this.controls=so(this,gn,Gp).call(this)},Gp=function Gp(){var _this=this;var e;return(e=this.container.controls)==null?void 0:e.reduce(function(i,c){var d1=c.type.trim().toLowerCase(),l=_this.factories.get(d1);return l?_to_consumable_array(i).concat([l(c)]):_to_consumable_array(i)},[])};var zi=function(t,e){if(t.type.trim().toLowerCase()==="choice")return new mc(t,e)},mc=/*#__PURE__*/function(hr){"use strict";_inherits(mc,hr);function mc(e,i){_class_call_check(this,mc);var _this;_this=_call_super(this,mc,[e]),_this.rootElement=i!=null?i:Ni(),_this.layout=new Fi(_this.container.layout),_this.isRemoved=!1,_this.isDisabled=!1,_this.addControlFactory("button",ji),_this.addControlFactory("text",zp),_this.addControlFactory("area",Bi);return _this}_create_class(mc,[{key:"createView",value:function createView(e){var _this=this;var i=document.createElement("div");return i.classList.add("".concat(Ce,"-").concat(this.container.id)),this.layout.setContainerLayout(i),this.controls.forEach(function(c){c.createView({parentElement:i,layoutCallback:_this.layout.setControlLayout}),c.setEvents(e)}),this.rootElement.append(i),this.isRemoved=!1,i}},{key:"hide",value:function hide(){var e=this.getElement();e&&(e.style.visibility="hidden")}},{key:"show",value:function show(){var e=this.getElement();e&&(e.style.visibility="visible")}},{key:"enable",value:function enable(){var e=this.getElement();e&&(this.controls.forEach(function(i){return i.enable()}),e.style.opacity=1,this.isDisabled=!1)}},{key:"disable",value:function disable(){var e=this.getElement();e&&(this.controls.forEach(function(i){return i.disable()}),e.style.opacity=Up,this.isDisabled=!0)}},{key:"removeView",value:function removeView(){var e;this.isRemoved||(this.controls.forEach(function(i){return i.removeListeners()}),(e=this.getElement())==null||e.remove(),this.isRemoved=!0)}},{key:"getElement",value:function getElement(){return this.rootElement.querySelector(".".concat(Ce,"-").concat(this.container.id))}}]);return mc}(hr);var Yp=(typeof globalThis==="undefined"?"undefined":_type_of(globalThis))=="object"?globalThis:(typeof self==="undefined"?"undefined":_type_of(self))=="object"?self:(typeof window==="undefined"?"undefined":_type_of(window))=="object"?window:(typeof global==="undefined"?"undefined":_type_of(global))=="object"?global:{};var cn="1.9.0";var Zp=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function Ub(t){var e=new Set([t]),i=new Set,c=t.match(Zp);if(!c)return function(){return!1};var d1={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};if(d1.prerelease!=null)return function(g){return g===t};function l(v){return i.add(v),!1}function m(v){return e.add(v),!0}return function(g){if(e.has(g))return!0;if(i.has(g))return!1;var S=g.match(Zp);if(!S)return l(g);var b={major:+S[1],minor:+S[2],patch:+S[3],prerelease:S[4]};return b.prerelease!=null||d1.major!==b.major?l(g):d1.major===0?d1.minor===b.minor&&d1.patch<=b.patch?m(g):l(g):d1.minor<=b.minor?m(g):l(g)}}var Wp=Ub(cn);var jb=cn.split(".")[0],co=Symbol.for("opentelemetry.js.api."+jb),lo=Yp;function fr(t,e,i,c){var d1;c===void 0&&(c=!1);var l=lo[co]=(d1=lo[co])!==null&&d1!==void 0?d1:{version:cn};if(!c&&l[t]){var m=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return i.error(m.stack||m.message),!1}if(l.version!==cn){var m=new Error("@opentelemetry/api: Registration of version v"+l.version+" for "+t+" does not match previously registered API v"+cn);return i.error(m.stack||m.message),!1}return l[t]=e,i.debug("@opentelemetry/api: Registered a global for "+t+" v"+cn+"."),!0}function ln(t){var e,i,c=(e=lo[co])===null||e===void 0?void 0:e.version;if(!(!c||!Wp(c)))return(i=lo[co])===null||i===void 0?void 0:i[t]}function mr(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+cn+".");var i=lo[co];i&&delete i[t]}var Fb=function Fb(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},Hb=function Hb(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))},$p=function(){function t(e){this._namespace=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return uo("debug",this._namespace,e)},t.prototype.error=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return uo("error",this._namespace,e)},t.prototype.info=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return uo("info",this._namespace,e)},t.prototype.warn=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return uo("warn",this._namespace,e)},t.prototype.verbose=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return uo("verbose",this._namespace,e)},t}();function uo(t,e,i){var c=ln("diag");if(c)return i.unshift(e),c[t].apply(c,Hb([],Fb(i),!1))}var se;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(se||(se={}));function Xp(t,e){t<se.NONE?t=se.NONE:t>se.ALL&&(t=se.ALL),e=e||{};function i(c,d1){var l=e[c];return typeof l=="function"&&t>=d1?l.bind(e):function(){}}return{error:i("error",se.ERROR),warn:i("warn",se.WARN),info:i("info",se.INFO),debug:i("debug",se.DEBUG),verbose:i("verbose",se.VERBOSE)}}var zb=function zb(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},Gb=function Gb(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))},Yb="diag",vr=function(){function t(){function e(d1){return function(){for(var l=[],m=0;m<arguments.length;m++)l[m]=arguments[m];var v=ln("diag");if(v)return v[d1].apply(v,Gb([],zb(l),!1))}}var i=this,c=function c(d1,l){var m,v,g;if(l===void 0&&(l={logLevel:se.INFO}),d1===i){var S=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return i.error((m=S.stack)!==null&&m!==void 0?m:S.message),!1}typeof l=="number"&&(l={logLevel:l});var b=ln("diag"),A=Xp((v=l.logLevel)!==null&&v!==void 0?v:se.INFO,d1);if(b&&!l.suppressOverrideMessage){var L=(g=new Error().stack)!==null&&g!==void 0?g:"<failed to generate stacktrace>";b.warn("Current logger will be overwritten from "+L),A.warn("Current logger will overwrite one already registered from "+L)}return fr("diag",A,i,!0)};i.setLogger=c,i.disable=function(){mr(Yb,i)},i.createComponentLogger=function(d1){return new $p(d1)},i.verbose=e("verbose"),i.debug=e("debug"),i.info=e("info"),i.warn=e("warn"),i.error=e("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}();function Kp(t){return Symbol.for(t)}var Zb=function(){function t(e){var i=this;i._currentContext=e?new Map(e):new Map,i.getValue=function(c){return i._currentContext.get(c)},i.setValue=function(c,d1){var l=new t(i._currentContext);return l._currentContext.set(c,d1),l},i.deleteValue=function(c){var d1=new t(i._currentContext);return d1._currentContext.delete(c),d1}}return t}(),qp=new Zb;var Wb=function Wb(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},$b=function $b(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))},Qp=function(){function t(){}return t.prototype.active=function(){return qp},t.prototype.with=function(e,i,c){for(var d1=[],l=3;l<arguments.length;l++)d1[l-3]=arguments[l];return i.call.apply(i,$b([c],Wb(d1),!1))},t.prototype.bind=function(e,i){return i},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}();var Xb=function Xb(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},Kb=function Kb(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))},vc="context",qb=new Qp,yr=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(e){return fr(vc,e,vr.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(e,i,c){for(var d1,l=[],m=3;m<arguments.length;m++)l[m-3]=arguments[m];return(d1=this._getContextManager()).with.apply(d1,Kb([e,i,c],Xb(l),!1))},t.prototype.bind=function(e,i){return this._getContextManager().bind(e,i)},t.prototype._getContextManager=function(){return ln(vc)||qb},t.prototype.disable=function(){this._getContextManager().disable(),mr(vc,vr.instance())},t}();var Gi;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(Gi||(Gi={}));var yc="0000000000000000",_c="00000000000000000000000000000000",Jp={traceId:_c,spanId:yc,traceFlags:Gi.NONE};var En=function(){function t(e){e===void 0&&(e=Jp),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,i){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,i){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,i){},t}();var gc=Kp("OpenTelemetry Context Key SPAN");function Yi(t){return t.getValue(gc)||void 0}function th(){return Yi(yr.getInstance().active())}function po(t,e){return t.setValue(gc,e)}function eh(t){return t.deleteValue(gc)}function nh(t,e){return po(t,new En(e))}function Zi(t){var e;return(e=Yi(t))===null||e===void 0?void 0:e.spanContext()}var Qb=/^([0-9a-f]{32})$/i,Jb=/^[0-9a-f]{16}$/i;function tC(t){return Qb.test(t)&&t!==_c}function eC(t){return Jb.test(t)&&t!==yc}function Wi(t){return tC(t.traceId)&&eC(t.spanId)}function rh(t){return new En(t)}var Ec=yr.getInstance(),$i=function(){function t(){}return t.prototype.startSpan=function(e,i,c){c===void 0&&(c=Ec.active());var d1=!!(i!=null&&i.root);if(d1)return new En;var l=c&&Zi(c);return nC(l)&&Wi(l)?new En(l):new En},t.prototype.startActiveSpan=function(e,i,c,d1){var l,m,v;if(!(arguments.length<2)){arguments.length===2?v=i:arguments.length===3?(l=i,v=c):(l=i,m=c,v=d1);var g=m!=null?m:Ec.active(),S=this.startSpan(e,l,g),b=po(g,S);return Ec.with(b,v,void 0,S)}},t}();function nC(t){return(typeof t==="undefined"?"undefined":_type_of(t))=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var rC=new $i,oh=function(){function t(e,i,c,d1){this._provider=e,this.name=i,this.version=c,this.options=d1}return t.prototype.startSpan=function(e,i,c){return this._getTracer().startSpan(e,i,c)},t.prototype.startActiveSpan=function(e,i,c,d1){var l=this._getTracer();return Reflect.apply(l.startActiveSpan,l,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):rC},t}();var ih=function(){function t(){}return t.prototype.getTracer=function(e,i,c){return new $i},t}();var oC=new ih,Tc=function(){function t(){}return t.prototype.getTracer=function(e,i,c){var d1;return(d1=this.getDelegateTracer(e,i,c))!==null&&d1!==void 0?d1:new oh(this,e,i,c)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:oC},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,i,c){var d1;return(d1=this._delegate)===null||d1===void 0?void 0:d1.getTracer(e,i,c)},t}();var Sc=yr.getInstance();var bc="trace",ah=function(){function t(){this._proxyTracerProvider=new Tc,this.wrapSpanContext=rh,this.isSpanContextValid=Wi,this.deleteSpan=eh,this.getSpan=Yi,this.getActiveSpan=th,this.getSpanContext=Zi,this.setSpan=po,this.setSpanContext=nh}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var i=fr(bc,this._proxyTracerProvider,vr.instance());return i&&this._proxyTracerProvider.setDelegate(e),i},t.prototype.getTracerProvider=function(){return ln(bc)||this._proxyTracerProvider},t.prototype.getTracer=function(e,i){return this.getTracerProvider().getTracer(e,i)},t.prototype.disable=function(){mr(bc,vr.instance()),this._proxyTracerProvider=new Tc},t}();var Cc=ah.getInstance();var iC=Object.create,Kc=Object.defineProperty,aC=Object.getOwnPropertyDescriptor,sC=Object.getOwnPropertyNames,cC=Object.getPrototypeOf,lC=Object.prototype.hasOwnProperty,G=function(t,e){return function(){return e||t((e={exports:{}}).exports,e),e.exports}},uC=function(t,e){for(var i in e)Kc(t,i,{get:e[i],enumerable:!0})},dC=function(t,e,i,c){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(e&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"||typeof e=="function")try{var _loop=function(){var d1=_step.value;!lC.call(t,d1)&&d1!==i&&Kc(t,d1,{get:function(){return e[d1]},enumerable:!(c=aC(e,d1))||c.enumerable})};for(var _iterator=sC(e)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true)_loop()}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return t},pC=function(t,e,i){return i=t!=null?iC(cC(t)):{},dC(e||!t||!t.__esModule?Kc(i,"default",{value:t,enumerable:!0}):i,t)},pn=G(function(t,e){"use strict";e.exports=function(i){try{return!!i()}catch(c){return!0}}}),_a=G(function(t,e){"use strict";var i=pn();e.exports=!i(function(){var c=(function(){}).bind();return typeof c!="function"||c.hasOwnProperty("prototype")})}),Sn=G(function(t,e){"use strict";var i=_a(),c=Function.prototype,d1=c.call,l=i&&c.bind.bind(d1,d1);e.exports=i?l:function(m){return function(){return d1.apply(m,arguments)}}}),qc=G(function(t,e){"use strict";var i=Sn(),c=i({}.toString),d1=i("".slice);e.exports=function(l){return d1(c(l),8,-1)}}),hC=G(function(t,e){"use strict";var i=Sn(),c=pn(),d1=qc(),l=Object,m=i("".split);e.exports=c(function(){return!l("z").propertyIsEnumerable(0)})?function(v){return d1(v)==="String"?m(v,""):l(v)}:l}),Qc=G(function(t,e){"use strict";e.exports=function(i){return i==null}}),Jc=G(function(t,e){"use strict";var i=Qc(),c=TypeError;e.exports=function(d1){if(i(d1))throw new c("Can't call method on "+d1);return d1}}),Ao=G(function(t,e){"use strict";var i=hC(),c=Jc();e.exports=function(d1){return i(c(d1))}}),fC=G(function(t,e){"use strict";e.exports=function(){}}),Lr=G(function(t,e){"use strict";e.exports={}}),Me=G(function(t,e){"use strict";var i=function i(c){return c&&c.Math===Math&&c};e.exports=i((typeof globalThis==="undefined"?"undefined":_type_of(globalThis))=="object"&&globalThis)||i((typeof window==="undefined"?"undefined":_type_of(window))=="object"&&window)||i((typeof self==="undefined"?"undefined":_type_of(self))=="object"&&self)||i((typeof global==="undefined"?"undefined":_type_of(global))=="object"&&global)||i((typeof t==="undefined"?"undefined":_type_of(t))=="object"&&t)||function(){return this}()||Function("return this")()}),Ie=G(function(t,e){"use strict";var i=(typeof document==="undefined"?"undefined":_type_of(document))=="object"&&document.all;e.exports=(typeof i==="undefined"?"undefined":_type_of(i))>"u"&&i!==void 0?function(c){return typeof c=="function"||c===i}:function(c){return typeof c=="function"}}),mC=G(function(t,e){"use strict";var i=Me(),c=Ie(),d1=i.WeakMap;e.exports=c(d1)&&/native code/.test(String(d1))}),bn=G(function(t,e){"use strict";var i=Ie();e.exports=function(c){return(typeof c==="undefined"?"undefined":_type_of(c))=="object"?c!==null:i(c)}}),hn=G(function(t,e){"use strict";var i=pn();e.exports=!i(function(){return Object.defineProperty({},1,{get:function get(){return 7}})[1]!==7})}),Mh=G(function(t,e){"use strict";var i=Me(),c=bn(),d1=i.document,l=c(d1)&&c(d1.createElement);e.exports=function(m){return l?d1.createElement(m):{}}}),Ih=G(function(t,e){"use strict";var i=hn(),c=pn(),d1=Mh();e.exports=!i&&!c(function(){return Object.defineProperty(d1("div"),"a",{get:function get(){return 7}}).a!==7})}),Nh=G(function(t,e){"use strict";var i=hn(),c=pn();e.exports=i&&c(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}),xr=G(function(t,e){"use strict";var i=bn(),c=String,d1=TypeError;e.exports=function(l){if(i(l))return l;throw new d1(c(l)+" is not an object")}}),Zn=G(function(t,e){"use strict";var i=_a(),c=Function.prototype.call;e.exports=i?c.bind(c):function(){return c.apply(c,arguments)}}),tl=G(function(t,e){"use strict";e.exports={}}),Ph=G(function(t,e){"use strict";var i=tl(),c=Me(),d1=Ie(),l=function l(m){return d1(m)?m:void 0};e.exports=function(m,v){return arguments.length<2?l(i[m])||l(c[m]):i[m]&&i[m][v]||c[m]&&c[m][v]}}),Dh=G(function(t,e){"use strict";var i=Sn();e.exports=i({}.isPrototypeOf)}),vC=G(function(t,e){"use strict";var i=Me(),c=i.navigator,d1=c&&c.userAgent;e.exports=d1?String(d1):""}),yC=G(function(t,e){"use strict";var i=Me(),c=vC(),d1=i.process,l=i.Deno,m=d1&&d1.versions||l&&l.version,v=m&&m.v8,g,S;v&&(g=v.split("."),S=g[0]>0&&g[0]<4?1:+(g[0]+g[1])),!S&&c&&(g=c.match(/Edge\/(\d+)/),(!g||g[1]>=74)&&(g=c.match(/Chrome\/(\d+)/),g&&(S=+g[1]))),e.exports=S}),kh=G(function(t,e){"use strict";var i=yC(),c=pn(),d1=Me(),l=d1.String;e.exports=!!Object.getOwnPropertySymbols&&!c(function(){var m=Symbol("symbol detection");return!l(m)||!_instanceof(Object(m),Symbol)||!Symbol.sham&&i&&i<41})}),Vh=G(function(t,e){"use strict";var i=kh();e.exports=i&&!Symbol.sham&&_type_of(Symbol.iterator)=="symbol"}),Bh=G(function(t,e){"use strict";var i=Ph(),c=Ie(),d1=Dh(),l=Vh(),m=Object;e.exports=l?function(v){return(typeof v==="undefined"?"undefined":_type_of(v))=="symbol"}:function(v){var g=i("Symbol");return c(g)&&d1(g.prototype,m(v))}}),el=G(function(t,e){"use strict";var i=String;e.exports=function(c){try{return i(c)}catch(d1){return"Object"}}}),ga=G(function(t,e){"use strict";var i=Ie(),c=el(),d1=TypeError;e.exports=function(l){if(i(l))return l;throw new d1(c(l)+" is not a function")}}),nl=G(function(t,e){"use strict";var i=ga(),c=Qc();e.exports=function(d1,l){var m=d1[l];return c(m)?void 0:i(m)}}),_C=G(function(t,e){"use strict";var i=Zn(),c=Ie(),d1=bn(),l=TypeError;e.exports=function(m,v){var g,S;if(v==="string"&&c(g=m.toString)&&!d1(S=i(g,m))||c(g=m.valueOf)&&!d1(S=i(g,m))||v!=="string"&&c(g=m.toString)&&!d1(S=i(g,m)))return S;throw new l("Can't convert object to primitive value")}}),Ea=G(function(t,e){"use strict";e.exports=!0}),gC=G(function(t,e){"use strict";var i=Me(),c=Object.defineProperty;e.exports=function(d1,l){try{c(i,d1,{value:l,configurable:!0,writable:!0})}catch(m){i[d1]=l}return l}}),rl=G(function(t,e){"use strict";var i=Ea(),c=Me(),d1=gC(),l="__core-js_shared__",m=e.exports=c[l]||d1(l,{});(m.versions||(m.versions=[])).push({version:"3.38.0",mode:i?"pure":"global",copyright:"\xa9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),Uh=G(function(t,e){"use strict";var i=rl();e.exports=function(c,d1){return i[c]||(i[c]=d1||{})}}),jh=G(function(t,e){"use strict";var i=Jc(),c=Object;e.exports=function(d1){return c(i(d1))}}),Cn=G(function(t,e){"use strict";var i=Sn(),c=jh(),d1=i({}.hasOwnProperty);e.exports=Object.hasOwn||function(l,m){return d1(c(l),m)}}),Fh=G(function(t,e){"use strict";var i=Sn(),c=0,d1=Math.random(),l=i(1..toString);e.exports=function(m){return"Symbol("+(m===void 0?"":m)+")_"+l(++c+d1,36)}}),wn=G(function(t,e){"use strict";var i=Me(),c=Uh(),d1=Cn(),l=Fh(),m=kh(),v=Vh(),g=i.Symbol,S=c("wks"),b=v?g.for||g:g&&g.withoutSetter||l;e.exports=function(A){return d1(S,A)||(S[A]=m&&d1(g,A)?g[A]:b("Symbol."+A)),S[A]}}),EC=G(function(t,e){"use strict";var i=Zn(),c=bn(),d1=Bh(),l=nl(),m=_C(),v=wn(),g=TypeError,S=v("toPrimitive");e.exports=function(b,A){if(!c(b)||d1(b))return b;var L=l(b,S),N;if(L){if(A===void 0&&(A="default"),N=i(L,b,A),!c(N)||d1(N))return N;throw new g("Can't convert object to primitive value")}return A===void 0&&(A="number"),m(b,A)}}),Hh=G(function(t,e){"use strict";var i=EC(),c=Bh();e.exports=function(d1){var l=i(d1,"string");return c(l)?l:l+""}}),Oo=G(function(t){"use strict";var e=hn(),i=Ih(),c=Nh(),d1=xr(),l=Hh(),m=TypeError,v=Object.defineProperty,g=Object.getOwnPropertyDescriptor,S="enumerable",b="configurable",A="writable";t.f=e?c?function(L,N,F){if(d1(L),N=l(N),d1(F),typeof L=="function"&&N==="prototype"&&"value"in F&&A in F&&!F[A]){var z=g(L,N);z&&z[A]&&(L[N]=F.value,F={configurable:b in F?F[b]:z[b],enumerable:S in F?F[S]:z[S],writable:!1})}return v(L,N,F)}:v:function(L,N,F){if(d1(L),N=l(N),d1(F),i)try{return v(L,N,F)}catch(z){}if("get"in F||"set"in F)throw new m("Accessors not supported");return"value"in F&&(L[N]=F.value),L}}),Ta=G(function(t,e){"use strict";e.exports=function(i,c){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:c}}}),Lo=G(function(t,e){"use strict";var i=hn(),c=Oo(),d1=Ta();e.exports=i?function(l,m,v){return c.f(l,m,d1(1,v))}:function(l,m,v){return l[m]=v,l}}),ol=G(function(t,e){"use strict";var i=Uh(),c=Fh(),d1=i("keys");e.exports=function(l){return d1[l]||(d1[l]=c(l))}}),il=G(function(t,e){"use strict";e.exports={}}),TC=G(function(t,e){"use strict";var i=mC(),c=Me(),d1=bn(),l=Lo(),m=Cn(),v=rl(),g=ol(),S=il(),b="Object already initialized",A=c.TypeError,L=c.WeakMap,N,F,z,j=function j(I){return z(I)?F(I):N(I,{})},P=function P(I){return function(H){var Q;if(!d1(H)||(Q=F(H)).type!==I)throw new A("Incompatible receiver, "+I+" required");return Q}};i||v.state?(k=v.state||(v.state=new L),k.get=k.get,k.has=k.has,k.set=k.set,N=function N(I,H){if(k.has(I))throw new A(b);return H.facade=I,k.set(I,H),H},F=function F(I){return k.get(I)||{}},z=function z(I){return k.has(I)}):(U=g("state"),S[U]=!0,N=function N(I,H){if(m(I,U))throw new A(b);return H.facade=I,l(I,U,H),H},F=function F(I){return m(I,U)?I[U]:{}},z=function z(I){return m(I,U)});var k,U;e.exports={set:N,get:F,has:z,enforce:j,getterFor:P}}),SC=G(function(t,e){"use strict";var i=_a(),c=Function.prototype,d1=c.apply,l=c.call;e.exports=(typeof Reflect==="undefined"?"undefined":_type_of(Reflect))=="object"&&Reflect.apply||(i?l.bind(d1):function(){return l.apply(d1,arguments)})}),zh=G(function(t,e){"use strict";var i=qc(),c=Sn();e.exports=function(d1){if(i(d1)==="Function")return c(d1)}}),bC=G(function(t){"use strict";var e={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,c=i&&!e.call({1:2},1);t.f=c?function(d1){var l=i(this,d1);return!!l&&l.enumerable}:e}),CC=G(function(t){"use strict";var e=hn(),i=Zn(),c=bC(),d1=Ta(),l=Ao(),m=Hh(),v=Cn(),g=Ih(),S=Object.getOwnPropertyDescriptor;t.f=e?S:function(b,A){if(b=l(b),A=m(A),g)try{return S(b,A)}catch(L){}if(v(b,A))return d1(!i(c.f,b,A),b[A])}}),wC=G(function(t,e){"use strict";var i=pn(),c=Ie(),d1=/#|\.prototype\./,l=function l(b,A){var L=v[m(b)];return L===S?!0:L===g?!1:c(A)?i(A):!!A},m=l.normalize=function m(b){return String(b).replace(d1,".").toLowerCase()},v=l.data={},g=l.NATIVE="N",S=l.POLYFILL="P";e.exports=l}),Gh=G(function(t,e){"use strict";var i=zh(),c=ga(),d1=_a(),l=i(i.bind);e.exports=function(m,v){return c(m),v===void 0?m:d1?l(m,v):function(){return m.apply(v,arguments)}}}),Yh=G(function(t,e){"use strict";var i=Me(),c=SC(),d1=zh(),l=Ie(),m=CC().f,v=wC(),g=tl(),S=Gh(),b=Lo(),A=Cn();rl();var L=function L(N){var F=function F1(z,j,P){if(_instanceof(this,F)){switch(arguments.length){case 0:return new N;case 1:return new N(z);case 2:return new N(z,j)}return new N(z,j,P)}return c(N,this,arguments)};return F.prototype=N.prototype,F};e.exports=function(N,F){var z=N.target,j=N.global,P=N.stat,k=N.proto,U=j?i:P?i[z]:i[z]&&i[z].prototype,I=j?g:g[z]||b(g,z,{})[z],H=I.prototype,Q,st,mt,rt,at,pt,vt,Ct,Ft;for(rt in F)Q=v(j?rt:z+(P?".":"#")+rt,N.forced),st=!Q&&U&&A(U,rt),pt=I[rt],st&&(N.dontCallGetSet?(Ft=m(U,rt),vt=Ft&&Ft.value):vt=U[rt]),at=st&&vt?vt:F[rt],!(!Q&&!k&&(typeof pt==="undefined"?"undefined":_type_of(pt))==(typeof at==="undefined"?"undefined":_type_of(at)))&&(N.bind&&st?Ct=S(at,i):N.wrap&&st?Ct=L(at):k&&l(at)?Ct=d1(at):Ct=at,(N.sham||at&&at.sham||pt&&pt.sham)&&b(Ct,"sham",!0),b(I,rt,Ct),k&&(mt=z+"Prototype",A(g,mt)||b(g,mt,{}),b(g[mt],rt,at),N.real&&H&&(Q||!H[rt])&&b(H,rt,at)))}}),AC=G(function(t,e){"use strict";var i=hn(),c=Cn(),d1=Function.prototype,l=i&&Object.getOwnPropertyDescriptor,m=c(d1,"name"),v=m&&(function(){}).name==="something",g=m&&(!i||i&&l(d1,"name").configurable);e.exports={EXISTS:m,PROPER:v,CONFIGURABLE:g}}),OC=G(function(t,e){"use strict";var i=Math.ceil,c=Math.floor;e.exports=Math.trunc||function(d1){var l=+d1;return(l>0?c:i)(l)}}),Zh=G(function(t,e){"use strict";var i=OC();e.exports=function(c){var d1=+c;return d1!==d1||d1===0?0:i(d1)}}),LC=G(function(t,e){"use strict";var i=Zh(),c=Math.max,d1=Math.min;e.exports=function(l,m){var v=i(l);return v<0?c(v+m,0):d1(v,m)}}),xC=G(function(t,e){"use strict";var i=Zh(),c=Math.min;e.exports=function(d1){var l=i(d1);return l>0?c(l,0x1fffffffffffff):0}}),Wh=G(function(t,e){"use strict";var i=xC();e.exports=function(c){return i(c.length)}}),RC=G(function(t,e){"use strict";var i=Ao(),c=LC(),d1=Wh(),l=function l(m){return function(v,g,S){var b=i(v),A=d1(b);if(A===0)return!m&&-1;var L=c(S,A),N;if(m&&g!==g){for(;A>L;)if(N=b[L++],N!==N)return!0}else for(;A>L;L++)if((m||L in b)&&b[L]===g)return m||L||0;return!m&&-1}};e.exports={includes:l(!0),indexOf:l(!1)}}),MC=G(function(t,e){"use strict";var i=Sn(),c=Cn(),d1=Ao(),l=RC().indexOf,m=il(),v=i([].push);e.exports=function(g,S){var b=d1(g),A=0,L=[],N;for(N in b)!c(m,N)&&c(b,N)&&v(L,N);for(;S.length>A;)c(b,N=S[A++])&&(~l(L,N)||v(L,N));return L}}),$h=G(function(t,e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),IC=G(function(t,e){"use strict";var i=MC(),c=$h();e.exports=Object.keys||function(d1){return i(d1,c)}}),NC=G(function(t){"use strict";var e=hn(),i=Nh(),c=Oo(),d1=xr(),l=Ao(),m=IC();t.f=e&&!i?Object.defineProperties:function(v,g){d1(v);for(var S=l(g),b=m(g),A=b.length,L=0,N;A>L;)c.f(v,N=b[L++],S[N]);return v}}),PC=G(function(t,e){"use strict";var i=Ph();e.exports=i("document","documentElement")}),Xh=G(function(t,e){"use strict";var i=xr(),c=NC(),d1=$h(),l=il(),m=PC(),v=Mh(),g=ol(),S=">",b="<",A="prototype",L="script",N=g("IE_PROTO"),F=function F(){},z=function z(I){return b+L+S+I+b+"/"+L+S},j=function j(I){I.write(z("")),I.close();var H=I.parentWindow.Object;return I=null,H},P=function P(){var I=v("iframe"),H="java"+L+":",Q;return I.style.display="none",m.appendChild(I),I.src=String(H),Q=I.contentWindow.document,Q.open(),Q.write(z("document.F=Object")),Q.close(),Q.F},k,U=function U1(){try{k=new ActiveXObject("htmlfile")}catch(H){}U=(typeof document==="undefined"?"undefined":_type_of(document))<"u"?document.domain&&k?j(k):P():j(k);for(var I=d1.length;I--;)delete U[A][d1[I]];return U()};l[N]=!0,e.exports=Object.create||function(I,H){var Q;return I!==null?(F[A]=i(I),Q=new F,F[A]=null,Q[N]=I):Q=U(),H===void 0?Q:c.f(Q,H)}}),DC=G(function(t,e){"use strict";var i=pn();e.exports=!i(function(){function c(){}return c.prototype.constructor=null,Object.getPrototypeOf(new c)!==c.prototype})}),Kh=G(function(t,e){"use strict";var i=Cn(),c=Ie(),d1=jh(),l=ol(),m=DC(),v=l("IE_PROTO"),g=Object,S=g.prototype;e.exports=m?g.getPrototypeOf:function(b){var A=d1(b);if(i(A,v))return A[v];var L=A.constructor;return c(L)&&_instanceof(A,L)?L.prototype:_instanceof(A,g)?S:null}}),qh=G(function(t,e){"use strict";var i=Lo();e.exports=function(c,d1,l,m){return m&&m.enumerable?c[d1]=l:i(c,d1,l),c}}),Qh=G(function(t,e){"use strict";var i=pn(),c=Ie(),d1=bn(),l=Xh(),m=Kh(),v=qh(),g=wn(),S=Ea(),b=g("iterator"),A=!1,L,N,F;[].keys&&(F=[].keys(),"next"in F?(N=m(m(F)),N!==Object.prototype&&(L=N)):A=!0);var z=!d1(L)||i(function(){var j={};return L[b].call(j)!==j});z?L={}:S&&(L=l(L)),c(L[b])||v(L,b,function(){return this}),e.exports={IteratorPrototype:L,BUGGY_SAFARI_ITERATORS:A}}),al=G(function(t,e){"use strict";var i=wn(),c=i("toStringTag"),d1={};d1[c]="z",e.exports=String(d1)==="[object z]"}),Jh=G(function(t,e){"use strict";var i=al(),c=Ie(),d1=qc(),l=wn(),m=l("toStringTag"),v=Object,g=d1(function(){return arguments}())==="Arguments",S=function S(b,A){try{return b[A]}catch(L){}};e.exports=i?d1:function(b){var A,L,N;return b===void 0?"Undefined":b===null?"Null":typeof(L=S(A=v(b),m))=="string"?L:g?d1(A):(N=d1(A))==="Object"&&c(A.callee)?"Arguments":N}}),kC=G(function(t,e){"use strict";var i=al(),c=Jh();e.exports=i?({}).toString:function(){return"[object "+c(this)+"]"}}),sl=G(function(t,e){"use strict";var i=al(),c=Oo().f,d1=Lo(),l=Cn(),m=kC(),v=wn(),g=v("toStringTag");e.exports=function(S,b,A,L){var N=A?S:S&&S.prototype;N&&(l(N,g)||c(N,g,{configurable:!0,value:b}),L&&!i&&d1(N,"toString",m))}}),VC=G(function(t,e){"use strict";var i=Qh().IteratorPrototype,c=Xh(),d1=Ta(),l=sl(),m=Lr(),v=function v(){return this};e.exports=function(g,S,b,A){var L=S+" Iterator";return g.prototype=c(i,{next:d1(+!A,b)}),l(g,L,!1,!0),m[L]=v,g}}),BC=G(function(t,e){"use strict";var i=Sn(),c=ga();e.exports=function(d1,l,m){try{return i(c(Object.getOwnPropertyDescriptor(d1,l)[m]))}catch(v){}}}),UC=G(function(t,e){"use strict";var i=bn();e.exports=function(c){return i(c)||c===null}}),jC=G(function(t,e){"use strict";var i=UC(),c=String,d1=TypeError;e.exports=function(l){if(i(l))return l;throw new d1("Can't set "+c(l)+" as a prototype")}}),FC=G(function(t,e){"use strict";var i=BC(),c=bn(),d1=Jc(),l=jC();e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var m=!1,v={},g;try{g=i(Object.prototype,"__proto__","set"),g(v,[]),m=_instanceof(v,Array)}catch(S){}return function(S,b){return d1(S),l(b),c(S)&&(m?g(S,b):S.__proto__=b),S}}():void 0)}),HC=G(function(t,e){"use strict";var i=Yh(),c=Zn(),d1=Ea(),l=AC(),m=Ie(),v=VC(),g=Kh(),S=FC(),b=sl(),A=Lo(),L=qh(),N=wn(),F=Lr(),z=Qh(),j=l.PROPER,P=l.CONFIGURABLE,k=z.IteratorPrototype,U=z.BUGGY_SAFARI_ITERATORS,I=N("iterator"),H="keys",Q="values",st="entries",mt=function mt(){return this};e.exports=function(rt,at,pt,vt,Ct,Ft,Bt){v(pt,at,vt);var Nt=function Nt(Gt){if(Gt===Ct&&qt)return qt;if(!U&&Gt&&Gt in Vt)return Vt[Gt];switch(Gt){case H:return function(){return new pt(this,Gt)};case Q:return function(){return new pt(this,Gt)};case st:return function(){return new pt(this,Gt)}}return function(){return new pt(this)}},wt=at+" Iterator",Ee=!1,Vt=rt.prototype,oe=Vt[I]||Vt["@@iterator"]||Ct&&Vt[Ct],qt=!U&&oe||Nt(Ct),De=at==="Array"&&Vt.entries||oe,Qt,Jt,le;if(De&&(Qt=g(De.call(new rt)),Qt!==Object.prototype&&Qt.next&&(!d1&&g(Qt)!==k&&(S?S(Qt,k):m(Qt[I])||L(Qt,I,mt)),b(Qt,wt,!0,!0),d1&&(F[wt]=mt))),j&&Ct===Q&&oe&&oe.name!==Q&&(!d1&&P?A(Vt,"name",Q):(Ee=!0,qt=function qt(){return c(oe,this)})),Ct)if(Jt={values:Nt(Q),keys:Ft?qt:Nt(H),entries:Nt(st)},Bt)for(le in Jt)(U||Ee||!(le in Vt))&&L(Vt,le,Jt[le]);else i({target:at,proto:!0,forced:U||Ee},Jt);return(!d1||Bt)&&Vt[I]!==qt&&L(Vt,I,qt,{name:Ct}),F[at]=qt,Jt}}),zC=G(function(t,e){"use strict";e.exports=function(i,c){return{value:i,done:c}}}),tf=G(function(t,e){"use strict";var i=Ao(),c=fC(),d1=Lr(),l=TC(),m=Oo().f,v=HC(),g=zC(),S=Ea(),b=hn(),A="Array Iterator",L=l.set,N=l.getterFor(A);e.exports=v(Array,"Array",function(z,j){L(this,{type:A,target:i(z),index:0,kind:j})},function(){var z=N(this),j=z.target,P=z.index++;if(!j||P>=j.length)return z.target=void 0,g(void 0,!0);switch(z.kind){case"keys":return g(P,!1);case"values":return g(j[P],!1)}return g([P,j[P]],!1)},"values");var F=d1.Arguments=d1.Array;if(c("keys"),c("values"),c("entries"),!S&&b&&F.name!=="values")try{m(F,"name",{value:"values"})}catch(z){}}),GC=G(function(t,e){"use strict";var i=wn(),c=Lr(),d1=i("iterator"),l=Array.prototype;e.exports=function(m){return m!==void 0&&(c.Array===m||l[d1]===m)}}),ef=G(function(t,e){"use strict";var i=Jh(),c=nl(),d1=Qc(),l=Lr(),m=wn(),v=m("iterator");e.exports=function(g){if(!d1(g))return c(g,v)||c(g,"@@iterator")||l[i(g)]}}),YC=G(function(t,e){"use strict";var i=Zn(),c=ga(),d1=xr(),l=el(),m=ef(),v=TypeError;e.exports=function(g,S){var b=arguments.length<2?m(g):S;if(c(b))return d1(i(b,g));throw new v(l(g)+" is not iterable")}}),ZC=G(function(t,e){"use strict";var i=Zn(),c=xr(),d1=nl();e.exports=function(l,m,v){var g,S;c(l);try{if(g=d1(l,"return"),!g){if(m==="throw")throw v;return v}g=i(g,l)}catch(b){S=!0,g=b}if(m==="throw")throw v;if(S)throw g;return c(g),v}}),WC=G(function(t,e){"use strict";var i=Gh(),c=Zn(),d1=xr(),l=el(),m=GC(),v=Wh(),g=Dh(),S=YC(),b=ef(),A=ZC(),L=TypeError,N=function N(z,j){this.stopped=z,this.result=j},F=N.prototype;e.exports=function(z,j,P){var k=P&&P.that,U=!!(P&&P.AS_ENTRIES),I=!!(P&&P.IS_RECORD),H=!!(P&&P.IS_ITERATOR),Q=!!(P&&P.INTERRUPTED),st=i(j,k),mt,rt,at,pt,vt,Ct,Ft,Bt=function Bt(wt){return mt&&A(mt,"normal",wt),new N(!0,wt)},Nt=function Nt(wt){return U?(d1(wt),Q?st(wt[0],wt[1],Bt):st(wt[0],wt[1])):Q?st(wt,Bt):st(wt)};if(I)mt=z.iterator;else if(H)mt=z;else{if(rt=b(z),!rt)throw new L(l(z)+" is not iterable");if(m(rt)){for(at=0,pt=v(z);pt>at;at++)if(vt=Nt(z[at]),vt&&g(F,vt))return vt;return new N(!1)}mt=S(z,rt)}for(Ct=I?z.next:mt.next;!(Ft=c(Ct,mt)).done;){try{vt=Nt(Ft.value)}catch(wt){A(mt,"throw",wt)}if((typeof vt==="undefined"?"undefined":_type_of(vt))=="object"&&vt&&g(F,vt))return vt}return new N(!1)}}),$C=G(function(t,e){"use strict";var i=hn(),c=Oo(),d1=Ta();e.exports=function(l,m,v){i?c.f(l,m,d1(0,v)):l[m]=v}}),XC=G(function(){"use strict";var t=Yh(),e=WC(),i=$C();t({target:"Object",stat:!0},{fromEntries:function fromEntries(c){var d1={};return e(c,function(l,m){i(d1,l,m)},{AS_ENTRIES:!0}),d1}})}),KC=G(function(t,e){"use strict";tf(),XC();var i=tl();e.exports=i.Object.fromEntries}),qC=G(function(t,e){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),QC=G(function(){"use strict";tf();var t=qC(),e=Me(),i=sl(),c=Lr();for(d1 in t)i(e[d1],d1),c[d1]=c.Array;var d1}),JC=G(function(t,e){"use strict";var i=KC();QC(),e.exports=i}),t5=G(function(t,e){"use strict";var i=JC();e.exports=i});var ge=/*#__PURE__*/function(){"use strict";function ge(){_class_call_check(this,ge);this.subscriptions=[]}_create_class(ge,[{key:"unsubscribe",value:function unsubscribe(){var t=this.subscriptions;this.subscriptions=[],t.forEach(function(e){return typeof e=="function"?e():e.unsubscribe()})}},{key:"add",value:function add(t){return this.subscriptions.push(t),this}}]);return ge}(),Rr=function(t){throw new Error("".concat(t," is value of unexpected type"))};var ho=function(){},Mr=/*#__PURE__*/function(){"use strict";function Mr(t){_class_call_check(this,Mr);t&&(this._subscribe=t)}_create_class(Mr,[{key:"subscribe",value:function subscribe(t,e){var l;var i;e?typeof e=="function"?i={next:e,error:ho}:i={next:function(m){return e.next(m)},error:function(m){var v;return(v=e.error)==null?void 0:v.call(e,m)}}:i={next:ho,error:ho};var c=typeof t=="function"?{next:function(m){try{t(m)}catch(v){i.next(v)}},error:function(m){return i.next(m)}}:{next:function(m){return t.next(m)},error:function(m){return t.error?t.error(m):i.next(m)}},d1;try{d1=this._subscribe(c)}catch(m){(l=c.error)==null||l.call(c,m)}return new ge().add(function(){switch(c.next=ho,c.error=ho,typeof d1==="undefined"?"undefined":_type_of(d1)){case"function":d1();return;case"object":d1.unsubscribe();return;case"undefined":return;default:return Rr(d1)}})}},{key:"pipe",value:function pipe(){for(var _len=arguments.length,t=new Array(_len),_key=0;_key<_len;_key++){t[_key]=arguments[_key]}return t.reduce(function(e,i){return i(e)},this)}},{key:"_subscribe",value:function _subscribe(t){}}]);return Mr}(),Ne=/*#__PURE__*/function(Mr){"use strict";_inherits(Ne,Mr);function Ne(){_class_call_check(this,Ne);var _this;_this=_call_super(this,Ne),_this.keyCounter=0,_this.subscribers=new Map;return _this}_create_class(Ne,[{key:"next",value:function next(t){this.subscribers.forEach(function(e){return e.next(t)})}},{key:"error",value:function error(t){this.subscribers.forEach(function(e){var i;return(i=e.error)==null?void 0:i.call(e,t)})}},{key:"_subscribe",value:function _subscribe(t){var _this=this;var e=this.keyCounter++;return this.subscribers.set(e,t),new ge().add(function(){return _this.subscribers.delete(e)})}}]);return Ne}(Mr);var e5=(typeof globalThis==="undefined"?"undefined":_type_of(globalThis))=="object"?globalThis:(typeof self==="undefined"?"undefined":_type_of(self))=="object"?self:(typeof window==="undefined"?"undefined":_type_of(window))=="object"?window:(typeof global==="undefined"?"undefined":_type_of(global))=="object"?global:{},zn="1.8.0",sh=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function n5(t){var e=new Set([t]),i=new Set,c=t.match(sh);if(!c)return function(){return!1};var d1={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};if(d1.prerelease!=null)return function(v){return v===t};function l(v){return i.add(v),!1}function m(v){return e.add(v),!0}return function(v){if(e.has(v))return!0;if(i.has(v))return!1;var g=v.match(sh);if(!g)return l(v);var S={major:+g[1],minor:+g[2],patch:+g[3],prerelease:g[4]};return S.prerelease!=null||d1.major!==S.major?l(v):d1.major===0?d1.minor===S.minor&&d1.patch<=S.patch?m(v):l(v):d1.minor<=S.minor?m(v):l(v)}}var r5=n5(zn),o5=zn.split(".")[0],bo=Symbol.for("opentelemetry.js.api."+o5),Co=e5;function xo(t,e,i,c){var d1;c===void 0&&(c=!1);var l=Co[bo]=(d1=Co[bo])!==null&&d1!==void 0?d1:{version:zn};if(!c&&l[t]){var m=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return i.error(m.stack||m.message),!1}if(l.version!==zn){var m=new Error("@opentelemetry/api: Registration of version v"+l.version+" for "+t+" does not match previously registered API v"+zn);return i.error(m.stack||m.message),!1}return l[t]=e,i.debug("@opentelemetry/api: Registered a global for "+t+" v"+zn+"."),!0}function Yn(t){var e,i,c=(e=Co[bo])===null||e===void 0?void 0:e.version;if(!(!c||!r5(c)))return(i=Co[bo])===null||i===void 0?void 0:i[t]}function Ro(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+zn+".");var i=Co[bo];i&&delete i[t]}var i5=function i5(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},a5=function a5(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))},s5=function(){function t(e){this._namespace=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return fo("debug",this._namespace,e)},t.prototype.error=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return fo("error",this._namespace,e)},t.prototype.info=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return fo("info",this._namespace,e)},t.prototype.warn=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return fo("warn",this._namespace,e)},t.prototype.verbose=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return fo("verbose",this._namespace,e)},t}();function fo(t,e,i){var c=Yn("diag");if(c)return i.unshift(e),c[t].apply(c,a5([],i5(i),!1))}var jt;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(jt||(jt={}));function c5(t,e){t<jt.NONE?t=jt.NONE:t>jt.ALL&&(t=jt.ALL),e=e||{};function i(c,d1){var l=e[c];return typeof l=="function"&&t>=d1?l.bind(e):function(){}}return{error:i("error",jt.ERROR),warn:i("warn",jt.WARN),info:i("info",jt.INFO),debug:i("debug",jt.DEBUG),verbose:i("verbose",jt.VERBOSE)}}var l5=function l5(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},u5=function u5(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))},d5="diag",Qe=function(){function t(){function e(d1){return function(){for(var l=[],m=0;m<arguments.length;m++)l[m]=arguments[m];var v=Yn("diag");if(v)return v[d1].apply(v,u5([],l5(l),!1))}}var i=this,c=function c(d1,l){var m,v,g;if(l===void 0&&(l={logLevel:jt.INFO}),d1===i){var S=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return i.error((m=S.stack)!==null&&m!==void 0?m:S.message),!1}typeof l=="number"&&(l={logLevel:l});var b=Yn("diag"),A=c5((v=l.logLevel)!==null&&v!==void 0?v:jt.INFO,d1);if(b&&!l.suppressOverrideMessage){var L=(g=new Error().stack)!==null&&g!==void 0?g:"<failed to generate stacktrace>";b.warn("Current logger will be overwritten from "+L),A.warn("Current logger will overwrite one already registered from "+L)}return xo("diag",A,i,!0)};i.setLogger=c,i.disable=function(){Ro(d5,i)},i.createComponentLogger=function(d1){return new s5(d1)},i.verbose=e("verbose"),i.debug=e("debug"),i.info=e("info"),i.warn=e("warn"),i.error=e("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),p5=function p5(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},h5=function h5(t){var e=typeof Symbol=="function"&&Symbol.iterator,i=e&&t[e],c=0;if(i)return i.call(t);if(t&&typeof t.length=="number")return{next:function next(){return t&&c>=t.length&&(t=void 0),{value:t&&t[c++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},f5=function(){function t(e){this._entries=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var i=this._entries.get(e);if(i)return Object.assign({},i)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var i=p5(e,2),c=i[0],d1=i[1];return[c,d1]})},t.prototype.setEntry=function(e,i){var c=new t(this._entries);return c._entries.set(e,i),c},t.prototype.removeEntry=function(e){var i=new t(this._entries);return i._entries.delete(e),i},t.prototype.removeEntries=function(){for(var e,i,c=[],d1=0;d1<arguments.length;d1++)c[d1]=arguments[d1];var l=new t(this._entries);try{for(var m=h5(c),v=m.next();!v.done;v=m.next()){var g=v.value;l._entries.delete(g)}}catch(S){e={error:S}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(e)throw e.error}}return l},t.prototype.clear=function(){return new t},t}(),m5=Symbol("BaggageEntryMetadata"),v5=Qe.instance();function y5(t){return t===void 0&&(t={}),new f5(new Map(Object.entries(t)))}function nf(t){return typeof t!="string"&&(v5.error("Cannot create baggage metadata from unknown type: "+(typeof t==="undefined"?"undefined":_type_of(t))),t=""),{__TYPE__:m5,toString:function toString(){return t}}}function Mo(t){return Symbol.for(t)}var _5=function(){function t(e){var i=this;i._currentContext=e?new Map(e):new Map,i.getValue=function(c){return i._currentContext.get(c)},i.setValue=function(c,d1){var l=new t(i._currentContext);return l._currentContext.set(c,d1),l},i.deleteValue=function(c){var d1=new t(i._currentContext);return d1._currentContext.delete(c),d1}}return t}(),jn=new _5,wc=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],g5=function(){function t(){function e(c){return function(){for(var d1=[],l=0;l<arguments.length;l++)d1[l]=arguments[l];if(console){var m=console[c];if(typeof m!="function"&&(m=console.log),typeof m=="function")return m.apply(console,d1)}}}for(var i=0;i<wc.length;i++)this[wc[i].n]=e(wc[i].c)}return t}(),Ir=function(){var t=function t1(e,i){return t=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(c,d1){c.__proto__=d1}||function(c,d1){for(var l in d1)Object.prototype.hasOwnProperty.call(d1,l)&&(c[l]=d1[l])},t(e,i)};return function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function c(){this.constructor=e}e.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}(),E5=function(){function t(){}return t.prototype.createHistogram=function(e,i){return L5},t.prototype.createCounter=function(e,i){return O5},t.prototype.createUpDownCounter=function(e,i){return x5},t.prototype.createObservableGauge=function(e,i){return M5},t.prototype.createObservableCounter=function(e,i){return R5},t.prototype.createObservableUpDownCounter=function(e,i){return I5},t.prototype.addBatchObservableCallback=function(e,i){},t.prototype.removeBatchObservableCallback=function(e){},t}(),cl=function(){function t(){}return t}(),T5=function(t){Ir(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(i,c){},e}(cl),S5=function(t){Ir(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(i,c){},e}(cl),b5=function(t){Ir(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(i,c){},e}(cl),ll=function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t}(),C5=function(t){Ir(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ll),w5=function(t){Ir(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ll),A5=function(t){Ir(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ll),rf=new E5,O5=new T5,L5=new b5,x5=new S5,R5=new C5,M5=new w5,I5=new A5;function N5(){return rf}var Vc;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(Vc||(Vc={}));var of={get:function get(t,e){if(t!=null)return t[e]},keys:function keys(t){return t==null?[]:Object.keys(t)}},af={set:function set(t,e,i){t!=null&&(t[e]=i)}},P5=function P5(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},D5=function D5(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))},k5=function(){function t(){}return t.prototype.active=function(){return jn},t.prototype.with=function(e,i,c){for(var d1=[],l=3;l<arguments.length;l++)d1[l-3]=arguments[l];return i.call.apply(i,D5([c],P5(d1),!1))},t.prototype.bind=function(e,i){return i},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),V5=function V5(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},B5=function B5(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))},Ac="context",U5=new k5,Sa=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(e){return xo(Ac,e,Qe.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(e,i,c){for(var d1,l=[],m=3;m<arguments.length;m++)l[m-3]=arguments[m];return(d1=this._getContextManager()).with.apply(d1,B5([e,i,c],V5(l),!1))},t.prototype.bind=function(e,i){return this._getContextManager().bind(e,i)},t.prototype._getContextManager=function(){return Yn(Ac)||U5},t.prototype.disable=function(){this._getContextManager().disable(),Ro(Ac,Qe.instance())},t}(),Re;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(Re||(Re={}));var ul="0000000000000000",dl="00000000000000000000000000000000",pl={traceId:dl,spanId:ul,traceFlags:Re.NONE},go=function(){function t(e){e===void 0&&(e=pl),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,i){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,i){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,i){},t}(),hl=Mo("OpenTelemetry Context Key SPAN");function fl(t){return t.getValue(hl)||void 0}function j5(){return fl(Sa.getInstance().active())}function ml(t,e){return t.setValue(hl,e)}function F5(t){return t.deleteValue(hl)}function H5(t,e){return ml(t,new go(e))}function sf(t){var e;return(e=fl(t))===null||e===void 0?void 0:e.spanContext()}var z5=/^([0-9a-f]{32})$/i,G5=/^[0-9a-f]{16}$/i;function ba(t){return z5.test(t)&&t!==dl}function cf(t){return G5.test(t)&&t!==ul}function Nr(t){return ba(t.traceId)&&cf(t.spanId)}function Y5(t){return new go(t)}var Oc=Sa.getInstance(),lf=function(){function t(){}return t.prototype.startSpan=function(e,i,c){c===void 0&&(c=Oc.active());var d1=!!(i!=null&&i.root);if(d1)return new go;var l=c&&sf(c);return Z5(l)&&Nr(l)?new go(l):new go},t.prototype.startActiveSpan=function(e,i,c,d1){var l,m,v;if(!(arguments.length<2)){arguments.length===2?v=i:arguments.length===3?(l=i,v=c):(l=i,m=c,v=d1);var g=m!=null?m:Oc.active(),S=this.startSpan(e,l,g),b=ml(g,S);return Oc.with(b,v,void 0,S)}},t}();function Z5(t){return(typeof t==="undefined"?"undefined":_type_of(t))=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var W5=new lf,uf=function(){function t(e,i,c,d1){this._provider=e,this.name=i,this.version=c,this.options=d1}return t.prototype.startSpan=function(e,i,c){return this._getTracer().startSpan(e,i,c)},t.prototype.startActiveSpan=function(e,i,c,d1){var l=this._getTracer();return Reflect.apply(l.startActiveSpan,l,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):W5},t}(),$5=function(){function t(){}return t.prototype.getTracer=function(e,i,c){return new lf},t}(),X5=new $5,Bc=function(){function t(){}return t.prototype.getTracer=function(e,i,c){var d1;return(d1=this.getDelegateTracer(e,i,c))!==null&&d1!==void 0?d1:new uf(this,e,i,c)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:X5},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,i,c){var d1;return(d1=this._delegate)===null||d1===void 0?void 0:d1.getTracer(e,i,c)},t}(),dn;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(dn||(dn={}));var sa;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(sa||(sa={}));var ca;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(ca||(ca={}));var Uc="[_0-9a-z-*/]",K5="[a-z]"+Uc+"{0,255}",q5="[a-z0-9]"+Uc+"{0,240}@[a-z]"+Uc+"{0,13}",Q5=new RegExp("^(?:"+K5+"|"+q5+")$"),J5=/^[ -~]{0,255}[!-~]$/,tw=/,|=/;function ew(t){return Q5.test(t)}function nw(t){return J5.test(t)&&!tw.test(t)}var ch=32,rw=512,lh=",",uh="=",ow=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,i){var c=this._clone();return c._internalState.has(e)&&c._internalState.delete(e),c._internalState.set(e,i),c},t.prototype.unset=function(e){var i=this._clone();return i._internalState.delete(e),i},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(i,c){return i.push(c+uh+e.get(c)),i},[]).join(lh)},t.prototype._parse=function(e){e.length>rw||(this._internalState=e.split(lh).reverse().reduce(function(i,c){var d1=c.trim(),l=d1.indexOf(uh);if(l!==-1){var m=d1.slice(0,l),v=d1.slice(l+1,c.length);ew(m)&&nw(v)&&i.set(m,v)}return i},new Map),this._internalState.size>ch&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ch))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}();function iw(t){return new ow(t)}var qe=Sa.getInstance(),At=Qe.instance(),aw=function(){function t(){}return t.prototype.getMeter=function(e,i,c){return rf},t}(),sw=new aw,Lc="metrics",cw=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return xo(Lc,e,Qe.instance())},t.prototype.getMeterProvider=function(){return Yn(Lc)||sw},t.prototype.getMeter=function(e,i,c){return this.getMeterProvider().getMeter(e,i,c)},t.prototype.disable=function(){Ro(Lc,Qe.instance())},t}(),vl=cw.getInstance(),lw=function(){function t(){}return t.prototype.inject=function(e,i){},t.prototype.extract=function(e,i){return e},t.prototype.fields=function(){return[]},t}(),yl=Mo("OpenTelemetry Baggage Key");function df(t){return t.getValue(yl)||void 0}function uw(){return df(Sa.getInstance().active())}function dw(t,e){return t.setValue(yl,e)}function pw(t){return t.deleteValue(yl)}var xc="propagation",hw=new lw,fw=function(){function t(){this.createBaggage=y5,this.getBaggage=df,this.getActiveBaggage=uw,this.setBaggage=dw,this.deleteBaggage=pw}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return xo(xc,e,Qe.instance())},t.prototype.inject=function(e,i,c){return c===void 0&&(c=af),this._getGlobalPropagator().inject(e,i,c)},t.prototype.extract=function(e,i,c){return c===void 0&&(c=of),this._getGlobalPropagator().extract(e,i,c)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){Ro(xc,Qe.instance())},t.prototype._getGlobalPropagator=function(){return Yn(xc)||hw},t}(),Sr=fw.getInstance(),Rc="trace",mw=function(){function t(){this._proxyTracerProvider=new Bc,this.wrapSpanContext=Y5,this.isSpanContextValid=Nr,this.deleteSpan=F5,this.getSpan=fl,this.getActiveSpan=j5,this.getSpanContext=sf,this.setSpan=ml,this.setSpanContext=H5}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var i=xo(Rc,this._proxyTracerProvider,Qe.instance());return i&&this._proxyTracerProvider.setDelegate(e),i},t.prototype.getTracerProvider=function(){return Yn(Rc)||this._proxyTracerProvider},t.prototype.getTracer=function(e,i){return this.getTracerProvider().getTracer(e,i)},t.prototype.disable=function(){Ro(Rc,Qe.instance()),this._proxyTracerProvider=new Bc},t}(),_e=mw.getInstance(),vw={context:qe,diag:At,metrics:vl,propagation:Sr,trace:_e},yw=Object.freeze({__proto__:null,DiagConsoleLogger:g5,get DiagLogLevel(){return jt},INVALID_SPANID:ul,INVALID_SPAN_CONTEXT:pl,INVALID_TRACEID:dl,ProxyTracer:uf,ProxyTracerProvider:Bc,ROOT_CONTEXT:jn,get SamplingDecision(){return dn},get SpanKind(){return sa},get SpanStatusCode(){return ca},get TraceFlags(){return Re},get ValueType(){return Vc},baggageEntryMetadataFromString:nf,context:qe,createContextKey:Mo,createNoopMeter:N5,createTraceState:iw,default:vw,defaultTextMapGetter:of,defaultTextMapSetter:af,diag:At,isSpanContextValid:Nr,isValidSpanId:cf,isValidTraceId:ba,metrics:vl,propagation:Sr,trace:_e}),_l=Mo("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function gl(t){return t.setValue(_l,!0)}function _w(t){return t.deleteValue(_l)}function Ca(t){return t.getValue(_l)===!0}var gw="=",jc=";",la=",",Mc="baggage",Ew=180,Tw=4096,Sw=8192,bw=function bw(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l};function pf(t){return t.reduce(function(e,i){var c=""+e+(e!==""?la:"")+i;return c.length>Sw?e:c},"")}function hf(t){return t.getAllEntries().map(function(e){var i=bw(e,2),c=i[0],d1=i[1],l=encodeURIComponent(c)+"="+encodeURIComponent(d1.value);return d1.metadata!==void 0&&(l+=jc+d1.metadata.toString()),l})}function El(t){var e=t.split(jc);if(!(e.length<=0)){var i=e.shift();if(i){var c=i.indexOf(gw);if(!(c<=0)){var d1=decodeURIComponent(i.substring(0,c).trim()),l=decodeURIComponent(i.substring(c+1).trim()),m;return e.length>0&&(m=nf(e.join(jc))),{key:d1,value:l,metadata:m}}}}}function Cw(t){return typeof t!="string"||t.length===0?{}:t.split(la).map(function(e){return El(e)}).filter(function(e){return e!==void 0&&e.value.length>0}).reduce(function(e,i){return e[i.key]=i.value,e},{})}var ww=Object.freeze({__proto__:null,getKeyPairs:hf,parseKeyPairsIntoRecord:Cw,parsePairKeyValue:El,serializeKeyPairs:pf}),ff=function(){function t(){}return t.prototype.inject=function(e,i,c){var d1=Sr.getBaggage(e);if(!(!d1||Ca(e))){var l=hf(d1).filter(function(v){return v.length<=Tw}).slice(0,Ew),m=pf(l);m.length>0&&c.set(i,Mc,m)}},t.prototype.extract=function(e,i,c){var d1=c.get(i,Mc),l=Array.isArray(d1)?d1.join(la):d1;if(!l)return e;var m={};if(l.length===0)return e;var v=l.split(la);return v.forEach(function(g){var S=El(g);if(S){var b={value:S.value};S.metadata&&(b.metadata=S.metadata),m[S.key]=b}}),Object.entries(m).length===0?e:Sr.setBaggage(e,Sr.createBaggage(m))},t.prototype.fields=function(){return[Mc]},t}(),Aw=function(){function t(e,i){this._monotonicClock=i,this._epochMillis=e.now(),this._performanceMillis=i.now()}return t.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},t}(),mf=function mf(t){var e=typeof Symbol=="function"&&Symbol.iterator,i=e&&t[e],c=0;if(i)return i.call(t);if(t&&typeof t.length=="number")return{next:function next(){return t&&c>=t.length&&(t=void 0),{value:t&&t[c++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ow=function Ow(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l};function Eo(t){var e,i,c={};if((typeof t==="undefined"?"undefined":_type_of(t))!="object"||t==null)return c;try{for(var d1=mf(Object.entries(t)),l=d1.next();!l.done;l=d1.next()){var m=Ow(l.value,2),v=m[0],g=m[1];if(!vf(v)){At.warn("Invalid attribute key: "+v);continue}if(!Tl(g)){At.warn("Invalid attribute value set for key: "+v);continue}Array.isArray(g)?c[v]=g.slice():c[v]=g}}catch(S){e={error:S}}finally{try{l&&!l.done&&(i=d1.return)&&i.call(d1)}finally{if(e)throw e.error}}return c}function vf(t){return typeof t=="string"&&t.length>0}function Tl(t){return t==null?!0:Array.isArray(t)?Lw(t):yf(t)}function Lw(t){var e,i,c;try{for(var d1=mf(t),l=d1.next();!l.done;l=d1.next()){var m=l.value;if(m!=null){if(!c){if(yf(m)){c=typeof m==="undefined"?"undefined":_type_of(m);continue}return!1}if((typeof m==="undefined"?"undefined":_type_of(m))!==c)return!1}}}catch(v){e={error:v}}finally{try{l&&!l.done&&(i=d1.return)&&i.call(d1)}finally{if(e)throw e.error}}return!0}function yf(t){switch(typeof t==="undefined"?"undefined":_type_of(t)){case"number":case"boolean":case"string":return!0}return!1}function _f(){return function(t){At.error(xw(t))}}function xw(t){return typeof t=="string"?t:JSON.stringify(Rw(t))}function Rw(t){for(var e={},i=t;i!==null;)Object.getOwnPropertyNames(i).forEach(function(c){if(!e[c]){var d1=i[c];d1&&(e[c]=String(d1))}}),i=Object.getPrototypeOf(i);return e}var gf=_f();function Mw(t){gf=t}function Cr(t){try{gf(t)}catch(e){}}var He;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(He||(He={}));var Iw=",",Nw=["OTEL_SDK_DISABLED"];function Pw(t){return Nw.indexOf(t)>-1}var Dw=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function kw(t){return Dw.indexOf(t)>-1}var Vw=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function Bw(t){return Vw.indexOf(t)>-1}var To=1/0,So=128,Ef=128,Tf=128,Sl={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:jt.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:To,OTEL_ATTRIBUTE_COUNT_LIMIT:So,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:To,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:So,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:To,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:So,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Ef,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Tf,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:He.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function Uw(t,e,i){if(!(_type_of(i[t])>"u")){var c=String(i[t]);e[t]=c.toLowerCase()==="true"}}function jw(t,e,i,c,d1){if(c===void 0&&(c=-1/0),d1===void 0&&(d1=1/0),_type_of(i[t])<"u"){var l=Number(i[t]);isNaN(l)||(l<c?e[t]=c:l>d1?e[t]=d1:e[t]=l)}}function Fw(t,e,i,c){c===void 0&&(c=Iw);var d1=i[t];typeof d1=="string"&&(e[t]=d1.split(c).map(function(l){return l.trim()}))}var Hw={ALL:jt.ALL,VERBOSE:jt.VERBOSE,DEBUG:jt.DEBUG,INFO:jt.INFO,WARN:jt.WARN,ERROR:jt.ERROR,NONE:jt.NONE};function zw(t,e,i){var c=i[t];if(typeof c=="string"){var d1=Hw[c.toUpperCase()];d1!=null&&(e[t]=d1)}}function bl(t){var e={};for(var i in Sl){var c=i;switch(c){case"OTEL_LOG_LEVEL":zw(c,e,t);break;default:if(Pw(c))Uw(c,e,t);else if(kw(c))jw(c,e,t);else if(Bw(c))Fw(c,e,t);else{var d1=t[c];(typeof d1==="undefined"?"undefined":_type_of(d1))<"u"&&d1!==null&&(e[c]=String(d1))}}}return e}var Cl=(typeof globalThis==="undefined"?"undefined":_type_of(globalThis))=="object"?globalThis:(typeof self==="undefined"?"undefined":_type_of(self))=="object"?self:(typeof window==="undefined"?"undefined":_type_of(window))=="object"?window:(typeof global==="undefined"?"undefined":_type_of(global))=="object"?global:{};function ye(){var t=bl(Cl);return Object.assign({},Sl,t)}function Sf(){return bl(Cl)}function dh(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function bf(t){for(var e=new Uint8Array(t.length/2),i=0,c=0;c<t.length;c+=2){var d1=dh(t.charCodeAt(c)),l=dh(t.charCodeAt(c+1));e[i++]=d1<<4|l}return e}var Gw=function Gw(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},Yw=function Yw(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))};function Zw(t){return btoa(String.fromCharCode.apply(String,Yw([],Gw(bf(t)),!1)))}var Ww=8,$w=16,Xw=function(){function t(){this.generateTraceId=ph($w),this.generateSpanId=ph(Ww)}return t}(),Xi=Array(32);function ph(t){return function(){for(var e=0;e<t*2;e++)Xi[e]=Math.floor(Math.random()*16)+48,Xi[e]>=58&&(Xi[e]+=39);return String.fromCharCode.apply(null,Xi.slice(0,t*2))}}var Gn=performance,Cf="1.25.1";function zt(t){for(var e={},i=t.length,c=0;c<i;c++){var d1=t[c];d1&&(e[String(d1).toUpperCase().replace(/[-.]/g,"_")]=d1)}return e}var wf="aws.lambda.invoked_arn",Af="db.system",Of="db.connection_string",Lf="db.user",xf="db.jdbc.driver_classname",Rf="db.name",Mf="db.statement",If="db.operation",Nf="db.mssql.instance_name",Pf="db.cassandra.keyspace",Df="db.cassandra.page_size",kf="db.cassandra.consistency_level",Vf="db.cassandra.table",Bf="db.cassandra.idempotence",Uf="db.cassandra.speculative_execution_count",jf="db.cassandra.coordinator.id",Ff="db.cassandra.coordinator.dc",Hf="db.hbase.namespace",zf="db.redis.database_index",Gf="db.mongodb.collection",Yf="db.sql.table",Zf="exception.type",Wf="exception.message",$f="exception.stacktrace",Xf="exception.escaped",Kf="faas.trigger",qf="faas.execution",Qf="faas.document.collection",Jf="faas.document.operation",tm="faas.document.time",em="faas.document.name",nm="faas.time",rm="faas.cron",om="faas.coldstart",im="faas.invoked_name",am="faas.invoked_provider",sm="faas.invoked_region",cm="net.transport",lm="net.peer.ip",um="net.peer.port",dm="net.peer.name",pm="net.host.ip",hm="net.host.port",fm="net.host.name",mm="net.host.connection.type",vm="net.host.connection.subtype",ym="net.host.carrier.name",_m="net.host.carrier.mcc",gm="net.host.carrier.mnc",Em="net.host.carrier.icc",Tm="peer.service",Sm="enduser.id",bm="enduser.role",Cm="enduser.scope",wm="thread.id",Am="thread.name",Om="code.function",Lm="code.namespace",xm="code.filepath",Rm="code.lineno",Mm="http.method",Im="http.url",Nm="http.target",Pm="http.host",Dm="http.scheme",km="http.status_code",Vm="http.flavor",Bm="http.user_agent",Um="http.request_content_length",jm="http.request_content_length_uncompressed",Fm="http.response_content_length",Hm="http.response_content_length_uncompressed",zm="http.server_name",Gm="http.route",Ym="http.client_ip",Zm="aws.dynamodb.table_names",Wm="aws.dynamodb.consumed_capacity",$m="aws.dynamodb.item_collection_metrics",Xm="aws.dynamodb.provisioned_read_capacity",Km="aws.dynamodb.provisioned_write_capacity",qm="aws.dynamodb.consistent_read",Qm="aws.dynamodb.projection",Jm="aws.dynamodb.limit",t1="aws.dynamodb.attributes_to_get",e1="aws.dynamodb.index_name",n1="aws.dynamodb.select",r1="aws.dynamodb.global_secondary_indexes",o1="aws.dynamodb.local_secondary_indexes",i1="aws.dynamodb.exclusive_start_table",a1="aws.dynamodb.table_count",s1="aws.dynamodb.scan_forward",c1="aws.dynamodb.segment",l1="aws.dynamodb.total_segments",u1="aws.dynamodb.count",d1="aws.dynamodb.scanned_count",p1="aws.dynamodb.attribute_definitions",h1="aws.dynamodb.global_secondary_index_updates",f1="messaging.system",m1="messaging.destination",v1="messaging.destination_kind",y1="messaging.temp_destination",_1="messaging.protocol",g1="messaging.protocol_version",E1="messaging.url",T1="messaging.message_id",S1="messaging.conversation_id",b1="messaging.message_payload_size_bytes",C1="messaging.message_payload_compressed_size_bytes",w1="messaging.operation",A1="messaging.consumer_id",O1="messaging.rabbitmq.routing_key",L1="messaging.kafka.message_key",x1="messaging.kafka.consumer_group",R1="messaging.kafka.client_id",M1="messaging.kafka.partition",I1="messaging.kafka.tombstone",N1="rpc.system",P1="rpc.service",D1="rpc.method",k1="rpc.grpc.status_code",V1="rpc.jsonrpc.version",B1="rpc.jsonrpc.request_id",U1="rpc.jsonrpc.error_code",j1="rpc.jsonrpc.error_message",F1="message.type",H1="message.id",z1="message.compressed_size",G1="message.uncompressed_size",Kw=wf,qw=Af,Qw=Of,Jw=Lf,t3=xf,e3=Rf,n3=Mf,r3=If,o3=Nf,i3=Pf,a3=Df,s3=kf,c3=Vf,l3=Bf,u3=Uf,d3=jf,p3=Ff,h3=Hf,f3=zf,m3=Gf,v3=Yf,ta=Zf,ea=Wf,Y1=$f,y3=Xf,_3=Kf,g3=qf,E3=Qf,T3=Jf,S3=tm,b3=em,C3=nm,w3=rm,A3=om,O3=im,L3=am,x3=sm,R3=cm,M3=lm,I3=um,N3=dm,P3=pm,D3=hm,k3=fm,V3=mm,B3=vm,U3=ym,j3=_m,F3=gm,H3=Em,z3=Tm,G3=Sm,Y3=bm,Z3=Cm,W3=wm,$3=Am,X3=Om,K3=Lm,q3=xm,Q3=Rm,J3=Mm,tA=Im,eA=Nm,nA=Pm,rA=Dm,oA=km,iA=Vm,aA=Bm,sA=Um,cA=jm,lA=Fm,uA=Hm,dA=zm,pA=Gm,hA=Ym,fA=Zm,mA=Wm,vA=$m,yA=Xm,_A=Km,gA=qm,EA=Qm,TA=Jm,SA=t1,bA=e1,CA=n1,wA=r1,AA=o1,OA=i1,LA=a1,xA=s1,RA=c1,MA=l1,IA=u1,NA=d1,PA=p1,DA=h1,kA=f1,VA=m1,BA=v1,UA=y1,jA=_1,FA=g1,HA=E1,zA=T1,GA=S1,YA=b1,ZA=C1,WA=w1,$A=A1,XA=O1,KA=L1,qA=x1,QA=R1,JA=M1,t4=I1,e4=N1,n4=P1,r4=D1,o4=k1,i4=V1,a4=B1,s4=U1,c4=j1,l4=F1,u4=H1,d4=z1,p4=G1,h4=zt([wf,Af,Of,Lf,xf,Rf,Mf,If,Nf,Pf,Df,kf,Vf,Bf,Uf,jf,Ff,Hf,zf,Gf,Yf,Zf,Wf,$f,Xf,Kf,qf,Qf,Jf,tm,em,nm,rm,om,im,am,sm,cm,lm,um,dm,pm,hm,fm,mm,vm,ym,_m,gm,Em,Tm,Sm,bm,Cm,wm,Am,Om,Lm,xm,Rm,Mm,Im,Nm,Pm,Dm,km,Vm,Bm,Um,jm,Fm,Hm,zm,Gm,Ym,Zm,Wm,$m,Xm,Km,qm,Qm,Jm,t1,e1,n1,r1,o1,i1,a1,s1,c1,l1,u1,d1,p1,h1,f1,m1,v1,y1,_1,g1,E1,T1,S1,b1,C1,w1,A1,O1,L1,x1,R1,M1,I1,N1,P1,D1,k1,V1,B1,U1,j1,F1,H1,z1,G1]),Z1="other_sql",W1="mssql",$1="mysql",X1="oracle",K1="db2",q1="postgresql",Q1="redshift",J1="hive",tv="cloudscape",ev="hsqldb",nv="progress",rv="maxdb",ov="hanadb",iv="ingres",av="firstsql",sv="edb",cv="cache",lv="adabas",uv="firebird",dv="derby",pv="filemaker",hv="informix",fv="instantdb",mv="interbase",vv="mariadb",yv="netezza",_v="pervasive",gv="pointbase",Ev="sqlite",Tv="sybase",Sv="teradata",bv="vertica",Cv="h2",wv="coldfusion",Av="cassandra",Ov="hbase",Lv="mongodb",xv="redis",Rv="couchbase",Mv="couchdb",Iv="cosmosdb",Nv="dynamodb",Pv="neo4j",Dv="geode",kv="elasticsearch",Vv="memcached",Bv="cockroachdb",f4=Z1,m4=W1,v4=$1,y4=X1,_4=K1,g4=q1,E4=Q1,T4=J1,S4=tv,b4=ev,C4=nv,w4=rv,A4=ov,O4=iv,L4=av,x4=sv,R4=cv,M4=lv,I4=uv,N4=dv,P4=pv,D4=hv,k4=fv,V4=mv,B4=vv,U4=yv,j4=_v,F4=gv,H4=Ev,z4=Tv,G4=Sv,Y4=bv,Z4=Cv,W4=wv,$4=Av,X4=Ov,K4=Lv,q4=xv,Q4=Rv,J4=Mv,tO=Iv,eO=Nv,nO=Pv,rO=Dv,oO=kv,iO=Vv,aO=Bv,sO=zt([Z1,W1,$1,X1,K1,q1,Q1,J1,tv,ev,nv,rv,ov,iv,av,sv,cv,lv,uv,dv,pv,hv,fv,mv,vv,yv,_v,gv,Ev,Tv,Sv,bv,Cv,wv,Av,Ov,Lv,xv,Rv,Mv,Iv,Nv,Pv,Dv,kv,Vv,Bv]),Uv="all",jv="each_quorum",Fv="quorum",Hv="local_quorum",zv="one",Gv="two",Yv="three",Zv="local_one",Wv="any",$v="serial",Xv="local_serial",cO=Uv,lO=jv,uO=Fv,dO=Hv,pO=zv,hO=Gv,fO=Yv,mO=Zv,vO=Wv,yO=$v,_O=Xv,gO=zt([Uv,jv,Fv,Hv,zv,Gv,Yv,Zv,Wv,$v,Xv]),Kv="datasource",qv="http",Qv="pubsub",Jv="timer",ty="other",EO=Kv,TO=qv,SO=Qv,bO=Jv,CO=ty,wO=zt([Kv,qv,Qv,Jv,ty]),ey="insert",ny="edit",ry="delete",AO=ey,OO=ny,LO=ry,xO=zt([ey,ny,ry]),oy="alibaba_cloud",iy="aws",ay="azure",sy="gcp",RO=oy,MO=iy,IO=ay,NO=sy,PO=zt([oy,iy,ay,sy]),cy="ip_tcp",ly="ip_udp",uy="ip",dy="unix",py="pipe",hy="inproc",fy="other",DO=cy,kO=ly,VO=uy,BO=dy,UO=py,jO=hy,FO=fy,HO=zt([cy,ly,uy,dy,py,hy,fy]),my="wifi",vy="wired",yy="cell",_y="unavailable",gy="unknown",zO=my,GO=vy,YO=yy,ZO=_y,WO=gy,$O=zt([my,vy,yy,_y,gy]),Ey="gprs",Ty="edge",Sy="umts",by="cdma",Cy="evdo_0",wy="evdo_a",Ay="cdma2000_1xrtt",Oy="hsdpa",Ly="hsupa",xy="hspa",Ry="iden",My="evdo_b",Iy="lte",Ny="ehrpd",Py="hspap",Dy="gsm",ky="td_scdma",Vy="iwlan",By="nr",Uy="nrnsa",jy="lte_ca",XO=Ey,KO=Ty,qO=Sy,QO=by,JO=Cy,t6=wy,e6=Ay,n6=Oy,r6=Ly,o6=xy,i6=Ry,a6=My,s6=Iy,c6=Ny,l6=Py,u6=Dy,d6=ky,p6=Vy,h6=By,f6=Uy,m6=jy,v6=zt([Ey,Ty,Sy,by,Cy,wy,Ay,Oy,Ly,xy,Ry,My,Iy,Ny,Py,Dy,ky,Vy,By,Uy,jy]),Fy="1.0",Hy="1.1",zy="2.0",Gy="SPDY",Yy="QUIC",y6=Fy,_6=Hy,g6=zy,E6=Gy,T6=Yy,S6={HTTP_1_0:Fy,HTTP_1_1:Hy,HTTP_2_0:zy,SPDY:Gy,QUIC:Yy},Zy="queue",Wy="topic",b6=Zy,C6=Wy,w6=zt([Zy,Wy]),$y="receive",Xy="process",A6=$y,O6=Xy,L6=zt([$y,Xy]),Ky=0,qy=1,Qy=2,Jy=3,t_=4,e_=5,n_=6,r_=7,o_=8,i_=9,a_=10,s_=11,c_=12,l_=13,u_=14,d_=15,p_=16,x6=Ky,R6=qy,M6=Qy,I6=Jy,N6=t_,P6=e_,D6=n_,k6=r_,V6=o_,B6=i_,U6=a_,j6=s_,F6=c_,H6=l_,z6=u_,G6=d_,Y6=p_,Z6={OK:Ky,CANCELLED:qy,UNKNOWN:Qy,INVALID_ARGUMENT:Jy,DEADLINE_EXCEEDED:t_,NOT_FOUND:e_,ALREADY_EXISTS:n_,PERMISSION_DENIED:r_,RESOURCE_EXHAUSTED:o_,FAILED_PRECONDITION:i_,ABORTED:a_,OUT_OF_RANGE:s_,UNIMPLEMENTED:c_,INTERNAL:l_,UNAVAILABLE:u_,DATA_LOSS:d_,UNAUTHENTICATED:p_},h_="SENT",f_="RECEIVED",W6=h_,$6=f_,X6=zt([h_,f_]),m_="cloud.provider",v_="cloud.account.id",y_="cloud.region",__="cloud.availability_zone",g_="cloud.platform",E_="aws.ecs.container.arn",T_="aws.ecs.cluster.arn",S_="aws.ecs.launchtype",b_="aws.ecs.task.arn",C_="aws.ecs.task.family",w_="aws.ecs.task.revision",A_="aws.eks.cluster.arn",O_="aws.log.group.names",L_="aws.log.group.arns",x_="aws.log.stream.names",R_="aws.log.stream.arns",M_="container.name",I_="container.id",N_="container.runtime",P_="container.image.name",D_="container.image.tag",k_="deployment.environment",V_="device.id",B_="device.model.identifier",U_="device.model.name",j_="faas.name",F_="faas.id",H_="faas.version",z_="faas.instance",G_="faas.max_memory",Y_="host.id",Z_="host.name",W_="host.type",$_="host.arch",X_="host.image.name",K_="host.image.id",q_="host.image.version",Q_="k8s.cluster.name",J_="k8s.node.name",t0="k8s.node.uid",e0="k8s.namespace.name",n0="k8s.pod.uid",r0="k8s.pod.name",o0="k8s.container.name",i0="k8s.replicaset.uid",a0="k8s.replicaset.name",s0="k8s.deployment.uid",c0="k8s.deployment.name",l0="k8s.statefulset.uid",u0="k8s.statefulset.name",d0="k8s.daemonset.uid",p0="k8s.daemonset.name",h0="k8s.job.uid",f0="k8s.job.name",m0="k8s.cronjob.uid",v0="k8s.cronjob.name",y0="os.type",_0="os.description",g0="os.name",E0="os.version",T0="process.pid",S0="process.executable.name",b0="process.executable.path",C0="process.command",w0="process.command_line",A0="process.command_args",O0="process.owner",L0="process.runtime.name",x0="process.runtime.version",R0="process.runtime.description",M0="service.name",I0="service.namespace",N0="service.instance.id",P0="service.version",D0="telemetry.sdk.name",k0="telemetry.sdk.language",V0="telemetry.sdk.version",B0="telemetry.auto.version",U0="webengine.name",j0="webengine.version",F0="webengine.description",K6=m_,q6=v_,Q6=y_,J6=__,tL=g_,eL=E_,nL=T_,rL=S_,oL=b_,iL=C_,aL=w_,sL=A_,cL=O_,lL=L_,uL=x_,dL=R_,pL=M_,hL=I_,fL=N_,mL=P_,vL=D_,yL=k_,_L=V_,gL=B_,EL=U_,TL=j_,SL=F_,bL=H_,CL=z_,wL=G_,AL=Y_,OL=Z_,LL=W_,xL=$_,RL=X_,ML=K_,IL=q_,NL=Q_,PL=J_,DL=t0,kL=e0,VL=n0,BL=r0,UL=o0,jL=i0,FL=a0,HL=s0,zL=c0,GL=l0,YL=u0,ZL=d0,WL=p0,$L=h0,XL=f0,KL=m0,qL=v0,QL=y0,JL=_0,t9=g0,e9=E0,n9=T0,r9=S0,o9=b0,i9=C0,a9=w0,s9=A0,c9=O0,H0=L0,l9=x0,u9=R0,wl=M0,d9=I0,p9=N0,h9=P0,ua=D0,da=k0,pa=V0,f9=B0,m9=U0,v9=j0,y9=F0,_9=zt([m_,v_,y_,__,g_,E_,T_,S_,b_,C_,w_,A_,O_,L_,x_,R_,M_,I_,N_,P_,D_,k_,V_,B_,U_,j_,F_,H_,z_,G_,Y_,Z_,W_,$_,X_,K_,q_,Q_,J_,t0,e0,n0,r0,o0,i0,a0,s0,c0,l0,u0,d0,p0,h0,f0,m0,v0,y0,_0,g0,E0,T0,S0,b0,C0,w0,A0,O0,L0,x0,R0,M0,I0,N0,P0,D0,k0,V0,B0,U0,j0,F0]),z0="alibaba_cloud",G0="aws",Y0="azure",Z0="gcp",g9=z0,E9=G0,T9=Y0,S9=Z0,b9=zt([z0,G0,Y0,Z0]),W0="alibaba_cloud_ecs",$0="alibaba_cloud_fc",X0="aws_ec2",K0="aws_ecs",q0="aws_eks",Q0="aws_lambda",J0="aws_elastic_beanstalk",tg="azure_vm",eg="azure_container_instances",ng="azure_aks",rg="azure_functions",og="azure_app_service",ig="gcp_compute_engine",ag="gcp_cloud_run",sg="gcp_kubernetes_engine",cg="gcp_cloud_functions",lg="gcp_app_engine",C9=W0,w9=$0,A9=X0,O9=K0,L9=q0,x9=Q0,R9=J0,M9=tg,I9=eg,N9=ng,P9=rg,D9=og,k9=ig,V9=ag,B9=sg,U9=cg,j9=lg,F9=zt([W0,$0,X0,K0,q0,Q0,J0,tg,eg,ng,rg,og,ig,ag,sg,cg,lg]),ug="ec2",dg="fargate",H9=ug,z9=dg,G9=zt([ug,dg]),pg="amd64",hg="arm32",fg="arm64",mg="ia64",vg="ppc32",yg="ppc64",_g="x86",Y9=pg,Z9=hg,W9=fg,$9=mg,X9=vg,K9=yg,q9=_g,Q9=zt([pg,hg,fg,mg,vg,yg,_g]),gg="windows",Eg="linux",Tg="darwin",Sg="freebsd",bg="netbsd",Cg="openbsd",wg="dragonflybsd",Ag="hpux",Og="aix",Lg="solaris",xg="z_os",J9=gg,tx=Eg,ex=Tg,nx=Sg,rx=bg,ox=Cg,ix=wg,ax=Ag,sx=Og,cx=Lg,lx=xg,ux=zt([gg,Eg,Tg,Sg,bg,Cg,wg,Ag,Og,Lg,xg]),Rg="cpp",Mg="dotnet",Ig="erlang",Ng="go",Pg="java",Dg="nodejs",kg="php",Vg="python",Bg="ruby",Ug="webjs",dx=Rg,px=Mg,hx=Ig,fx=Ng,mx=Pg,vx=Dg,yx=kg,_x=Vg,gx=Bg,jg=Ug,Ex=zt([Rg,Mg,Ig,Ng,Pg,Dg,kg,Vg,Bg,Ug]),Tx=Object.freeze({__proto__:null,AWSECSLAUNCHTYPEVALUES_EC2:H9,AWSECSLAUNCHTYPEVALUES_FARGATE:z9,AwsEcsLaunchtypeValues:G9,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:C9,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:w9,CLOUDPLATFORMVALUES_AWS_EC2:A9,CLOUDPLATFORMVALUES_AWS_ECS:O9,CLOUDPLATFORMVALUES_AWS_EKS:L9,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:R9,CLOUDPLATFORMVALUES_AWS_LAMBDA:x9,CLOUDPLATFORMVALUES_AZURE_AKS:N9,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:D9,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:I9,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:P9,CLOUDPLATFORMVALUES_AZURE_VM:M9,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:j9,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:U9,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:V9,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:k9,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:B9,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:g9,CLOUDPROVIDERVALUES_AWS:E9,CLOUDPROVIDERVALUES_AZURE:T9,CLOUDPROVIDERVALUES_GCP:S9,CloudPlatformValues:F9,CloudProviderValues:b9,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:cO,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:vO,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:lO,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:mO,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:dO,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:_O,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:pO,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:uO,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:yO,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:fO,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:hO,DBSYSTEMVALUES_ADABAS:M4,DBSYSTEMVALUES_CACHE:R4,DBSYSTEMVALUES_CASSANDRA:$4,DBSYSTEMVALUES_CLOUDSCAPE:S4,DBSYSTEMVALUES_COCKROACHDB:aO,DBSYSTEMVALUES_COLDFUSION:W4,DBSYSTEMVALUES_COSMOSDB:tO,DBSYSTEMVALUES_COUCHBASE:Q4,DBSYSTEMVALUES_COUCHDB:J4,DBSYSTEMVALUES_DB2:_4,DBSYSTEMVALUES_DERBY:N4,DBSYSTEMVALUES_DYNAMODB:eO,DBSYSTEMVALUES_EDB:x4,DBSYSTEMVALUES_ELASTICSEARCH:oO,DBSYSTEMVALUES_FILEMAKER:P4,DBSYSTEMVALUES_FIREBIRD:I4,DBSYSTEMVALUES_FIRSTSQL:L4,DBSYSTEMVALUES_GEODE:rO,DBSYSTEMVALUES_H2:Z4,DBSYSTEMVALUES_HANADB:A4,DBSYSTEMVALUES_HBASE:X4,DBSYSTEMVALUES_HIVE:T4,DBSYSTEMVALUES_HSQLDB:b4,DBSYSTEMVALUES_INFORMIX:D4,DBSYSTEMVALUES_INGRES:O4,DBSYSTEMVALUES_INSTANTDB:k4,DBSYSTEMVALUES_INTERBASE:V4,DBSYSTEMVALUES_MARIADB:B4,DBSYSTEMVALUES_MAXDB:w4,DBSYSTEMVALUES_MEMCACHED:iO,DBSYSTEMVALUES_MONGODB:K4,DBSYSTEMVALUES_MSSQL:m4,DBSYSTEMVALUES_MYSQL:v4,DBSYSTEMVALUES_NEO4J:nO,DBSYSTEMVALUES_NETEZZA:U4,DBSYSTEMVALUES_ORACLE:y4,DBSYSTEMVALUES_OTHER_SQL:f4,DBSYSTEMVALUES_PERVASIVE:j4,DBSYSTEMVALUES_POINTBASE:F4,DBSYSTEMVALUES_POSTGRESQL:g4,DBSYSTEMVALUES_PROGRESS:C4,DBSYSTEMVALUES_REDIS:q4,DBSYSTEMVALUES_REDSHIFT:E4,DBSYSTEMVALUES_SQLITE:H4,DBSYSTEMVALUES_SYBASE:z4,DBSYSTEMVALUES_TERADATA:G4,DBSYSTEMVALUES_VERTICA:Y4,DbCassandraConsistencyLevelValues:gO,DbSystemValues:sO,FAASDOCUMENTOPERATIONVALUES_DELETE:LO,FAASDOCUMENTOPERATIONVALUES_EDIT:OO,FAASDOCUMENTOPERATIONVALUES_INSERT:AO,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:RO,FAASINVOKEDPROVIDERVALUES_AWS:MO,FAASINVOKEDPROVIDERVALUES_AZURE:IO,FAASINVOKEDPROVIDERVALUES_GCP:NO,FAASTRIGGERVALUES_DATASOURCE:EO,FAASTRIGGERVALUES_HTTP:TO,FAASTRIGGERVALUES_OTHER:CO,FAASTRIGGERVALUES_PUBSUB:SO,FAASTRIGGERVALUES_TIMER:bO,FaasDocumentOperationValues:xO,FaasInvokedProviderValues:PO,FaasTriggerValues:wO,HOSTARCHVALUES_AMD64:Y9,HOSTARCHVALUES_ARM32:Z9,HOSTARCHVALUES_ARM64:W9,HOSTARCHVALUES_IA64:$9,HOSTARCHVALUES_PPC32:X9,HOSTARCHVALUES_PPC64:K9,HOSTARCHVALUES_X86:q9,HTTPFLAVORVALUES_HTTP_1_0:y6,HTTPFLAVORVALUES_HTTP_1_1:_6,HTTPFLAVORVALUES_HTTP_2_0:g6,HTTPFLAVORVALUES_QUIC:T6,HTTPFLAVORVALUES_SPDY:E6,HostArchValues:Q9,HttpFlavorValues:S6,MESSAGETYPEVALUES_RECEIVED:$6,MESSAGETYPEVALUES_SENT:W6,MESSAGINGDESTINATIONKINDVALUES_QUEUE:b6,MESSAGINGDESTINATIONKINDVALUES_TOPIC:C6,MESSAGINGOPERATIONVALUES_PROCESS:O6,MESSAGINGOPERATIONVALUES_RECEIVE:A6,MessageTypeValues:X6,MessagingDestinationKindValues:w6,MessagingOperationValues:L6,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:QO,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:e6,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:KO,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:c6,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:JO,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:t6,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:a6,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:XO,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:u6,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:n6,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:o6,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:l6,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:r6,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:i6,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:p6,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:s6,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:m6,NETHOSTCONNECTIONSUBTYPEVALUES_NR:h6,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:f6,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:d6,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:qO,NETHOSTCONNECTIONTYPEVALUES_CELL:YO,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:ZO,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:WO,NETHOSTCONNECTIONTYPEVALUES_WIFI:zO,NETHOSTCONNECTIONTYPEVALUES_WIRED:GO,NETTRANSPORTVALUES_INPROC:jO,NETTRANSPORTVALUES_IP:VO,NETTRANSPORTVALUES_IP_TCP:DO,NETTRANSPORTVALUES_IP_UDP:kO,NETTRANSPORTVALUES_OTHER:FO,NETTRANSPORTVALUES_PIPE:UO,NETTRANSPORTVALUES_UNIX:BO,NetHostConnectionSubtypeValues:v6,NetHostConnectionTypeValues:$O,NetTransportValues:HO,OSTYPEVALUES_AIX:sx,OSTYPEVALUES_DARWIN:ex,OSTYPEVALUES_DRAGONFLYBSD:ix,OSTYPEVALUES_FREEBSD:nx,OSTYPEVALUES_HPUX:ax,OSTYPEVALUES_LINUX:tx,OSTYPEVALUES_NETBSD:rx,OSTYPEVALUES_OPENBSD:ox,OSTYPEVALUES_SOLARIS:cx,OSTYPEVALUES_WINDOWS:J9,OSTYPEVALUES_Z_OS:lx,OsTypeValues:ux,RPCGRPCSTATUSCODEVALUES_ABORTED:U6,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:D6,RPCGRPCSTATUSCODEVALUES_CANCELLED:R6,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:G6,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:N6,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:B6,RPCGRPCSTATUSCODEVALUES_INTERNAL:H6,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:I6,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:P6,RPCGRPCSTATUSCODEVALUES_OK:x6,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:j6,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:k6,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:V6,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:Y6,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:z6,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:F6,RPCGRPCSTATUSCODEVALUES_UNKNOWN:M6,RpcGrpcStatusCodeValues:Z6,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:SA,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:PA,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:gA,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:mA,SEMATTRS_AWS_DYNAMODB_COUNT:IA,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:OA,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:wA,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:DA,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:bA,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:vA,SEMATTRS_AWS_DYNAMODB_LIMIT:TA,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:AA,SEMATTRS_AWS_DYNAMODB_PROJECTION:EA,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:yA,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:_A,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:NA,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:xA,SEMATTRS_AWS_DYNAMODB_SEGMENT:RA,SEMATTRS_AWS_DYNAMODB_SELECT:CA,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:LA,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:fA,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:MA,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:Kw,SEMATTRS_CODE_FILEPATH:q3,SEMATTRS_CODE_FUNCTION:X3,SEMATTRS_CODE_LINENO:Q3,SEMATTRS_CODE_NAMESPACE:K3,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:s3,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:p3,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:d3,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:l3,SEMATTRS_DB_CASSANDRA_KEYSPACE:i3,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:a3,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:u3,SEMATTRS_DB_CASSANDRA_TABLE:c3,SEMATTRS_DB_CONNECTION_STRING:Qw,SEMATTRS_DB_HBASE_NAMESPACE:h3,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:t3,SEMATTRS_DB_MONGODB_COLLECTION:m3,SEMATTRS_DB_MSSQL_INSTANCE_NAME:o3,SEMATTRS_DB_NAME:e3,SEMATTRS_DB_OPERATION:r3,SEMATTRS_DB_REDIS_DATABASE_INDEX:f3,SEMATTRS_DB_SQL_TABLE:v3,SEMATTRS_DB_STATEMENT:n3,SEMATTRS_DB_SYSTEM:qw,SEMATTRS_DB_USER:Jw,SEMATTRS_ENDUSER_ID:G3,SEMATTRS_ENDUSER_ROLE:Y3,SEMATTRS_ENDUSER_SCOPE:Z3,SEMATTRS_EXCEPTION_ESCAPED:y3,SEMATTRS_EXCEPTION_MESSAGE:ea,SEMATTRS_EXCEPTION_STACKTRACE:Y1,SEMATTRS_EXCEPTION_TYPE:ta,SEMATTRS_FAAS_COLDSTART:A3,SEMATTRS_FAAS_CRON:w3,SEMATTRS_FAAS_DOCUMENT_COLLECTION:E3,SEMATTRS_FAAS_DOCUMENT_NAME:b3,SEMATTRS_FAAS_DOCUMENT_OPERATION:T3,SEMATTRS_FAAS_DOCUMENT_TIME:S3,SEMATTRS_FAAS_EXECUTION:g3,SEMATTRS_FAAS_INVOKED_NAME:O3,SEMATTRS_FAAS_INVOKED_PROVIDER:L3,SEMATTRS_FAAS_INVOKED_REGION:x3,SEMATTRS_FAAS_TIME:C3,SEMATTRS_FAAS_TRIGGER:_3,SEMATTRS_HTTP_CLIENT_IP:hA,SEMATTRS_HTTP_FLAVOR:iA,SEMATTRS_HTTP_HOST:nA,SEMATTRS_HTTP_METHOD:J3,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:sA,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:cA,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:lA,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:uA,SEMATTRS_HTTP_ROUTE:pA,SEMATTRS_HTTP_SCHEME:rA,SEMATTRS_HTTP_SERVER_NAME:dA,SEMATTRS_HTTP_STATUS_CODE:oA,SEMATTRS_HTTP_TARGET:eA,SEMATTRS_HTTP_URL:tA,SEMATTRS_HTTP_USER_AGENT:aA,SEMATTRS_MESSAGE_COMPRESSED_SIZE:d4,SEMATTRS_MESSAGE_ID:u4,SEMATTRS_MESSAGE_TYPE:l4,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:p4,SEMATTRS_MESSAGING_CONSUMER_ID:$A,SEMATTRS_MESSAGING_CONVERSATION_ID:GA,SEMATTRS_MESSAGING_DESTINATION:VA,SEMATTRS_MESSAGING_DESTINATION_KIND:BA,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:QA,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:qA,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:KA,SEMATTRS_MESSAGING_KAFKA_PARTITION:JA,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:t4,SEMATTRS_MESSAGING_MESSAGE_ID:zA,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:ZA,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:YA,SEMATTRS_MESSAGING_OPERATION:WA,SEMATTRS_MESSAGING_PROTOCOL:jA,SEMATTRS_MESSAGING_PROTOCOL_VERSION:FA,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:XA,SEMATTRS_MESSAGING_SYSTEM:kA,SEMATTRS_MESSAGING_TEMP_DESTINATION:UA,SEMATTRS_MESSAGING_URL:HA,SEMATTRS_NET_HOST_CARRIER_ICC:H3,SEMATTRS_NET_HOST_CARRIER_MCC:j3,SEMATTRS_NET_HOST_CARRIER_MNC:F3,SEMATTRS_NET_HOST_CARRIER_NAME:U3,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:B3,SEMATTRS_NET_HOST_CONNECTION_TYPE:V3,SEMATTRS_NET_HOST_IP:P3,SEMATTRS_NET_HOST_NAME:k3,SEMATTRS_NET_HOST_PORT:D3,SEMATTRS_NET_PEER_IP:M3,SEMATTRS_NET_PEER_NAME:N3,SEMATTRS_NET_PEER_PORT:I3,SEMATTRS_NET_TRANSPORT:R3,SEMATTRS_PEER_SERVICE:z3,SEMATTRS_RPC_GRPC_STATUS_CODE:o4,SEMATTRS_RPC_JSONRPC_ERROR_CODE:s4,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:c4,SEMATTRS_RPC_JSONRPC_REQUEST_ID:a4,SEMATTRS_RPC_JSONRPC_VERSION:i4,SEMATTRS_RPC_METHOD:r4,SEMATTRS_RPC_SERVICE:n4,SEMATTRS_RPC_SYSTEM:e4,SEMATTRS_THREAD_ID:W3,SEMATTRS_THREAD_NAME:$3,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:nL,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:eL,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:rL,SEMRESATTRS_AWS_ECS_TASK_ARN:oL,SEMRESATTRS_AWS_ECS_TASK_FAMILY:iL,SEMRESATTRS_AWS_ECS_TASK_REVISION:aL,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:sL,SEMRESATTRS_AWS_LOG_GROUP_ARNS:lL,SEMRESATTRS_AWS_LOG_GROUP_NAMES:cL,SEMRESATTRS_AWS_LOG_STREAM_ARNS:dL,SEMRESATTRS_AWS_LOG_STREAM_NAMES:uL,SEMRESATTRS_CLOUD_ACCOUNT_ID:q6,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:J6,SEMRESATTRS_CLOUD_PLATFORM:tL,SEMRESATTRS_CLOUD_PROVIDER:K6,SEMRESATTRS_CLOUD_REGION:Q6,SEMRESATTRS_CONTAINER_ID:hL,SEMRESATTRS_CONTAINER_IMAGE_NAME:mL,SEMRESATTRS_CONTAINER_IMAGE_TAG:vL,SEMRESATTRS_CONTAINER_NAME:pL,SEMRESATTRS_CONTAINER_RUNTIME:fL,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:yL,SEMRESATTRS_DEVICE_ID:_L,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:gL,SEMRESATTRS_DEVICE_MODEL_NAME:EL,SEMRESATTRS_FAAS_ID:SL,SEMRESATTRS_FAAS_INSTANCE:CL,SEMRESATTRS_FAAS_MAX_MEMORY:wL,SEMRESATTRS_FAAS_NAME:TL,SEMRESATTRS_FAAS_VERSION:bL,SEMRESATTRS_HOST_ARCH:xL,SEMRESATTRS_HOST_ID:AL,SEMRESATTRS_HOST_IMAGE_ID:ML,SEMRESATTRS_HOST_IMAGE_NAME:RL,SEMRESATTRS_HOST_IMAGE_VERSION:IL,SEMRESATTRS_HOST_NAME:OL,SEMRESATTRS_HOST_TYPE:LL,SEMRESATTRS_K8S_CLUSTER_NAME:NL,SEMRESATTRS_K8S_CONTAINER_NAME:UL,SEMRESATTRS_K8S_CRONJOB_NAME:qL,SEMRESATTRS_K8S_CRONJOB_UID:KL,SEMRESATTRS_K8S_DAEMONSET_NAME:WL,SEMRESATTRS_K8S_DAEMONSET_UID:ZL,SEMRESATTRS_K8S_DEPLOYMENT_NAME:zL,SEMRESATTRS_K8S_DEPLOYMENT_UID:HL,SEMRESATTRS_K8S_JOB_NAME:XL,SEMRESATTRS_K8S_JOB_UID:$L,SEMRESATTRS_K8S_NAMESPACE_NAME:kL,SEMRESATTRS_K8S_NODE_NAME:PL,SEMRESATTRS_K8S_NODE_UID:DL,SEMRESATTRS_K8S_POD_NAME:BL,SEMRESATTRS_K8S_POD_UID:VL,SEMRESATTRS_K8S_REPLICASET_NAME:FL,SEMRESATTRS_K8S_REPLICASET_UID:jL,SEMRESATTRS_K8S_STATEFULSET_NAME:YL,SEMRESATTRS_K8S_STATEFULSET_UID:GL,SEMRESATTRS_OS_DESCRIPTION:JL,SEMRESATTRS_OS_NAME:t9,SEMRESATTRS_OS_TYPE:QL,SEMRESATTRS_OS_VERSION:e9,SEMRESATTRS_PROCESS_COMMAND:i9,SEMRESATTRS_PROCESS_COMMAND_ARGS:s9,SEMRESATTRS_PROCESS_COMMAND_LINE:a9,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:r9,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:o9,SEMRESATTRS_PROCESS_OWNER:c9,SEMRESATTRS_PROCESS_PID:n9,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:u9,SEMRESATTRS_PROCESS_RUNTIME_NAME:H0,SEMRESATTRS_PROCESS_RUNTIME_VERSION:l9,SEMRESATTRS_SERVICE_INSTANCE_ID:p9,SEMRESATTRS_SERVICE_NAME:wl,SEMRESATTRS_SERVICE_NAMESPACE:d9,SEMRESATTRS_SERVICE_VERSION:h9,SEMRESATTRS_TELEMETRY_AUTO_VERSION:f9,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:da,SEMRESATTRS_TELEMETRY_SDK_NAME:ua,SEMRESATTRS_TELEMETRY_SDK_VERSION:pa,SEMRESATTRS_WEBENGINE_DESCRIPTION:y9,SEMRESATTRS_WEBENGINE_NAME:m9,SEMRESATTRS_WEBENGINE_VERSION:v9,SemanticAttributes:h4,SemanticResourceAttributes:_9,TELEMETRYSDKLANGUAGEVALUES_CPP:dx,TELEMETRYSDKLANGUAGEVALUES_DOTNET:px,TELEMETRYSDKLANGUAGEVALUES_ERLANG:hx,TELEMETRYSDKLANGUAGEVALUES_GO:fx,TELEMETRYSDKLANGUAGEVALUES_JAVA:mx,TELEMETRYSDKLANGUAGEVALUES_NODEJS:vx,TELEMETRYSDKLANGUAGEVALUES_PHP:yx,TELEMETRYSDKLANGUAGEVALUES_PYTHON:_x,TELEMETRYSDKLANGUAGEVALUES_RUBY:gx,TELEMETRYSDKLANGUAGEVALUES_WEBJS:jg,TelemetrySdkLanguageValues:Ex}),_r,na=(_r={},_r[ua]="opentelemetry",_r[H0]="browser",_r[da]=jg,_r[pa]=Cf,_r);function Sx(t){}var Fg=9,bx=6,Cx=Math.pow(10,bx),ha=Math.pow(10,Fg);function un(t){var e=t/1e3,i=Math.trunc(e),c=Math.round(t%1e3*Cx);return[i,c]}function wa(){var t=Gn.timeOrigin;if(typeof t!="number"){var e=Gn;t=e.timing&&e.timing.fetchStart}return t}function Al(t){var e=un(wa()),i=un(typeof t=="number"?t:Gn.now());return Ol(e,i)}function wx(t){if(Aa(t))return t;if(typeof t=="number")return t<wa()?Al(t):un(t);if(_instanceof(t,Date))return un(t.getTime());throw TypeError("Invalid input type")}function Hg(t,e){var i=e[0]-t[0],c=e[1]-t[1];return c<0&&(i-=1,c+=ha),[i,c]}function Ax(t){var e=Fg,i=""+"0".repeat(e)+t[1]+"Z",c=i.substr(i.length-e-1),d1=new Date(t[0]*1e3).toISOString();return d1.replace("000Z",c)}function Ox(t){return t[0]*ha+t[1]}function Lx(t){return t[0]*1e3+t[1]/1e6}function xx(t){return t[0]*1e6+t[1]/1e3}function Aa(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Fc(t){return Aa(t)||typeof t=="number"||_instanceof(t,Date)}function Ol(t,e){var i=[t[0]+e[0],t[1]+e[1]];return i[1]>=ha&&(i[1]-=ha,i[0]+=1),i}var wr;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(wr||(wr={}));var Rx=function Rx(t){var e=typeof Symbol=="function"&&Symbol.iterator,i=e&&t[e],c=0;if(i)return i.call(t);if(t&&typeof t.length=="number")return{next:function next(){return t&&c>=t.length&&(t=void 0),{value:t&&t[c++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zg=function(){function t(e){e===void 0&&(e={});var i;this._propagators=(i=e.propagators)!==null&&i!==void 0?i:[],this._fields=Array.from(new Set(this._propagators.map(function(c){return typeof c.fields=="function"?c.fields():[]}).reduce(function(c,d1){return c.concat(d1)},[])))}return t.prototype.inject=function(e,i,c){var d1,l;try{for(var m=Rx(this._propagators),v=m.next();!v.done;v=m.next()){var g=v.value;try{g.inject(e,i,c)}catch(S){At.warn("Failed to inject with "+g.constructor.name+". Err: "+S.message)}}}catch(S){d1={error:S}}finally{try{v&&!v.done&&(l=m.return)&&l.call(m)}finally{if(d1)throw d1.error}}},t.prototype.extract=function(e,i,c){return this._propagators.reduce(function(d1,l){try{return l.extract(d1,i,c)}catch(m){At.warn("Failed to inject with "+l.constructor.name+". Err: "+m.message)}return d1},e)},t.prototype.fields=function(){return this._fields.slice()},t}(),Hc="[_0-9a-z-*/]",Mx="[a-z]"+Hc+"{0,255}",Ix="[a-z0-9]"+Hc+"{0,240}@[a-z]"+Hc+"{0,13}",Nx=new RegExp("^(?:"+Mx+"|"+Ix+")$"),Px=/^[ -~]{0,255}[!-~]$/,Dx=/,|=/;function kx(t){return Nx.test(t)}function Vx(t){return Px.test(t)&&!Dx.test(t)}var hh=32,Bx=512,fh=",",mh="=",Gg=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,i){var c=this._clone();return c._internalState.has(e)&&c._internalState.delete(e),c._internalState.set(e,i),c},t.prototype.unset=function(e){var i=this._clone();return i._internalState.delete(e),i},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(i,c){return i.push(c+mh+e.get(c)),i},[]).join(fh)},t.prototype._parse=function(e){e.length>Bx||(this._internalState=e.split(fh).reverse().reduce(function(i,c){var d1=c.trim(),l=d1.indexOf(mh);if(l!==-1){var m=d1.slice(0,l),v=d1.slice(l+1,c.length);kx(m)&&Vx(v)&&i.set(m,v)}return i},new Map),this._internalState.size>hh&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,hh))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),ra="traceparent",oa="tracestate",Ux="00",jx="(?!ff)[\\da-f]{2}",Fx="(?![0]{32})[\\da-f]{32}",Hx="(?![0]{16})[\\da-f]{16}",zx="[\\da-f]{2}",Gx=new RegExp("^\\s?("+jx+")-("+Fx+")-("+Hx+")-("+zx+")(-.*)?\\s?$");function Yg(t){var e=Gx.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Zg=function(){function t(){}return t.prototype.inject=function(e,i,c){var d1=_e.getSpanContext(e);if(!(!d1||Ca(e)||!Nr(d1))){var l=Ux+"-"+d1.traceId+"-"+d1.spanId+"-0"+Number(d1.traceFlags||Re.NONE).toString(16);c.set(i,ra,l),d1.traceState&&c.set(i,oa,d1.traceState.serialize())}},t.prototype.extract=function(e,i,c){var d1=c.get(i,ra);if(!d1)return e;var l=Array.isArray(d1)?d1[0]:d1;if(typeof l!="string")return e;var m=Yg(l);if(!m)return e;m.isRemote=!0;var v=c.get(i,oa);if(v){var g=Array.isArray(v)?v.join(","):v;m.traceState=new Gg(typeof g=="string"?g:void 0)}return _e.setSpanContext(e,m)},t.prototype.fields=function(){return[ra,oa]},t}(),Ll=Mo("OpenTelemetry SDK Context Key RPC_METADATA"),zc;(function(t){t.HTTP="http"})(zc||(zc={}));function Yx(t,e){return t.setValue(Ll,e)}function Zx(t){return t.deleteValue(Ll)}function Wx(t){return t.getValue(Ll)}var Gc=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dn.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),ia=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dn.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),$x=function(){function t(e){var i,c,d1,l;this._root=e.root,this._root||(Cr(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new ia),this._remoteParentSampled=(i=e.remoteParentSampled)!==null&&i!==void 0?i:new ia,this._remoteParentNotSampled=(c=e.remoteParentNotSampled)!==null&&c!==void 0?c:new Gc,this._localParentSampled=(d1=e.localParentSampled)!==null&&d1!==void 0?d1:new ia,this._localParentNotSampled=(l=e.localParentNotSampled)!==null&&l!==void 0?l:new Gc}return t.prototype.shouldSample=function(e,i,c,d1,l,m){var v=_e.getSpanContext(e);return!v||!Nr(v)?this._root.shouldSample(e,i,c,d1,l,m):v.isRemote?v.traceFlags&Re.SAMPLED?this._remoteParentSampled.shouldSample(e,i,c,d1,l,m):this._remoteParentNotSampled.shouldSample(e,i,c,d1,l,m):v.traceFlags&Re.SAMPLED?this._localParentSampled.shouldSample(e,i,c,d1,l,m):this._localParentNotSampled.shouldSample(e,i,c,d1,l,m)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}(),Xx=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*0xffffffff)}return t.prototype.shouldSample=function(e,i){return{decision:ba(i)&&this._accumulate(i)<this._upperBound?dn.RECORD_AND_SAMPLED:dn.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var i=0,c=0;c<e.length/8;c++){var d1=c*8,l=parseInt(e.slice(d1,d1+8),16);i=(i^l)>>>0}return i},t}(),Kx="[object Object]",qx="[object Null]",Qx="[object Undefined]",Jx=Function.prototype,Wg=Jx.toString,tR=Wg.call(Object),eR=nR(Object.getPrototypeOf,Object),$g=Object.prototype,Xg=$g.hasOwnProperty,Fn=Symbol?Symbol.toStringTag:void 0,Kg=$g.toString;function nR(t,e){return function(i){return t(e(i))}}function vh(t){if(!rR(t)||oR(t)!==Kx)return!1;var e=eR(t);if(e===null)return!0;var i=Xg.call(e,"constructor")&&e.constructor;return typeof i=="function"&&_instanceof(i,i)&&Wg.call(i)===tR}function rR(t){return t!=null&&(typeof t==="undefined"?"undefined":_type_of(t))=="object"}function oR(t){return t==null?t===void 0?Qx:qx:Fn&&Fn in Object(t)?iR(t):aR(t)}function iR(t){var e=Xg.call(t,Fn),i=t[Fn],c=!1;try{t[Fn]=void 0,c=!0}catch(l){}var d1=Kg.call(t);return c&&(e?t[Fn]=i:delete t[Fn]),d1}function aR(t){return Kg.call(t)}var sR=20;function qg(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=t.shift(),c=new WeakMap;t.length>0;)i=Qg(i,t.shift(),0,c);return i}function Ic(t){return fa(t)?t.slice():t}function Qg(t,e,i,c){i===void 0&&(i=0);var d1;if(!(i>sR)){if(i++,aa(t)||aa(e)||Jg(e))d1=Ic(e);else if(fa(t)){if(d1=t.slice(),fa(e))for(var l=0,m=e.length;l<m;l++)d1.push(Ic(e[l]));else if(mo(e))for(var v=Object.keys(e),l=0,m=v.length;l<m;l++){var g=v[l];d1[g]=Ic(e[g])}}else if(mo(t))if(mo(e)){if(!cR(t,e))return e;d1=Object.assign({},t);for(var v=Object.keys(e),l=0,m=v.length;l<m;l++){var g=v[l],S=e[g];if(aa(S))(typeof S==="undefined"?"undefined":_type_of(S))>"u"?delete d1[g]:d1[g]=S;else{var b=d1[g],A=S;if(yh(t,g,c)||yh(e,g,c))delete d1[g];else{if(mo(b)&&mo(A)){var L=c.get(b)||[],N=c.get(A)||[];L.push({obj:t,key:g}),N.push({obj:e,key:g}),c.set(b,L),c.set(A,N)}d1[g]=Qg(d1[g],S,i,c)}}}}else d1=e;return d1}}function yh(t,e,i){for(var c=i.get(t[e])||[],d1=0,l=c.length;d1<l;d1++){var m=c[d1];if(m.key===e&&m.obj===t)return!0}return!1}function fa(t){return Array.isArray(t)}function Jg(t){return typeof t=="function"}function mo(t){return!aa(t)&&!fa(t)&&!Jg(t)&&(typeof t==="undefined"?"undefined":_type_of(t))=="object"}function aa(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||(typeof t==="undefined"?"undefined":_type_of(t))>"u"||_instanceof(t,Date)||_instanceof(t,RegExp)||t===null}function cR(t,e){return!(!vh(t)||!vh(e))}var lR=function(){var t=function t1(e,i){return t=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(c,d1){c.__proto__=d1}||function(c,d1){for(var l in d1)Object.prototype.hasOwnProperty.call(d1,l)&&(c[l]=d1[l])},t(e,i)};return function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function c(){this.constructor=e}e.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}(),tE=function(t){lR(e,t);function e(i){var c=t.call(this,i)||this;return Object.setPrototypeOf(c,e.prototype),c}return e}(Error);function uR(t,e){var i,c=new Promise(function(d1,l){i=setTimeout(function(){l(new tE("Operation timed out."))},e)});return Promise.race([t,c]).then(function(d1){return clearTimeout(i),d1},function(d1){throw clearTimeout(i),d1})}var dR=function dR(t){var e=typeof Symbol=="function"&&Symbol.iterator,i=e&&t[e],c=0;if(i)return i.call(t);if(t&&typeof t.length=="number")return{next:function next(){return t&&c>=t.length&&(t=void 0),{value:t&&t[c++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function eE(t,e){return typeof e=="string"?t===e:!!t.match(e)}function pR(t,e){var i,c;if(!e)return!1;try{for(var d1=dR(e),l=d1.next();!l.done;l=d1.next()){var m=l.value;if(eE(t,m))return!0}}catch(v){i={error:v}}finally{try{l&&!l.done&&(c=d1.return)&&c.call(d1)}finally{if(i)throw i.error}}return!1}function hR(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var fR=function(){function t(){var e=this;this._promise=new Promise(function(i,c){e._resolve=i,e._reject=c})}return Object.defineProperty(t.prototype,"promise",{get:function get(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t}(),mR=function mR(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},vR=function vR(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))},nE=function(){function t(e,i){this._callback=e,this._that=i,this._isCalled=!1,this._deferred=new fR}return Object.defineProperty(t.prototype,"isCalled",{get:function get(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function get(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,i=this,c=[],d1=0;d1<arguments.length;d1++)c[d1]=arguments[d1];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,vR([this._that],mR(c),!1))).then(function(l){return i._deferred.resolve(l)},function(l){return i._deferred.reject(l)})}catch(l){this._deferred.reject(l)}}return this._deferred.promise},t}();function yR(t,e){return new Promise(function(i){qe.with(gl(qe.active()),function(){t.export(e,function(c){i(c)})})})}var _R={_export:yR},gR=Object.freeze({__proto__:null,AlwaysOffSampler:Gc,AlwaysOnSampler:ia,AnchoredClock:Aw,BindOnceFuture:nE,CompositePropagator:zg,DEFAULT_ATTRIBUTE_COUNT_LIMIT:So,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:To,DEFAULT_ENVIRONMENT:Sl,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Ef,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Tf,get ExportResultCode(){return wr},ParentBasedSampler:$x,get RPCType(){return zc},RandomIdGenerator:Xw,SDK_INFO:na,TRACE_PARENT_HEADER:ra,TRACE_STATE_HEADER:oa,TimeoutError:tE,TraceIdRatioBasedSampler:Xx,TraceState:Gg,get TracesSamplerValues(){return He},VERSION:Cf,W3CBaggagePropagator:ff,W3CTraceContextPropagator:Zg,_globalThis:Cl,addHrTimes:Ol,baggageUtils:ww,callWithTimeout:uR,deleteRPCMetadata:Zx,getEnv:ye,getEnvWithoutDefaults:Sf,getRPCMetadata:Wx,getTimeOrigin:wa,globalErrorHandler:Cr,hexToBase64:Zw,hexToBinary:bf,hrTime:Al,hrTimeDuration:Hg,hrTimeToMicroseconds:xx,hrTimeToMilliseconds:Lx,hrTimeToNanoseconds:Ox,hrTimeToTimeStamp:Ax,internal:_R,isAttributeKey:vf,isAttributeValue:Tl,isTimeInput:Fc,isTimeInputHrTime:Aa,isTracingSuppressed:Ca,isUrlIgnored:pR,isWrapped:hR,loggingErrorHandler:_f,merge:qg,millisToHrTime:un,otperformance:Gn,parseEnvironment:bl,parseTraceParent:Yg,sanitizeAttributes:Eo,setGlobalErrorHandler:Mw,setRPCMetadata:Yx,suppressTracing:gl,timeInputToHrTime:wx,unrefTimer:Sx,unsuppressTracing:_w,urlMatches:eE}),ER="exception",TR=function TR(t){var e=typeof Symbol=="function"&&Symbol.iterator,i=e&&t[e],c=0;if(i)return i.call(t);if(t&&typeof t.length=="number")return{next:function next(){return t&&c>=t.length&&(t=void 0),{value:t&&t[c++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_h=function _h(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},SR=function SR(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))},bR=function(){function t(e,i,c,d1,l,m,v,g,S,b){v===void 0&&(v=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:ca.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=c,this._spanContext=d1,this.parentSpanId=m,this.kind=l,this.links=v;var A=Date.now();this._performanceStartTime=Gn.now(),this._performanceOffset=A-(this._performanceStartTime+wa()),this._startTimeProvided=g!=null,this.startTime=this._getTime(g!=null?g:A),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,b!=null&&this.setAttributes(b),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,i)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,i){return i==null||this._isSpanEnded()?this:e.length===0?(At.warn("Invalid attribute key: "+e),this):Tl(i)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(i),this):(At.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var i,c;try{for(var d1=TR(Object.entries(e)),l=d1.next();!l.done;l=d1.next()){var m=_h(l.value,2),v=m[0],g=m[1];this.setAttribute(v,g)}}catch(S){i={error:S}}finally{try{l&&!l.done&&(c=d1.return)&&c.call(d1)}finally{if(i)throw i.error}}return this},t.prototype.addEvent=function(e,i,c){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return At.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&At.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Fc(i)&&(Fc(c)||(c=i),i=void 0);var d1=Eo(i);return this.events.push({name:e,attributes:d1,time:this._getTime(c),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var i;return(i=this.links).push.apply(i,SR([],_h(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=e,this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){At.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(e),this._duration=Hg(this.startTime,this.endTime),this._duration[0]<0&&(At.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&At.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<Gn.now())return Al(e+this._performanceOffset);if(typeof e=="number")return un(e);if(_instanceof(e,Date))return un(e.getTime());if(Aa(e))return e;if(this._startTimeProvided)return un(Date.now());var i=Gn.now()-this._performanceStartTime;return Ol(this.startTime,un(i))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,i){var c={};typeof e=="string"?c[ea]=e:e&&(e.code?c[ta]=e.code.toString():e.name&&(c[ta]=e.name),e.message&&(c[ea]=e.message),e.stack&&(c[Y1]=e.stack)),c[ta]||c[ea]?this.addEvent(ER,c,i):At.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function get(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function get(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function get(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function get(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function get(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&At.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,i){return e.length<=i?e:e.substr(0,i)},t.prototype._truncateToSize=function(e){var i=this,c=this._attributeValueLengthLimit;return c<=0?(At.warn("Attribute value limit must be positive, got "+c),e):typeof e=="string"?this._truncateToLimitUtil(e,c):Array.isArray(e)?e.map(function(d1){return typeof d1=="string"?i._truncateToLimitUtil(d1,c):d1}):e},t}(),Ar;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Ar||(Ar={}));var ma=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Ar.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),br=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Ar.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),Nc=function(){function t(e){var i,c,d1,l;this._root=e.root,this._root||(Cr(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new br),this._remoteParentSampled=(i=e.remoteParentSampled)!==null&&i!==void 0?i:new br,this._remoteParentNotSampled=(c=e.remoteParentNotSampled)!==null&&c!==void 0?c:new ma,this._localParentSampled=(d1=e.localParentSampled)!==null&&d1!==void 0?d1:new br,this._localParentNotSampled=(l=e.localParentNotSampled)!==null&&l!==void 0?l:new ma}return t.prototype.shouldSample=function(e,i,c,d1,l,m){var v=_e.getSpanContext(e);return!v||!Nr(v)?this._root.shouldSample(e,i,c,d1,l,m):v.isRemote?v.traceFlags&Re.SAMPLED?this._remoteParentSampled.shouldSample(e,i,c,d1,l,m):this._remoteParentNotSampled.shouldSample(e,i,c,d1,l,m):v.traceFlags&Re.SAMPLED?this._localParentSampled.shouldSample(e,i,c,d1,l,m):this._localParentNotSampled.shouldSample(e,i,c,d1,l,m)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}(),gh=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*0xffffffff)}return t.prototype.shouldSample=function(e,i){return{decision:ba(i)&&this._accumulate(i)<this._upperBound?Ar.RECORD_AND_SAMPLED:Ar.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var i=0,c=0;c<e.length/8;c++){var d1=c*8,l=parseInt(e.slice(d1,d1+8),16);i=(i^l)>>>0}return i},t}(),CR=ye(),wR=He.AlwaysOn,gr=1;function rE(){return{sampler:oE(CR),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:ye().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:ye().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:ye().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:ye().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:ye().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:ye().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:ye().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:ye().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function oE(t){switch(t===void 0&&(t=ye()),t.OTEL_TRACES_SAMPLER){case He.AlwaysOn:return new br;case He.AlwaysOff:return new ma;case He.ParentBasedAlwaysOn:return new Nc({root:new br});case He.ParentBasedAlwaysOff:return new Nc({root:new ma});case He.TraceIdRatio:return new gh(Eh(t));case He.ParentBasedTraceIdRatio:return new Nc({root:new gh(Eh(t))});default:return At.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+wR+'".'),new br}}function Eh(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return At.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+gr+"."),gr;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(At.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+gr+"."),gr):e<0||e>1?(At.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+gr+"."),gr):e}function AR(t){var e={sampler:oE()},i=rE(),c=Object.assign({},i,e,t);return c.generalLimits=Object.assign({},i.generalLimits,t.generalLimits||{}),c.spanLimits=Object.assign({},i.spanLimits,t.spanLimits||{}),c}function OR(t){var e,i,c,d1,l,m,v,g,S,b,A,L,N=Object.assign({},t.spanLimits),F=Sf();return N.attributeCountLimit=(m=(l=(d1=(i=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&i!==void 0?i:(c=t.generalLimits)===null||c===void 0?void 0:c.attributeCountLimit)!==null&&d1!==void 0?d1:F.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&l!==void 0?l:F.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&m!==void 0?m:So,N.attributeValueLengthLimit=(L=(A=(b=(g=(v=t.spanLimits)===null||v===void 0?void 0:v.attributeValueLengthLimit)!==null&&g!==void 0?g:(S=t.generalLimits)===null||S===void 0?void 0:S.attributeValueLengthLimit)!==null&&b!==void 0?b:F.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&A!==void 0?A:F.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&L!==void 0?L:To,Object.assign({},t,{spanLimits:N})}var LR=function(){function t(e,i){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var c=ye();this._maxExportBatchSize=typeof(i==null?void 0:i.maxExportBatchSize)=="number"?i.maxExportBatchSize:c.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof(i==null?void 0:i.maxQueueSize)=="number"?i.maxQueueSize:c.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof(i==null?void 0:i.scheduledDelayMillis)=="number"?i.scheduledDelayMillis:c.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof(i==null?void 0:i.exportTimeoutMillis)=="number"?i.exportTimeoutMillis:c.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new nE(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(At.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,i){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&Re.SAMPLED&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&At.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(At.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(i,c){for(var d1=[],l=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),m=0,v=l;m<v;m++)d1.push(e._flushOneBatch());Promise.all(d1).then(function(){i()}).catch(c)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(i,c){var d1=setTimeout(function(){c(new Error("Timeout"))},e._exportTimeoutMillis);qe.with(gl(qe.active()),function(){var l;e._finishedSpans.length<=e._maxExportBatchSize?(l=e._finishedSpans,e._finishedSpans=[]):l=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var m=function m(){return e._exporter.export(l,function(A){var L;clearTimeout(d1),A.code===wr.SUCCESS?i():c((L=A.error)!==null&&L!==void 0?L:new Error("BatchSpanProcessor: span export failed"))})},v=null,g=0,S=l.length;g<S;g++){var b=l[g];b.resource.asyncAttributesPending&&b.resource.waitForAsyncAttributes&&(v!=null||(v=[]),v.push(b.resource.waitForAsyncAttributes()))}v===null?m():Promise.all(v).then(m,function(A){Cr(A),c(A)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var i=function i(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(c){e._isExporting=!1,Cr(c)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return i();this._timer===void 0&&(this._timer=setTimeout(function(){return i()},this._scheduledDelayMillis))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}(),xR=function(){var t=function t1(e,i){return t=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(c,d1){c.__proto__=d1}||function(c,d1){for(var l in d1)Object.prototype.hasOwnProperty.call(d1,l)&&(c[l]=d1[l])},t(e,i)};return function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function c(){this.constructor=e}e.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}(),RR=function(t){xR(e,t);function e(i,c){var d1=t.call(this,i,c)||this;return d1.onInit(c),d1}return e.prototype.onInit=function(i){var c=this;(i==null?void 0:i.disableAutoFlushOnDocumentHide)!==!0&&(typeof document==="undefined"?"undefined":_type_of(document))<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&c.forceFlush()},this._pageHideListener=function(){c.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){(typeof document==="undefined"?"undefined":_type_of(document))<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(LR),MR=8,IR=16,NR=function(){function t(){this.generateTraceId=Th(IR),this.generateSpanId=Th(MR)}return t}(),Ki=Array(32);function Th(t){return function(){for(var e=0;e<t*2;e++)Ki[e]=Math.floor(Math.random()*16)+48,Ki[e]>=58&&(Ki[e]+=39);return String.fromCharCode.apply(null,Ki.slice(0,t*2))}}var PR=function(){function t(e,i,c){this._tracerProvider=c;var d1=AR(i);this._sampler=d1.sampler,this._generalLimits=d1.generalLimits,this._spanLimits=d1.spanLimits,this._idGenerator=i.idGenerator||new NR,this.resource=c.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,i,c){var d1,l,m;i===void 0&&(i={}),c===void 0&&(c=qe.active()),i.root&&(c=_e.deleteSpan(c));var v=_e.getSpan(c);if(Ca(c)){At.debug("Instrumentation suppressed, returning Noop Span");var g=_e.wrapSpanContext(pl);return g}var S=v==null?void 0:v.spanContext(),b=this._idGenerator.generateSpanId(),A,L,N;!S||!_e.isSpanContextValid(S)?A=this._idGenerator.generateTraceId():(A=S.traceId,L=S.traceState,N=S.spanId);var F=(d1=i.kind)!==null&&d1!==void 0?d1:sa.INTERNAL,z=((l=i.links)!==null&&l!==void 0?l:[]).map(function(Q){return{context:Q.context,attributes:Eo(Q.attributes)}}),j=Eo(i.attributes),P=this._sampler.shouldSample(c,A,e,F,j,z);L=(m=P.traceState)!==null&&m!==void 0?m:L;var k=P.decision===dn.RECORD_AND_SAMPLED?Re.SAMPLED:Re.NONE,U={traceId:A,spanId:b,traceFlags:k,traceState:L};if(P.decision===dn.NOT_RECORD){At.debug("Recording is off, propagating context in a non-recording span");var g=_e.wrapSpanContext(U);return g}var I=Eo(Object.assign(j,P.attributes)),H=new bR(this,c,e,U,F,N,z,i.startTime,void 0,I);return H},t.prototype.startActiveSpan=function(e,i,c,d1){var l,m,v;if(!(arguments.length<2)){arguments.length===2?v=i:arguments.length===3?(l=i,v=c):(l=i,m=c,v=d1);var g=m!=null?m:qe.active(),S=this.startSpan(e,l,g),b=_e.setSpan(g,S);return qe.with(b,v,void 0,S)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}();function DR(){return"unknown_service"}var Tn=function Tn1(){return Tn=Object.assign||function(t){for(var e,i=1,c=arguments.length;i<c;i++){e=arguments[i];for(var d1 in e)Object.prototype.hasOwnProperty.call(e,d1)&&(t[d1]=e[d1])}return t},Tn.apply(this,arguments)},kR=function kR(t,e,i,c){function d1(l){return _instanceof(l,i)?l:new i(function(m){m(l)})}return new(i||(i=Promise))(function(l,m){function v(b){try{S(c.next(b))}catch(A){m(A)}}function g(b){try{S(c.throw(b))}catch(A){m(A)}}function S(b){b.done?l(b.value):d1(b.value).then(v,g)}S((c=c.apply(t,e||[])).next())})},VR=function VR(t,e){var i={label:0,sent:function sent(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},c,d1,l,m;return m={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function v(S){return function(b){return g([S,b])}}function g(S){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,d1&&(l=S[0]&2?d1.return:S[0]?d1.throw||((l=d1.return)&&l.call(d1),0):d1.next)&&!(l=l.call(d1,S[1])).done)return l;switch(d1=0,l&&(S=[S[0]&2,l.value]),S[0]){case 0:case 1:l=S;break;case 4:return i.label++,{value:S[1],done:!1};case 5:i.label++,d1=S[1],S=[0];continue;case 7:S=i.ops.pop(),i.trys.pop();continue;default:if(l=i.trys,!(l=l.length>0&&l[l.length-1])&&(S[0]===6||S[0]===2)){i=0;continue}if(S[0]===3&&(!l||S[1]>l[0]&&S[1]<l[3])){i.label=S[1];break}if(S[0]===6&&i.label<l[1]){i.label=l[1],l=S;break}if(l&&i.label<l[2]){i.label=l[2],i.ops.push(S);break}l[2]&&i.ops.pop(),i.trys.pop();continue}S=e.call(t,i)}catch(b){S=[6,b],d1=0}finally{c=l=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}},BR=function BR(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},Sh=function(){function t(e,i){var c=this,d1;this._attributes=e,this.asyncAttributesPending=i!=null,this._syncAttributes=(d1=this._attributes)!==null&&d1!==void 0?d1:{},this._asyncAttributesPromise=i==null?void 0:i.then(function(l){return c._attributes=Object.assign({},c._attributes,l),c.asyncAttributesPending=!1,l},function(l){return At.debug("a resource's async attributes promise rejected: %s",l),c.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[wl]=DR(),e[da]=na[da],e[ua]=na[ua],e[pa]=na[pa],e))},Object.defineProperty(t.prototype,"attributes",{get:function get(){var e;return this.asyncAttributesPending&&At.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return kR(this,void 0,void 0,function(){return VR(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var i=this,c;if(!e)return this;var d1=Tn(Tn({},this._syncAttributes),(c=e._syncAttributes)!==null&&c!==void 0?c:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(d1);var l=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(m){var v,g=BR(m,2),S=g[0],b=g[1];return Tn(Tn(Tn(Tn({},i._syncAttributes),S),(v=e._syncAttributes)!==null&&v!==void 0?v:e.attributes),b)});return new t(d1,l)},t.EMPTY=new t({}),t}(),qi=function qi(t){var e=typeof Symbol=="function"&&Symbol.iterator,i=e&&t[e],c=0;if(i)return i.call(t);if(t&&typeof t.length=="number")return{next:function next(){return t&&c>=t.length&&(t=void 0),{value:t&&t[c++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},UR=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,i,c=[];try{for(var d1=qi(this._spanProcessors),l=d1.next();!l.done;l=d1.next()){var m=l.value;c.push(m.forceFlush())}}catch(v){e={error:v}}finally{try{l&&!l.done&&(i=d1.return)&&i.call(d1)}finally{if(e)throw e.error}}return new Promise(function(v){Promise.all(c).then(function(){v()}).catch(function(g){Cr(g||new Error("MultiSpanProcessor: forceFlush failed")),v()})})},t.prototype.onStart=function(e,i){var c,d1;try{for(var l=qi(this._spanProcessors),m=l.next();!m.done;m=l.next()){var v=m.value;v.onStart(e,i)}}catch(g){c={error:g}}finally{try{m&&!m.done&&(d1=l.return)&&d1.call(l)}finally{if(c)throw c.error}}},t.prototype.onEnd=function(e){var i,c;try{for(var d1=qi(this._spanProcessors),l=d1.next();!l.done;l=d1.next()){var m=l.value;m.onEnd(e)}}catch(v){i={error:v}}finally{try{l&&!l.done&&(c=d1.return)&&c.call(d1)}finally{if(i)throw i.error}}},t.prototype.shutdown=function(){var e,i,c=[];try{for(var d1=qi(this._spanProcessors),l=d1.next();!l.done;l=d1.next()){var m=l.value;c.push(m.shutdown())}}catch(v){e={error:v}}finally{try{l&&!l.done&&(i=d1.return)&&i.call(d1)}finally{if(e)throw e.error}}return new Promise(function(v,g){Promise.all(c).then(function(){v()},g)})},t}(),jR=function(){function t(){}return t.prototype.onStart=function(e,i){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}(),Hn;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Hn||(Hn={}));var FR=function(){function t(e){e===void 0&&(e={});var i;this._registeredSpanProcessors=[],this._tracers=new Map;var c=qg({},rE(),OR(e));this.resource=(i=c.resource)!==null&&i!==void 0?i:Sh.empty(),this.resource=Sh.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});var d1=this._buildExporterFromEnv();if(d1!==void 0){var l=new RR(d1);this.activeSpanProcessor=l}else this.activeSpanProcessor=new jR}return t.prototype.getTracer=function(e,i,c){var d1=e+"@"+(i||"")+":"+((c==null?void 0:c.schemaUrl)||"");return this._tracers.has(d1)||this._tracers.set(d1,new PR({name:e,version:i,schemaUrl:c==null?void 0:c.schemaUrl},this._config,this)),this._tracers.get(d1)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(i){return At.error("Error while trying to shutdown current span processor",i)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new UR(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),_e.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&qe.setGlobalContextManager(e.contextManager),e.propagator&&Sr.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,i=this._registeredSpanProcessors.map(function(c){return new Promise(function(d1){var l,m=setTimeout(function(){d1(new Error("Span processor did not completed within timeout period of "+e+" ms")),l=Hn.timeout},e);c.forceFlush().then(function(){clearTimeout(m),l!==Hn.timeout&&(l=Hn.resolved,d1(l))}).catch(function(v){clearTimeout(m),l=Hn.error,d1(v)})})});return new Promise(function(c,d1){Promise.all(i).then(function(l){var m=l.filter(function(v){return v!==Hn.resolved});m.length>0?d1(m):c()}).catch(function(l){return d1([l])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var i;return(i=this.constructor._registeredPropagators.get(e))===null||i===void 0?void 0:i()},t.prototype._getSpanExporter=function(e){var i;return(i=this.constructor._registeredExporters.get(e))===null||i===void 0?void 0:i()},t.prototype._buildPropagatorFromEnv=function(){var e=this,i=Array.from(new Set(ye().OTEL_PROPAGATORS)),c=i.map(function(l){var m=e._getPropagator(l);return m||At.warn('Propagator "'+l+'" requested through environment variable is unavailable.'),m}),d1=c.reduce(function(l,m){return m&&l.push(m),l},[]);if(d1.length!==0)return i.length===1?d1[0]:new zg({propagators:d1})},t.prototype._buildExporterFromEnv=function(){var e=ye().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var i=this._getSpanExporter(e);return i||At.error('Exporter "'+e+'" requested through environment variable is unavailable.'),i}},t._registeredPropagators=new Map([["tracecontext",function(){return new Zg}],["baggage",function(){return new ff}]]),t._registeredExporters=new Map,t}(),HR=function HR(t,e){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),d1,l=[],m;try{for(;(e===void 0||e-- >0)&&!(d1=c.next()).done;)l.push(d1.value)}catch(v){m={error:v}}finally{try{d1&&!d1.done&&(i=c.return)&&i.call(c)}finally{if(m)throw m.error}}return l},zR=function zR(t,e,i){if(i||arguments.length===2)for(var c=0,d1=e.length,l;c<d1;c++)(l||!(c in e))&&(l||(l=Array.prototype.slice.call(e,0,c)),l[c]=e[c]);return t.concat(l||Array.prototype.slice.call(e))},GR=function(){function t(){this._enabled=!1,this._currentContext=jn}return t.prototype._bindFunction=function(e,i){e===void 0&&(e=jn);var c=this,d1=function d1(){for(var l=this,m=[],v=0;v<arguments.length;v++)m[v]=arguments[v];return c.with(e,function(){return i.apply(l,m)})};return Object.defineProperty(d1,"length",{enumerable:!1,configurable:!0,writable:!1,value:i.length}),d1},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(e,i){return e===void 0&&(e=this.active()),typeof i=="function"?this._bindFunction(e,i):i},t.prototype.disable=function(){return this._currentContext=jn,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=jn,this)},t.prototype.with=function(e,i,c){for(var d1=[],l=3;l<arguments.length;l++)d1[l-3]=arguments[l];var m=this._currentContext;this._currentContext=e||jn;try{return i.call.apply(i,zR([c],HR(d1),!1))}finally{this._currentContext=m}},t}(),YR=function(){var t=function t1(e,i){return t=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(c,d1){c.__proto__=d1}||function(c,d1){for(var l in d1)Object.prototype.hasOwnProperty.call(d1,l)&&(c[l]=d1[l])},t(e,i)};return function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function c(){this.constructor=e}e.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}(),ZR=function(t){YR(e,t);function e(i){i===void 0&&(i={});var c=t.call(this,i)||this;if(i.contextManager)throw"contextManager should be defined in register method not in constructor";if(i.propagator)throw"propagator should be defined in register method not in constructor";return c}return e.prototype.register=function(i){i===void 0&&(i={}),i.contextManager===void 0&&(i.contextManager=new GR),i.contextManager&&i.contextManager.enable(),t.prototype.register.call(this,i)},e}(FR),WR=function(){function t(){}return t.prototype.emit=function(e){},t}(),$R=function(){function t(){}return t.prototype.getLogger=function(e,i,c){return new WR},t}(),bh=new $R,XR=(typeof globalThis==="undefined"?"undefined":_type_of(globalThis))=="object"?globalThis:(typeof self==="undefined"?"undefined":_type_of(self))=="object"?self:(typeof window==="undefined"?"undefined":_type_of(window))=="object"?window:(typeof global==="undefined"?"undefined":_type_of(global))=="object"?global:{},Qi=Symbol.for("io.opentelemetry.js.api.logs"),vo=XR;function KR(t,e,i){return function(c){return c===t?e:i}}var Ch=1,qR=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return vo[Qi]?this.getLoggerProvider():(vo[Qi]=KR(Ch,e,bh),e)},t.prototype.getLoggerProvider=function(){var e,i;return(i=(e=vo[Qi])===null||e===void 0?void 0:e.call(vo,Ch))!==null&&i!==void 0?i:bh},t.prototype.getLogger=function(e,i,c){return this.getLoggerProvider().getLogger(e,i,c)},t.prototype.disable=function(){delete vo[Qi]},t}(),QR=qR.getInstance();function JR(t,e,i,c){for(var d1=0,l=t.length;d1<l;d1++){var m=t[d1];e&&m.setTracerProvider(e),i&&m.setMeterProvider(i),c&&m.setLoggerProvider&&m.setLoggerProvider(c),m.getConfig().enabled||m.enable()}}function tM(t){t.forEach(function(e){return e.disable()})}function eM(t){var e,i,c=t.tracerProvider||_e.getTracerProvider(),d1=t.meterProvider||vl.getMeterProvider(),l=t.loggerProvider||QR.getLoggerProvider(),m=(i=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&i!==void 0?i:[];return JR(m,c,d1,l),function(){tM(m)}}var Tr=(typeof globalThis==="undefined"?"undefined":_type_of(globalThis))<"u"?globalThis:(typeof window==="undefined"?"undefined":_type_of(window))<"u"?window:(typeof global==="undefined"?"undefined":_type_of(global))<"u"?global:(typeof self==="undefined"?"undefined":_type_of(self))<"u"?self:{};function xl(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var i=function c(){return _instanceof(this,c)?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(c){var d1=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(i,c,d1.get?d1:{enumerable:!0,get:function get(){return t[c]}})}),i}var Rl={},Ml=xl(yw),iE=xl(Tx),aE=xl(gR),sE={},Oa={};Object.defineProperty(Oa,"__esModule",{value:!0});Oa.defaultServiceName=void 0;function nM(){return"unknown_service"}Oa.defaultServiceName=nM;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultServiceName=void 0;var e=Oa;Object.defineProperty(t,"defaultServiceName",{enumerable:!0,get:function get(){return e.defaultServiceName}})})(sE);Object.defineProperty(Rl,"__esModule",{value:!0});var cE=Rl.Resource=void 0,wh=Ml,Vn=iE,Pc=aE,rM=sE,Yc=/*#__PURE__*/function(){"use strict";function _o(e,i){var _this=this;_class_call_check(this,_o);var c;this._attributes=e,this.asyncAttributesPending=i!=null,this._syncAttributes=(c=this._attributes)!==null&&c!==void 0?c:{},this._asyncAttributesPromise=i==null?void 0:i.then(function(d1){return _this._attributes=Object.assign({},_this._attributes,d1),_this.asyncAttributesPending=!1,d1},function(d1){return wh.diag.debug("a resource's async attributes promise rejected: %s",d1),_this.asyncAttributesPending=!1,{}})}_create_class(_o,[{key:"attributes",get:function get(){var e;return this.asyncAttributesPending&&wh.diag.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}}},{key:"waitForAsyncAttributes",value:function waitForAsyncAttributes(){return Tt(this,null,function(){var _tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:_tmp=this.asyncAttributesPending;if(!_tmp)return[3,2];return[4,this._asyncAttributesPromise];case 1:_tmp=_state.sent();_state.label=2;case 2:_tmp;return[2]}})})}},{key:"merge",value:function merge(e){var _this=this;var i;if(!e)return this;var c=Object.assign(Object.assign({},this._syncAttributes),(i=e._syncAttributes)!==null&&i!==void 0?i:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new _o(c);var d1=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(param){var _param=_sliced_to_array(param,2),l=_param[0],m=_param[1];var v;return Object.assign(Object.assign(Object.assign(Object.assign({},_this._syncAttributes),l),(v=e._syncAttributes)!==null&&v!==void 0?v:e.attributes),m)});return new _o(c,d1)}}],[{key:"empty",value:function empty(){return _o.EMPTY}},{key:"default",value:function _default(){var _obj;return new _o((_obj={},_define_property(_obj,Vn.SEMRESATTRS_SERVICE_NAME,(0,rM.defaultServiceName)()),_define_property(_obj,Vn.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE,Pc.SDK_INFO[Vn.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]),_define_property(_obj,Vn.SEMRESATTRS_TELEMETRY_SDK_NAME,Pc.SDK_INFO[Vn.SEMRESATTRS_TELEMETRY_SDK_NAME]),_define_property(_obj,Vn.SEMRESATTRS_TELEMETRY_SDK_VERSION,Pc.SDK_INFO[Vn.SEMRESATTRS_TELEMETRY_SDK_VERSION]),_obj))}}]);return _o}();cE=Rl.Resource=Yc;Yc.EMPTY=new Yc({});var oM=(typeof performance==="undefined"?"undefined":_type_of(performance))<"u";function iM(){var t;return!oM||!performance.now?t=Date.now():performance.timeOrigin?t=performance.timeOrigin+performance.now():performance.timing&&performance.timing.navigationStart?t=performance.timing.navigationStart+performance.now():t=Date.now()+performance.now(),t}function aM(t){return Math.round(t*1e6)}function sM(){return aM(iM())}var Dc;function cM(){return Dc===void 0&&(Dc="keepalive"in new Request("")),Dc}var lM=/*#__PURE__*/function(){"use strict";function lM(t){_class_call_check(this,lM);this.maxRetryInterval=1e3*60*5,this.headers={},this.retryInterval=1e4,this.retryCount=5,this.onBeforeUnload=this.onBeforeUnload.bind(this),this.xhrHandler=this.xhrHandler.bind(this),this.retry=this.retry.bind(this),this.dataType=t.dataType,this.data=this.initData(t),this.url=(t.apiHost||"https://api-hprof.odkl.ru")+t.apiUrl+this.initQueryParams(t),this.dataType==="json"?this.headers["Content-Type"]="application/json;charset=utf-8":this.dataType==="blob"&&(this.headers["Content-Type"]="application/octet-stream"),t.beforeUnload?this.onBeforeUnload():((typeof window==="undefined"?"undefined":_type_of(window))<"u"&&window.addEventListener("beforeunload",this.onBeforeUnload),this.onRequestEnd=t.onRequestEnd,this.xhr=this.doRequest())}_create_class(lM,[{key:"initData",value:function initData(t){if(t.dataType==="form"){var e=new FormData;for(var i in t.data)if(Object.prototype.hasOwnProperty.call(t.data,i)){var c=t.data[i];(typeof c==="undefined"?"undefined":_type_of(c))=="object"&&!_instanceof(c,Blob)&&(c=JSON.stringify(c)),e.append(i,c)}return e}else return t.dataType==="blob"?t.data:JSON.stringify(t.data)}},{key:"initQueryParams",value:function initQueryParams(t){var e=t.queryParams||{},i=[];t.sdkVersion&&(e.sdkVersion=t.sdkVersion);for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&e[c]&&i.push(c+"="+e[c]);return i.length?"?"+i.join("&"):""}},{key:"doRequest",value:function doRequest(){var t=new XMLHttpRequest;t.open("POST",this.url);for(var e in this.headers)Object.prototype.hasOwnProperty.call(this.headers,e)&&t.setRequestHeader(e,this.headers[e]);return t.responseType="json",t.onload=this.xhrHandler,t.onerror=this.xhrHandler,t.onabort=this.xhrHandler,t.ontimeout=this.xhrHandler,t.send(this.data),t}},{key:"retry",value:function retry(){this.retryInterval=Math.min(this.retryInterval*2,this.maxRetryInterval),this.retryCount--,this.xhr=this.doRequest()}},{key:"xhrHandler",value:function xhrHandler(t){var e=this.xhr;if(e){if((t.type==="timeout"||t.type==="error"&&e.readyState===XMLHttpRequest.DONE&&e.status===0)&&this.retryCount>0){setTimeout(this.retry,this.retryInterval);return}(typeof window==="undefined"?"undefined":_type_of(window))<"u"&&window.removeEventListener("beforeunload",this.onBeforeUnload),this.onRequestEnd&&this.onRequestEnd()}}},{key:"onBeforeUnload",value:function onBeforeUnload(){cM()&&(this.xhr&&this.xhr.abort(),fetch(this.url,{headers:this.headers,method:"POST",body:this.data,keepalive:!0}))}}]);return lM}();function uM(t){(typeof window==="undefined"?"undefined":_type_of(window))<"u"&&new lM(t)}var Dt={},lE={},Or={},uE={},dE={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TracesSamplerValues=void 0,function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"}(t.TracesSamplerValues||(t.TracesSamplerValues={}))})(dE);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseEnvironment=t.DEFAULT_ENVIRONMENT=t.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=t.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=t.DEFAULT_ATTRIBUTE_COUNT_LIMIT=t.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var e=Ml,i=dE,c=",",d1=["OTEL_SDK_DISABLED"];function l(j){return d1.indexOf(j)>-1}var m=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function v(j){return m.indexOf(j)>-1}var g=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function S(j){return g.indexOf(j)>-1}t.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0,t.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128,t.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128,t.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128,t.DEFAULT_ENVIRONMENT={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:e.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:t.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:t.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:t.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:t.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:t.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:t.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:t.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:t.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:i.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function b(j,P,k){if(_type_of(k[j])>"u")return;var U=String(k[j]);P[j]=U.toLowerCase()==="true"}function A(j,P,k){var U=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1/0,I=arguments.length>4&&arguments[4]!==void 0?arguments[4]:1/0;if(_type_of(k[j])<"u"){var H=Number(k[j]);isNaN(H)||(H<U?P[j]=U:H>I?P[j]=I:P[j]=H)}}function L(j,P,k){var U=arguments.length>3&&arguments[3]!==void 0?arguments[3]:c;var I=k[j];typeof I=="string"&&(P[j]=I.split(U).map(function(H){return H.trim()}))}var N={ALL:e.DiagLogLevel.ALL,VERBOSE:e.DiagLogLevel.VERBOSE,DEBUG:e.DiagLogLevel.DEBUG,INFO:e.DiagLogLevel.INFO,WARN:e.DiagLogLevel.WARN,ERROR:e.DiagLogLevel.ERROR,NONE:e.DiagLogLevel.NONE};function F(j,P,k){var U=k[j];if(typeof U=="string"){var I=N[U.toUpperCase()];I!=null&&(P[j]=I)}}function z(j){var P={};for(var k in t.DEFAULT_ENVIRONMENT){var U=k;switch(U){case"OTEL_LOG_LEVEL":F(U,P,j);break;default:if(l(U))b(U,P,j);else if(v(U))A(U,P,j);else if(S(U))L(U,P,j);else{var I=j[U];(typeof I==="undefined"?"undefined":_type_of(I))<"u"&&I!==null&&(P[U]=String(I))}}}return P}t.parseEnvironment=z})(uE);var Io={};Object.defineProperty(Io,"__esModule",{value:!0});Io._globalThis=void 0;Io._globalThis=(typeof globalThis==="undefined"?"undefined":_type_of(globalThis))=="object"?globalThis:(typeof self==="undefined"?"undefined":_type_of(self))=="object"?self:(typeof window==="undefined"?"undefined":_type_of(window))=="object"?window:(typeof Tr==="undefined"?"undefined":_type_of(Tr))=="object"?Tr:{};Object.defineProperty(Or,"__esModule",{value:!0});Or.getEnvWithoutDefaults=Or.getEnv=void 0;var Zc=uE,pE=Io;function dM(){var t=(0,Zc.parseEnvironment)(pE._globalThis);return Object.assign({},Zc.DEFAULT_ENVIRONMENT,t)}Or.getEnv=dM;function pM(){return(0,Zc.parseEnvironment)(pE._globalThis)}Or.getEnvWithoutDefaults=pM;var La={},xa={};Object.defineProperty(xa,"__esModule",{value:!0});xa.hexToBinary=void 0;function Ah(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function hM(t){var e=new Uint8Array(t.length/2),i=0;for(var c=0;c<t.length;c+=2){var d1=Ah(t.charCodeAt(c)),l=Ah(t.charCodeAt(c+1));e[i++]=d1<<4|l}return e}xa.hexToBinary=hM;Object.defineProperty(La,"__esModule",{value:!0});La.hexToBase64=void 0;var fM=xa;function mM(t){var _String;return btoa((_String=String).fromCharCode.apply(_String,_to_consumable_array((0,fM.hexToBinary)(t))))}La.hexToBase64=mM;var Ra={};Object.defineProperty(Ra,"__esModule",{value:!0});Ra.RandomIdGenerator=void 0;var vM=8,yM=16,_M=function _M(){"use strict";_class_call_check(this,_M);this.generateTraceId=Oh(yM),this.generateSpanId=Oh(vM)};Ra.RandomIdGenerator=_M;var Ji=Array(32);function Oh(t){return function(){for(var e=0;e<t*2;e++)Ji[e]=Math.floor(Math.random()*16)+48,Ji[e]>=58&&(Ji[e]+=39);return String.fromCharCode.apply(null,Ji.slice(0,t*2))}}var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0});Ma.otperformance=void 0;Ma.otperformance=performance;var Ia={},Na={};Object.defineProperty(Na,"__esModule",{value:!0});Na.VERSION=void 0;Na.VERSION="1.25.1";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.SDK_INFO=void 0;var gM=Na,yo=iE;var _obj;Ia.SDK_INFO=(_obj={},_define_property(_obj,yo.SEMRESATTRS_TELEMETRY_SDK_NAME,"opentelemetry"),_define_property(_obj,yo.SEMRESATTRS_PROCESS_RUNTIME_NAME,"browser"),_define_property(_obj,yo.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE,yo.TELEMETRYSDKLANGUAGEVALUES_WEBJS),_define_property(_obj,yo.SEMRESATTRS_TELEMETRY_SDK_VERSION,gM.VERSION),_obj);var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0});Pa.unrefTimer=void 0;function EM(t){}Pa.unrefTimer=EM;(function(t){var e=Tr&&Tr.__createBinding||(Object.create?function(d1,l,m,v){v===void 0&&(v=m),Object.defineProperty(d1,v,{enumerable:!0,get:function get(){return l[m]}})}:function(d1,l,m,v){v===void 0&&(v=m),d1[v]=l[m]}),i=Tr&&Tr.__exportStar||function(d1,l){for(var m in d1)m!=="default"&&!Object.prototype.hasOwnProperty.call(l,m)&&e(l,d1,m)};Object.defineProperty(t,"__esModule",{value:!0}),t.getEnv=t.getEnvWithoutDefaults=void 0;var c=Or;Object.defineProperty(t,"getEnvWithoutDefaults",{enumerable:!0,get:function get(){return c.getEnvWithoutDefaults}}),Object.defineProperty(t,"getEnv",{enumerable:!0,get:function get(){return c.getEnv}}),i(Io,t),i(La,t),i(Ra,t),i(Ma,t),i(Ia,t),i(Pa,t)})(lE);Object.defineProperty(Dt,"__esModule",{value:!0});Dt.addHrTimes=Dt.isTimeInput=Dt.isTimeInputHrTime=Dt.hrTimeToMicroseconds=Dt.hrTimeToMilliseconds=ya=Dt.hrTimeToNanoseconds=Dt.hrTimeToTimeStamp=Dt.hrTimeDuration=Dt.timeInputToHrTime=Dt.hrTime=Dt.getTimeOrigin=Dt.millisToHrTime=void 0;var Wc=lE,hE=9,TM=6,SM=Math.pow(10,TM),va=Math.pow(10,hE);function wo(t){var e=t/1e3,i=Math.trunc(e),c=Math.round(t%1e3*SM);return[i,c]}Dt.millisToHrTime=wo;function Il(){var t=Wc.otperformance.timeOrigin;if(typeof t!="number"){var e=Wc.otperformance;t=e.timing&&e.timing.fetchStart}return t}Dt.getTimeOrigin=Il;function fE(t){var e=wo(Il()),i=wo(typeof t=="number"?t:Wc.otperformance.now());return mE(e,i)}Dt.hrTime=fE;function bM(t){if(Nl(t))return t;if(typeof t=="number")return t<Il()?fE(t):wo(t);if(_instanceof(t,Date))return wo(t.getTime());throw TypeError("Invalid input type")}Dt.timeInputToHrTime=bM;function CM(t,e){var i=e[0]-t[0],c=e[1]-t[1];return c<0&&(i-=1,c+=va),[i,c]}Dt.hrTimeDuration=CM;function wM(t){var e=hE,i="".concat("0".repeat(e)).concat(t[1],"Z"),c=i.substr(i.length-e-1);return new Date(t[0]*1e3).toISOString().replace("000Z",c)}Dt.hrTimeToTimeStamp=wM;function AM(t){return t[0]*va+t[1]}var ya=Dt.hrTimeToNanoseconds=AM;function OM(t){return t[0]*1e3+t[1]/1e6}Dt.hrTimeToMilliseconds=OM;function LM(t){return t[0]*1e6+t[1]/1e3}Dt.hrTimeToMicroseconds=LM;function Nl(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}Dt.isTimeInputHrTime=Nl;function xM(t){return Nl(t)||typeof t=="number"||_instanceof(t,Date)}Dt.isTimeInput=xM;function mE(t,e){var i=[t[0]+e[0],t[1]+e[1]];return i[1]>=va&&(i[1]-=va,i[0]+=1),i}Dt.addHrTimes=mE;var RM=/*#__PURE__*/function(){"use strict";function RM(t){_class_call_check(this,RM);this.data={resourceSpans:[]},this.scopeSpansByResource=new Map,this.spansByResourceAndInstrumentation=new Map,t&&this.addSpans(t)}_create_class(RM,[{key:"clear",value:function clear(){this.data={resourceSpans:[]},this.scopeSpansByResource.clear(),this.spansByResourceAndInstrumentation.forEach(function(t){t.clear()}),this.spansByResourceAndInstrumentation.clear()}},{key:"getData",value:function getData(){return this.data}},{key:"addSpan",value:function addSpan(t){this.getSpansFromMap(t).push(MM(t))}},{key:"addSpans",value:function addSpans(t){for(var e=0,i=t.length;e<i;e++)this.addSpan(t[e])}},{key:"getSpansFromMap",value:function getSpansFromMap(t){var e=this.spansByResourceAndInstrumentation.get(t.resource);e||(e=new Map,this.spansByResourceAndInstrumentation.set(t.resource,e));var i=e.get(t.instrumentationLibrary);return i||(i=[],e.set(t.instrumentationLibrary,i),this.getScopeSpansFormMap(t).push({scope:Object.assign({},t.instrumentationLibrary),spans:i})),i}},{key:"getScopeSpansFormMap",value:function getScopeSpansFormMap(t){var e=this.scopeSpansByResource.get(t.resource);if(!e){var i=Pl(t.resource.attributes),c={};i&&i.length&&(c.attributes=i),e=[],this.scopeSpansByResource.set(t.resource,e),this.data.resourceSpans.push({resource:c,scopeSpans:e})}return e}}]);return RM}();function Pl(t){if(!t)return;var e=[];for(var i in t){var c=t[i];e.push({key:i,value:vE(c)})}return e}function vE(t){return t==null?{anyValue:t}:typeof t=="string"?{stringValue:t}:typeof t=="number"?{doubleValue:t}:typeof t=="boolean"?{booleanValue:t}:{arrayValue:{values:t.map(vE)}}}function MM(t){return{traceId:t.spanContext().traceId,spanId:t.spanContext().spanId,parentSpanId:t.parentSpanId,name:t.name,startTimeUnixNano:String(ya(t.startTime)),endTimeUnixNano:t.ended?String(ya(t.endTime)):void 0,ended:t.ended,kind:t.kind,events:t.events.map(IM),links:t.links,status:t.status,droppedEventsCount:t.droppedEventsCount,droppedLinksCount:t.droppedLinksCount,attributes:Pl(t.attributes)}}function IM(t){return{timeUnixNano:ya(t.time),name:t.name,attributes:Pl(t.attributes),droppedAttributesCount:t.droppedAttributesCount}}function yE(t){var e=new RM(t),i=e.getData();return e.clear(),i}var NM=/*#__PURE__*/function(){"use strict";function NM(t){_class_call_check(this,NM);this.apiHost=t.apiHost,this.appToken=t.appToken}_create_class(NM,[{key:"export",value:function _export(t,e){uM({apiHost:this.apiHost,apiUrl:"/api/otel/trace",queryParams:{crashToken:this.appToken,clientTimeUnixNano:sM()},dataType:"json",data:yE(t)}),e({code:wr.SUCCESS})}},{key:"shutdown",value:function shutdown(){return this.forceFlush()}},{key:"forceFlush",value:function forceFlush(){return Promise.resolve()}}]);return NM}(),Dl={};Object.defineProperty(Dl,"__esModule",{value:!0});var _E=Dl.BatchSpanProcessorBase=void 0,Er=Ml,Bn=aE,PM=/*#__PURE__*/function(){"use strict";function PM(t,e){_class_call_check(this,PM);this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var i=(0,Bn.getEnv)();this._maxExportBatchSize=typeof(e==null?void 0:e.maxExportBatchSize)=="number"?e.maxExportBatchSize:i.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof(e==null?void 0:e.maxQueueSize)=="number"?e.maxQueueSize:i.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof(e==null?void 0:e.scheduledDelayMillis)=="number"?e.scheduledDelayMillis:i.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof(e==null?void 0:e.exportTimeoutMillis)=="number"?e.exportTimeoutMillis:i.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Bn.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Er.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}_create_class(PM,[{key:"forceFlush",value:function forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}},{key:"onStart",value:function onStart(t,e){}},{key:"onEnd",value:function onEnd(t){this._shutdownOnce.isCalled||t.spanContext().traceFlags&Er.TraceFlags.SAMPLED&&this._addToBuffer(t)}},{key:"shutdown",value:function shutdown(){return this._shutdownOnce.call()}},{key:"_shutdown",value:function _shutdown(){var _this=this;return Promise.resolve().then(function(){return _this.onShutdown()}).then(function(){return _this._flushAll()}).then(function(){return _this._exporter.shutdown()})}},{key:"_addToBuffer",value:function _addToBuffer(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&Er.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(Er.diag.warn("Dropped ".concat(this._droppedSpansCount," spans because maxQueueSize reached")),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()}},{key:"_flushAll",value:function _flushAll(){var _this=this;return new Promise(function(t,e){var i=[],c=Math.ceil(_this._finishedSpans.length/_this._maxExportBatchSize);for(var d1=0,l=c;d1<l;d1++)i.push(_this._flushOneBatch());Promise.all(i).then(function(){t()}).catch(e)})}},{key:"_flushOneBatch",value:function _flushOneBatch(){var _this=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(t,e){var i=setTimeout(function(){e(new Error("Timeout"))},_this._exportTimeoutMillis);Er.context.with((0,Bn.suppressTracing)(Er.context.active()),function(){var c;_this._finishedSpans.length<=_this._maxExportBatchSize?(c=_this._finishedSpans,_this._finishedSpans=[]):c=_this._finishedSpans.splice(0,_this._maxExportBatchSize);var d1=function(){return _this._exporter.export(c,function(m){var v;clearTimeout(i),m.code===Bn.ExportResultCode.SUCCESS?t():e((v=m.error)!==null&&v!==void 0?v:new Error("BatchSpanProcessor: span export failed"))})},l=null;for(var m=0,v=c.length;m<v;m++){var g=c[m];g.resource.asyncAttributesPending&&g.resource.waitForAsyncAttributes&&(l!=null||(l=[]),l.push(g.resource.waitForAsyncAttributes()))}l===null?d1():Promise.all(l).then(d1,function(m){(0,Bn.globalErrorHandler)(m),e(m)})})})}},{key:"_maybeStartTimer",value:function _maybeStartTimer(){var _this=this;if(this._isExporting)return;var t=function(){_this._isExporting=!0,_this._flushOneBatch().finally(function(){_this._isExporting=!1,_this._finishedSpans.length>0&&(_this._clearTimer(),_this._maybeStartTimer())}).catch(function(e){_this._isExporting=!1,(0,Bn.globalErrorHandler)(e)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return t();this._timer===void 0&&(this._timer=setTimeout(function(){return t()},this._scheduledDelayMillis),(0,Bn.unrefTimer)(this._timer))}},{key:"_clearTimer",value:function _clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}}]);return PM}();_E=Dl.BatchSpanProcessorBase=PM;var DM=/*#__PURE__*/function(_E){"use strict";_inherits(DM,_E);function DM(){_class_call_check(this,DM);return _call_super(this,DM,arguments)}_create_class(DM,[{key:"onShutdown",value:function onShutdown(){}}]);return DM}(_E),kM=/*#__PURE__*/function(){"use strict";function kM(t){_class_call_check(this,kM);this.serviceName=t.serviceName||"tracer-js-sdk";var e=new ZR({resource:new cE(_define_property({},wl,this.serviceName)),spanLimits:t.spanLimits});e.addSpanProcessor(new DM(new NM(t),{scheduledDelayMillis:5e3,exportTimeoutMillis:3e4,maxQueueSize:2048,maxExportBatchSize:512})),e.register({}),eM({instrumentations:t.instrumentations}),this.provider=e}_create_class(kM,[{key:"getProvider",value:function getProvider(){return this.provider}},{key:"getTracer",value:function getTracer(){return this.provider.getTracer(this.serviceName)}},{key:"destroy",value:function destroy(){this.provider.forceFlush(),this.provider.shutdown()}}]);return kM}();function VM(){if((typeof window==="undefined"?"undefined":_type_of(window))>"u")return{data:{},modules:{},version:"1.1.4"};var t="TracerSDK";return window[t]||(window[t]={data:{},modules:{},version:"1.1.4"}),window[t]}function BM(t){var e=VM().data;return e[t]||(e[t]={}),e[t]}function UM(t,e,i){var c=BM(t);return c[e]||(c[e]=i()),c[e]}function jM(t){return UM(t.appToken,8,function(){return new kM(t)})}var Lh=/*#__PURE__*/function(){"use strict";function Lh(){_class_call_check(this,Lh);this.spans=[]}_create_class(Lh,[{key:"getJsonData",value:function getJsonData(){return yE(this.spans)}},{key:"clear",value:function clear(){this.spans=[]}},{key:"export",value:function _export(t,e){this.spans=this.spans.concat(t),e({code:wr.SUCCESS})}},{key:"shutdown",value:function shutdown(){return this.forceFlush()}},{key:"forceFlush",value:function forceFlush(){return Promise.resolve()}}]);return Lh}(),FM=/*#__PURE__*/function(){"use strict";function FM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_class_call_check(this,FM);this.disabled=!1,this.endedSpansExporter=t.endedSpansExporter,this.startedSpansExporter=t.startedSpansExporter}_create_class(FM,[{key:"onStart",value:function onStart(t,e){this.disabled||!this.startedSpansExporter||this.startedSpansExporter.export([t],this.onExport)}},{key:"onEnd",value:function onEnd(t){this.disabled||!this.endedSpansExporter||this.endedSpansExporter.export([t],this.onExport)}},{key:"onExport",value:function onExport(t){}},{key:"forceFlush",value:function forceFlush(){return Promise.resolve()}},{key:"shutdown",value:function shutdown(){return this.disabled=!0,Promise.resolve()}}]);return FM}(),HM=/*#__PURE__*/function(){"use strict";function gE(param){var e=param.name;_class_call_check(this,gE)}_create_class(gE,[{key:"log",value:function log(e,i){}},{key:"error",value:function error(e,i){}},{key:"critical",value:function critical(e,i){}},{key:"createComponentTracer",value:function createComponentTracer(e){return new gE({name:e})}},{key:"end",value:function end(){}},{key:"getFinishedSpans",value:function getFinishedSpans(){}},{key:"getTraceId",value:function getTraceId(){return this.fakeTraceId}}]);return gE}(),EE=/*#__PURE__*/function(){"use strict";function $c(param){var e=param.name,i=param.parentContext,c=param.tracer;_class_call_check(this,$c);this.childTracers=[];var d1=!c;if(d1){var l=jM({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),m=new Lh,v=new Lh;this.spanExporter=m,l.addSpanProcessor(new FM({startedSpansExporter:m,endedSpansExporter:v})),this.tracer=l.getTracer("sdk-videoplayer-tracer")}else this.tracer=c;this.span=this.tracer.startSpan(e,{root:d1},i),this.context=Cc.setSpan(Sc.active(),this.span)}_create_class($c,[{key:"log",value:function log(e,i){this.span.addEvent(e,it(K({},i),{type:"log"}))}},{key:"error",value:function error(e,i){this.span.addEvent(e,it(K({},i),{type:"error"}))}},{key:"critical",value:function critical(e,i){this.span.addEvent(e,it(K({},i),{type:"critical"}))}},{key:"createComponentTracer",value:function createComponentTracer(e){var i=new $c({name:e,parentContext:this.context,tracer:this.tracer});return this.childTracers.push(i),i}},{key:"end",value:function end(){this.childTracers.forEach(function(e){return e.end()}),this.span.end()}},{key:"getFinishedSpans",value:function getFinishedSpans(){var e;return(e=this.spanExporter)==null?void 0:e.getJsonData()}},{key:"getTraceId",value:function getTraceId(){return this.span.spanContext().traceId}}],[{key:"createRootTracer",value:function createRootTracer(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return e?new $c({name:"Root"}):new HM({name:"Root"})}}]);return $c}();var Rh,hP=typeof((Rh=window.performance)==null?void 0:Rh.now)=="function"?function(){return window.performance.now()}:function(){return Date.now()};var zM=function(){var t,e;return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test((t=navigator.appVersion)!=null?t:navigator.userAgent)||((e=navigator==null?void 0:navigator.userAgentData)==null?void 0:e.mobile)},GM=/*#__PURE__*/function(){"use strict";function GM(){_class_call_check(this,GM);this.detect()}_create_class(GM,[{key:"browser",get:function get(){return this._currentBrowser}},{key:"device",get:function get(){return this._currentDevice}},{key:"isTouch",get:function get(){return this._maxTouchPoints>0}},{key:"isIOS",get:function get(){return["iPhone","iPad","iPod"].includes(this.device)}},{key:"isMac",get:function get(){return this.device==="Mac"}},{key:"isApple",get:function get(){return this.isIOS||this.isMac}},{key:"isIphoneOrOldIpad",get:function get(){if(!this.isApple||!this.isTouch)return!1;var t=this.device==="iPad"||(window==null?void 0:window.screen.width)>700,e=this._iosVersion;return!t||t&&!!e&&e<16}},{key:"isAndroid",get:function get(){return this.device==="Android"}},{key:"isMobile",get:function get(){return this._isMobile}},{key:"iOSVersion",get:function get(){return this._iosVersion}},{key:"macVersion",get:function get(){return this._macVersion}},{key:"isYandex",get:function get(){return this.browser==="Yandex"}},{key:"isSafari",get:function get(){return this.browser==="Safari"}},{key:"isSamsungBrowser",get:function get(){return this.browser==="SamsungBrowser"}},{key:"isHDR",get:function get(){return this._isHdr}},{key:"detect",value:function detect(){var i;var t=navigator.userAgent,e=navigator.maxTouchPoints;try{this._maxTouchPoints=e,this._isHdr=!!((i=matchMedia("(dynamic-range: high)"))!=null&&i.matches)}catch(c){console.error(c)}try{this._isMobile=zM()}catch(c){console.error(c)}this.detectBrowser(t),this.detectDevice(t),this.isIOS&&this.detectIOSVersion(),this.isMac&&this.detectMacVersion()}},{key:"detectBrowser",value:function detectBrowser(t){try{var _$e=/yabrowser/i.test(t)?"Yandex":void 0,i=/samsungbrowser/i.test(t)?"SamsungBrowser":void 0,c=/chrome|crios/i.test(t)?"Chrome":void 0,d1=/chromium/i.test(t)?"Chromium":void 0,l=/firefox|fxios/i.test(t)?"Firefox":void 0,m=/webkit|safari|khtml/i.test(t)?"Safari":void 0,v=/opr\//i.test(t)?"Opera":void 0,g=/edg/i.test(t)?"Edge":void 0;this._currentBrowser=_$e||i||l||v||g||c||d1||m||"Rest"}catch(e){console.error(e)}}},{key:"detectDevice",value:function detectDevice(t){try{var _$e=/android/i.test(t)?"Android":void 0,i=/iphone/i.test(t)?"iPhone":void 0,c=/ipad/i.test(t)?"iPad":void 0,d1=/ipod/i.test(t)?"iPod":void 0,l=/mac/i.test(t)?"Mac":void 0,m=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(t)?"RestMobile":void 0;this._currentDevice=_$e||i||c||d1||m||l||"Desktop"}catch(e){console.error(e)}}},{key:"detectIOSVersion",value:function detectIOSVersion(){try{var _window_navigator=window.navigator,_$t=_window_navigator.userAgent,e=_$t.match(/Version\/(\d+(\.\d+)?)/i);if(!e)return;var i=e[1],c=parseFloat(i);if(isNaN(c))return;this._iosVersion=c}catch(t){console.error(t)}}},{key:"detectMacVersion",value:function detectMacVersion(){try{var _window_navigator=window.navigator,_$t=_window_navigator.userAgent,e=_$t.match(/Version\/(\d+)/);if(!e)return;var i=e[1],c=parseInt(i,10);if(isNaN(c))return;this._macVersion=c}catch(t){console.error(t)}}}]);return GM}(),TE=new GM;var YM={};uC(YM,{clear:function(){return qM},get:function(){return WM},has:function(){return XM},isPersistent:function(){return ZM},remove:function(){return KM},set:function(){return $M}});var ne,Un,kc="vk-videoplayer-dummy-key-".concat(Math.random()),Pr=function(){if(Un!==void 0)return Un;try{localStorage.setItem(kc,"test"),localStorage.removeItem(kc),Un=0}catch(t){if(_instanceof(t,DOMException)||_instanceof(t,TypeError))try{sessionStorage.getItem(kc),Un=1}catch(e){if(_instanceof(e,DOMException)||_instanceof(e,TypeError))Un=2;else throw e}else throw t}return Un===2&&(ne=new Map),Un},ZM=function(){return Pr()===0},WM=function(t){var i,c;var e=Pr();switch(e){case 0:return(i=localStorage.getItem(t))!=null?i:void 0;case 1:return(c=sessionStorage.getItem(t))!=null?c:void 0;case 2:return ne==null?void 0:ne.get(t);default:Rr(e)}},$M=function(t,e){var i=Pr();switch(i){case 0:try{localStorage.setItem(t,e)}catch(c){if(_instanceof(c,DOMException))console.error(c);else throw c}break;case 1:try{sessionStorage.setItem(t,e)}catch(c){if(_instanceof(c,DOMException))console.error(c);else throw c}break;case 2:return void(ne==null?void 0:ne.set(t,e));default:Rr(i)}},XM=function(t){var i;var e=Pr();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return(i=ne==null?void 0:ne.has(t))!=null?i:!1;default:return Rr(e),!1}},KM=function(t){var e=Pr();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:return void(ne==null?void 0:ne.delete(t));default:Rr(e)}},qM=function(){var t=Pr();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return ne==null?void 0:ne.clear();default:Rr(t)}};var QM=function(t){return t.INVARIANT="Invariant quality",t.Q_144P="144p",t.Q_240P="240p",t.Q_360P="360p",t.Q_480P="480p",t.Q_720P="720p",t.Q_1080P="1080p",t.Q_1440P="1440p",t.Q_2160P="2160p",t.Q_4320P="4320p",t}(QM||{}),Xc={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}};var JM=function(t,e){return Xc[t].height<Xc[e].height};var fP=Object.keys(Xc).sort(function(t,e){return JM(t,e)?-1:1});var kt=/*#__PURE__*/function(Ne){"use strict";_inherits(kt,Ne);function kt(t){_class_call_check(this,kt);var _this;_this=_call_super(this,kt),_this.value=t;return _this}_create_class(kt,[{key:"next",value:function next(t){_get(_get_prototype_of(kt.prototype),"next",this).call(this,this.value=t)}},{key:"error",value:function error(t){_get(_get_prototype_of(kt.prototype),"error",this).call(this,this.value=t)}},{key:"getValue",value:function getValue(){return this.value}},{key:"_subscribe",value:function _subscribe(t){var e=_get(_get_prototype_of(kt.prototype),"_subscribe",this).call(this,t);return t.next(this.value),e}}]);return kt}(Ne);function SE(t){return new Mr(function(e){var i={},c=Object.keys(t).length,d1=function(l){return function(m){l in i||c--,i[l]=m,c===0&&e.next(i)}};return Object.entries(t).reduce(function(l,param){var _param=_sliced_to_array(param,2),m=_param[0],v=_param[1];return l.add(v.subscribe(d1(m)))},new ge)})}function bE(){return function(t){return new Mr(function(e){var i=!1,c=!1,d1=t.subscribe(function(l){i||(i=!0,e.next(l)),c&&d1.unsubscribe()},function(l){var m;i=!0,(m=e.error)==null||m.call(e,l),c&&d1.unsubscribe()});return c=!0,i&&d1.unsubscribe(),d1})}}var tI=function(t){return t.NETWORK="network",t.VIDEO_PIPELINE="video_pipeline",t.EXTERNAL_API="external_api",t.PARSER="parser",t.DOM="dom",t.WTF="wtf",t.FATAL="fatal",t}(tI||{}),xh=/*#__PURE__*/function(){"use strict";function xh(){_class_call_check(this,xh);Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}_create_class(xh,[{key:"addEventListener",value:function addEventListener(t,e,i){t in this.listeners||(this.listeners[t]=[]),this.listeners[t].push({callback:e,options:i})}},{key:"removeEventListener",value:function removeEventListener(t,e){if(!(t in this.listeners))return;var i=this.listeners[t];for(var c=0,d1=i.length;c<d1;c++)if(i[c].callback===e){i.splice(c,1);return}}},{key:"dispatchEvent",value:function dispatchEvent(t){if(!(t.type in this.listeners))return;var e=this.listeners[t.type].slice();for(var i=0,c=e.length;i<c;i++){var d1=e[i];try{d1.callback.call(this,t)}catch(l){Promise.resolve().then(function(){throw l})}d1.options&&d1.options.once&&this.removeEventListener(t.type,d1.callback)}return!t.defaultPrevented}}]);return xh}(),kl=/*#__PURE__*/function(xh1){"use strict";_inherits(kl,xh1);function kl(){_class_call_check(this,kl);var _this;_this=_call_super(this,kl),_this.listeners||xh.call(_this),Object.defineProperty(_this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(_this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(_this,"reason",{value:void 0,writable:!0,configurable:!0});return _this}_create_class(kl,[{key:"toString",value:function toString(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function dispatchEvent(t){t.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,t)),_get(_get_prototype_of(kl.prototype),"dispatchEvent",this).call(this,t)}}]);return kl}(xh),CE=/*#__PURE__*/function(){"use strict";function CE(){_class_call_check(this,CE);Object.defineProperty(this,"signal",{value:new kl,writable:!0,configurable:!0})}_create_class(CE,[{key:"abort",value:function abort(t){var e;try{e=new Event("abort")}catch(c){(typeof document==="undefined"?"undefined":_type_of(document))<"u"?document.createEvent?(e=document.createEvent("Event"),e.initEvent("abort",!1,!1)):(e=document.createEventObject(),e.type="abort"):e={type:"abort",bubbles:!1,cancelable:!1}}var i=t;if(i===void 0)if((typeof document==="undefined"?"undefined":_type_of(document))>"u")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch(c){i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(e)}},{key:"toString",value:function toString(){return"[object AbortController]"}}]);return CE}();(typeof Symbol==="undefined"?"undefined":_type_of(Symbol))<"u"&&Symbol.toStringTag&&(CE.prototype[Symbol.toStringTag]="AbortController",kl.prototype[Symbol.toStringTag]="AbortSignal");function wE(t){return t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof t.Request=="function"&&!t.Request.prototype.hasOwnProperty("signal")||!t.AbortController}function eI(t){typeof t=="function"&&(t={fetch:t});var e=t.fetch,tmp=t.Request,i=tmp===void 0?e.Request:tmp,c=t.AbortController,tmp1=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,d1=tmp1===void 0?!1:tmp1;if(!wE({fetch:e,Request:i,AbortController:c,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:d1}))return{fetch:e,Request:l};var l=i;(l&&!l.prototype.hasOwnProperty("signal")||d1)&&(l=function l(v,g){var S;g&&g.signal&&(S=g.signal,delete g.signal);var b=new i(v,g);return S&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:S}),b},l.prototype=i.prototype);var m=e;return{fetch:function(v,g){var S=l&&l.prototype.isPrototypeOf(v)?v.signal:g?g.signal:void 0;if(S){var b;try{b=new DOMException("Aborted","AbortError")}catch(L){b=new Error("Aborted"),b.name="AbortError"}if(S.aborted)return Promise.reject(b);var A=new Promise(function(L,N){S.addEventListener("abort",function(){return N(b)},{once:!0})});return g&&g.signal&&delete g.signal,Promise.race([A,m(v,g)])}return m(v,g)},Request:l}}var No=wE({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),AE=No?eI({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,nI=No?AE.fetch:window.fetch,mP=No?AE.Request:window.Request,vP=No?CE:window.AbortController,yP=No?kl:window.AbortSignal,rI=pC(t5(),1),oI=function(t){return t.Armenian="58",t.Azerbaijani="57",t.Belarusian="114",t.English="3",t.Kazakh="97",t.Portuguese="73",t.Russian="0",t.Spanish="4",t.Ukrainian="1",t.Uzbek="65",t.Vietnamese="75",t}(oI||{}),iI="vk.com",OE=function(t,e,i){return Tt(void 0,null,function(){var c,d1;return _ts_generator(this,function(_state){switch(_state.label){case 0:c=new URL("https://".concat(iI,"/js/lang-pack.js"));c.searchParams.set("format","json"),c.searchParams.set("name",e),t!==void 0&&c.searchParams.set("lang",t);return[4,nI(c.toString())];case 1:return[4,_state.sent().json()];case 2:d1=_state.sent();return[2,aI(d1,i)]}})})},aI=function(t,e){return(0,rI.default)(Object.entries(t.keys).map(function(param){var _param=_sliced_to_array(param,2),i=_param[0],c=_param[1];return[i.substring("".concat(e,"_").length),sI(c)]}))},sI=function(t){return Array.isArray(t)?t[0]:t},Vl=function(t){return t.RU="ru",t.EN="en",t}(Vl||{});var Br=require1("@vkontakte/videoplayer-statistics");function Po(t,e){var i;return function(){for(var _len=arguments.length,c=new Array(_len),_key=0;_key<_len;_key++){c[_key]=arguments[_key]}clearTimeout(i),i=setTimeout(function(){return t.apply(void 0,_to_consumable_array(c))},e)}}var Wn=function(t,e){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")},Do=function(t){return Wn(t,"Object")},Da=function(t){return Wn(t,"String")},ka=function(t){return Wn(t,"Array")},Va=function(t){return Wn(t,"Number")},LE=function(t){return Wn(t,"Function")};var Bl=function(t){return Va(t)&&!isNaN(t)};var $n=function(t){return Do(t)&&Object.keys(t).length===0},Ul=function(t){return ka(t)&&!t.length};var ko=function(t,e){return Da(t)&&(e?t.trim():t).length};var xE="video_interactive",RE="videoint";var PE=250,Vo=/*#__PURE__*/function(){"use strict";function Vo(e){var _this=this;var _this1=this;_class_call_check(this,Vo);this.handleZoomChange=Po(function(e){_this.lastZoomInfo=e},PE);this.onResize=function(e){var c;if(!_this.isReady||_this.isHidden||!e[0].contentRect.width||!e[0].contentRect.height)return;var i=_this.getNextPoint();i&&((c=_this.ngEditor)==null||c.zoomTo(i)),_this.ngEditorSize={width:e[0].contentRect.width,height:e[0].contentRect.height}};this.handleChapterChange=function(e){var i,c,d1;if(_this.manifest){if(_this.isHidden||_this.hide(),!(e!=null&&e.id)){(i=_this.onError)==null||i.call(_this,"Id is not found"),console.error("Id is not found");return}_this.visitedChapterIds.add(e.id),(c=_this.ngEditor)==null||c.selectChapter(e.id),(d1=_this.ngEditor)==null||d1.setVisitedChapters(Array.from(_this.visitedChapterIds)),_this.currentChapterId=e.id,_this.lastZoomInfo=null}};this.handleManifestChange=function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];var c;if(_this1.isReady=!1,!Va(e.graph.edit.chapters[0].x)){(c=_this1.onError)==null||c.call(_this1,"Can't show graph"),console.error("Can't show graph");return}_this1.lastZoomInfo=null,_this1.manifest=e,_this1.visitedChapterIds=new Set(i),_this1.ngEditor&&(_this1.manifest.metadata.id!==_this1.currentManifestId?(_this1.ngEditor.update(e),_this1.currentManifestId=_this1.manifest.metadata.id):_this1.ngEditor.setVisitedChapters(Array.from(i)),_this1.isReady=!0)};this.init(e)}_create_class(Vo,[{key:"init",value:function init(param){var e=param.root,i=param.onOpenPreviewClick,c=param.onError,d1=param.lang,tmp=param.visitedChapters,l=tmp===void 0?[]:tmp;this.isReady=!1,this.isHidden=!0,this.manifest=null,this.visitedChapterIds=new Set(l),this.onOpenPreviewClick=i,this.onError=c,this.lang=d1!=null?d1:"ru",this.zoom=.7,this.lastZoomInfo=null,this.currentManifestId=null,this.currentChapterId=null,this.ngEditor=null,this.ngEditorSize=null,this.graphWrapperElement=BI(e),this.resizeObserver=new ResizeObserver(Po(this.onResize,PE)),this.resizeObserver.observe(this.graphWrapperElement)}},{key:"getNextPoint",value:function getNextPoint(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.ngEditorSize;return!this.lastZoomInfo||!e?null:[(this.lastZoomInfo.x-e.width/2)/this.lastZoomInfo.value*-1,(this.lastZoomInfo.y-e.height/2)/this.lastZoomInfo.value*-1]}},{key:"setVisitedChapters",value:function setVisitedChapters(e){var i;this.visitedChapterIds=new Set(_to_consumable_array(this.visitedChapterIds).concat(_to_consumable_array(e))),(i=this.ngEditor)==null||i.setVisitedChapters(Array.from(this.visitedChapterIds))}},{key:"updateVideosInfo",value:function updateVideosInfo(e){var i;(i=this.ngEditor)==null||i.updateVideosInfo(e)}},{key:"show",value:function show(){return Tt(this,null,function(){var e,_tmp,_tmp1;return _ts_generator(this,function(_state){switch(_state.label){case 0:_tmp=this.manifest;if(!_tmp)return[3,3];_tmp1=this.ngEditor;if(_tmp1)return[3,2];return[4,this.initNgEditor()];case 1:_tmp1=_state.sent();_state.label=2;case 2:_tmp=(_tmp1,this.graphWrapperElement.style.display="block",!this.lastZoomInfo&&this.currentChapterId&&((e=this.ngEditor)==null||e.focusChapter(this.currentChapterId)),this.isHidden=!1);_state.label=3;case 3:_tmp;return[2]}})})}},{key:"initNgEditor",value:function initNgEditor(){return Tt(this,null,function(){var _this,e,c,_ref,i;return _ts_generator(this,function(_state){switch(_state.label){case 0:_this=this;if(!this.manifest)return[2];_state.label=1;case 1:_state.trys.push([1,3,,4]);return[4,OE(this.lang,xE,RE)];case 2:e=_state.sent();return[3,4];case 3:c=_state.sent();console.log("Unable to load graph language pack");return[3,4];case 4:return[4,Promise.resolve().then(function(){return NE(),IE})];case 5:_ref=_state.sent(),i=_ref.GraphEditor;this.ngEditor=new i(this.graphWrapperElement,{mode:"read",lang:this.lang==="ru"?"ru":"en",translation:e}),this.currentManifestId=this.manifest.metadata.id,this.ngEditor.update(this.manifest),this.ngEditor.setVisitedChapters(Array.from(this.visitedChapterIds)),this.ngEditor.on("control",function(l){var m=l,c=m.name,d1=Wt(m,["name"]);var v;c==="openPreview"&&"chapterId"in d1&&((v=_this.onOpenPreviewClick)==null||v.call(_this,d1.chapterId))}),this.ngEditor.on("zoom",this.handleZoomChange),this.isReady=!0;return[2]}})})}},{key:"hide",value:function hide(){this.graphWrapperElement.style.display="none",this.isHidden=!0}},{key:"destroy",value:function destroy(){var e,i;this.hide(),this.manifest=null,this.resizeObserver.disconnect(),(e=this.ngEditor)==null||e.setVisitedChapters([]),this.onOpenPreviewClick=void 0,(i=this.ngEditor)==null||i.dispose(),this.graphWrapperElement.remove(),this.isReady=!1}}]);return Vo}();function BI(t){var e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.height="100%",e.style.width="100%",e.style.display="none",t.append(e),e}var Bo=function Bo(){"use strict";var _this=this;var _this1=this;_class_call_check(this,Bo);this._containers=[];this._player=null;this.setPlayer=function(e){_this._player=e};this.setContainers=function(e){_this._containers=e};this.deleteContainer=function(e){_this._containers=_this._containers.filter(function(i){return i.id!==e})};this.getNextInteractiveTime=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;if(!_this1._containers.length||_this1._player===null)return null;var i=-1,c=!1,d1=Math.round(_this1._player.info.position$.getValue()*1e3);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=_this1._containers[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var l=_step.value;var m=l.startTime-e;if(m<=d1&&(l.endTime&&d1<=l.endTime||l.endTime===null)){c=!0;break}d1<m&&(i=i===-1?m:Math.min(i,m))}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return!c&&i!==-1?i:null}};var fn=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";var i=t.split("."),c=e.split("."),d1=0;for(var l=0;l<Math.max(i.length,c.length)&&!d1;l++)i[l]>c[l]?d1=1:i[l]<c[l]?d1=-1:d1=0;return d1};var Ba,UI=new Uint8Array(16);function jl(){if(!Ba&&(Ba=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ba))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ba(UI)}var Kt=[];for(var t=0;t<256;++t)Kt.push((t+256).toString(16).slice(1));function DE(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Kt[t[e+0]]+Kt[t[e+1]]+Kt[t[e+2]]+Kt[t[e+3]]+"-"+Kt[t[e+4]]+Kt[t[e+5]]+"-"+Kt[t[e+6]]+Kt[t[e+7]]+"-"+Kt[t[e+8]]+Kt[t[e+9]]+"-"+Kt[t[e+10]]+Kt[t[e+11]]+Kt[t[e+12]]+Kt[t[e+13]]+Kt[t[e+14]]+Kt[t[e+15]]}var jI=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Fl={randomUUID:jI};function FI(t,e,i){if(Fl.randomUUID&&!e&&!t)return Fl.randomUUID();t=t||{};var c=t.random||(t.rng||jl)();if(c[6]=c[6]&15|64,c[8]=c[8]&63|128,e){i=i||0;for(var d1=0;d1<16;++d1)e[i+d1]=c[d1];return e}return DE(c)}var Hl=FI;var HI="3.1",kE={default:"setNextBranch",random:"setRandomBranch",weightlessRandom:"setWeightlessRandomBranch",max:"setMaxWeightBranch",min:"setMinWeightBranch"},zI={type:"onSuspense",action:{type:"continuePlayback",args:{shouldOpenNow:!0,isDetachContainer:!0}}},VE=function(t){var e=[];var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t.chapters[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var m=_step.value;var v=void 0,g=[];var _iteratorNormalCompletion1=true,_didIteratorError1=false,_iteratorError1=undefined;try{for(var _iterator1=m.branches[Symbol.iterator](),_step1;!(_iteratorNormalCompletion1=(_step1=_iterator1.next()).done);_iteratorNormalCompletion1=true){var i=_step1.value;var c=i,A=c.isDefault,L=Wt(c,["isDefault"]);A&&(v=L.id),g.push(L)}}catch(err){_didIteratorError1=true;_iteratorError1=err}finally{try{if(!_iteratorNormalCompletion1&&_iterator1.return!=null){_iterator1.return()}}finally{if(_didIteratorError1){throw _iteratorError1}}}var S=[],b=[];var _iteratorNormalCompletion2=true,_didIteratorError2=false,_iteratorError2=undefined;try{for(var _iterator2=m.containers[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var d1=_step2.value;var l=d1,A1=l.fallbackStrategy,L1=Wt(l,["fallbackStrategy"]);var N=!!L1.endTime,F=[zI];switch(A1){case"await":N?F=[]:S=[];break;case"default":{var z={type:"onSuspense",action:{type:kE.default,args:{branchId:v,shouldOpenNow:!N,isDetachContainer:!0}}};N?F=[z]:S=[z];break}case"random":case"weightlessRandom":case"max":case"min":{var z1={type:"onSuspense",action:{type:kE[A1],args:{}}};N?F=[z1]:S=[z1];break}}var _iteratorNormalCompletion3=true,_didIteratorError3=false,_iteratorError3=undefined;try{for(var _iterator3=L1.controls[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var z2=_step3.value;b.push(it(K({},L1),{controls:[K({},z2)],id:Hl(),events:F}))}}catch(err){_didIteratorError3=true;_iteratorError3=err}finally{try{if(!_iteratorNormalCompletion3&&_iterator3.return!=null){_iterator3.return()}}finally{if(_didIteratorError3){throw _iteratorError3}}}}}catch(err){_didIteratorError2=true;_iteratorError2=err}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return!=null){_iterator2.return()}}finally{if(_didIteratorError2){throw _iteratorError2}}}e.push(it(K({},m),{containers:b,events:S,branches:g}))}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return t.metadata.version=HI,t.metadata.updated=new Date().toISOString(),it(K({},t),{chapters:e})};var GI="3.2",BE=function(t){if(!t.media){var e=t.metadata,i=e.media,c=Wt(e,["media"]);return it(K({},t),{metadata:it(K({},c),{version:GI}),media:i})}return t};var YI="3.3",ZI=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return{edit:{chapters:t},view:{}}},UE={type:"onSuspense",action:{type:"expect",args:{shouldOpenNow:!0,isDetachContainer:!0}}},jE=function(t){var d1;var e=[],i=[];var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t.chapters[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var l=_step.value;var c=l,m=c.id,v=c.x,g=c.y,S=Wt(c,["id","x","y"]),b=S.containers.map(function(A){var L;return it(K({},A),{controls:A.controls.map(function(j){var P=j,N=P.subtype,F=P.type,z=Wt(P,["subtype","type"]);return it(K({},z),{type:N!=null?N:F})}),events:(L=A.events)!=null&&L.length?A.events:[UE]})});e.push(it(K({id:m},S),{containers:b,events:(d1=S.events)!=null&&d1.length?S.events:[UE]})),i.push({id:m,x:v,y:g})}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return it(K({},t),{chapters:e,graph:ZI(i),metadata:it(K({},t.metadata),{version:YI})})};var WI=[{version:"3.0",migrate:VE},{version:"3.1",migrate:BE},{version:"3.2",migrate:jE}],zl=function(t){return WI.reduce(function(e,i){return fn(e.metadata.version,i.version)?e:i.migrate(e)},t)};var FE={Button:"Button",Area:"Area",Text:"Text"};var Mt={openURI:"openURI",setNextBranch:"setNextBranch",setWeightlessRandomBranch:"setWeightlessRandomBranch",setRandomBranch:"setRandomBranch",setMaxWeightBranch:"setMaxWeightBranch",setMinWeightBranch:"setMinWeightBranch",setDefaultBranch:"setDefaultBranch",continuePlayback:"continuePlayback",expect:"expect"};var HE={metadata:"Object",chapters:"Array"},$I="3.0.0",XI="3.3.0",Uo=function(t){var e=fn(t,$I);return e===-1?!1:e===0?!0:fn(t,XI)!==1},zE=function(t){if(!Do(t))return!1;for(var e in HE)if(!t[e]||!Wn(t[e],HE[e]))return!1;return Uo(t.metadata.version)},Ua=function(t){return t.type===FE.Text};var re=/*#__PURE__*/function(){"use strict";function re(e,i){for(var _len=arguments.length,c=new Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){c[_key-2]=arguments[_key]}_class_call_check(this,re);this.severity=e;this.category=i;this.data=c}_create_class(re,[{key:"toString",value:function toString(){return"Interactive SDK error ".concat(JSON.stringify(this,null," "))}}]);return re}();var ja=/*#__PURE__*/function(){"use strict";function ja(){_class_call_check(this,ja);this.listeners={}}_create_class(ja,[{key:"addListener",value:function addListener(e,i){return this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(i),this}},{key:"on",value:function on(e,i){return this.addListener(e,i)}},{key:"once",value:function once(e,i){var _this=this;this.listeners[e]=this.listeners[e]||[];var c=function(){i(),_this.off(e,c)};return this.listeners[e].push(c),this}},{key:"off",value:function off(e,i){return this.removeListener(e,i)}},{key:"reset",value:function reset(){this.listeners={}}},{key:"removeListener",value:function removeListener(e,i){var c=this.listeners[e]||[];for(var d1=c.length;d1>0;d1--)if(c[d1]===i){c.splice(d1,1);break}return this}},{key:"emit",value:function emit(e){for(var _len=arguments.length,i=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){i[_key-1]=arguments[_key]}var c=this.listeners[e];return c?(c.forEach(function(d1){d1.apply(void 0,_to_consumable_array(i))}),!0):!1}},{key:"listenerCount",value:function listenerCount(e){return this.rawListeners(e).length}},{key:"rawListeners",value:function rawListeners(e){return this.listeners[e]||[]}}]);return ja}();var Fa=/*#__PURE__*/function(){"use strict";function Fa(e){var _this=this;var _this1=this;_class_call_check(this,Fa);this.fns=[];this.addFn=function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;LE(e)&&(_this1.fns.push(e),i&&_this1.updateFn())};this.removeFn=function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;_this1.fns=_this1.fns.filter(function(c){return c!==e}),i&&_this1.updateFn()};this.updateFn=function(){_this.fn=function(){_this.fns.forEach(function(e){return e()}),_this.raf&&_this.forceRequestAnimation()}};this.forceRequestAnimation=function(){_this.fn&&(_this.raf=requestAnimationFrame(_this.fn))};this.requestAnimation=function(){_this.raf||_this.forceRequestAnimation()};this.cancelAnimation=function(){_this.raf&&(cancelAnimationFrame(_this.raf),_this.raf=void 0)};e&&(this.fn=e,this.addFn(e))}_create_class(Fa,[{key:"release",value:function release(){this.cancelAnimation(),this.fn=void 0,this.fns=[]}}]);return Fa}();var Ha=/*#__PURE__*/function(){"use strict";function Ha(e){_class_call_check(this,Ha);var i,c;this.loaders={chapterLoaders:(i=e==null?void 0:e.chapterLoaders)!=null?i:[],manifestLoaders:(c=e==null?void 0:e.manifestLoaders)!=null?c:[]}}_create_class(Ha,[{key:"exec",value:function exec(e,i){return Tt(this,null,function(){return _ts_generator(this,function(_state){return[2,KI.apply(void 0,_to_consumable_array(this.loaders[e]))(i)]})})}}]);return Ha}();function KI(){for(var _len=arguments.length,t=new Array(_len),_key=0;_key<_len;_key++){t[_key]=arguments[_key]}return function(i){return Tt(this,null,function(){var c;return _ts_generator(this,function(_state){switch(_state.label){case 0:c=_to_consumable_array(t);_state.label=1;case 1:if(!(c.length>0))return[3,4];return[4,c.shift()(i)];case 2:i=_state.sent();_state.label=3;case 3:return[3,1];case 4:return[2,i]}})})}}function jo(t,e,i){return t?it(K({},t),_define_property({},e,t[e]?[i].concat(_to_consumable_array(t[e])):[i])):_define_property({},e,[i])}function za(d1){var l=d1,t=l.actions,e=l.errors,i=l.chapterId,c=Wt(l,["actions","errors","chapterId"]);if(i){var m=t.getManifest(),v=t.getChapter(m.chapters,i);if(v){var g=t.getMedia(m.media,v.videoId),S=t.getGraph(m.graph,v.id);return g?it(K({},c),{actions:t,errors:e,result:{chapter:v,media:g,graph:S}}):it(K({},c),{errors:jo(e,za.name,"Could not find media"),actions:t})}}return it(K({},c),{errors:jo(e,za.name,"Could not find chapter"),actions:t})}var qI=function(t){return Tt(void 0,null,function(){var e,i,d1,c,d2,l,_,d3,e1;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,10,,11]);e={};if(!Da(t))return[3,3];i=new URL(t).href;return[4,fetch(i)];case 1:d1=_state.sent();if(!d1.ok)return[2,{}];return[4,d1.json()];case 2:e=_state.sent();return[3,4];case 3:if(Do(t))e=t;else return[2,{}];_state.label=4;case 4:if(!zE(e))return[2,{}];c=e.metadata.media;if(!(Da(c)&&!e.media))return[3,9];_state.label=5;case 5:_state.trys.push([5,8,,9]);i?d2=new URL(c,i).href:(d2=new URL(c).href,i=d2);return[4,fetch(d2)];case 6:l=_state.sent();if(!l.ok)throw new Error;_=e.metadata;return[4,l.json()];case 7:_.media=_state.sent();return[3,9];case 8:d3=_state.sent();return[2,t7(e.metadata.version)?{manifest:e}:{}];case 9:return[2,{manifest:e,manifestURL:i}];case 10:e1=_state.sent();return[2,{}];case 11:return[2]}})})};function GE(t){return Tt(this,null,function(){var _ref,e,i,c;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,qI(t)];case 1:_ref=_state.sent(),e=_ref.manifest,i=_ref.manifestURL,c=zl(e);return[2,(c.media=QI(c.media,i),delete c.metadata.media,c)]}})})}function Ga(t,e){if(e)return t.find(function(i){return i.id===e})}function Gl(t,e){var i,c;return(i=t.edit)!=null&&i.chapters?t.edit.chapters.find(function(d1){return d1.id===e}):(c=t.view)!=null&&c.chapters?t.view.chapters.find(function(d1){return d1.id===e}):void 0}function Yl(t,e){return t.videos.find(function(i){return i.id===e})}function QI(t,e){return it(K({},t),{videos:t.videos.map(function(i){return it(K({},i),{variants:i.variants.map(function(c){var d1="url"in c?c.url:"",l=JI(d1,e);return it(K({},c),{url:l||d1})})})})})}function JI(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;try{return new URL(t,e).href}catch(i){return""}}function t7(t){return fn(t,"3.2.0")>=0}var Ya=function(t){return ka(t)&&!Ul(t)},ze=function(t){return t.order==="end"},Fo=function(t){return ka(t.containers)&&!Ul(t.containers)&&ze(t)},YE=function(t,e){var c;var i=t*1e3;return Ya(e.controls)&&i<((c=e.startTime)!=null?c:0)},Zl=function(t,e){var c,d1;var i=t*1e3;return Ya(e.controls)&&i>=((c=e.startTime)!=null?c:0)&&i<=((d1=e.endTime)!=null?d1:1/0)};var Xn=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.some(function(e){return e.action.type==="expect"})},Wl=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.find(function(e){return e.action.type==="expect"})},e7=function(t){return(t==null?void 0:t.length)===1},Za=function(t){return e7(t)&&Ua(t[0])};function ZE(t){for(var _len=arguments.length,e=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){e[_key-1]=arguments[_key]}return function(i){return _type_of(e[0])=="object"&&(typeof i==="undefined"?"undefined":_type_of(i))=="object"?t(K(K({},e[0]),i)):t.apply(void 0,_to_consumable_array(e).concat(_to_consumable_array(i)))}}var WE=function(t,e){return Xn(t.events)?!1:e.some(function(param){var i=param.container;return i.container.id!==t.id&&Xn(i.container.events)&&i.container.endTime===t.endTime&&!i.isRemoved})};var Kn=/*#__PURE__*/function(Ha){"use strict";_inherits(Kn,Ha);function Kn(i,c){_class_call_check(this,Kn);var _this;_this=_call_super(this,Kn,[i]);_this.manifest=null;_this.chapter=null;_this.media=null;_this.graph=null;_this.prevChapter$=new kt(null);_this.onError=c,_this.release();return _this}_create_class(Kn,[{key:"release",value:function release(){return this.manifest=null,this.chapter=null,this.media=null,this.graph=null,this.prevChapter$.next(null),this}},{key:"setManifest",value:function setManifest(i){return Tt(this,null,function(){var d1,c,_;return _ts_generator(this,function(_state){switch(_state.label){case 0:this.release();return[4,this.exec("manifestLoaders",{actions:{addErrorMessage:jo},result:null,errors:null,source:i})];case 1:c=_state.sent();c.errors&&this.errorHandler(c.errors);_=this;return[4,GE((d1=c.result)!=null?d1:i)];case 2:return[2,(_.manifest=_state.sent(),this)]}})})}},{key:"setInitial",value:function setInitial(){return Tt(this,null,function(){return _ts_generator(this,function(_state){return[2,this.setNext()]})})}},{key:"setNext",value:function setNext(){return Tt(this,arguments,function(){var _this,i,d1;var _arguments=arguments;return _ts_generator(this,function(_state){switch(_state.label){case 0:_this=this;i=_arguments.length>0&&_arguments[0]!==void 0?_arguments[0]:function(c){return(c=_this.manifest)==null?void 0:c.metadata.initChapterId}();if(!i)return[2,this];this.prevChapter$.next(this.chapter);return[4,this.exec("chapterLoaders",za({actions:{getManifest:function(){return _this.manifest},getCurrent:this.getCurrent,getGraph:Gl,getChapter:Ga,getMedia:Yl,getByBranches:this.getByBranches.bind(this),addErrorMessage:jo},result:null,errors:null,chapterId:i}))];case 1:d1=_state.sent();return[2,(d1.errors&&this.errorHandler(d1.errors),this.chapter=d1.result.chapter,this.media=d1.result.media,this.graph=d1.result.graph,this)]}})})}},{key:"errorHandler",value:function errorHandler(i){this.onError(i),console.error("Something went wrong with loaders",{errors:i})}},{key:"getInitial",value:function getInitial(){var c;return this.getByChapterId((c=this.manifest)==null?void 0:c.metadata.initChapterId)||null}},{key:"getByChapterId",value:function getByChapterId(){var _this=this;var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(c){return(c=_this.manifest)==null?void 0:c.metadata.initChapterId}();if(!i||!this.manifest)return null;var d1=Ga(this.manifest.chapters,i);if(d1){var l=Yl(this.manifest.media,d1.videoId),m=Gl(this.manifest.graph,d1.id);if(l)return{chapter:d1,media:l,graph:m}}return null}},{key:"getBranches",value:function getBranches(){var _this=this;var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(c){return(c=_this.chapter)==null?void 0:c.id}();var d1,l,m;if(i===((d1=this.chapter)==null?void 0:d1.id))return this.getByBranches((l=this.chapter)==null?void 0:l.branches);{var v=Ga(((m=this.manifest)==null?void 0:m.chapters)||[],i);return this.getByBranches(v==null?void 0:v.branches)}}},{key:"getByBranches",value:function getByBranches(){var _this=this;var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return i.reduce(function(c,d1){var l=_this.getByChapterId(d1.chapterId);return l&&c.push(l),c},[])}},{key:"getCurrent",value:function getCurrent(){return{chapter:this.chapter,media:this.media,graph:this.graph}}},{key:"isInitialChapter",value:function isInitialChapter(){var i,c;return((i=this.chapter)==null?void 0:i.id)===((c=this.manifest)==null?void 0:c.metadata.initChapterId)}},{key:"isEndChapter",value:function isEndChapter(){return this.chapter?ze(this.chapter):!1}}]);return Kn}(Ha);var XE=require1("@vkontakte/videoplayer-core");var $E=function(t){var e=t.variants.find(function(i){var c;return((c=i.payload)==null?void 0:c.type)==="vk"});if(e&&"payload"in e){var _e_payload_id_split=_sliced_to_array(e.payload.id.split("_"),2),i=_e_payload_id_split[0],c=_e_payload_id_split[1];return[i,c]}return[]};function $l(){var t=new Map;function e(g){var S=g,tmp=S.listId,l=tmp===void 0?Math.random().toString():tmp,tmp1=S.itemId,m=tmp1===void 0?Math.random().toString():tmp1,v=Wt(S,["listId","itemId"]);var b=t.get(l),A=K({},v);return b?b[m]=A:t.set(l,_define_property({},m,A)),K({listId:l,itemId:m},v)}function i(l){var m,v;l.player.destroy(),l.container.remove(),l.subscription.unsubscribe(),(m=l.statistics)==null||m.oneStat.destroy(),(v=l.statistics)==null||v.statSubscription.unsubscribe()}function c(l,m){var v=t.get(l);if(!v)throw Error("Can't remove. Not find.");if(m){var g=v[m];g&&i(g),delete v[m],Object.keys(v).length||t.delete(l)}else{var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=Object.values(v)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var g1=_step.value;i(g1)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}t.delete(l)}}function d1(){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var l=_step.value;c(l[0])}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}return{createPlayer:e,removePlayer:c,map:t,removeAll:d1}}function Xl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];var l,m,v;var i={},c,d1=!e.length;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t.variants[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var g=_step.value;if(!c&&"cover"in g&&(c=g.cover),"url"in g)switch(g.type.toLowerCase()){case"mp4":(d1||e.includes("mp4"))&&(i.MPEG=it(K({},i.MPEG),_define_property({},(l=g.standard)!=null?l:"Invariant quality",g.url)));break;case"mpeg":(d1||e.includes("mpeg"))&&(i.MPEG=it(K({},i.MPEG),_define_property({},(m=g.standard)!=null?m:"Invariant quality",g.url)));break;case"hls":(d1||e.includes("hls"))&&(i=it(K({},i),{HLS:{type:"url",url:g.url}}));break;case"dash":(d1||e.includes("dash"))&&(i=it(K({},i),{DASH_SEP:{compatibilityMode:!0,type:"url",url:g.url}}));break;default:break}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return{sources:i,thumbUrl:c,title:(v=t.title)!=null?v:""}}var Ho=function(t,e){var i=t.info.currentQuality$.getValue(),c=t.info.availableQualities$.getValue();i!==e&&c.includes(e)&&(t.setQuality(e),t.setAutoQuality(!1))};var n7=2;function Kl(t){var e=$l(),i=new ge,c={},d1=null,l=!1,m,v=new kt(null);t&&g(t);function g(j){d1=j}function S(j,P,k){var H;if(!d1)throw Error("need to set interactive controller");if(!d1.options)return;var I=((H=e.map.get(j))!=null?H:{})[P];if(I){c=K({chapterId:k,listId:j,itemId:P},I);var Q=c.player;c.subscription.add(Q.info.currentQuality$.subscribe(function(st){var mt=Q.info.position$.getValue(),rt=Q.info.isAutoQualityEnabled$.getValue();var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(!(!st||!mt||rt))try{for(var _iterator=e.map[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var at=_step.value;Object.values(at[1]).forEach(function(param){var pt=param.player;Ho(pt,st)})}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}})).add(Q.events.started$.subscribe(function(){b(P)})),I.container.remove(),d1.setPlayer(I.player),l||(d1.init(),l=!0),v.next({player:c.player,config:c.config,statistics:c.statistics});return}throw Error("Can't set. Not find.")}function b(j){return Tt(this,null,function(){var P,k,_iteratorNormalCompletion,_didIteratorError,_iteratorError,_iterator,_step,U,_tmp,err;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!d1)throw Error("need to set interactive controller");if($n(c)||j!==c.itemId)return[2];P=d1.getChapterBranches(),k=new Set;_iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;_state.label=1;case 1:_state.trys.push([1,7,8,9]);_iterator=P[Symbol.iterator]();_state.label=2;case 2:if(!!(_iteratorNormalCompletion=(_step=_iterator.next()).done))return[3,6];U=_step.value;_tmp=k.has(U.media.id);if(_tmp)return[3,4];return[4,L({media:U.media,chapterId:U.chapter.id,setAsActive:!1,title:U.chapter.label})];case 3:_tmp=(_state.sent(),k.add(U.media.id));_state.label=4;case 4:_tmp;_state.label=5;case 5:_iteratorNormalCompletion=true;return[3,2];case 6:return[3,9];case 7:err=_state.sent();_didIteratorError=true;_iteratorError=err;return[3,9];case 8:try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}return[7];case 9:return[2]}})})}function A(k){return Tt(this,arguments,function(param){var _param_chapter,j,P,U,I,H,Q,st,mt,rt,_iteratorNormalCompletion,_didIteratorError,_iteratorError,_iterator,_step,at,pt,_iteratorNormalCompletion1,_didIteratorError1,_iteratorError1,_iterator1,_step1,vt,_tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:_param_chapter=param.chapter,j=_param_chapter.id,P=param.manifestVideo;if($n(c)||!d1)return[2];U=c.player.info.muted$.getValue(),I=c.player.info.currentQuality$.getValue(),H=c.player.info.isAutoQualityEnabled$.getValue(),Q=c.player.info.volume$.getValue(),st=c.player.info.currentPlaybackRate$.getValue(),mt=!H,rt=!1;_iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(_iterator=e.map[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){at=_step.value;if(at[0]===P.id&&!d1.state.isReplay$.getValue()){pt=Object.keys(at[1]);_iteratorNormalCompletion1=true,_didIteratorError1=false,_iteratorError1=undefined;try{for(_iterator1=pt[Symbol.iterator]();!(_iteratorNormalCompletion1=(_step1=_iterator1.next()).done);_iteratorNormalCompletion1=true){vt=_step1.value;vt===c.itemId?(pt.length<n7||(rt=!0),e.removePlayer(at[0],vt)):(rt=!0,S(at[0],vt,j),mt?Ho(c.player,I):c.player.setAutoQuality(!0),c.player.setVolume(Q),c.player.setMuted(U),c.player.setPlaybackRate(st))}}catch(err){_didIteratorError1=true;_iteratorError1=err}finally{try{if(!_iteratorNormalCompletion1&&_iterator1.return!=null){_iterator1.return()}}finally{if(_didIteratorError1){throw _iteratorError1}}}}else e.removePlayer(at[0])}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}_tmp=rt;if(_tmp)return[3,2];return[4,L({media:P,chapterId:j,setAsActive:!0,playbackRate:st})];case 1:_tmp=(_state.sent(),mt?Ho(c.player,I):c.player.setAutoQuality(!0),c.player.setVolume(Q),c.player.setMuted(U));_state.label=2;case 2:_tmp;return[2]}})})}function L(mt){return Tt(this,arguments,function(param){var j,P,tmp,k,tmp1,U,tmp2,I,H,Q,st,oe,qt,De,Qt,Jt,rt,at,pt,_d_options,le,_tmp,vt,Ct,Ft,Bt,Nt,le1,Gt,Yt,wt,Ee,Vt;return _ts_generator(this,function(_state){switch(_state.label){case 0:j=param.media,P=param.chapterId,tmp=param.prefetch,k=tmp===void 0?!0:tmp,tmp1=param.setAsActive,U=tmp1===void 0?!0:tmp1,tmp2=param.autoplay,I=tmp2===void 0?!1:tmp2,H=param.preferredExt,Q=param.title,st=param.playbackRate;rt=Math.random().toString(),at=document.createElement("div");m.append(at);if(!((oe=d1==null?void 0:d1.options)!=null&&oe.vkVideoLoader))return[3,3];le=$E(j);_tmp=le.length;if(!_tmp)return[3,2];return[4,(_d_options=d1.options).vkVideoLoader.apply(_d_options,_to_consumable_array(le))];case 1:_tmp=pt=_state.sent();_state.label=2;case 2:_tmp;_state.label=3;case 3:vt=((qt=d1==null?void 0:d1.options)==null?void 0:qt.coreConfig)||void 0,Ct=it(K({},vt),{configName:_to_consumable_array((De=vt==null?void 0:vt.configName)!=null?De:[]).concat(["interactive"])}),Ft=it(K({container:at},((Qt=pt==null?void 0:pt.videos)==null?void 0:Qt[0])||{sources:Xl(j,H).sources}),{title:Q,failoverHosts:(pt==null?void 0:pt.failoverHosts)||[]}),Bt=new XE.Player(Ct,EE.createRootTracer());Bt.initVideo(Ft);Nt=null;if(pt!=null&&pt.videos&&d1!=null&&d1.options.createOneStat){le1=pt.videos[0],Gt=d1.options.createOneStat(le1),Yt=new ge;Gt&&(Yt.add(Gt.attachTo(Bt)),Nt={oneStat:Gt,statSubscription:Yt})}wt=new ge,Ee=(Jt=c==null?void 0:c.player)==null?void 0:Jt.info.isAutoQualityEnabled$.getValue();wt.add(Bt.events.canplay$.subscribe(function(){Ee||Ho(Bt,c.player.info.currentQuality$.getValue()),st&&Bt.setPlaybackRate(st)}));Vt=e.createPlayer({listId:j.id,itemId:rt,player:Bt,container:at,sources:Xl(j,H).sources,config:Ft,subscription:wt,statistics:Nt});return[2,(U&&S(j.id,Vt.itemId,P),I&&Vt.player.play(),k&&!I&&Vt.player.prepare(),{player:Vt.player,config:Vt.config,statistics:Vt.statistics})]}})})}function N(){F(),d1=null,m.remove()}function F(){i.unsubscribe(),e.removeAll(),c={},l=!1}function z(){return Tt(this,null,function(){var _d_getCurrentChapter,j,P,_tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!d1)throw Error("need to set interactive controller");F(),m=document.createElement("div");_d_getCurrentChapter=d1.getCurrentChapter(),j=_d_getCurrentChapter.media,P=_d_getCurrentChapter.chapter;if(!(j&&P))return[3,2];i.add(d1.events.chapterChanged$.subscribe(A));return[4,L({media:j,chapterId:P.id,title:P.label})];case 1:_tmp=_state.sent();return[3,3];case 2:_tmp=console.error("not found");_state.label=3;case 3:_tmp;return[2]}})})}return it(K({},e),{init:z,setInteractiveController:g,createPlayer:L,removeAll:N,getActivePlayer:function getActivePlayer(){return c},activePlayerChanged:v})}var dt={graph:"graph",interactives:"interactives",chapterChanged:"chapter-changed",playerChanged:"player-changed",manifestChanged:"manifest-changed",errors:"errors",eachTick:"eachTick",historyInited:"history-inited",historyDestroyed:"history-destroyed"},Dr={visibility:"visibility",watchAgainClicked:"watchAgainClicked"},Rt={actionChoiceCanceled:"action-choice-canceled",actionChoice:"action-choice",actionExecution:"action-execution",visibility:"visibility",containerRemoved:"container-removed",rangeEnded:"range-ended"};var Wa=/*#__PURE__*/function(){"use strict";function Wa(param){var _this=this;var e=param.player,i=param.container,c=param.branches,d1=param.selectBranches,l=param.interactiveEvents,m=param.globalEvents,v=param.globalEventEmitter,g=param.ignoreContainerEvent,S=param.permanentTextControls,b=param.disabledControls$,A=param.onRemove;_class_call_check(this,Wa);this.hide=function(){setTimeout(function(){var e,i;_this.gameState!==4&&(Xn(_this.container.container.events)&&_this.gameState===3||_this.selectBranches.state.isExpect||(_this.gameState!==2&&((i=(e=_this.container).hide)==null||i.call(e)),_this.globalEventEmitter.emit(dt.interactives,{subjectId:_this.container.container.id,subjectName:"container",type:Rt.visibility,visibility:!1})))})};this.show=function(){var e,i,c,d1;if(_this.gameState===2&&!_this.isSelectedControlEvent)if(_this.container.getElement())(d1=(c=_this.container).show)==null||d1.call(c),_this.globalEventEmitter.emit(dt.interactives,{subjectId:_this.container.container.id,subjectName:"container",type:Rt.visibility,visibility:!0,isFirst:!1});else{var m=ZE(_this.selectBranches.onControlEvent,{isDisabled:function(){return _this.container.isDisabled},branches:_this.branches,containerId:_this.container.container.id,onDetachContainer:function(){_this.removeView(),_this.globalEventEmitter.emit(dt.interactives,{subjectId:_this.container.container.id,subjectName:"container",type:Rt.visibility,visibility:!1})},onEvent:function(v,g){_this.isSelectedControlEvent=!0,v!==!1&&(_this.removeView(),_this.globalEventEmitter.emit(dt.interactives,{subjectId:_this.container.container.id,subjectName:"container",type:Rt.visibility,visibility:!1})),(_this.gameState===4||_this.gameState===3||_this.selectBranches.state.isExpect)&&(_this.selectBranches.stopExpect(),g(),_this.removeView(),_this.globalEventEmitter.emit(dt.interactives,{subjectId:_this.container.container.id,subjectName:"container",type:Rt.visibility,visibility:!1}))},isEOV:function(){return _this.gameState===4}});_this.container.createView(m),_this.globalEventEmitter.emit(dt.interactives,{subjectId:_this.container.container.id,subjectName:"container",type:Rt.visibility,visibility:!0,isFirst:!0}),_this.disabledControls$.getValue()&&((i=(e=_this.container).disable)==null||i.call(e))}};this.onEndOfVideo=function(){_this.gameState=4,_this.selectContainerEvent(!0)};this.whilePlaying=function(){var S;var e=_this.player.experimental.element$.getValue(),c=_instanceof(e,HTMLVideoElement)?e.readyState:void 0,d1=[6,5];if(!c||d1.includes(_this.gameState)&&!_this.isPermanentText)return;var l=_this.player.getExactTime();if(YE(l,_this.container.container))_this.gameState!==1&&(_this.gameState=1,_this.onBeforeStartTime());else if(Zl(l,_this.container.container))_this.gameState!==2&&(_this.gameState=2,_this.onStartTime());else if(_this.gameState!==3){var b=_this.gameState;_this.gameState=3,b===2&&_this.onEndTime()}else _this.isPermanentText||_this.removeView();var m=Zl(l,_this.container.container),v=_this.container.container.startTime?[_this.container.container.startTime,(S=_this.container.container.endTime)!=null?S:1/0]:[],g={subjectId:_this.container.container.id,subjectName:"container",range:v,currentTime:l,isInteractiveTime:m};_this.globalEventEmitter.emit(dt.eachTick,g),_this.globalEvents.eachTick$.next(g)};this.container=i,this.branches=c,this.selectBranches=d1,this.subscription=new ge,this.player=e,this.interactiveEvents=l,this.ignoreContainerEvent=g,this.isPermanentText=S&&Za(i.container.controls),this.disabledControls$=b,this.onRemove=A,this.globalEventEmitter=v,this.gameState=0,this.globalEvents=m,this.isSelectedControlEvent=!1,this.isSelectedContainerEvent=!1,this.registerEvents()}_create_class(Wa,[{key:"registerEvents",value:function registerEvents(){var _this=this;this.subscription.add(this.player.events.playing$.subscribe(this.show)).add(this.player.events.paused$.subscribe(this.hide)).add(this.player.events.ended$.subscribe(this.onEndOfVideo)).add(this.disabledControls$.subscribe(function(e){var i,c,d1,l;e?(c=(i=_this.container).disable)==null||c.call(i):(l=(d1=_this.container).enable)==null||l.call(d1)}))}},{key:"selectContainerEvent",value:function selectContainerEvent(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;var i;this.interactiveEvents.containersEventsCallState.setCalled({timestamp:e?1/0:this.container.container.endTime,id:this.container.container.id}),!(this.isSelectedControlEvent||this.isSelectedContainerEvent)&&(this.isSelectedContainerEvent=!0,this.ignoreContainerEvent()||this.selectBranches.setManifestContainerEvents({container:this.container.container,branches:this.branches,isEOV:e}),!e&&this.interactiveEvents.exec((i=this.container.container.endTime)!=null?i:1/0))}},{key:"onStartTime",value:function onStartTime(){this.show()}},{key:"onEndTime",value:function onEndTime(){this.selectContainerEvent(!1);var e=Xn(this.container.container.events)||this.ignoreContainerEvent();(this.isSelectedControlEvent||!e)&&this.removeView()}},{key:"onBeforeStartTime",value:function onBeforeStartTime(){var e,i;(i=(e=this.container).hide)==null||i.call(e),this.globalEventEmitter.emit(dt.interactives,{subjectId:this.container.container.id,subjectName:"container",type:Rt.visibility,visibility:!1})}},{key:"reset",value:function reset(){this.isSelectedControlEvent=!1,this.isSelectedContainerEvent=!1,this.gameState=1}},{key:"removeView",value:function removeView(){var e;this.container.removeView(),this.globalEventEmitter.emit(dt.interactives,{subjectId:this.container.container.id,subjectName:"container",type:Rt.containerRemoved,visibility:!1}),this.gameState=5,(e=this.onRemove)==null||e.call(this)}},{key:"destroy",value:function destroy(){var e;this.reset(),this.removeView(),this.gameState=6,this.subscription.unsubscribe(),this.branches=[],this.interactiveEvents.containersEventsCallState.setCalled({timestamp:(e=this.container.container.endTime)!=null?e:1/0,id:this.container.container.id})}}]);return Wa}();var KE=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.reduce(function(e,i,c){var l,m,v;var d1=((l=i==null?void 0:i.controls)!=null?l:[]).filter(function(g){return!Ua(g)});if(Ya(d1)){var g=[(m=i.startTime)!=null?m:0,(v=i.endTime)!=null?v:1/0],S=i.id;if(!c)e.push({subjects:[S],range:g});else{var b=[],A=-1/0,L=1/0,N=[],F=[];for(var z=0;z<e.length;z++){var _F;var j=e[z];if((_F=F).push.apply(_F,_to_consumable_array(j.subjects)),j.range[0]<L&&(L=j.range[0]),j.range[1]>A&&(A=j.range[1]),g[0]>=j.range[0]&&g[1]<=j.range[1])return e[z].subjects.push(S),e;g[0]<j.range[0]&&g[1]>j.range[0]&&(b.push(z),N=N.concat(j.subjects)),g[0]>=j.range[0]&&g[0]<=j.range[1]&&(b.push(z),N=N.concat(j.subjects),g[0]=j.range[0]),g[1]>=j.range[0]&&g[1]<=j.range[1]&&(b.push(z),N=N.concat(j.subjects),g[1]=j.range[1])}if(F.push(S),g[0]<=L&&g[1]>=A)return[{subjects:F,range:g}];b.length&&b.reverse().forEach(function(z){e.splice(z,1)}),e.push({subjects:N.concat([S]),range:g})}}return e},[]).sort(function(e,i){return e.range[0]-i.range[0]})};function qE(){var t={};function e(){for(var v in t)Object.prototype.hasOwnProperty.call(t,v)&&delete t[v]}function i(v){var g={};for(var S in t)+S<=v&&(g[S]=t[S]);return g}function c(v){var g={};for(var S in t)+S>=v&&(g[S]=t[S]);return g}function d1(param){var v=param.timestamp,g=param.priority,S=param.initiator;var b;if(Bl(v)){var A=(b=t[v])!=null?b:null;if(A&&g&&ko(g,!0)){var L={},N=A[g];if(N&&(L=K(K({},L),N)),L=$n(L)?null:L,L&&ko(S,!0)){var F=L[S];return F!=null?F:null}return L}return A}return null}function l(param){var v=param.timestamp,g=param.priority,S=param.initiator;if(Bl(v))if(t[v]){if(g&&ko(g,!0))if(t[v][g]){if(S&&ko(S,!0))if(t[v][g][S]){if(delete t[v][g][S],!$n(t[v][g]))return!0}else return!1;if(delete t[v][g],!$n(t[v]))return!0}else return!1;return delete t[v]}else return!1;return!1}function m(A){var L=A,v=L.timestamp,g=L.priority,S=L.initiator,b=Wt(L,["timestamp","priority","initiator"]);var N,F,z;(F=(N=t[v])==null?void 0:N[g])!=null&&F[S]?t[v][g][S].push(K({},b)):(z=t[v])!=null&&z[g]?t[v][g]=it(K({},t[v][g]),_define_property({},S,[K({},b)])):t[v]?t[v]=it(K({},t[v]),_define_property({},g,_define_property({},S,[K({},b)]))):t[v]=_define_property({},g,_define_property({},S,[K({},b)]))}return{map:t,remove:l,add:m,removeAll:e,get:d1,getLte:i,getGte:c}}var r7=[Mt.expect,Mt.setNextBranch],o7=1/0;function QE(t){var e=t,i,c=i7(),d1=qE(),l,m=function(){L(),P()},v=function(k){d1.add.call(void 0,k),F()},g=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=k[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var U=_step.value;if(U.action(),r7.includes(U.actionType))break}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}},S=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1/0;var Q,st,mt;var U=$a((Q=d1.get({timestamp:k,priority:"control"}))!=null?Q:{}),I=$a((st=d1.get({timestamp:k,priority:"container"}))!=null?st:{}),H=$a((mt=d1.get({timestamp:k,priority:"chapter"}))!=null?mt:{});return _to_consumable_array(U).concat(_to_consumable_array(I),_to_consumable_array(H))},b=function(k){c.isReady(k)&&g(S(k))},A=function(){var k;g(_to_consumable_array($a((k=d1.get({timestamp:1/0,priority:"chapter"}))!=null?k:{})))},L=function(){i&&(l==null||l.unsubscribe(),i=void 0)},N=function(k){},F=function(){i||(i=function(){return setTimeout(function(){b(1/0)})},l=e.events.ended$.subscribe(i))},z=function(k){L(),e=k},j=function(k){k.priority==="container"&&c.resetCalled(k.timestamp),d1.remove(k)},P=function(){c.release(),d1.removeAll()};return{setPlayer:z,add:v,remove:j,exec:b,execEndOfVideo:A,listen:F,unlisten:L,release:m,containersEventsCallState:c,getPreparedToExecActions:S}}function i7(){var t=new Map;return{setCalled:function(param){var m=param.timestamp,v=param.id;var g=t.get(m);g&&g[v]!==void 0&&(g[v]=!0)},setData:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var v,g;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=m[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var S=_step.value;var b=(v=S.endTime)!=null?v:o7,A=(g=t.get(b))!=null?g:{};t.set(b,it(K({},A),_define_property({},S.id,!1)))}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}},resetCalled:function(m){var v=t.get(m);if(v)for(var g in v)v[g]=!1},isReady:function(m){var v=t.get(m);return v?!Object.values(v).some(function(g){return!g}):!0},release:function(){return t.clear()}}}function $a(t){return Object.values(t).flat().sort(function(e){return e.actionType===Mt.expect?-1:1})}var JE={videoContentHeight:0,videoContentWidth:0},tT=function(t,e){var _ref=e.info.intrinsicVideoSize$.getValue()||{},i=_ref.height,c=_ref.width;if(!(i&&c))return JE;var _ref1=e.experimental.element$.getValue()||{},d1=_ref1.clientHeight,l=_ref1.clientWidth;if(!(d1&&l))return JE;var m=i/c,v=d1/l,g,S;return v>m?(S=l,g=l*m):v<m?(S=d1/m,g=d1):(S=l,g=d1),{videoContentWidth:S,videoContentHeight:g}};var a7=250;function eT(t){var e=function(){},i=new ResizeObserver(function(v){l(v),e=l.bind(null,v)});function c(v){var _t=t(),g=_t.parentElement,S=_t.player;if(g&&S){var _tT=tT(g,S),b=_tT.videoContentWidth,A=_tT.videoContentHeight;g.style.setProperty("--interactive-content-width","".concat(b,"px")),g.style.setProperty("--interactive-content-height","".concat(A,"px")),g.style.setProperty("--interactive-width","".concat(v[0].contentRect.width,"px")),g.style.setProperty("--interactive-height","".concat(v[0].contentRect.height,"px"))}}function d1(){var _t=t(),v=_t.parentElement;v.removeAttribute("style")}var l=Po(function(v){var _t=t(),tmp=_t.fns,g=tmp===void 0?[]:tmp;c(v);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=g[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var S=_step.value;S()}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}},a7);function m(){e=void 0,i.disconnect(),d1()}return{resizeObserver:i,calc:function(){e==null||e()},release:m}}var zo=/*#__PURE__*/function(){"use strict";function zo(){_class_call_check(this,zo);this.map={}}_create_class(zo,[{key:"push",value:function push(e,i){e in this.map?this.map[e].push(i):this.map[e]=[i]}},{key:"get",value:function get(e){var i=this.map[e];return i?i.slice():null}},{key:"getAll",value:function getAll(){var e=[];for(var i in this.map)e.concat(this.map[i]);return e}},{key:"remove",value:function remove(e,i){e in this.map&&(this.map[e]=this.map[e].filter(function(c){return c!==i}),this.map[e].length===0&&delete this.map[e])}},{key:"clear",value:function clear(){this.map={}}},{key:"keys",value:function keys(){return Object.keys(this.map)}},{key:"size",value:function size(){return this.keys().length}}]);return zo}();var s7=function(t){return Math.floor(Math.random()*t)},rT=function(t){var d1;var e=t.length,i=1/0,c=null;for(;e--;){var l=t[e],m=(d1=l.weight)!=null?d1:1;m<i&&(i=m,c=l)}return c},oT=function(t){var d1;var e=t.length,i=-1/0,c=null;for(;e--;){var l=t[e],m=(d1=l.weight)!=null?d1:0;m>i&&(i=m,c=l)}return c};var iT=function(t){var e=t.length,i=s7(e);return t[i]},nT=1,aT=function(t){var c,d1;var e=0;for(var l=0;l<t.length;++l)e+=(c=t[l].weight)!=null?c:nT;var i=Math.random()*e;e=0;for(var l1=0;l1<t.length-1;++l1)if(e+=(d1=t[l1].weight)!=null?d1:nT,e>=i)return t[l1];return t[t.length-1]};var sT={shouldOpenNow:!0,isDetachContainer:!0};var ql=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return it(K({},t),{args:e?K(K({},t.args),sT):K(K({},sT),t.args)})},uT=function(param){var t=param.globalEventEmitter,e=param.player,i=param.interactiveEvents,c=param.removeControllers;var g=function g(param){var P=param.container,k=param.branches,tmp=param.isEOV,U=tmp===void 0?!1:tmp;var H,Q;var I=Wl(P.events);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(I){var st=ql(I.action,U);t.emit(dt.interactives,{subjectId:P.id,subjectName:"container",type:Rt.actionChoice,actionType:st.type,payload:st.args}),i.add({timestamp:U?1/0:(H=P.endTime)!=null?H:1/0,priority:"container",initiator:P.id,actionType:Mt.expect,action:A.bind(null,{subjectId:P.id,subjectName:"container"})}),d1.isExpect=!0}else try{for(var _iterator=((Q=P.events)!=null?Q:[])[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var st1=_step.value;v({action:st1.action,container:P,branches:k,isEOV:U})}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}};var b=function b(P){var U;var k=Wl(P.events);if(k){if(ze(P))return;t.emit(dt.interactives,{subjectId:P.id,subjectName:"chapter",type:Rt.actionChoice,actionType:k.action.type,payload:k.action.args}),i.add({timestamp:1/0,priority:"chapter",initiator:P.id,actionType:Mt.expect,action:A.bind(null,{subjectId:P.id,subjectName:"chapter"})})}else(U=P.events)==null||U.forEach(function(I){var H=S({chapterId:P.id,action:I.action,branches:P.branches});H&&i.add({timestamp:1/0,priority:"chapter",initiator:P.id,actionType:I.action.type,action:H})})};var d1={isExpect:!1},l=function(){d1.isExpect&&(d1.isExpect=!1)},m=function(param){var P=param.action,k=param.controlType,U=param.controlId,I=param.containerId,tmp=param.branches,H=tmp===void 0?[]:tmp,Q=param.onEvent,tmp1=param.isEOV,st=tmp1===void 0?function(){return!1}:tmp1,tmp2=param.isDisabled,mt=tmp2===void 0?function(){return!1}:tmp2;var rt=ql(P,st()),at={timestamp:1/0,priority:"control",initiator:U,actionType:rt.type},pt=mt(),vt=t.emit.bind(t,dt.interactives,{subjectId:U,subjectType:k,subjectName:"control",type:pt?Rt.actionChoiceCanceled:Rt.actionChoice,actionType:P.type,payload:K({containerId:I},rt.args)});if(pt){vt();return}switch(rt.type.trim().toLowerCase()){case Mt.setNextBranch.trim().toLowerCase():{var Ct=H.find(function(Ft){return Ft.id===rt.args.branchId});if(!Ct)return;Q(rt.args.isDetachContainer,L.bind(null,{subjectId:U,subjectName:"control"})),vt(),rt.args.shouldOpenNow?F({subjectId:U,subjectName:"control",subjectType:k,action:rt,payload:{chapterId:Ct.chapterId,autoSelect:!1}}):(i.add(it(K({},at),{action:F.bind(null,{subjectId:U,subjectName:"control",subjectType:k,action:rt,payload:{chapterId:Ct.chapterId,autoSelect:!1}})})),c==null||c());return}case Mt.continuePlayback.trim().toLowerCase():{Q(rt.args.isDetachContainer,L.bind(null,{subjectId:U,subjectName:"control"})),vt(),rt.args.shouldOpenNow?N({subjectId:U,subjectName:"control",subjectType:k,action:P}):i.add(it(K({},at),{action:N.bind(null,{subjectId:U,subjectName:"control",subjectType:k,action:P})}));return}case Mt.openURI.trim().toLowerCase():{Q(rt.args.isDetachContainer,L.bind(null,{subjectId:U,subjectName:"control"})),vt(),rt.args.shouldOpenNow?j({subjectId:U,subjectName:"control",subjectType:k,action:rt,payload:{URI:P.args.uri}}):(i.add(it(K({},at),{action:j.bind(null,{subjectId:U,subjectName:"control",subjectType:k,action:rt,payload:{URI:P.args.uri}})})),c==null||c());return}default:console.error("Unexpected control event"),t.emit(dt.errors,new re(1,1,{message:"Unexpected control event"}));return}},v=function(param){var P=param.action,_param_container=param.container,k=_param_container.id,U=_param_container.endTime,tmp=param.branches,I=tmp===void 0?[]:tmp,tmp1=param.isEOV,H=tmp1===void 0?!1:tmp1,tmp2=param.autoSelected,Q=tmp2===void 0?!1:tmp2;var st=ql(P,H),mt={timestamp:!st.args.shouldOpenNow||H?1/0:U!=null?U:1/0,priority:"container",initiator:k,actionType:st.type},rt=t.emit.bind(t,dt.interactives,{subjectId:k,subjectName:"container",type:Rt.actionChoice,actionType:st.type,payload:st.args});switch(st.type.trim().toLowerCase()){case Mt.setNextBranch.trim().toLowerCase():{var at=I.find(function(pt){return pt.id===st.args.branchId});if(!at)return;rt(),i.add(it(K({},mt),{action:F.bind(null,{subjectId:k,subjectName:"container",action:st,payload:{chapterId:at.chapterId,autoSelect:Q}})})),c==null||c();return}case Mt.setMaxWeightBranch.trim().toLowerCase():return;case Mt.setMinWeightBranch.trim().toLowerCase():return;case Mt.setRandomBranch.trim().toLowerCase():return;case Mt.setWeightlessRandomBranch.trim().toLowerCase():return;case Mt.continuePlayback.trim().toLowerCase():{rt(),i.add(it(K({},mt),{action:N.bind(null,{subjectId:k,subjectName:"container",action:st})}));return}case Mt.openURI.trim().toLowerCase():{rt(),i.add(it(K({},mt),{action:j.bind(null,{subjectId:k,subjectName:"container",action:st,payload:{URI:P.args.uri}})})),c==null||c();return}default:console.error("Unexpected container event"),t.emit(dt.errors,new re(1,1,{message:"Unexpected container event"}));return}};var S=function(param){var P=param.chapterId,k=param.action,tmp=param.branches,U=tmp===void 0?[]:tmp;var I=t.emit.bind(t,dt.interactives,{subjectId:P,subjectName:"chapter",type:Rt.actionChoice,actionType:k.type,payload:k.args});switch(k.type.trim().toLowerCase()){case Mt.setNextBranch.trim().toLowerCase():{var H=U.find(function(Q){return Q.id===k.args.branchId});return H!=null&&H.chapterId?(I(),F.bind(null,{subjectId:P,subjectName:"chapter",action:k,payload:{chapterId:H.chapterId,autoSelect:!0}})):void 0}case Mt.setWeightlessRandomBranch.trim().toLowerCase():{var H1=iT(U);return H1!=null&&H1.chapterId?(I(),F.bind(null,{subjectId:P,subjectName:"chapter",action:k,payload:{chapterId:H1.chapterId,autoSelect:!0}})):void 0}case Mt.setRandomBranch.trim().toLowerCase():{var H2=aT(U);return H2!=null&&H2.chapterId?(I(),F.bind(null,{subjectId:P,subjectName:"chapter",action:k,payload:{chapterId:H2.chapterId,autoSelect:!0}})):void 0}case Mt.setMaxWeightBranch.trim().toLowerCase():{var H3=oT(U);return H3!=null&&H3.chapterId?(I(),F.bind(null,{subjectId:P,subjectName:"chapter",action:k,payload:{chapterId:H3.chapterId,autoSelect:!0}})):void 0}case Mt.setMinWeightBranch.trim().toLowerCase():{var H4=rT(U);return H4!=null&&H4.chapterId?(I(),F.bind(null,{subjectId:P,subjectName:"chapter",action:k,payload:{chapterId:H4.chapterId,autoSelect:!0}})):void 0}case Mt.continuePlayback.trim().toLowerCase():return I(),N.bind(null,{subjectId:P,subjectName:"chapter",action:k});case Mt.openURI.trim().toLowerCase():return I(),j.bind(null,{subjectId:P,subjectName:"chapter",action:k,payload:{URI:k.args.uri}});default:console.error("Unexpected chapter event"),t.emit(dt.errors,new re(1,1,{message:"Unexpected chapter event"}));return}};var A=function(param){var P=param.subjectId,k=param.subjectName;e.pause(),t.emit(dt.interactives,{subjectId:P,subjectName:k,type:Rt.actionExecution,actionType:Mt.expect})},L=function(param){var P=param.subjectId,k=param.subjectName;e.info.isEnded$.getValue()?i.execEndOfVideo():e.play(),t.emit(dt.interactives,{subjectId:P,subjectName:k,type:Rt.actionExecution,actionType:"after-expect"})},N=function(param){var P=param.subjectId,k=param.subjectName,U=param.subjectType,I=param.action;t.emit(dt.interactives,{subjectId:P,subjectName:k,subjectType:U,type:Rt.actionExecution,actionType:I.type})},F=function(param){var P=param.subjectId,k=param.subjectName,U=param.subjectType,I=param.action,H=param.payload;H.behaviour="change-chapter",t.emit(dt.interactives,{subjectId:P,subjectName:k,subjectType:U,type:Rt.actionExecution,actionType:I.type,payload:H})},z=function(param){var P=param.subjectId,k=param.subjectName,U=param.subjectType,I=param.action,H=param.payload;H.behaviour="change-manifest",t.emit(dt.interactives,{subjectId:P,subjectName:k,subjectType:U,type:Rt.actionExecution,actionType:I.type,payload:H})},j=function(param){var P=param.subjectId,k=param.subjectName,U=param.subjectType,I=param.action,H=param.payload;if(!H.URI)return;var Q=window.open(H.URI,"_blank","noopener,noreferrer");Q&&(Q.opener=null),t.emit(dt.interactives,{subjectId:P,subjectName:k,subjectType:U,type:Rt.actionExecution,actionType:I.type})};return{onControlEvent:m,onContainerEvent:v,onChapterEvent:S,onExpectEvent:A,expectEventHandler:L,setManifestChapterEvents:b,setManifestContainerEvents:g,stopExpect:l,state:d1}};var Xa=function(t,e){var i={};return t.map(function(c){if(!i[c]){var d1=e.chapters.find(function(m){return m.id===c});if(!d1)return null;var l=e.media.videos.find(function(m){return d1.videoId===m.id});if(!l)return null;i[c]=Ql(l)}return i[c]}).filter(Boolean)},dT=function(t){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t.variants[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var e=_step.value;if(pT(e)&&"payload"in e)return e.payload.id}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}},pT=function(t){return t.type==="custom"&&"payload"in t&&t.payload.type==="vk"},Ql=function(t){var e=dT(t);if(!e)return null;var i=e.split("_").pop();return i?parseInt(i,10):null},hT=function(t,e){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t.media.videos[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var i=_step.value;if(e===Ql(i)){var _iteratorNormalCompletion1=true,_didIteratorError1=false,_iteratorError1=undefined;try{for(var _iterator1=t.chapters[Symbol.iterator](),_step1;!(_iteratorNormalCompletion1=(_step1=_iterator1.next()).done);_iteratorNormalCompletion1=true){var c=_step1.value;if(c.videoId===i.id)return c.id}}catch(err){_didIteratorError1=true;_iteratorError1=err}finally{try{if(!_iteratorNormalCompletion1&&_iterator1.return!=null){_iterator1.return()}}finally{if(_didIteratorError1){throw _iteratorError1}}}return}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}},Jl=function(t,e){return t.reduce(function(i,c){var d1=hT(e,c);return d1?_to_consumable_array(i).concat([d1]):i},[])};var mn,qn,Qn,Pe,Ka,vn,yn,Je,Jn,kr,Vr,Go=/*#__PURE__*/function(){"use strict";function Go(param){var _this=this;var e=param.globalEventEmitter,i=param.videoId,c=param.interactiveController,d1=param.historyApi,l=param.settings;_class_call_check(this,Go);this.state={history$:new kt([]),hasPrevChapter$:new kt(!1),prevChapter$:new kt(null),isInitialChapter$:new kt(!1),isGoBackLimited$:new kt(!1)};me(this,mn,null);me(this,qn);me(this,Qn,!1);me(this,Pe,null);me(this,Ka,null);this.events={inited$:new Ne,destroyed$:new Ne,error$:new Ne};me(this,vn,null);me(this,yn,null);me(this,Je,null);me(this,Jn,new ge);me(this,kr,!1);me(this,Vr,0);var m;Ht(this,vn,i),Ht(this,Je,e),Ht(this,yn,c),Ht(this,mn,d1),Ht(this,qn,l),this.state.history$&&Et(this,Jn)&&((m=Et(this,Jn))==null||m.add(this.state.history$.subscribe(function(v){var g,S;_this.state.prevChapter$.next(v.at(-2)||null),_this.state.hasPrevChapter$.next(v.length>1),_this.state.isInitialChapter$.next(_this.getInitialChapterId()===((S=(g=Et(_this,Pe))==null?void 0:g.metadata)==null?void 0:S.initChapterId)),_this.state.isGoBackLimited$.next(Et(_this,Vr)===Et(_this,qn).maxLength-1)})))}_create_class(Go,[{key:"setManifest",value:function setManifest(e){return Tt(this,null,function(){var i;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!Et(this,yn)||!Et(this,Je))return[2];Ht(this,Pe,e);return[4,this.getProjectHistory()];case 1:_state.sent();i=this.getInitialChapterId();return[4,Et(this,yn).setChapter({chapterId:i,pushToHistory:!1})];case 2:_state.sent(),Et(this,Qn)||(Ht(this,Qn,!0),this.events.inited$.next({initChapterId:i}));return[2]}})})}},{key:"inited",get:function get(){return Et(this,Qn)}},{key:"updateHistory",value:function updateHistory(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Tt(this,null,function(){var v,c,d1,l,m,g,S;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!Et(this,Pe))return[2];Et(this,kr)?(Ht(this,kr,!1),Vp(this,Vr)._++):Ht(this,Vr,0);c=Et(this,Pe),d1=e.length-Et(this,qn).maxLength,l=d1>0?e.slice(d1):e,m=Xa(l,c);if(!(Ht(this,Ka,m),this.state.history$.next(l),!(!i||!Et(this,mn)||!Et(this,vn))))return[3,4];_state.label=1;case 1:_state.trys.push([1,3,,4]);return[4,Et(this,mn).save(Et(this,vn),m)];case 2:_state.sent();return[3,4];case 3:g=_state.sent();S=new re(1,5,"Unable to save interactive history");this.events.error$.next(S),(v=Et(this,Je))==null||v.emit(dt.errors,S);return[3,4];case 4:return[2]}})})}},{key:"goBack",value:function goBack(){return Tt(this,null,function(){var c,d1,e,i;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!this.state||!Et(this,yn)){d1=new re(1,5,"Unable to save interactive history");return[2,(this.events.error$.next(d1),(c=Et(this,Je))==null?void 0:c.emit(dt.errors,d1))]}Ht(this,kr,!0);e=this.state.history$.getValue().slice(0,-1),i=e.pop();this.state.history$.next(e);return[4,Et(this,yn).setChapter({chapterId:i,playPrev:!0})];case 1:_state.sent();return[2]}})})}},{key:"getProjectHistory",value:function getProjectHistory(){return Tt(this,null,function(){var d1,e,i,l,l1,m,c;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!Et(this,Pe)||!Et(this,vn))return[2];e=Et(this,Pe),i=[this.getInitialVideoId()];if(!Et(this,mn))return[3,4];_state.label=1;case 1:_state.trys.push([1,3,,4]);return[4,Et(this,mn).get(Et(this,vn))];case 2:l=_state.sent();l.length&&(i=l);return[3,4];case 3:l1=_state.sent();m=new re(1,5,"Error while trying to fetch data");this.events.error$.next(m),(d1=Et(this,Je))==null||d1.emit(dt.errors,m);return[3,4];case 4:c=Jl(i,e);this.state.history$.next(c);return[2]}})})}},{key:"getInitialChapterId",value:function getInitialChapterId(){var i;var e=this.state.history$.getValue();return(e==null?void 0:e.at(-1))||Et(this,qn).initChapterId||((i=Et(this,Pe))==null?void 0:i.metadata.initChapterId)}},{key:"getInitialVideoId",value:function getInitialVideoId(){if(Et(this,Pe)){var e=this.getInitialChapterId();return Xa([e],Et(this,Pe)).pop()}return null}},{key:"destroy",value:function destroy(){var e,i;Ht(this,vn,null),Ht(this,mn,null),Ht(this,yn,null),(e=Et(this,Jn))==null||e.unsubscribe(),Ht(this,Jn,null),Ht(this,Qn,!1),(i=Et(this,Je))==null||i.emit(dt.historyDestroyed),this.events.destroyed$.next(),Ht(this,Je,null)}}]);return Go}();mn=new WeakMap,qn=new WeakMap,Qn=new WeakMap,Pe=new WeakMap,Ka=new WeakMap,vn=new WeakMap,yn=new WeakMap,Je=new WeakMap,Jn=new WeakMap,kr=new WeakMap,Vr=new WeakMap;var tr=/*#__PURE__*/function(){"use strict";function tr(e,i,c,d1){_class_call_check(this,tr);this.target=e,this.type=i,this.listener=c,this.options=tr._convertOptions(e,d1),this.target.addEventListener(i,c,this.options)}_create_class(tr,[{key:"unlisten",value:function unlisten(){var e;this.type&&this.listener&&this.options&&((e=this.target)==null||e.removeEventListener(this.type,this.listener,this.options)),this.target=null,this.type=null,this.listener=null,this.options=!1}}],[{key:"_convertOptions",value:function _convertOptions(e,i){if(i===void 0)return!1;if(typeof i=="boolean")return i;{var c=new Set(["passive","capture"]),d1=Object.keys(i).filter(function(m){return!c.has(m)});return d1.length===0&&console.warn("Unsupported flag(s) to addEventListener: "+d1.join(",")),tr._doesSupportObject(e)?i:i.capture||!1}}},{key:"_doesSupportObject",value:function _doesSupportObject(e){var i=tr._supportsObject;if(i===void 0){i=!1;try{var c={},d1={get:function(){return i=!0,!1}};Object.defineProperty(c,"passive",d1),Object.defineProperty(c,"capture",d1);var l=function(){};e.addEventListener("test",l,c),e.removeEventListener("test",l,c)}catch(c){i=!1}tr._supportsObject=i}return i||!1}}]);return tr}();tr._supportsObject=void 0;var qa=tr;var Qa=/*#__PURE__*/function(){"use strict";function Qa(){_class_call_check(this,Qa);this.bindingMap=new zo}_create_class(Qa,[{key:"release",value:function release(){this.removeAll(),this.bindingMap=null}},{key:"listen",value:function listen(e,i,c,d1){if(!this.bindingMap)return;var l=new qa(e,i,c,d1);this.bindingMap.push(i,l)}},{key:"listenOnce",value:function listenOnce(e,i,c,d1){var _this=this;var l=function(m){_this.unlisten(e,i,l),c(m)};this.listen(e,i,l,d1)}},{key:"unlisten",value:function unlisten(e,i,c){if(!this.bindingMap)return;var d1=this.bindingMap.get(i)||[];var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=d1[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var l=_step.value;l.target===e&&(c===l.listener||!c)&&(l.unlisten(),this.bindingMap.remove(i,l))}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}},{key:"removeAll",value:function removeAll(){if(!this.bindingMap)return;var e=this.bindingMap.getAll();var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=e[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var i=_step.value;i.unlisten()}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}this.bindingMap.clear()}}]);return Qa}();var Ja=/*#__PURE__*/function(){"use strict";function Ja(){_class_call_check(this,Ja);this._prevSizeId=0;this.rootElement=document.createElement("canvas")}_create_class(Ja,[{key:"clear",value:function clear(){var e;(e=this.rootElement.getContext("2d"))==null||e.clearRect(0,0,this.rootElement.width,this.rootElement.height)}},{key:"isImageDrawn",value:function isImageDrawn(){var d1;var e=(d1=this.rootElement.getContext("2d"))==null?void 0:d1.getImageData(0,0,this.rootElement.width,this.rootElement.height);if(!e)return!1;var i=e.data,c=i.length;for(var l=3;l<c;l+=40)if(i[l]!==0)return!0;return!1}},{key:"destroy",value:function destroy(){this.rootElement.remove()}},{key:"show",value:function show(){this.rootElement.style.visibility="visible"}},{key:"hide",value:function hide(){this.rootElement.style.visibility="hidden"}},{key:"setCanvasImageSource",value:function setCanvasImageSource(e){this.canvasImgSrc=e}},{key:"draw",value:function draw(){var e;this.canvasImgSrc&&((e=this.rootElement.getContext("2d"))==null||e.drawImage(this.canvasImgSrc,0,0,this.rootElement.width,this.rootElement.height))}},{key:"updateCanvasDimensions",value:function updateCanvasDimensions(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Tt(this,null,function(){var c,d1,_tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:c=e.width+e.height;if(this._prevSizeId===c)return[2];_tmp=i;if(!_tmp)return[3,2];return[4,this.save()];case 1:_tmp=d1=_state.sent();_state.label=2;case 2:_tmp,this.rootElement.width=e.width,this.rootElement.height=e.height,i&&d1&&this.restore(d1),this._prevSizeId=c;return[2]}})})}},{key:"save",value:function save(){return Tt(this,null,function(){var e,i;return _ts_generator(this,function(_state){switch(_state.label){case 0:e=this.rootElement.toDataURL("image/jpeg",1),i=new Image;i.crossOrigin="anonymous",i.src=e;return[4,i.decode()];case 1:return[2,(_state.sent(),i)]}})})}},{key:"restore",value:function restore(e){var i;this.rootElement&&((i=this.rootElement.getContext("2d"))==null||i.drawImage(e,0,0,this.rootElement.width,this.rootElement.height))}}]);return Ja}();var ts=/*#__PURE__*/function(){"use strict";function ts(param){var _this=this;var e=param.parentElement,tmp=param.endOffsetMs,i=tmp===void 0?250:tmp,c=param.onError;_class_call_check(this,ts);this.currentVideoDurationMs=1/0;this._containerTimeFrameShouldReceived=!1;this._endTimeFrameReceived=!1;this._shouldCallSkip=!1;this.onEachTick=function(e){var i=e!=null?e:_this.lastFrameCanvas.canvasImgSrc.currentTime*1e3,c=_this.isChapterEndTime(i);if(_this.isContainerTime(i))_this._endTimeFrameReceived=!1,_this._containerTimeFrameShouldReceived=!0,_this._shouldCallSkip=!0;else if(c)_this._containerTimeFrameShouldReceived=!1,_this._shouldCallSkip=!1,_this._endTimeFrameReceived||(_this.draw(),_this._endTimeFrameReceived=!0,_this.show());else{if(_this._shouldCallSkip){_this._shouldCallSkip=!1;return}_this.reset()}};this.onSeek=function(){_this.onEachTick(),!_this._containerTimeFrameShouldReceived&&!_this._endTimeFrameReceived&&(_this.hide(),_this.lastFrameCanvas.clear())};this.rootElement=document.createElement("div"),this.rootElement.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: var(--interactive-width);\n height: var(--interactive-height);\n background-color: var(--black);\n visibility: hidden;\n ",this.lastFrameCanvas=new Ja,this.endOffsetMs=i,this._callbacks={onError:c},this.lastFrameCanvas.rootElement.style.cssText="\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n ",this.rootElement.prepend(this.lastFrameCanvas.rootElement),e.prepend(this.rootElement)}_create_class(ts,[{key:"destroy",value:function destroy(){this.hide(),this.reset(),this._callbacks=void 0,this.lastFrameCanvas.destroy(),this.rootElement.remove()}},{key:"setVideoDuration",value:function setVideoDuration(e){this.currentVideoDurationMs=e}},{key:"setVideoElement",value:function setVideoElement(e){this.lastFrameCanvas.setCanvasImageSource(e)}},{key:"setCurrentChapter",value:function setCurrentChapter(e){this.currentChapter=e}},{key:"show",value:function show(){this.rootElement.style.visibility="visible"}},{key:"hide",value:function hide(){this.rootElement.style.visibility="hidden"}},{key:"updateCanvasDimensions",value:function updateCanvasDimensions(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return Tt(this,null,function(){var i,c;return _ts_generator(this,function(_state){this._containerTimeFrameShouldReceived||this._endTimeFrameReceived||(e=!1);i=getComputedStyle(this.rootElement),c={width:parseInt(i.getPropertyValue("--interactive-content-width"),10),height:parseInt(i.getPropertyValue("--interactive-content-height"),10)};try{this.lastFrameCanvas.updateCanvasDimensions(c,e)}catch(d1){this._onError(d1)}return[2]})})}},{key:"draw",value:function draw(){(this._containerTimeFrameShouldReceived||!this._containerTimeFrameShouldReceived&&!this._endTimeFrameReceived)&&this.lastFrameCanvas.draw()}},{key:"isChapterEndTime",value:function isChapterEndTime(e){return this.currentVideoDurationMs&&e>=this.currentVideoDurationMs-this.endOffsetMs}},{key:"isContainerTime",value:function isContainerTime(e){var _this=this;if(this.currentChapter)return this.currentChapter.containers.some(function(i){var c,d1,l;return((c=i.controls)==null?void 0:c.length)&&e>=((d1=i.startTime)!=null?d1:0)&&e<=Math.min((l=i.endTime)!=null?l:1/0,_this.currentVideoDurationMs-_this.endOffsetMs)})}},{key:"reset",value:function reset(){this._endTimeFrameReceived=!1,this._containerTimeFrameShouldReceived=!1,this._shouldCallSkip=!1}},{key:"_onError",value:function _onError(e){var i,c;(c=(i=this._callbacks)==null?void 0:i.onError)==null||c.call(i,e)}}]);return ts}();function fT(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Promise(function(e){setTimeout(function(){e(0)},t)})}var mT=Object.freeze({lang:Vl.RU,loaders:{},graph:!1,initSeamless:!1,lastFrame:!1,permanentTextControls:!0,config:{historyMaxLength:100,noInteractionEventTimeout:3e4}});function l7(){var t=document.createElement("div");return t.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n ",t}var Yo=/*#__PURE__*/function(){"use strict";function Yo(e){var _this=this;var _this1=this;_class_call_check(this,Yo);this.subscription=new ge;this.globalEventEmitter=new ja;this.animation=new Fa;this.eventManager=new Qa;this.seekToInteractiveController=new Bo;this.endedRanges=new Set;this.gameControllers=[];this.rootElement=l7();this.factories=new Map([["choice",zi]]);this.isFirstChapterFetched=!1;this.player=null;this.interactiveEvents=null;this.selectBranches=null;this.seamlessController=null;this.seamlessControllerSubs=new ge;this.graph=null;this.lastFrame=null;this.appState=0;this.state={prevChapter$:new kt(null),isInitialChapter$:new kt(!1),isFirstChapter$:new kt(!0),isEndChapter$:new kt(!1),isInteractiveExpectation$:new kt(!1),isReplay$:new kt(!1),calledByInteractive$:new kt(!1),lastChapterChangeWasInitiatedByInteractive$:new kt(!1),disabledControls$:new kt(!1),interactiveRanges$:new kt([]),isInteractiveTime$:new kt(!1),statistics$:new kt(null),isSeekable$:new kt(!1)};this.events={noInteraction$:new Ne,graphVisibilityChanged$:new Ne,watchAgainIsClicked$:new Ne,chapterChanged$:new Ne,error$:new Ne,eachTick$:new Ne};this.clearHistoryIfEnded=function(){var d1;var _$e=(d1=_this.player)==null?void 0:d1.info.isEnded$.getValue(),i=_this.state.isInteractiveExpectation$.getValue(),_this_getCurrentChapter=_this.getCurrentChapter(),c=_this_getCurrentChapter.chapter;_$e&&c&&ze(c)&&!i&&_this.historyController.updateHistory([]),window.removeEventListener("beforeunload",_this.clearHistoryIfEnded)};this.handleSeamlessPlayerChanged=function(e){if(!e)return;var d1=e,i=d1.statistics,c=Wt(d1,["statistics"]);if(i){var l=i.statSubscription,m=i.oneStat;l.add(m.attachToInteractive(_this.getStatEvents())),_this.state.statistics$.next(i)}_this.state.isReplay$.getValue()&&_this.state.isReplay$.next(!1),_this.globalEventEmitter.emit(dt.playerChanged,c)};this.onPlaybackStarted=function(){var _$e;(_$e=_this.resizeManager)==null||_$e.calc(),_this.animation.requestAnimation()};this.removeControllers=function(){var _$e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;_this1.gameControllers.forEach(function(i){!_$e&&i.isPermanentText||(_this1.animation.removeFn(i.whilePlaying),i.destroy())})};this.completeInteractiveRange=function(e){var _this_state=_this.state,i=_this_state.interactiveRanges$,d1=i.getValue().map(function(l){return it(K({},l),{subjects:l.subjects.filter(function(m){return m!==e})})});i.next(d1)};this.clearNoInteractionTimeout=function(){_this.noInteractionTimeout&&(clearTimeout(_this.noInteractionTimeout),_this.noInteractionTimeout=void 0)};var i;this._options=it(K(K({},mT),e),{config:K(K({},mT.config),e.config)}),this._options.parentElement.append(this.rootElement),this.historyController=new Go({interactiveController:this,globalEventEmitter:this.globalEventEmitter,videoId:(i=this._options.projectInfo)==null?void 0:i.videoId,historyApi:this._options.historyApi,settings:{maxLength:this._options.config.historyMaxLength,initChapterId:this._options.initChapterId}}),this._options.lastFrame&&(this.lastFrame=new ts({parentElement:this._options.parentElement,onError:function(c){return _this.globalEventEmitter.emit(dt.errors,new re(1,6,c))}})),this.eventManager.listen(this.rootElement,"mousedown",function(c){return c.stopPropagation()}),this.eventManager.listen(this.rootElement,"mouseup",function(c){return c.stopPropagation()}),this.manifestController=new Kn(this._options.loaders,function(c){return _this.globalEventEmitter.emit(dt.errors,new re(1,3,c))}),this.resizeManager=eT(function(){var c,d1;return{player:_this.player,parentElement:(c=_this._options)==null?void 0:c.parentElement,fns:(d1=_this._options)!=null&&d1.lastFrame?[function(){var l;(l=_this.lastFrame)==null||l.updateCanvasDimensions(!0)}]:[]}}),this._options.graph&&(this.graph=new Vo({root:this._options.parentElement,lang:this._options.lang,onOpenPreviewClick:function(c){_this.setChapter({chapterId:c}),_this.globalEventEmitter.emit(dt.graph,{type:Dr.watchAgainClicked,chapterId:c}),_this.events.watchAgainIsClicked$.next(c)},onError:function(c){return _this.globalEventEmitter.emit(dt.errors,new re(1,4,{message:c}))}})),this.initSubscriptions()}_create_class(Yo,[{key:"initSubscriptions",value:function initSubscriptions(){var _this=this;this.subscription.add(this.historyController.events.inited$.subscribe(function(i){return Tt(_this,[i],function(param){var tmp,e,_tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:tmp=param.videosInfo,e=tmp===void 0?[]:tmp;_tmp=this._options.initSeamless;if(!_tmp)return[3,2];return[4,this.initSeamless()];case 1:_tmp=(_state.sent(),this.updateGraphVideosInfo(e));_state.label=2;case 2:_tmp;return[2]}})})})),this.globalEventEmitter.on(dt.interactives,function(e){return Tt(_this,null,function(){var i,c,_e_payload,l,_e_payload1,l1,d1;return _ts_generator(this,function(_state){if(e.type===Rt.actionExecution){if(this.state.calledByInteractive$.next(!0),this.state.lastChapterChangeWasInitiatedByInteractive$.next(!0),((i=e.payload)==null?void 0:i.behaviour)==="change-chapter"){_e_payload=e.payload,l=_e_payload.chapterId;this.setChapter({chapterId:l}),this.state.isFirstChapter$.getValue()&&this.state.isFirstChapter$.next(!1)}if(((c=e.payload)==null?void 0:c.behaviour)==="change-manifest"){_e_payload1=e.payload,l1=_e_payload1.manifestURL;this.setManifest(l1)}d1=e.type==="action-execution";d1&&e.actionType==="expect"?this.state.isInteractiveExpectation$.next(!0):d1&&e.actionType==="after-expect"&&this.state.isInteractiveExpectation$.next(!1)}e.type===Rt.containerRemoved&&this.completeInteractiveRange(e.subjectId);return[2]})})}),this.globalEventEmitter.on(dt.manifestChanged,function(){_this.state.calledByInteractive$.next(!1),_this.state.lastChapterChangeWasInitiatedByInteractive$.next(!1)})}},{key:"initSeamless",value:function initSeamless(){return Tt(this,null,function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:this.seamlessController=Kl(this),this.seamlessControllerSubs.add(this.seamlessController.activePlayerChanged.subscribe(this.handleSeamlessPlayerChanged));return[4,this.seamlessController.init()];case 1:_state.sent();return[2]}})})}},{key:"handlePositionChange",value:function handlePositionChange(e){(!this.graph||this.graph.isHidden)&&this.checkIfSeekable();var i=e*1e3,d1=this.getInteractiveRanges().reverse().find(function(param){var l=param.range;return i>=l[1]});if(d1){var l=d1.range.join("-");this.endedRanges.has(l)||(this.endedRanges.add(l),this.globalEventEmitter.emit(dt.interactives,{type:Rt.rangeEnded,payload:d1,visibility:!0}))}}},{key:"registerVideoEvents",value:function registerVideoEvents(){var _this=this;this.player&&(window.removeEventListener("beforeunload",this.clearHistoryIfEnded),this.subscription.unsubscribe(),window.addEventListener("beforeunload",this.clearHistoryIfEnded),this.subscription.add(this.player.events.started$.pipe(bE()).subscribe(this.onPlaybackStarted)).add(this.player.events.playing$.subscribe(this.animation.requestAnimation)).add(this.player.events.willPause$.subscribe(this.animation.cancelAnimation)).add(this.player.info.position$.subscribe(this.handlePositionChange.bind(this))).add(this.manifestController.prevChapter$.subscribe(function(e){return _this.state.prevChapter$.next(e)})).add(SE({position:this.player.info.position$,interactiveRanges:this.state.interactiveRanges$,isInteractiveExpectation:this.state.isInteractiveExpectation$}).subscribe(function(param){var e=param.position,i=param.interactiveRanges,c=param.isInteractiveExpectation;var g;var d1;if(c)d1=!0;else{var S=e*1e3;d1=!!i.find(function(param){var _param_range=_sliced_to_array(param.range,2),A=_param_range[0],L=_param_range[1],N=param.subjects;return A<S&&S<L&&N.length})}d1!==_this.state.isInteractiveTime$.getValue()&&_this.state.isInteractiveTime$.next(d1);var l=!!_this.noInteractionTimeout,v=((g=_this.player)==null?void 0:g.info.playbackState$.getValue())==="playing"||c;d1&&!l&&v?_this.noInteractionTimeout=window.setTimeout(function(){_this.events.noInteraction$.next()},_this._options.config.noInteractionEventTimeout):l&&!v&&_this.clearNoInteractionTimeout()})),this.subscription.add(this.historyController.events.error$.subscribe(this.events.error$)),this._options.lastFrame&&this.subscription.add(this.player.info.duration$.subscribe(function(e){var i;(i=_this.lastFrame)==null||i.setVideoDuration(e*1e3)})).add(this.player.experimental.element$.subscribe(function(e){var i;e&&((i=_this.lastFrame)==null||i.setVideoElement(e))})).add(this.player.events.firstFrame$.subscribe(function(){var e;(e=_this.lastFrame)==null||e.reset(),setTimeout(function(){var i,c;(i=_this.lastFrame)==null||i.hide(),(c=_this.lastFrame)==null||c.lastFrameCanvas.clear()},50)})).add(this.player.events.seeked$.subscribe(this.lastFrame.onSeek)))}},{key:"setGameControllers",value:function setGameControllers(){var _this=this;var i,c;var e=this.manifestController.chapter;e&&this.appState===1&&((i=this.selectBranches)==null||i.setManifestChapterEvents(e),this.gameControllers=this.filterGameControllers(e),(c=this.interactiveEvents)==null||c.containersEventsCallState.setData(e.containers),this.seekToInteractiveController.setContainers(this.gameControllers.map(function(d1){return d1.container.container}).filter(function(d1){return!Za(d1.controls)})),this._options.lastFrame&&this.animation.addFn(function(){var d1;_this.player&&((d1=_this.lastFrame)==null||d1.onEachTick(_this.player.info.position$.getValue()*1e3))},!0),this.state.interactiveRanges$.next(this.getInteractiveRanges()),this.appState=2)}},{key:"filterGameControllers",value:function filterGameControllers(e){var _this=this;var i=[];return e.containers.forEach(function(c){var d1=c.type.trim().toLowerCase(),l=_this.factories.get(d1);if(l){var m=new Wa({player:_this.player,container:l(c,_this.rootElement),branches:e.branches,selectBranches:_this.selectBranches,interactiveEvents:_this.interactiveEvents,globalEvents:_this.events,globalEventEmitter:_this.globalEventEmitter,ignoreContainerEvent:function(){return WE(c,_this.gameControllers)},permanentTextControls:_this._options.permanentTextControls,disabledControls$:_this.state.disabledControls$,onRemove:function(){_this.seekToInteractiveController.deleteContainer(c.id)}});_this.animation.addFn(m.whilePlaying,!0),i.push(m)}}),i}},{key:"checkIfSeekable",value:function checkIfSeekable(){if(this.state.isInteractiveExpectation$.getValue()){this.state.isSeekable$.next(!1);return}var i=this.state.isSeekable$.getValue(),c=!!this.seekToInteractiveController.getNextInteractiveTime();(c&&!i||!c&&i)&&this.state.isSeekable$.next(!i)}},{key:"updateLastEventInfo",value:function updateLastEventInfo(){this.state.calledByInteractive$.getValue()?this.state.calledByInteractive$.next(!1):this.state.lastChapterChangeWasInitiatedByInteractive$.next(!1)}},{key:"pushChapterToHistory",value:function pushChapterToHistory(e){var v,g;if(this.updateLastEventInfo(),!this.historyController.inited)return;var i=this.state.lastChapterChangeWasInitiatedByInteractive$.getValue(),c=this.state.prevChapter$.getValue(),d1=(v=c&&ze(c)&&Fo(c))!=null?v:!1,l=((g=this.manifestController.manifest)==null?void 0:g.metadata.initChapterId)===e,m=this.historyController.state.history$.getValue();if(l||d1&&i){this.historyController.updateHistory([e]);return}m.at(-1)!==e&&this.historyController.updateHistory(_to_consumable_array(m).concat([e]))}},{key:"reset",value:function reset(){var e;this.appState===2&&(this.removeControllers(),this.gameControllers=[],this.animation.release(),(e=this.interactiveEvents)==null||e.release(),this.appState=1,this.state.isSeekable$.next(!1),this.clearNoInteractionTimeout())}},{key:"options",get:function get(){return this._options}},{key:"init",value:function init(){var e;this.manifestController.chapter&&this._options.parentElement&&this.player&&this._options.fullscreenTargetElement&&this.appState===0&&((e=this.resizeManager)==null||e.resizeObserver.observe(this._options.fullscreenTargetElement),this.registerVideoEvents(),this.appState=1,this.setGameControllers())}},{key:"setManifest",value:function setManifest(e){return Tt(this,null,function(){var i,_tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:this.reset(),this.isFirstChapterFetched=!1;return[4,this.manifestController.setManifest(e)];case 1:i=_state.sent();if(!i.manifest)return[3,5];_tmp=this.graph;if(!_tmp)return[3,3];return[4,this.graph.handleManifestChange(i.manifest)];case 2:_tmp=_state.sent();_state.label=3;case 3:_tmp;return[4,this.historyController.setManifest(i.manifest)];case 4:return[2,(_state.sent(),this.globalEventEmitter.emit(dt.manifestChanged,{manifest:i.manifest}),this.setGameControllers(),i.manifest)];case 5:return[2]}})})}},{key:"setPlayer",value:function setPlayer(e){var _this=this;this.reset(),this.player=e,this.seekToInteractiveController.setPlayer(this.player),this.interactiveEvents?this.interactiveEvents.setPlayer(this.player):this.interactiveEvents=QE(this.player),this.selectBranches=uT({player:this.player,interactiveEvents:this.interactiveEvents,globalEventEmitter:this.globalEventEmitter,removeControllers:function(){return _this.removeControllers(!1)}}),this.appState===1&&(this.registerVideoEvents(),this.setGameControllers())}},{key:"setChapter",value:function setChapter(){return Tt(this,arguments,function(){var _ref,e,tmp,i,tmp1,c,g,S,_tmp,d1,_ref1,l,m,v;var _arguments=arguments;return _ts_generator(this,function(_state){switch(_state.label){case 0:_ref=_arguments.length>0&&_arguments[0]!==void 0?_arguments[0]:{},e=_ref.chapterId,tmp=_ref.pushToHistory,i=tmp===void 0?!0:tmp,tmp1=_ref.playPrev,c=tmp1===void 0?!1:tmp1;this.reset(),this.lastFrame&&this.isFirstChapterFetched&&(this.lastFrame.draw(),this.lastFrame.show());_tmp=TE.isSafari;if(!_tmp)return[3,2];return[4,fT(35)];case 1:_tmp=_state.sent();_state.label=2;case 2:_tmp;d1=!c&&this.state.isEndChapter$.getValue()&&((g=this.getCurrentManifest())==null?void 0:g.metadata.initChapterId)===e;this.state.isReplay$.next(d1);return[4,e?this.manifestController.setNext(e):this.manifestController.setInitial()];case 3:_ref1=_state.sent(),l=_ref1.chapter,m=_ref1.media,v=_ref1.graph;(!e||d1)&&this.state.isFirstChapter$.next(!0),!(!l||!m)&&(i&&this.pushChapterToHistory(l.id),this.state.isInitialChapter$.next(this.manifestController.isInitialChapter()),this.state.isEndChapter$.next(this.manifestController.isEndChapter()),this.graph&&this.graph.handleChapterChange(l),(S=this.lastFrame)==null||S.setCurrentChapter(l),this.events.chapterChanged$.next({chapter:l,manifestVideo:m}),this.globalEventEmitter.emit(dt.chapterChanged,{chapter:l,media:m,graph:v}),this.setGameControllers(),this.endedRanges=new Set,this.isFirstChapterFetched=!0);return[2]}})})}},{key:"getStatEvents",value:function getStatEvents(){var _this=this;return{click$:new Mr(function(e){_this.globalEventEmitter.on(dt.graph,function(param){var i=param.type,c=param.visibility;i==="visibility"&&e.next(c?Br.InteractiveInterfaceClick.GRAPH_SHOW:Br.InteractiveInterfaceClick.GRAPH_HIDE),i==="watchAgainClicked"&&e.next(Br.InteractiveInterfaceClick.WATCH_AGAIN)}),_this.globalEventEmitter.on(dt.interactives,function(param){var i=param.type,c=param.subjectName,d1=param.subjectType;i!=="action-choice"||c!=="control"||(d1==="Button"&&e.next(Br.InteractiveInterfaceClick.NEXT_BUTTON),d1==="Area"&&e.next(Br.InteractiveInterfaceClick.NEXT_AREA))})}),nextMovie$:new Mr(function(e){_this.globalEventEmitter.on(dt.playerChanged,function(param){var i=param.config;i!=null&&i.unitedVideoId&&!_this.state.isFirstChapter$.getValue()&&e.next(i.unitedVideoId)})})}}},{key:"toggleGraphView",value:function toggleGraphView(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.graph&&(e?(this.graph.show(),this.state.isSeekable$.next(!1)):(this.graph.hide(),this.checkIfSeekable()),this.globalEventEmitter.emit(dt.graph,{type:Dr.visibility,visibility:e}),this.events.graphVisibilityChanged$.next(e))}},{key:"setVisitedChapters",value:function setVisitedChapters(e){var i;Array.isArray(e)&&((i=this.graph)==null||i.setVisitedChapters(e))}},{key:"updateGraphVideosInfo",value:function updateGraphVideosInfo(e){var i;Array.isArray(e)&&((i=this.graph)==null||i.updateVideosInfo(e))}},{key:"deadEndCheck",value:function deadEndCheck(){var c;return!(((c=this.interactiveEvents)==null?void 0:c.getPreparedToExecActions())||[]).some(function(d1){return d1.actionType===Mt.setNextBranch})}},{key:"allControlsAreRemoved",value:function allControlsAreRemoved(){return!this.gameControllers.some(function(i){return!i.container.isRemoved})}},{key:"isEndedExpectation",value:function isEndedExpectation(){if(!this.player||!this.gameControllers)return!1;var e=this.player.info.position$.getValue(),i=this.player.info.duration$.getValue();return e===i&&this.gameControllers.some(function(c){var d1=c.container.container;return!c.container.isRemoved&&d1.endTime===null&&Xn(d1.events)})}},{key:"playPrevChapter",value:function playPrevChapter(){this.historyController.goBack()}},{key:"setDisabledControls",value:function setDisabledControls(e){this.state.disabledControls$.next(e)}},{key:"isSupport",value:function isSupport(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.manifestController.manifest;return!!e&&Uo(e.metadata.version)}},{key:"getInitialVideoInfo",value:function getInitialVideoInfo(){return{videoId:this.historyController.getInitialVideoId(),chapterId:this.historyController.getInitialChapterId()}}},{key:"getHistoryState",value:function getHistoryState(){return this.historyController.state}},{key:"getIsSeekable",value:function getIsSeekable(){return this.state.isSeekable$}},{key:"getInteractiveRanges",value:function getInteractiveRanges(){var e;return KE((e=this.manifestController.chapter)==null?void 0:e.containers)}},{key:"getNextInteractiveStartTime",value:function getNextInteractiveStartTime(e){return this.seekToInteractiveController.getNextInteractiveTime(e)}},{key:"getChapterBranches",value:function getChapterBranches(e){return this.manifestController.getBranches(e)}},{key:"getCurrentChapter",value:function getCurrentChapter(){return this.manifestController.getCurrent()}},{key:"getCurrentManifest",value:function getCurrentManifest(){return this.manifestController.manifest}},{key:"on",value:function on(e,i){return this.globalEventEmitter.on(e,i),this}},{key:"off",value:function off(e,i){return this.globalEventEmitter.off(e,i),this}},{key:"once",value:function once(e,i){return this.globalEventEmitter.once(e,i),this}},{key:"destroy",value:function destroy(){var e,i,c,d1,l;this.clearHistoryIfEnded(),this.removeControllers(),this.gameControllers=[],(e=this.graph)==null||e.destroy(),this.seamlessControllerSubs.unsubscribe(),(i=this.seamlessController)==null||i.removeAll(),(c=this.resizeManager)==null||c.release(),this.animation.release(),(d1=this.interactiveEvents)==null||d1.release(),this.manifestController.release(),this.eventManager.release(),this.subscription.unsubscribe(),this.globalEventEmitter.reset(),(l=this.lastFrame)==null||l.destroy(),this.rootElement.remove(),this.historyController.destroy(),this.isFirstChapterFetched=!1,this.appState=3}}]);return Yo}();var vT={Container:hr,createChoiceContainer:zi,createAreaControl:Bi,createButtonControl:ji,getRootEl:Ni,classnamesPrefix:Ce};var u7={version:Bp};if(__exports!=exports1)module1.exports=exports1;return module1.exports});