You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
158 KiB

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).runworkHelp={})}(this,(function(exports){"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){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 _nonIterableRest(){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 _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var check=function(e){return e&&e.Math==Math&&e},global_1=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),fails=function(e){try{return!!e()}catch(e){return!0}},descriptors=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),functionBindNative=!fails((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),call=Function.prototype.call,functionCall=functionBindNative?call.bind(call):function(){return call.apply(call,arguments)},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor&&!$propertyIsEnumerable.call({1:2},1),f=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable,objectPropertyIsEnumerable={f:f},createPropertyDescriptor=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},FunctionPrototype=Function.prototype,bind=FunctionPrototype.bind,call$1=FunctionPrototype.call,uncurryThis=functionBindNative&&bind.bind(call$1,call$1),functionUncurryThis=functionBindNative?function(e){return e&&uncurryThis(e)}:function(e){return e&&function(){return call$1.apply(e,arguments)}},toString=functionUncurryThis({}.toString),stringSlice=functionUncurryThis("".slice),classofRaw=function(e){return stringSlice(toString(e),8,-1)},Object$1=global_1.Object,split=functionUncurryThis("".split),indexedObject=fails((function(){return!Object$1("z").propertyIsEnumerable(0)}))?function(e){return"String"==classofRaw(e)?split(e,""):Object$1(e)}:Object$1,TypeError$1=global_1.TypeError,requireObjectCoercible=function(e){if(null==e)throw TypeError$1("Can't call method on "+e);return e},toIndexedObject=function(e){return indexedObject(requireObjectCoercible(e))},isCallable=function(e){return"function"==typeof e},isObject=function(e){return"object"==typeof e?null!==e:isCallable(e)},aFunction=function(e){return isCallable(e)?e:void 0},getBuiltIn=function(e,t){return arguments.length<2?aFunction(global_1[e]):global_1[e]&&global_1[e][t]},objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),engineUserAgent=getBuiltIn("navigator","userAgent")||"",process$1=global_1.process,Deno$1=global_1.Deno,versions=process$1&&process$1.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8,match,version;v8&&(match=v8.split("."),version=match[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version&&engineUserAgent&&(match=engineUserAgent.match(/Edge\/(\d+)/),(!match||match[1]>=74)&&(match=engineUserAgent.match(/Chrome\/(\d+)/),match&&(version=+match[1])));var engineV8Version=version,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&engineV8Version&&engineV8Version<41})),useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Object$2=global_1.Object,isSymbol=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn("Symbol");return isCallable(t)&&objectIsPrototypeOf(t.prototype,Object$2(e))},String$1=global_1.String,tryToString=function(e){try{return String$1(e)}catch(e){return"Object"}},TypeError$2=global_1.TypeError,aCallable=function(e){if(isCallable(e))return e;throw TypeError$2(tryToString(e)+" is not a function")},getMethod=function(e,t){var r=e[t];return null==r?void 0:aCallable(r)},TypeError$3=global_1.TypeError,ordinaryToPrimitive=function(e,t){var r,n;if("string"===t&&isCallable(r=e.toString)&&!isObject(n=functionCall(r,e)))return n;if(isCallable(r=e.valueOf)&&!isObject(n=functionCall(r,e)))return n;if("string"!==t&&isCallable(r=e.toString)&&!isObject(n=functionCall(r,e)))return n;throw TypeError$3("Can't convert object to primitive value")},defineProperty=Object.defineProperty,setGlobal=function(e,t){try{defineProperty(global_1,e,{value:t,configurable:!0,writable:!0})}catch(r){global_1[e]=t}return t},SHARED="__core-js_shared__",store=global_1[SHARED]||setGlobal(SHARED,{}),sharedStore=store,shared=createCommonjsModule((function(e){(e.exports=function(e,t){return sharedStore[e]||(sharedStore[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.2",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE",source:"https://github.com/zloirock/core-js"})})),Object$3=global_1.Object,toObject=function(e){return Object$3(requireObjectCoercible(e))},hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject(e),t)},id=0,postfix=Math.random(),toString$1=functionUncurryThis(1..toString),uid=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$1(++id+postfix,36)},WellKnownSymbolsStore=shared("wks"),Symbol$1=global_1.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=useSymbolAsUid?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid,wellKnownSymbol=function(e){if(!hasOwnProperty_1(WellKnownSymbolsStore,e)||!nativeSymbol&&"string"!=typeof WellKnownSymbolsStore[e]){var t="Symbol."+e;nativeSymbol&&hasOwnProperty_1(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=useSymbolAsUid&&symbolFor?symbolFor(t):createWellKnownSymbol(t)}return WellKnownSymbolsStore[e]},TypeError$4=global_1.TypeError,TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),toPrimitive=function(e,t){if(!isObject(e)||isSymbol(e))return e;var r,n=getMethod(e,TO_PRIMITIVE);if(n){if(void 0===t&&(t="default"),r=functionCall(n,e,t),!isObject(r)||isSymbol(r))return r;throw TypeError$4("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive(e,t)},toPropertyKey=function(e){var t=toPrimitive(e,"string");return isSymbol(t)?t:t+""},document$1=global_1.document,EXISTS=isObject(document$1)&&isObject(document$1.createElement),documentCreateElement=function(e){return EXISTS?document$1.createElement(e):{}},ie8DomDefine=!descriptors&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,f$1=descriptors?$getOwnPropertyDescriptor:function(e,t){if(e=toIndexedObject(e),t=toPropertyKey(t),ie8DomDefine)try{return $getOwnPropertyDescriptor(e,t)}catch(e){}if(hasOwnProperty_1(e,t))return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f,e,t),e[t])},objectGetOwnPropertyDescriptor={f:f$1},v8PrototypeDefineBug=descriptors&&fails((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),String$2=global_1.String,TypeError$5=global_1.TypeError,anObject=function(e){if(isObject(e))return e;throw TypeError$5(String$2(e)+" is not an object")},TypeError$6=global_1.TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE="configurable",WRITABLE="writable",f$2=descriptors?v8PrototypeDefineBug?function(e,t,r){if(anObject(e),t=toPropertyKey(t),anObject(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]){var n=$getOwnPropertyDescriptor$1(e,t);n&&n[WRITABLE]&&(e[t]=r.value,r={configurable:CONFIGURABLE in r?r[CONFIGURABLE]:n[CONFIGURABLE],enumerable:ENUMERABLE in r?r[ENUMERABLE]:n[ENUMERABLE],writable:!1})}return $defineProperty(e,t,r)}:$defineProperty:function(e,t,r){if(anObject(e),t=toPropertyKey(t),anObject(r),ie8DomDefine)try{return $defineProperty(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError$6("Accessors not supported");return"value"in r&&(e[t]=r.value),e},objectDefineProperty={f:f$2},createNonEnumerableProperty=descriptors?function(e,t,r){return objectDefineProperty.f(e,t,createPropertyDescriptor(1,r))}:function(e,t,r){return e[t]=r,e},functionToString=functionUncurryThis(Function.toString);isCallable(sharedStore.inspectSource)||(sharedStore.inspectSource=function(e){return functionToString(e)});var inspectSource=sharedStore.inspectSource,WeakMap=global_1.WeakMap,nativeWeakMap=isCallable(WeakMap)&&/native code/.test(inspectSource(WeakMap)),keys=shared("keys"),sharedKey=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys={},OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$7=global_1.TypeError,WeakMap$1=global_1.WeakMap,set,get,has,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(e){return function(t){var r;if(!isObject(t)||(r=get(t)).type!==e)throw TypeError$7("Incompatible receiver, "+e+" required");return r}};if(nativeWeakMap||sharedStore.state){var store$1=sharedStore.state||(sharedStore.state=new WeakMap$1),wmget=functionUncurryThis(store$1.get),wmhas=functionUncurryThis(store$1.has),wmset=functionUncurryThis(store$1.set);set=function(e,t){if(wmhas(store$1,e))throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store$1,e,t),t},get=function(e){return wmget(store$1,e)||{}},has=function(e){return wmhas(store$1,e)}}else{var STATE=sharedKey("state");hiddenKeys[STATE]=!0,set=function(e,t){if(hasOwnProperty_1(e,STATE))throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty(e,STATE,t),t},get=function(e){return hasOwnProperty_1(e,STATE)?e[STATE]:{}},has=function(e){return hasOwnProperty_1(e,STATE)}}var internalState={set:set,get:get,has:has,enforce:enforce,getterFor:getterFor},FunctionPrototype$1=Function.prototype,getDescriptor=descriptors&&Object.getOwnPropertyDescriptor,EXISTS$1=hasOwnProperty_1(FunctionPrototype$1,"name"),PROPER=EXISTS$1&&"something"===function(){}.name,CONFIGURABLE$1=EXISTS$1&&(!descriptors||descriptors&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS$1,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE$1},redefine=createCommonjsModule((function(e){var t=functionName.CONFIGURABLE,r=internalState.get,n=internalState.enforce,o=String(String).split("String");(e.exports=function(e,r,i,a){var s,c=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet,p=a&&void 0!==a.name?a.name:r;isCallable(i)&&("Symbol("===String(p).slice(0,7)&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!hasOwnProperty_1(i,"name")||t&&i.name!==p)&&createNonEnumerableProperty(i,"name",p),(s=n(i)).source||(s.source=o.join("string"==typeof p?p:""))),e!==global_1?(c?!l&&e[r]&&(u=!0):delete e[r],u?e[r]=i:createNonEnumerableProperty(e,r,i)):u?e[r]=i:setGlobal(r,i)})(Function.prototype,"toString",(function(){return isCallable(this)&&r(this).source||inspectSource(this)}))})),ceil=Math.ceil,floor=Math.floor,toIntegerOrInfinity=function(e){var t=+e;return t!=t||0===t?0:(t>0?floor:ceil)(t)},max=Math.max,min=Math.min,toAbsoluteIndex=function(e,t){var r=toIntegerOrInfinity(e);return r<0?max(r+t,0):min(r,t)},min$1=Math.min,toLength=function(e){return e>0?min$1(toIntegerOrInfinity(e),9007199254740991):0},lengthOfArrayLike=function(e){return toLength(e.length)},createMethod=function(e){return function(t,r,n){var o,i=toIndexedObject(t),a=lengthOfArrayLike(i),s=toAbsoluteIndex(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},indexOf=arrayIncludes.indexOf,push=functionUncurryThis([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject(e),o=0,i=[];for(r in n)!hasOwnProperty_1(hiddenKeys,r)&&hasOwnProperty_1(n,r)&&push(i,r);for(;t.length>o;)hasOwnProperty_1(n,r=t[o++])&&(~indexOf(i,r)||push(i,r));return i},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys$1=enumBugKeys.concat("length","prototype"),f$3=Object.getOwnPropertyNames||function(e){return objectKeysInternal(e,hiddenKeys$1)},objectGetOwnPropertyNames={f:f$3},f$4=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$4},concat=functionUncurryThis([].concat),ownKeys=getBuiltIn("Reflect","ownKeys")||function(e){var t=objectGetOwnPropertyNames.f(anObject(e)),r=objectGetOwnPropertySymbols.f;return r?concat(t,r(e)):t},copyConstructorProperties=function(e,t,r){for(var n=ownKeys(t),o=objectDefineProperty.f,i=objectGetOwnPropertyDescriptor.f,a=0;a<n.length;a++){var s=n[a];hasOwnProperty_1(e,s)||r&&hasOwnProperty_1(r,s)||o(e,s,i(t,s))}},replacement=/#|\.prototype\./,isForced=function(e,t){var r=data[normalize(e)];return r==POLYFILL||r!=NATIVE&&(isCallable(t)?fails(t):!!t)},normalize=isForced.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced.data={},NATIVE=isForced.NATIVE="N",POLYFILL=isForced.POLYFILL="P",isForced_1=isForced,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,_export=function(e,t){var r,n,o,i,a,s=e.target,c=e.global,u=e.stat;if(r=c?global_1:u?global_1[s]||setGlobal(s,{}):(global_1[s]||{}).prototype)for(n in t){if(i=t[n],o=e.noTargetGet?(a=getOwnPropertyDescriptor$1(r,n))&&a.value:r[n],!isForced_1(c?n:s+(u?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;copyConstructorProperties(i,o)}(e.sham||o&&o.sham)&&createNonEnumerableProperty(i,"sham",!0),redefine(r,n,i,e)}},objectKeys=Object.keys||function(e){return objectKeysInternal(e,enumBugKeys)},$assign=Object.assign,defineProperty$1=Object.defineProperty,concat$1=functionUncurryThis([].concat),objectAssign=!$assign||fails((function(){if(descriptors&&1!==$assign({b:1},$assign(defineProperty$1({},"a",{enumerable:!0,get:function(){defineProperty$1(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=$assign({},e)[r]||"abcdefghijklmnopqrst"!=objectKeys($assign({},t)).join("")}))?function(e,t){for(var r=toObject(e),n=arguments.length,o=1,i=objectGetOwnPropertySymbols.f,a=objectPropertyIsEnumerable.f;n>o;)for(var s,c=indexedObject(arguments[o++]),u=i?concat$1(objectKeys(c),i(c)):objectKeys(c),l=u.length,p=0;l>p;)s=u[p++],descriptors&&!functionCall(a,c,s)||(r[s]=c[s]);return r}:$assign;_export({target:"Object",stat:!0,forced:Object.assign!==objectAssign},{assign:objectAssign});var isArray=Array.isArray||function(e){return"Array"==classofRaw(e)},createProperty=function(e,t,r){var n=toPropertyKey(t);n in e?objectDefineProperty.f(e,n,createPropertyDescriptor(0,r)):e[n]=r},TO_STRING_TAG=wellKnownSymbol("toStringTag"),test={};test[TO_STRING_TAG]="z";var toStringTagSupport="[object z]"===String(test),TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),Object$4=global_1.Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof=toStringTagSupport?classofRaw:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=Object$4(e),TO_STRING_TAG$1))?r:CORRECT_ARGUMENTS?classofRaw(t):"Object"==(n=classofRaw(t))&&isCallable(t.callee)?"Arguments":n},noop=function(){},empty=[],construct=getBuiltIn("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=functionUncurryThis(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable(e))return!1;try{return construct(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable(e))return!1;switch(classof(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec(constructorRegExp,inspectSource(e))}catch(e){return!0}};isConstructorLegacy.sham=!0;var isConstructor=!construct||fails((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,SPECIES=wellKnownSymbol("species"),Array$1=global_1.Array,arraySpeciesConstructor=function(e){var t;return isArray(e)&&(t=e.constructor,(isConstructor(t)&&(t===Array$1||isArray(t.prototype))||isObject(t)&&null===(t=t[SPECIES]))&&(t=void 0)),void 0===t?Array$1:t},arraySpeciesCreate=function(e,t){return new(arraySpeciesConstructor(e))(0===t?0:t)},SPECIES$1=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(e){return engineV8Version>=51||!fails((function(){var t=[];return(t.constructor={})[SPECIES$1]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),MAX_SAFE_INTEGER=9007199254740991,MAXIMUM_ALLOWED_INDEX_EXCEEDED="Maximum allowed index exceeded",TypeError$8=global_1.TypeError,IS_CONCAT_SPREADABLE_SUPPORT=engineV8Version>=51||!fails((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(e){if(!isObject(e))return!1;var t=e[IS_CONCAT_SPREADABLE];return void 0!==t?!!t:isArray(e)},FORCED=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;_export({target:"Array",proto:!0,forced:FORCED},{concat:function(e){var t,r,n,o,i,a=toObject(this),s=arraySpeciesCreate(a,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable(i=-1===t?a:arguments[t])){if(c+(o=lengthOfArrayLike(i))>MAX_SAFE_INTEGER)throw TypeError$8(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(r=0;r<o;r++,c++)r in i&&createProperty(s,c,i[r])}else{if(c>=MAX_SAFE_INTEGER)throw TypeError$8(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(s,c++,i)}return s.length=c,s}});var String$3=global_1.String,toString_1=function(e){if("Symbol"===classof(e))throw TypeError("Cannot convert a Symbol value to a string");return String$3(e)},regexpFlags=function(){var e=anObject(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},$RegExp=global_1.RegExp,UNSUPPORTED_Y=fails((function(){var e=$RegExp("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),MISSED_STICKY=UNSUPPORTED_Y||fails((function(){return!$RegExp("a","y").sticky})),BROKEN_CARET=UNSUPPORTED_Y||fails((function(){var e=$RegExp("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y},f$5=descriptors&&!v8PrototypeDefineBug?Object.defineProperties:function(e,t){anObject(e);for(var r,n=toIndexedObject(t),o=objectKeys(t),i=o.length,a=0;i>a;)objectDefineProperty.f(e,r=o[a++],n[r]);return e},objectDefineProperties={f:f$5},html=getBuiltIn("document","documentElement"),GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e,t=documentCreateElement("iframe"),r="java"+SCRIPT+":";return t.style.display="none",html.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()};hiddenKeys[IE_PROTO]=!0;var objectCreate=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,r[IE_PROTO]=e):r=NullProtoObject(),void 0===t?r:objectDefineProperties.f(r,t)},$RegExp$1=global_1.RegExp,regexpUnsupportedDotAll=fails((function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),$RegExp$2=global_1.RegExp,regexpUnsupportedNcg=fails((function(){var e=$RegExp$2("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),getInternalState=internalState.get,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt=functionUncurryThis("".charAt),indexOf$1=functionUncurryThis("".indexOf),replace=functionUncurryThis("".replace),stringSlice$1=functionUncurryThis("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return functionCall(nativeExec,e,"a"),functionCall(nativeExec,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),UNSUPPORTED_Y$1=regexpStickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y$1||regexpUnsupportedDotAll||regexpUnsupportedNcg;PATCH&&(patchedExec=function(e){var t,r,n,o,i,a,s,c=this,u=getInternalState(c),l=toString_1(e),p=u.raw;if(p)return p.lastIndex=c.lastIndex,t=functionCall(patchedExec,p,l),c.lastIndex=p.lastIndex,t;var f=u.groups,d=UNSUPPORTED_Y$1&&c.sticky,h=functionCall(regexpFlags,c),g=c.source,y=0,v=l;if(d&&(h=replace(h,"y",""),-1===indexOf$1(h,"g")&&(h+="g"),v=stringSlice$1(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==charAt(l,c.lastIndex-1))&&(g="(?: "+g+")",v=" "+v,y++),r=new RegExp("^(?:"+g+")",h)),NPCG_INCLUDED&&(r=new RegExp("^"+g+"$(?!\\s)",h)),UPDATES_LAST_INDEX_WRONG&&(n=c.lastIndex),o=functionCall(nativeExec,d?r:c,v),d?o?(o.input=stringSlice$1(o.input,y),o[0]=stringSlice$1(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),NPCG_INCLUDED&&o&&o.length>1&&functionCall(nativeReplace,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&f)for(o.groups=a=objectCreate(null),i=0;i<f.length;i++)a[(s=f[i])[0]]=o[s[1]];return o});var regexpExec=patchedExec;_export({target:"RegExp",proto:!0,forced:/./.exec!==regexpExec},{exec:regexpExec});var FunctionPrototype$2=Function.prototype,apply=FunctionPrototype$2.apply,call$2=FunctionPrototype$2.call,functionApply="object"==typeof Reflect&&Reflect.apply||(functionBindNative?call$2.bind(apply):function(){return call$2.apply(apply,arguments)}),SPECIES$2=wellKnownSymbol("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(e,t,r,n){var o=wellKnownSymbol(e),i=!fails((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!fails((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[SPECIES$2]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var s=functionUncurryThis(/./[o]),c=t(o,""[e],(function(e,t,r,n,o){var a=functionUncurryThis(e),c=t.exec;return c===regexpExec||c===RegExpPrototype.exec?i&&!o?{done:!0,value:s(t,r,n)}:{done:!0,value:a(r,t,n)}:{done:!1}}));redefine(String.prototype,e,c[0]),redefine(RegExpPrototype,o,c[1])}n&&createNonEnumerableProperty(RegExpPrototype[o],"sham",!0)},charAt$1=functionUncurryThis("".charAt),charCodeAt=functionUncurryThis("".charCodeAt),stringSlice$2=functionUncurryThis("".slice),createMethod$1=function(e){return function(t,r){var n,o,i=toString_1(requireObjectCoercible(t)),a=toIntegerOrInfinity(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=charCodeAt(i,a))<55296||n>56319||a+1===s||(o=charCodeAt(i,a+1))<56320||o>57343?e?charAt$1(i,a):n:e?stringSlice$2(i,a,a+2):o-56320+(n-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$1(!1),charAt:createMethod$1(!0)},charAt$2=stringMultibyte.charAt,advanceStringIndex=function(e,t,r){return t+(r?charAt$2(e,t).length:1)},floor$1=Math.floor,charAt$3=functionUncurryThis("".charAt),replace$1=functionUncurryThis("".replace),stringSlice$3=functionUncurryThis("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution=function(e,t,r,n,o,i){var a=r+e.length,s=n.length,c=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==o&&(o=toObject(o),c=SUBSTITUTION_SYMBOLS),replace$1(i,c,(function(i,c){var u;switch(charAt$3(c,0)){case"$":return"$";case"&":return e;case"`":return stringSlice$3(t,0,r);case"'":return stringSlice$3(t,a);case"<":u=o[stringSlice$3(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>s){var p=floor$1(l/10);return 0===p?i:p<=s?void 0===n[p-1]?charAt$3(c,1):n[p-1]+charAt$3(c,1):i}u=n[l-1]}return void 0===u?"":u}))},TypeError$9=global_1.TypeError,regexpExecAbstract=function(e,t){var r=e.exec;if(isCallable(r)){var n=functionCall(r,e,t);return null!==n&&anObject(n),n}if("RegExp"===classofRaw(e))return functionCall(regexpExec,e,t);throw TypeError$9("RegExp#exec called on incompatible receiver")},REPLACE=wellKnownSymbol("replace"),max$1=Math.max,min$2=Math.min,concat$2=functionUncurryThis([].concat),push$1=functionUncurryThis([].push),stringIndexOf=functionUncurryThis("".indexOf),stringSlice$4=functionUncurryThis("".slice),maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));fixRegexpWellKnownSymbolLogic("replace",(function(e,t,r){var n=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(e,r){var n=requireObjectCoercible(this),o=null==e?void 0:getMethod(e,REPLACE);return o?functionCall(o,e,n,r):functionCall(t,toString_1(n),e,r)},function(e,o){var i=anObject(this),a=toString_1(e);if("string"==typeof o&&-1===stringIndexOf(o,n)&&-1===stringIndexOf(o,"$<")){var s=r(t,i,a,o);if(s.done)return s.value}var c=isCallable(o);c||(o=toString_1(o));var u=i.global;if(u){var l=i.unicode;i.lastIndex=0}for(var p=[];;){var f=regexpExecAbstract(i,a);if(null===f)break;if(push$1(p,f),!u)break;""===toString_1(f[0])&&(i.lastIndex=advanceStringIndex(a,toLength(i.lastIndex),l))}for(var d="",h=0,g=0;g<p.length;g++){for(var y=toString_1((f=p[g])[0]),v=max$1(min$2(toIntegerOrInfinity(f.index),a.length),0),m=[],b=1;b<f.length;b++)push$1(m,maybeToString(f[b]));var S=f.groups;if(c){var E=concat$2([y],m,v,a);void 0!==S&&push$1(E,S);var _=toString_1(functionApply(o,void 0,E))}else _=getSubstitution(y,a,v,m,S,o);v>=h&&(d+=stringSlice$4(a,h,v)+_,h=v+y.length)}return d+stringSlice$4(a,h)}]}),!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var UNSCOPABLES=wellKnownSymbol("unscopables"),ArrayPrototype=Array.prototype;null==ArrayPrototype[UNSCOPABLES]&&objectDefineProperty.f(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:objectCreate(null)});var addToUnscopables=function(e){ArrayPrototype[UNSCOPABLES][e]=!0},$includes=arrayIncludes.includes;_export({target:"Array",proto:!0},{includes:function(e){return $includes(this,e,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var arrayMethodIsStrict=function(e,t){var r=[][e];return!!r&&fails((function(){r.call(null,t||function(){return 1},1)}))},$IndexOf=arrayIncludes.indexOf,un$IndexOf=functionUncurryThis([].indexOf),NEGATIVE_ZERO=!!un$IndexOf&&1/un$IndexOf([1],1,-0)<0,STRICT_METHOD=arrayMethodIsStrict("indexOf");_export({target:"Array",proto:!0,forced:NEGATIVE_ZERO||!STRICT_METHOD},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO?un$IndexOf(this,e,t)||0:$IndexOf(this,e,t)}});var un$Join=functionUncurryThis([].join),ES3_STRINGS=indexedObject!=Object,STRICT_METHOD$1=arrayMethodIsStrict("join",",");_export({target:"Array",proto:!0,forced:ES3_STRINGS||!STRICT_METHOD$1},{join:function(e){return un$Join(toIndexedObject(this),void 0===e?",":e)}});var objectToString=toStringTagSupport?{}.toString:function(){return"[object "+classof(this)+"]"};toStringTagSupport||redefine(Object.prototype,"toString",objectToString,{unsafe:!0});var engineIsNode="process"==classofRaw(global_1.process),redefineAll=function(e,t,r){for(var n in t)redefine(e,n,t[n],r);return e},String$4=global_1.String,TypeError$a=global_1.TypeError,aPossiblePrototype=function(e){if("object"==typeof e||isCallable(e))return e;throw TypeError$a("Can't set "+String$4(e)+" as a prototype")},objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return anObject(r),aPossiblePrototype(n),t?e(r,n):r.__proto__=n,r}}():void 0),defineProperty$2=objectDefineProperty.f,TO_STRING_TAG$2=wellKnownSymbol("toStringTag"),setToStringTag=function(e,t,r){e&&!r&&(e=e.prototype),e&&!hasOwnProperty_1(e,TO_STRING_TAG$2)&&defineProperty$2(e,TO_STRING_TAG$2,{configurable:!0,value:t})},SPECIES$3=wellKnownSymbol("species"),setSpecies=function(e){var t=getBuiltIn(e),r=objectDefineProperty.f;descriptors&&t&&!t[SPECIES$3]&&r(t,SPECIES$3,{configurable:!0,get:function(){return this}})},TypeError$b=global_1.TypeError,anInstance=function(e,t){if(objectIsPrototypeOf(t,e))return e;throw TypeError$b("Incorrect invocation")},TypeError$c=global_1.TypeError,aConstructor=function(e){if(isConstructor(e))return e;throw TypeError$c(tryToString(e)+" is not a constructor")},SPECIES$4=wellKnownSymbol("species"),speciesConstructor=function(e,t){var r,n=anObject(e).constructor;return void 0===n||null==(r=anObject(n)[SPECIES$4])?t:aConstructor(r)},bind$1=functionUncurryThis(functionUncurryThis.bind),functionBindContext=function(e,t){return aCallable(e),void 0===t?e:functionBindNative?bind$1(e,t):function(){return e.apply(t,arguments)}},arraySlice=functionUncurryThis([].slice),TypeError$d=global_1.TypeError,validateArgumentsLength=function(e,t){if(e<t)throw TypeError$d("Not enough arguments");return e},engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent),set$1=global_1.setImmediate,clear=global_1.clearImmediate,process$2=global_1.process,Dispatch=global_1.Dispatch,Function$1=global_1.Function,MessageChannel=global_1.MessageChannel,String$5=global_1.String,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",location$1,defer,channel,port;try{location$1=global_1.location}catch(e){}var run=function(e){if(hasOwnProperty_1(queue,e)){var t=queue[e];delete queue[e],t()}},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){global_1.postMessage(String$5(e),location$1.protocol+"//"+location$1.host)};set$1&&clear||(set$1=function(e){validateArgumentsLength(arguments.length,1);var t=isCallable(e)?e:Function$1(e),r=arraySlice(arguments,1);return queue[++counter]=function(){functionApply(t,void 0,r)},defer(counter),counter},clear=function(e){delete queue[e]},engineIsNode?defer=function(e){process$2.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!engineIsIos?(channel=new MessageChannel,port=channel.port2,channel.port1.onmessage=listener,defer=functionBindContext(port.postMessage,port)):global_1.addEventListener&&isCallable(global_1.postMessage)&&!global_1.importScripts&&location$1&&"file:"!==location$1.protocol&&!fails(post)?(defer=post,global_1.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in documentCreateElement("script")?function(e){html.appendChild(documentCreateElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task={set:set$1,clear:clear},engineIsIosPebble=/ipad|iphone|ipod/i.test(engineUserAgent)&&void 0!==global_1.Pebble,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(engineUserAgent),getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,macrotask=task.set,MutationObserver=global_1.MutationObserver||global_1.WebKitMutationObserver,document$2=global_1.document,process$3=global_1.process,Promise$1=global_1.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$2(global_1,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,flush,head,last,notify,toggle,node,promise,then;queueMicrotask||(flush=function(){var e,t;for(engineIsNode&&(e=process$3.domain)&&e.exit();head;){t=head.fn,head=head.next;try{t()}catch(e){throw head?notify():last=void 0,e}}last=void 0,e&&e.enter()},engineIsIos||engineIsNode||engineIsWebosWebkit||!MutationObserver||!document$2?!engineIsIosPebble&&Promise$1&&Promise$1.resolve?(promise=Promise$1.resolve(void 0),promise.constructor=Promise$1,then=functionBindContext(promise.then,promise),notify=function(){then(flush)}):engineIsNode?notify=function(){process$3.nextTick(flush)}:(macrotask=functionBindContext(macrotask,global_1),notify=function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify=function(){node.data=toggle=!toggle}));var microtask=queueMicrotask||function(e){var t={fn:e,next:void 0};last&&(last.next=t),head||(head=t,notify()),last=t},hostReportErrors=function(e,t){var r=global_1.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},perform=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Queue=function(){this.head=null,this.tail=null};Queue.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var queue$1=Queue,promiseNativeConstructor=global_1.Promise,engineIsBrowser="object"==typeof window&&"object"!=typeof Deno,NativePromisePrototype=promiseNativeConstructor&&promiseNativeConstructor.prototype,SPECIES$5=wellKnownSymbol("species"),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT=isCallable(global_1.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR=isForced_1("Promise",(function(){var e=inspectSource(promiseNativeConstructor),t=e!==String(promiseNativeConstructor);if(!t&&66===engineV8Version)return!0;if(engineV8Version>=51&&/native code/.test(e))return!1;var r=new promiseNativeConstructor((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[SPECIES$5]=n,!(SUBCLASSING=r.then((function(){}))instanceof n)||!t&&engineIsBrowser&&!NATIVE_PROMISE_REJECTION_EVENT})),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT,SUBCLASSING:SUBCLASSING},PromiseCapability=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable(t),this.reject=aCallable(r)},f$6=function(e){return new PromiseCapability(e)},newPromiseCapability={f:f$6},task$1=task.set,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT$1=promiseConstructorDetection.REJECTION_EVENT,NATIVE_PROMISE_SUBCLASSING=promiseConstructorDetection.SUBCLASSING,getInternalPromiseState=internalState.getterFor(PROMISE),setInternalState=internalState.set,NativePromisePrototype$1=promiseNativeConstructor&&promiseNativeConstructor.prototype,PromiseConstructor=promiseNativeConstructor,PromisePrototype=NativePromisePrototype$1,TypeError$e=global_1.TypeError,document$3=global_1.document,process$4=global_1.process,newPromiseCapability$1=newPromiseCapability.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$3&&document$3.createEvent&&global_1.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,isThenable=function(e){var t;return!(!isObject(e)||!isCallable(t=e.then))&&t},callReaction=function(e,t){var r,n,o,i=t.value,a=t.state==FULFILLED,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(a||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?r=i:(l&&l.enter(),r=s(i),l&&(l.exit(),o=!0)),r===e.promise?u(TypeError$e("Promise-chain cycle")):(n=isThenable(r))?functionCall(n,r,c,u):c(r)):u(i)}catch(e){l&&!o&&l.exit(),u(e)}},notify$1=function(e,t){e.notified||(e.notified=!0,microtask((function(){for(var r,n=e.reactions;r=n.get();)callReaction(r,e);e.notified=!1,t&&!e.rejection&&onUnhandled(e)})))},dispatchEvent=function(e,t,r){var n,o;DISPATCH_EVENT?((n=document$3.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global_1.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT$1&&(o=global_1["on"+e])?o(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(e){functionCall(task$1,global_1,(function(){var t,r=e.facade,n=e.value;if(isUnhandled(e)&&(t=perform((function(){engineIsNode?process$4.emit("unhandledRejection",n,r):dispatchEvent(UNHANDLED_REJECTION,r,n)})),e.rejection=engineIsNode||isUnhandled(e)?UNHANDLED:HANDLED,t.error))throw t.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){functionCall(task$1,global_1,(function(){var t=e.facade;engineIsNode?process$4.emit("rejectionHandled",t):dispatchEvent(REJECTION_HANDLED,t,e.value)}))},bind$2=function(e,t,r){return function(n){e(t,n,r)}},internalReject=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=REJECTED,notify$1(e,!0))},internalResolve=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw TypeError$e("Promise can't be resolved itself");var n=isThenable(t);n?microtask((function(){var r={done:!1};try{functionCall(n,t,bind$2(internalResolve,r,e),bind$2(internalReject,r,e))}catch(t){internalReject(r,t,e)}})):(e.value=t,e.state=FULFILLED,notify$1(e,!1))}catch(t){internalReject({done:!1},t,e)}}};if(FORCED_PROMISE_CONSTRUCTOR$1&&(PromiseConstructor=function(e){anInstance(this,PromisePrototype),aCallable(e),functionCall(Internal,this);var t=getInternalPromiseState(this);try{e(bind$2(internalResolve,t),bind$2(internalReject,t))}catch(e){internalReject(t,e)}},PromisePrototype=PromiseConstructor.prototype,Internal=function(e){setInternalState(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new queue$1,rejection:!1,state:PENDING,value:void 0})},Internal.prototype=redefineAll(PromisePrototype,{then:function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor(this,PromiseConstructor));return r.parent=!0,n.ok=!isCallable(e)||e,n.fail=isCallable(t)&&t,n.domain=engineIsNode?process$4.domain:void 0,r.state==PENDING?r.reactions.add(n):microtask((function(){callReaction(n,r)})),n.promise}}),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$2(internalResolve,t),this.reject=bind$2(internalReject,t)},newPromiseCapability.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable(promiseNativeConstructor)&&NativePromisePrototype$1!==Object.prototype)){nativeThen=NativePromisePrototype$1.then,NATIVE_PROMISE_SUBCLASSING||redefine(NativePromisePrototype$1,"then",(function(e,t){var r=this;return new PromiseConstructor((function(e,t){functionCall(nativeThen,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete NativePromisePrototype$1.constructor}catch(e){}objectSetPrototypeOf&&objectSetPrototypeOf(NativePromisePrototype$1,PromisePrototype)}_export({global:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE);var iterators={},ITERATOR=wellKnownSymbol("iterator"),ArrayPrototype$1=Array.prototype,isArrayIteratorMethod=function(e){return void 0!==e&&(iterators.Array===e||ArrayPrototype$1[ITERATOR]===e)},ITERATOR$1=wellKnownSymbol("iterator"),getIteratorMethod=function(e){if(null!=e)return getMethod(e,ITERATOR$1)||getMethod(e,"@@iterator")||iterators[classof(e)]},TypeError$f=global_1.TypeError,getIterator=function(e,t){var r=arguments.length<2?getIteratorMethod(e):t;if(aCallable(r))return anObject(functionCall(r,e));throw TypeError$f(tryToString(e)+" is not iterable")},iteratorClose=function(e,t,r){var n,o;anObject(e);try{if(!(n=getMethod(e,"return"))){if("throw"===t)throw r;return r}n=functionCall(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return anObject(n),r},TypeError$g=global_1.TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate=function(e,t,r){var n,o,i,a,s,c,u,l=r&&r.that,p=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),h=functionBindContext(t,l),g=function(e){return n&&iteratorClose(n,"normal",e),new Result(!0,e)},y=function(e){return p?(anObject(e),d?h(e[0],e[1],g):h(e[0],e[1])):d?h(e,g):h(e)};if(f)n=e;else{if(!(o=getIteratorMethod(e)))throw TypeError$g(tryToString(e)+" is not iterable");if(isArrayIteratorMethod(o)){for(i=0,a=lengthOfArrayLike(e);a>i;i++)if((s=y(e[i]))&&objectIsPrototypeOf(ResultPrototype,s))return s;return new Result(!1)}n=getIterator(e,o)}for(c=n.next;!(u=functionCall(c,n)).done;){try{s=y(u.value)}catch(e){iteratorClose(n,"throw",e)}if("object"==typeof s&&s&&objectIsPrototypeOf(ResultPrototype,s))return s}return new Result(!1)},ITERATOR$2=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$2]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var r=!1;try{var n={};n[ITERATOR$2]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$2||!checkCorrectnessOfIteration((function(e){promiseNativeConstructor.all(e).then(void 0,(function(){}))}));_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{all:function(e){var t=this,r=newPromiseCapability.f(t),n=r.resolve,o=r.reject,i=perform((function(){var r=aCallable(t.resolve),i=[],a=0,s=1;iterate(e,(function(e){var c=a++,u=!1;s++,functionCall(r,t,e).then((function(e){u||(u=!0,i[c]=e,--s||n(i))}),o)})),--s||n(i)}));return i.error&&o(i.value),r.promise}});var FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,NativePromisePrototype$2=promiseNativeConstructor&&promiseNativeConstructor.prototype;if(_export({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$3,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable(promiseNativeConstructor)){var method=getBuiltIn("Promise").prototype.catch;NativePromisePrototype$2.catch!==method&&redefine(NativePromisePrototype$2,"catch",method,{unsafe:!0})}_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{race:function(e){var t=this,r=newPromiseCapability.f(t),n=r.reject,o=perform((function(){var o=aCallable(t.resolve);iterate(e,(function(e){functionCall(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var FORCED_PROMISE_CONSTRUCTOR$4=promiseConstructorDetection.CONSTRUCTOR;_export({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{reject:function(e){var t=newPromiseCapability.f(this);return functionCall(t.reject,void 0,e),t.promise}});var promiseResolve=function(e,t){if(anObject(e),isObject(t)&&t.constructor===e)return t;var r=newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},FORCED_PROMISE_CONSTRUCTOR$5=promiseConstructorDetection.CONSTRUCTOR,PromiseConstructorWrapper=getBuiltIn("Promise");_export({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$5},{resolve:function(e){return promiseResolve(this,e)}});var DatePrototype=Date.prototype,INVALID_DATE="Invalid Date",TO_STRING="toString",un$DateToString=functionUncurryThis(DatePrototype[TO_STRING]),getTime=functionUncurryThis(DatePrototype.getTime);String(new Date(NaN))!=INVALID_DATE&&redefine(DatePrototype,TO_STRING,(function(){var e=getTime(this);return e==e?un$DateToString(this):INVALID_DATE}));var runtime=createCommonjsModule((function(e){!function(t){var r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag",c=t.regeneratorRuntime;if(c)e.exports=c;else{(c=t.regeneratorRuntime=e.exports).wrap=h;var u={},l={};l[i]=function(){return this};var p=Object.getPrototypeOf,f=p&&p(p(O([])));f&&f!==r&&n.call(f,i)&&(l=f);var d=m.prototype=y.prototype=Object.create(l);v.prototype=d.constructor=m,m.constructor=v,m[s]=v.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(d),e},c.awrap=function(e){return{__await:e}},b(S.prototype),S.prototype[a]=function(){return this},c.AsyncIterator=S,c.async=function(e,t,r,n){var o=new S(h(e,t,r,n));return c.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(d),d[s]="Generator",d[i]=function(){return this},d.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},c.values=O,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}}}function h(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),a=new I(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return R()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===u)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=g(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function g(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function y(){}function v(){}function m(){}function b(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function S(e){var t;this._invoke=function(r,o){function i(){return new Promise((function(t,i){!function t(r,o,i,a){var s=g(e[r],e,o);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&n.call(u,"__await")?Promise.resolve(u.__await).then((function(e){t("next",e,i,a)}),(function(e){t("throw",e,i,a)})):Promise.resolve(u).then((function(e){c.value=e,i(c)}),a)}a(s.arg)}(r,o,t,i)}))}return t=t?t.then(i,i):i()}}function E(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=g(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:R}}function R(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function __awaiter(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}var bind$3=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},toString$2=Object.prototype.toString;function isArray$1(e){return"[object Array]"===toString$2.call(e)}function isUndefined(e){return void 0===e}function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function isArrayBuffer(e){return"[object ArrayBuffer]"===toString$2.call(e)}function isFormData(e){return"undefined"!=typeof FormData&&e instanceof FormData}function isArrayBufferView(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function isString(e){return"string"==typeof e}function isNumber(e){return"number"==typeof e}function isObject$1(e){return null!==e&&"object"==typeof e}function isDate(e){return"[object Date]"===toString$2.call(e)}function isFile(e){return"[object File]"===toString$2.call(e)}function isBlob(e){return"[object Blob]"===toString$2.call(e)}function isFunction(e){return"[object Function]"===toString$2.call(e)}function isStream(e){return isObject$1(e)&&isFunction(e.pipe)}function isURLSearchParams(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function trim(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function isStandardBrowserEnv(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function forEach(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),isArray$1(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}function merge(){var e={};function t(t,r){"object"==typeof e[r]&&"object"==typeof t?e[r]=merge(e[r],t):e[r]=t}for(var r=0,n=arguments.length;r<n;r++)forEach(arguments[r],t);return e}function deepMerge(){var e={};function t(t,r){"object"==typeof e[r]&&"object"==typeof t?e[r]=deepMerge(e[r],t):e[r]="object"==typeof t?deepMerge({},t):t}for(var r=0,n=arguments.length;r<n;r++)forEach(arguments[r],t);return e}function extend(e,t,r){return forEach(t,(function(t,n){e[n]=r&&"function"==typeof t?bind$3(t,r):t})),e}var utils={isArray:isArray$1,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isObject:isObject$1,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isStandardBrowserEnv:isStandardBrowserEnv,forEach:forEach,merge:merge,deepMerge:deepMerge,extend:extend,trim:trim};function encode(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var buildURL=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(utils.isURLSearchParams(t))n=t.toString();else{var o=[];utils.forEach(t,(function(e,t){null!=e&&(utils.isArray(e)?t+="[]":e=[e],utils.forEach(e,(function(e){utils.isDate(e)?e=e.toISOString():utils.isObject(e)&&(e=JSON.stringify(e)),o.push(encode(t)+"="+encode(e))})))})),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e};function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},InterceptorManager.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},InterceptorManager.prototype.forEach=function(e){utils.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var InterceptorManager_1=InterceptorManager,transformData=function(e,t,r){return utils.forEach(r,(function(r){e=r(e,t)})),e},isCancel=function(e){return!(!e||!e.__CANCEL__)},normalizeHeaderName=function(e,t){utils.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},enhanceError=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e},createError=function(e,t,r,n,o){var i=new Error(e);return enhanceError(i,t,r,n,o)},settle=function(e,t,r){var n=r.config.validateStatus;!n||n(r.status)?e(r):t(createError("Request failed with status code "+r.status,r.config,null,r.request,r))},isAbsoluteURL=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)},combineURLs=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},buildFullPath=function(e,t){return e&&!isAbsoluteURL(t)?combineURLs(e,t):t},ignoreDuplicateOf=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],parseHeaders=function(e){var t,r,n,o={};return e?(utils.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=utils.trim(e.substr(0,n)).toLowerCase(),r=utils.trim(e.substr(n+1)),t){if(o[t]&&ignoreDuplicateOf.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}})),o):o},isURLSameOrigin=utils.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=utils.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0},cookies=utils.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),utils.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),utils.isString(n)&&a.push("path="+n),utils.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},xhr=function(e){return new Promise((function(t,r){var n=e.data,o=e.headers;utils.isFormData(n)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(e.auth){var a=e.auth.username||"",s=e.auth.password||"";o.Authorization="Basic "+btoa(a+":"+s)}var c=buildFullPath(e.baseURL,e.url);if(i.open(e.method.toUpperCase(),buildURL(c,e.params,e.paramsSerializer),!0),i.timeout=e.timeout,i.onreadystatechange=function(){if(i&&4===i.readyState&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in i?parseHeaders(i.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?i.response:i.responseText,status:i.status,statusText:i.statusText,headers:n,config:e,request:i};settle(t,r,o),i=null}},i.onabort=function(){i&&(r(createError("Request aborted",e,"ECONNABORTED",i)),i=null)},i.onerror=function(){r(createError("Network Error",e,null,i)),i=null},i.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(createError(t,e,"ECONNABORTED",i)),i=null},utils.isStandardBrowserEnv()){var u=cookies,l=(e.withCredentials||isURLSameOrigin(c))&&e.xsrfCookieName?u.read(e.xsrfCookieName):void 0;l&&(o[e.xsrfHeaderName]=l)}if("setRequestHeader"in i&&utils.forEach(o,(function(e,t){void 0===n&&"content-type"===t.toLowerCase()?delete o[t]:i.setRequestHeader(t,e)})),utils.isUndefined(e.withCredentials)||(i.withCredentials=!!e.withCredentials),e.responseType)try{i.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&i.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&i.upload&&i.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){i&&(i.abort(),r(e),i=null)})),void 0===n&&(n=null),i.send(n)}))},DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!utils.isUndefined(e)&&utils.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function getDefaultAdapter(){var e;return("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=xhr),e}var defaults={adapter:getDefaultAdapter(),transformRequest:[function(e,t){return normalizeHeaderName(t,"Accept"),normalizeHeaderName(t,"Content-Type"),utils.isFormData(e)||utils.isArrayBuffer(e)||utils.isBuffer(e)||utils.isStream(e)||utils.isFile(e)||utils.isBlob(e)?e:utils.isArrayBufferView(e)?e.buffer:utils.isURLSearchParams(e)?(setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):utils.isObject(e)?(setContentTypeIfUnset(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils.forEach(["delete","get","head"],(function(e){defaults.headers[e]={}})),utils.forEach(["post","put","patch"],(function(e){defaults.headers[e]=utils.merge(DEFAULT_CONTENT_TYPE)}));var defaults_1=defaults;function throwIfCancellationRequested(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var dispatchRequest=function(e){return throwIfCancellationRequested(e),e.headers=e.headers||{},e.data=transformData(e.data,e.headers,e.transformRequest),e.headers=utils.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),utils.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||defaults_1.adapter)(e).then((function(t){return throwIfCancellationRequested(e),t.data=transformData(t.data,t.headers,e.transformResponse),t}),(function(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},mergeConfig=function(e,t){t=t||{};var r={},n=["url","method","params","data"],o=["headers","auth","proxy"],i=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];utils.forEach(n,(function(e){void 0!==t[e]&&(r[e]=t[e])})),utils.forEach(o,(function(n){utils.isObject(t[n])?r[n]=utils.deepMerge(e[n],t[n]):void 0!==t[n]?r[n]=t[n]:utils.isObject(e[n])?r[n]=utils.deepMerge(e[n]):void 0!==e[n]&&(r[n]=e[n])})),utils.forEach(i,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])}));var a=n.concat(o).concat(i),s=Object.keys(t).filter((function(e){return-1===a.indexOf(e)}));return utils.forEach(s,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])})),r};function Axios(e){this.defaults=e,this.interceptors={request:new InterceptorManager_1,response:new InterceptorManager_1}}Axios.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=mergeConfig(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[dispatchRequest,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},Axios.prototype.getUri=function(e){return e=mergeConfig(this.defaults,e),buildURL(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},utils.forEach(["delete","get","head","options"],(function(e){Axios.prototype[e]=function(t,r){return this.request(utils.merge(r||{},{method:e,url:t}))}})),utils.forEach(["post","put","patch"],(function(e){Axios.prototype[e]=function(t,r,n){return this.request(utils.merge(n||{},{method:e,url:t,data:r}))}}));var Axios_1=Axios;function Cancel(e){this.message=e}Cancel.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0;var Cancel_1=Cancel;function CancelToken(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new Cancel_1(e),t(r.reason))}))}CancelToken.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},CancelToken.source=function(){var e;return{token:new CancelToken((function(t){e=t})),cancel:e}};var CancelToken_1=CancelToken,spread=function(e){return function(t){return e.apply(null,t)}};function createInstance(e){var t=new Axios_1(e),r=bind$3(Axios_1.prototype.request,t);return utils.extend(r,Axios_1.prototype,t),utils.extend(r,t),r}var axios=createInstance(defaults_1);axios.Axios=Axios_1,axios.create=function(e){return createInstance(mergeConfig(axios.defaults,e))},axios.Cancel=Cancel_1,axios.CancelToken=CancelToken_1,axios.isCancel=isCancel,axios.all=function(e){return Promise.all(e)},axios.spread=spread;var axios_1=axios,default_1=axios;axios_1.default=default_1;var axios$1=axios_1;function request(e){var t=e.url,r=e.headers,n=void 0===r?{}:r,o=e.data,i=void 0===o?"":o,a=e.responseType,s=void 0===a?"json":a,c=e.timeout,u=void 0===c?3e4:c,l=e.method,p=void 0===l?"POST":l,f=e.params,d=void 0===f?{}:f;return axios$1(Object.assign(Object.assign({},e),{url:t,headers:Object.assign({"content-type":"application/json;charset=UTF-8"},n),data:i,responseType:s,timeout:u,method:p,params:d}))}var MATCH=wellKnownSymbol("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH])?!!t:"RegExp"==classofRaw(e))},Array$2=global_1.Array,max$2=Math.max,arraySliceSimple=function(e,t,r){for(var n=lengthOfArrayLike(e),o=toAbsoluteIndex(t,n),i=toAbsoluteIndex(void 0===r?n:r,n),a=Array$2(max$2(i-o,0)),s=0;o<i;o++,s++)createProperty(a,s,e[o]);return a.length=s,a},UNSUPPORTED_Y$2=regexpStickyHelpers.UNSUPPORTED_Y,MAX_UINT32=4294967295,min$3=Math.min,$push=[].push,exec$1=functionUncurryThis(/./.exec),push$2=functionUncurryThis($push),stringSlice$5=functionUncurryThis("".slice),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));fixRegexpWellKnownSymbolLogic("split",(function(e,t,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var n=toString_1(requireObjectCoercible(this)),o=void 0===r?MAX_UINT32:r>>>0;if(0===o)return[];if(void 0===e)return[n];if(!isRegexp(e))return functionCall(t,n,e,o);for(var i,a,s,c=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,p=new RegExp(e.source,u+"g");(i=functionCall(regexpExec,p,n))&&!((a=p.lastIndex)>l&&(push$2(c,stringSlice$5(n,l,i.index)),i.length>1&&i.index<n.length&&functionApply($push,c,arraySliceSimple(i,1)),s=i[0].length,l=a,c.length>=o));)p.lastIndex===i.index&&p.lastIndex++;return l===n.length?!s&&exec$1(p,"")||push$2(c,""):push$2(c,stringSlice$5(n,l)),c.length>o?arraySliceSimple(c,0,o):c}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:functionCall(t,this,e,r)}:t,[function(t,r){var o=requireObjectCoercible(this),i=null==t?void 0:getMethod(t,e);return i?functionCall(i,t,o,r):functionCall(n,toString_1(o),t,r)},function(e,o){var i=anObject(this),a=toString_1(e),s=r(n,i,a,o,n!==t);if(s.done)return s.value;var c=speciesConstructor(i,RegExp),u=i.unicode,l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(UNSUPPORTED_Y$2?"g":"y"),p=new c(UNSUPPORTED_Y$2?"^(?:"+i.source+")":i,l),f=void 0===o?MAX_UINT32:o>>>0;if(0===f)return[];if(0===a.length)return null===regexpExecAbstract(p,a)?[a]:[];for(var d=0,h=0,g=[];h<a.length;){p.lastIndex=UNSUPPORTED_Y$2?0:h;var y,v=regexpExecAbstract(p,UNSUPPORTED_Y$2?stringSlice$5(a,h):a);if(null===v||(y=min$3(toLength(p.lastIndex+(UNSUPPORTED_Y$2?h:0)),a.length))===d)h=advanceStringIndex(a,h,u);else{if(push$2(g,stringSlice$5(a,d,h)),g.length===f)return g;for(var m=1;m<=v.length-1;m++)if(push$2(g,v[m]),g.length===f)return g;h=d=y}}return push$2(g,stringSlice$5(a,d)),g}]}),!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC,UNSUPPORTED_Y$2);var TypeError$h=global_1.TypeError,createMethod$2=function(e){return function(t,r,n,o){aCallable(r);var i=toObject(t),a=indexedObject(i),s=lengthOfArrayLike(i),c=e?s-1:0,u=e?-1:1;if(n<2)for(;;){if(c in a){o=a[c],c+=u;break}if(c+=u,e?c<0:s<=c)throw TypeError$h("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=u)c in a&&(o=r(o,a[c],c,i));return o}},arrayReduce={left:createMethod$2(!1),right:createMethod$2(!0)},$reduce=arrayReduce.left,STRICT_METHOD$2=arrayMethodIsStrict("reduce"),CHROME_BUG=!engineIsNode&&engineV8Version>79&&engineV8Version<83;_export({target:"Array",proto:!0,forced:!STRICT_METHOD$2||CHROME_BUG},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,t>1?arguments[1]:void 0)}});var ssdp={app:{test:"https://ecsb-uat.crcloud.com:8443/ecsb/gw/app/<type>/",production:"https://ssdp.crc.com.cn/ssdp/app/<type>/"},cls:{test:"https://ecsb-uat.crcloud.com:8443/ecsb/gw/cls/rf/",production:"https://ssdp.crc.com.cn/ssdp/cls/rf/",runwork:{sit:{App_Sub_ID:"0000000303DM",App_Token:"6debaf0da23340daaac8659144ebed7a",Partner_ID:"00000000",Sys_ID:"00000003"},uat:{App_Sub_ID:"0000000309OK",App_Token:"5643f1d9d86c43c9ae72069c243dbf86",Partner_ID:"00000000",Sys_ID:"00000003"},pre:{App_Sub_ID:"0000000311VF",App_Token:"9472173cc8d5463fb6311db361c8a72f",Partner_ID:"00000000",Sys_ID:"00000003"},production:{App_Sub_ID:"0000000401RH",App_Token:"2bbc84f3bde54df488b4b0133989956c",Partner_ID:"00000000",Sys_ID:"00000004"}}},dtgw:{test:"https://dtgw-uat.crcloud.com/dtgw/api/",production:"https://dtgw-ps.crcloud.com/dtgw/api/",runwork:{sit:{"s-crc-app-id":"10012","s-crc-token":"0ed1fe39709f4c9f9e7fe8071fb8f4f1","s-crc-tpl-code":"EMAP_FILE_DOWN"},uat:{"s-crc-app-id":"10013","s-crc-token":"616451486c7c4b46b21c24d35f1f6f9b","s-crc-tpl-code":"EMAP_FILE_DOWN"},production:{"s-crc-app-id":"10012","s-crc-token":"e893a9d21a2a4fe5a50833de3b99f8e1","s-crc-tpl-code":"EMAP_FILE_DOWN"}}},api:{sit:{hrInfo:{api:"crc.rgz.lark0sit.getUserInfoJWT",version:"1.0"},avatar:{api:"crc.rgz.lark0sit.getEmpImage",version:"1.0"},avatarAuth:{api:"crc.rgz.lark0sit.getEmpImageWithNoLadpAuth",version:"1.0"},gettoken:{api:"crc.rgz.lark0sit.lark.gettoken",version:"1.0"},ticket:{api:"crc.rgz.lark0sit.getJsapiTicketByAppid",version:"1.0"},run3track:{api:"crc.rgz.run3uat.run3_track",version:"1.0"},users:{api:"crc.rgz.lark0sit.feishu.users",version:"1.0"}},uat:{hrInfo:{api:"crc.rgz.run3uat.getUserInfoJWT",version:"1.0"},avatar:{api:"crc.rgz.run3uat.getEmpImage",version:"1.0"},avatarAuth:{api:"crc.rgz.run3uat.getEmpImageWithNoLadpAuth",version:"1.0"},gettoken:{api:"crc.rgz.run3uat.lark.gettoken",version:"1.0"},ticket:{api:"crc.rgz.run3uat.getJsapiTicketByAppid",version:"1.0"},run3track:{api:"crc.rgz.run3uat.run3_track",version:"1.0"},users:{api:"crc.rgz.lark0sit.feishu.users",version:"1.0"}},pre:{hrInfo:{api:"crc.rgz.run3uat.getUserInfoJWT",version:"1.0"},avatar:{api:"crc.rgz.run3uat.getEmpImage",version:"1.0"},avatarAuth:{api:"crc.rgz.run3uat.getEmpImageWithNoLadpAuth",version:"1.0"},gettoken:{api:"crc.rgz.run3uat.lark.gettoken",version:"1.0"},ticket:{api:"crc.rgz.run3pre.getJsapiTicketByAppid",version:"1.0"}},test:{gettoken:{api:"crc.rgz.lark0sit.lark.gettoken",version:"1.0"},ticket:{api:"crc.rgz.lark0sit.getJsapiTicketByAppid",version:"1.0"}},production:{ssdpPostToken:{api:"crc.ssdp.public.apptoken",version:"1.0"},gettoken:{api:"crc.rgz.app.lark.gettoken",version:"1.0"},ticket:{api:"crc.rgz.app.getClsJsapiTicket",version:"1.0"},hrInfo:{api:"crc.rgz.app.getUserInfoJWT",version:"1.0"},avatar:{api:"crc.rgz.app.getEmpImage",version:"1.0"},avatarAuth:{api:"crc.rgz.app.getEmpImageWithNoLadpAuth",version:"1.0"},run3track:{api:"crc.rgz.app.run3_track",version:"1.0"},users:{api:"crc.rgz.app.feishu.users",version:"1.0"}}}},h5DB=[{name:"ssdpPostToken",store:{keyPath:"id",autoIncrement:!1},index:["token","expires"]},{name:"sys",store:{keyPath:"id",autoIncrement:!1},index:["appVersion","deviceID","system","platform"]},{name:"user",store:{keyPath:"id",autoIncrement:!1},index:["App_Sub_ID","App_Token","App_key","Partner_ID","external_token","open_id"]},{name:"hrInfo",store:{keyPath:"id",autoIncrement:!1},index:["jobCodeDescr","fullPath","businessUnit","gender","avatarUrl","fullDescPath","deptId","employeeId","birthDate","nameFormal","join_time","nameAc","deptDesc","userType","email","seniorityPayDtMap","businessUnitDesc","expires","mobilePhoneNumber","businessUnitDescShort"]},{name:"avatar",store:{keyPath:"id",autoIncrement:!1},index:["imageUrl","expires"]}],cacheKeys={localStorage:{feishu:{tenantAccessToken:"FS_TenantAccessToken",ticket:"FS_Ticket"}},indexeddb:{name:"runworkH5",version:3,store:{sys:"sys",user:"user",hrInfo:"hrInfo",avatar:"avatar",postToken:"ssdpPostToken",network:"network",track:"track"}}},feishu={redirectUrl:{production:"https://runworkauth.crc.com.cn/runworksso/sso/auth",sit:"https://runwork-h5-sit.test.crdigital.com.cn/runworksso/sso/auth",uat:"https://runwork-h5-uat.test.crdigital.com.cn/runworksso/sso/auth"}},apis={getSSOUserInfo:{production:"https://runworkauth.crc.com.cn/runworksso/sso/getSSOUserInfo",sit:"https://runwork-h5-sit.test.crdigital.com.cn/runworksso/sso/getSSOUserInfo",uat:"https://runwork-h5-uat.test.crdigital.com.cn/runworksso/sso/getSSOUserInfo"},createDebugJwttoken:{production:"https://runworkauth.crc.com.cn/runworksso/sso/createDebugJwttoken",sit:"https://runwork-h5-sit.test.crdigital.com.cn/runworksso/sso/createDebugJwttoken",uat:"https://runwork-h5-uat.test.crdigital.com.cn/runworksso/sso/createDebugJwttoken"}},constant={ssdp:ssdp,h5DB:h5DB,cacheKeys:cacheKeys,feishu:feishu,apis:apis};function getConstant(e){return e.split(".").reduce((function(e,t){return e[t]}),constant)}var inheritIfRequired=function(e,t,r){var n,o;return objectSetPrototypeOf&&isCallable(n=t.constructor)&&n!==r&&isObject(o=n.prototype)&&o!==r.prototype&&objectSetPrototypeOf(e,o),e},RegExpPrototype$1=RegExp.prototype,regexpGetFlags=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$1||hasOwnProperty_1(e,"flags")||!objectIsPrototypeOf(RegExpPrototype$1,e)?t:functionCall(regexpFlags,e)},defineProperty$3=objectDefineProperty.f,proxyAccessor=function(e,t,r){r in e||defineProperty$3(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},getOwnPropertyNames=objectGetOwnPropertyNames.f,enforceInternalState=internalState.enforce,MATCH$1=wellKnownSymbol("match"),NativeRegExp=global_1.RegExp,RegExpPrototype$2=NativeRegExp.prototype,SyntaxError=global_1.SyntaxError,exec$2=functionUncurryThis(RegExpPrototype$2.exec),charAt$4=functionUncurryThis("".charAt),replace$2=functionUncurryThis("".replace),stringIndexOf$1=functionUncurryThis("".indexOf),stringSlice$6=functionUncurryThis("".slice),IS_NCG=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,re1=/a/g,re2=/a/g,CORRECT_NEW=new NativeRegExp(re1)!==re1,MISSED_STICKY$1=regexpStickyHelpers.MISSED_STICKY,UNSUPPORTED_Y$3=regexpStickyHelpers.UNSUPPORTED_Y,BASE_FORCED=descriptors&&(!CORRECT_NEW||MISSED_STICKY$1||regexpUnsupportedDotAll||regexpUnsupportedNcg||fails((function(){return re2[MATCH$1]=!1,NativeRegExp(re1)!=re1||NativeRegExp(re2)==re2||"/a/i"!=NativeRegExp(re1,"i")}))),handleDotAll=function(e){for(var t,r=e.length,n=0,o="",i=!1;n<=r;n++)"\\"!==(t=charAt$4(e,n))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+charAt$4(e,++n);return o},handleNCG=function(e){for(var t,r=e.length,n=0,o="",i=[],a={},s=!1,c=!1,u=0,l="";n<=r;n++){if("\\"===(t=charAt$4(e,n)))t+=charAt$4(e,++n);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:exec$2(IS_NCG,stringSlice$6(e,n+1))&&(n+=2,c=!0),o+=t,u++;continue;case">"===t&&c:if(""===l||hasOwnProperty_1(a,l))throw new SyntaxError("Invalid capture group name");a[l]=!0,i[i.length]=[l,u],c=!1,l="";continue}c?l+=t:o+=t}return[o,i]};if(isForced_1("RegExp",BASE_FORCED)){for(var RegExpWrapper=function(e,t){var r,n,o,i,a,s,c=objectIsPrototypeOf(RegExpPrototype$2,this),u=isRegexp(e),l=void 0===t,p=[],f=e;if(!c&&u&&l&&e.constructor===RegExpWrapper)return e;if((u||objectIsPrototypeOf(RegExpPrototype$2,e))&&(e=e.source,l&&(t=regexpGetFlags(f))),e=void 0===e?"":toString_1(e),t=void 0===t?"":toString_1(t),f=e,regexpUnsupportedDotAll&&"dotAll"in re1&&(n=!!t&&stringIndexOf$1(t,"s")>-1)&&(t=replace$2(t,/s/g,"")),r=t,MISSED_STICKY$1&&"sticky"in re1&&(o=!!t&&stringIndexOf$1(t,"y")>-1)&&UNSUPPORTED_Y$3&&(t=replace$2(t,/y/g,"")),regexpUnsupportedNcg&&(e=(i=handleNCG(e))[0],p=i[1]),a=inheritIfRequired(NativeRegExp(e,t),c?this:RegExpPrototype$2,RegExpWrapper),(n||o||p.length)&&(s=enforceInternalState(a),n&&(s.dotAll=!0,s.raw=RegExpWrapper(handleDotAll(e),r)),o&&(s.sticky=!0),p.length&&(s.groups=p)),e!==f)try{createNonEnumerableProperty(a,"source",""===f?"(?:)":f)}catch(e){}return a},keys$1=getOwnPropertyNames(NativeRegExp),index=0;keys$1.length>index;)proxyAccessor(RegExpWrapper,NativeRegExp,keys$1[index++]);RegExpPrototype$2.constructor=RegExpWrapper,RegExpWrapper.prototype=RegExpPrototype$2,redefine(global_1,"RegExp",RegExpWrapper)}setSpecies("RegExp");var PROPER_FUNCTION_NAME=functionName.PROPER,TO_STRING$1="toString",RegExpPrototype$3=RegExp.prototype,n$ToString=RegExpPrototype$3[TO_STRING$1],NOT_GENERIC=fails((function(){return"/a/b"!=n$ToString.call({source:"a",flags:"b"})})),INCORRECT_NAME=PROPER_FUNCTION_NAME&&n$ToString.name!=TO_STRING$1;function getTimeStamp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd hh:mm:ss:S",r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};for(var o in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),n)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?n[o]:("00"+n[o]).substr((""+n[o]).length)));var i=-e.getTimezoneOffset()/60,a=i>=0?"+":"-";i=Math.abs(i);var s="".concat(a).concat(i<10?"0".concat(i):i,"00");return"".concat(t).concat(r?s:"")}(NOT_GENERIC||INCORRECT_NAME)&&redefine(RegExp.prototype,TO_STRING$1,(function(){var e=anObject(this);return"/"+toString_1(e.source)+"/"+toString_1(regexpGetFlags(e))}),{unsafe:!0});var base64encodechars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",base64decodechars=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1),base64encode=function(){var e,t,r,n,o,i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";for(r=a.length,t=0,e="";t<r;){if(n=255&a.charCodeAt(t++),t==r){e+=base64encodechars.charAt(n>>2),e+=base64encodechars.charAt((3&n)<<4),e+="==";break}if(o=a.charCodeAt(t++),t==r){e+=base64encodechars.charAt(n>>2),e+=base64encodechars.charAt((3&n)<<4|(240&o)>>4),e+=base64encodechars.charAt((15&o)<<2),e+="=";break}i=a.charCodeAt(t++),e+=base64encodechars.charAt(n>>2),e+=base64encodechars.charAt((3&n)<<4|(240&o)>>4),e+=base64encodechars.charAt((15&o)<<2|(192&i)>>6),e+=base64encodechars.charAt(63&i)}return e},base64decode=function(){var e,t,r,n,o,i,a,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";for(i=s.length,o=0,a="";o<i;){do{e=base64decodechars[255&s.charCodeAt(o++)]}while(o<i&&-1==e);if(-1==e)break;do{t=base64decodechars[255&s.charCodeAt(o++)]}while(o<i&&-1==t);if(-1==t)break;a+=String.fromCharCode(e<<2|(48&t)>>4);do{if(61==(r=255&s.charCodeAt(o++)))return a;r=base64decodechars[r]}while(o<i&&-1==r);if(-1==r)break;a+=String.fromCharCode((15&t)<<4|(60&r)>>2);do{if(61==(n=255&s.charCodeAt(o++)))return a;n=base64decodechars[n]}while(o<i&&-1==n);if(-1==n)break;a+=String.fromCharCode((3&r)<<6|n)}return a},utf16to8=function(){var e,t,r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";for(e="",r=o.length,t=0;t<r;t++)(n=o.charCodeAt(t))>=1&&n<=127?e+=o.charAt(t):n>2047?(e+=String.fromCharCode(224|n>>12&15),e+=String.fromCharCode(128|n>>6&63),e+=String.fromCharCode(128|n>>0&63)):(e+=String.fromCharCode(192|n>>6&31),e+=String.fromCharCode(128|n>>0&63));return e},utf8to16=function(){var e,t,r,n,o,i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";for(e="",r=a.length,t=0;t<r;)switch((n=a.charCodeAt(t++))>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:e+=a.charAt(t-1);break;case 12:case 13:o=a.charCodeAt(t++),e+=String.fromCharCode((31&n)<<6|63&o);break;case 14:o=a.charCodeAt(t++),i=a.charCodeAt(t++),e+=String.fromCharCode((15&n)<<12|(63&o)<<6|(63&i)<<0)}return e},base64={encode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return base64encode(utf16to8(e))},decode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return utf8to16(base64decode(e))}};function jssdk(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return console.log("jssdk",e),new Promise((function(r,n){window.h5sdk.ready((function(){var o=e.split(".").reduce((function(e,t){return e[t]||{}}),window.h5sdk);"function"!=typeof o&&n(),o.call(window.h5sdk,Object.assign({onSuccess:function(e){r(e)},onFail:function(t){errorHandle(e),console.error("调用原生方法失败:"+e,t),n(t)}},t))})).catch((function(e){return console.error("h5sdk.ready error",e),Promise.reject(e)}))}))}function errorHandle(e){switch(e){case"biz.user.getUserInfoEx":navigator.userAgent.match(/android/i)?alert("认证信息失效,请重新登录"):jssdk("device.notification.confirm",{title:"温馨提示",message:"认证信息失效,请重新登录",buttonLabels:["好的"]}).then((function(){jssdk("biz.navigation.close")}))}}fixRegexpWellKnownSymbolLogic("match",(function(e,t,r){return[function(t){var r=requireObjectCoercible(this),n=null==t?void 0:getMethod(t,e);return n?functionCall(n,t,r):new RegExp(t)[e](toString_1(r))},function(e){var n=anObject(this),o=toString_1(e),i=r(t,n,o);if(i.done)return i.value;if(!n.global)return regexpExecAbstract(n,o);var a=n.unicode;n.lastIndex=0;for(var s,c=[],u=0;null!==(s=regexpExecAbstract(n,o));){var l=toString_1(s[0]);c[u]=l,""===l&&(n.lastIndex=advanceStringIndex(o,toLength(n.lastIndex),a)),u++}return 0===u?null:c}]}));var isIphonex=function(){return/iphone/gi.test(window.navigator.userAgent)};function logger(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]),(t=console)[r].apply(t,["runwork-help2.0"].concat(_toConsumableArray(e)))}var MSIE=/MSIE .\./.test(engineUserAgent),Function$2=global_1.Function,wrap=function(e){return MSIE?function(t,r){var n=validateArgumentsLength(arguments.length,1)>2,o=isCallable(t)?t:Function$2(t),i=n?arraySlice(arguments,2):void 0;return e(n?function(){functionApply(o,this,i)}:o,r)}:e},schedulersFix={setTimeout:wrap(global_1.setTimeout),setInterval:wrap(global_1.setInterval)},setInterval$1=schedulersFix.setInterval;_export({global:!0,bind:!0,forced:global_1.setInterval!==setInterval$1},{setInterval:setInterval$1});var setTimeout$1=schedulersFix.setTimeout;function sleep(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;return new Promise((function(t){setTimeout((function(){t()}),e)}))}_export({global:!0,bind:!0,forced:global_1.setTimeout!==setTimeout$1},{setTimeout:setTimeout$1});var whitespaces="\t\n\v\f\r    \u2028\u2029\ufeff",replace$3=functionUncurryThis("".replace),whitespace="["+whitespaces+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod$3=function(e){return function(t){var r=toString_1(requireObjectCoercible(t));return 1&e&&(r=replace$3(r,ltrim,"")),2&e&&(r=replace$3(r,rtrim,"")),r}},stringTrim={start:createMethod$3(1),end:createMethod$3(2),trim:createMethod$3(3)},trim$1=stringTrim.trim,charAt$5=functionUncurryThis("".charAt),n$ParseFloat=global_1.parseFloat,Symbol$2=global_1.Symbol,ITERATOR$3=Symbol$2&&Symbol$2.iterator,FORCED$1=1/n$ParseFloat(whitespaces+"-0")!=-1/0||ITERATOR$3&&!fails((function(){n$ParseFloat(Object(ITERATOR$3))})),numberParseFloat=FORCED$1?function(e){var t=trim$1(toString_1(e)),r=n$ParseFloat(t);return 0===r&&"-"==charAt$5(t,0)?-0:r}:n$ParseFloat;function isBroswer(){var e={},t=navigator.userAgent,r=t.indexOf("Opera")>-1;if(r){if("Opera"==navigator.appName)e.version=parseFloat(navigator.appVersion);else new RegExp("Opera (\\d+.\\d+)").test(t),e.version=parseFloat(RegExp.$1);e.name="opera"}var n=t.indexOf("Chrome")>-1;n&&(new RegExp("Chrome/(\\d+\\.\\d+(?:\\.\\d+\\.\\d+))?").test(t),e.version=parseFloat(RegExp.$1),e.name="chrome");var o=(t.indexOf("KHTML")>-1||t.indexOf("Konqueror")>-1||t.indexOf("AppleWebKit")>-1)&&!n;if(o){var i=t.indexOf("AppleWebKit")>-1,a=t.indexOf("Konqueror")>-1;if(i)new RegExp("Version/(\\d+(?:\\.\\d*)?)").test(t),e.version=parseFloat(RegExp.$1),e.safari=!0,e.name="safari";else if(a){new RegExp("Konqueror/(\\d+(?:\\.\\d+(?\\.\\d)?)?)").test(t),e.version=parseFloat(RegExp.$1),e.name="konqueror"}}t.indexOf("compatible")>-1&&t.indexOf("MSIE")>-1&&!r&&(new RegExp("MSIE (\\d+\\.\\d+);").test(t),e.version=parseFloat(RegExp.$1),e.name="msie");t.indexOf("Gecko")>-1&&!n&&!o&&(new RegExp("rv:(\\d+\\.\\d+(?:\\.\\d+)?)").test(t),e.version=parseFloat(RegExp.$1),e.name="mozilla");return e}_export({global:!0,forced:parseFloat!=numberParseFloat},{parseFloat:numberParseFloat});var floor$2=Math.floor,mergeSort=function(e,t){var r=e.length,n=floor$2(r/2);return r<8?insertionSort(e,t):merge$1(e,mergeSort(arraySliceSimple(e,0,n),t),mergeSort(arraySliceSimple(e,n),t),t)},insertionSort=function(e,t){for(var r,n,o=e.length,i=1;i<o;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},merge$1=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?n(t[a],r[s])<=0?t[a++]:r[s++]:a<o?t[a++]:r[s++];return e},arraySort=mergeSort,firefox=engineUserAgent.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],engineIsIeOrEdge=/MSIE|Trident/.test(engineUserAgent),webkit=engineUserAgent.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],test$1=[],un$Sort=functionUncurryThis(test$1.sort),push$3=functionUncurryThis(test$1.push),FAILS_ON_UNDEFINED=fails((function(){test$1.sort(void 0)})),FAILS_ON_NULL=fails((function(){test$1.sort(null)})),STRICT_METHOD$3=arrayMethodIsStrict("sort"),STABLE_SORT=!fails((function(){if(engineV8Version)return engineV8Version<70;if(!(engineFfVersion&&engineFfVersion>3)){if(engineIsIeOrEdge)return!0;if(engineWebkitVersion)return engineWebkitVersion<603;var e,t,r,n,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)test$1.push({k:t+n,v:r})}for(test$1.sort((function(e,t){return t.v-e.v})),n=0;n<test$1.length;n++)t=test$1[n].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}})),FORCED$2=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD$3||!STABLE_SORT,getSortCompare=function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:toString_1(t)>toString_1(r)?1:-1}};_export({target:"Array",proto:!0,forced:FORCED$2},{sort:function(e){void 0!==e&&aCallable(e);var t=toObject(this);if(STABLE_SORT)return void 0===e?un$Sort(t):un$Sort(t,e);var r,n,o=[],i=lengthOfArrayLike(t);for(n=0;n<i;n++)n in t&&push$3(o,t[n]);for(arraySort(o,getSortCompare(e)),r=o.length,n=0;n<r;)t[n]=o[n++];for(;n<i;)delete t[n++];return t}});var push$4=functionUncurryThis([].push),createMethod$4=function(e){var t=1==e,r=2==e,n=3==e,o=4==e,i=6==e,a=7==e,s=5==e||i;return function(c,u,l,p){for(var f,d,h=toObject(c),g=indexedObject(h),y=functionBindContext(u,l),v=lengthOfArrayLike(g),m=0,b=p||arraySpeciesCreate,S=t?b(c,v):r||a?b(c,0):void 0;v>m;m++)if((s||m in g)&&(d=y(f=g[m],m,h),e))if(t)S[m]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return m;case 2:push$4(S,f)}else switch(e){case 4:return!1;case 7:push$4(S,f)}return i?-1:n||o?o:S}},arrayIteration={forEach:createMethod$4(0),map:createMethod$4(1),filter:createMethod$4(2),some:createMethod$4(3),every:createMethod$4(4),find:createMethod$4(5),findIndex:createMethod$4(6),filterReject:createMethod$4(7)},$map=arrayIteration.map,HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("map");_export({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT},{map:function(e){return $map(this,e,arguments.length>1?arguments[1]:void 0)}});var md5=createCommonjsModule((function(e){!function(t){function r(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function n(e,t,n,o,i,a){return r((s=r(r(t,e),r(o,a)))<<(c=i)|s>>>32-c,n);var s,c}function o(e,t,r,o,i,a,s){return n(t&r|~t&o,e,t,i,a,s)}function i(e,t,r,o,i,a,s){return n(t&o|r&~o,e,t,i,a,s)}function a(e,t,r,o,i,a,s){return n(t^r^o,e,t,i,a,s)}function s(e,t,r,o,i,a,s){return n(r^(t|~o),e,t,i,a,s)}function c(e,t){var n,c,u,l,p;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var f=1732584193,d=-271733879,h=-1732584194,g=271733878;for(n=0;n<e.length;n+=16)c=f,u=d,l=h,p=g,f=o(f,d,h,g,e[n],7,-680876936),g=o(g,f,d,h,e[n+1],12,-389564586),h=o(h,g,f,d,e[n+2],17,606105819),d=o(d,h,g,f,e[n+3],22,-1044525330),f=o(f,d,h,g,e[n+4],7,-176418897),g=o(g,f,d,h,e[n+5],12,1200080426),h=o(h,g,f,d,e[n+6],17,-1473231341),d=o(d,h,g,f,e[n+7],22,-45705983),f=o(f,d,h,g,e[n+8],7,1770035416),g=o(g,f,d,h,e[n+9],12,-1958414417),h=o(h,g,f,d,e[n+10],17,-42063),d=o(d,h,g,f,e[n+11],22,-1990404162),f=o(f,d,h,g,e[n+12],7,1804603682),g=o(g,f,d,h,e[n+13],12,-40341101),h=o(h,g,f,d,e[n+14],17,-1502002290),f=i(f,d=o(d,h,g,f,e[n+15],22,1236535329),h,g,e[n+1],5,-165796510),g=i(g,f,d,h,e[n+6],9,-1069501632),h=i(h,g,f,d,e[n+11],14,643717713),d=i(d,h,g,f,e[n],20,-373897302),f=i(f,d,h,g,e[n+5],5,-701558691),g=i(g,f,d,h,e[n+10],9,38016083),h=i(h,g,f,d,e[n+15],14,-660478335),d=i(d,h,g,f,e[n+4],20,-405537848),f=i(f,d,h,g,e[n+9],5,568446438),g=i(g,f,d,h,e[n+14],9,-1019803690),h=i(h,g,f,d,e[n+3],14,-187363961),d=i(d,h,g,f,e[n+8],20,1163531501),f=i(f,d,h,g,e[n+13],5,-1444681467),g=i(g,f,d,h,e[n+2],9,-51403784),h=i(h,g,f,d,e[n+7],14,1735328473),f=a(f,d=i(d,h,g,f,e[n+12],20,-1926607734),h,g,e[n+5],4,-378558),g=a(g,f,d,h,e[n+8],11,-2022574463),h=a(h,g,f,d,e[n+11],16,1839030562),d=a(d,h,g,f,e[n+14],23,-35309556),f=a(f,d,h,g,e[n+1],4,-1530992060),g=a(g,f,d,h,e[n+4],11,1272893353),h=a(h,g,f,d,e[n+7],16,-155497632),d=a(d,h,g,f,e[n+10],23,-1094730640),f=a(f,d,h,g,e[n+13],4,681279174),g=a(g,f,d,h,e[n],11,-358537222),h=a(h,g,f,d,e[n+3],16,-722521979),d=a(d,h,g,f,e[n+6],23,76029189),f=a(f,d,h,g,e[n+9],4,-640364487),g=a(g,f,d,h,e[n+12],11,-421815835),h=a(h,g,f,d,e[n+15],16,530742520),f=s(f,d=a(d,h,g,f,e[n+2],23,-995338651),h,g,e[n],6,-198630844),g=s(g,f,d,h,e[n+7],10,1126891415),h=s(h,g,f,d,e[n+14],15,-1416354905),d=s(d,h,g,f,e[n+5],21,-57434055),f=s(f,d,h,g,e[n+12],6,1700485571),g=s(g,f,d,h,e[n+3],10,-1894986606),h=s(h,g,f,d,e[n+10],15,-1051523),d=s(d,h,g,f,e[n+1],21,-2054922799),f=s(f,d,h,g,e[n+8],6,1873313359),g=s(g,f,d,h,e[n+15],10,-30611744),h=s(h,g,f,d,e[n+6],15,-1560198380),d=s(d,h,g,f,e[n+13],21,1309151649),f=s(f,d,h,g,e[n+4],6,-145523070),g=s(g,f,d,h,e[n+11],10,-1120210379),h=s(h,g,f,d,e[n+2],15,718787259),d=s(d,h,g,f,e[n+9],21,-343485551),f=r(f,c),d=r(d,u),h=r(h,l),g=r(g,p);return[f,d,h,g]}function u(e){var t,r="",n=32*e.length;for(t=0;t<n;t+=8)r+=String.fromCharCode(e[t>>5]>>>t%32&255);return r}function l(e){var t,r=[];for(r[(e.length>>2)-1]=void 0,t=0;t<r.length;t+=1)r[t]=0;var n=8*e.length;for(t=0;t<n;t+=8)r[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return r}function p(e){var t,r,n="";for(r=0;r<e.length;r+=1)t=e.charCodeAt(r),n+="0123456789abcdef".charAt(t>>>4&15)+"0123456789abcdef".charAt(15&t);return n}function f(e){return unescape(encodeURIComponent(e))}function d(e){return function(e){return u(c(l(e),8*e.length))}(f(e))}function h(e,t){return function(e,t){var r,n,o=l(e),i=[],a=[];for(i[15]=a[15]=void 0,o.length>16&&(o=c(o,8*e.length)),r=0;r<16;r+=1)i[r]=909522486^o[r],a[r]=1549556828^o[r];return n=c(i.concat(l(t)),512+8*t.length),u(c(a.concat(n),640))}(f(e),f(t))}function g(e,t,r){return t?r?h(t,e):p(h(t,e)):r?d(e):p(d(e))}e.exports?e.exports=g:t.md5=g}(commonjsGlobal)}));function generateSysSign(e){var t=e.App_Sub_ID,r=e.App_Token,n=e.User_Token,o=void 0===n?"":n,i=e.Api_ID,a=e.Api_Version,s=e.Time_Stamp,c=e.Partner_ID,u=e.REQUEST_DATA,l=e.App_ID,p=e.App_Version,f=e.Divice_ID,d=e.Divice_Version,h=e.OS_Version,g=e.App_key,y=[["App_Sub_ID",t],["App_Token",r],["User_Token",o],["Api_ID",i],["Api_Version",a],["Time_Stamp",s],["Partner_ID",c],["REQUEST_DATA","string"==typeof u?u:JSON.stringify(u)],["App_ID",l],["App_Version",p],["Divice_ID",f],["Divice_Version",d],["OS_Version",h]];return y.sort(),console.log("SSDP签名参数","".concat(y.map((function(e){return e.join("=")})).join("&"),"&").concat(g)),md5("".concat(y.map((function(e){return e.join("=")})).join("&"),"&").concat(g)).toUpperCase()}var SSDPConfigMode=_createClass((function e(t){var r=t.App_Sub_ID,n=t.App_Token,o=t.App_ID,i=t.App_key,a=t.App_Version,s=t.Divice_ID,c=t.Divice_Version,u=t.OS_Version,l=t.Partner_ID,p=t.User_Token;_classCallCheck(this,e),this.App_Sub_ID=r,this.App_Token=n,this.App_ID=o,this.App_key=i,this.App_Version=a,this.Divice_ID=s,this.Divice_Version=c,this.OS_Version=u,this.Partner_ID=l,this.User_Token=p||""})),SSDPApp=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"test",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,e),this.CacheDBKey=getConstant("cacheKeys.indexeddb.store.postToken"),this.isLogin=!1,this.config=new SSDPConfigMode(t),this.isLogin=n,this.url=getConstant("ssdp.app.".concat(r)),this.env=r,this.CacheStoreKey="PostToken_".concat(this.env)}return _createClass(e,[{key:"init",value:function(){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccessToken();case 2:this.postToken=e.sent;case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getPostToken",value:function(){return this.postToken}},{key:"request",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function r(){var n,o,i,a,s,c,u,l,p,f,d,h,g,y,v,m,b,S,E,_,T,I;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.api,o=void 0===n?"":n,i=e.version,a=void 0===i?"1.0":i,s=e.data,c=void 0===s?"":s,u=e.params,l=void 0===u?{}:u,p=e.headers,f=void 0===p?{}:p,e.isFormatData,d=e.type,h=void 0===d?"rs":d,g=e.method,y=void 0===g?"POST":g,v=e.uri,m=this.getApiAttrs(o,a),r.next=4,request(Object.assign(Object.assign({},e),{url:"".concat(this.url.replace("<type>",h)).concat(v||"","?ssdp=").concat(this.generateUrlParam("post"===y.toLowerCase()&&"rs"==h?{Api_ID:o,Api_Version:a,App_Sub_ID:this.config.App_Sub_ID,Time_Stamp:m.Time_Stamp}:Object.assign(Object.assign({},m),{Sign:generateSysSign(Object.assign(Object.assign({},m),{REQUEST_DATA:c}))}))),params:l,method:y,headers:Object.assign({},f),data:"rs"==h?this.generateCommonParam(o,a,c):c}));case 4:b=r.sent,S=void 0,E=void 0;try{_=b.data.RESPONSE,T=_.RETURN_CODE,I=_.RETURN_DESC,S=T,E=I}catch(e){logger(["非标准响应报文格式",b.data],"warn")}if(void 0!==S){r.next=10;break}return r.abrupt("return",b);case 10:if(!((["E0MI0006","E0MI0003"].includes(S)||"string"==typeof E&&~E.toLocaleLowerCase().indexOf("app_token"))&&t<=3)){r.next=15;break}return r.next=13,this.getAccessTokenByPost();case 13:return this.postToken=r.sent,r.abrupt("return",this.request({api:o,version:a,data:c,headers:f},++t));case 15:return r.abrupt("return",b);case 16:case"end":return r.stop()}}),r,this)})))}},{key:"generateCommonParam",value:function(e,t,r,n){var o=this.getApiAttrs(e,t,n);if(o=Object.assign(Object.assign({},o),{Sign:generateSysSign(Object.assign(Object.assign({},o),{REQUEST_DATA:r,App_key:this.config.App_key}))}),this.isLogin&&"crc.ssdp.public.apptoken"!==o.Api_ID){var i=r.BUS_DATA;(i=JSON.parse(base64.decode(i))).appToken=o.App_Token,r={BUS_DATA:base64.encode(JSON.stringify(i))}}return{REQUEST:{REQUEST_DATA:r,API_ATTRS:o}}}},{key:"getApiAttrs",value:function(e,t,r){return Object.assign(Object.assign({},this.config),{App_key:void 0,App_Token:r||this.postToken,Time_Stamp:getTimeStamp(),Api_ID:e,Api_Version:t})}},{key:"generateUrlParam",value:function(e){var t=[];for(var r in e){var n=e[r];n&&t.push("".concat(r,"=").concat(n))}return base64.encode(t.join("&"))}},{key:"getAccessToken",value:function(){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAccessTokenByCache();case 2:if(!(t=e.sent)){e.next=5;break}return e.abrupt("return",Promise.resolve(t));case 5:return e.abrupt("return",this.getAccessTokenByPost());case 6:case"end":return e.stop()}}),e,this)})))}},{key:"getAccessTokenByPost",value:function(){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,r,n,o,i,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,request({url:this.generateUrlByAccessToken(),data:this.generateCommonParam("crc.ssdp.public.apptoken","1.0",{App_Type:"",App_key:this.config.App_key,Remarks:"",Scope:""},this.config.App_Token)});case 2:if(t=e.sent,r=t.data,n=r.RESPONSE,o=n.RETURN_DATA,"S"===(i=n.RETURN_CODE).charAt(0)||"MS000A000"===i){e.next=7;break}return e.abrupt("return",Promise.reject(r.RESPONSE));case 7:if(a=o.App_Token,s=o.Token_Expires,!this.isLogin){e.next=10;break}return e.abrupt("return",a);case 10:return this.setPostTokenCache({token:a,expires:(new Date).getTime()+1e3*s}),e.abrupt("return",a);case 12:case"end":return e.stop()}}),e,this)})))}},{key:"getAccessTokenByCache",value:function(){if(this.isLogin)return Promise.resolve();var e=localStorage.getItem(this.CacheDBKey),t="string"==typeof e?JSON.parse(e):void 0;return e&&this.checkPostTokenExpires(t.expires)?t.value:void 0}},{key:"setPostTokenCache",value:function(e){var t=e.expires,r=e.token;localStorage.setItem(this.CacheDBKey,JSON.stringify({expires:t,value:r}))}},{key:"checkPostTokenExpires",value:function(e){return e-(new Date).getTime()>3e5}},{key:"generateUrlByAccessToken",value:function(){var e=getConstant("ssdp.api.production.ssdpPostToken"),t=e.api,r=e.version;return"".concat(this.url.replace("<type>","rs"),"?ssdp=").concat(this.generateUrlParam({Api_ID:t,Api_Version:r,App_Sub_ID:this.config.App_Sub_ID}))}},{key:"setUserToken",value:function(e){this.config.User_Token=e}}]),e}();SSDPApp.isIndexedDB="indexedDB"in window;var FAILS_ON_PRIMITIVES=fails((function(){objectKeys(1)}));_export({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES},{keys:function(e){return objectKeys(toObject(e))}});var Function$3=global_1.Function,concat$3=functionUncurryThis([].concat),join=functionUncurryThis([].join),factories={},construct$1=function(e,t,r){if(!hasOwnProperty_1(factories,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";factories[t]=Function$3("C,a","return new C("+join(n,",")+")")}return factories[t](e,r)},functionBind=functionBindNative?Function$3.bind:function(e){var t=aCallable(this),r=t.prototype,n=arraySlice(arguments,1),o=function(){var r=concat$3(n,arraySlice(arguments));return this instanceof o?construct$1(t,r.length,r):t.apply(e,r)};return isObject(r)&&(o.prototype=r),o};_export({target:"Function",proto:!0,forced:Function.bind!==functionBind},{bind:functionBind});var FUNCTION_NAME_EXISTS=functionName.EXISTS,defineProperty$4=objectDefineProperty.f,FunctionPrototype$3=Function.prototype,functionToString$1=functionUncurryThis(FunctionPrototype$3.toString),nameRE=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,regExpExec=functionUncurryThis(nameRE.exec),NAME="name";descriptors&&!FUNCTION_NAME_EXISTS&&defineProperty$4(FunctionPrototype$3,NAME,{configurable:!0,get:function(){try{return regExpExec(nameRE,functionToString$1(this))[1]}catch(e){return""}}});var TypeError$i=global_1.TypeError,notARegexp=function(e){if(isRegexp(e))throw TypeError$i("The method doesn't accept regular expressions");return e},MATCH$2=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[MATCH$2]=!1,"/./"[e](t)}catch(e){}}return!1},stringIndexOf$2=functionUncurryThis("".indexOf);_export({target:"String",proto:!0,forced:!correctIsRegexpLogic("includes")},{includes:function(e){return!!~stringIndexOf$2(toString_1(requireObjectCoercible(this)),toString_1(notARegexp(e)),arguments.length>1?arguments[1]:void 0)}});var HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport("slice"),SPECIES$6=wellKnownSymbol("species"),Array$3=global_1.Array,max$3=Math.max;_export({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{slice:function(e,t){var r,n,o,i=toIndexedObject(this),a=lengthOfArrayLike(i),s=toAbsoluteIndex(e,a),c=toAbsoluteIndex(void 0===t?a:t,a);if(isArray(i)&&(r=i.constructor,(isConstructor(r)&&(r===Array$3||isArray(r.prototype))||isObject(r)&&null===(r=r[SPECIES$6]))&&(r=void 0),r===Array$3||void 0===r))return arraySlice(i,s,c);for(n=new(void 0===r?Array$3:r)(max$3(c-s,0)),o=0;s<c;s++,o++)s in i&&createProperty(n,o,i[s]);return n.length=o,n}});var correctPrototypeGetter=!fails((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),IE_PROTO$1=sharedKey("IE_PROTO"),Object$5=global_1.Object,ObjectPrototype=Object$5.prototype,objectGetPrototypeOf=correctPrototypeGetter?Object$5.getPrototypeOf:function(e){var t=toObject(e);if(hasOwnProperty_1(t,IE_PROTO$1))return t[IE_PROTO$1];var r=t.constructor;return isCallable(r)&&t instanceof r?r.prototype:t instanceof Object$5?ObjectPrototype:null},ITERATOR$4=wellKnownSymbol("iterator"),BUGGY_SAFARI_ITERATORS=!1,IteratorPrototype,PrototypeOfArrayIteratorPrototype,arrayIterator;[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS=!0);var NEW_ITERATOR_PROTOTYPE=null==IteratorPrototype||fails((function(){var e={};return IteratorPrototype[ITERATOR$4].call(e)!==e}));NEW_ITERATOR_PROTOTYPE&&(IteratorPrototype={}),isCallable(IteratorPrototype[ITERATOR$4])||redefine(IteratorPrototype,ITERATOR$4,(function(){return this}));var iteratorsCore={IteratorPrototype:IteratorPrototype,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS},IteratorPrototype$1=iteratorsCore.IteratorPrototype,returnThis=function(){return this},createIteratorConstructor=function(e,t,r,n){var o=t+" Iterator";return e.prototype=objectCreate(IteratorPrototype$1,{next:createPropertyDescriptor(+!n,r)}),setToStringTag(e,o,!1),iterators[o]=returnThis,e},PROPER_FUNCTION_NAME$1=functionName.PROPER,CONFIGURABLE_FUNCTION_NAME=functionName.CONFIGURABLE,IteratorPrototype$2=iteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS$1=iteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$5=wellKnownSymbol("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis$1=function(){return this},defineIterator=function(e,t,r,n,o,i,a){createIteratorConstructor(r,t,n);var s,c,u,l=function(e){if(e===o&&g)return g;if(!BUGGY_SAFARI_ITERATORS$1&&e in d)return d[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}},p=t+" Iterator",f=!1,d=e.prototype,h=d[ITERATOR$5]||d["@@iterator"]||o&&d[o],g=!BUGGY_SAFARI_ITERATORS$1&&h||l(o),y="Array"==t&&d.entries||h;if(y&&(s=objectGetPrototypeOf(y.call(new e)))!==Object.prototype&&s.next&&(objectGetPrototypeOf(s)!==IteratorPrototype$2&&(objectSetPrototypeOf?objectSetPrototypeOf(s,IteratorPrototype$2):isCallable(s[ITERATOR$5])||redefine(s,ITERATOR$5,returnThis$1)),setToStringTag(s,p,!0)),PROPER_FUNCTION_NAME$1&&o==VALUES&&h&&h.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty(d,"name",VALUES):(f=!0,g=function(){return functionCall(h,this)})),o)if(c={values:l(VALUES),keys:i?g:l(KEYS),entries:l(ENTRIES)},a)for(u in c)(BUGGY_SAFARI_ITERATORS$1||f||!(u in d))&&redefine(d,u,c[u]);else _export({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS$1||f},c);return d[ITERATOR$5]!==g&&redefine(d,ITERATOR$5,g,{name:o}),iterators[t]=g,c},defineProperty$5=objectDefineProperty.f,ARRAY_ITERATOR="Array Iterator",setInternalState$1=internalState.set,getInternalState$1=internalState.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",(function(e,t){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})}),(function(){var e=getInternalState$1(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),values=iterators.Arguments=iterators.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),descriptors&&"values"!==values.name)try{defineProperty$5(values,"name",{value:"values"})}catch(e){}var charAt$6=stringMultibyte.charAt,STRING_ITERATOR="String Iterator",setInternalState$2=internalState.set,getInternalState$2=internalState.getterFor(STRING_ITERATOR);defineIterator(String,"String",(function(e){setInternalState$2(this,{type:STRING_ITERATOR,string:toString_1(e),index:0})}),(function(){var e,t=getInternalState$2(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=charAt$6(r,n),t.index+=e.length,{value:e,done:!1})}));var domIterables={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},classList=documentCreateElement("span").classList,DOMTokenListPrototype=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype===Object.prototype?void 0:DOMTokenListPrototype,ITERATOR$6=wellKnownSymbol("iterator"),TO_STRING_TAG$3=wellKnownSymbol("toStringTag"),ArrayValues=es_array_iterator.values,handlePrototype=function(e,t){if(e){if(e[ITERATOR$6]!==ArrayValues)try{createNonEnumerableProperty(e,ITERATOR$6,ArrayValues)}catch(t){e[ITERATOR$6]=ArrayValues}if(e[TO_STRING_TAG$3]||createNonEnumerableProperty(e,TO_STRING_TAG$3,t),domIterables[t])for(var r in es_array_iterator)if(e[r]!==es_array_iterator[r])try{createNonEnumerableProperty(e,r,es_array_iterator[r])}catch(t){e[r]=es_array_iterator[r]}}};for(var COLLECTION_NAME in domIterables)handlePrototype(global_1[COLLECTION_NAME]&&global_1[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(domTokenListPrototype,"DOMTokenList");var $findIndex=arrayIteration.findIndex,FIND_INDEX="findIndex",SKIPS_HOLES=!0;FIND_INDEX in[]&&Array(1)[FIND_INDEX]((function(){SKIPS_HOLES=!1})),_export({target:"Array",proto:!0,forced:SKIPS_HOLES},{findIndex:function(e){return $findIndex(this,e,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables(FIND_INDEX);var $filter=arrayIteration.filter,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport("filter");_export({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{filter:function(e){return $filter(this,e,arguments.length>1?arguments[1]:void 0)}});var PROPER_FUNCTION_NAME$2=functionName.PROPER,non="…",stringTrimForced=function(e){return fails((function(){return!!whitespaces[e]()||non[e]()!==non||PROPER_FUNCTION_NAME$2&&whitespaces[e].name!==e}))},$trim=stringTrim.trim;_export({target:"String",proto:!0,forced:stringTrimForced("trim")},{trim:function(){return $trim(this)}});var RunworkH5Mode=_createClass((function e(t){var r=t.isLocal,n=void 0!==r&&r,o=t.devUser,i=t.env,a=void 0===i?"sit":i,s=t.jsApiList,c=void 0===s?[]:s,u=t.log,l=void 0!==u&&u,p=t.appId,f=t.appSecret,d=t.isLogin,h=void 0!==d&&d,g=t.isHrInfo,y=void 0!==g&&g,v=t.isAvatar,m=void 0!==v&&v,b=t.isPrivate,S=void 0!==b&&b,E=t.isHrInfoCache,_=void 0===E||E,T=t.isVue3,I=void 0!==T&&T,O=t.larkexpires,R=void 0!==O&&O,A=t.isJssdkAuth,P=void 0===A||A,C=t.SSDPConfig,w=void 0===C?{}:C,x=t.isCross,k=void 0!==x&&x;_classCallCheck(this,e),this.env="sit",this.jsApiList=[],this.domain=["https://runwork-h5.crc.com.cn","https://runwork-h5-uat.crc.com.cn"],this.isLocal=n,this.devUser=o,this.env=a,RunWorkH5.env=this.env,this.log=l,this.appId=p,this.appSecret=f,this.isLogin=h,this.isHrInfo=y,this.isAvatar=m,this.isPrivate=S,this.isHrInfoCache=_,this.isVue3=I,this.larkexpires=R,this.isJssdkAuth=P,this.SSDPConfig=w,this.isCross=k,this.jsApiList=["device.base.getSystemInfo","biz.user.getUserInfoEx","biz.util.openDocument","biz.user.getUserInfo"].concat(c)}));function getTicket(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function o(){var i,a,s,c,u,l,p,f,d,h,g,y,v,m;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i="".concat(getConstant("cacheKeys.localStorage.feishu.ticket"),"_").concat(e),!0===r&&(logger("清空【Ticket】缓存"),localStorage.setItem(i,"")),a=localStorage.getItem(i),s=a?JSON.parse(a):void 0,!((c="object"===_typeof(s)?s.expire-(new Date).getTime():-1)>9e4)){o.next=8;break}return logger(["从缓存获取【Ticket】",c,s.value]),o.abrupt("return",s.value);case 8:return logger(["从远端获取【Ticket】",JSON.stringify({appId:e,appSecret:t,refresh:1==n?"true":void 0})]),u=getConstant("ssdp.api.".concat(RunWorkH5.env,".ticket")),l=u.api,u.version,o.next=12,RunWorkH5.ssdpCls.request({method:"POST",api:l,version:"1.0",data:{Biz_Data:base64.encode(JSON.stringify({appId:e,appSecret:t,refresh:1==n?"true":void 0}))}});case 12:if(p=o.sent,f=p.data,d=f.RESPONSE.RETURN_DATA,h=d.data,g=d.code,y=d.msg,0==g){o.next=17;break}return o.abrupt("return",Promise.reject("get ticket error "+y));case 17:return v=h.ticket,m=h.expire_in,localStorage.setItem(i,JSON.stringify({expire:(new Date).getTime()+1e3*m,value:v})),o.abrupt("return",v);case 20:case"end":return o.stop()}}),o)})))}var sameValue=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};fixRegexpWellKnownSymbolLogic("search",(function(e,t,r){return[function(t){var r=requireObjectCoercible(this),n=null==t?void 0:getMethod(t,e);return n?functionCall(n,t,r):new RegExp(t)[e](toString_1(r))},function(e){var n=anObject(this),o=toString_1(e),i=r(t,n,o);if(i.done)return i.value;var a=n.lastIndex;sameValue(a,0)||(n.lastIndex=0);var s=regexpExecAbstract(n,o);return sameValue(n.lastIndex,a)||(n.lastIndex=a),null===s?-1:s.index}]}));var sha1=createCommonjsModule((function(module){
/*
* [js-sha1]{@link https://github.com/emn178/js-sha1}
*
* @version 0.6.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2017
* @license MIT
*/
!function(){var root="object"==typeof window?window:{},NODE_JS=!root.JS_SHA1_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS&&(root=commonjsGlobal);var COMMON_JS=!root.JS_SHA1_NO_COMMON_JS&&module.exports,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[],createOutputMethod=function(e){return function(t){return new Sha1(!0).update(t)[e]()}},createMethod=function(){var e=createOutputMethod("hex");NODE_JS&&(e=nodeWrap(e)),e.create=function(){return new Sha1},e.update=function(t){return e.create().update(t)};for(var t=0;t<OUTPUT_TYPES.length;++t){var r=OUTPUT_TYPES[t];e[r]=createOutputMethod(r)}return e},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(e){if("string"==typeof e)return crypto.createHash("sha1").update(e,"utf8").digest("hex");if(e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(void 0===e.length)return method(e);return crypto.createHash("sha1").update(new Buffer(e)).digest("hex")};return nodeMethod};function Sha1(e){e?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Sha1.prototype.update=function(e){if(!this.finalized){var t="string"!=typeof e;t&&e.constructor===root.ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,o=0,i=e.length||0,a=this.blocks;o<i;){if(this.hashed&&(this.hashed=!1,a[0]=this.block,a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),t)for(n=this.start;o<i&&n<64;++o)a[n>>2]|=e[o]<<SHIFT[3&n++];else for(n=this.start;o<i&&n<64;++o)(r=e.charCodeAt(o))<128?a[n>>2]|=r<<SHIFT[3&n++]:r<2048?(a[n>>2]|=(192|r>>6)<<SHIFT[3&n++],a[n>>2]|=(128|63&r)<<SHIFT[3&n++]):r<55296||r>=57344?(a[n>>2]|=(224|r>>12)<<SHIFT[3&n++],a[n>>2]|=(128|r>>6&63)<<SHIFT[3&n++],a[n>>2]|=(128|63&r)<<SHIFT[3&n++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++o)),a[n>>2]|=(240|r>>18)<<SHIFT[3&n++],a[n>>2]|=(128|r>>12&63)<<SHIFT[3&n++],a[n>>2]|=(128|r>>6&63)<<SHIFT[3&n++],a[n>>2]|=(128|63&r)<<SHIFT[3&n++]);this.lastByteIndex=n,this.bytes+=n-this.start,n>=64?(this.block=a[16],this.start=n-64,this.hash(),this.hashed=!0):this.start=n}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha1.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha1.prototype.hash=function(){var e,t,r=this.h0,n=this.h1,o=this.h2,i=this.h3,a=this.h4,s=this.blocks;for(e=16;e<80;++e)t=s[e-3]^s[e-8]^s[e-14]^s[e-16],s[e]=t<<1|t>>>31;for(e=0;e<20;e+=5)r=(t=(n=(t=(o=(t=(i=(t=(a=(t=r<<5|r>>>27)+(n&o|~n&i)+a+1518500249+s[e]<<0)<<5|a>>>27)+(r&(n=n<<30|n>>>2)|~r&o)+i+1518500249+s[e+1]<<0)<<5|i>>>27)+(a&(r=r<<30|r>>>2)|~a&n)+o+1518500249+s[e+2]<<0)<<5|o>>>27)+(i&(a=a<<30|a>>>2)|~i&r)+n+1518500249+s[e+3]<<0)<<5|n>>>27)+(o&(i=i<<30|i>>>2)|~o&a)+r+1518500249+s[e+4]<<0,o=o<<30|o>>>2;for(;e<40;e+=5)r=(t=(n=(t=(o=(t=(i=(t=(a=(t=r<<5|r>>>27)+(n^o^i)+a+1859775393+s[e]<<0)<<5|a>>>27)+(r^(n=n<<30|n>>>2)^o)+i+1859775393+s[e+1]<<0)<<5|i>>>27)+(a^(r=r<<30|r>>>2)^n)+o+1859775393+s[e+2]<<0)<<5|o>>>27)+(i^(a=a<<30|a>>>2)^r)+n+1859775393+s[e+3]<<0)<<5|n>>>27)+(o^(i=i<<30|i>>>2)^a)+r+1859775393+s[e+4]<<0,o=o<<30|o>>>2;for(;e<60;e+=5)r=(t=(n=(t=(o=(t=(i=(t=(a=(t=r<<5|r>>>27)+(n&o|n&i|o&i)+a-1894007588+s[e]<<0)<<5|a>>>27)+(r&(n=n<<30|n>>>2)|r&o|n&o)+i-1894007588+s[e+1]<<0)<<5|i>>>27)+(a&(r=r<<30|r>>>2)|a&n|r&n)+o-1894007588+s[e+2]<<0)<<5|o>>>27)+(i&(a=a<<30|a>>>2)|i&r|a&r)+n-1894007588+s[e+3]<<0)<<5|n>>>27)+(o&(i=i<<30|i>>>2)|o&a|i&a)+r-1894007588+s[e+4]<<0,o=o<<30|o>>>2;for(;e<80;e+=5)r=(t=(n=(t=(o=(t=(i=(t=(a=(t=r<<5|r>>>27)+(n^o^i)+a-899497514+s[e]<<0)<<5|a>>>27)+(r^(n=n<<30|n>>>2)^o)+i-899497514+s[e+1]<<0)<<5|i>>>27)+(a^(r=r<<30|r>>>2)^n)+o-899497514+s[e+2]<<0)<<5|o>>>27)+(i^(a=a<<30|a>>>2)^r)+n-899497514+s[e+3]<<0)<<5|n>>>27)+(o^(i=i<<30|i>>>2)^a)+r-899497514+s[e+4]<<0,o=o<<30|o>>>2;this.h0=this.h0+r<<0,this.h1=this.h1+n<<0,this.h2=this.h2+o<<0,this.h3=this.h3+i<<0,this.h4=this.h4+a<<0},Sha1.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4;return HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]},Sha1.prototype.toString=Sha1.prototype.hex,Sha1.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4;return[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o]},Sha1.prototype.array=Sha1.prototype.digest,Sha1.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(20),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),e};var exports=createMethod();COMMON_JS?module.exports=exports:root.sha1=exports}()}));function generateFeishuSignature(e,t,r,n){var o={jsapi_ticket:e,noncestr:t,timestamp:r,url:n||"".concat(location.origin).concat(location.pathname).concat(location.search)},i=Object.keys(o).map((function(e){return"".concat(e,"=").concat(o[e])})).join("&");return logger(["飞书签名参数",i]),sha1(i)}function callFeishuIdentity(e){return new Promise((function(t,r){var n=setTimeout((function(){r("config timeout")}),5e3);window.h5sdk.error((function(e){console.error("config error",e),r(e)})),window.h5sdk.config(e).then((function(){clearTimeout(n),console.info("jssdk identity success",e.jsApiList),t(!0)})).catch((function(e){clearTimeout(n),console.error("identity error",e),r(e)}))}))}function identity(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function c(){var u,l,p,f;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,getTicket(e,t,a>0,o,s);case 3:return u=c.sent,l=(new Date).getTime(),p=base64.encode("".concat(e).concat(l)),f=generateFeishuSignature(u,p,l,i),logger(["callFeishuIdentity"]),c.next=10,callFeishuIdentity({appId:e,timestamp:l,nonceStr:p,signature:f,jsApiList:r});case 10:return"function"==typeof n&&n({success:!0}),c.abrupt("return",!0);case 14:if(c.prev=14,c.t0=c.catch(0),333449!=c.t0.errorCode){c.next=18;break}return c.abrupt("return",Promise.reject("当前用户无此应用权限【".concat(c.t0.errorMessage,"】")));case 18:if(!(a<=3)){c.next=21;break}return logger(["重新调用【config】",a,c.t0],"warn"),c.abrupt("return",identity(e,t,r,n,o,i,++a,a>1));case 21:return"function"==typeof n&&n({success:!1,error:c.t0}),c.abrupt("return",Promise.reject(c.t0));case 23:case"end":return c.stop()}}),c,null,[[0,14]])})))}var trim$2=stringTrim.trim,$parseInt=global_1.parseInt,Symbol$3=global_1.Symbol,ITERATOR$7=Symbol$3&&Symbol$3.iterator,hex=/^[+-]?0x/i,exec$3=functionUncurryThis(hex.exec),FORCED$3=8!==$parseInt(whitespaces+"08")||22!==$parseInt(whitespaces+"0x16")||ITERATOR$7&&!fails((function(){$parseInt(Object(ITERATOR$7))})),numberParseInt=FORCED$3?function(e,t){var r=trim$2(toString_1(e));return $parseInt(r,t>>>0||(exec$3(hex,r)?16:10))}:$parseInt;function browseFile(e){var t=e.fileType,r=void 0===t?"":t,n=e.data,o=void 0===n?{}:n,i=e.headers,a=void 0===i?{}:i,s=e.code,c=void 0===s?"":s,u=e.onProgress,l=e.method,p=void 0===l?"POST":l,f=e.isNewMethod,d=void 0===f||f,h=e.showMenu,g=void 0===h||h,y=e.native,v=void 0===y||y;if(a=Object.assign(Object.assign({"content-type":"application/json;charset=UTF-8",run3token:RunWorkH5.runWorkToken,"s-crc-ds-codes":c},RunWorkH5.ssdpDtgw.getRunworkStaticKeys()),a),["jpg","jpeg","png","gif"].includes(r.toLowerCase())||!1===v)return RunWorkH5.ssdpDtgw.request({code:c,headers:a,responseType:"blob",onDownloadProgress:u,data:o}).then((function(e){return e})).catch((function(e){return console.error(e),Promise.reject(e)}));var m=parseInt(RunWorkH5.appVersion.split(".").slice(0,2).join(""));return logger(["判断下载方式",RunWorkH5.appVersion,m]),openDocument({fileType:r,data:o,headers:a,onDownloadProgress:u,isNewMethod:!0===d&&m>=335,method:p,showMenu:g})}function openDocument(e){return e.isNewMethod?openDocumentBy335(e):openDocumentBy322(e)}function openDocumentBy335(e){var t=e.fileType,r=e.data,n=void 0===r?{}:r,o=e.headers,i=e.method,a=void 0===i?"POST":i,s=e.showMenu,c=void 0===s||s,u=e.onDownloadProgress;return clearFile(),new Promise((function(e,r){logger(["tt.downloadFile",a,o]),window.tt.downloadFile({url:RunWorkH5.ssdpDtgw.url,method:a,data:"object"===_typeof(n)?JSON.stringify(n):n,header:o,success:function(n){logger(["下载附件成功",n]),RunWorkH5.filePath.push(n.tempFilePath),window.tt.openDocument({filePath:n.tempFilePath,fileType:t,showMenu:c,success:function(t){e(),logger(["附件预览完成",t])},fail:function(e){r(e),logger(["附件预览失败",e],"error")}})},fail:function(e){r(e),logger(["下载附件失败",e],"error")}}).onProgressUpdate((function(e){"function"==typeof u&&u(e)}))}))}function openDocumentBy322(e){var t=e.fileType,r=e.data,n=void 0===r?{}:r,o=e.headers,i=e.method,a=void 0===i?"POST":i,s=e.onDownloadProgress;return jssdk("biz.util.openDocument",{method:a,fileType:t,body:"object"===_typeof(n)?JSON.stringify(n):n,header:o,url:RunWorkH5.ssdpDtgw.url,onProgress:s}).then((function(){return!0})).catch((function(e){return console.error(e),Promise.reject(e)}))}function clearFile(){if(0!==RunWorkH5.filePath.length)for(var e=function(){var e=RunWorkH5.filePath.pop();window.tt.removeSavedFile({filePath:e,success:function(){logger(["删除附件成功",e])},fail:function(t){logger(["删除附件失败:".concat(e),t],"error")}})};RunWorkH5.filePath.length>0;)e()}_export({global:!0,forced:parseInt!=numberParseInt},{parseInt:numberParseInt});var sitMockData={user:{open_id:"",external_token:"local",App_Sub_ID:"0000000303DM",App_Token:"6debaf0da23340daaac8659144ebed7a",App_key:"a59eacd0661d4ebb8a2b86aa02d2335f",Partner_ID:"00000000"},sys:{appVersion:"0.0.1",deviceID:"1A283E7B-F167-41E3-8974-493D57B74581",system:"local",platform:"local"}},uatMockData={user:{open_id:"",external_token:"local",App_Sub_ID:"0000000309OK",App_Token:"5643f1d9d86c43c9ae72069c243dbf86",App_key:"52e219166c7c41a68b490ac4efc22fa2",Partner_ID:"00000000"},sys:{appVersion:"1.0.0",deviceID:"1A283E7B-F167-41E3-8974-493D57B74581",system:"local",platform:"local"},network:{networkType:"local"}},preMockData={user:{open_id:"",external_token:void 0,App_Sub_ID:"0000000311VF",App_Token:"9472173cc8d5463fb6311db361c8a72f",App_key:"a48b2cb558de4093a2651d5da2c4c5fb",Partner_ID:"00000000"},sys:{appVersion:"0.0.1",deviceID:"1A283E7B-F167-41E3-8974-493D57B74581",system:"local",platform:"local"}},productionMockData={user:{open_id:"",external_token:void 0,App_Sub_ID:"0000000401RH",App_Token:"2bbc84f3bde54df488b4b0133989956c",App_key:"8c33a5babafd4f1197a6880a960ab91b",Partner_ID:"00000000"},sys:{appVersion:"0.0.1",deviceID:"1A283E7B-F167-41E3-8974-493D57B74581",system:"local",platform:"local"}};function mock(e){switch(e){case"sit":return sitMockData;case"uat":return uatMockData;case"pre":return preMockData;case"production":return productionMockData;default:return{}}}var HrInfoMode=_createClass((function e(t){var r=t.jobCodeDescr,n=t.fullPath,o=t.businessUnit,i=t.gender,a=t.avatarUrl,s=t.fullDescPath,c=t.deptId,u=t.employeeId,l=t.birthDate,p=t.nameFormal,f=t.join_time,d=t.nameAc,h=t.deptDesc,g=t.userType,y=t.email,v=t.seniorityPayDtMap,m=t.businessUnitDesc,b=t.mobilePhoneNumber,S=t.businessUnitDescShort;_classCallCheck(this,e),this.jobCodeDescr=r,this.fullPath=n,this.businessUnit=o,this.gender=i,this.avatarUrl=a,this.fullDescPath=s,this.deptId=c,this.employeeId=u,this.birthDate=l,this.nameFormal=p,this.join_time=f,this.nameAc=d,this.deptDesc=h,this.userType=g,this.email=y,this.seniorityPayDtMap=v,this.businessUnitDesc=m,this.mobilePhoneNumber=b,this.businessUnitDescShort=S})),IndexedDB=function(){function e(t){var r=t.dbname,n=void 0===r?"":r,o=t.onupgradeneeded,i=void 0===o?void 0:o,a=t.version,s=void 0===a?1:a;_classCallCheck(this,e),this.dbname=n,this.version=s,this.onupgradeneeded=i,this.init()}return _createClass(e,[{key:"init",value:function(){var e=this;if(!("indexedDB"in window))throw this.error="当前环境不支持 indexedDB",Error(this.error);return new Promise((function(t,r){e.DBRequestLink=window.indexedDB.open(e.dbname,e.version),e.DBRequestLink.onsuccess=function(r){e.DBInstance=r.target.result,e.isReady=!0,t(r)},e.DBRequestLink.onerror=function(t){console.error("indexedDB open error",t),e.error=t,r(t)},e.DBRequestLink.onupgradeneeded=e.onupgradeneeded}))}},{key:"initReady",value:function(){var e=this;return this.isReady?Promise.resolve(this.DBInstance):this.error?Promise.reject(this.error):new Promise((function(t,r){var n=0,o=setInterval((function(){e.isReady||n>=6?(clearInterval(o),e.isReady?t(e.DBInstance):r("IndexedDB init time out")):e.error&&(r(e.error),clearInterval(o)),n++}),100)}))}}]),e}();function get$1(e,t){return new Promise((function(r,n){var o=e[t?"get":"getAll"](t);o.onsuccess=function(e){r(e.target.result)},o.onerror=function(e){n(e)}}))}function put(e,t){return new Promise((function(r,n){var o=e.put(t);o.onsuccess=function(e){r(e)},o.onerror=function(e){n(e)}}))}var SSDPDtgw=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"test";_classCallCheck(this,e),this.env=t,this.url=getConstant("ssdp.dtgw.".concat(this.getEnv()))}return _createClass(e,[{key:"request",value:function(e){var t=e.code,r=e.data,n=e.headers,o=e.responseType,i=void 0===o?"json":o,a=e.timeout,s=e.method,c=void 0===s?"post":s,u=e.params,l=e.onUploadProgress,p=e.onDownloadProgress;return request({url:this.url,data:r,method:c,params:u,headers:Object.assign(Object.assign({"s-crc-ds-codes":t,run3token:RunWorkH5.runWorkToken},this.getRunworkStaticKeys()),n),timeout:a,onUploadProgress:l,onDownloadProgress:p,responseType:i})}},{key:"getRunworkStaticKeys",value:function(){return getConstant("ssdp.dtgw.runwork.".concat(this.env))}},{key:"getEnv",value:function(){switch(this.env){case"production":return"production";default:return"test"}}},{key:"generateUrlParam",value:function(e){return""}}]),e}(),Factory=_createClass((function e(){_classCallCheck(this,e)}));function getIndexedDB(){return Factory.indexedDB||(console.info("实例化 indexedDB"),Factory.indexedDB=new IndexedDB({dbname:getConstant("cacheKeys.indexeddb.name"),version:getConstant("cacheKeys.indexeddb.version"),onupgradeneeded:function(e){console.info("indexedDB onupgradeneeded");var t,r=e.target.result,n=_createForOfIteratorHelper(getConstant("h5DB"));try{for(n.s();!(t=n.n()).done;){var o=t.value,i=o.name,a=o.store,s=o.index;r.objectStoreNames.contains(i)&&r.deleteObjectStore(i);var c,u=r.createObjectStore(i,a),l=_createForOfIteratorHelper(s);try{for(l.s();!(c=l.n()).done;){var p=c.value;u.createIndex(p,p)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){n.e(e)}finally{n.f()}}})),Factory.indexedDB}function getSsdpCls(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"sit";return Factory.ssdpCls||(Factory.ssdpCls=new SSDPCls(e)),Factory.ssdpCls}function getSsdpDtgw(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"test";return Factory.ssdpDtgw||(Factory.ssdpDtgw=new SSDPDtgw(e)),Factory.ssdpDtgw}function getTenantAccessToken(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function o(){var i,a,s,c,u,l,p,f,d,h,g;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i="".concat(getConstant("cacheKeys.localStorage.feishu.tenantAccessToken"),"_").concat(e),!0===r&&(logger("清空【TenantAccessToken】缓存"),localStorage.setItem(i,"")),a=localStorage.getItem(i),s=a?JSON.parse(a):void 0,!((c="object"===_typeof(s)?s.expire-(new Date).getTime():-1)>9e4)){o.next=8;break}return logger(["从缓存获取【TenantAccessToken】",c]),o.abrupt("return",s.value);case 8:return u=getConstant("ssdp.api.".concat(RunWorkH5.env,".gettoken")),l=u.api,p=u.version,console.info("TenantAccessToken",n,n||(RunWorkH5.isPrivate?"2.0":p)),o.next=12,RunWorkH5.ssdpCls.request({method:"POST",api:l,version:n||(RunWorkH5.isPrivate?"2.0":p),headers:{"Access-Control-Expose-Headers":"RETURN_CODE"},data:JSON.stringify({app_id:e,app_secret:t})});case 12:return f=o.sent,d=f.data,f.headers,h=d.tenant_access_token,d.code,d.msg,g=d.expire,localStorage.setItem(i,JSON.stringify({expire:(new Date).getTime()+1e3*g,value:h})),o.abrupt("return",h);case 18:case"end":return o.stop()}}),o)})))}Factory.getIndexedDB=getIndexedDB,Factory.getSsdpCls=getSsdpCls,Factory.getSsdpDtgw=getSsdpDtgw;var RunWorkH5=function(e){_inherits(r,e);var t=_createSuper(r);function r(e){var n;_classCallCheck(this,r),(n=t.call(this,e)).ready=!1,n.isJssdkReady=!1,n.browseFile=browseFile,r.ssdpCls=Factory.getSsdpCls(r.env),r.ssdpDtgw=Factory.getSsdpDtgw(r.env),r.isPrivate=e.isPrivate,n.ssdpRequestCls=r.ssdpCls.request.bind(r.ssdpCls),n.ssdpRequestDtgw=r.ssdpDtgw.request.bind(r.ssdpDtgw);var o=(new Date).getTime();return n.init().then((function(e){if(!1!==e){localStorage.removeItem("RELOAD_SSO_COUNT");var t=e.ldap,r=e.hrInfo;logger(["初始化完成",t]),n.ready=!0,n.ldap=t,r&&(n.hrInfo=new HrInfoMode(r)),!0===n.isJssdkAuth&&(n.run3track({category:"runwork-single-loign",action:"init",value:(new Date).getTime()-o}),n.onNetworkQualityChange()),n.callCacheTrackFail()}})).catch((function(e){n.ready=!1,n.error=e,logger(n.error,"error"),e="object"===_typeof(e)?JSON.stringify(e):e,n.setCacheTrackFail({type:"error",category:"runwork-help init error",action:"request",data:{errorInfo:e},networkResend:1})})),n}return _createClass(r,[{key:"init",value:function(){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,o,i,a,s,c,u,l,p,f,d,h,g,y,v,m,b,S,E,_,T,I;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.checkOption()){e.next=2;break}return e.abrupt("return",Promise.reject(this.error));case 2:if(this.runWorkToken=this.getRunWorkToken(),this.runWorkToken||1!=this.isLocal){e.next=10;break}return e.next=6,this.createDebugJwttoken(this.devUser);case 6:t=e.sent,this.runWorkToken=t,e.next=13;break;case 10:if(this.runWorkToken){e.next=13;break}return e.next=13,this.redirectFeishu();case 13:return r.runWorkToken=this.runWorkToken,n={},e.prev=15,e.next=18,this.getSSOUserInfo();case 18:n=e.sent,e.next=26;break;case 21:return e.prev=21,e.t0=e.catch(15),console.error(e.t0),e.next=26,this.redirectFeishu(e.t0);case 26:if(i=(o=n).access_token,a=o.avatar_thumb,s=o.avatar_url,c=o.avatar_big,u=o.user_id,l=o.name,p=o.en_name,f=o.open_id,d=o.App_Sub_ID,h=o.Partner_ID,g=o.App_key,y=o.App_Token,d){e.next=29;break}return e.abrupt("return",Promise.reject({error:"App_Sub_ID is undefined",message:JSON.stringify(n)}));case 29:if(this.user={access_token:i,avatar_thumb:a,avatar_url:s,avatar_big:c,user_id:u,name:l,en_name:p,open_id:f},!0!==this.isJssdkAuth){e.next=34;break}return e.next=33,this.getBaseInfoByNative();case 33:v=e.sent;case 34:return logger(["getBaseInfoByNative",v],"info"),b=(m=v||{}).appVersion,S=m.deviceID,E=m.system,_=m.platform,T=m.model,r.sysInfo={deviceID:S,platform:_,model:T,system:E},r.appVersion=b,this.ssdpApp=new SSDPApp(Object.assign({App_ID:"002601",App_Sub_ID:d,App_Token:y,App_key:g,App_Version:b,Partner_ID:h,Divice_ID:S,Divice_Version:E,OS_Version:_,User_Token:"-"},this.SSDPConfig),r.getEnv(),this.isLogin),e.next=41,this.ssdpApp.init();case 41:if(logger(["ssdpApp 初始化完成"]),!this.isHrInfo||this.isLogin){e.next=47;break}return logger(["获取用户Hr信息"]),e.next=46,this.getHrInfo(u);case 46:I=e.sent;case 47:return e.abrupt("return",{ldap:u,hrInfo:I});case 48:case"end":return e.stop()}}),e,this,[[15,21]])})))}},{key:"initReady",value:function(){var e=this;return this.ready?Promise.resolve():this.error?Promise.reject(this.error):new Promise((function(t,r){var n=0,o=setInterval((function(){e.error&&(logger(["初始化失败",e.error],"error"),clearInterval(o),r(e.error)),(e.ready||n>=300)&&(logger(["初始化结束",e.ready,e.error]),clearInterval(o),!e.ready&&logger("初始化超时","error"),e.ready?t():r("初始化超时,请稍后重试")),n++}),100)}))}},{key:"jssdkReady",value:function(){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isJssdkReady){e.next=4;break}return e.abrupt("return",!0);case 4:if(!this.jssdkIdentityError){e.next=7;break}return logger(["jssdk鉴权失败",this.jssdkIdentityError],"error"),e.abrupt("return",Promise.reject(this.jssdkIdentityError));case 7:return e.abrupt("return",new Promise((function(e,r){var n=0,o=setInterval((function(){t.jssdkIdentityError&&(clearInterval(o),r(t.jssdkIdentityError)),(t.isJssdkReady||n>=50)&&(clearInterval(o),logger(["jssdk鉴权结束",t.isJssdkReady]),t.isJssdkReady?e():r("jssdk鉴权超时")),n++}),300)})));case 8:case"end":return e.stop()}}),e,this)})))}},{key:"ssdpRequestApp",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function n(){var o,i,a,s,c,u,l,p,f,d,h,g,y,v,m,b,S,E,_,T,I=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=e.api,i=e.version,a=e.data,s=void 0===a?{}:a,c=e.headers,u=void 0===c?{}:c,l=e.isFormatData,p=void 0===l||l,f=e.type,d=void 0===f?"rs":f,h=e.method,g=void 0===h?"POST":h,y=e.params,v=void 0===y?{}:y,n.next=3,this.ssdpApp.request(Object.assign(Object.assign({},e),{api:o,version:i,data:s,headers:Object.assign({run3token:this.runWorkToken},u),isFormatData:p,method:g,type:d,params:v})).catch((function(t){var r;return!1===(null===(r=e.api)||void 0===r?void 0:r.includes("run3_track"))&&I.run3track({type:"error",category:"runwork-request-ecsb",action:"request",data:{pageOverTime:o,errorInfo:"object"===_typeof(t)?JSON.stringify(t):t}}),Promise.reject(t)}));case 3:if(m=n.sent,b=m.data,!1!==p){n.next=7;break}return n.abrupt("return",m);case 7:if(S=b.RESPONSE,E=S.RETURN_CODE,_=S.RETURN_DESC,T=S.RETURN_DATA,("E0MI0007"===E||"string"==typeof _&&~_.indexOf("User_Token"))&&r<=3&&logger(["请关闭ecsb服务用户身份校验"],"warn"),"resolve"!==("S"===E.charAt(0)||"MS000A000"===E?"resolve":"reject")){n.next=14;break}return n.abrupt("return",Promise.resolve({RETURN_CODE:E,RETURN_DESC:_,RETURN_DATA:T}));case 14:return!1===(null===(t=e.api)||void 0===t?void 0:t.includes("run3_track"))&&(logger(["请求ecsb服务异常",b.RESPONSE],"error"),this.run3track({type:"error",category:"runwork-request-ecsb",action:"request",data:{pageOverTime:o,errorInfo:JSON.stringify(b.RESPONSE)}})),n.abrupt("return",Promise.reject({RETURN_CODE:E,RETURN_DESC:_,RETURN_DATA:T,api:o,common:this.ssdpApp.config}));case 16:case"end":return n.stop()}}),n,this)})))}},{key:"getBaseInfoByNative",value:function(){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,o,i,a=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isLocal){e.next=3;break}return t=mock(r.env),n=t.sys,e.abrupt("return",Promise.resolve(n));case 3:return e.next=5,this.getBaseInfoByCache();case 5:if(o=e.sent,i=null==o.appVersion,logger(["从缓存中获取系统信息",o]),logger(["是否启用异步鉴权",!i]),!i){e.next=21;break}return e.prev=10,e.next=13,identity(this.appId,this.appSecret,this.jsApiList);case 13:this.isJssdkReady=!0,e.next=19;break;case 16:return e.prev=16,e.t0=e.catch(10),e.abrupt("return",Promise.reject(e.t0));case 19:e.next=22;break;case 21:identity(this.appId,this.appSecret,this.jsApiList,(function(e){var t=e.success,r=e.error;a.isJssdkReady=t,a.jssdkIdentityError=r}));case 22:return e.abrupt("return",1==i?this.getSystemInfo():Promise.resolve(o));case 23:case"end":return e.stop()}}),e,this,[[10,16]])})))}},{key:"getSystemInfo",value:function(){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=0,jssdk("device.base.getSystemInfo").then((function(e){n=e})),o=(new Date).getTime(),e.abrupt("return",new Promise((function(e,i){var a=setInterval((function(){(new Date).getTime()-o>1e3&&null==n?(++t,o=(new Date).getTime(),logger(["重新调用【getSystemInfo】",t],"warn"),jssdk("device.base.getSystemInfo").then((function(e){n=e})).catch((function(e){clearInterval(a),i(e)}))):t>3&&!n?(clearInterval(a),i("device.base.getSystemInfo timeout")):n&&(clearInterval(a),r.isIndexedDB&&Factory.getIndexedDB().initReady().then((function(e){var t=getConstant("cacheKeys.indexeddb.store.sys"),r=e.transaction(t,"readwrite").objectStore(t);logger(["getSystemInfo",n]),put(r,Object.assign(Object.assign({},n),{id:t}))})).catch((function(e){logger(["更新IndexedDB【sys】失败",e],"warn")})),e(n))}),50)})));case 4:case"end":return e.stop()}}),e)})))}},{key:"getUserInfoEx",value:function(){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=0,jssdk("biz.user.getUserInfoEx").then((function(e){n=e})),o=(new Date).getTime(),e.abrupt("return",new Promise((function(e,i){var a=setInterval((function(){(new Date).getTime()-o>1e3&&null==n?(++t,o=(new Date).getTime(),logger(["重新调用【getUserInfoEx】",t],"warn"),jssdk("biz.user.getUserInfoEx").then((function(e){n=e})).catch((function(e){clearInterval(a),i(e)}))):t>3&&!n?(clearInterval(a),i("biz.user.getUserInfoEx timeout")):n&&(clearInterval(a),r.isIndexedDB&&Factory.getIndexedDB().initReady().then((function(e){var t=getConstant("cacheKeys.indexeddb.store.user"),r=e.transaction(t,"readwrite").objectStore(t);logger(["getUserInfoEx",n]),put(r,Object.assign(Object.assign({},n),{id:t}))})).catch((function(e){logger(["更新IndexedDB【UserInfoEx】失败",e],"warn")})),e(n))}),50)})));case 4:case"end":return e.stop()}}),e)})))}},{key:"getBaseInfoByCache",value:function(){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.isIndexedDB){e.next=3;break}return logger(["不启用缓存获取系统信息(不支持 IndexedDB)"],"warn"),e.abrupt("return",Promise.resolve());case 3:return e.prev=3,t=getConstant("cacheKeys.indexeddb.store.sys"),e.next=7,Factory.getIndexedDB().initReady();case 7:return n=e.sent,o=n.transaction([t],"readwrite"),i=o.objectStore(t),e.next=12,get$1(i,t);case 12:return a=e.sent,e.abrupt("return",a||{});case 16:return e.prev=16,e.t0=e.catch(3),e.abrupt("return",Promise.resolve({}));case 19:case"end":return e.stop()}}),e,null,[[3,16]])})))}},{key:"getHrInfo",value:function(e){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,o,i,a,s,c,u,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getHrInfoByCache(e);case 2:if(logger(["getHrInfoByCache",n=t.sent]),!n){t.next=6;break}return t.abrupt("return",new HrInfoMode(n));case 6:return t.next=8,this.ssdpRequestApp(Object.assign(Object.assign({},getConstant("ssdp.api.".concat(r.env,".hrInfo"))),{headers:{appid:this.appId},data:{BUS_DATA:base64.encode(JSON.stringify({ldap:e,isRequireAvatar:!0===this.isAvatar?"1":"0"}))}}));case 8:if(o=t.sent,i=o.RETURN_DATA,(a=new HrInfoMode(JSON.parse(base64.decode(i)))).employeeId){t.next=13;break}return t.abrupt("return",a);case 13:return t.prev=13,t.next=16,Factory.getIndexedDB().initReady();case 16:s=t.sent,c=getConstant("cacheKeys.indexeddb.store.hrInfo"),u=s.transaction(c,"readwrite"),l=u.objectStore(c),e&&(logger(["更新 HrInfo",a]),put(l,Object.assign(Object.assign({},a),{id:e,expires:(new Date).getTime()+864e5}))),t.next=26;break;case 23:t.prev=23,t.t0=t.catch(13),logger(["更新IndexedDB【hrInfo】失败",t.t0],"warn");case 26:return t.abrupt("return",a);case 27:case"end":return t.stop()}}),t,this,[[13,23]])})))}},{key:"getHrInfoByCache",value:function(e){if(logger(["从缓存中获取Hr信息"]),!r.isIndexedDB||!1===this.isHrInfoCache||!this.domain.includes(location.origin))return Promise.resolve();var t=getConstant("cacheKeys.indexeddb.store.hrInfo");return logger(["从缓存中获取Hr信息 storeKey",t]),Factory.getIndexedDB().initReady().then((function(r){logger(["从缓存中获取Hr信息 db",r]);var n=r.transaction(t,"readwrite");logger(["从缓存中获取Hr信息 transaction",n]);var o=n.objectStore(t);return logger(["从缓存中获取Hr信息 store",o]),get$1(o,e)})).then((function(e){if(logger(["从缓存中获取Hr信息 res",e]),!e)return Promise.resolve();var t=e.expires-(new Date).getTime();return logger(["HrInfo 缓存有效期",t/1e3/60/60]),Promise.resolve(t>0?e:void 0)})).catch((function(e){return logger(["获取IndexedDB【getHrInfoByCache】失败",e],"warn"),Promise.resolve()}))}},{key:"getAvatarAuthByUserId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ldap";return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function o(){return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",this.getAvatarByUserId(e,t,r,n,!0));case 1:case"end":return o.stop()}}),o,this)})))}},{key:"getAvatarByUserId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ldap",i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function a(){var s,c,u,l,p,f,d,h,g,y,v;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.getAvatarByCache(e,n);case 2:if(s=a.sent,c=s.includes,0!==s.exclusion.length){a.next=7;break}return a.abrupt("return",c);case 7:for(u=Math.ceil(e.length/t),l=[],p=1;p<=u;p++)f=(p-1)*t,l.push(this.ssdpRequestApp(Object.assign(Object.assign({},getConstant("ssdp.api.".concat(r.env,".").concat(!0===i?"avatarAuth":"avatar"))),{data:{BUS_DATA:base64.encode(JSON.stringify(_defineProperty({},o,e.slice(f,f+t))))}})));return a.next=12,Promise.all(l);case 12:d=a.sent,h=[],g=_createForOfIteratorHelper(d);try{for(g.s();!(y=g.n()).done;)v=y.value,h=h.concat(JSON.parse(base64.decode(v.RETURN_DATA)))}catch(e){g.e(e)}finally{g.f()}return this.addAvatarCache(h),a.abrupt("return",c.concat(h));case 18:case"end":return a.stop()}}),a,this)})))}},{key:"getAvatarByEmail",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.getAvatarByUserId(e,t,r,"emailList")}},{key:"addAvatarCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=getConstant("cacheKeys.indexeddb.store.avatar");Factory.getIndexedDB().initReady().then((function(r){for(var n=r.transaction(t,"readwrite").objectStore(t),o=0;o<e.length;o++){var i=e[o].account;n.put(Object.assign(Object.assign({},e[o]),{id:i,expires:(new Date).getTime()+432e6}))}})).catch((function(e){logger(["addAvatarCache error",e],"warn")}))}},{key:"getAvatarByCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!1===t)return Promise.resolve({includes:[],exclusion:e});var r=getConstant("cacheKeys.indexeddb.store.avatar");return Factory.getIndexedDB().initReady().then((function(e){return get$1(e.transaction(r,"readwrite").objectStore(r))})).then((function(t){if(!t)return Promise.resolve({exclusion:[]});for(var r=[],n=[],o=function(o){var i=e[o],a=t.findIndex((function(e){return e.id===i})),s=~a?t[a]:void 0;s&&s.expires-(new Date).getTime()>0?r.push(Object.assign(Object.assign({},s),{account:s.id})):n.push(i)},i=0;i<e.length;i++)o(i);return Promise.resolve({includes:r,exclusion:n})})).catch((function(e){return logger(["getAvatarByCache error",e],"warn"),Promise.resolve({exclusion:[]})}))}},{key:"checkOption",value:function(){return this.isLocal&&!this.devUser&&(this.error=Error("本地开发模式请设置【devUser】")),["sit","uat","pre","production"].includes(r.env.toLocaleLowerCase())||(this.error=Error("请设置正确的【env】参数")),!this.error}},{key:"queryCookie",value:function(){for(var e=document.cookie.split(";").map((function(e){return e.split("=")})).filter((function(e){return""!=_slicedToArray(e,1)[0].trim()})),t={},r=0;r<e.length;r++){var n=_slicedToArray(e[r],2),o=n[0],i=n[1];t[o.trim()]=i.trim()}return t}},{key:"getRunWorkToken",value:function(){return!0===this.isCross?(location.href.split("run3token=")[1]||"").split("#/")[0]:this.queryCookie().run3token}},{key:"redirectFeishu",value:function(e){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((n=this.getReloadSSOCount())>=3)){t.next=3;break}return t.abrupt("return",Promise.reject("超过最大重试次数 - ".concat("object"===_typeof(e)?JSON.stringify(e):e)));case 3:return localStorage.setItem("RELOAD_SSO_COUNT",JSON.stringify({count:++n,time:(new Date).getTime()})),o=location.href,location.replace("https://open.rwork.crc.com.cn/open-apis/authen/v1/index?redirect_uri=".concat(encodeURIComponent(getConstant("feishu.redirectUrl.".concat(r.env))),"&app_id=").concat(this.appId,"&state=").concat(base64.encode(JSON.stringify({url:o,appCode:this.appId,larkexpires:this.larkexpires,isCross:this.isCross})))),t.next=8,sleep(6e4);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"getReloadSSOCount",value:function(){try{var e=JSON.parse(localStorage.getItem("RELOAD_SSO_COUNT")||"{}"),t=e.count,r=e.time,n=void 0===r?0:r;return(new Date).getTime()-n>15e3?(localStorage.removeItem("RELOAD_SSO_COUNT"),0):t}catch(e){return localStorage.removeItem("RELOAD_SSO_COUNT"),0}}},{key:"getSSOUserInfo",value:function(){return request({url:getConstant("apis.getSSOUserInfo.".concat(r.env)),method:"GET",headers:{run3token:this.runWorkToken,appCode:this.appId}}).then((function(e){var t=e.data,r=t.RESPONSE,n=r.RETURN_CODE,o=(r.RETURN_DESC,r.RETURN_DATA);return"S0A00000"!==n?Promise.reject(t):Promise.resolve(o)})).catch((function(e){return Promise.reject(e)}))}},{key:"createDebugJwttoken",value:function(e){return request({url:getConstant("apis.createDebugJwttoken.".concat(r.env)),method:"GET",headers:{ldap:e,appCode:this.appId}}).then((function(e){var t=e.data,r=t.RESPONSE,n=r.RETURN_CODE,o=r.RETURN_DATA;return"S0A00000"!==n?Promise.reject(t):Promise.resolve(o.run3token)}))}},{key:"getNetworkType",value:function(){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=0,!this.isLocal){e.next=4;break}return o=mock(r.env),i=o.network,e.abrupt("return",Promise.resolve(i));case 4:return jssdk("device.connection.getNetworkType").then((function(e){n=e})),a=(new Date).getTime(),e.abrupt("return",new Promise((function(e,o){var i=setInterval((function(){(new Date).getTime()-a>1e3&&null==n?(++t,a=(new Date).getTime(),logger(["重新调用【getNetworkType】",t],"warn"),jssdk("device.connection.getNetworkType").then((function(e){n=e})).catch((function(e){clearInterval(i),o(e)}))):t>3&&!n?(clearInterval(i),o("device.connection.getNetworkType timeout")):n&&(clearInterval(i),r.isIndexedDB&&Factory.getIndexedDB().initReady().then((function(e){var t=getConstant("cacheKeys.indexeddb.store.network"),r=e.transaction(t,"readwrite").objectStore(t);logger(["getNetworkType",n]),put(r,Object.assign(Object.assign({},n),{id:t}))})).catch((function(e){logger(["更新IndexedDB【sys】失败",e],"warn")})),e(n))}),50)})));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"run3track",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,o,i,a,s,c,u,l,p,f,d,h,g,y,v=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(logger(["调用埋点",e.type]),"sit"!==r.env){t.next=3;break}return t.abrupt("return");case 3:if(n={},1===e.networkResend)n=e;else{o=navigator&&navigator.userAgent?isBroswer():{},i=e.type,a=void 0===i?"log":i,s=e.namespace,c=void 0===s?"runwork":s,u=this.appId,l=this.ldap,p=this.hrInfo,f=r.sysInfo||{},d=f.deviceID,h=f.platform,g=f.system;try{y=navigator.connection.effectiveType,o=navigator&&navigator.userAgent?isBroswer():{}}catch(e){y="",o={}}n=Object.assign({type:a||"log",namespace:c||"runwork",appId:u,userId:l,url:location.href,orgId:p?p.deptId:"",buName:p?p.businessUnitDesc:"",deviceType:h,deviceId:d,deviceVersion:g,clientVersion:r.appVersion,ipAddress:"",activityTime:getTimeStamp(new Date,"yyyy-MM-dd hh:mm:ss",!1),browser:o.name,browserVersion:o.version,networkType:y},e)}return logger(["run3track埋点参数",n]),t.abrupt("return",this.ssdpRequestApp(Object.assign(Object.assign({},getConstant("ssdp.api.".concat(r.env,".run3track"))),{data:n})).then((function(e){return Promise.resolve(e)})).catch((function(t){return logger(["埋点 fail",t],"error"),"object"===_typeof(t)&&"string"==typeof t.message&&(t=t.message),v.setCacheTrackFail(Object.assign(Object.assign({},n),{type:"error",category:"runwork-request-ecsb",action:"request",data:{pageOverTime:e.api,errorInfo:"object"===_typeof(t)?JSON.stringify(t):t},networkResend:1})),Promise.reject(t)})));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"setCacheTrackFail",value:function(e){var t=[];try{t=JSON.parse(localStorage.getItem("RUNWORK_TRACK_FAIL")||"[]")}catch(e){t=[]}t.push(e),localStorage.setItem("RUNWORK_TRACK_FAIL",JSON.stringify(t))}},{key:"callCacheTrackFail",value:function(){var e;try{e=JSON.parse(localStorage.getItem("RUNWORK_TRACK_FAIL")||"[]")}catch(t){e=[]}if(e.length>0)for(var t=0;t<e.length;t++)this.run3track(e[t]);localStorage.removeItem("RUNWORK_TRACK_FAIL")}},{key:"openUserDetail",value:function(e){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,o,i,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,getTenantAccessToken(this.appId,this.appSecret,!0,"2.0");case 2:return n=t.sent,t.next=5,this.ssdpRequestApp(Object.assign(Object.assign({},getConstant("ssdp.api.".concat(r.env,".users"))),{method:"get",type:"rf",isFormatData:!1,headers:{Authorization:"Bearer ".concat(n)},uri:e,params:{user_id_type:"user_id"}}));case 5:if(o=t.sent,0===(i=o.data).code){t.next=9;break}return t.abrupt("return",Promise.reject({code:i.code,msg:i.msg}));case 9:return a=i.data.user.open_id,/android/gi.test(window.navigator.userAgent)?window.tt.openSchema({schema:"https://applink.feishu.cn/client/chat/open?openId=".concat(a),external:!1,fail:function(e){console.error("openSchema ".concat(e))}}):window.h5sdk.biz.user.openDetail({openId:a,onFail:function(e){console.error(e)}}),t.abrupt("return",Promise.resolve());case 12:case"end":return t.stop()}}),t,this)})))}},{key:"onNetworkQualityChange",value:function(){return __awaiter(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.jssdkReady();case 2:window.tt.onNetworkQualityChange((function(e){console.log(JSON.stringify(e));var t=(e||{}).networkQualityType;logger(["网络质量",t]);var r=document.body.querySelector(".runwork-h5-unavailable-tip");if(!["unavailable","weak"].includes(t)||null===r){if(["unavailable","weak"].includes(t)){var n=document.createElement("div");return n.className="runwork-h5-unavailable-tip",n.innerText="当前网络状态弱,请检查您的网络设置",n.setAttribute("style","font-size:12px;\n color:#b95858;\n text-align: center;\n padding: 5px ;\n line-height: 20px;\n top:".concat(/iphone/gi.test(window.navigator.userAgent)?"40px":"0px",";\n position: absolute;\n transform: translateX(-50%);\n left: 50%;\n white-space: nowrap;\n background-color: #fff;\n z-index: 99;\n padding:5px\n ")),void document.body.prepend(n)}null!==r&&(null==r||r.remove())}}));case 3:case"end":return e.stop()}}),e,this)})))}}]),r}(RunworkH5Mode);RunWorkH5.env="sit",RunWorkH5.isPrivate=!1,RunWorkH5.appVersion="",RunWorkH5.filePath=[],RunWorkH5.install=function(e,t){var r=new RunWorkH5(t);!0===t.isVue3?e.config.globalProperties.$runWorkH5=r:e.prototype.$runWorkH5=r},RunWorkH5.isIndexedDB="indexedDB"in window,RunWorkH5.getEnv=function(){switch(RunWorkH5.env){case"production":return"production";default:return"test"}};var SSDPCls=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"sit",r=arguments.length>1?arguments[1]:void 0;_classCallCheck(this,e),this.url=getConstant("ssdp.cls.".concat("production"===t?"production":"test")),this.env=t,this.commonParam=r?Object.assign({},r):Object.assign({},getConstant("ssdp.cls.runwork.".concat(this.env)))}return _createClass(e,[{key:"request",value:function(e){var t=e.api,r=void 0===t?"":t,n=e.version,o=void 0===n?"":n,i=e.data,a=void 0===i?"":i,s=e.params,c=void 0===s?{}:s,u=e.headers,l=void 0===u?{}:u,p=e.method,f=void 0===p?"GET":p;return request({url:"".concat(this.url,"?ssdp=").concat(this.generateUrlParam(Object.assign({Api_ID:r,Api_Version:o,Sign:"NO_SIGN",User_Token:"null",Time_Stamp:getTimeStamp()},this.commonParam))),method:f,params:c,headers:Object.assign({run3token:RunWorkH5.runWorkToken},l),data:a})}},{key:"generateUrlParam",value:function(e){return base64.encode(Object.keys(e).map((function(t){return"".concat(t,"=").concat(e[t])})).join("&"))}},{key:"setSysOption",value:function(e){var t=e.App_Sub_ID,r=e.App_Token,n=e.Partner_ID,o=e.Sys_ID;this.App_Sub_ID=t,this.App_Token=r,this.Partner_ID=n,this.Sys_ID=o}}]),e}();exports.RunWorkH5=RunWorkH5,exports.SSDPApp=SSDPApp,exports.SSDPCls=SSDPCls,exports.SSDPDtgw=SSDPDtgw,exports.base64=base64,exports.identity=identity,exports.isIphonex=isIphonex,exports.jssdk=jssdk,Object.defineProperty(exports,"__esModule",{value:!0})}));