agora-rte-sdk 2.6.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -451,4 +451,4 @@ t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeo
|
|
|
451
451
|
*
|
|
452
452
|
* Copyright © 2012-2019 Faisal Salman <f@faisalman.com>
|
|
453
453
|
* Licensed under MIT License
|
|
454
|
-
*/!function(i,o){"use strict";var a="function",s="undefined",c="object",u="model",l="name",h="type",d="vendor",f="version",p="architecture",g="console",v="mobile",m="tablet",A="smarttv",y="wearable",b={extend:function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},_={rgx:function(e,t){for(var r,n,i,s,u,l,h=0;h<t.length&&!u;){var d=t[h],f=t[h+1];for(r=n=0;r<d.length&&!u;)if(u=d[r++].exec(e))for(i=0;i<f.length;i++)l=u[++n],typeof(s=f[i])===c&&s.length>0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):o:this[s[0]]=l?s[1].call(this,l,s[2]):o:4==s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):o):this[s]=l||o;h+=2}},str:function(e,t){for(var r in t)if(typeof t[r]===c&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(b.has(t[r][n],e))return"?"===r?o:r}else if(b.has(t[r],e))return"?"===r?o:r;return e}},E={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},w={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6}).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[l,f],[/(opios)[\/\s]+([\w\.]+)/i],[[l,"Opera Mini"],f],[/\s(opr)\/([\w\.]+)/i],[[l,"Opera"],f],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[l,f],[/(konqueror)\/([\w\.]+)/i],[[l,"Konqueror"],f],[/(trident).+rv[:\s]([\w\.]{1,9}).+like\sgecko/i],[[l,"IE"],f],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[l,"Edge"],f],[/(yabrowser)\/([\w\.]+)/i],[[l,"Yandex"],f],[/(Avast)\/([\w\.]+)/i],[[l,"Avast Secure Browser"],f],[/(AVG)\/([\w\.]+)/i],[[l,"AVG Secure Browser"],f],[/(puffin)\/([\w\.]+)/i],[[l,"Puffin"],f],[/(focus)\/([\w\.]+)/i],[[l,"Firefox Focus"],f],[/(opt)\/([\w\.]+)/i],[[l,"Opera Touch"],f],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[l,"UCBrowser"],f],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],f],[/(windowswechat qbcore)\/([\w\.]+)/i],[[l,"WeChat(Win) Desktop"],f],[/(micromessenger)\/([\w\.]+)/i],[[l,"WeChat"],f],[/(brave)\/([\w\.]+)/i],[[l,"Brave"],f],[/(whale)\/([\w\.]+)/i],[[l,"Whale"],f],[/(qqbrowserlite)\/([\w\.]+)/i],[l,f],[/(QQ)\/([\d\.]+)/i],[l,f],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[l,f],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[l,f],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[l,f],[/(MetaSr)[\/\s]?([\w\.]+)/i],[l],[/(LBBROWSER)/i],[l],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[f,[l,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[f,[l,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[l,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[l,f],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[f,[l,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[l,/(.+)/,"$1 WebView"],f],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[l,/(.+(?:g|us))(.+)/,"$1 $2"],f],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[f,[l,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[l,"Sailfish Browser"],f],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[l,f],[/(dolfin)\/([\w\.]+)/i],[[l,"Dolphin"],f],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[l,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[l,"Chrome"],f],[/(coast)\/([\w\.]+)/i],[[l,"Opera Coast"],f],[/fxios\/([\w\.-]+)/i],[f,[l,"Firefox"]],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[f,[l,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[f,l],[/webkit.+?(gsa)\/([\w\.]+)\s.*(mobile\s?safari|safari)(\/[\w\.]+)/i],[[l,"GSA"],f],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[l,[f,_.str,E.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[l,f],[/(navigator|netscape)\/([\w\.-]+)/i],[[l,"Netscape"],f],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[l,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,b.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[p,/ower/,"",b.lowerize]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[p,b.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[u,d,[h,m]],[/applecoremedia\/[\w\.]+ \((ipad)/],[u,[d,"Apple"],[h,m]],[/(apple\s{0,1}tv)/i],[[u,"Apple TV"],[d,"Apple"],[h,A]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[d,u,[h,m]],[/(kf[A-z]+)(\sbuild\/|\)).+silk\//i],[u,[d,"Amazon"],[h,m]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[u,_.str,E.device.amazon.model],[d,"Amazon"],[h,v]],[/android.+aft([bms])\sbuild/i],[u,[d,"Amazon"],[h,A]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[u,d,[h,v]],[/\((ip[honed|\s\w*]+);/i],[u,[d,"Apple"],[h,v]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[d,u,[h,v]],[/\(bb10;\s(\w+)/i],[u,[d,"BlackBerry"],[h,v]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[u,[d,"Asus"],[h,m]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[d,"Sony"],[u,"Xperia Tablet"],[h,m]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,"Sony"],[h,v]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[d,u,[h,g]],[/android.+;\s(shield)\sbuild/i],[u,[d,"Nvidia"],[h,g]],[/(playstation\s[34portablevi]+)/i],[u,[d,"Sony"],[h,g]],[/(sprint\s(\w+))/i],[[d,_.str,E.device.sprint.vendor],[u,_.str,E.device.sprint.model],[h,v]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[d,[u,/_/g," "],[h,v]],[/(nexus\s9)/i],[u,[d,"HTC"],[h,m]],[/d\/huawei([\w\s-]+)[;\)]/i,/android.+\s(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?)/i],[u,[d,"Huawei"],[h,v]],[/android.+(bah2?-a?[lw]\d{2})/i],[u,[d,"Huawei"],[h,m]],[/(microsoft);\s(lumia[\s\w]+)/i],[d,u,[h,v]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[u,[d,"Microsoft"],[h,g]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,"Microsoft"],[h,v]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[u,[d,"Motorola"],[h,v]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[u,[d,"Motorola"],[h,m]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[d,b.trim],[u,b.trim],[h,A]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,"Samsung"],[h,A]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[h,A]],[/android.+((sch-i[89]0\d|shw-m380s|SM-P605|SM-P610|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[d,"Samsung"],u,[h,m]],[/smart-tv.+(samsung)/i],[d,[h,A],u],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[d,"Samsung"],u,[h,v]],[/sie-(\w*)/i],[u,[d,"Siemens"],[h,v]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[d,"Nokia"],u,[h,v]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[u,[d,"Acer"],[h,m]],[/android.+([vl]k\-?\d{3})\s+build/i],[u,[d,"LG"],[h,m]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[d,"LG"],u,[h,m]],[/linux;\snetcast.+smarttv/i,/lg\snetcast\.tv-201\d/i],[[d,"LG"],u,[h,A]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[u,[d,"LG"],[h,v]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[d,u,[h,m]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[u,[d,"Lenovo"],[h,m]],[/(lenovo)[_\s-]?([\w-]+)/i],[d,u,[h,v]],[/linux;.+((jolla));/i],[d,u,[h,v]],[/((pebble))app\/[\d\.]+\s/i],[d,u,[h,y]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[d,u,[h,v]],[/crkey/i],[[u,"Chromecast"],[d,"Google"],[h,A]],[/android.+;\s(glass)\s\d/i],[u,[d,"Google"],[h,y]],[/android.+;\s(pixel c)[\s)]/i],[u,[d,"Google"],[h,m]],[/android.+;\s(pixel( [2-9]a?)?( xl)?)[\s)]/i],[u,[d,"Google"],[h,v]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/android.+(redmi[\s\-_]?(?:note|k)?(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i,/android.+(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[u,/_/g," "],[d,"Xiaomi"],[h,v]],[/android.+(mi[\s\-_]?(?:pad)(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i],[[u,/_/g," "],[d,"Xiaomi"],[h,m]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[u,[d,"Meizu"],[h,v]],[/(mz)-([\w-]{2,})/i],[[d,"Meizu"],u,[h,v]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[u,[d,"OnePlus"],[h,v]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[u,[d,"RCA"],[h,m]],[/android.+[;\/\s](Venue[\d\s]{2,7})\s+build/i],[u,[d,"Dell"],[h,m]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[u,[d,"Verizon"],[h,m]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[d,"Barnes & Noble"],u,[h,m]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[u,[d,"NuVision"],[h,m]],[/android.+;\s(k88)\sbuild/i],[u,[d,"ZTE"],[h,m]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[u,[d,"Swiss"],[h,v]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[u,[d,"Swiss"],[h,m]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[u,[d,"Zeki"],[h,m]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[d,"Dragon Touch"],u,[h,m]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[u,[d,"Insignia"],[h,m]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[u,[d,"NextBook"],[h,m]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[d,"Voice"],u,[h,v]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[d,"LvTel"],u,[h,v]],[/android.+;\s(PH-1)\s/i],[u,[d,"Essential"],[h,v]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[u,[d,"Envizen"],[h,m]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[d,u,[h,m]],[/android.+[;\/]\s*(Trio[\s\w\-\.]+)\s+build/i],[u,[d,"MachSpeed"],[h,m]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[d,u,[h,m]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[u,[d,"Rotor"],[h,m]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[d,u,[h,m]],[/android .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[u,[h,v]],[/android .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[u,[h,m]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,b.lowerize],d,u],[/[\s\/\(](smart-?tv)[;\)]/i],[[h,A]],[/(android[\w\.\s\-]{0,9});.+build/i],[u,[d,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[f,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[l,f],[/rv\:([\w\.]{1,9}).+(gecko)/i],[f,l]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[l,f],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[l,[f,_.str,E.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[l,"Windows"],[f,_.str,E.os.windows.version]],[/\((bb)(10);/i],[[l,"BlackBerry"],f],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[l,f],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[l,"Symbian"],f],[/\((series40);/i],[l],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[l,"Firefox OS"],f],[/crkey\/([\d\.]+)/i],[f,[l,"Chromecast"]],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[l,f],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[l,"Chromium OS"],f],[/(sunos)\s?([\w\.\d]*)/i],[[l,"Solaris"],f],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[l,f],[/(haiku)\s(\w+)/i],[l,f],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[f,/_/g,"."],[l,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[l,"Mac OS"],[f,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[l,f]]},I=function(e,t){if("object"==typeof e&&(t=e,e=o),!(this instanceof I))return new I(e,t).getResult();var r=e||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),n=t?b.extend(w,t):w;return this.getBrowser=function(){var e={name:o,version:o};return _.rgx.call(e,r,n.browser),e.major=b.major(e.version),e},this.getCPU=function(){var e={architecture:o};return _.rgx.call(e,r,n.cpu),e},this.getDevice=function(){var e={vendor:o,model:o,type:o};return _.rgx.call(e,r,n.device),e},this.getEngine=function(){var e={name:o,version:o};return _.rgx.call(e,r,n.engine),e},this.getOS=function(){var e={name:o,version:o};return _.rgx.call(e,r,n.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=e,this},this};I.VERSION="0.7.23",I.BROWSER={NAME:l,MAJOR:"major",VERSION:f},I.CPU={ARCHITECTURE:p},I.DEVICE={MODEL:u,VENDOR:d,TYPE:h,CONSOLE:g,MOBILE:v,SMARTTV:A,TABLET:m,WEARABLE:y,EMBEDDED:"embedded"},I.ENGINE={NAME:l,VERSION:f},I.OS={NAME:l,VERSION:f},typeof t!==s?(e.exports&&(t=e.exports=I),t.UAParser=I):(n=function(){return I}.call(t,r,t,e))===o||(e.exports=n);var S=i&&(i.jQuery||i.Zepto);if(S&&!S.ua){var T=new I;S.ua=T.getResult(),S.ua.get=function(){return T.getUA()},S.ua.set=function(e){T.setUA(e);var t=T.getResult();for(var r in t)S.ua[r]=t[r]}}}("object"==typeof window?window:this)},1005:e=>{"use strict";e.exports=function(e,t,r,n){var i=self||window;try{try{var o;try{o=new i.Blob([e])}catch(t){(o=new(i.BlobBuilder||i.WebKitBlobBuilder||i.MozBlobBuilder||i.MSBlobBuilder)).append(e),o=o.getBlob()}var a=i.URL||i.webkitURL,s=a.createObjectURL(o),c=new i[t](s,r);return a.revokeObjectURL(s),c}catch(n){return new i[t]("data:application/javascript,".concat(encodeURIComponent(e)),r)}}catch(e){if(!n)throw Error("Inline worker is not supported");return new i[t](n,r)}}},9662:(e,t,r)=>{var n=r(7854),i=r(614),o=r(6330),a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a function")}},9483:(e,t,r)=>{var n=r(7854),i=r(4411),o=r(6330),a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a constructor")}},6077:(e,t,r)=>{var n=r(7854),i=r(614),o=n.String,a=n.TypeError;e.exports=function(e){if("object"==typeof e||i(e))return e;throw a("Can't set "+o(e)+" as a prototype")}},1223:(e,t,r)=>{var n=r(5112),i=r(30),o=r(3070),a=n("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},1530:(e,t,r)=>{"use strict";var n=r(8710).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},5787:(e,t,r)=>{var n=r(7854),i=r(7976),o=n.TypeError;e.exports=function(e,t){if(i(t,e))return e;throw o("Incorrect invocation")}},9670:(e,t,r)=>{var n=r(7854),i=r(111),o=n.String,a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not an object")}},5381:e=>{e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7556:(e,t,r)=>{var n=r(7293);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},260:(e,t,r)=>{"use strict";var n,i,o,a=r(5381),s=r(9781),c=r(7854),u=r(614),l=r(111),h=r(2597),d=r(648),f=r(6330),p=r(8880),g=r(1320),v=r(3070).f,m=r(7976),A=r(9518),y=r(7674),b=r(5112),_=r(9711),E=c.Int8Array,w=E&&E.prototype,I=c.Uint8ClampedArray,S=I&&I.prototype,T=E&&A(E),C=w&&A(w),R=Object.prototype,k=c.TypeError,O=b("toStringTag"),N=_("TYPED_ARRAY_TAG"),x=_("TYPED_ARRAY_CONSTRUCTOR"),D=a&&!!y&&"Opera"!==d(c.opera),L=!1,P={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},M={BigInt64Array:8,BigUint64Array:8},B=function(e){if(!l(e))return!1;var t=d(e);return h(P,t)||h(M,t)};for(n in P)(o=(i=c[n])&&i.prototype)?p(o,x,i):D=!1;for(n in M)(o=(i=c[n])&&i.prototype)&&p(o,x,i);if((!D||!u(T)||T===Function.prototype)&&(T=function(){throw k("Incorrect invocation")},D))for(n in P)c[n]&&y(c[n],T);if((!D||!C||C===R)&&(C=T.prototype,D))for(n in P)c[n]&&y(c[n].prototype,C);if(D&&A(S)!==C&&y(S,C),s&&!h(C,O))for(n in L=!0,v(C,O,{get:function(){return l(this)?this[N]:void 0}}),P)c[n]&&p(c[n],N,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_CONSTRUCTOR:x,TYPED_ARRAY_TAG:L&&N,aTypedArray:function(e){if(B(e))return e;throw k("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!y||m(T,e)))return e;throw k(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(s){if(r)for(var i in P){var o=c[i];if(o&&h(o.prototype,e))try{delete o.prototype[e]}catch(e){}}C[e]&&!r||g(C,e,r?t:D&&w[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(s){if(y){if(r)for(n in P)if((i=c[n])&&h(i,e))try{delete i[e]}catch(e){}if(T[e]&&!r)return;try{return g(T,e,r?t:D&&T[e]||t)}catch(e){}}for(n in P)!(i=c[n])||i[e]&&!r||g(i,e,t)}},isView:function(e){if(!l(e))return!1;var t=d(e);return"DataView"===t||h(P,t)||h(M,t)},isTypedArray:B,TypedArray:T,TypedArrayPrototype:C}},3331:(e,t,r)=>{"use strict";var n=r(7854),i=r(1702),o=r(9781),a=r(5381),s=r(6530),c=r(8880),u=r(2248),l=r(7293),h=r(5787),d=r(9303),f=r(7466),p=r(7067),g=r(1179),v=r(9518),m=r(7674),A=r(8006).f,y=r(3070).f,b=r(1285),_=r(1589),E=r(8003),w=r(9909),I=s.PROPER,S=s.CONFIGURABLE,T=w.get,C=w.set,R="ArrayBuffer",k="DataView",O="Wrong index",N=n.ArrayBuffer,x=N,D=x&&x.prototype,L=n.DataView,P=L&&L.prototype,M=Object.prototype,B=n.Array,j=n.RangeError,U=i(b),F=i([].reverse),G=g.pack,Q=g.unpack,q=function(e){return[255&e]},V=function(e){return[255&e,e>>8&255]},K=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},H=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},W=function(e){return G(e,23,4)},z=function(e){return G(e,52,8)},Y=function(e,t){y(e.prototype,t,{get:function(){return T(this)[t]}})},X=function(e,t,r,n){var i=p(r),o=T(e);if(i+t>o.byteLength)throw j(O);var a=T(o.buffer).bytes,s=i+o.byteOffset,c=_(a,s,s+t);return n?c:F(c)},J=function(e,t,r,n,i,o){var a=p(r),s=T(e);if(a+t>s.byteLength)throw j(O);for(var c=T(s.buffer).bytes,u=a+s.byteOffset,l=n(+i),h=0;h<t;h++)c[u+h]=l[o?h:t-h-1]};if(a){var Z=I&&N.name!==R;if(l((function(){N(1)}))&&l((function(){new N(-1)}))&&!l((function(){return new N,new N(1.5),new N(NaN),Z&&!S})))Z&&S&&c(N,"name",R);else{(x=function(e){return h(this,D),new N(p(e))}).prototype=D;for(var $,ee=A(N),te=0;ee.length>te;)($=ee[te++])in x||c(x,$,N[$]);D.constructor=x}m&&v(P)!==M&&m(P,M);var re=new L(new x(2)),ne=i(P.setInt8);re.setInt8(0,2147483648),re.setInt8(1,2147483649),!re.getInt8(0)&&re.getInt8(1)||u(P,{setInt8:function(e,t){ne(this,e,t<<24>>24)},setUint8:function(e,t){ne(this,e,t<<24>>24)}},{unsafe:!0})}else D=(x=function(e){h(this,D);var t=p(e);C(this,{bytes:U(B(t),0),byteLength:t}),o||(this.byteLength=t)}).prototype,P=(L=function(e,t,r){h(this,P),h(e,D);var n=T(e).byteLength,i=d(t);if(i<0||i>n)throw j("Wrong offset");if(i+(r=void 0===r?n-i:f(r))>n)throw j("Wrong length");C(this,{buffer:e,byteLength:r,byteOffset:i}),o||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,o&&(Y(x,"byteLength"),Y(L,"buffer"),Y(L,"byteLength"),Y(L,"byteOffset")),u(P,{getInt8:function(e){return X(this,1,e)[0]<<24>>24},getUint8:function(e){return X(this,1,e)[0]},getInt16:function(e){var t=X(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=X(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return H(X(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return H(X(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Q(X(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Q(X(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){J(this,1,e,q,t)},setUint8:function(e,t){J(this,1,e,q,t)},setInt16:function(e,t){J(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){J(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){J(this,4,e,K,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){J(this,4,e,K,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){J(this,4,e,W,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){J(this,8,e,z,t,arguments.length>2?arguments[2]:void 0)}});E(x,R),E(L,k),e.exports={ArrayBuffer:x,DataView:L}},1048:(e,t,r)=>{"use strict";var n=r(7908),i=r(1400),o=r(6244),a=Math.min;e.exports=[].copyWithin||function(e,t){var r=n(this),s=o(r),c=i(e,s),u=i(t,s),l=arguments.length>2?arguments[2]:void 0,h=a((void 0===l?s:i(l,s))-u,s-c),d=1;for(u<c&&c<u+h&&(d=-1,u+=h-1,c+=h-1);h-- >0;)u in r?r[c]=r[u]:delete r[c],c+=d,u+=d;return r}},1285:(e,t,r)=>{"use strict";var n=r(7908),i=r(1400),o=r(6244);e.exports=function(e){for(var t=n(this),r=o(t),a=arguments.length,s=i(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,u=void 0===c?r:i(c,r);u>s;)t[s++]=e;return t}},8533:(e,t,r)=>{"use strict";var n=r(2092).forEach,i=r(9341)("forEach");e.exports=i?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},7745:(e,t,r)=>{var n=r(6244);e.exports=function(e,t){for(var r=0,i=n(t),o=new e(i);i>r;)o[r]=t[r++];return o}},8457:(e,t,r)=>{"use strict";var n=r(7854),i=r(9974),o=r(6916),a=r(7908),s=r(3411),c=r(7659),u=r(4411),l=r(6244),h=r(6135),d=r(8554),f=r(1246),p=n.Array;e.exports=function(e){var t=a(e),r=u(this),n=arguments.length,g=n>1?arguments[1]:void 0,v=void 0!==g;v&&(g=i(g,n>2?arguments[2]:void 0));var m,A,y,b,_,E,w=f(t),I=0;if(!w||this==p&&c(w))for(m=l(t),A=r?new this(m):p(m);m>I;I++)E=v?g(t[I],I):t[I],h(A,I,E);else for(_=(b=d(t,w)).next,A=r?new this:[];!(y=o(_,b)).done;I++)E=v?s(b,g,[y.value,I],!0):y.value,h(A,I,E);return A.length=I,A}},1318:(e,t,r)=>{var n=r(5656),i=r(1400),o=r(6244),a=function(e){return function(t,r,a){var s,c=n(t),u=o(c),l=i(a,u);if(e&&r!=r){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:(e,t,r)=>{var n=r(9974),i=r(1702),o=r(8361),a=r(7908),s=r(6244),c=r(5417),u=i([].push),l=function(e){var t=1==e,r=2==e,i=3==e,l=4==e,h=6==e,d=7==e,f=5==e||h;return function(p,g,v,m){for(var A,y,b=a(p),_=o(b),E=n(g,v),w=s(_),I=0,S=m||c,T=t?S(p,w):r||d?S(p,0):void 0;w>I;I++)if((f||I in _)&&(y=E(A=_[I],I,b),e))if(t)T[I]=y;else if(y)switch(e){case 3:return!0;case 5:return A;case 6:return I;case 2:u(T,A)}else switch(e){case 4:return!1;case 7:u(T,A)}return h?-1:i||l?l:T}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},6583:(e,t,r)=>{"use strict";var n=r(2104),i=r(5656),o=r(9303),a=r(6244),s=r(9341),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,h=s("lastIndexOf"),d=l||!h;e.exports=d?function(e){if(l)return n(u,this,arguments)||0;var t=i(this),r=a(t),s=r-1;for(arguments.length>1&&(s=c(s,o(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:u},1194:(e,t,r)=>{var n=r(7293),i=r(5112),o=r(7392),a=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:(e,t,r)=>{"use strict";var n=r(7293);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){throw 1},1)}))}},3671:(e,t,r)=>{var n=r(7854),i=r(9662),o=r(7908),a=r(8361),s=r(6244),c=n.TypeError,u=function(e){return function(t,r,n,u){i(r);var l=o(t),h=a(l),d=s(l),f=e?d-1:0,p=e?-1:1;if(n<2)for(;;){if(f in h){u=h[f],f+=p;break}if(f+=p,e?f<0:d<=f)throw c("Reduce of empty array with no initial value")}for(;e?f>=0:d>f;f+=p)f in h&&(u=r(u,h[f],f,l));return u}};e.exports={left:u(!1),right:u(!0)}},1589:(e,t,r)=>{var n=r(7854),i=r(1400),o=r(6244),a=r(6135),s=n.Array,c=Math.max;e.exports=function(e,t,r){for(var n=o(e),u=i(t,n),l=i(void 0===r?n:r,n),h=s(c(l-u,0)),d=0;u<l;u++,d++)a(h,d,e[u]);return h.length=d,h}},206:(e,t,r)=>{var n=r(1702);e.exports=n([].slice)},4362:(e,t,r)=>{var n=r(1589),i=Math.floor,o=function(e,t){var r=e.length,c=i(r/2);return r<8?a(e,t):s(e,o(n(e,0,c),t),o(n(e,c),t),t)},a=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},s=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e};e.exports=o},7475:(e,t,r)=>{var n=r(7854),i=r(3157),o=r(4411),a=r(111),s=r(5112)("species"),c=n.Array;e.exports=function(e){var t;return i(e)&&(t=e.constructor,(o(t)&&(t===c||i(t.prototype))||a(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?c:t}},5417:(e,t,r)=>{var n=r(7475);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},3411:(e,t,r)=>{var n=r(9670),i=r(9212);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},7072:(e,t,r)=>{var n=r(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},4326:(e,t,r)=>{var n=r(1702),i=n({}.toString),o=n("".slice);e.exports=function(e){return o(i(e),8,-1)}},648:(e,t,r)=>{var n=r(7854),i=r(1694),o=r(614),a=r(4326),s=r(5112)("toStringTag"),c=n.Object,u="Arguments"==a(function(){return arguments}());e.exports=i?a:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=c(e),s))?r:u?a(t):"Object"==(n=a(t))&&o(t.callee)?"Arguments":n}},1501:(e,t,r)=>{"use strict";var n=r(6916),i=r(9662),o=r(9670);e.exports=function(){for(var e=o(this),t=i(e.add),r=0,a=arguments.length;r<a;r++)n(t,e,arguments[r]);return e}},4092:(e,t,r)=>{"use strict";var n=r(6916),i=r(9662),o=r(9670);e.exports=function(){for(var e,t=o(this),r=i(t.delete),a=!0,s=0,c=arguments.length;s<c;s++)e=n(r,t,arguments[s]),a=a&&e;return!!a}},5631:(e,t,r)=>{"use strict";var n=r(3070).f,i=r(30),o=r(2248),a=r(9974),s=r(5787),c=r(408),u=r(654),l=r(6340),h=r(9781),d=r(2423).fastKey,f=r(9909),p=f.set,g=f.getterFor;e.exports={getConstructor:function(e,t,r,u){var l=e((function(e,n){s(e,f),p(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),h||(e.size=0),null!=n&&c(n,e[u],{that:e,AS_ENTRIES:r})})),f=l.prototype,v=g(t),m=function(e,t,r){var n,i,o=v(e),a=A(e,t);return a?a.value=r:(o.last=a={index:i=d(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=a),n&&(n.next=a),h?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},A=function(e,t){var r,n=v(e),i=d(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return o(f,{clear:function(){for(var e=v(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,h?e.size=0:this.size=0},delete:function(e){var t=this,r=v(t),n=A(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),h?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=v(this),n=a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!A(this,e)}}),o(f,r?{get:function(e){var t=A(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),h&&n(f,"size",{get:function(){return v(this).size}}),l},setStrong:function(e,t,r){var n=t+" Iterator",i=g(t),o=g(n);u(e,t,(function(e,t){p(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),l(t)}}},9320:(e,t,r)=>{"use strict";var n=r(1702),i=r(2248),o=r(2423).getWeakData,a=r(9670),s=r(111),c=r(5787),u=r(408),l=r(2092),h=r(2597),d=r(9909),f=d.set,p=d.getterFor,g=l.find,v=l.findIndex,m=n([].splice),A=0,y=function(e){return e.frozen||(e.frozen=new b)},b=function(){this.entries=[]},_=function(e,t){return g(e.entries,(function(e){return e[0]===t}))};b.prototype={get:function(e){var t=_(this,e);if(t)return t[1]},has:function(e){return!!_(this,e)},set:function(e,t){var r=_(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=v(this.entries,(function(t){return t[0]===e}));return~t&&m(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,r,n){var l=e((function(e,i){c(e,d),f(e,{type:t,id:A++,frozen:void 0}),null!=i&&u(i,e[n],{that:e,AS_ENTRIES:r})})),d=l.prototype,g=p(t),v=function(e,t,r){var n=g(e),i=o(a(t),!0);return!0===i?y(n).set(t,r):i[n.id]=r,e};return i(d,{delete:function(e){var t=g(this);if(!s(e))return!1;var r=o(e);return!0===r?y(t).delete(e):r&&h(r,t.id)&&delete r[t.id]},has:function(e){var t=g(this);if(!s(e))return!1;var r=o(e);return!0===r?y(t).has(e):r&&h(r,t.id)}}),i(d,r?{get:function(e){var t=g(this);if(s(e)){var r=o(e);return!0===r?y(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return v(this,e,t)}}:{add:function(e){return v(this,e,!0)}}),l}}},7710:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(1702),a=r(4705),s=r(1320),c=r(2423),u=r(408),l=r(5787),h=r(614),d=r(111),f=r(7293),p=r(7072),g=r(8003),v=r(9587);e.exports=function(e,t,r){var m=-1!==e.indexOf("Map"),A=-1!==e.indexOf("Weak"),y=m?"set":"add",b=i[e],_=b&&b.prototype,E=b,w={},I=function(e){var t=o(_[e]);s(_,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(A&&!d(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return A&&!d(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(A&&!d(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(a(e,!h(b)||!(A||_.forEach&&!f((function(){(new b).entries().next()})))))E=r.getConstructor(t,e,m,y),c.enable();else if(a(e,!0)){var S=new E,T=S[y](A?{}:-0,1)!=S,C=f((function(){S.has(1)})),R=p((function(e){new b(e)})),k=!A&&f((function(){for(var e=new b,t=5;t--;)e[y](t,t);return!e.has(-0)}));R||((E=t((function(e,t){l(e,_);var r=v(new b,e,E);return null!=t&&u(t,r[y],{that:r,AS_ENTRIES:m}),r}))).prototype=_,_.constructor=E),(C||k)&&(I("delete"),I("has"),m&&I("get")),(k||T)&&I(y),A&&_.clear&&delete _.clear}return w[e]=E,n({global:!0,forced:E!=b},w),g(E,e),A||r.setStrong(E,e,m),E}},9920:(e,t,r)=>{var n=r(2597),i=r(3887),o=r(1236),a=r(3070);e.exports=function(e,t,r){for(var s=i(t),c=a.f,u=o.f,l=0;l<s.length;l++){var h=s[l];n(e,h)||r&&n(r,h)||c(e,h,u(t,h))}}},4964:(e,t,r)=>{var n=r(5112)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},8544:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4230:(e,t,r)=>{var n=r(1702),i=r(4488),o=r(1340),a=/"/g,s=n("".replace);e.exports=function(e,t,r,n){var c=o(i(e)),u="<"+t;return""!==r&&(u+=" "+r+'="'+s(o(n),a,""")+'"'),u+">"+c+"</"+t+">"}},4994:(e,t,r)=>{"use strict";var n=r(3383).IteratorPrototype,i=r(30),o=r(9114),a=r(8003),s=r(7497),c=function(){return this};e.exports=function(e,t,r,u){var l=t+" Iterator";return e.prototype=i(n,{next:o(+!u,r)}),a(e,l,!1,!0),s[l]=c,e}},8880:(e,t,r)=>{var n=r(9781),i=r(3070),o=r(9114);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},9114:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:(e,t,r)=>{"use strict";var n=r(4948),i=r(3070),o=r(9114);e.exports=function(e,t,r){var a=n(t);a in e?i.f(e,a,o(0,r)):e[a]=r}},654:(e,t,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(1913),a=r(6530),s=r(614),c=r(4994),u=r(9518),l=r(7674),h=r(8003),d=r(8880),f=r(1320),p=r(5112),g=r(7497),v=r(3383),m=a.PROPER,A=a.CONFIGURABLE,y=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,_=p("iterator"),E="keys",w="values",I="entries",S=function(){return this};e.exports=function(e,t,r,a,p,v,T){c(r,t,a);var C,R,k,O=function(e){if(e===p&&P)return P;if(!b&&e in D)return D[e];switch(e){case E:case w:case I:return function(){return new r(this,e)}}return function(){return new r(this)}},N=t+" Iterator",x=!1,D=e.prototype,L=D[_]||D["@@iterator"]||p&&D[p],P=!b&&L||O(p),M="Array"==t&&D.entries||L;if(M&&(C=u(M.call(new e)))!==Object.prototype&&C.next&&(o||u(C)===y||(l?l(C,y):s(C[_])||f(C,_,S)),h(C,N,!0,!0),o&&(g[N]=S)),m&&p==w&&L&&L.name!==w&&(!o&&A?d(D,"name",w):(x=!0,P=function(){return i(L,this)})),p)if(R={values:O(w),keys:v?P:O(E),entries:O(I)},T)for(k in R)(b||x||!(k in D))&&f(D,k,R[k]);else n({target:t,proto:!0,forced:b||x},R);return o&&!T||D[_]===P||f(D,_,P,{name:p}),g[t]=P,R}},7235:(e,t,r)=>{var n=r(857),i=r(2597),o=r(6061),a=r(3070).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},9781:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(e,t,r)=>{var n=r(7854),i=r(111),o=n.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},8324:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(e,t,r)=>{var n=r(317)("span").classList,i=n&&n.constructor&&n.constructor.prototype;e.exports=i===Object.prototype?void 0:i},8886:(e,t,r)=>{var n=r(8113).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},7871:e=>{e.exports="object"==typeof window},256:(e,t,r)=>{var n=r(8113);e.exports=/MSIE|Trident/.test(n)},1528:(e,t,r)=>{var n=r(8113),i=r(7854);e.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==i.Pebble},6833:(e,t,r)=>{var n=r(8113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:(e,t,r)=>{var n=r(4326),i=r(7854);e.exports="process"==n(i.process)},1036:(e,t,r)=>{var n=r(8113);e.exports=/web0s(?!.*chrome)/i.test(n)},8113:(e,t,r)=>{var n=r(5005);e.exports=n("navigator","userAgent")||""},7392:(e,t,r)=>{var n,i,o=r(7854),a=r(8113),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(i=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},8008:(e,t,r)=>{var n=r(8113).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(e,t,r)=>{var n=r(7854),i=r(1236).f,o=r(8880),a=r(1320),s=r(3505),c=r(9920),u=r(4705);e.exports=function(e,t){var r,l,h,d,f,p=e.target,g=e.global,v=e.stat;if(r=g?n:v?n[p]||s(p,{}):(n[p]||{}).prototype)for(l in t){if(d=t[l],h=e.noTargetGet?(f=i(r,l))&&f.value:r[l],!u(g?l:p+(v?".":"#")+l,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;c(d,h)}(e.sham||h&&h.sham)&&o(d,"sham",!0),a(r,l,d,e)}}},7293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:(e,t,r)=>{"use strict";r(4916);var n=r(1702),i=r(1320),o=r(2261),a=r(7293),s=r(5112),c=r(8880),u=s("species"),l=RegExp.prototype;e.exports=function(e,t,r,h){var d=s(e),f=!a((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),p=f&&!a((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[d]=/./[d]),r.exec=function(){return t=!0,null},r[d](""),!t}));if(!f||!p||r){var g=n(/./[d]),v=t(d,""[e],(function(e,t,r,i,a){var s=n(e),c=t.exec;return c===o||c===l.exec?f&&!a?{done:!0,value:g(t,r,i)}:{done:!0,value:s(r,t,i)}:{done:!1}}));i(String.prototype,e,v[0]),i(l,d,v[1])}h&&c(l[d],"sham",!0)}},6677:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:e=>{var t=Function.prototype,r=t.apply,n=t.bind,i=t.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?i.bind(r):function(){return i.apply(r,arguments)})},9974:(e,t,r)=>{var n=r(1702),i=r(9662),o=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?o(e,t):function(){return e.apply(t,arguments)}}},7065:(e,t,r)=>{"use strict";var n=r(7854),i=r(1702),o=r(9662),a=r(111),s=r(2597),c=r(206),u=n.Function,l=i([].concat),h=i([].join),d={},f=function(e,t,r){if(!s(d,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";d[t]=u("C,a","return new C("+h(n,",")+")")}return d[t](e,r)};e.exports=u.bind||function(e){var t=o(this),r=t.prototype,n=c(arguments,1),i=function(){var r=l(n,c(arguments));return this instanceof i?f(t,r.length,r):t.apply(e,r)};return a(r)&&(i.prototype=r),i}},6916:e=>{var t=Function.prototype.call;e.exports=t.bind?t.bind(t):function(){return t.apply(t,arguments)}},6530:(e,t,r)=>{var n=r(9781),i=r(2597),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},1702:e=>{var t=Function.prototype,r=t.bind,n=t.call,i=r&&r.bind(n);e.exports=r?function(e){return e&&i(n,e)}:function(e){return e&&function(){return n.apply(e,arguments)}}},5005:(e,t,r)=>{var n=r(7854),i=r(614),o=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},1246:(e,t,r)=>{var n=r(648),i=r(8173),o=r(7497),a=r(5112)("iterator");e.exports=function(e){if(null!=e)return i(e,a)||i(e,"@@iterator")||o[n(e)]}},8554:(e,t,r)=>{var n=r(7854),i=r(6916),o=r(9662),a=r(9670),s=r(6330),c=r(1246),u=n.TypeError;e.exports=function(e,t){var r=arguments.length<2?c(e):t;if(o(r))return a(i(r,e));throw u(s(e)+" is not iterable")}},4647:(e,t,r)=>{var n=r(6916);e.exports=function(e){return n(Map.prototype.entries,e)}},8173:(e,t,r)=>{var n=r(9662);e.exports=function(e,t){var r=e[t];return null==r?void 0:n(r)}},6767:(e,t,r)=>{var n=r(6916);e.exports=function(e){return n(Set.prototype.values,e)}},647:(e,t,r)=>{var n=r(1702),i=r(7908),o=Math.floor,a=n("".charAt),s=n("".replace),c=n("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,r,n,h,d){var f=r+e.length,p=n.length,g=l;return void 0!==h&&(h=i(h),g=u),s(d,g,(function(i,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return c(t,0,r);case"'":return c(t,f);case"<":u=h[c(s,1,-1)];break;default:var l=+s;if(0===l)return i;if(l>p){var d=o(l/10);return 0===d?i:d<=p?void 0===n[d-1]?a(s,1):n[d-1]+a(s,1):i}u=n[l-1]}return void 0===u?"":u}))}},7854:(e,t,r)=>{var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:(e,t,r)=>{var n=r(1702),i=r(7908),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},3501:e=>{e.exports={}},842:(e,t,r)=>{var n=r(7854);e.exports=function(e,t){var r=n.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}},490:(e,t,r)=>{var n=r(5005);e.exports=n("document","documentElement")},4664:(e,t,r)=>{var n=r(9781),i=r(7293),o=r(317);e.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},1179:(e,t,r)=>{var n=r(7854).Array,i=Math.abs,o=Math.pow,a=Math.floor,s=Math.log,c=Math.LN2;e.exports={pack:function(e,t,r){var u,l,h,d=n(r),f=8*r-t-1,p=(1<<f)-1,g=p>>1,v=23===t?o(2,-24)-o(2,-77):0,m=e<0||0===e&&1/e<0?1:0,A=0;for((e=i(e))!=e||e===1/0?(l=e!=e?1:0,u=p):(u=a(s(e)/c),e*(h=o(2,-u))<1&&(u--,h*=2),(e+=u+g>=1?v/h:v*o(2,1-g))*h>=2&&(u++,h/=2),u+g>=p?(l=0,u=p):u+g>=1?(l=(e*h-1)*o(2,t),u+=g):(l=e*o(2,g-1)*o(2,t),u=0));t>=8;)d[A++]=255&l,l/=256,t-=8;for(u=u<<t|l,f+=t;f>0;)d[A++]=255&u,u/=256,f-=8;return d[--A]|=128*m,d},unpack:function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,s=a>>1,c=i-7,u=n-1,l=e[u--],h=127&l;for(l>>=7;c>0;)h=256*h+e[u--],c-=8;for(r=h&(1<<-c)-1,h>>=-c,c+=t;c>0;)r=256*r+e[u--],c-=8;if(0===h)h=1-s;else{if(h===a)return r?NaN:l?-1/0:1/0;r+=o(2,t),h-=s}return(l?-1:1)*r*o(2,h-t)}}},8361:(e,t,r)=>{var n=r(7854),i=r(1702),o=r(7293),a=r(4326),s=n.Object,c=i("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?c(e,""):s(e)}:s},9587:(e,t,r)=>{var n=r(614),i=r(111),o=r(7674);e.exports=function(e,t,r){var a,s;return o&&n(a=t.constructor)&&a!==r&&i(s=a.prototype)&&s!==r.prototype&&o(e,s),e}},2788:(e,t,r)=>{var n=r(1702),i=r(614),o=r(5465),a=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},2423:(e,t,r)=>{var n=r(2109),i=r(1702),o=r(3501),a=r(111),s=r(2597),c=r(3070).f,u=r(8006),l=r(1156),h=r(2050),d=r(9711),f=r(6677),p=!1,g=d("meta"),v=0,m=function(e){c(e,g,{value:{objectID:"O"+v++,weakData:{}}})},A=e.exports={enable:function(){A.enable=function(){},p=!0;var e=u.f,t=i([].splice),r={};r[g]=1,e(r).length&&(u.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===g){t(n,i,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,g)){if(!h(e))return"F";if(!t)return"E";m(e)}return e[g].objectID},getWeakData:function(e,t){if(!s(e,g)){if(!h(e))return!0;if(!t)return!1;m(e)}return e[g].weakData},onFreeze:function(e){return f&&p&&h(e)&&!s(e,g)&&m(e),e}};o[g]=!0},9909:(e,t,r)=>{var n,i,o,a=r(8536),s=r(7854),c=r(1702),u=r(111),l=r(8880),h=r(2597),d=r(5465),f=r(6200),p=r(3501),g="Object already initialized",v=s.TypeError,m=s.WeakMap;if(a||d.state){var A=d.state||(d.state=new m),y=c(A.get),b=c(A.has),_=c(A.set);n=function(e,t){if(b(A,e))throw new v(g);return t.facade=e,_(A,e,t),t},i=function(e){return y(A,e)||{}},o=function(e){return b(A,e)}}else{var E=f("state");p[E]=!0,n=function(e,t){if(h(e,E))throw new v(g);return t.facade=e,l(e,E,t),t},i=function(e){return h(e,E)?e[E]:{}},o=function(e){return h(e,E)}}e.exports={set:n,get:i,has:o,enforce:function(e){return o(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=i(t)).type!==e)throw v("Incompatible receiver, "+e+" required");return r}}}},7659:(e,t,r)=>{var n=r(5112),i=r(7497),o=n("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:(e,t,r)=>{var n=r(4326);e.exports=Array.isArray||function(e){return"Array"==n(e)}},614:e=>{e.exports=function(e){return"function"==typeof e}},4411:(e,t,r)=>{var n=r(1702),i=r(7293),o=r(614),a=r(648),s=r(5005),c=r(2788),u=function(){},l=[],h=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=n(d.exec),p=!d.exec(u),g=function(e){if(!o(e))return!1;try{return h(u,l,e),!0}catch(e){return!1}},v=function(e){if(!o(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!f(d,c(e))}catch(e){return!0}};v.sham=!0,e.exports=!h||i((function(){var e;return g(g.call)||!g(Object)||!g((function(){e=!0}))||e}))?v:g},4705:(e,t,r)=>{var n=r(7293),i=r(614),o=/#|\.prototype\./,a=function(e,t){var r=c[s(e)];return r==l||r!=u&&(i(t)?n(t):!!t)},s=a.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},5988:(e,t,r)=>{var n=r(111),i=Math.floor;e.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&i(e)===e}},111:(e,t,r)=>{var n=r(614);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},1913:e=>{e.exports=!1},7850:(e,t,r)=>{var n=r(111),i=r(4326),o=r(5112)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},2190:(e,t,r)=>{var n=r(7854),i=r(5005),o=r(614),a=r(7976),s=r(3307),c=n.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return o(t)&&a(t.prototype,c(e))}},408:(e,t,r)=>{var n=r(7854),i=r(9974),o=r(6916),a=r(9670),s=r(6330),c=r(7659),u=r(6244),l=r(7976),h=r(8554),d=r(1246),f=r(9212),p=n.TypeError,g=function(e,t){this.stopped=e,this.result=t},v=g.prototype;e.exports=function(e,t,r){var n,m,A,y,b,_,E,w=r&&r.that,I=!(!r||!r.AS_ENTRIES),S=!(!r||!r.IS_ITERATOR),T=!(!r||!r.INTERRUPTED),C=i(t,w),R=function(e){return n&&f(n,"normal",e),new g(!0,e)},k=function(e){return I?(a(e),T?C(e[0],e[1],R):C(e[0],e[1])):T?C(e,R):C(e)};if(S)n=e;else{if(!(m=d(e)))throw p(s(e)+" is not iterable");if(c(m)){for(A=0,y=u(e);y>A;A++)if((b=k(e[A]))&&l(v,b))return b;return new g(!1)}n=h(e,m)}for(_=n.next;!(E=o(_,n)).done;){try{b=k(E.value)}catch(e){f(n,"throw",e)}if("object"==typeof b&&b&&l(v,b))return b}return new g(!1)}},9212:(e,t,r)=>{var n=r(6916),i=r(9670),o=r(8173);e.exports=function(e,t,r){var a,s;i(e);try{if(!(a=o(e,"return"))){if("throw"===t)throw r;return r}a=n(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw r;if(s)throw a;return i(a),r}},3383:(e,t,r)=>{"use strict";var n,i,o,a=r(7293),s=r(614),c=r(30),u=r(9518),l=r(1320),h=r(5112),d=r(1913),f=h("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(n=i):p=!0),null==n||a((function(){var e={};return n[f].call(e)!==e}))?n={}:d&&(n=c(n)),s(n[f])||l(n,f,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},7497:e=>{e.exports={}},6244:(e,t,r)=>{var n=r(7466);e.exports=function(e){return n(e.length)}},5948:(e,t,r)=>{var n,i,o,a,s,c,u,l,h=r(7854),d=r(9974),f=r(1236).f,p=r(261).set,g=r(6833),v=r(1528),m=r(1036),A=r(5268),y=h.MutationObserver||h.WebKitMutationObserver,b=h.document,_=h.process,E=h.Promise,w=f(h,"queueMicrotask"),I=w&&w.value;I||(n=function(){var e,t;for(A&&(e=_.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},g||A||m||!y||!b?!v&&E&&E.resolve?((u=E.resolve(void 0)).constructor=E,l=d(u.then,u),a=function(){l(n)}):A?a=function(){_.nextTick(n)}:(p=d(p,h),a=function(){p(n)}):(s=!0,c=b.createTextNode(""),new y(n).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),e.exports=I||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},3366:(e,t,r)=>{var n=r(7854);e.exports=n.Promise},133:(e,t,r)=>{var n=r(7392),i=r(7293);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8536:(e,t,r)=>{var n=r(7854),i=r(614),o=r(2788),a=n.WeakMap;e.exports=i(a)&&/native code/.test(o(a))},8523:(e,t,r)=>{"use strict";var n=r(9662),i=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=n(t),this.reject=n(r)};e.exports.f=function(e){return new i(e)}},3929:(e,t,r)=>{var n=r(7854),i=r(7850),o=n.TypeError;e.exports=function(e){if(i(e))throw o("The method doesn't accept regular expressions");return e}},3009:(e,t,r)=>{var n=r(7854),i=r(7293),o=r(1702),a=r(1340),s=r(3111).trim,c=r(1361),u=n.parseInt,l=n.Symbol,h=l&&l.iterator,d=/^[+-]?0x/i,f=o(d.exec),p=8!==u(c+"08")||22!==u(c+"0x16")||h&&!i((function(){u(Object(h))}));e.exports=p?function(e,t){var r=s(a(e));return u(r,t>>>0||(f(d,r)?16:10))}:u},1574:(e,t,r)=>{"use strict";var n=r(9781),i=r(1702),o=r(6916),a=r(7293),s=r(1956),c=r(5181),u=r(5296),l=r(7908),h=r(8361),d=Object.assign,f=Object.defineProperty,p=i([].concat);e.exports=!d||a((function(){if(n&&1!==d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(e){t[e]=e})),7!=d({},e)[r]||s(d({},t)).join("")!=i}))?function(e,t){for(var r=l(e),i=arguments.length,a=1,d=c.f,f=u.f;i>a;)for(var g,v=h(arguments[a++]),m=d?p(s(v),d(v)):s(v),A=m.length,y=0;A>y;)g=m[y++],n&&!o(f,v,g)||(r[g]=v[g]);return r}:d},30:(e,t,r)=>{var n,i=r(9670),o=r(6048),a=r(748),s=r(3501),c=r(490),u=r(317),l=r(6200),h=l("IE_PROTO"),d=function(){},f=function(e){return"<script>"+e+"</"+"script>"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t;g="undefined"!=typeof document?document.domain&&n?p(n):((t=u("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):p(n);for(var r=a.length;r--;)delete g.prototype[a[r]];return g()};s[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(d.prototype=i(e),r=new d,d.prototype=null,r[h]=e):r=g(),void 0===t?r:o(r,t)}},6048:(e,t,r)=>{var n=r(9781),i=r(3070),o=r(9670),a=r(5656),s=r(1956);e.exports=n?Object.defineProperties:function(e,t){o(e);for(var r,n=a(t),c=s(t),u=c.length,l=0;u>l;)i.f(e,r=c[l++],n[r]);return e}},3070:(e,t,r)=>{var n=r(7854),i=r(9781),o=r(4664),a=r(9670),s=r(4948),c=n.TypeError,u=Object.defineProperty;t.f=i?u:function(e,t,r){if(a(e),t=s(t),a(r),o)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},1236:(e,t,r)=>{var n=r(9781),i=r(6916),o=r(5296),a=r(9114),s=r(5656),c=r(4948),u=r(2597),l=r(4664),h=Object.getOwnPropertyDescriptor;t.f=n?h:function(e,t){if(e=s(e),t=c(t),l)try{return h(e,t)}catch(e){}if(u(e,t))return a(!i(o.f,e,t),e[t])}},1156:(e,t,r)=>{var n=r(4326),i=r(5656),o=r(8006).f,a=r(1589),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==n(e)?function(e){try{return o(e)}catch(e){return a(s)}}(e):o(i(e))}},8006:(e,t,r)=>{var n=r(6324),i=r(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},5181:(e,t)=>{t.f=Object.getOwnPropertySymbols},9518:(e,t,r)=>{var n=r(7854),i=r(2597),o=r(614),a=r(7908),s=r(6200),c=r(8544),u=s("IE_PROTO"),l=n.Object,h=l.prototype;e.exports=c?l.getPrototypeOf:function(e){var t=a(e);if(i(t,u))return t[u];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof l?h:null}},2050:(e,t,r)=>{var n=r(7293),i=r(111),o=r(4326),a=r(7556),s=Object.isExtensible,c=n((function(){s(1)}));e.exports=c||a?function(e){return!!i(e)&&((!a||"ArrayBuffer"!=o(e))&&(!s||s(e)))}:s},7976:(e,t,r)=>{var n=r(1702);e.exports=n({}.isPrototypeOf)},6324:(e,t,r)=>{var n=r(1702),i=r(2597),o=r(5656),a=r(1318).indexOf,s=r(3501),c=n([].push);e.exports=function(e,t){var r,n=o(e),u=0,l=[];for(r in n)!i(s,r)&&i(n,r)&&c(l,r);for(;t.length>u;)i(n,r=t[u++])&&(~a(l,r)||c(l,r));return l}},1956:(e,t,r)=>{var n=r(6324),i=r(748);e.exports=Object.keys||function(e){return n(e,i)}},5296:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);t.f=i?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},7674:(e,t,r)=>{var n=r(1702),i=r(9670),o=r(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return i(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},4699:(e,t,r)=>{var n=r(9781),i=r(1702),o=r(1956),a=r(5656),s=i(r(5296).f),c=i([].push),u=function(e){return function(t){for(var r,i=a(t),u=o(i),l=u.length,h=0,d=[];l>h;)r=u[h++],n&&!s(i,r)||c(d,e?[r,i[r]]:i[r]);return d}};e.exports={entries:u(!0),values:u(!1)}},288:(e,t,r)=>{"use strict";var n=r(1694),i=r(648);e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(e,t,r)=>{var n=r(7854),i=r(6916),o=r(614),a=r(111),s=n.TypeError;e.exports=function(e,t){var r,n;if("string"===t&&o(r=e.toString)&&!a(n=i(r,e)))return n;if(o(r=e.valueOf)&&!a(n=i(r,e)))return n;if("string"!==t&&o(r=e.toString)&&!a(n=i(r,e)))return n;throw s("Can't convert object to primitive value")}},3887:(e,t,r)=>{var n=r(5005),i=r(1702),o=r(8006),a=r(5181),s=r(9670),c=i([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),r=a.f;return r?c(t,r(e)):t}},857:(e,t,r)=>{var n=r(7854);e.exports=n},2534:e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},9478:(e,t,r)=>{var n=r(9670),i=r(111),o=r(8523);e.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;var r=o.f(e);return(0,r.resolve)(t),r.promise}},8572:e=>{var t=function(){this.head=null,this.tail=null};t.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}},e.exports=t},2248:(e,t,r)=>{var n=r(1320);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},1320:(e,t,r)=>{var n=r(7854),i=r(614),o=r(2597),a=r(8880),s=r(3505),c=r(2788),u=r(9909),l=r(6530).CONFIGURABLE,h=u.get,d=u.enforce,f=String(String).split("String");(e.exports=function(e,t,r,c){var u,h=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,g=!!c&&!!c.noTargetGet,v=c&&void 0!==c.name?c.name:t;i(r)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(r,"name")||l&&r.name!==v)&&a(r,"name",v),(u=d(r)).source||(u.source=f.join("string"==typeof v?v:""))),e!==n?(h?!g&&e[t]&&(p=!0):delete e[t],p?e[t]=r:a(e,t,r)):p?e[t]=r:s(t,r)})(Function.prototype,"toString",(function(){return i(this)&&h(this).source||c(this)}))},7651:(e,t,r)=>{var n=r(7854),i=r(6916),o=r(9670),a=r(614),s=r(4326),c=r(2261),u=n.TypeError;e.exports=function(e,t){var r=e.exec;if(a(r)){var n=i(r,e,t);return null!==n&&o(n),n}if("RegExp"===s(e))return i(c,e,t);throw u("RegExp#exec called on incompatible receiver")}},2261:(e,t,r)=>{"use strict";var n,i,o=r(6916),a=r(1702),s=r(1340),c=r(7066),u=r(2999),l=r(2309),h=r(30),d=r(9909).get,f=r(9441),p=r(7168),g=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,m=v,A=a("".charAt),y=a("".indexOf),b=a("".replace),_=a("".slice),E=(i=/b*/g,o(v,n=/a/,"a"),o(v,i,"a"),0!==n.lastIndex||0!==i.lastIndex),w=u.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(E||I||w||f||p)&&(m=function(e){var t,r,n,i,a,u,l,f=this,p=d(f),S=s(e),T=p.raw;if(T)return T.lastIndex=f.lastIndex,t=o(m,T,S),f.lastIndex=T.lastIndex,t;var C=p.groups,R=w&&f.sticky,k=o(c,f),O=f.source,N=0,x=S;if(R&&(k=b(k,"y",""),-1===y(k,"g")&&(k+="g"),x=_(S,f.lastIndex),f.lastIndex>0&&(!f.multiline||f.multiline&&"\n"!==A(S,f.lastIndex-1))&&(O="(?: "+O+")",x=" "+x,N++),r=new RegExp("^(?:"+O+")",k)),I&&(r=new RegExp("^"+O+"$(?!\\s)",k)),E&&(n=f.lastIndex),i=o(v,R?r:f,x),R?i?(i.input=_(i.input,N),i[0]=_(i[0],N),i.index=f.lastIndex,f.lastIndex+=i[0].length):f.lastIndex=0:E&&i&&(f.lastIndex=f.global?i.index+i[0].length:n),I&&i&&i.length>1&&o(g,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&C)for(i.groups=u=h(null),a=0;a<C.length;a++)u[(l=C[a])[0]]=i[l[1]];return i}),e.exports=m},7066:(e,t,r)=>{"use strict";var n=r(9670);e.exports=function(){var e=n(this),t="";return 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}},2999:(e,t,r)=>{var n=r(7293),i=r(7854).RegExp,o=n((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=o||n((function(){return!i("a","y").sticky})),s=o||n((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},9441:(e,t,r)=>{var n=r(7293),i=r(7854).RegExp;e.exports=n((function(){var e=i(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},7168:(e,t,r)=>{var n=r(7293),i=r(7854).RegExp;e.exports=n((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},4488:(e,t,r)=>{var n=r(7854).TypeError;e.exports=function(e){if(null==e)throw n("Can't call method on "+e);return e}},6465:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},3505:(e,t,r)=>{var n=r(7854),i=Object.defineProperty;e.exports=function(e,t){try{i(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},6340:(e,t,r)=>{"use strict";var n=r(5005),i=r(3070),o=r(5112),a=r(9781),s=o("species");e.exports=function(e){var t=n(e),r=i.f;a&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},8003:(e,t,r)=>{var n=r(3070).f,i=r(2597),o=r(5112)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!i(e,o)&&n(e,o,{configurable:!0,value:t})}},6200:(e,t,r)=>{var n=r(2309),i=r(9711),o=n("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:(e,t,r)=>{var n=r(7854),i=r(3505),o="__core-js_shared__",a=n[o]||i(o,{});e.exports=a},2309:(e,t,r)=>{var n=r(1913),i=r(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.20.1",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:(e,t,r)=>{var n=r(9670),i=r(9483),o=r(5112)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||null==(r=n(a)[o])?t:i(r)}},3429:(e,t,r)=>{var n=r(7293);e.exports=function(e){return n((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},8710:(e,t,r)=>{var n=r(1702),i=r(9303),o=r(1340),a=r(4488),s=n("".charAt),c=n("".charCodeAt),u=n("".slice),l=function(e){return function(t,r){var n,l,h=o(a(t)),d=i(r),f=h.length;return d<0||d>=f?e?"":void 0:(n=c(h,d))<55296||n>56319||d+1===f||(l=c(h,d+1))<56320||l>57343?e?s(h,d):n:e?u(h,d,d+2):l-56320+(n-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},3111:(e,t,r)=>{var n=r(1702),i=r(4488),o=r(1340),a=r(1361),s=n("".replace),c="["+a+"]",u=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),h=function(e){return function(t){var r=o(i(t));return 1&e&&(r=s(r,u,"")),2&e&&(r=s(r,l,"")),r}};e.exports={start:h(1),end:h(2),trim:h(3)}},261:(e,t,r)=>{var n,i,o,a,s=r(7854),c=r(2104),u=r(9974),l=r(614),h=r(2597),d=r(7293),f=r(490),p=r(206),g=r(317),v=r(6833),m=r(5268),A=s.setImmediate,y=s.clearImmediate,b=s.process,_=s.Dispatch,E=s.Function,w=s.MessageChannel,I=s.String,S=0,T={},C="onreadystatechange";try{n=s.location}catch(e){}var R=function(e){if(h(T,e)){var t=T[e];delete T[e],t()}},k=function(e){return function(){R(e)}},O=function(e){R(e.data)},N=function(e){s.postMessage(I(e),n.protocol+"//"+n.host)};A&&y||(A=function(e){var t=p(arguments,1);return T[++S]=function(){c(l(e)?e:E(e),void 0,t)},i(S),S},y=function(e){delete T[e]},m?i=function(e){b.nextTick(k(e))}:_&&_.now?i=function(e){_.now(k(e))}:w&&!v?(a=(o=new w).port2,o.port1.onmessage=O,i=u(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!d(N)?(i=N,s.addEventListener("message",O,!1)):i=C in g("script")?function(e){f.appendChild(g("script")).onreadystatechange=function(){f.removeChild(this),R(e)}}:function(e){setTimeout(k(e),0)}),e.exports={set:A,clear:y}},1400:(e,t,r)=>{var n=r(9303),i=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):o(r,t)}},7067:(e,t,r)=>{var n=r(7854),i=r(9303),o=r(7466),a=n.RangeError;e.exports=function(e){if(void 0===e)return 0;var t=i(e),r=o(t);if(t!==r)throw a("Wrong length or index");return r}},5656:(e,t,r)=>{var n=r(8361),i=r(4488);e.exports=function(e){return n(i(e))}},9303:e=>{var t=Math.ceil,r=Math.floor;e.exports=function(e){var n=+e;return n!=n||0===n?0:(n>0?r:t)(n)}},7466:(e,t,r)=>{var n=r(9303),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},7908:(e,t,r)=>{var n=r(7854),i=r(4488),o=n.Object;e.exports=function(e){return o(i(e))}},4590:(e,t,r)=>{var n=r(7854),i=r(3002),o=n.RangeError;e.exports=function(e,t){var r=i(e);if(r%t)throw o("Wrong offset");return r}},3002:(e,t,r)=>{var n=r(7854),i=r(9303),o=n.RangeError;e.exports=function(e){var t=i(e);if(t<0)throw o("The argument can't be less than 0");return t}},7593:(e,t,r)=>{var n=r(7854),i=r(6916),o=r(111),a=r(2190),s=r(8173),c=r(2140),u=r(5112),l=n.TypeError,h=u("toPrimitive");e.exports=function(e,t){if(!o(e)||a(e))return e;var r,n=s(e,h);if(n){if(void 0===t&&(t="default"),r=i(n,e,t),!o(r)||a(r))return r;throw l("Can't convert object to primitive value")}return void 0===t&&(t="number"),c(e,t)}},4948:(e,t,r)=>{var n=r(7593),i=r(2190);e.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},1694:(e,t,r)=>{var n={};n[r(5112)("toStringTag")]="z",e.exports="[object z]"===String(n)},1340:(e,t,r)=>{var n=r(7854),i=r(648),o=n.String;e.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},6330:(e,t,r)=>{var n=r(7854).String;e.exports=function(e){try{return n(e)}catch(e){return"Object"}}},9843:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(6916),a=r(9781),s=r(3832),c=r(260),u=r(3331),l=r(5787),h=r(9114),d=r(8880),f=r(5988),p=r(7466),g=r(7067),v=r(4590),m=r(4948),A=r(2597),y=r(648),b=r(111),_=r(2190),E=r(30),w=r(7976),I=r(7674),S=r(8006).f,T=r(7321),C=r(2092).forEach,R=r(6340),k=r(3070),O=r(1236),N=r(9909),x=r(9587),D=N.get,L=N.set,P=k.f,M=O.f,B=Math.round,j=i.RangeError,U=u.ArrayBuffer,F=U.prototype,G=u.DataView,Q=c.NATIVE_ARRAY_BUFFER_VIEWS,q=c.TYPED_ARRAY_CONSTRUCTOR,V=c.TYPED_ARRAY_TAG,K=c.TypedArray,H=c.TypedArrayPrototype,W=c.aTypedArrayConstructor,z=c.isTypedArray,Y="BYTES_PER_ELEMENT",X="Wrong length",J=function(e,t){W(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},Z=function(e,t){P(e,t,{get:function(){return D(this)[t]}})},$=function(e){var t;return w(F,e)||"ArrayBuffer"==(t=y(e))||"SharedArrayBuffer"==t},ee=function(e,t){return z(e)&&!_(t)&&t in e&&f(+t)&&t>=0},te=function(e,t){return t=m(t),ee(e,t)?h(2,e[t]):M(e,t)},re=function(e,t,r){return t=m(t),!(ee(e,t)&&b(r)&&A(r,"value"))||A(r,"get")||A(r,"set")||r.configurable||A(r,"writable")&&!r.writable||A(r,"enumerable")&&!r.enumerable?P(e,t,r):(e[t]=r.value,e)};a?(Q||(O.f=te,k.f=re,Z(H,"buffer"),Z(H,"byteOffset"),Z(H,"byteLength"),Z(H,"length")),n({target:"Object",stat:!0,forced:!Q},{getOwnPropertyDescriptor:te,defineProperty:re}),e.exports=function(e,t,r){var a=e.match(/\d+$/)[0]/8,c=e+(r?"Clamped":"")+"Array",u="get"+e,h="set"+e,f=i[c],m=f,A=m&&m.prototype,y={},_=function(e,t){P(e,t,{get:function(){return function(e,t){var r=D(e);return r.view[u](t*a+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var i=D(e);r&&(n=(n=B(n))<0?0:n>255?255:255&n),i.view[h](t*a+i.byteOffset,n,!0)}(this,t,e)},enumerable:!0})};Q?s&&(m=t((function(e,t,r,n){return l(e,A),x(b(t)?$(t)?void 0!==n?new f(t,v(r,a),n):void 0!==r?new f(t,v(r,a)):new f(t):z(t)?J(m,t):o(T,m,t):new f(g(t)),e,m)})),I&&I(m,K),C(S(f),(function(e){e in m||d(m,e,f[e])})),m.prototype=A):(m=t((function(e,t,r,n){l(e,A);var i,s,c,u=0,h=0;if(b(t)){if(!$(t))return z(t)?J(m,t):o(T,m,t);i=t,h=v(r,a);var d=t.byteLength;if(void 0===n){if(d%a)throw j(X);if((s=d-h)<0)throw j(X)}else if((s=p(n)*a)+h>d)throw j(X);c=s/a}else c=g(t),i=new U(s=c*a);for(L(e,{buffer:i,byteOffset:h,byteLength:s,length:c,view:new G(i)});u<c;)_(e,u++)})),I&&I(m,K),A=m.prototype=E(H)),A.constructor!==m&&d(A,"constructor",m),d(A,q,m),V&&d(A,V,c),y[c]=m,n({global:!0,forced:m!=f,sham:!Q},y),Y in m||d(m,Y,a),Y in A||d(A,Y,a),R(c)}):e.exports=function(){}},3832:(e,t,r)=>{var n=r(7854),i=r(7293),o=r(7072),a=r(260).NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,c=n.Int8Array;e.exports=!a||!i((function(){c(1)}))||!i((function(){new c(-1)}))||!o((function(e){new c,new c(null),new c(1.5),new c(e)}),!0)||i((function(){return 1!==new c(new s(2),1,void 0).length}))},3074:(e,t,r)=>{var n=r(7745),i=r(6304);e.exports=function(e,t){return n(i(e),t)}},7321:(e,t,r)=>{var n=r(9974),i=r(6916),o=r(9483),a=r(7908),s=r(6244),c=r(8554),u=r(1246),l=r(7659),h=r(260).aTypedArrayConstructor;e.exports=function(e){var t,r,d,f,p,g,v=o(this),m=a(e),A=arguments.length,y=A>1?arguments[1]:void 0,b=void 0!==y,_=u(m);if(_&&!l(_))for(g=(p=c(m,_)).next,m=[];!(f=i(g,p)).done;)m.push(f.value);for(b&&A>2&&(y=n(y,arguments[2])),r=s(m),d=new(h(v))(r),t=0;r>t;t++)d[t]=b?y(m[t],t):m[t];return d}},6304:(e,t,r)=>{var n=r(260),i=r(6707),o=n.TYPED_ARRAY_CONSTRUCTOR,a=n.aTypedArrayConstructor;e.exports=function(e){return a(i(e,e[o]))}},9711:(e,t,r)=>{var n=r(1702),i=0,o=Math.random(),a=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+o,36)}},3307:(e,t,r)=>{var n=r(133);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:(e,t,r)=>{var n=r(5112);t.f=n},5112:(e,t,r)=>{var n=r(7854),i=r(2309),o=r(2597),a=r(9711),s=r(133),c=r(3307),u=i("wks"),l=n.Symbol,h=l&&l.for,d=c?l:l&&l.withoutSetter||a;e.exports=function(e){if(!o(u,e)||!s&&"string"!=typeof u[e]){var t="Symbol."+e;s&&o(l,e)?u[e]=l[e]:u[e]=c&&h?h(t):d(t)}return u[e]}},1361:e=>{e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},9575:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(7293),a=r(3331),s=r(9670),c=r(1400),u=r(7466),l=r(6707),h=a.ArrayBuffer,d=a.DataView,f=d.prototype,p=i(h.prototype.slice),g=i(f.getUint8),v=i(f.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(p&&void 0===t)return p(s(this),e);for(var r=s(this).byteLength,n=c(e,r),i=c(void 0===t?r:t,r),o=new(l(this,h))(u(i-n)),a=new d(this),f=new d(o),m=0;n<i;)v(f,m++,g(a,n++));return o}})},2222:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(7293),a=r(3157),s=r(111),c=r(7908),u=r(6244),l=r(6135),h=r(5417),d=r(1194),f=r(5112),p=r(7392),g=f("isConcatSpreadable"),v=9007199254740991,m="Maximum allowed index exceeded",A=i.TypeError,y=p>=51||!o((function(){var e=[];return e[g]=!1,e.concat()[0]!==e})),b=d("concat"),_=function(e){if(!s(e))return!1;var t=e[g];return void 0!==t?!!t:a(e)};n({target:"Array",proto:!0,forced:!y||!b},{concat:function(e){var t,r,n,i,o,a=c(this),s=h(a,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(_(o=-1===t?a:arguments[t])){if(d+(i=u(o))>v)throw A(m);for(r=0;r<i;r++,d++)r in o&&l(s,d,o[r])}else{if(d>=v)throw A(m);l(s,d++,o)}return s.length=d,s}})},3290:(e,t,r)=>{var n=r(2109),i=r(1285),o=r(1223);n({target:"Array",proto:!0},{fill:i}),o("fill")},7327:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).filter;n({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},9826:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).find,o=r(1223),a="find",s=!0;a in[]&&Array(1).find((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},9554:(e,t,r)=>{"use strict";var n=r(2109),i=r(8533);n({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},1038:(e,t,r)=>{var n=r(2109),i=r(8457);n({target:"Array",stat:!0,forced:!r(7072)((function(e){Array.from(e)}))},{from:i})},6699:(e,t,r)=>{"use strict";var n=r(2109),i=r(1318).includes,o=r(1223);n({target:"Array",proto:!0},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},2772:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(1318).indexOf,a=r(9341),s=i([].indexOf),c=!!s&&1/s([1],1,-0)<0,u=a("indexOf");n({target:"Array",proto:!0,forced:c||!u},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return c?s(this,e,t)||0:o(this,e,t)}})},9753:(e,t,r)=>{r(2109)({target:"Array",stat:!0},{isArray:r(3157)})},6992:(e,t,r)=>{"use strict";var n=r(5656),i=r(1223),o=r(7497),a=r(9909),s=r(3070).f,c=r(654),u=r(1913),l=r(9781),h="Array Iterator",d=a.set,f=a.getterFor(h);e.exports=c(Array,"Array",(function(e,t){d(this,{type:h,target:n(e),index:0,kind:t})}),(function(){var e=f(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");var p=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!u&&l&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(e){}},9600:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(8361),a=r(5656),s=r(9341),c=i([].join),u=o!=Object,l=s("join",",");n({target:"Array",proto:!0,forced:u||!l},{join:function(e){return c(a(this),void 0===e?",":e)}})},1249:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).map;n({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},5827:(e,t,r)=>{"use strict";var n=r(2109),i=r(3671).left,o=r(9341),a=r(7392),s=r(5268);n({target:"Array",proto:!0,forced:!o("reduce")||!s&&a>79&&a<83},{reduce:function(e){var t=arguments.length;return i(this,e,t,t>1?arguments[1]:void 0)}})},7042:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(3157),a=r(4411),s=r(111),c=r(1400),u=r(6244),l=r(5656),h=r(6135),d=r(5112),f=r(1194),p=r(206),g=f("slice"),v=d("species"),m=i.Array,A=Math.max;n({target:"Array",proto:!0,forced:!g},{slice:function(e,t){var r,n,i,d=l(this),f=u(d),g=c(e,f),y=c(void 0===t?f:t,f);if(o(d)&&(r=d.constructor,(a(r)&&(r===m||o(r.prototype))||s(r)&&null===(r=r[v]))&&(r=void 0),r===m||void 0===r))return p(d,g,y);for(n=new(void 0===r?m:r)(A(y-g,0)),i=0;g<y;g++,i++)g in d&&h(n,i,d[g]);return n.length=i,n}})},2707:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(9662),a=r(7908),s=r(6244),c=r(1340),u=r(7293),l=r(4362),h=r(9341),d=r(8886),f=r(256),p=r(7392),g=r(8008),v=[],m=i(v.sort),A=i(v.push),y=u((function(){v.sort(void 0)})),b=u((function(){v.sort(null)})),_=h("sort"),E=!u((function(){if(p)return p<70;if(!(d&&d>3)){if(f)return!0;if(g)return g<603;var e,t,r,n,i="";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++)v.push({k:t+n,v:r})}for(v.sort((function(e,t){return t.v-e.v})),n=0;n<v.length;n++)t=v[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));n({target:"Array",proto:!0,forced:y||!b||!_||!E},{sort:function(e){void 0!==e&&o(e);var t=a(this);if(E)return void 0===e?m(t):m(t,e);var r,n,i=[],u=s(t);for(n=0;n<u;n++)n in t&&A(i,t[n]);for(l(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:c(t)>c(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<u;)delete t[n++];return t}})},561:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(1400),a=r(9303),s=r(6244),c=r(7908),u=r(5417),l=r(6135),h=r(1194)("splice"),d=i.TypeError,f=Math.max,p=Math.min,g=9007199254740991,v="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!h},{splice:function(e,t){var r,n,i,h,m,A,y=c(this),b=s(y),_=o(e,b),E=arguments.length;if(0===E?r=n=0:1===E?(r=0,n=b-_):(r=E-2,n=p(f(a(t),0),b-_)),b+r-n>g)throw d(v);for(i=u(y,n),h=0;h<n;h++)(m=_+h)in y&&l(i,h,y[m]);if(i.length=n,r<n){for(h=_;h<b-n;h++)A=h+r,(m=h+n)in y?y[A]=y[m]:delete y[A];for(h=b;h>b-n+r;h--)delete y[h-1]}else if(r>n)for(h=b-n;h>_;h--)A=h+r-1,(m=h+n-1)in y?y[A]=y[m]:delete y[A];for(h=0;h<r;h++)y[h+_]=arguments[h+2];return y.length=b-n+r,i}})},3843:(e,t,r)=>{var n=r(2109),i=r(7854),o=r(1702),a=i.Date,s=o(a.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return s(new a)}})},3710:(e,t,r)=>{var n=r(1702),i=r(1320),o=Date.prototype,a="Invalid Date",s="toString",c=n(o.toString),u=n(o.getTime);String(new Date(NaN))!=a&&i(o,s,(function(){var e=u(this);return e==e?c(this):a}))},4812:(e,t,r)=>{r(2109)({target:"Function",proto:!0},{bind:r(7065)})},8309:(e,t,r)=>{var n=r(9781),i=r(6530).EXISTS,o=r(1702),a=r(3070).f,s=Function.prototype,c=o(s.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(u.exec);n&&!i&&a(s,"name",{configurable:!0,get:function(){try{return l(u,c(this))[1]}catch(e){return""}}})},1532:(e,t,r)=>{"use strict";r(7710)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(5631))},9601:(e,t,r)=>{var n=r(2109),i=r(1574);n({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},3321:(e,t,r)=>{var n=r(2109),i=r(9781);n({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:r(6048)})},9070:(e,t,r)=>{var n=r(2109),i=r(9781);n({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:r(3070).f})},9720:(e,t,r)=>{var n=r(2109),i=r(4699).entries;n({target:"Object",stat:!0},{entries:function(e){return i(e)}})},3371:(e,t,r)=>{var n=r(2109),i=r(6677),o=r(7293),a=r(111),s=r(2423).onFreeze,c=Object.freeze;n({target:"Object",stat:!0,forced:o((function(){c(1)})),sham:!i},{freeze:function(e){return c&&a(e)?c(s(e)):e}})},5003:(e,t,r)=>{var n=r(2109),i=r(7293),o=r(5656),a=r(1236).f,s=r(9781),c=i((function(){a(1)}));n({target:"Object",stat:!0,forced:!s||c,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},9337:(e,t,r)=>{var n=r(2109),i=r(9781),o=r(3887),a=r(5656),s=r(1236),c=r(6135);n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,r,n=a(e),i=s.f,u=o(n),l={},h=0;u.length>h;)void 0!==(r=i(n,t=u[h++]))&&c(l,t,r);return l}})},6210:(e,t,r)=>{var n=r(2109),i=r(7293),o=r(1156).f;n({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},7941:(e,t,r)=>{var n=r(2109),i=r(7908),o=r(1956);n({target:"Object",stat:!0,forced:r(7293)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},1539:(e,t,r)=>{var n=r(1694),i=r(1320),o=r(288);n||i(Object.prototype,"toString",o,{unsafe:!0})},2479:(e,t,r)=>{var n=r(2109),i=r(4699).values;n({target:"Object",stat:!0},{values:function(e){return i(e)}})},1058:(e,t,r)=>{var n=r(2109),i=r(3009);n({global:!0,forced:parseInt!=i},{parseInt:i})},7727:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(3366),a=r(7293),s=r(5005),c=r(614),u=r(6707),l=r(9478),h=r(1320);if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,s("Promise")),r=c(e);return this.then(r?function(r){return l(t,e()).then((function(){return r}))}:e,r?function(r){return l(t,e()).then((function(){throw r}))}:e)}}),!i&&c(o)){var d=s("Promise").prototype.finally;o.prototype.finally!==d&&h(o.prototype,"finally",d,{unsafe:!0})}},8674:(e,t,r)=>{"use strict";var n,i,o,a,s=r(2109),c=r(1913),u=r(7854),l=r(5005),h=r(6916),d=r(3366),f=r(1320),p=r(2248),g=r(7674),v=r(8003),m=r(6340),A=r(9662),y=r(614),b=r(111),_=r(5787),E=r(2788),w=r(408),I=r(7072),S=r(6707),T=r(261).set,C=r(5948),R=r(9478),k=r(842),O=r(8523),N=r(2534),x=r(8572),D=r(9909),L=r(4705),P=r(5112),M=r(7871),B=r(5268),j=r(7392),U=P("species"),F="Promise",G=D.getterFor(F),Q=D.set,q=D.getterFor(F),V=d&&d.prototype,K=d,H=V,W=u.TypeError,z=u.document,Y=u.process,X=O.f,J=X,Z=!!(z&&z.createEvent&&u.dispatchEvent),$=y(u.PromiseRejectionEvent),ee="unhandledrejection",te=!1,re=L(F,(function(){var e=E(K),t=e!==String(K);if(!t&&66===j)return!0;if(c&&!H.finally)return!0;if(j>=51&&/native code/.test(e))return!1;var r=new K((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[U]=n,!(te=r.then((function(){}))instanceof n)||!t&&M&&!$})),ne=re||!I((function(e){K.all(e).catch((function(){}))})),ie=function(e){var t;return!(!b(e)||!y(t=e.then))&&t},oe=function(e,t){var r,n,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&le(t),t.rejection=1),!0===s?r=o:(l&&l.enter(),r=s(o),l&&(l.exit(),i=!0)),r===e.promise?u(W("Promise-chain cycle")):(n=ie(r))?h(n,r,c,u):c(r)):u(o)}catch(e){l&&!i&&l.exit(),u(e)}},ae=function(e,t){e.notified||(e.notified=!0,C((function(){for(var r,n=e.reactions;r=n.get();)oe(r,e);e.notified=!1,t&&!e.rejection&&ce(e)})))},se=function(e,t,r){var n,i;Z?((n=z.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!$&&(i=u["on"+e])?i(n):e===ee&&k("Unhandled promise rejection",r)},ce=function(e){h(T,u,(function(){var t,r=e.facade,n=e.value;if(ue(e)&&(t=N((function(){B?Y.emit("unhandledRejection",n,r):se(ee,r,n)})),e.rejection=B||ue(e)?2:1,t.error))throw t.value}))},ue=function(e){return 1!==e.rejection&&!e.parent},le=function(e){h(T,u,(function(){var t=e.facade;B?Y.emit("rejectionHandled",t):se("rejectionhandled",t,e.value)}))},he=function(e,t,r){return function(n){e(t,n,r)}},de=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,ae(e,!0))},fe=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw W("Promise can't be resolved itself");var n=ie(t);n?C((function(){var r={done:!1};try{h(n,t,he(fe,r,e),he(de,r,e))}catch(t){de(r,t,e)}})):(e.value=t,e.state=1,ae(e,!1))}catch(t){de({done:!1},t,e)}}};if(re&&(H=(K=function(e){_(this,H),A(e),h(n,this);var t=G(this);try{e(he(fe,t),he(de,t))}catch(e){de(t,e)}}).prototype,(n=function(e){Q(this,{type:F,done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:0,value:void 0})}).prototype=p(H,{then:function(e,t){var r=q(this),n=X(S(this,K));return r.parent=!0,n.ok=!y(e)||e,n.fail=y(t)&&t,n.domain=B?Y.domain:void 0,0==r.state?r.reactions.add(n):C((function(){oe(n,r)})),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new n,t=G(e);this.promise=e,this.resolve=he(fe,t),this.reject=he(de,t)},O.f=X=function(e){return e===K||e===o?new i(e):J(e)},!c&&y(d)&&V!==Object.prototype)){a=V.then,te||(f(V,"then",(function(e,t){var r=this;return new K((function(e,t){h(a,r,e,t)})).then(e,t)}),{unsafe:!0}),f(V,"catch",H.catch,{unsafe:!0}));try{delete V.constructor}catch(e){}g&&g(V,H)}s({global:!0,wrap:!0,forced:re},{Promise:K}),v(K,F,!1,!0),m(F),o=l(F),s({target:F,stat:!0,forced:re},{reject:function(e){var t=X(this);return h(t.reject,void 0,e),t.promise}}),s({target:F,stat:!0,forced:c||re},{resolve:function(e){return R(c&&this===o?K:this,e)}}),s({target:F,stat:!0,forced:ne},{all:function(e){var t=this,r=X(t),n=r.resolve,i=r.reject,o=N((function(){var r=A(t.resolve),o=[],a=0,s=1;w(e,(function(e){var c=a++,u=!1;s++,h(r,t,e).then((function(e){u||(u=!0,o[c]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise},race:function(e){var t=this,r=X(t),n=r.reject,i=N((function(){var i=A(t.resolve);w(e,(function(e){h(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}})},2419:(e,t,r)=>{var n=r(2109),i=r(5005),o=r(2104),a=r(7065),s=r(9483),c=r(9670),u=r(111),l=r(30),h=r(7293),d=i("Reflect","construct"),f=Object.prototype,p=[].push,g=h((function(){function e(){}return!(d((function(){}),[],e)instanceof e)})),v=!h((function(){d((function(){}))})),m=g||v;n({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(e,t){s(e),c(t);var r=arguments.length<3?e:s(arguments[2]);if(v&&!g)return d(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return o(p,n,t),new(o(a,e,n))}var i=r.prototype,h=l(u(i)?i:f),m=o(e,h,t);return u(m)?m:h}})},4916:(e,t,r)=>{"use strict";var n=r(2109),i=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},189:(e,t,r)=>{"use strict";r(7710)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(5631))},2023:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(3929),a=r(4488),s=r(1340),c=r(4964),u=i("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(e){return!!~u(s(a(this)),s(o(e)),arguments.length>1?arguments[1]:void 0)}})},8783:(e,t,r)=>{"use strict";var n=r(8710).charAt,i=r(1340),o=r(9909),a=r(654),s="String Iterator",c=o.set,u=o.getterFor(s);a(String,"String",(function(e){c(this,{type:s,string:i(e),index:0})}),(function(){var e,t=u(this),r=t.string,i=t.index;return i>=r.length?{value:void 0,done:!0}:(e=n(r,i),t.index+=e.length,{value:e,done:!1})}))},5306:(e,t,r)=>{"use strict";var n=r(2104),i=r(6916),o=r(1702),a=r(7007),s=r(7293),c=r(9670),u=r(614),l=r(9303),h=r(7466),d=r(1340),f=r(4488),p=r(1530),g=r(8173),v=r(647),m=r(7651),A=r(5112)("replace"),y=Math.max,b=Math.min,_=o([].concat),E=o([].push),w=o("".indexOf),I=o("".slice),S="$0"==="a".replace(/./,"$0"),T=!!/./[A]&&""===/./[A]("a","$0");a("replace",(function(e,t,r){var o=T?"$":"$0";return[function(e,r){var n=f(this),o=null==e?void 0:g(e,A);return o?i(o,e,n,r):i(t,d(n),e,r)},function(e,i){var a=c(this),s=d(e);if("string"==typeof i&&-1===w(i,o)&&-1===w(i,"$<")){var f=r(t,a,s,i);if(f.done)return f.value}var g=u(i);g||(i=d(i));var A=a.global;if(A){var S=a.unicode;a.lastIndex=0}for(var T=[];;){var C=m(a,s);if(null===C)break;if(E(T,C),!A)break;""===d(C[0])&&(a.lastIndex=p(s,h(a.lastIndex),S))}for(var R,k="",O=0,N=0;N<T.length;N++){for(var x=d((C=T[N])[0]),D=y(b(l(C.index),s.length),0),L=[],P=1;P<C.length;P++)E(L,void 0===(R=C[P])?R:String(R));var M=C.groups;if(g){var B=_([x],L,D,s);void 0!==M&&E(B,M);var j=d(n(i,void 0,B))}else j=v(x,s,D,L,M,i);D>=O&&(k+=I(s,O,D)+j,O=D+x.length)}return k+I(s,O)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!S||T)},3123:(e,t,r)=>{"use strict";var n=r(2104),i=r(6916),o=r(1702),a=r(7007),s=r(7850),c=r(9670),u=r(4488),l=r(6707),h=r(1530),d=r(7466),f=r(1340),p=r(8173),g=r(1589),v=r(7651),m=r(2261),A=r(2999),y=r(7293),b=A.UNSUPPORTED_Y,_=4294967295,E=Math.min,w=[].push,I=o(/./.exec),S=o(w),T=o("".slice),C=!y((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]}));a("split",(function(e,t,r){var o;return o="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 o=f(u(this)),a=void 0===r?_:r>>>0;if(0===a)return[];if(void 0===e)return[o];if(!s(e))return i(t,o,e,a);for(var c,l,h,d=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),v=0,A=new RegExp(e.source,p+"g");(c=i(m,A,o))&&!((l=A.lastIndex)>v&&(S(d,T(o,v,c.index)),c.length>1&&c.index<o.length&&n(w,d,g(c,1)),h=c[0].length,v=l,d.length>=a));)A.lastIndex===c.index&&A.lastIndex++;return v===o.length?!h&&I(A,"")||S(d,""):S(d,T(o,v)),d.length>a?g(d,0,a):d}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:i(t,this,e,r)}:t,[function(t,r){var n=u(this),a=null==t?void 0:p(t,e);return a?i(a,t,n,r):i(o,f(n),t,r)},function(e,n){var i=c(this),a=f(e),s=r(o,i,a,n,o!==t);if(s.done)return s.value;var u=l(i,RegExp),p=i.unicode,g=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(b?"g":"y"),m=new u(b?"^(?:"+i.source+")":i,g),A=void 0===n?_:n>>>0;if(0===A)return[];if(0===a.length)return null===v(m,a)?[a]:[];for(var y=0,w=0,I=[];w<a.length;){m.lastIndex=b?0:w;var C,R=v(m,b?T(a,w):a);if(null===R||(C=E(d(m.lastIndex+(b?w:0)),a.length))===y)w=h(a,w,p);else{if(S(I,T(a,y,w)),I.length===A)return I;for(var k=1;k<=R.length-1;k++)if(S(I,R[k]),I.length===A)return I;w=y=C}}return S(I,T(a,y)),I}]}),!C,b)},86:(e,t,r)=>{"use strict";var n=r(2109),i=r(4230);n({target:"String",proto:!0,forced:r(3429)("sub")},{sub:function(){return i(this,"sub","","")}})},1817:(e,t,r)=>{"use strict";var n=r(2109),i=r(9781),o=r(7854),a=r(1702),s=r(2597),c=r(614),u=r(7976),l=r(1340),h=r(3070).f,d=r(9920),f=o.Symbol,p=f&&f.prototype;if(i&&c(f)&&(!("description"in p)||void 0!==f().description)){var g={},v=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=u(p,this)?new f(e):void 0===e?f():f(e);return""===e&&(g[t]=!0),t};d(v,f),v.prototype=p,p.constructor=v;var m="Symbol(test)"==String(f("test")),A=a(p.toString),y=a(p.valueOf),b=/^Symbol\((.*)\)[^)]+$/,_=a("".replace),E=a("".slice);h(p,"description",{configurable:!0,get:function(){var e=y(this),t=A(e);if(s(g,e))return"";var r=m?E(t,7,-1):_(t,b,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:v})}},2165:(e,t,r)=>{r(7235)("iterator")},2526:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(5005),a=r(2104),s=r(6916),c=r(1702),u=r(1913),l=r(9781),h=r(133),d=r(7293),f=r(2597),p=r(3157),g=r(614),v=r(111),m=r(7976),A=r(2190),y=r(9670),b=r(7908),_=r(5656),E=r(4948),w=r(1340),I=r(9114),S=r(30),T=r(1956),C=r(8006),R=r(1156),k=r(5181),O=r(1236),N=r(3070),x=r(5296),D=r(206),L=r(1320),P=r(2309),M=r(6200),B=r(3501),j=r(9711),U=r(5112),F=r(6061),G=r(7235),Q=r(8003),q=r(9909),V=r(2092).forEach,K=M("hidden"),H="Symbol",W=U("toPrimitive"),z=q.set,Y=q.getterFor(H),X=Object.prototype,J=i.Symbol,Z=J&&J.prototype,$=i.TypeError,ee=i.QObject,te=o("JSON","stringify"),re=O.f,ne=N.f,ie=R.f,oe=x.f,ae=c([].push),se=P("symbols"),ce=P("op-symbols"),ue=P("string-to-symbol-registry"),le=P("symbol-to-string-registry"),he=P("wks"),de=!ee||!ee.prototype||!ee.prototype.findChild,fe=l&&d((function(){return 7!=S(ne({},"a",{get:function(){return ne(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=re(X,t);n&&delete X[t],ne(e,t,r),n&&e!==X&&ne(X,t,n)}:ne,pe=function(e,t){var r=se[e]=S(Z);return z(r,{type:H,tag:e,description:t}),l||(r.description=t),r},ge=function(e,t,r){e===X&&ge(ce,t,r),y(e);var n=E(t);return y(r),f(se,n)?(r.enumerable?(f(e,K)&&e[K][n]&&(e[K][n]=!1),r=S(r,{enumerable:I(0,!1)})):(f(e,K)||ne(e,K,I(1,{})),e[K][n]=!0),fe(e,n,r)):ne(e,n,r)},ve=function(e,t){y(e);var r=_(t),n=T(r).concat(be(r));return V(n,(function(t){l&&!s(me,r,t)||ge(e,t,r[t])})),e},me=function(e){var t=E(e),r=s(oe,this,t);return!(this===X&&f(se,t)&&!f(ce,t))&&(!(r||!f(this,t)||!f(se,t)||f(this,K)&&this[K][t])||r)},Ae=function(e,t){var r=_(e),n=E(t);if(r!==X||!f(se,n)||f(ce,n)){var i=re(r,n);return!i||!f(se,n)||f(r,K)&&r[K][n]||(i.enumerable=!0),i}},ye=function(e){var t=ie(_(e)),r=[];return V(t,(function(e){f(se,e)||f(B,e)||ae(r,e)})),r},be=function(e){var t=e===X,r=ie(t?ce:_(e)),n=[];return V(r,(function(e){!f(se,e)||t&&!f(X,e)||ae(n,se[e])})),n};(h||(J=function(){if(m(Z,this))throw $("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?w(arguments[0]):void 0,t=j(e),r=function(e){this===X&&s(r,ce,e),f(this,K)&&f(this[K],t)&&(this[K][t]=!1),fe(this,t,I(1,e))};return l&&de&&fe(X,t,{configurable:!0,set:r}),pe(t,e)},L(Z=J.prototype,"toString",(function(){return Y(this).tag})),L(J,"withoutSetter",(function(e){return pe(j(e),e)})),x.f=me,N.f=ge,O.f=Ae,C.f=R.f=ye,k.f=be,F.f=function(e){return pe(U(e),e)},l&&(ne(Z,"description",{configurable:!0,get:function(){return Y(this).description}}),u||L(X,"propertyIsEnumerable",me,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!h,sham:!h},{Symbol:J}),V(T(he),(function(e){G(e)})),n({target:H,stat:!0,forced:!h},{for:function(e){var t=w(e);if(f(ue,t))return ue[t];var r=J(t);return ue[t]=r,le[r]=t,r},keyFor:function(e){if(!A(e))throw $(e+" is not a symbol");if(f(le,e))return le[e]},useSetter:function(){de=!0},useSimple:function(){de=!1}}),n({target:"Object",stat:!0,forced:!h,sham:!l},{create:function(e,t){return void 0===t?S(e):ve(S(e),t)},defineProperty:ge,defineProperties:ve,getOwnPropertyDescriptor:Ae}),n({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:ye,getOwnPropertySymbols:be}),n({target:"Object",stat:!0,forced:d((function(){k.f(1)}))},{getOwnPropertySymbols:function(e){return k.f(b(e))}}),te)&&n({target:"JSON",stat:!0,forced:!h||d((function(){var e=J();return"[null]"!=te([e])||"{}"!=te({a:e})||"{}"!=te(Object(e))}))},{stringify:function(e,t,r){var n=D(arguments),i=t;if((v(t)||void 0!==e)&&!A(e))return p(t)||(t=function(e,t){if(g(i)&&(t=s(i,this,e,t)),!A(t))return t}),n[1]=t,a(te,null,n)}});if(!Z[W]){var _e=Z.valueOf;L(Z,W,(function(e){return s(_e,this)}))}Q(J,H),B[K]=!0},2990:(e,t,r)=>{"use strict";var n=r(1702),i=r(260),o=n(r(1048)),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(e,t){return o(a(this),e,t,arguments.length>2?arguments[2]:void 0)}))},8927:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).every,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3105:(e,t,r)=>{"use strict";var n=r(260),i=r(6916),o=r(1285),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return i(o,a(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}))},5035:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).filter,o=r(3074),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(e){var t=i(a(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)}))},7174:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).findIndex,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4345:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).find,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4197:(e,t,r)=>{r(9843)("Float32",(function(e){return function(t,r,n){return e(this,t,r,n)}}))},2846:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).forEach,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(e){i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4731:(e,t,r)=>{"use strict";var n=r(260),i=r(1318).includes,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},7209:(e,t,r)=>{"use strict";var n=r(260),i=r(1318).indexOf,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},6319:(e,t,r)=>{"use strict";var n=r(7854),i=r(7293),o=r(1702),a=r(260),s=r(6992),c=r(5112)("iterator"),u=n.Uint8Array,l=o(s.values),h=o(s.keys),d=o(s.entries),f=a.aTypedArray,p=a.exportTypedArrayMethod,g=u&&u.prototype,v=!i((function(){g[c].call([1])})),m=!!g&&g.values&&g[c]===g.values&&"values"===g.values.name,A=function(){return l(f(this))};p("entries",(function(){return d(f(this))}),v),p("keys",(function(){return h(f(this))}),v),p("values",A,v||!m,{name:"values"}),p(c,A,v||!m,{name:"values"})},8867:(e,t,r)=>{"use strict";var n=r(260),i=r(1702),o=n.aTypedArray,a=n.exportTypedArrayMethod,s=i([].join);a("join",(function(e){return s(o(this),e)}))},7789:(e,t,r)=>{"use strict";var n=r(260),i=r(2104),o=r(6583),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return i(o,a(this),t>1?[e,arguments[1]]:[e])}))},3739:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).map,o=r(6304),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(o(e))(t)}))}))},4483:(e,t,r)=>{"use strict";var n=r(260),i=r(3671).right,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},9368:(e,t,r)=>{"use strict";var n=r(260),i=r(3671).left,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},2056:(e,t,r)=>{"use strict";var n=r(260),i=n.aTypedArray,o=n.exportTypedArrayMethod,a=Math.floor;o("reverse",(function(){for(var e,t=this,r=i(t).length,n=a(r/2),o=0;o<n;)e=t[o],t[o++]=t[--r],t[r]=e;return t}))},3462:(e,t,r)=>{"use strict";var n=r(7854),i=r(260),o=r(6244),a=r(4590),s=r(7908),c=r(7293),u=n.RangeError,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("set",(function(e){l(this);var t=a(arguments.length>1?arguments[1]:void 0,1),r=this.length,n=s(e),i=o(n),c=0;if(i+t>r)throw u("Wrong length");for(;c<i;)this[t+c]=n[c++]}),c((function(){new Int8Array(1).set({})})))},678:(e,t,r)=>{"use strict";var n=r(260),i=r(6304),o=r(7293),a=r(206),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(e,t){for(var r=a(s(this),e,t),n=i(this),o=0,c=r.length,u=new n(c);c>o;)u[o]=r[o++];return u}),o((function(){new Int8Array(1).slice()})))},7462:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).some,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3824:(e,t,r)=>{"use strict";var n=r(7854),i=r(1702),o=r(7293),a=r(9662),s=r(4362),c=r(260),u=r(8886),l=r(256),h=r(7392),d=r(8008),f=n.Array,p=c.aTypedArray,g=c.exportTypedArrayMethod,v=n.Uint16Array,m=v&&i(v.prototype.sort),A=!(!m||o((function(){m(new v(2),null)}))&&o((function(){m(new v(2),{})}))),y=!!m&&!o((function(){if(h)return h<74;if(u)return u<67;if(l)return!0;if(d)return d<602;var e,t,r=new v(516),n=f(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(m(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));g("sort",(function(e){return void 0!==e&&a(e),y?m(this,e):s(p(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!y||A)},5021:(e,t,r)=>{"use strict";var n=r(260),i=r(7466),o=r(1400),a=r(6304),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(e,t){var r=s(this),n=r.length,c=o(e,n);return new(a(r))(r.buffer,r.byteOffset+c*r.BYTES_PER_ELEMENT,i((void 0===t?n:o(t,n))-c))}))},2974:(e,t,r)=>{"use strict";var n=r(7854),i=r(2104),o=r(260),a=r(7293),s=r(206),c=n.Int8Array,u=o.aTypedArray,l=o.exportTypedArrayMethod,h=[].toLocaleString,d=!!c&&a((function(){h.call(new c(1))}));l("toLocaleString",(function(){return i(h,d?s(u(this)):u(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new c([1,2]).toLocaleString()}))||!a((function(){c.prototype.toLocaleString.call([1,2])})))},5016:(e,t,r)=>{"use strict";var n=r(260).exportTypedArrayMethod,i=r(7293),o=r(7854),a=r(1702),s=o.Uint8Array,c=s&&s.prototype||{},u=[].toString,l=a([].join);i((function(){u.call({})}))&&(u=function(){return l(this)});var h=c.toString!=u;n("toString",u,h)},2472:(e,t,r)=>{r(9843)("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}))},4129:(e,t,r)=>{"use strict";var n,i=r(7854),o=r(1702),a=r(2248),s=r(2423),c=r(7710),u=r(9320),l=r(111),h=r(2050),d=r(9909).enforce,f=r(8536),p=!i.ActiveXObject&&"ActiveXObject"in i,g=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},v=c("WeakMap",g,u);if(f&&p){n=u.getConstructor(g,"WeakMap",!0),s.enable();var m=v.prototype,A=o(m.delete),y=o(m.has),b=o(m.get),_=o(m.set);a(m,{delete:function(e){if(l(e)&&!h(e)){var t=d(this);return t.frozen||(t.frozen=new n),A(this,e)||t.frozen.delete(e)}return A(this,e)},has:function(e){if(l(e)&&!h(e)){var t=d(this);return t.frozen||(t.frozen=new n),y(this,e)||t.frozen.has(e)}return y(this,e)},get:function(e){if(l(e)&&!h(e)){var t=d(this);return t.frozen||(t.frozen=new n),y(this,e)?b(this,e):t.frozen.get(e)}return b(this,e)},set:function(e,t){if(l(e)&&!h(e)){var r=d(this);r.frozen||(r.frozen=new n),y(this,e)?_(this,e,t):r.frozen.set(e,t)}else _(this,e,t);return this}})}},8478:(e,t,r)=>{"use strict";r(7710)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(9320))},72:(e,t,r)=>{"use strict";r(2109)({target:"Map",proto:!0,real:!0,forced:r(1913)},{deleteAll:r(4092)})},9137:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(4647),c=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{every:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return!c(r,(function(e,r,i){if(!n(r,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},1957:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(9974),s=r(6916),c=r(9662),u=r(9670),l=r(6707),h=r(4647),d=r(408);i({target:"Map",proto:!0,real:!0,forced:n},{filter:function(e){var t=u(this),r=h(t),n=a(e,arguments.length>1?arguments[1]:void 0),i=new(l(t,o("Map"))),f=c(i.set);return d(r,(function(e,r){n(r,e,t)&&s(f,i,e,r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},103:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(4647),c=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{findKey:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return c(r,(function(e,r,i){if(n(r,e,t))return i(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},6306:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(4647),c=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{find:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return c(r,(function(e,r,i){if(n(r,e,t))return i(r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},4592:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(9670),a=r(4647),s=r(6465),c=r(408);i({target:"Map",proto:!0,real:!0,forced:n},{includes:function(e){return c(a(o(this)),(function(t,r,n){if(s(r,e))return n()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},8276:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(4647),s=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{keyOf:function(e){return s(a(o(this)),(function(t,r,n){if(r===e)return n(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},5082:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(9974),s=r(6916),c=r(9662),u=r(9670),l=r(6707),h=r(4647),d=r(408);i({target:"Map",proto:!0,real:!0,forced:n},{mapKeys:function(e){var t=u(this),r=h(t),n=a(e,arguments.length>1?arguments[1]:void 0),i=new(l(t,o("Map"))),f=c(i.set);return d(r,(function(e,r){s(f,i,n(r,e,t),r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},2813:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(9974),s=r(6916),c=r(9662),u=r(9670),l=r(6707),h=r(4647),d=r(408);i({target:"Map",proto:!0,real:!0,forced:n},{mapValues:function(e){var t=u(this),r=h(t),n=a(e,arguments.length>1?arguments[1]:void 0),i=new(l(t,o("Map"))),f=c(i.set);return d(r,(function(e,r){s(f,i,e,n(r,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},8222:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9662),a=r(9670),s=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{merge:function(e){for(var t=a(this),r=o(t.set),n=arguments.length,i=0;i<n;)s(arguments[i++],r,{that:t,AS_ENTRIES:!0});return t}})},8563:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(1913),a=r(9670),s=r(9662),c=r(4647),u=r(408),l=i.TypeError;n({target:"Map",proto:!0,real:!0,forced:o},{reduce:function(e){var t=a(this),r=c(t),n=arguments.length<2,i=n?void 0:arguments[1];if(s(e),u(r,(function(r,o){n?(n=!1,i=o):i=e(i,o,r,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),n)throw l("Reduce of empty map with no initial value");return i}})},336:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(4647),c=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{some:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return c(r,(function(e,r,i){if(n(r,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},7512:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(7854),a=r(6916),s=r(9670),c=r(9662),u=o.TypeError;i({target:"Map",proto:!0,real:!0,forced:n},{update:function(e,t){var r=s(this),n=c(r.get),i=c(r.has),o=c(r.set),l=arguments.length;c(t);var h=a(i,r,e);if(!h&&l<3)throw u("Updating absent value");var d=h?a(n,r,e):c(l>2?arguments[2]:void 0)(e,r);return a(o,r,e,t(d,e,r)),r}})},8921:(e,t,r)=>{"use strict";r(2109)({target:"Set",proto:!0,real:!0,forced:r(1913)},{addAll:r(1501)})},6248:(e,t,r)=>{"use strict";r(2109)({target:"Set",proto:!0,real:!0,forced:r(1913)},{deleteAll:r(4092)})},3599:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(6916),s=r(9662),c=r(9670),u=r(6707),l=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{difference:function(e){var t=c(this),r=new(u(t,o("Set")))(t),n=s(r.delete);return l(e,(function(e){a(n,r,e)})),r}})},1477:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(6767),c=r(408);n({target:"Set",proto:!0,real:!0,forced:i},{every:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return!c(r,(function(e,r){if(!n(e,e,t))return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},3066:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(6916),s=r(9662),c=r(9670),u=r(9974),l=r(6707),h=r(6767),d=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{filter:function(e){var t=c(this),r=h(t),n=u(e,arguments.length>1?arguments[1]:void 0),i=new(l(t,o("Set"))),f=s(i.add);return d(r,(function(e){n(e,e,t)&&a(f,i,e)}),{IS_ITERATOR:!0}),i}})},5389:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(6767),c=r(408);n({target:"Set",proto:!0,real:!0,forced:i},{find:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return c(r,(function(e,r){if(n(e,e,t))return r(e)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},401:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(6916),s=r(9662),c=r(9670),u=r(6707),l=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{intersection:function(e){var t=c(this),r=new(u(t,o("Set"))),n=s(t.has),i=s(r.add);return l(e,(function(e){a(n,t,e)&&a(i,r,e)})),r}})},5164:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(6916),a=r(9662),s=r(9670),c=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{isDisjointFrom:function(e){var t=s(this),r=a(t.has);return!c(e,(function(e,n){if(!0===o(r,t,e))return n()}),{INTERRUPTED:!0}).stopped}})},1238:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(6916),s=r(9662),c=r(614),u=r(9670),l=r(8554),h=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{isSubsetOf:function(e){var t=l(this),r=u(e),n=r.has;return c(n)||(r=new(o("Set"))(e),n=s(r.has)),!h(t,(function(e,t){if(!1===a(n,r,e))return t()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},4837:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(6916),a=r(9662),s=r(9670),c=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{isSupersetOf:function(e){var t=s(this),r=a(t.has);return!c(e,(function(e,n){if(!1===o(r,t,e))return n()}),{INTERRUPTED:!0}).stopped}})},7485:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(1702),a=r(9670),s=r(1340),c=r(6767),u=r(408),l=o([].join),h=[].push;i({target:"Set",proto:!0,real:!0,forced:n},{join:function(e){var t=a(this),r=c(t),n=void 0===e?",":s(e),i=[];return u(r,h,{that:i,IS_ITERATOR:!0}),l(i,n)}})},465:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(9974),s=r(6916),c=r(9662),u=r(9670),l=r(6707),h=r(6767),d=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{map:function(e){var t=u(this),r=h(t),n=a(e,arguments.length>1?arguments[1]:void 0),i=new(l(t,o("Set"))),f=c(i.add);return d(r,(function(e){s(f,i,n(e,e,t))}),{IS_ITERATOR:!0}),i}})},6651:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(1913),a=r(9662),s=r(9670),c=r(6767),u=r(408),l=i.TypeError;n({target:"Set",proto:!0,real:!0,forced:o},{reduce:function(e){var t=s(this),r=c(t),n=arguments.length<2,i=n?void 0:arguments[1];if(a(e),u(r,(function(r){n?(n=!1,i=r):i=e(i,r,r,t)}),{IS_ITERATOR:!0}),n)throw l("Reduce of empty set with no initial value");return i}})},1437:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(6767),c=r(408);n({target:"Set",proto:!0,real:!0,forced:i},{some:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return c(r,(function(e,r){if(n(e,e,t))return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},5285:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(6916),s=r(9662),c=r(9670),u=r(6707),l=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{symmetricDifference:function(e){var t=c(this),r=new(u(t,o("Set")))(t),n=s(r.delete),i=s(r.add);return l(e,(function(e){a(n,r,e)||a(i,r,e)})),r}})},9865:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(5005),a=r(9662),s=r(9670),c=r(6707),u=r(408);n({target:"Set",proto:!0,real:!0,forced:i},{union:function(e){var t=s(this),r=new(c(t,o("Set")))(t);return u(e,a(r.add),{that:r}),r}})},8206:(e,t,r)=>{"use strict";r(2109)({target:"WeakMap",proto:!0,real:!0,forced:r(1913)},{deleteAll:r(4092)})},3561:(e,t,r)=>{"use strict";r(2109)({target:"WeakSet",proto:!0,real:!0,forced:r(1913)},{addAll:r(1501)})},2049:(e,t,r)=>{"use strict";r(2109)({target:"WeakSet",proto:!0,real:!0,forced:r(1913)},{deleteAll:r(4092)})},4747:(e,t,r)=>{var n=r(7854),i=r(8324),o=r(8509),a=r(8533),s=r(8880),c=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var u in i)i[u]&&c(n[u]&&n[u].prototype);c(o)},3948:(e,t,r)=>{var n=r(7854),i=r(8324),o=r(8509),a=r(6992),s=r(8880),c=r(5112),u=c("iterator"),l=c("toStringTag"),h=a.values,d=function(e,t){if(e){if(e[u]!==h)try{s(e,u,h)}catch(t){e[u]=h}if(e[l]||s(e,l,t),i[t])for(var r in a)if(e[r]!==a[r])try{s(e,r,a[r])}catch(t){e[r]=a[r]}}};for(var f in i)d(n[f]&&n[f].prototype,f);d(o,"DOMTokenList")},2564:(e,t,r)=>{var n=r(2109),i=r(7854),o=r(2104),a=r(614),s=r(8113),c=r(206),u=/MSIE .\./.test(s),l=i.Function,h=function(e){return function(t,r){var n=arguments.length>2,i=n?c(arguments,2):void 0;return e(n?function(){o(a(t)?t:l(t),this,i)}:t,r)}};n({global:!0,bind:!0,forced:u},{setTimeout:h(i.setTimeout),setInterval:h(i.setInterval)})},5455:e=>{"use strict";e.exports=require("agora-electron-sdk")},5760:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__5760__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.amdO={},__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})();var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AGError:()=>zn,AGErrorWrapper:()=>Yn,AGEventEmitter:()=>x,AGMediaEncryptionMode:()=>Xu,AGNetworkQuality:()=>Hu,AGRenderMode:()=>Zu,AGRtcConnectionType:()=>Fu,AGRteErrorCode:()=>Qn,AGRteTrackErrorReason:()=>Wu,AGScreenShareType:()=>Ju,AbstractErrorCenter:()=>Wn,ActionWhenTaskFail:()=>yu,AgoraChatMessage:()=>jc,AgoraMediaControl:()=>Rl,AgoraMediaControlEventType:()=>Sl,AgoraMediaPlayerCanvas:()=>oh,AgoraRCEventType:()=>Ef,AgoraRCRole:()=>_f,AgoraRegion:()=>Hn,AgoraRoom:()=>Bc,AgoraRtcLocalVideoCanvas:()=>ih,AgoraRtcVideoCanvas:()=>nh,AgoraRteAudioSourceType:()=>Pu,AgoraRteCameraVideoTrack:()=>qu,AgoraRteConnectionState:()=>vl,AgoraRteEngine:()=>Nf,AgoraRteEngineConfig:()=>$n,AgoraRteEventType:()=>Dc,AgoraRteLogLevel:()=>qn,AgoraRteMediaPublishState:()=>Mu,AgoraRteMediaSourceState:()=>zu,AgoraRteMediaTrack:()=>Gu,AgoraRteMicrophoneAudioTrack:()=>Vu,AgoraRteRemoteStreamType:()=>el,AgoraRteRuntimePlatform:()=>Vn,AgoraRteScene:()=>Tl,AgoraRteScreenShareTrack:()=>Ku,AgoraRteStreamMediaTrack:()=>Qu,AgoraRteThread:()=>Ql,AgoraRteVideoSourceType:()=>Lu,AgoraStream:()=>Mc,AgoraUser:()=>Pc,ApiBase:()=>ou,ChannelProfile:()=>ml,Duration:()=>Cu,LighteningLevel:()=>$u,Lodash:()=>wu,Log:()=>li,Logger:()=>xn,MediaPlayerEvents:()=>Ru,RtcState:()=>Yu,RteLanguage:()=>Kn,Scheduler:()=>e,StreamMediaPlayer:()=>Bu,bound:()=>vu,retryAttempt:()=>ul});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{Duration:()=>Cu,createScheduler:()=>Nu,shared:()=>xu});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{identity:()=>Ah});var r={};__webpack_require__.r(r),__webpack_require__.d(r,{base2:()=>yh});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{base8:()=>bh});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{base10:()=>_h});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{base16:()=>Eh,base16upper:()=>wh});var a={};__webpack_require__.r(a),__webpack_require__.d(a,{base32:()=>Ih,base32hex:()=>Rh,base32hexpad:()=>Oh,base32hexpadupper:()=>Nh,base32hexupper:()=>kh,base32pad:()=>Th,base32padupper:()=>Ch,base32upper:()=>Sh,base32z:()=>xh});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{base36:()=>Dh,base36upper:()=>Lh});var c={};__webpack_require__.r(c),__webpack_require__.d(c,{base58btc:()=>Ph,base58flickr:()=>Mh});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{base64:()=>Bh,base64pad:()=>jh,base64url:()=>Uh,base64urlpad:()=>Fh});var l={};__webpack_require__.r(l),__webpack_require__.d(l,{sha256:()=>sd,sha512:()=>cd});var h={};__webpack_require__.r(h),__webpack_require__.d(h,{identity:()=>ld});var d={};__webpack_require__.r(d),__webpack_require__.d(d,{code:()=>dd,decode:()=>pd,encode:()=>fd,name:()=>hd});var f={};__webpack_require__.r(f),__webpack_require__.d(f,{code:()=>Ad,decode:()=>bd,encode:()=>yd,name:()=>md});__webpack_require__(2419);function p(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 g(e,t){if(e){if("string"==typeof e)return p(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)?p(e,t):void 0}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(e,t)||g(e,t)||function(){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 m(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function A(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){m(o,n,i,a,s,"next",e)}function s(e){m(o,n,i,a,s,"throw",e)}a(void 0)}))}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(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 _(e,t,r){return t&&b(e.prototype,t),r&&b(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function w(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&&E(e,t)}function I(e){return I="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},I(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){if(t&&("object"===I(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}var R=__webpack_require__(7162),k=__webpack_require__.n(R);__webpack_require__(2222),__webpack_require__(7042),__webpack_require__(8309),__webpack_require__(1038),__webpack_require__(2526),__webpack_require__(1817),__webpack_require__(2165),__webpack_require__(9753),__webpack_require__(6992),__webpack_require__(1532),__webpack_require__(1539),__webpack_require__(8783),__webpack_require__(72),__webpack_require__(9137),__webpack_require__(1957),__webpack_require__(6306),__webpack_require__(103),__webpack_require__(4592),__webpack_require__(8276),__webpack_require__(5082),__webpack_require__(2813),__webpack_require__(8222),__webpack_require__(8563),__webpack_require__(336),__webpack_require__(7512),__webpack_require__(3948),__webpack_require__(7327);function O(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,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,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function N(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}var x=function(){function e(){y(this,e),this._eventMap=new Map}return _(e,[{key:"once",value:function(e,t){var r=this;return this.on(e,(function n(){r.off(e,n),t.apply(void 0,arguments)})),this}},{key:"on",value:function(e,t){var r,n=null!==(r=this._eventMap.get(e))&&void 0!==r?r:[];return n.push(t),this._eventMap.set(e,n),this}},{key:"off",value:function(e,t){var r=this._eventMap.get(e);return r&&this._eventMap.set(e,r.filter((function(e){return e!==t}))),this}},{key:"removeAllEventListeners",value:function(){this._eventMap.clear()}},{key:"emit",value:function(e){for(var t,r=null!==(t=this._eventMap.get(e))&&void 0!==t?t:[],n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var a,s=O(r);try{for(s.s();!(a=s.n()).done;){var c=a.value;try{c&&c.apply(void 0,i)}catch(t){var u=t,l=u.stack||u.message;console.error("[event] handling event ".concat(e," fail: ").concat(l))}}}catch(e){s.e(e)}finally{s.f()}return this}}]),e}();__webpack_require__(7941),__webpack_require__(5003),__webpack_require__(9554),__webpack_require__(4747),__webpack_require__(9337),__webpack_require__(3321),__webpack_require__(9070);function D(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}__webpack_require__(2772);function L(){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 P(e,t,r){return P=L()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&E(i,r.prototype),i},P.apply(null,arguments)}function M(e){var t="function"==typeof Map?new Map:void 0;return M=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return P(e,arguments,C(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),E(n,e)},M(e)}__webpack_require__(6699),__webpack_require__(2023),__webpack_require__(3843),__webpack_require__(3710),__webpack_require__(8674),__webpack_require__(9600);var B=__webpack_require__(5760),j=__webpack_require__.n(B),U=__webpack_require__(6635),F=__webpack_require__(1005),G=__webpack_require__.n(F);function Q(){return G()('(()=>{var t={7162:(t,e,n)=>{t.exports=n(5047)},857:(t,e,n)=>{var r=n(7772).Symbol;t.exports=r},3366:(t,e,n)=>{var r=n(857),o=n(2107),i=n(7157),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},1704:(t,e,n)=>{var r=n(2153),o=/^\\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(o,""):t}},1242:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},2107:(t,e,n)=>{var r=n(857),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}},7157:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},7772:(t,e,n)=>{var r=n(1242),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},2153:t=>{var e=/\\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},4073:(t,e,n)=>{var r=n(9259),o=n(1100),i=n(7642),a=Math.max,u=Math.min;t.exports=function(t,e,n){var c,s,f,l,h,p,d=0,v=!1,y=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=c,r=s;return c=s=void 0,d=e,l=t.apply(r,n)}function b(t){return d=t,h=setTimeout(_,e),v?g(t):l}function w(t){var n=t-p;return void 0===p||n>=e||n<0||y&&t-d>=f}function _(){var t=o();if(w(t))return x(t);h=setTimeout(_,function(t){var n=e-(t-p);return y?u(n,f-(t-d)):n}(t))}function x(t){return h=void 0,m&&c?g(t):(c=s=void 0,l)}function k(){var t=o(),n=w(t);if(c=arguments,s=this,p=t,n){if(void 0===h)return b(p);if(y)return clearTimeout(h),h=setTimeout(_,e),g(p)}return void 0===h&&(h=setTimeout(_,e)),l}return e=i(e)||0,r(n)&&(v=!!n.leading,f=(y="maxWait"in n)?a(i(n.maxWait)||0,e):f,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==h&&clearTimeout(h),d=0,c=p=s=h=void 0},k.flush=function(){return void 0===h?l:x(o())},k}},9259:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},5125:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},4795:(t,e,n)=>{var r=n(3366),o=n(5125);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},1100:(t,e,n)=>{var r=n(7772);t.exports=function(){return r.Date.now()}},7642:(t,e,n)=>{var r=n(1704),o=n(9259),i=n(4795),a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=u.test(t);return n||c.test(t)?s(t.slice(2),n?2:8):a.test(t)?NaN:+t}},5047:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new S(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=j(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=f(t,e,n);if("normal"===c.type){if(r=n.done?d:h,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function m(){}function g(){}var b={};c(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==n&&r.call(_,i)&&(b=_);var x=g.prototype=y.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function j(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a \'throw\' method")}return v}var o=f(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function T(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:e,done:!0}}return m.prototype=g,c(x,"constructor",g),c(g,"constructor",m),m.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},k(O.prototype),c(O.prototype,a,(function(){return this})),t.AsyncIterator=O,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),c(x,u,"Generator"),c(x,i,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},9662:(t,e,n)=>{var r=n(7854),o=n(614),i=n(6330),a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},9483:(t,e,n)=>{var r=n(7854),o=n(4411),i=n(6330),a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},6077:(t,e,n)=>{var r=n(7854),o=n(614),i=r.String,a=r.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw a("Can\'t set "+i(t)+" as a prototype")}},5787:(t,e,n)=>{var r=n(7854),o=n(7976),i=r.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},9670:(t,e,n)=>{var r=n(7854),o=n(111),i=r.String,a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},1318:(t,e,n)=>{var r=n(5656),o=n(1400),i=n(6244),a=function(t){return function(e,n,a){var u,c=r(e),s=i(c),f=o(a,s);if(t&&n!=n){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},1194:(t,e,n)=>{var r=n(7293),o=n(5112),i=n(7392),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},206:(t,e,n)=>{var r=n(1702);t.exports=r([].slice)},7475:(t,e,n)=>{var r=n(7854),o=n(3157),i=n(4411),a=n(111),u=n(5112)("species"),c=r.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===c||o(e.prototype))||a(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?c:e}},5417:(t,e,n)=>{var r=n(7475);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},7072:(t,e,n)=>{var r=n(5112)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},4326:(t,e,n)=>{var r=n(1702),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},648:(t,e,n)=>{var r=n(7854),o=n(1694),i=n(614),a=n(4326),u=n(5112)("toStringTag"),c=r.Object,s="Arguments"==a(function(){return arguments}());t.exports=o?a:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),u))?n:s?a(e):"Object"==(r=a(e))&&i(e.callee)?"Arguments":r}},9920:(t,e,n)=>{var r=n(2597),o=n(3887),i=n(1236),a=n(3070);t.exports=function(t,e,n){for(var u=o(e),c=a.f,s=i.f,f=0;f<u.length;f++){var l=u[f];r(t,l)||n&&r(n,l)||c(t,l,s(e,l))}}},8880:(t,e,n)=>{var r=n(9781),o=n(3070),i=n(9114);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,n)=>{"use strict";var r=n(4948),o=n(3070),i=n(9114);t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},9781:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,n)=>{var r=n(7854),o=n(111),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},7871:t=>{t.exports="object"==typeof window},1528:(t,e,n)=>{var r=n(8113),o=n(7854);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},6833:(t,e,n)=>{var r=n(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:(t,e,n)=>{var r=n(4326),o=n(7854);t.exports="process"==r(o.process)},1036:(t,e,n)=>{var r=n(8113);t.exports=/web0s(?!.*chrome)/i.test(r)},8113:(t,e,n)=>{var r=n(5005);t.exports=r("navigator","userAgent")||""},7392:(t,e,n)=>{var r,o,i=n(7854),a=n(8113),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,f=s&&s.v8;f&&(o=(r=f.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\\/(\\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\\/(\\d+)/))&&(o=+r[1]),t.exports=o},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,n)=>{var r=n(7854),o=n(1236).f,i=n(8880),a=n(1320),u=n(3505),c=n(9920),s=n(4705);t.exports=function(t,e){var n,f,l,h,p,d=t.target,v=t.global,y=t.stat;if(n=v?r:y?r[d]||u(d,{}):(r[d]||{}).prototype)for(f in e){if(h=e[f],l=t.noTargetGet?(p=o(n,f))&&p.value:n[f],!s(v?f:d+(y?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;c(h,l)}(t.sham||l&&l.sham)&&i(h,"sham",!0),a(n,f,h,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},2104:t=>{var e=Function.prototype,n=e.apply,r=e.bind,o=e.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(n):function(){return o.apply(n,arguments)})},9974:(t,e,n)=>{var r=n(1702),o=n(9662),i=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?i(t,e):function(){return t.apply(e,arguments)}}},7065:(t,e,n)=>{"use strict";var r=n(7854),o=n(1702),i=n(9662),a=n(111),u=n(2597),c=n(206),s=r.Function,f=o([].concat),l=o([].join),h={},p=function(t,e,n){if(!u(h,e)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";h[e]=s("C,a","return new C("+l(r,",")+")")}return h[e](t,n)};t.exports=s.bind||function(t){var e=i(this),n=e.prototype,r=c(arguments,1),o=function(){var n=f(r,c(arguments));return this instanceof o?p(e,n.length,n):e.apply(t,n)};return a(n)&&(o.prototype=n),o}},6916:t=>{var e=Function.prototype.call;t.exports=e.bind?e.bind(e):function(){return e.apply(e,arguments)}},6530:(t,e,n)=>{var r=n(9781),o=n(2597),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},1702:t=>{var e=Function.prototype,n=e.bind,r=e.call,o=n&&n.bind(r);t.exports=n?function(t){return t&&o(r,t)}:function(t){return t&&function(){return r.apply(t,arguments)}}},5005:(t,e,n)=>{var r=n(7854),o=n(614),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},1246:(t,e,n)=>{var r=n(648),o=n(8173),i=n(7497),a=n(5112)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[r(t)]}},8554:(t,e,n)=>{var r=n(7854),o=n(6916),i=n(9662),a=n(9670),u=n(6330),c=n(1246),s=r.TypeError;t.exports=function(t,e){var n=arguments.length<2?c(t):e;if(i(n))return a(o(n,t));throw s(u(t)+" is not iterable")}},8173:(t,e,n)=>{var r=n(9662);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},7854:(t,e,n)=>{var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:(t,e,n)=>{var r=n(1702),o=n(7908),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3501:t=>{t.exports={}},842:(t,e,n)=>{var r=n(7854);t.exports=function(t,e){var n=r.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}},490:(t,e,n)=>{var r=n(5005);t.exports=r("document","documentElement")},4664:(t,e,n)=>{var r=n(9781),o=n(7293),i=n(317);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,n)=>{var r=n(7854),o=n(1702),i=n(7293),a=n(4326),u=r.Object,c=o("".split);t.exports=i((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?c(t,""):u(t)}:u},2788:(t,e,n)=>{var r=n(1702),o=n(614),i=n(5465),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},9909:(t,e,n)=>{var r,o,i,a=n(8536),u=n(7854),c=n(1702),s=n(111),f=n(8880),l=n(2597),h=n(5465),p=n(6200),d=n(3501),v="Object already initialized",y=u.TypeError,m=u.WeakMap;if(a||h.state){var g=h.state||(h.state=new m),b=c(g.get),w=c(g.has),_=c(g.set);r=function(t,e){if(w(g,t))throw new y(v);return e.facade=t,_(g,t,e),e},o=function(t){return b(g,t)||{}},i=function(t){return w(g,t)}}else{var x=p("state");d[x]=!0,r=function(t,e){if(l(t,x))throw new y(v);return e.facade=t,f(t,x,e),e},o=function(t){return l(t,x)?t[x]:{}},i=function(t){return l(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!s(e)||(n=o(e)).type!==t)throw y("Incompatible receiver, "+t+" required");return n}}}},7659:(t,e,n)=>{var r=n(5112),o=n(7497),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},3157:(t,e,n)=>{var r=n(4326);t.exports=Array.isArray||function(t){return"Array"==r(t)}},614:t=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,n)=>{var r=n(1702),o=n(7293),i=n(614),a=n(648),u=n(5005),c=n(2788),s=function(){},f=[],l=u("Reflect","construct"),h=/^\\s*(?:class|function)\\b/,p=r(h.exec),d=!h.exec(s),v=function(t){if(!i(t))return!1;try{return l(s,f,t),!0}catch(t){return!1}},y=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!p(h,c(t))}catch(t){return!0}};y.sham=!0,t.exports=!l||o((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?y:v},4705:(t,e,n)=>{var r=n(7293),o=n(614),i=/#|\\.prototype\\./,a=function(t,e){var n=c[u(t)];return n==f||n!=s&&(o(e)?r(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},111:(t,e,n)=>{var r=n(614);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},1913:t=>{t.exports=!1},2190:(t,e,n)=>{var r=n(7854),o=n(5005),i=n(614),a=n(7976),u=n(3307),c=r.Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&a(e.prototype,c(t))}},408:(t,e,n)=>{var r=n(7854),o=n(9974),i=n(6916),a=n(9670),u=n(6330),c=n(7659),s=n(6244),f=n(7976),l=n(8554),h=n(1246),p=n(9212),d=r.TypeError,v=function(t,e){this.stopped=t,this.result=e},y=v.prototype;t.exports=function(t,e,n){var r,m,g,b,w,_,x,k=n&&n.that,O=!(!n||!n.AS_ENTRIES),j=!(!n||!n.IS_ITERATOR),E=!(!n||!n.INTERRUPTED),P=o(e,k),S=function(t){return r&&p(r,"normal",t),new v(!0,t)},T=function(t){return O?(a(t),E?P(t[0],t[1],S):P(t[0],t[1])):E?P(t,S):P(t)};if(j)r=t;else{if(!(m=h(t)))throw d(u(t)+" is not iterable");if(c(m)){for(g=0,b=s(t);b>g;g++)if((w=T(t[g]))&&f(y,w))return w;return new v(!1)}r=l(t,m)}for(_=r.next;!(x=i(_,r)).done;){try{w=T(x.value)}catch(t){p(r,"throw",t)}if("object"==typeof w&&w&&f(y,w))return w}return new v(!1)}},9212:(t,e,n)=>{var r=n(6916),o=n(9670),i=n(8173);t.exports=function(t,e,n){var a,u;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw n;return n}a=r(a,t)}catch(t){u=!0,a=t}if("throw"===e)throw n;if(u)throw a;return o(a),n}},7497:t=>{t.exports={}},6244:(t,e,n)=>{var r=n(7466);t.exports=function(t){return r(t.length)}},5948:(t,e,n)=>{var r,o,i,a,u,c,s,f,l=n(7854),h=n(9974),p=n(1236).f,d=n(261).set,v=n(6833),y=n(1528),m=n(1036),g=n(5268),b=l.MutationObserver||l.WebKitMutationObserver,w=l.document,_=l.process,x=l.Promise,k=p(l,"queueMicrotask"),O=k&&k.value;O||(r=function(){var t,e;for(g&&(t=_.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},v||g||m||!b||!w?!y&&x&&x.resolve?((s=x.resolve(void 0)).constructor=x,f=h(s.then,s),a=function(){f(r)}):g?a=function(){_.nextTick(r)}:(d=h(d,l),a=function(){d(r)}):(u=!0,c=w.createTextNode(""),new b(r).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=O||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},1070:(t,e,n)=>{var r=n(7854);t.exports=r.Promise},133:(t,e,n)=>{var r=n(7392),o=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8536:(t,e,n)=>{var r=n(7854),o=n(614),i=n(2788),a=r.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},8523:(t,e,n)=>{"use strict";var r=n(9662),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},30:(t,e,n)=>{var r,o=n(9670),i=n(6048),a=n(748),u=n(3501),c=n(490),s=n(317),f=n(6200),l=f("IE_PROTO"),h=function(){},p=function(t){return"<script>"+t+"</"+"script>"},d=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;v="undefined"!=typeof document?document.domain&&r?d(r):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):d(r);for(var n=a.length;n--;)delete v.prototype[a[n]];return v()};u[l]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=o(t),n=new h,h.prototype=null,n[l]=t):n=v(),void 0===e?n:i(n,e)}},6048:(t,e,n)=>{var r=n(9781),o=n(3070),i=n(9670),a=n(5656),u=n(1956);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),c=u(e),s=c.length,f=0;s>f;)o.f(t,n=c[f++],r[n]);return t}},3070:(t,e,n)=>{var r=n(7854),o=n(9781),i=n(4664),a=n(9670),u=n(4948),c=r.TypeError,s=Object.defineProperty;e.f=o?s:function(t,e,n){if(a(t),e=u(e),a(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:(t,e,n)=>{var r=n(9781),o=n(6916),i=n(5296),a=n(9114),u=n(5656),c=n(4948),s=n(2597),f=n(4664),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=u(t),e=c(e),f)try{return l(t,e)}catch(t){}if(s(t,e))return a(!o(i.f,t,e),t[e])}},8006:(t,e,n)=>{var r=n(6324),o=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},7976:(t,e,n)=>{var r=n(1702);t.exports=r({}.isPrototypeOf)},6324:(t,e,n)=>{var r=n(1702),o=n(2597),i=n(5656),a=n(1318).indexOf,u=n(3501),c=r([].push);t.exports=function(t,e){var n,r=i(t),s=0,f=[];for(n in r)!o(u,n)&&o(r,n)&&c(f,n);for(;e.length>s;)o(r,n=e[s++])&&(~a(f,n)||c(f,n));return f}},1956:(t,e,n)=>{var r=n(6324),o=n(748);t.exports=Object.keys||function(t){return r(t,o)}},5296:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},7674:(t,e,n)=>{var r=n(1702),o=n(9670),i=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},288:(t,e,n)=>{"use strict";var r=n(1694),o=n(648);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},2140:(t,e,n)=>{var r=n(7854),o=n(6916),i=n(614),a=n(111),u=r.TypeError;t.exports=function(t,e){var n,r;if("string"===e&&i(n=t.toString)&&!a(r=o(n,t)))return r;if(i(n=t.valueOf)&&!a(r=o(n,t)))return r;if("string"!==e&&i(n=t.toString)&&!a(r=o(n,t)))return r;throw u("Can\'t convert object to primitive value")}},3887:(t,e,n)=>{var r=n(5005),o=n(1702),i=n(8006),a=n(5181),u=n(9670),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(u(t)),n=a.f;return n?c(e,n(t)):e}},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},9478:(t,e,n)=>{var r=n(9670),o=n(111),i=n(8523);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},8572:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=e},2248:(t,e,n)=>{var r=n(1320);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},1320:(t,e,n)=>{var r=n(7854),o=n(614),i=n(2597),a=n(8880),u=n(3505),c=n(2788),s=n(9909),f=n(6530).CONFIGURABLE,l=s.get,h=s.enforce,p=String(String).split("String");(t.exports=function(t,e,n,c){var s,l=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,v=!!c&&!!c.noTargetGet,y=c&&void 0!==c.name?c.name:e;o(n)&&("Symbol("===String(y).slice(0,7)&&(y="["+String(y).replace(/^Symbol\\(([^)]*)\\)/,"$1")+"]"),(!i(n,"name")||f&&n.name!==y)&&a(n,"name",y),(s=h(n)).source||(s.source=p.join("string"==typeof y?y:""))),t!==r?(l?!v&&t[e]&&(d=!0):delete t[e],d?t[e]=n:a(t,e,n)):d?t[e]=n:u(e,n)})(Function.prototype,"toString",(function(){return o(this)&&l(this).source||c(this)}))},4488:(t,e,n)=>{var r=n(7854).TypeError;t.exports=function(t){if(null==t)throw r("Can\'t call method on "+t);return t}},3505:(t,e,n)=>{var r=n(7854),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},6340:(t,e,n)=>{"use strict";var r=n(5005),o=n(3070),i=n(5112),a=n(9781),u=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[u]&&n(e,u,{configurable:!0,get:function(){return this}})}},8003:(t,e,n)=>{var r=n(3070).f,o=n(2597),i=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!o(t,i)&&r(t,i,{configurable:!0,value:e})}},6200:(t,e,n)=>{var r=n(2309),o=n(9711),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:(t,e,n)=>{var r=n(7854),o=n(3505),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},2309:(t,e,n)=>{var r=n(1913),o=n(5465);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.20.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:(t,e,n)=>{var r=n(9670),o=n(9483),i=n(5112)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},261:(t,e,n)=>{var r,o,i,a,u=n(7854),c=n(2104),s=n(9974),f=n(614),l=n(2597),h=n(7293),p=n(490),d=n(206),v=n(317),y=n(6833),m=n(5268),g=u.setImmediate,b=u.clearImmediate,w=u.process,_=u.Dispatch,x=u.Function,k=u.MessageChannel,O=u.String,j=0,E={},P="onreadystatechange";try{r=u.location}catch(t){}var S=function(t){if(l(E,t)){var e=E[t];delete E[t],e()}},T=function(t){return function(){S(t)}},A=function(t){S(t.data)},C=function(t){u.postMessage(O(t),r.protocol+"//"+r.host)};g&&b||(g=function(t){var e=d(arguments,1);return E[++j]=function(){c(f(t)?t:x(t),void 0,e)},o(j),j},b=function(t){delete E[t]},m?o=function(t){w.nextTick(T(t))}:_&&_.now?o=function(t){_.now(T(t))}:k&&!y?(a=(i=new k).port2,i.port1.onmessage=A,o=s(a.postMessage,a)):u.addEventListener&&f(u.postMessage)&&!u.importScripts&&r&&"file:"!==r.protocol&&!h(C)?(o=C,u.addEventListener("message",A,!1)):o=P in v("script")?function(t){p.appendChild(v("script")).onreadystatechange=function(){p.removeChild(this),S(t)}}:function(t){setTimeout(T(t),0)}),t.exports={set:g,clear:b}},1400:(t,e,n)=>{var r=n(9303),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},5656:(t,e,n)=>{var r=n(8361),o=n(4488);t.exports=function(t){return r(o(t))}},9303:t=>{var e=Math.ceil,n=Math.floor;t.exports=function(t){var r=+t;return r!=r||0===r?0:(r>0?n:e)(r)}},7466:(t,e,n)=>{var r=n(9303),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},7908:(t,e,n)=>{var r=n(7854),o=n(4488),i=r.Object;t.exports=function(t){return i(o(t))}},7593:(t,e,n)=>{var r=n(7854),o=n(6916),i=n(111),a=n(2190),u=n(8173),c=n(2140),s=n(5112),f=r.TypeError,l=s("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var n,r=u(t,l);if(r){if(void 0===e&&(e="default"),n=o(r,t,e),!i(n)||a(n))return n;throw f("Can\'t convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},4948:(t,e,n)=>{var r=n(7593),o=n(2190);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},1694:(t,e,n)=>{var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},6330:(t,e,n)=>{var r=n(7854).String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},9711:(t,e,n)=>{var r=n(1702),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},3307:(t,e,n)=>{var r=n(133);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:(t,e,n)=>{var r=n(7854),o=n(2309),i=n(2597),a=n(9711),u=n(133),c=n(3307),s=o("wks"),f=r.Symbol,l=f&&f.for,h=c?f:f&&f.withoutSetter||a;t.exports=function(t){if(!i(s,t)||!u&&"string"!=typeof s[t]){var e="Symbol."+t;u&&i(f,t)?s[t]=f[t]:s[t]=c&&l?l(e):h(e)}return s[t]}},2222:(t,e,n)=>{"use strict";var r=n(2109),o=n(7854),i=n(7293),a=n(3157),u=n(111),c=n(7908),s=n(6244),f=n(6135),l=n(5417),h=n(1194),p=n(5112),d=n(7392),v=p("isConcatSpreadable"),y=9007199254740991,m="Maximum allowed index exceeded",g=o.TypeError,b=d>=51||!i((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),w=h("concat"),_=function(t){if(!u(t))return!1;var e=t[v];return void 0!==e?!!e:a(t)};r({target:"Array",proto:!0,forced:!b||!w},{concat:function(t){var e,n,r,o,i,a=c(this),u=l(a,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(_(i=-1===e?a:arguments[e])){if(h+(o=s(i))>y)throw g(m);for(n=0;n<o;n++,h++)n in i&&f(u,h,i[n])}else{if(h>=y)throw g(m);f(u,h++,i)}return u.length=h,u}})},5069:(t,e,n)=>{"use strict";var r=n(2109),o=n(1702),i=n(3157),a=o([].reverse),u=[1,2];r({target:"Array",proto:!0,forced:String(u)===String(u.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},3843:(t,e,n)=>{var r=n(2109),o=n(7854),i=n(1702),a=o.Date,u=i(a.prototype.getTime);r({target:"Date",stat:!0},{now:function(){return u(new a)}})},3710:(t,e,n)=>{var r=n(1702),o=n(1320),i=Date.prototype,a="Invalid Date",u="toString",c=r(i.toString),s=r(i.getTime);String(new Date(NaN))!=a&&o(i,u,(function(){var t=s(this);return t==t?c(this):a}))},1539:(t,e,n)=>{var r=n(1694),o=n(1320),i=n(288);r||o(Object.prototype,"toString",i,{unsafe:!0})},8674:(t,e,n)=>{"use strict";var r,o,i,a,u=n(2109),c=n(1913),s=n(7854),f=n(5005),l=n(6916),h=n(1070),p=n(1320),d=n(2248),v=n(7674),y=n(8003),m=n(6340),g=n(9662),b=n(614),w=n(111),_=n(5787),x=n(2788),k=n(408),O=n(7072),j=n(6707),E=n(261).set,P=n(5948),S=n(9478),T=n(842),A=n(8523),C=n(2534),K=n(8572),I=n(9909),D=n(4705),R=n(5112),F=n(7871),B=n(5268),N=n(7392),M=R("species"),q="Promise",L=I.getterFor(q),U=I.set,G=I.getterFor(q),W=h&&h.prototype,z=h,V=W,Y=s.TypeError,H=s.document,X=s.process,Q=A.f,$=Q,J=!!(H&&H.createEvent&&s.dispatchEvent),Z=b(s.PromiseRejectionEvent),tt="unhandledrejection",et=!1,nt=D(q,(function(){var t=x(z),e=t!==String(z);if(!e&&66===N)return!0;if(c&&!V.finally)return!0;if(N>=51&&/native code/.test(t))return!1;var n=new z((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[M]=r,!(et=n.then((function(){}))instanceof r)||!e&&F&&!Z})),rt=nt||!O((function(t){z.all(t).catch((function(){}))})),ot=function(t){var e;return!(!w(t)||!b(e=t.then))&&e},it=function(t,e){var n,r,o,i=e.value,a=1==e.state,u=a?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{u?(a||(2===e.rejection&&ft(e),e.rejection=1),!0===u?n=i:(f&&f.enter(),n=u(i),f&&(f.exit(),o=!0)),n===t.promise?s(Y("Promise-chain cycle")):(r=ot(n))?l(r,n,c,s):c(n)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},at=function(t,e){t.notified||(t.notified=!0,P((function(){for(var n,r=t.reactions;n=r.get();)it(n,t);t.notified=!1,e&&!t.rejection&&ct(t)})))},ut=function(t,e,n){var r,o;J?((r=H.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!Z&&(o=s["on"+t])?o(r):t===tt&&T("Unhandled promise rejection",n)},ct=function(t){l(E,s,(function(){var e,n=t.facade,r=t.value;if(st(t)&&(e=C((function(){B?X.emit("unhandledRejection",r,n):ut(tt,n,r)})),t.rejection=B||st(t)?2:1,e.error))throw e.value}))},st=function(t){return 1!==t.rejection&&!t.parent},ft=function(t){l(E,s,(function(){var e=t.facade;B?X.emit("rejectionHandled",e):ut("rejectionhandled",e,t.value)}))},lt=function(t,e,n){return function(r){t(e,r,n)}},ht=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,at(t,!0))},pt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Y("Promise can\'t be resolved itself");var r=ot(e);r?P((function(){var n={done:!1};try{l(r,e,lt(pt,n,t),lt(ht,n,t))}catch(e){ht(n,e,t)}})):(t.value=e,t.state=1,at(t,!1))}catch(e){ht({done:!1},e,t)}}};if(nt&&(V=(z=function(t){_(this,V),g(t),l(r,this);var e=L(this);try{t(lt(pt,e),lt(ht,e))}catch(t){ht(e,t)}}).prototype,(r=function(t){U(this,{type:q,done:!1,notified:!1,parent:!1,reactions:new K,rejection:!1,state:0,value:void 0})}).prototype=d(V,{then:function(t,e){var n=G(this),r=Q(j(this,z));return n.parent=!0,r.ok=!b(t)||t,r.fail=b(e)&&e,r.domain=B?X.domain:void 0,0==n.state?n.reactions.add(r):P((function(){it(r,n)})),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=L(t);this.promise=t,this.resolve=lt(pt,e),this.reject=lt(ht,e)},A.f=Q=function(t){return t===z||t===i?new o(t):$(t)},!c&&b(h)&&W!==Object.prototype)){a=W.then,et||(p(W,"then",(function(t,e){var n=this;return new z((function(t,e){l(a,n,t,e)})).then(t,e)}),{unsafe:!0}),p(W,"catch",V.catch,{unsafe:!0}));try{delete W.constructor}catch(t){}v&&v(W,V)}u({global:!0,wrap:!0,forced:nt},{Promise:z}),y(z,q,!1,!0),m(q),i=f(q),u({target:q,stat:!0,forced:nt},{reject:function(t){var e=Q(this);return l(e.reject,void 0,t),e.promise}}),u({target:q,stat:!0,forced:c||nt},{resolve:function(t){return S(c&&this===i?z:this,t)}}),u({target:q,stat:!0,forced:rt},{all:function(t){var e=this,n=Q(e),r=n.resolve,o=n.reject,i=C((function(){var n=g(e.resolve),i=[],a=0,u=1;k(t,(function(t){var c=a++,s=!1;u++,l(n,e,t).then((function(t){s||(s=!0,i[c]=t,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=Q(e),r=n.reject,o=C((function(){var o=g(e.resolve);k(t,(function(t){l(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},2419:(t,e,n)=>{var r=n(2109),o=n(5005),i=n(2104),a=n(7065),u=n(9483),c=n(9670),s=n(111),f=n(30),l=n(7293),h=o("Reflect","construct"),p=Object.prototype,d=[].push,v=l((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),y=!l((function(){h((function(){}))})),m=v||y;r({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(t,e){u(t),c(e);var n=arguments.length<3?t:u(arguments[2]);if(y&&!v)return h(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return i(d,r,e),new(i(a,t,r))}var o=n.prototype,l=f(s(o)?o:p),m=i(t,l,e);return s(m)?m:l}})}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";function t(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function e(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function u(e){t(a,o,i,u,c,"next",e)}function c(e){t(a,o,i,u,c,"throw",e)}u(void 0)}))}}var r=n(7162),o=n.n(r),i=(n(3710),n(5069),n(2222),n(3843),n(4073)),a=n.n(i);n(2419);function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function h(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var d=function(){return d=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},d.apply(this,arguments)};function v(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}var y=Object.keys,m=Array.isArray,g="undefined"!=typeof self?self:"undefined"!=typeof window?window:global;function b(t,e){return"object"!=typeof e||y(e).forEach((function(n){t[n]=e[n]})),t}"undefined"==typeof Promise||g.Promise||(g.Promise=Promise);var w=Object.getPrototypeOf,_={}.hasOwnProperty;function x(t,e){return _.call(t,e)}function k(t,e){"function"==typeof e&&(e=e(w(t))),y(e).forEach((function(n){j(t,n,e[n])}))}var O=Object.defineProperty;function j(t,e,n,r){O(t,e,b(n&&x(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function E(t){return{from:function(e){return t.prototype=Object.create(e.prototype),j(t.prototype,"constructor",t),{extend:k.bind(null,t.prototype)}}}}var P=Object.getOwnPropertyDescriptor;function S(t,e){var n;return P(t,e)||(n=w(t))&&S(n,e)}var T=[].slice;function A(t,e,n){return T.call(t,e,n)}function C(t,e){return e(t)}function K(t){if(!t)throw new Error("Assertion Failed")}function I(t){g.setImmediate?setImmediate(t):setTimeout(t,0)}function D(t,e){return t.reduce((function(t,n,r){var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})}function R(t,e){if(x(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=R(t,e[r]);n.push(i)}return n}var a=e.indexOf(".");if(-1!==a){var u=t[e.substr(0,a)];return void 0===u?void 0:R(u,e.substr(a+1))}}function F(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){K("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)F(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var a=e.substr(0,i),u=e.substr(i+1);if(""===u)void 0===n?m(t)&&!isNaN(parseInt(a))?t.splice(a,1):delete t[a]:t[a]=n;else{var c=t[a];c||(c=t[a]={}),F(c,u,n)}}else void 0===n?m(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}function B(t,e){"string"==typeof e?F(t,e,void 0):"length"in e&&[].map.call(e,(function(e){F(t,e,void 0)}))}function N(t){var e={};for(var n in t)x(t,n)&&(e[n]=t[n]);return e}var M=[].concat;function q(t){return M.apply([],t)}var L="Boolean,String,Date,RegExp,Blob,File,FileList,ArrayBuffer,DataView,Uint8ClampedArray,ImageData,Map,Set".split(",").concat(q([8,16,32,64].map((function(t){return["Int","Uint","Float"].map((function(e){return e+t+"Array"}))})))).filter((function(t){return g[t]})),U=L.map((function(t){return g[t]})),G=D(L,(function(t){return[t,!0]}));function W(t){if(!t||"object"!=typeof t)return t;var e;if(m(t)){e=[];for(var n=0,r=t.length;n<r;++n)e.push(W(t[n]))}else if(U.indexOf(t.constructor)>=0)e=t;else for(var o in e=t.constructor?Object.create(t.constructor.prototype):{},t)x(t,o)&&(e[o]=W(t[o]));return e}var z={}.toString;function V(t){return z.call(t).slice(8,-1)}var Y=function(t,e){return"Array"===e?""+t.map((function(t){return Y(t,V(t))})):"ArrayBuffer"===e?""+new Uint8Array(t):"Date"===e?t.getTime():ArrayBuffer.isView(t)?""+new Uint8Array(t.buffer):t};function H(t,e,n,r){return n=n||{},r=r||"",y(t).forEach((function(o){if(x(e,o)){var i=t[o],a=e[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=V(i),c=V(a);u===c?G[u]?Y(i,u)!==Y(a,c)&&(n[r+o]=e[o]):H(i,a,n,r+o+"."):n[r+o]=e[o]}else i!==a&&(n[r+o]=e[o])}else n[r+o]=void 0})),y(e).forEach((function(o){x(t,o)||(n[r+o]=e[o])})),n}var X="undefined"!=typeof Symbol&&Symbol.iterator,Q=X?function(t){var e;return null!=t&&(e=t[X])&&e.apply(t)}:function(){return null},$={};function J(t){var e,n,r,o;if(1===arguments.length){if(m(t))return t.slice();if(this===$&&"string"==typeof t)return[t];if(o=Q(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n}var Z="undefined"!=typeof Symbol?function(t){return"AsyncFunction"===t[Symbol.toStringTag]}:function(){return!1},tt="undefined"!=typeof location&&/^(http|https):\\/\\/(localhost|127\\.0\\.0\\.1)/.test(location.href);function et(t,e){tt=t,nt=e}var nt=function(){return!0},rt=!new Error("").stack;function ot(){if(rt)try{throw new Error}catch(t){return t}return new Error}function it(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\\n").length),n.split("\\n").slice(e).filter(nt).map((function(t){return"\\n"+t})).join("")):""}var at=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ut=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(at),ct={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed"};function st(t,e){this._e=ot(),this.name=t,this.message=e}function ft(t,e){return t+". Errors: "+Object.keys(e).map((function(t){return e[t].toString()})).filter((function(t,e,n){return n.indexOf(t)===e})).join("\\n")}function lt(t,e,n,r){this._e=ot(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=ft(t,e)}function ht(t,e){this._e=ot(),this.name="BulkError",this.failures=e,this.message=ft(t,e)}E(st).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+it(this._e,2))}},toString:function(){return this.name+": "+this.message}}),E(lt).from(st),E(ht).from(st);var pt=ut.reduce((function(t,e){return t[e]=e+"Error",t}),{}),dt=st,vt=ut.reduce((function(t,e){var n=e+"Error";function r(t,r){this._e=ot(),this.name=n,t?"string"==typeof t?(this.message=t+(r?"\\n "+r:""),this.inner=r||null):"object"==typeof t&&(this.message=t.name+" "+t.message,this.inner=t):(this.message=ct[e]||n,this.inner=null)}return E(r).from(dt),t[e]=r,t}),{});vt.Syntax=SyntaxError,vt.Type=TypeError,vt.Range=RangeError;var yt=at.reduce((function(t,e){return t[e+"Error"]=vt[e],t}),{});var mt=ut.reduce((function(t,e){return-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=vt[e]),t}),{});function gt(){}function bt(t){return t}function wt(t,e){return null==t||t===bt?e:function(n){return e(t(n))}}function _t(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function xt(t,e){return t===gt?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?_t(r,this.onsuccess):r),o&&(this.onerror=this.onerror?_t(o,this.onerror):o),void 0!==i?i:n}}function kt(t,e){return t===gt?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?_t(n,this.onsuccess):n),r&&(this.onerror=this.onerror?_t(r,this.onerror):r)}}function Ot(t,e){return t===gt?e:function(n){var r=t.apply(this,arguments);b(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?_t(o,this.onsuccess):o),i&&(this.onerror=this.onerror?_t(i,this.onerror):i),void 0===r?void 0===a?void 0:a:b(r,a)}}function jt(t,e){return t===gt?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}}function Et(t,e){return t===gt?e:function(){var n=t.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return e.apply(r,i)}))}return e.apply(this,arguments)}}mt.ModifyError=lt,mt.DexieError=st,mt.BulkError=ht;var Pt={},St="undefined"==typeof Promise?[]:function(){var t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,t.__proto__,t];var e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,e.__proto__,t]}(),Tt=St[0],At=St[1],Ct=St[2],Kt=At&&At.then,It=Tt&&Tt.constructor,Dt=!!Ct,Rt=!1,Ft=Ct?function(){Ct.then(ie)}:g.setImmediate?setImmediate.bind(null,ie):g.MutationObserver?function(){var t=document.createElement("div");new MutationObserver((function(){ie(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:function(){setTimeout(ie,0)},Bt=function(t,e){Vt.push([t,e]),Mt&&(Ft(),Mt=!1)},Nt=!0,Mt=!0,qt=[],Lt=[],Ut=null,Gt=bt,Wt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ae,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(t){try{Ae(t[0],t[1])}catch(t){}}))}},zt=Wt,Vt=[],Yt=0,Ht=[];function Xt(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=gt,this._lib=!1;var e=this._PSD=zt;if(tt&&(this._stackHolder=ot(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==Pt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Zt(this,this._value))}this._state=null,this._value=null,++e.ref,Jt(this,t)}var Qt={get:function(){var t=zt,e=ve;function n(n,r){var o=this,i=!t.global&&(t!==zt||e!==ve),a=i&&!be(),u=new Xt((function(e,u){ee(o,new $t(Pe(n,t,i,a),Pe(r,t,i,a),e,u,t))}));return tt&&oe(u,this),u}return n.prototype=Pt,n},set:function(t){j(this,"then",t&&t.prototype===Pt?Qt:{get:function(){return t},set:Qt.set})}};function $t(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o}function Jt(t,e){try{e((function(e){if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&ae();e&&"function"==typeof e.then?Jt(t,(function(t,n){e instanceof Xt?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,te(t)),n&&ue()}}),Zt.bind(null,t))}catch(e){Zt(t,e)}}function Zt(t,e){if(Lt.push(e),null===t._state){var n=t._lib&&ae();e=Gt(e),t._state=!1,t._value=e,tt&&null!==e&&"object"==typeof e&&!e._promise&&function(t,e,n){try{t.apply(null,n)}catch(t){e&&e(t)}}((function(){var n=S(e,"stack");e._promise=t,j(e,"stack",{get:function(){return Rt?n&&(n.get?n.get.apply(e):n.value):t.stack}})})),function(t){qt.some((function(e){return e._value===t._value}))||qt.push(t)}(t),te(t),n&&ue()}}function te(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)ee(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===Yt&&(++Yt,Bt((function(){0==--Yt&&ce()}),[]))}function ee(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++Yt,Bt(ne,[n,t,e])}else t._listeners.push(e)}function ne(t,e,n){try{Ut=e;var r,o=e._value;e._state?r=t(o):(Lt.length&&(Lt=[]),r=t(o),-1===Lt.indexOf(o)&&function(t){var e=qt.length;for(;e;)if(qt[--e]._value===t._value)return void qt.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{Ut=null,0==--Yt&&ce(),--n.psd.ref||n.psd.finalize()}}function re(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,a=t._value;null!=a?(o=a.name||"Error",i=a.message||a,r=it(a,0)):(o=a,i=""),e.push(o+(i?": "+i:"")+r)}return tt&&((r=it(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&re(t._prev,e,n)),e}function oe(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)}function ie(){ae()&&ue()}function ae(){var t=Nt;return Nt=!1,Mt=!1,t}function ue(){var t,e,n;do{for(;Vt.length>0;)for(t=Vt,Vt=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(Vt.length>0);Nt=!0,Mt=!0}function ce(){var t=qt;qt=[],t.forEach((function(t){t._PSD.onunhandled.call(null,t._value,t)}));for(var e=Ht.slice(0),n=e.length;n;)e[--n]()}function se(t){return new Xt(Pt,!1,t)}function fe(t,e){var n=zt;return function(){var r=ae(),o=zt;try{return ke(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{ke(o,!1),r&&ue()}}}k(Xt.prototype,{then:Qt,_then:function(t,e){ee(this,new $t(null,null,t,e,zt))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(function(t){return t instanceof e?n(t):se(t)})):this.then(null,(function(t){return t&&t.name===e?n(t):se(t)}))},finally:function(t){return this.then((function(e){return t(),e}),(function(e){return t(),se(e)}))},stack:{get:function(){if(this._stack)return this._stack;try{Rt=!0;var t=re(this,[],20).join("\\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{Rt=!1}}},timeout:function(t,e){var n=this;return t<1/0?new Xt((function(r,o){var i=setTimeout((function(){return o(new vt.Timeout(e))}),t);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&j(Xt.prototype,Symbol.toStringTag,"Dexie.Promise"),Wt.env=Oe(),k(Xt,{all:function(){var t=J.apply(null,arguments).map(we);return new Xt((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach((function(o,i){return Xt.resolve(o).then((function(n){t[i]=n,--r||e(t)}),n)}))}))},resolve:function(t){if(t instanceof Xt)return t;if(t&&"function"==typeof t.then)return new Xt((function(e,n){t.then(e,n)}));var e=new Xt(Pt,!0,t);return oe(e,Ut),e},reject:se,race:function(){var t=J.apply(null,arguments).map(we);return new Xt((function(e,n){t.map((function(t){return Xt.resolve(t).then(e,n)}))}))},PSD:{get:function(){return zt},set:function(t){return zt=t}},totalEchoes:{get:function(){return ve}},newPSD:me,usePSD:je,scheduler:{get:function(){return Bt},set:function(t){Bt=t}},rejectionMapper:{get:function(){return Gt},set:function(t){Gt=t}},follow:function(t,e){return new Xt((function(n,r){return me((function(e,n){var r=zt;r.unhandleds=[],r.onunhandled=n,r.finalize=_t((function(){var t=this;!function(t){function e(){t(),Ht.splice(Ht.indexOf(e),1)}Ht.push(e),++Yt,Bt((function(){0==--Yt&&ce()}),[])}((function(){0===t.unhandleds.length?e():n(t.unhandleds[0])}))}),r.finalize),t()}),e,n,r)}))}}),It&&(It.allSettled&&j(Xt,"allSettled",(function(){var t=J.apply(null,arguments).map(we);return new Xt((function(e){0===t.length&&e([]);var n=t.length,r=new Array(n);t.forEach((function(t,o){return Xt.resolve(t).then((function(t){return r[o]={status:"fulfilled",value:t}}),(function(t){return r[o]={status:"rejected",reason:t}})).then((function(){return--n||e(r)}))}))}))})),It.any&&"undefined"!=typeof AggregateError&&j(Xt,"any",(function(){var t=J.apply(null,arguments).map(we);return new Xt((function(e,n){0===t.length&&n(new AggregateError([]));var r=t.length,o=new Array(r);t.forEach((function(t,i){return Xt.resolve(t).then((function(t){return e(t)}),(function(t){o[i]=t,--r||n(new AggregateError(o))}))}))}))})));var le={awaits:0,echoes:0,id:0},he=0,pe=[],de=0,ve=0,ye=0;function me(t,e,n,r){var o=zt,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++ye;var a=Wt.env;i.env=Dt?{Promise:Xt,PromiseProp:{value:Xt,configurable:!0,writable:!0},all:Xt.all,race:Xt.race,allSettled:Xt.allSettled,any:Xt.any,resolve:Xt.resolve,reject:Xt.reject,nthen:Se(a.nthen,i),gthen:Se(a.gthen,i)}:{},e&&b(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=je(i,t,n,r);return 0===i.ref&&i.finalize(),u}function ge(){return le.id||(le.id=++he),++le.awaits,le.echoes+=100,le.id}function be(){return!!le.awaits&&(0==--le.awaits&&(le.id=0),le.echoes=100*le.awaits,!0)}function we(t){return le.echoes&&t&&t.constructor===It?(ge(),t.then((function(t){return be(),t}),(function(t){return be(),Ce(t)}))):t}function _e(t){++ve,le.echoes&&0!=--le.echoes||(le.echoes=le.id=0),pe.push(zt),ke(t,!0)}function xe(){var t=pe[pe.length-1];pe.pop(),ke(t,!1)}function ke(t,e){var n=zt;if((e?!le.echoes||de++&&t===zt:!de||--de&&t===zt)||Ee(e?_e.bind(null,t):xe),t!==zt&&(zt=t,n===Wt&&(Wt.env=Oe()),Dt)){var r=Wt.env.Promise,o=t.env;At.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(g,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function Oe(){var t=g.Promise;return Dt?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(g,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:At.then,gthen:t.prototype.then}:{}}function je(t,e,n,r,o){var i=zt;try{return ke(t,!0),e(n,r,o)}finally{ke(i,!1)}}function Ee(t){Kt.call(Tt,t)}function Pe(t,e,n,r){return"function"!=typeof t?t:function(){var o=zt;n&&ge(),ke(e,!0);try{return t.apply(this,arguments)}finally{ke(o,!1),r&&Ee(be)}}}function Se(t,e){return function(n,r){return t.call(this,Pe(n,e),Pe(r,e))}}-1===(""+Kt).indexOf("[native code]")&&(ge=be=gt);var Te="unhandledrejection";function Ae(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(g.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(Te,!0,!0),b(r,o)):g.CustomEvent&&b(r=new CustomEvent(Te,{detail:o}),o),r&&g.dispatchEvent&&(dispatchEvent(r),!g.PromiseRejectionEvent&&g.onunhandledrejection))try{g.onunhandledrejection(r)}catch(t){}tt&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: "+(t.stack||t))}catch(t){}}var Ce=Xt.reject;function Ke(t,e,n,r){if(t._state.openComplete||zt.letThrough){var o=t._createTransaction(e,n,t._dbSchema);try{o.create()}catch(t){return Ce(t)}return o._promise(e,(function(t,e){return me((function(){return zt.trans=o,r(t,e,o)}))})).then((function(t){return o._completion.then((function(){return t}))}))}if(!t._state.isBeingOpened){if(!t._options.autoOpen)return Ce(new vt.DatabaseClosed);t.open().catch(gt)}return t._state.dbReadyPromise.then((function(){return Ke(t,e,n,r)}))}var Ie="3.0.3",De=String.fromCharCode(65535),Re=-1/0,Fe="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Be="String expected.",Ne=[],Me="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),qe=Me,Le=Me,Ue=function(t){return!/(dexie\\.js|dexie\\.min\\.js)/.test(t)},Ge="__dbnames",We="readonly",ze="readwrite";function Ve(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e}var Ye={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function He(t){return function(e){return void 0===R(e,t)&&B(e=W(e),t),e}}var Xe=function(){function t(){}return t.prototype._trans=function(t,e,n){var r=this._tx||zt.trans,o=this.name;function i(t,n,r){if(!r.schema[o])throw new vt.NotFound("Table "+o+" not part of transaction");return e(r.idbtrans,r)}var a=ae();try{return r&&r.db===this.db?r===zt.trans?r._promise(t,i,n):me((function(){return r._promise(t,i,n)}),{trans:r,transless:zt.transless||zt}):Ke(this.db,t,[this.name],i)}finally{a&&ue()}},t.prototype.get=function(t,e){var n=this;return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(function(e){return n.core.get({trans:e,key:t}).then((function(t){return n.hook.reading.fire(t)}))})).then(e)},t.prototype.where=function(t){if("string"==typeof t)return new this.db.WhereClause(this,t);if(m(t))return new this.db.WhereClause(this,"["+t.join("+")+"]");var e=y(t);if(1===e.length)return this.where(e[0]).equals(t[e[0]]);var n=this.schema.indexes.concat(this.schema.primKey).filter((function(t){return t.compound&&e.every((function(e){return t.keyPath.indexOf(e)>=0}))&&t.keyPath.every((function(t){return e.indexOf(t)>=0}))}))[0];if(n&&this.db._maxKey!==De)return this.where(n.name).equals(n.keyPath.map((function(e){return t[e]})));!n&&tt&&console.warn("The query "+JSON.stringify(t)+" on "+this.name+" would benefit of a compound index ["+e.join("+")+"]");var r=this.schema.idxByName,o=this.db._deps.indexedDB;function i(t,e){try{return 0===o.cmp(t,e)}catch(t){return!1}}var a=e.reduce((function(e,n){var o=e[0],a=e[1],u=r[n],c=t[n];return[o||u,o||!u?Ve(a,u&&u.multi?function(t){var e=R(t,n);return m(e)&&e.some((function(t){return i(c,t)}))}:function(t){return i(c,R(t,n))}):a]}),[null,null]),u=a[0],c=a[1];return u?this.where(u.name).equals(t[u.keyPath]).filter(c):n?this.filter(c):this.where(e).equals("")},t.prototype.filter=function(t){return this.toCollection().and(t)},t.prototype.count=function(t){return this.toCollection().count(t)},t.prototype.offset=function(t){return this.toCollection().offset(t)},t.prototype.limit=function(t){return this.toCollection().limit(t)},t.prototype.each=function(t){return this.toCollection().each(t)},t.prototype.toArray=function(t){return this.toCollection().toArray(t)},t.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},t.prototype.orderBy=function(t){return new this.db.Collection(new this.db.WhereClause(this,m(t)?"["+t.join("+")+"]":t))},t.prototype.reverse=function(){return this.toCollection().reverse()},t.prototype.mapToClass=function(t){this.schema.mappedClass=t;var e=function(e){if(!e)return e;var n=Object.create(t.prototype);for(var r in e)if(x(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t},t.prototype.defineClass=function(){return this.mapToClass((function(t){b(this,t)}))},t.prototype.add=function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=t;return i&&o&&(a=He(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[a]})})).then((function(t){return t.numFailures?Xt.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{F(t,i,e)}catch(t){}return e}))},t.prototype.update=function(t,e){if("object"!=typeof e||m(e))throw new vt.InvalidArgument("Modifications must be an object.");if("object"!=typeof t||m(t))return this.where(":id").equals(t).modify(e);y(e).forEach((function(n){F(t,n,e[n])}));var n=R(t,this.schema.primKey.keyPath);return void 0===n?Ce(new vt.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(n).modify(e)},t.prototype.put=function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=t;return i&&o&&(a=He(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"put",values:[a],keys:null!=e?[e]:null})})).then((function(t){return t.numFailures?Xt.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{F(t,i,e)}catch(t){}return e}))},t.prototype.delete=function(t){var e=this;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:[t]})})).then((function(t){return t.numFailures?Xt.reject(t.failures[0]):void 0}))},t.prototype.clear=function(){var t=this;return this._trans("readwrite",(function(e){return t.core.mutate({trans:e,type:"deleteRange",range:Ye})})).then((function(t){return t.numFailures?Xt.reject(t.failures[0]):void 0}))},t.prototype.bulkGet=function(t){var e=this;return this._trans("readonly",(function(n){return e.core.getMany({keys:t,trans:n}).then((function(t){return t.map((function(t){return e.hook.reading.fire(t)}))}))}))},t.prototype.bulkAdd=function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new vt.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new vt.InvalidArgument("Arguments objects and keys must have the same length");var c=t.length,s=u&&a?t.map(He(u)):t;return r.core.mutate({trans:e,type:"add",keys:o,values:s,wantResults:i}).then((function(t){var e=t.numFailures,n=t.results,o=t.lastResult,a=t.failures;if(0===e)return i?n:o;throw new ht(r.name+".bulkAdd(): "+e+" of "+c+" operations failed",Object.keys(a).map((function(t){return a[t]})))}))}))},t.prototype.bulkPut=function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new vt.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new vt.InvalidArgument("Arguments objects and keys must have the same length");var c=t.length,s=u&&a?t.map(He(u)):t;return r.core.mutate({trans:e,type:"put",keys:o,values:s,wantResults:i}).then((function(t){var e=t.numFailures,n=t.results,o=t.lastResult,a=t.failures;if(0===e)return i?n:o;throw new ht(r.name+".bulkPut(): "+e+" of "+c+" operations failed",Object.keys(a).map((function(t){return a[t]})))}))}))},t.prototype.bulkDelete=function(t){var e=this,n=t.length;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:t})})).then((function(t){var r=t.numFailures,o=t.lastResult,i=t.failures;if(0===r)return o;throw new ht(e.name+".bulkDelete(): "+r+" of "+n+" operations failed",i)}))},t}();function Qe(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return a(t);r||(r=jt),o||(o=gt);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function a(t){y(t).forEach((function(e){var n=t[e];if(m(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new vt.InvalidArgument("Invalid event config");var r=i(e,bt,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){I((function(){t.apply(null,e)}))}))}))}}))}}function $e(t,e){return E(e).from({prototype:t}),e}function Je(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)}function Ze(t,e){t.filter=Ve(t.filter,e)}function tn(t,e,n){var r=t.replayFilter;t.replayFilter=r?function(){return Ve(r(),e())}:e,t.justLimit=n&&!r}function en(t,e){if(t.isPrimKey)return e.primaryKey;var n=e.getIndexByKeyPath(t.index);if(!n)throw new vt.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n}function nn(t,e,n){var r=en(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})}function rn(t,e,n,r){var o=t.replayFilter?Ve(t.filter,t.replayFilter()):t.filter;if(t.or){var i={},a=function(t,n,r){if(!o||o(n,r,(function(t){return n.stop(t)}),(function(t){return n.fail(t)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),x(i,u)||(i[u]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(a,n),on(nn(t,r,n),t.algorithm,a,!t.keysOnly&&t.valueMapper)])}return on(nn(t,r,n),Ve(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)}function on(t,e,n,r){var o=fe(r?function(t,e,o){return n(r(t),e,o)}:n);return t.then((function(t){if(t)return t.start((function(){var n=function(){return t.continue()};e&&!e(t,(function(t){return n=t}),(function(e){t.stop(e),n=gt}),(function(e){t.fail(e),n=gt}))||o(t.value,t,(function(t){return n=t})),n()}))}))}var an=function(){function t(){}return t.prototype._read=function(t,e){var n=this._ctx;return n.error?n.table._trans(null,Ce.bind(null,n.error)):n.table._trans("readonly",t).then(e)},t.prototype._write=function(t){var e=this._ctx;return e.error?e.table._trans(null,Ce.bind(null,e.error)):e.table._trans("readwrite",t,"locked")},t.prototype._addAlgorithm=function(t){var e=this._ctx;e.algorithm=Ve(e.algorithm,t)},t.prototype._iterate=function(t,e){return rn(this._ctx,t,e,this._ctx.table.core)},t.prototype.clone=function(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&b(n,t),e._ctx=n,e},t.prototype.raw=function(){return this._ctx.valueMapper=null,this},t.prototype.each=function(t){var e=this._ctx;return this._read((function(n){return rn(e,t,n,e.table.core)}))},t.prototype.count=function(t){var e=this;return this._read((function(t){var n=e._ctx,r=n.table.core;if(Je(n,!0))return r.count({trans:t,query:{index:en(n,r.schema),range:n.range}}).then((function(t){return Math.min(t,n.limit)}));var o=0;return rn(n,(function(){return++o,!1}),t,r).then((function(){return o}))})).then(t)},t.prototype.sortBy=function(t,e){var n=t.split(".").reverse(),r=n[0],o=n.length-1;function i(t,e){return e?i(t[n[e]],e-1):t[r]}var a="next"===this._ctx.dir?1:-1;function u(t,e){var n=i(t,o),r=i(e,o);return n<r?-a:n>r?a:0}return this.toArray((function(t){return t.sort(u)})).then(e)},t.prototype.toArray=function(t){var e=this;return this._read((function(t){var n=e._ctx;if("next"===n.dir&&Je(n,!0)&&n.limit>0){var r=n.valueMapper,o=en(n,n.table.core.schema);return n.table.core.query({trans:t,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(t){var e=t.result;return r?e.map(r):e}))}var i=[];return rn(n,(function(t){return i.push(t)}),t,n.table.core).then((function(){return i}))}),t)},t.prototype.offset=function(t){var e=this._ctx;return t<=0||(e.offset+=t,Je(e)?tn(e,(function(){var e=t;return function(t,n){return 0===e||(1===e?(--e,!1):(n((function(){t.advance(e),e=0})),!1))}})):tn(e,(function(){var e=t;return function(){return--e<0}}))),this},t.prototype.limit=function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),tn(this._ctx,(function(){var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this},t.prototype.until=function(t,e){return Ze(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this},t.prototype.first=function(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)},t.prototype.last=function(t){return this.reverse().first(t)},t.prototype.filter=function(t){return Ze(this._ctx,(function(e){return t(e.value)})),function(t,e){t.isMatch=Ve(t.isMatch,e)}(this._ctx,t),this},t.prototype.and=function(t){return this.filter(t)},t.prototype.or=function(t){return new this.db.WhereClause(this._ctx.table,t,this)},t.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},t.prototype.desc=function(){return this.reverse()},t.prototype.eachKey=function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))},t.prototype.eachUniqueKey=function(t){return this._ctx.unique="unique",this.eachKey(t)},t.prototype.eachPrimaryKey=function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))},t.prototype.keys=function(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)},t.prototype.primaryKeys=function(t){var e=this._ctx;if("next"===e.dir&&Je(e,!0)&&e.limit>0)return this._read((function(t){var n=en(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((function(t){return t.result})).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)},t.prototype.uniqueKeys=function(t){return this._ctx.unique="unique",this.keys(t)},t.prototype.firstKey=function(t){return this.limit(1).keys((function(t){return t[0]})).then(t)},t.prototype.lastKey=function(t){return this.reverse().firstKey(t)},t.prototype.distinct=function(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return Ze(this._ctx,(function(t){var e=t.primaryKey.toString(),r=x(n,e);return n[e]=!0,!r})),this},t.prototype.modify=function(t){var e=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof t)o=t;else{var i=y(t),a=i.length;o=function(e){for(var n=!1,r=0;r<a;++r){var o=i[r],u=t[o];R(e,o)!==u&&(F(e,o,u),n=!0)}return n}}var u=n.table.core,c=u.schema.primaryKey,s=c.outbound,f=c.extractKey,l="testmode"in $n?1:2e3,h=e.db.core.cmp,p=[],d=0,v=[],m=function(t,e){var n=e.failures,r=e.numFailures;d+=t-r;for(var o=0,i=y(n);o<i.length;o++){var a=i[o];p.push(n[a])}};return e.clone().primaryKeys().then((function(t){var e=function(n){var i=Math.min(l,t.length-n);return u.getMany({trans:r,keys:t.slice(n,n+i)}).then((function(a){for(var c=[],p=[],d=s?[]:null,v=[],y=0;y<i;++y){var g=a[y],b={value:W(g),primKey:t[n+y]};!1!==o.call(b,b.value,b)&&(null==b.value?v.push(t[n+y]):s||0===h(f(g),f(b.value))?(p.push(b.value),s&&d.push(t[n+y])):(v.push(t[n+y]),c.push(b.value)))}return Promise.resolve(c.length>0&&u.mutate({trans:r,type:"add",values:c}).then((function(t){for(var e in t.failures)v.splice(parseInt(e),1);m(c.length,t)}))).then((function(t){return p.length>0&&u.mutate({trans:r,type:"put",keys:d,values:p}).then((function(t){return m(p.length,t)}))})).then((function(){return v.length>0&&u.mutate({trans:r,type:"delete",keys:v}).then((function(t){return m(v.length,t)}))})).then((function(){return t.length>n+i&&e(n+l)}))}))};return e(0).then((function(){if(p.length>0)throw new lt("Error modifying one or more objects",p,d,v);return t.length}))}))}))},t.prototype.delete=function(){var t=this._ctx,e=t.range;return Je(t)&&(t.isPrimKey&&!Le||3===e.type)?this._write((function(n){var r=t.table.core.schema.primaryKey,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((function(e){return t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(t){var n=t.failures,r=(t.lastResult,t.results,t.numFailures);if(r)throw new lt("Could not delete some values",Object.keys(n).map((function(t){return n[t]})),e-r);return e-r}))}))})):this.modify((function(t,e){return e.value=null}))},t}();function un(t,e){return t<e?-1:t===e?0:1}function cn(t,e){return t>e?-1:t===e?0:1}function sn(t,e,n){var r=t instanceof vn?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r}function fn(t){return new t.Collection(t,(function(){return dn("")})).limit(0)}function ln(t,e,n,r,o,i){for(var a=Math.min(t.length,r.length),u=-1,c=0;c<a;++c){var s=e[c];if(s!==r[c])return o(t[c],n[c])<0?t.substr(0,c)+n[c]+n.substr(c+1):o(t[c],r[c])<0?t.substr(0,c)+r[c]+n.substr(c+1):u>=0?t.substr(0,u)+e[u]+n.substr(u+1):null;o(t[c],s)<0&&(u=c)}return a<r.length&&"next"===i?t+n.substr(t.length):a<t.length&&"prev"===i?t.substr(0,n.length):u<0?null:t.substr(0,u)+r[u]+n.substr(u+1)}function hn(t,e,n,r){var o,i,a,u,c,s,f,l=n.length;if(!n.every((function(t){return"string"==typeof t})))return sn(t,Be);function h(t){o=function(t){return"next"===t?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()}}(t),i=function(t){return"next"===t?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()}}(t),a="next"===t?un:cn;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return a(t.lower,e.lower)}));u=e.map((function(t){return t.upper})),c=e.map((function(t){return t.lower})),s=t,f="next"===t?"":r}h("next");var p=new t.Collection(t,(function(){return pn(u[0],c[l-1]+r)}));p._ondirectionchange=function(t){h(t)};var d=0;return p._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var h=i(o);if(e(h,c,d))return!0;for(var p=null,v=d;v<l;++v){var y=ln(o,h,u[v],c[v],a,s);null===y&&null===p?d=v+1:(null===p||a(p,y)>0)&&(p=y)}return n(null!==p?function(){t.continue(p+f)}:r),!1})),p}function pn(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}}function dn(t){return{type:1,lower:t,upper:t}}var vn=function(){function t(){}return Object.defineProperty(t.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!0,configurable:!0}),t.prototype.between=function(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?fn(this):new this.Collection(this,(function(){return pn(t,e,!n,!r)}))}catch(t){return sn(this,Fe)}},t.prototype.equals=function(t){return null==t?sn(this,Fe):new this.Collection(this,(function(){return dn(t)}))},t.prototype.above=function(t){return null==t?sn(this,Fe):new this.Collection(this,(function(){return pn(t,void 0,!0)}))},t.prototype.aboveOrEqual=function(t){return null==t?sn(this,Fe):new this.Collection(this,(function(){return pn(t,void 0,!1)}))},t.prototype.below=function(t){return null==t?sn(this,Fe):new this.Collection(this,(function(){return pn(void 0,t,!1,!0)}))},t.prototype.belowOrEqual=function(t){return null==t?sn(this,Fe):new this.Collection(this,(function(){return pn(void 0,t)}))},t.prototype.startsWith=function(t){return"string"!=typeof t?sn(this,Be):this.between(t,t+De,!0,!0)},t.prototype.startsWithIgnoreCase=function(t){return""===t?this.startsWith(t):hn(this,(function(t,e){return 0===t.indexOf(e[0])}),[t],De)},t.prototype.equalsIgnoreCase=function(t){return hn(this,(function(t,e){return t===e[0]}),[t],"")},t.prototype.anyOfIgnoreCase=function(){var t=J.apply($,arguments);return 0===t.length?fn(this):hn(this,(function(t,e){return-1!==e.indexOf(t)}),t,"")},t.prototype.startsWithAnyOfIgnoreCase=function(){var t=J.apply($,arguments);return 0===t.length?fn(this):hn(this,(function(t,e){return e.some((function(e){return 0===t.indexOf(e)}))}),t,De)},t.prototype.anyOf=function(){var t=this,e=J.apply($,arguments),n=this._cmp;try{e.sort(n)}catch(t){return sn(this,Fe)}if(0===e.length)return fn(this);var r=new this.Collection(this,(function(){return pn(e[0],e[e.length-1])}));r._ondirectionchange=function(r){n="next"===r?t._ascending:t._descending,e.sort(n)};var o=0;return r._addAlgorithm((function(t,r,i){for(var a=t.key;n(a,e[o])>0;)if(++o===e.length)return r(i),!1;return 0===n(a,e[o])||(r((function(){t.continue(e[o])})),!1)})),r},t.prototype.notEqual=function(t){return this.inAnyRange([[Re,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},t.prototype.noneOf=function(){var t=J.apply($,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return sn(this,Fe)}var e=t.reduce((function(t,e){return t?t.concat([[t[t.length-1][1],e]]):[[Re,e]]}),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})},t.prototype.inAnyRange=function(t,e){var n=this,r=this._cmp,o=this._ascending,i=this._descending,a=this._min,u=this._max;if(0===t.length)return fn(this);if(!t.every((function(t){return void 0!==t[0]&&void 0!==t[1]&&o(t[0],t[1])<=0})))return sn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",vt.InvalidArgument);var c=!e||!1!==e.includeLowers,s=e&&!0===e.includeUppers;var f,l=o;function h(t,e){return l(t[0],e[0])}try{f=t.reduce((function(t,e){for(var n=0,o=t.length;n<o;++n){var i=t[n];if(r(e[0],i[1])<0&&r(e[1],i[0])>0){i[0]=a(i[0],e[0]),i[1]=u(i[1],e[1]);break}}return n===o&&t.push(e),t}),[]),f.sort(h)}catch(t){return sn(this,Fe)}var p=0,d=s?function(t){return o(t,f[p][1])>0}:function(t){return o(t,f[p][1])>=0},v=c?function(t){return i(t,f[p][0])>0}:function(t){return i(t,f[p][0])>=0};var y=d,m=new this.Collection(this,(function(){return pn(f[0][0],f[f.length-1][1],!c,!s)}));return m._ondirectionchange=function(t){"next"===t?(y=d,l=o):(y=v,l=i),f.sort(h)},m._addAlgorithm((function(t,e,r){for(var i=t.key;y(i);)if(++p===f.length)return e(r),!1;return!!function(t){return!d(t)&&!v(t)}(i)||(0===n._cmp(i,f[p][1])||0===n._cmp(i,f[p][0])||e((function(){l===o?t.continue(f[p][0]):t.continue(f[p][1])})),!1)})),m},t.prototype.startsWithAnyOf=function(){var t=J.apply($,arguments);return t.every((function(t){return"string"==typeof t}))?0===t.length?fn(this):this.inAnyRange(t.map((function(t){return[t,t+De]}))):sn(this,"startsWithAnyOf() only works with strings")},t}();function yn(t){return 1===t.length?t[0]:t}function mn(t){try{return t.only([[]]),[[]]}catch(t){return De}}function gn(t){return fe((function(e){return bn(e),t(e.target.error),!1}))}function bn(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()}var wn=function(){function t(){}return t.prototype._lock=function(){return K(!zt.global),++this._reculock,1!==this._reculock||zt.global||(zt.lockOwnerFor=this),this},t.prototype._unlock=function(){if(K(!zt.global),0==--this._reculock)for(zt.global||(zt.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{je(t[1],t[0])}catch(t){}}return this},t.prototype._locked=function(){return this._reculock&&zt.lockOwnerFor!==this},t.prototype.create=function(t){var e=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(K(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new vt.DatabaseClosed(r);case"MissingAPIError":throw new vt.MissingAPI(r.message,r);default:throw new vt.OpenFailed(r)}if(!this.active)throw new vt.TransactionInactive;return K(null===this._completion._state),(t=this.idbtrans=t||n.transaction(yn(this.storeNames),this.mode)).onerror=fe((function(n){bn(n),e._reject(t.error)})),t.onabort=fe((function(n){bn(n),e.active&&e._reject(new vt.Abort(t.error)),e.active=!1,e.on("abort").fire(n)})),t.oncomplete=fe((function(){e.active=!1,e._resolve()})),this},t.prototype._promise=function(t,e,n){var r=this;if("readwrite"===t&&"readwrite"!==this.mode)return Ce(new vt.ReadOnly("Transaction is readonly"));if(!this.active)return Ce(new vt.TransactionInactive);if(this._locked())return new Xt((function(o,i){r._blockedFuncs.push([function(){r._promise(t,e,n).then(o,i)},zt])}));if(n)return me((function(){var t=new Xt((function(t,n){r._lock();var o=e(t,n,r);o&&o.then&&o.then(t,n)}));return t.finally((function(){return r._unlock()})),t._lib=!0,t}));var o=new Xt((function(t,n){var o=e(t,n,r);o&&o.then&&o.then(t,n)}));return o._lib=!0,o},t.prototype._root=function(){return this.parent?this.parent._root():this},t.prototype.waitFor=function(t){var e=this._root(),n=Xt.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((function(){return n}));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new Xt((function(t,r){n.then((function(n){return e._waitingQueue.push(fe(t.bind(null,n)))}),(function(t){return e._waitingQueue.push(fe(r.bind(null,t)))})).finally((function(){e._waitingFor===o&&(e._waitingFor=null)}))}))},t.prototype.abort=function(){this.active&&this._reject(new vt.Abort),this.active=!1},t.prototype.table=function(t){var e=this._memoizedTables||(this._memoizedTables={});if(x(e,t))return e[t];var n=this.schema[t];if(!n)throw new vt.NotFound("Table "+t+" not part of transaction");var r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r},t}();function _n(t,e,n,r,o,i,a){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+xn(e)}}function xn(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""}function kn(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:D(n,(function(t){return[t.name,t]}))}}function On(t){return null==t?function(){}:"string"==typeof t?function(t){return 1===t.split(".").length?function(e){return e[t]}:function(e){return R(e,t)}}(t):function(e){return R(e,t)}}function jn(t,e){return"delete"===e.type?e.keys:e.keys||e.values.map(t.extractKey)}function En(t){return[].slice.call(t)}var Pn=0;function Sn(t){return null==t?":id":"string"==typeof t?t:"["+t.join("+")+"]"}function Tn(t,e,n,r){var o=e.cmp.bind(e);function i(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");var e=t.lower,r=t.upper,o=t.lowerOpen,i=t.upperOpen;return void 0===e?void 0===r?null:n.upperBound(r,!!i):void 0===r?n.lowerBound(e,!!o):n.bound(e,r,!!o,!!i)}var a=function(t,e){var n=En(t.objectStoreNames);return{schema:{name:t.name,tables:n.map((function(t){return e.objectStore(t)})).map((function(t){var e=t.keyPath,n=t.autoIncrement,r=m(e),o=null==e,i={},a={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:On(e)},indexes:En(t.indexNames).map((function(e){return t.index(e)})).map((function(t){var e=t.name,n=t.unique,r=t.multiEntry,o=t.keyPath,a={name:e,compound:m(o),keyPath:o,unique:n,multiEntry:r,extractKey:On(o)};return i[Sn(o)]=a,a})),getIndexByKeyPath:function(t){return i[Sn(t)]}};return i[":id"]=a.primaryKey,null!=e&&(i[Sn(e)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in e.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\\/|Edge\\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\\/(\\d*)/))[1]<604)}}(t,r),u=a.schema,c=a.hasGetAll,s=u.tables.map((function(t){return function(t){var e=t.name;return{name:e,schema:t,mutate:function(n){var r=n.trans,o=n.type,a=n.keys,u=n.values,c=n.range,s=n.wantResults;return new Promise((function(n,f){n=fe(n);var l=r.objectStore(e),h=null==l.keyPath,p="put"===o||"add"===o;if(!p&&"delete"!==o&&"deleteRange"!==o)throw new Error("Invalid operation type: "+o);var d=(a||u||{length:1}).length;if(a&&u&&a.length!==u.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return n({numFailures:0,failures:{},results:[],lastResult:void 0});var y,m=s&&v(a||jn(t.primaryKey,{type:o,keys:a,values:u})),g=[],b=0,w=function(t){++b,bn(t),m&&(m[t.target._reqno]=void 0),g[t.target._reqno]=t.target.error},_=function(t){var e=t.target;m[e._reqno]=e.result};if("deleteRange"===o){if(4===c.type)return n({numFailures:b,failures:g,results:m,lastResult:void 0});y=3===c.type?l.clear():l.delete(i(c))}else{var x=p?h?[u,a]:[u,null]:[a,null],k=x[0],O=x[1];if(p)for(var j=0;j<d;++j)(y=O&&void 0!==O[j]?l[o](k[j],O[j]):l[o](k[j]))._reqno=j,m&&void 0===m[j]&&(y.onsuccess=_),y.onerror=w;else for(j=0;j<d;++j)(y=l[o](k[j]))._reqno=j,y.onerror=w}var E=function(t){var e=t.target.result;m&&(m[d-1]=e),n({numFailures:b,failures:g,results:m,lastResult:e})};y.onerror=function(t){w(t),E(t)},y.onsuccess=E}))},getMany:function(t){var n=t.trans,r=t.keys;return new Promise((function(t,o){t=fe(t);for(var i,a=n.objectStore(e),u=r.length,c=new Array(u),s=0,f=0,l=function(e){var n=e.target;c[n._pos]=n.result,++f===s&&t(c)},h=gn(o),p=0;p<u;++p)null!=r[p]&&((i=a.get(r[p]))._pos=p,i.onsuccess=l,i.onerror=h,++s);0===s&&t(c)}))},get:function(t){var n=t.trans,r=t.key;return new Promise((function(t,o){t=fe(t);var i=n.objectStore(e).get(r);i.onsuccess=function(e){return t(e.target.result)},i.onerror=gn(o)}))},query:function(t){return function(n){return new Promise((function(r,o){r=fe(r);var a=n.trans,u=n.values,c=n.limit,s=n.query,f=c===1/0?void 0:c,l=s.index,h=s.range,p=a.objectStore(e),d=l.isPrimaryKey?p:p.index(l.name),v=i(h);if(0===c)return r({result:[]});if(t){var y=u?d.getAll(v,f):d.getAllKeys(v,f);y.onsuccess=function(t){return r({result:t.target.result})},y.onerror=gn(o)}else{var m=0,g=u||!("openKeyCursor"in d)?d.openCursor(v):d.openKeyCursor(v),b=[];g.onsuccess=function(t){var e=g.result;return e?(b.push(u?e.value:e.primaryKey),++m===c?r({result:b}):void e.continue()):r({result:b})},g.onerror=gn(o)}}))}}(c),openCursor:function(t){var n=t.trans,r=t.values,o=t.query,a=t.reverse,u=t.unique;return new Promise((function(t,c){t=fe(t);var s=o.index,f=o.range,l=n.objectStore(e),h=s.isPrimaryKey?l:l.index(s.name),p=a?u?"prevunique":"prev":u?"nextunique":"next",d=r||!("openKeyCursor"in h)?h.openCursor(i(f),p):h.openKeyCursor(i(f),p);d.onerror=gn(c),d.onsuccess=fe((function(e){var r=d.result;if(r){r.___id=++Pn,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=n,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=fe(c),r.next=function(){var t=this,e=1;return this.start((function(){return e--?t.continue():t.stop()})).then((function(){return t}))},r.start=function(t){var e=new Promise((function(t,e){t=fe(t),d.onerror=gn(e),r.fail=e,r.stop=function(e){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,t(e)}})),n=function(){if(d.result)try{t()}catch(t){r.fail(t)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return d.onsuccess=fe((function(t){d.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),e},t(r)}else t(null)}),c)}))},count:function(t){var n=t.query,r=t.trans,o=n.index,a=n.range;return new Promise((function(t,n){var u=r.objectStore(e),c=o.isPrimaryKey?u:u.index(o.name),s=i(a),f=s?c.count(s):c.count();f.onsuccess=fe((function(e){return t(e.target.result)})),f.onerror=gn(n)}))}}}(t)})),f={};return s.forEach((function(t){return f[t.name]=t})),{stack:"dbcore",transaction:t.transaction.bind(t),table:function(t){if(!f[t])throw new Error("Table \'"+t+"\' not found");return f[t]},cmp:o,MIN_KEY:-1/0,MAX_KEY:mn(n),schema:u}}function An(t,e,n,r){var o=n.IDBKeyRange,i=function(t,e){return e.reduce((function(t,e){var n=e.create;return d(d({},t),n(t))}),t)}(Tn(e,n.indexedDB,o,r),t.dbcore);return{dbcore:i}}function Cn(t,e){var n=e.db,r=An(t._middlewares,n,t._deps,e);t.core=r.dbcore,t.tables.forEach((function(e){var n=e.name;t.core.schema.tables.some((function(t){return t.name===n}))&&(e.core=t.core.table(n),t[n]instanceof t.Table&&(t[n].core=e.core))}))}function Kn(t,e,n,r){n.forEach((function(n){var o=r[n];e.forEach((function(e){var r=S(e,n);(!r||"value"in r&&void 0===r.value)&&(e===t.Transaction.prototype||e instanceof t.Transaction?j(e,n,{get:function(){return this.table(n)},set:function(t){O(this,n,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):e[n]=new t.Table(n,o))}))}))}function In(t,e){e.forEach((function(e){for(var n in e)e[n]instanceof t.Table&&delete e[n]}))}function Dn(t,e){return t._cfg.version-e._cfg.version}function Rn(t,e,n,r){var o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=zt.transless||zt;me((function(){zt.trans=i,zt.transless=u,0===e?(y(o).forEach((function(t){Bn(n,t,o[t].primKey,o[t].indexes)})),Cn(t,n),Xt.follow((function(){return t.on.populate.fire(i)})).catch(a)):function(t,e,n,r){var o=[],i=t._versions,a=t._dbSchema=Mn(t,t.idbdb,r),u=!1;function c(){return o.length?Xt.resolve(o.shift()(n.idbtrans)).then(c):Xt.resolve()}return i.filter((function(t){return t._cfg.version>=e})).forEach((function(i){o.push((function(){var o=a,c=i._cfg.dbschema;qn(t,o,r),qn(t,c,r),a=t._dbSchema=c;var s=Fn(o,c);s.add.forEach((function(t){Bn(r,t[0],t[1].primKey,t[1].indexes)})),s.change.forEach((function(t){if(t.recreate)throw new vt.Upgrade("Not yet support for changing primary key");var e=r.objectStore(t.name);t.add.forEach((function(t){return Nn(e,t)})),t.change.forEach((function(t){e.deleteIndex(t.name),Nn(e,t)})),t.del.forEach((function(t){return e.deleteIndex(t)}))}));var f=i._cfg.contentUpgrade;if(f&&i._cfg.version>e){Cn(t,r),n._memoizedTables={},u=!0;var l=N(c);s.del.forEach((function(t){l[t]=o[t]})),In(t,[t.Transaction.prototype]),Kn(t,[t.Transaction.prototype],y(l),l),n.schema=l;var h,p=Z(f);p&&ge();var d=Xt.follow((function(){if((h=f(n))&&p){var t=be.bind(null,null);h.then(t,t)}}));return h&&"function"==typeof h.then?Xt.resolve(h):d.then((function(){return h}))}})),o.push((function(e){u&&qe||function(t,e){for(var n=0;n<e.db.objectStoreNames.length;++n){var r=e.db.objectStoreNames[n];null==t[r]&&e.db.deleteObjectStore(r)}}(i._cfg.dbschema,e);In(t,[t.Transaction.prototype]),Kn(t,[t.Transaction.prototype],t._storeNames,t._dbSchema),n.schema=t._dbSchema}))})),c().then((function(){var t,e;e=r,y(t=a).forEach((function(n){e.db.objectStoreNames.contains(n)||Bn(e,n,t[n].primKey,t[n].indexes)}))}))}(t,e,i,n).catch(a)}))}function Fn(t,e){var n,r={del:[],add:[],change:[]};for(n in t)e[n]||r.del.push(n);for(n in e){var o=t[n],i=e[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Me)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,c=i.idxByName,s=void 0;for(s in u)c[s]||a.del.push(s);for(s in c){var f=u[s],l=c[s];f?f.src!==l.src&&a.change.push(l):a.add.push(l)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r}function Bn(t,e,n,r){var o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(t){return Nn(o,t)})),o}function Nn(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})}function Mn(t,e,n){var r={};return A(e.objectStoreNames,0).forEach((function(t){for(var e=n.objectStore(t),o=e.keyPath,i=_n(xn(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<e.indexNames.length;++u){var c=e.index(e.indexNames[u]);o=c.keyPath;var s=_n(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[t]=kn(t,i,a)})),r}function qn(t,e,n){for(var r=n.db.objectStoreNames,o=0;o<r.length;++o){var i=r[o],a=n.objectStore(i);t._hasGetAll="getAll"in a;for(var u=0;u<a.indexNames.length;++u){var c=a.indexNames[u],s=a.index(c).keyPath,f="string"==typeof s?s:"["+A(s).join("+")+"]";if(e[i]){var l=e[i].idxByName[f];l&&(l.name=c,delete e[i].idxByName[f],e[i].idxByName[c]=l)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\\/|Edge\\/)/.test(navigator.userAgent)&&g.WorkerGlobalScope&&g instanceof g.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\\/(\\d*)/))[1]<604&&(t._hasGetAll=!1)}var Ln,Un=function(){function t(){}return t.prototype._parseStoresSpec=function(t,e){y(t).forEach((function(n){if(null!==t[n]){var r=t[n].split(",").map((function(t,e){var n=(t=t.trim()).replace(/([&*]|\\+\\+)/g,""),r=/^\\[/.test(n)?n.match(/^\\[(.*)\\]$/)[1].split("+"):n;return _n(n,r||null,/\\&/.test(t),/\\*/.test(t),/\\+\\+/.test(t),m(r),0===e)})),o=r.shift();if(o.multi)throw new vt.Schema("Primary key cannot be multi-valued");r.forEach((function(t){if(t.auto)throw new vt.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new vt.Schema("Index must have a name and cannot be an empty string")})),e[n]=kn(n,o,r)}}))},t.prototype.stores=function(t){var e=this.db;this._cfg.storesSource=this._cfg.storesSource?b(this._cfg.storesSource,t):t;var n=e._versions,r={},o={};return n.forEach((function(t){b(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,In(e,[e._allTables,e,e.Transaction.prototype]),Kn(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],y(o),o),e._storeNames=y(o),this},t.prototype.upgrade=function(t){return this._cfg.contentUpgrade=t,this},t}();function Gn(t){return me((function(){return zt.letThrough=!0,t()}))}function Wn(t){var e=t._state,n=t._deps.indexedDB;if(e.isBeingOpened||t.idbdb)return e.dbReadyPromise.then((function(){return e.dbOpenError?Ce(e.dbOpenError):t}));tt&&(e.openCanceller._stackHolder=ot()),e.isBeingOpened=!0,e.dbOpenError=null,e.openComplete=!1;var r=e.dbReadyResolve,o=null;return Xt.race([e.openCanceller,new Xt((function(r,i){if(!n)throw new vt.MissingAPI("indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill.");var a=t.name,u=e.autoSchema?n.open(a):n.open(a,Math.round(10*t.verno));if(!u)throw new vt.MissingAPI("IndexedDB API not available");u.onerror=gn(i),u.onblocked=fe(t._fireOnBlocked),u.onupgradeneeded=fe((function(r){if(o=u.transaction,e.autoSchema&&!t._options.allowEmptyDB){u.onerror=bn,o.abort(),u.result.close();var c=n.deleteDatabase(a);c.onsuccess=c.onerror=fe((function(){i(new vt.NoSuchDatabase("Database "+a+" doesnt exist"))}))}else{o.onerror=gn(i);var s=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;t.idbdb=u.result,Rn(t,s/10,o,i)}}),i),u.onsuccess=fe((function(){o=null;var n=t.idbdb=u.result,i=A(n.objectStoreNames);if(i.length>0)try{var c=n.transaction(yn(i),"readonly");e.autoSchema?function(t,e,n){t.verno=e.version/10;var r=t._dbSchema=Mn(0,e,n);t._storeNames=A(e.objectStoreNames,0),Kn(t,[t._allTables],y(r),r)}(t,n,c):(qn(t,t._dbSchema,c),function(t,e){var n=Fn(Mn(0,t.idbdb,e),t._dbSchema);return!(n.add.length||n.change.some((function(t){return t.add.length||t.change.length})))}(t,c)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Cn(t,c)}catch(t){}Ne.push(t),n.onversionchange=fe((function(n){e.vcFired=!0,t.on("versionchange").fire(n)})),Ln.add(a),r()}),i)}))]).then((function(){return e.onReadyBeingFired=[],Xt.resolve(Gn(t.on.ready.fire)).then((function t(){if(e.onReadyBeingFired.length>0){var n=e.onReadyBeingFired.reduce(Et,gt);return e.onReadyBeingFired=[],Xt.resolve(Gn(n)).then(t)}}))})).finally((function(){e.onReadyBeingFired=null})).then((function(){return e.isBeingOpened=!1,t})).catch((function(n){try{o&&o.abort()}catch(t){}return e.isBeingOpened=!1,t.close(),e.dbOpenError=n,Ce(e.dbOpenError)})).finally((function(){e.openComplete=!0,r()}))}function zn(t){var e=function(e){return t.next(e)},n=o(e),r=o((function(e){return t.throw(e)}));function o(t){return function(e){var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):m(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()}function Vn(t,e,n){var r=arguments.length;if(r<2)throw new vt.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=q(o);return[t,i,n]}function Yn(t,e,n,r,o){return Xt.resolve().then((function(){var i=zt.transless||zt,a=t._createTransaction(e,n,t._dbSchema,r),u={trans:a,transless:i};r?a.idbtrans=r.idbtrans:a.create();var c,s=Z(o);s&&ge();var f=Xt.follow((function(){if(c=o.call(a,a))if(s){var t=be.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=zn(c))}),u);return(c&&"function"==typeof c.then?Xt.resolve(c).then((function(t){return a.active?t:Ce(new vt.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):f.then((function(){return c}))).then((function(t){return r&&a._resolve(),a._completion.then((function(){return t}))})).catch((function(t){return a._reject(t),Ce(t)}))}))}function Hn(t,e,n){for(var r=m(t)?t.slice():[t],o=0;o<n;++o)r.push(e);return r}var Xn={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return d(d({},t),{table:function(e){var n=t.table(e),r=n.schema,o={},i=[];function a(t,e,n){var r=Sn(t),u=o[r]=o[r]||[],c=null==t?0:"string"==typeof t?1:t.length,s=e>0,f=d(d({},n),{isVirtual:s,isPrimaryKey:!s&&n.isPrimaryKey,keyTail:e,keyLength:c,extractKey:On(t),unique:!s&&n.unique});(u.push(f),f.isPrimaryKey||i.push(f),c>1)&&a(2===c?t[0]:t.slice(0,c-1),e+1,n);return u.sort((function(t,e){return t.keyTail-e.keyTail})),f}var u=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[u];for(var c=0,s=r.indexes;c<s.length;c++){var f=s[c];a(f.keyPath,0,f)}function l(e){var n,r,o=e.query.index;return o.isVirtual?d(d({},e),{query:{index:o,range:(n=e.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:Hn(n.lower,n.lowerOpen?t.MAX_KEY:t.MIN_KEY,r),lowerOpen:!0,upper:Hn(n.upper,n.upperOpen?t.MIN_KEY:t.MAX_KEY,r),upperOpen:!0})}}):e}var h=d(d({},n),{schema:d(d({},r),{primaryKey:u,indexes:i,getIndexByKeyPath:function(t){var e=o[Sn(t)];return e&&e[0]}}),count:function(t){return n.count(l(t))},query:function(t){return n.query(l(t))},openCursor:function(e){var r=e.query.index,o=r.keyTail,i=r.isVirtual,a=r.keyLength;if(!i)return n.openCursor(e);return n.openCursor(l(e)).then((function(n){return n&&function(n){var r=Object.create(n,{continue:{value:function(r){null!=r?n.continue(Hn(r,e.reverse?t.MAX_KEY:t.MIN_KEY,o)):e.unique?n.continue(Hn(n.key,e.reverse?t.MIN_KEY:t.MAX_KEY,o)):n.continue()}},continuePrimaryKey:{value:function(e,r){n.continuePrimaryKey(Hn(e,t.MAX_KEY,o),r)}},key:{get:function(){var t=n.key;return 1===a?t[0]:t.slice(0,a)}},value:{get:function(){return n.value}}});return r}(n)}))}});return h}})}},Qn={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(t){return d(d({},t),{table:function(e){var n=t.table(e),r=n.schema.primaryKey,o=d(d({},n),{mutate:function(t){var o=zt.trans,i=o.table(e).hook,a=i.deleting,u=i.creating,c=i.updating;switch(t.type){case"add":if(u.fire===gt)break;return o._promise("readwrite",(function(){return s(t)}),!0);case"put":if(u.fire===gt&&c.fire===gt)break;return o._promise("readwrite",(function(){return s(t)}),!0);case"delete":if(a.fire===gt)break;return o._promise("readwrite",(function(){return s(t)}),!0);case"deleteRange":if(a.fire===gt)break;return o._promise("readwrite",(function(){return function(t){return f(t.trans,t.range,1e4)}(t)}),!0)}return n.mutate(t);function s(t){var e=zt.trans,o=t.keys||jn(r,t);if(!o)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?d(d({},t),{keys:o,wantResults:!0}):d({},t)).type&&(t.values=v(t.values)),t.keys&&(t.keys=v(t.keys)),function(t,e,n){return"add"===e.type?Promise.resolve(new Array(e.values.length)):t.getMany({trans:e.trans,keys:n})}(n,t,o).then((function(i){var s=o.map((function(n,o){var s=i[o],f={onerror:null,onsuccess:null};if("delete"===t.type)a.fire.call(f,n,s,e);else if("add"===t.type||void 0===s){var l=u.fire.call(f,n,t.values[o],e);null==n&&null!=l&&(n=l,t.keys[o]=n,r.outbound||F(t.values[o],r.keyPath,n))}else{var h=H(s,t.values[o]),p=c.fire.call(f,h,n,s,e);if(p){var d=t.values[o];Object.keys(p).forEach((function(t){x(d,t)?d[t]=p[t]:F(d,t,p[t])}))}}return f}));return n.mutate(t).then((function(e){for(var n=e.failures,r=e.results,a=e.numFailures,u=e.lastResult,c=0;c<o.length;++c){var f=r?r[c]:o[c],l=s[c];null==f?l.onerror&&l.onerror(n[c]):l.onsuccess&&l.onsuccess("put"===t.type&&i[c]?t.values[c]:f)}return{failures:n,results:r,numFailures:a,lastResult:u}})).catch((function(t){return s.forEach((function(e){return e.onerror&&e.onerror(t)})),Promise.reject(t)}))}))}function f(t,e,o){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:o}).then((function(n){var r=n.result;return s({type:"delete",keys:r,trans:t}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<o?{failures:[],numFailures:0,lastResult:void 0}:f(t,d(d({},e),{lower:r[r.length-1],lowerOpen:!0}),o)}))}))}}});return o}})}},$n=function(){function t(e,n){var r=this;this._middlewares={},this.verno=0;var o=t.dependencies;this._options=n=d({addons:t.addons,autoOpen:!0,indexedDB:o.indexedDB,IDBKeyRange:o.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var i=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:gt,dbReadyPromise:null,cancelOpen:gt,openCanceller:null,autoSchema:!0};a.dbReadyPromise=new Xt((function(t){a.dbReadyResolve=t})),a.openCanceller=new Xt((function(t,e){a.cancelOpen=e})),this._state=a,this.name=e,this.on=Qe(this,"populate","blocked","versionchange",{ready:[Et,gt]}),this.on.ready.subscribe=C(this.on.ready.subscribe,(function(e){return function(n,o){t.vip((function(){var t=r._state;if(t.openComplete)t.dbOpenError||Xt.resolve().then(n),o&&e(n);else if(t.onReadyBeingFired)t.onReadyBeingFired.push(n),o&&e(n);else{e(n);var i=r;o||e((function t(){i.on.ready.unsubscribe(n),i.on.ready.unsubscribe(t)}))}}))}})),this.Collection=function(t){return $e(an.prototype,(function(e,n){this.db=t;var r=Ye,o=null;if(n)try{r=n()}catch(t){o=t}var i=e._ctx,a=i.table,u=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:r,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:i.or,valueMapper:u!==bt?u:null}}))}(this),this.Table=function(t){return $e(Xe.prototype,(function(e,n,r){this.db=t,this._tx=r,this.name=e,this.schema=n,this.hook=t._allTables[e]?t._allTables[e].hook:Qe(null,{creating:[xt,gt],reading:[wt,bt],updating:[Ot,gt],deleting:[kt,gt]})}))}(this),this.Transaction=function(t){return $e(wn.prototype,(function(e,n,r,o){var i=this;this.db=t,this.mode=e,this.storeNames=n,this.schema=r,this.idbtrans=null,this.on=Qe(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Xt((function(t,e){i._resolve=t,i._reject=e})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(t){var e=i.active;return i.active=!1,i.on.error.fire(t),i.parent?i.parent._reject(t):e&&i.idbtrans&&i.idbtrans.abort(),Ce(t)}))}))}(this),this.Version=function(t){return $e(Un.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(t){return $e(vn.prototype,(function(e,n,r){this.db=t,this._ctx={table:e,index:":id"===n?null:n,or:r};var o=t._deps.indexedDB;if(!o)throw new vt.MissingAPI("indexedDB API missing");this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(t,e){return o.cmp(e,t)},this._max=function(t,e){return o.cmp(t,e)>0?t:e},this._min=function(t,e){return o.cmp(t,e)<0?t:e},this._IDBKeyRange=t._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(t){t.newVersion>0?console.warn("Another connection wants to upgrade database \'"+r.name+"\'. Closing db now to resume the upgrade."):console.warn("Another connection wants to delete database \'"+r.name+"\'. Closing db now to resume the delete request."),r.close()})),this.on("blocked",(function(t){!t.newVersion||t.newVersion<t.oldVersion?console.warn("Dexie.delete(\'"+r.name+"\') was blocked"):console.warn("Upgrade \'"+r.name+"\' blocked by other connection holding version "+t.oldVersion/10)})),this._maxKey=mn(n.IDBKeyRange),this._createTransaction=function(t,e,n,o){return new r.Transaction(t,e,n,o)},this._fireOnBlocked=function(t){r.on("blocked").fire(t),Ne.filter((function(t){return t.name===r.name&&t!==r&&!t._state.vcFired})).map((function(e){return e.on("versionchange").fire(t)}))},this.use(Xn),this.use(Qn),i.forEach((function(t){return t(r)}))}return t.prototype.version=function(t){if(isNaN(t)||t<.1)throw new vt.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new vt.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);var e=this._versions,n=e.filter((function(e){return e._cfg.version===t}))[0];return n||(n=new this.Version(t),e.push(n),e.sort(Dn),n.stores({}),this._state.autoSchema=!1,n)},t.prototype._whenReady=function(t){var e=this;return this._state.openComplete||zt.letThrough?t():new Xt((function(t,n){if(!e._state.isBeingOpened){if(!e._options.autoOpen)return void n(new vt.DatabaseClosed);e.open().catch(gt)}e._state.dbReadyPromise.then(t,n)})).then(t)},t.prototype.use=function(t){var e=t.stack,n=t.create,r=t.level,o=t.name;o&&this.unuse({stack:e,name:o});var i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:n,level:null==r?10:r,name:o}),i.sort((function(t,e){return t.level-e.level})),this},t.prototype.unuse=function(t){var e=t.stack,n=t.name,r=t.create;return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((function(t){return r?t.create!==r:!!n&&t.name!==n}))),this},t.prototype.open=function(){return Wn(this)},t.prototype.close=function(){var t=Ne.indexOf(this),e=this._state;if(t>=0&&Ne.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(t){}this.idbdb=null}this._options.autoOpen=!1,e.dbOpenError=new vt.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError),e.dbReadyPromise=new Xt((function(t){e.dbReadyResolve=t})),e.openCanceller=new Xt((function(t,n){e.cancelOpen=n}))},t.prototype.delete=function(){var t=this,e=arguments.length>0,n=this._state;return new Xt((function(r,o){var i=function(){t.close();var e=t._deps.indexedDB.deleteDatabase(t.name);e.onsuccess=fe((function(){Ln.remove(t.name),r()})),e.onerror=gn(o),e.onblocked=t._fireOnBlocked};if(e)throw new vt.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()}))},t.prototype.backendDB=function(){return this.idbdb},t.prototype.isOpen=function(){return null!==this.idbdb},t.prototype.hasBeenClosed=function(){var t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name},t.prototype.hasFailed=function(){return null!==this._state.dbOpenError},t.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(t.prototype,"tables",{get:function(){var t=this;return y(this._allTables).map((function(e){return t._allTables[e]}))},enumerable:!0,configurable:!0}),t.prototype.transaction=function(){var t=Vn.apply(this,arguments);return this._transaction.apply(this,t)},t.prototype._transaction=function(t,e,n){var r=this,o=zt.trans;o&&o.db===this&&-1===t.indexOf("!")||(o=null);var i,a,u=-1!==t.indexOf("?");t=t.replace("!","").replace("?","");try{if(a=e.map((function(t){var e=t instanceof r.Table?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||t===We)i=We;else{if("rw"!=t&&t!=ze)throw new vt.InvalidArgument("Invalid transaction mode: "+t);i=ze}if(o){if(o.mode===We&&i===ze){if(!u)throw new vt.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(t){if(o&&-1===o.storeNames.indexOf(t)){if(!u)throw new vt.SubTransaction("Table "+t+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(t){return o?o._promise(null,(function(e,n){n(t)})):Ce(t)}var c=Yn.bind(null,this,i,a,o,n);return o?o._promise(i,c,"lock"):zt.trans?je(zt.transless,(function(){return r._whenReady(c)})):this._whenReady(c)},t.prototype.table=function(t){if(!x(this._allTables,t))throw new vt.InvalidTable("Table "+t+" does not exist");return this._allTables[t]},t}(),Jn=$n;k(Jn,d(d({},mt),{delete:function(t){return new Jn(t).delete()},exists:function(t){return new Jn(t,{addons:[]}).open().then((function(t){return t.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(t){return Ln?Ln.getDatabaseNames().then(t):Xt.resolve([])},defineClass:function(){return function(t){b(this,t)}},ignoreTransaction:function(t){return zt.trans?je(zt.transless,t):t()},vip:Gn,async:function(t){return function(){try{var e=zn(t.apply(this,arguments));return e&&"function"==typeof e.then?e:Xt.resolve(e)}catch(t){return Ce(t)}}},spawn:function(t,e,n){try{var r=zn(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:Xt.resolve(r)}catch(t){return Ce(t)}},currentTransaction:{get:function(){return zt.trans||null}},waitFor:function(t,e){var n=Xt.resolve("function"==typeof t?Jn.ignoreTransaction(t):t).timeout(e||6e4);return zt.trans?zt.trans.waitFor(n):n},Promise:Xt,debug:{get:function(){return tt},set:function(t){et(t,"dexie"===t?function(){return!0}:Ue)}},derive:E,extend:b,props:k,override:C,Events:Qe,getByKeyPath:R,setByKeyPath:F,delByKeyPath:B,shallowClone:N,deepClone:W,getObjectDiff:H,asap:I,minKey:Re,addons:[],connections:Ne,errnames:pt,dependencies:function(){try{return{indexedDB:g.indexedDB||g.mozIndexedDB||g.webkitIndexedDB||g.msIndexedDB,IDBKeyRange:g.IDBKeyRange||g.webkitIDBKeyRange}}catch(t){return{indexedDB:null,IDBKeyRange:null}}}(),semVer:Ie,version:Ie.split(".").map((function(t){return parseInt(t)})).reduce((function(t,e,n){return t+e/Math.pow(10,2*n)})),default:Jn,Dexie:Jn})),Jn.maxKey=mn(Jn.dependencies.IDBKeyRange),function(t){try{Ln=function(t){var e,n=t&&"function"==typeof t.databases;if(!n){var r=new $n(Ge,{addons:[]});r.version(1).stores({dbnames:"name"}),e=r.table("dbnames")}return{getDatabaseNames:function(){return n?Xt.resolve(t.databases()).then((function(t){return t.map((function(t){return t.name})).filter((function(t){return t!==Ge}))})):e.toCollection().primaryKeys()},add:function(t){return!n&&t!==Ge&&e.put({name:t}).catch(gt)},remove:function(t){return!n&&t!==Ge&&e.delete(t).catch(gt)}}}(t)}catch(t){}}($n.dependencies.indexedDB),Xt.rejectionMapper=function(t,e){if(!t||t instanceof st||t instanceof TypeError||t instanceof SyntaxError||!t.name||!yt[t.name])return t;var n=new yt[t.name](e||t.message,t);return"stack"in t&&j(n,"stack",{get:function(){return this.inner.stack}}),n},et(tt,Ue);function Zn(t){var e=function(){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(t){return!1}}();return function(){var n,r=p(t);if(e){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var tr=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(n,t);var e=Zn(n);function n(){var t;return u(this,n),(t=e.call(this,"AgoraLogger")).logs=void 0,t.openDatabase(),t.logs=t.table("logs"),t}return s(n,[{key:"openDatabase",value:function(){this.version(1).stores({logs:"++id, content, created_at"})}}]),n}($n)),er=(n(1539),n(8674),function(){function t(){u(this,t),this.mutex=Promise.resolve()}var n;return s(t,[{key:"lock",value:function(){var t=function(t){};return this.mutex=this.mutex.then((function(){return new Promise(t)})),new Promise((function(e){t=e}))}},{key:"dispatch",value:(n=e(o().mark((function t(e){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.lock();case 2:return n=t.sent,t.prev=3,t.next=6,Promise.resolve(e());case 6:return t.abrupt("return",t.sent);case 7:return t.prev=7,n(),t.finish(7);case 10:case"end":return t.stop()}}),t,this,[[3,,7,10]])}))),function(t){return n.apply(this,arguments)})}]),t}());console.log("[log worker] log worker initialzied");var nr=self,rr=new er,or=[],ir=function(){var t;(t=console).debug.apply(t,arguments)},ar=a()((function(){rr.dispatch(e(o().mark((function t(){var e,n,r,i,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(new Date).getTime(),n=or,or=[],t.prev=3,t.next=6,tr.logs.count();case 6:if(r=t.sent,!((i=n.length+r-5e4)>0)){t.next=12;break}return t.next=11,tr.logs.orderBy(":id").reverse().limit(i).delete();case 11:console.debug("[log worker] clear ".concat(i," records"));case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(3),console.error("[log worker] clear db failed");case 17:return t.prev=17,t.next=20,tr.logs.bulkPut(n);case 20:t.next=25;break;case 22:t.prev=22,t.t1=t.catch(17),console.error("[log worker] bulkPut ".concat(n.length," failed"));case 25:a=(new Date).getTime(),ir("[log worker] done writing ".concat(n.length," records in ").concat(a-e,"ms"));case 27:case"end":return t.stop()}}),t,null,[[3,14],[17,22]])}))))}),2e3,{maxWait:3e4});nr.onmessage=function(){var t=e(o().mark((function t(e){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.data&&"log"===e.data.type&&(n=new Date,or.push({content:e.data.data,created_at:+Date.now(),timestamp:"".concat(n)}),ar());case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})()})();',"Worker",void 0,__webpack_require__.p+"index.worker.js")}var q=function(){return q=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},q.apply(this,arguments)};function V(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}var K=Object.keys,H=Array.isArray,W="undefined"!=typeof self?self:"undefined"!=typeof window?window:global;function z(e,t){return"object"!=typeof t||K(t).forEach((function(r){e[r]=t[r]})),e}"undefined"==typeof Promise||W.Promise||(W.Promise=Promise);var Y=Object.getPrototypeOf,X={}.hasOwnProperty;function J(e,t){return X.call(e,t)}function Z(e,t){"function"==typeof t&&(t=t(Y(e))),K(t).forEach((function(r){ee(e,r,t[r])}))}var $=Object.defineProperty;function ee(e,t,r,n){$(e,t,z(r&&J(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function te(e){return{from:function(t){return e.prototype=Object.create(t.prototype),ee(e.prototype,"constructor",e),{extend:Z.bind(null,e.prototype)}}}}var re=Object.getOwnPropertyDescriptor;function ne(e,t){var r;return re(e,t)||(r=Y(e))&&ne(r,t)}var ie=[].slice;function oe(e,t,r){return ie.call(e,t,r)}function ae(e,t){return t(e)}function se(e){if(!e)throw new Error("Assertion Failed")}function ce(e){W.setImmediate?setImmediate(e):setTimeout(e,0)}function ue(e,t){return e.reduce((function(e,r,n){var i=t(r,n);return i&&(e[i[0]]=i[1]),e}),{})}function le(e,t){if(J(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,i=t.length;n<i;++n){var o=le(e,t[n]);r.push(o)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:le(s,t.substr(a+1))}}function he(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){se("string"!=typeof r&&"length"in r);for(var n=0,i=t.length;n<i;++n)he(e,t[n],r[n])}else{var o=t.indexOf(".");if(-1!==o){var a=t.substr(0,o),s=t.substr(o+1);if(""===s)void 0===r?H(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var c=e[a];c||(c=e[a]={}),he(c,s,r)}}else void 0===r?H(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function de(e,t){"string"==typeof t?he(e,t,void 0):"length"in t&&[].map.call(t,(function(t){he(e,t,void 0)}))}function fe(e){var t={};for(var r in e)J(e,r)&&(t[r]=e[r]);return t}var pe=[].concat;function ge(e){return pe.apply([],e)}var ve="Boolean,String,Date,RegExp,Blob,File,FileList,ArrayBuffer,DataView,Uint8ClampedArray,ImageData,Map,Set".split(",").concat(ge([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return W[e]})),me=ve.map((function(e){return W[e]})),Ae=ue(ve,(function(e){return[e,!0]}));function ye(e){if(!e||"object"!=typeof e)return e;var t;if(H(e)){t=[];for(var r=0,n=e.length;r<n;++r)t.push(ye(e[r]))}else if(me.indexOf(e.constructor)>=0)t=e;else for(var i in t=e.constructor?Object.create(e.constructor.prototype):{},e)J(e,i)&&(t[i]=ye(e[i]));return t}var be={}.toString;function _e(e){return be.call(e).slice(8,-1)}var Ee=function(e,t){return"Array"===t?""+e.map((function(e){return Ee(e,_e(e))})):"ArrayBuffer"===t?""+new Uint8Array(e):"Date"===t?e.getTime():ArrayBuffer.isView(e)?""+new Uint8Array(e.buffer):e};function we(e,t,r,n){return r=r||{},n=n||"",K(e).forEach((function(i){if(J(t,i)){var o=e[i],a=t[i];if("object"==typeof o&&"object"==typeof a&&o&&a){var s=_e(o),c=_e(a);s===c?Ae[s]?Ee(o,s)!==Ee(a,c)&&(r[n+i]=t[i]):we(o,a,r,n+i+"."):r[n+i]=t[i]}else o!==a&&(r[n+i]=t[i])}else r[n+i]=void 0})),K(t).forEach((function(i){J(e,i)||(r[n+i]=t[i])})),r}var Ie="undefined"!=typeof Symbol&&Symbol.iterator,Se=Ie?function(e){var t;return null!=e&&(t=e[Ie])&&t.apply(e)}:function(){return null},Te={};function Ce(e){var t,r,n,i;if(1===arguments.length){if(H(e))return e.slice();if(this===Te&&"string"==typeof e)return[e];if(i=Se(e)){for(r=[];!(n=i.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=new Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return r}var Re="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},ke="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Oe(e,t){ke=e,Ne=t}var Ne=function(){return!0},xe=!new Error("").stack;function De(){if(xe)try{throw new Error}catch(e){return e}return new Error}function Le(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(Ne).map((function(e){return"\n"+e})).join("")):""}var Pe=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Me=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Pe),Be={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed"};function je(e,t){this._e=De(),this.name=e,this.message=t}function Ue(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,r){return r.indexOf(e)===t})).join("\n")}function Fe(e,t,r,n){this._e=De(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=Ue(e,t)}function Ge(e,t){this._e=De(),this.name="BulkError",this.failures=t,this.message=Ue(e,t)}te(je).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Le(this._e,2))}},toString:function(){return this.name+": "+this.message}}),te(Fe).from(je),te(Ge).from(je);var Qe=Me.reduce((function(e,t){return e[t]=t+"Error",e}),{}),qe=je,Ve=Me.reduce((function(e,t){var r=t+"Error";function n(e,n){this._e=De(),this.name=r,e?"string"==typeof e?(this.message=e+(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message=e.name+" "+e.message,this.inner=e):(this.message=Be[t]||r,this.inner=null)}return te(n).from(qe),e[t]=n,e}),{});Ve.Syntax=SyntaxError,Ve.Type=TypeError,Ve.Range=RangeError;var Ke=Pe.reduce((function(e,t){return e[t+"Error"]=Ve[t],e}),{});var He=Me.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Ve[t]),e}),{});function We(){}function ze(e){return e}function Ye(e,t){return null==e||e===ze?t:function(r){return t(e(r))}}function Xe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Je(e,t){return e===We?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?Xe(n,this.onsuccess):n),i&&(this.onerror=this.onerror?Xe(i,this.onerror):i),void 0!==o?o:r}}function Ze(e,t){return e===We?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?Xe(r,this.onsuccess):r),n&&(this.onerror=this.onerror?Xe(n,this.onerror):n)}}function $e(e,t){return e===We?t:function(r){var n=e.apply(this,arguments);z(r,n);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?Xe(i,this.onsuccess):i),o&&(this.onerror=this.onerror?Xe(o,this.onerror):o),void 0===n?void 0===a?void 0:a:z(n,a)}}function et(e,t){return e===We?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function tt(e,t){return e===We?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return r.then((function(){return t.apply(n,o)}))}return t.apply(this,arguments)}}He.ModifyError=Fe,He.DexieError=je,He.BulkError=Ge;var rt={},nt="undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,e.__proto__,e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,t.__proto__,e]}(),it=nt[0],ot=nt[1],at=nt[2],st=ot&&ot.then,ct=it&&it.constructor,ut=!!at,lt=!1,ht=at?function(){at.then(Lt)}:W.setImmediate?setImmediate.bind(null,Lt):W.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){Lt(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(Lt,0)},dt=function(e,t){_t.push([e,t]),pt&&(ht(),pt=!1)},ft=!0,pt=!0,gt=[],vt=[],mt=null,At=ze,yt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:or,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{or(e[0],e[1])}catch(e){}}))}},bt=yt,_t=[],Et=0,wt=[];function It(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=We,this._lib=!1;var t=this._PSD=bt;if(ke&&(this._stackHolder=De(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==rt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Rt(this,this._value))}this._state=null,this._value=null,++t.ref,Ct(this,e)}var St={get:function(){var e=bt,t=Vt;function r(r,n){var i=this,o=!e.global&&(e!==bt||t!==Vt),a=o&&!zt(),s=new It((function(t,s){Ot(i,new Tt(rr(r,e,o,a),rr(n,e,o,a),t,s,e))}));return ke&&Dt(s,this),s}return r.prototype=rt,r},set:function(e){ee(this,"then",e&&e.prototype===rt?St:{get:function(){return e},set:St.set})}};function Tt(e,t,r,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=i}function Ct(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&Pt();t&&"function"==typeof t.then?Ct(e,(function(e,r){t instanceof It?t._then(e,r):t.then(e,r)})):(e._state=!0,e._value=t,kt(e)),r&&Mt()}}),Rt.bind(null,e))}catch(t){Rt(e,t)}}function Rt(e,t){if(vt.push(t),null===e._state){var r=e._lib&&Pt();t=At(t),e._state=!1,e._value=t,ke&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,r){try{e.apply(null,r)}catch(e){t&&t(e)}}((function(){var r=ne(t,"stack");t._promise=e,ee(t,"stack",{get:function(){return lt?r&&(r.get?r.get.apply(t):r.value):e.stack}})})),function(e){gt.some((function(t){return t._value===e._value}))||gt.push(e)}(e),kt(e),r&&Mt()}}function kt(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)Ot(e,t[r]);var i=e._PSD;--i.ref||i.finalize(),0===Et&&(++Et,dt((function(){0==--Et&&Bt()}),[]))}function Ot(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Et,dt(Nt,[r,e,t])}else e._listeners.push(t)}function Nt(e,t,r){try{mt=t;var n,i=t._value;t._state?n=e(i):(vt.length&&(vt=[]),n=e(i),-1===vt.indexOf(i)&&function(e){var t=gt.length;for(;t;)if(gt[--t]._value===e._value)return void gt.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{mt=null,0==--Et&&Bt(),--r.psd.ref||r.psd.finalize()}}function xt(e,t,r){if(t.length===r)return t;var n="";if(!1===e._state){var i,o,a=e._value;null!=a?(i=a.name||"Error",o=a.message||a,n=Le(a,0)):(i=a,o=""),t.push(i+(o?": "+o:"")+n)}return ke&&((n=Le(e._stackHolder,2))&&-1===t.indexOf(n)&&t.push(n),e._prev&&xt(e._prev,t,r)),t}function Dt(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function Lt(){Pt()&&Mt()}function Pt(){var e=ft;return ft=!1,pt=!1,e}function Mt(){var e,t,r;do{for(;_t.length>0;)for(e=_t,_t=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}}while(_t.length>0);ft=!0,pt=!0}function Bt(){var e=gt;gt=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=wt.slice(0),r=t.length;r;)t[--r]()}function jt(e){return new It(rt,!1,e)}function Ut(e,t){var r=bt;return function(){var n=Pt(),i=bt;try{return Zt(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{Zt(i,!1),n&&Mt()}}}Z(It.prototype,{then:St,_then:function(e,t){Ot(this,new Tt(null,null,e,t,bt))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,(function(e){return e instanceof t?r(e):jt(e)})):this.then(null,(function(e){return e&&e.name===t?r(e):jt(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),jt(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{lt=!0;var e=xt(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{lt=!1}}},timeout:function(e,t){var r=this;return e<1/0?new It((function(n,i){var o=setTimeout((function(){return i(new Ve.Timeout(t))}),e);r.then(n,i).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&ee(It.prototype,Symbol.toStringTag,"Dexie.Promise"),yt.env=$t(),Z(It,{all:function(){var e=Ce.apply(null,arguments).map(Yt);return new It((function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((function(i,o){return It.resolve(i).then((function(r){e[o]=r,--n||t(e)}),r)}))}))},resolve:function(e){if(e instanceof It)return e;if(e&&"function"==typeof e.then)return new It((function(t,r){e.then(t,r)}));var t=new It(rt,!0,e);return Dt(t,mt),t},reject:jt,race:function(){var e=Ce.apply(null,arguments).map(Yt);return new It((function(t,r){e.map((function(e){return It.resolve(e).then(t,r)}))}))},PSD:{get:function(){return bt},set:function(e){return bt=e}},totalEchoes:{get:function(){return Vt}},newPSD:Ht,usePSD:er,scheduler:{get:function(){return dt},set:function(e){dt=e}},rejectionMapper:{get:function(){return At},set:function(e){At=e}},follow:function(e,t){return new It((function(r,n){return Ht((function(t,r){var n=bt;n.unhandleds=[],n.onunhandled=r,n.finalize=Xe((function(){var e=this;!function(e){function t(){e(),wt.splice(wt.indexOf(t),1)}wt.push(t),++Et,dt((function(){0==--Et&&Bt()}),[])}((function(){0===e.unhandleds.length?t():r(e.unhandleds[0])}))}),n.finalize),e()}),t,r,n)}))}}),ct&&(ct.allSettled&&ee(It,"allSettled",(function(){var e=Ce.apply(null,arguments).map(Yt);return new It((function(t){0===e.length&&t([]);var r=e.length,n=new Array(r);e.forEach((function(e,i){return It.resolve(e).then((function(e){return n[i]={status:"fulfilled",value:e}}),(function(e){return n[i]={status:"rejected",reason:e}})).then((function(){return--r||t(n)}))}))}))})),ct.any&&"undefined"!=typeof AggregateError&&ee(It,"any",(function(){var e=Ce.apply(null,arguments).map(Yt);return new It((function(t,r){0===e.length&&r(new AggregateError([]));var n=e.length,i=new Array(n);e.forEach((function(e,o){return It.resolve(e).then((function(e){return t(e)}),(function(e){i[o]=e,--n||r(new AggregateError(i))}))}))}))})));var Ft={awaits:0,echoes:0,id:0},Gt=0,Qt=[],qt=0,Vt=0,Kt=0;function Ht(e,t,r,n){var i=bt,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++Kt;var a=yt.env;o.env=ut?{Promise:It,PromiseProp:{value:It,configurable:!0,writable:!0},all:It.all,race:It.race,allSettled:It.allSettled,any:It.any,resolve:It.resolve,reject:It.reject,nthen:nr(a.nthen,o),gthen:nr(a.gthen,o)}:{},t&&z(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=er(o,e,r,n);return 0===o.ref&&o.finalize(),s}function Wt(){return Ft.id||(Ft.id=++Gt),++Ft.awaits,Ft.echoes+=100,Ft.id}function zt(){return!!Ft.awaits&&(0==--Ft.awaits&&(Ft.id=0),Ft.echoes=100*Ft.awaits,!0)}function Yt(e){return Ft.echoes&&e&&e.constructor===ct?(Wt(),e.then((function(e){return zt(),e}),(function(e){return zt(),ar(e)}))):e}function Xt(e){++Vt,Ft.echoes&&0!=--Ft.echoes||(Ft.echoes=Ft.id=0),Qt.push(bt),Zt(e,!0)}function Jt(){var e=Qt[Qt.length-1];Qt.pop(),Zt(e,!1)}function Zt(e,t){var r=bt;if((t?!Ft.echoes||qt++&&e===bt:!qt||--qt&&e===bt)||tr(t?Xt.bind(null,e):Jt),e!==bt&&(bt=e,r===yt&&(yt.env=$t()),ut)){var n=yt.env.Promise,i=e.env;ot.then=i.nthen,n.prototype.then=i.gthen,(r.global||e.global)&&(Object.defineProperty(W,"Promise",i.PromiseProp),n.all=i.all,n.race=i.race,n.resolve=i.resolve,n.reject=i.reject,i.allSettled&&(n.allSettled=i.allSettled),i.any&&(n.any=i.any))}}function $t(){var e=W.Promise;return ut?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(W,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:ot.then,gthen:e.prototype.then}:{}}function er(e,t,r,n,i){var o=bt;try{return Zt(e,!0),t(r,n,i)}finally{Zt(o,!1)}}function tr(e){st.call(it,e)}function rr(e,t,r,n){return"function"!=typeof e?e:function(){var i=bt;r&&Wt(),Zt(t,!0);try{return e.apply(this,arguments)}finally{Zt(i,!1),n&&tr(zt)}}}function nr(e,t){return function(r,n){return e.call(this,rr(r,t),rr(n,t))}}-1===(""+st).indexOf("[native code]")&&(Wt=zt=We);var ir="unhandledrejection";function or(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,i={promise:t,reason:e};if(W.document&&document.createEvent?((n=document.createEvent("Event")).initEvent(ir,!0,!0),z(n,i)):W.CustomEvent&&z(n=new CustomEvent(ir,{detail:i}),i),n&&W.dispatchEvent&&(dispatchEvent(n),!W.PromiseRejectionEvent&&W.onunhandledrejection))try{W.onunhandledrejection(n)}catch(e){}ke&&n&&!n.defaultPrevented&&console.warn("Unhandled rejection: "+(e.stack||e))}catch(e){}}var ar=It.reject;function sr(e,t,r,n){if(e._state.openComplete||bt.letThrough){var i=e._createTransaction(t,r,e._dbSchema);try{i.create()}catch(e){return ar(e)}return i._promise(t,(function(e,t){return Ht((function(){return bt.trans=i,n(e,t,i)}))})).then((function(e){return i._completion.then((function(){return e}))}))}if(!e._state.isBeingOpened){if(!e._options.autoOpen)return ar(new Ve.DatabaseClosed);e.open().catch(We)}return e._state.dbReadyPromise.then((function(){return sr(e,t,r,n)}))}var cr="3.0.3",ur=String.fromCharCode(65535),lr=-1/0,hr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",dr="String expected.",fr=[],pr="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),gr=pr,vr=pr,mr=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},Ar="__dbnames",yr="readonly",br="readwrite";function _r(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var Er={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function wr(e){return function(t){return void 0===le(t,e)&&de(t=ye(t),e),t}}var Ir=function(){function e(){}return e.prototype._trans=function(e,t,r){var n=this._tx||bt.trans,i=this.name;function o(e,r,n){if(!n.schema[i])throw new Ve.NotFound("Table "+i+" not part of transaction");return t(n.idbtrans,n)}var a=Pt();try{return n&&n.db===this.db?n===bt.trans?n._promise(e,o,r):Ht((function(){return n._promise(e,o,r)}),{trans:n,transless:bt.transless||bt}):sr(this.db,e,[this.name],o)}finally{a&&Mt()}},e.prototype.get=function(e,t){var r=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return r.core.get({trans:t,key:e}).then((function(e){return r.hook.reading.fire(e)}))})).then(t)},e.prototype.where=function(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(H(e))return new this.db.WhereClause(this,"["+e.join("+")+"]");var t=K(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&t.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return t.indexOf(e)>=0}))}))[0];if(r&&this.db._maxKey!==ur)return this.where(r.name).equals(r.keyPath.map((function(t){return e[t]})));!r&&ke&&console.warn("The query "+JSON.stringify(e)+" on "+this.name+" would benefit of a compound index ["+t.join("+")+"]");var n=this.schema.idxByName,i=this.db._deps.indexedDB;function o(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}}var a=t.reduce((function(t,r){var i=t[0],a=t[1],s=n[r],c=e[r];return[i||s,i||!s?_r(a,s&&s.multi?function(e){var t=le(e,r);return H(t)&&t.some((function(e){return o(c,e)}))}:function(e){return o(c,le(e,r))}):a]}),[null,null]),s=a[0],c=a[1];return s?this.where(s.name).equals(e[s.keyPath]).filter(c):r?this.filter(c):this.where(t).equals("")},e.prototype.filter=function(e){return this.toCollection().and(e)},e.prototype.count=function(e){return this.toCollection().count(e)},e.prototype.offset=function(e){return this.toCollection().offset(e)},e.prototype.limit=function(e){return this.toCollection().limit(e)},e.prototype.each=function(e){return this.toCollection().each(e)},e.prototype.toArray=function(e){return this.toCollection().toArray(e)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,H(e)?"["+e.join("+")+"]":e))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var r=Object.create(e.prototype);for(var n in t)if(J(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e},e.prototype.defineClass=function(){return this.mapToClass((function(e){z(this,e)}))},e.prototype.add=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=wr(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?It.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{he(e,o,t)}catch(e){}return t}))},e.prototype.update=function(e,t){if("object"!=typeof t||H(t))throw new Ve.InvalidArgument("Modifications must be an object.");if("object"!=typeof e||H(e))return this.where(":id").equals(e).modify(t);K(t).forEach((function(r){he(e,r,t[r])}));var r=le(e,this.schema.primKey.keyPath);return void 0===r?ar(new Ve.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(t)},e.prototype.put=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=wr(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?It.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{he(e,o,t)}catch(e){}return t}))},e.prototype.delete=function(e){var t=this;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?It.reject(e.failures[0]):void 0}))},e.prototype.clear=function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:Er})})).then((function(e){return e.numFailures?It.reject(e.failures[0]):void 0}))},e.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",(function(r){return t.core.getMany({keys:e,trans:r}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))},e.prototype.bulkAdd=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new Ve.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new Ve.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,u=s&&a?e.map(wr(s)):e;return n.core.mutate({trans:t,type:"add",keys:i,values:u,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new Ge(n.name+".bulkAdd(): "+t+" of "+c+" operations failed",Object.keys(a).map((function(e){return a[e]})))}))}))},e.prototype.bulkPut=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new Ve.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new Ve.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,u=s&&a?e.map(wr(s)):e;return n.core.mutate({trans:t,type:"put",keys:i,values:u,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new Ge(n.name+".bulkPut(): "+t+" of "+c+" operations failed",Object.keys(a).map((function(e){return a[e]})))}))}))},e.prototype.bulkDelete=function(e){var t=this,r=e.length;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:e})})).then((function(e){var n=e.numFailures,i=e.lastResult,o=e.failures;if(0===n)return i;throw new Ge(t.name+".bulkDelete(): "+n+" of "+r+" operations failed",o)}))},e}();function Sr(e){var t={},r=function(r,n){if(n){for(var i=arguments.length,o=new Array(i-1);--i;)o[i-1]=arguments[i];return t[r].subscribe.apply(null,o),e}if("string"==typeof r)return t[r]};r.addEventType=o;for(var n=1,i=arguments.length;n<i;++n)o(arguments[n]);return r;function o(e,n,i){if("object"==typeof e)return a(e);n||(n=et),i||(i=We);var o={subscribers:[],fire:i,subscribe:function(e){-1===o.subscribers.indexOf(e)&&(o.subscribers.push(e),o.fire=n(o.fire,e))},unsubscribe:function(e){o.subscribers=o.subscribers.filter((function(t){return t!==e})),o.fire=o.subscribers.reduce(n,i)}};return t[e]=r[e]=o,o}function a(e){K(e).forEach((function(t){var r=e[t];if(H(r))o(t,e[t][0],e[t][1]);else{if("asap"!==r)throw new Ve.InvalidArgument("Invalid event config");var n=o(t,ze,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach((function(e){ce((function(){e.apply(null,t)}))}))}))}}))}}function Tr(e,t){return te(t).from({prototype:e}),t}function Cr(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Rr(e,t){e.filter=_r(e.filter,t)}function kr(e,t,r){var n=e.replayFilter;e.replayFilter=n?function(){return _r(n(),t())}:t,e.justLimit=r&&!n}function Or(e,t){if(e.isPrimKey)return t.primaryKey;var r=t.getIndexByKeyPath(e.index);if(!r)throw new Ve.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function Nr(e,t,r){var n=Or(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function xr(e,t,r,n){var i=e.replayFilter?_r(e.filter,e.replayFilter()):e.filter;if(e.or){var o={},a=function(e,r,n){if(!i||i(r,n,(function(e){return r.stop(e)}),(function(e){return r.fail(e)}))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),J(o,s)||(o[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),Dr(Nr(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Dr(Nr(e,n,r),_r(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function Dr(e,t,r,n){var i=Ut(n?function(e,t,i){return r(n(e),t,i)}:r);return e.then((function(e){if(e)return e.start((function(){var r=function(){return e.continue()};t&&!t(e,(function(e){return r=e}),(function(t){e.stop(t),r=We}),(function(t){e.fail(t),r=We}))||i(e.value,e,(function(e){return r=e})),r()}))}))}var Lr=function(){function e(){}return e.prototype._read=function(e,t){var r=this._ctx;return r.error?r.table._trans(null,ar.bind(null,r.error)):r.table._trans("readonly",e).then(t)},e.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,ar.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},e.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=_r(t.algorithm,e)},e.prototype._iterate=function(e,t){return xr(this._ctx,e,t,this._ctx.table.core)},e.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&z(r,e),t._ctx=r,t},e.prototype.raw=function(){return this._ctx.valueMapper=null,this},e.prototype.each=function(e){var t=this._ctx;return this._read((function(r){return xr(t,e,r,t.table.core)}))},e.prototype.count=function(e){var t=this;return this._read((function(e){var r=t._ctx,n=r.table.core;if(Cr(r,!0))return n.count({trans:e,query:{index:Or(r,n.schema),range:r.range}}).then((function(e){return Math.min(e,r.limit)}));var i=0;return xr(r,(function(){return++i,!1}),e,n).then((function(){return i}))})).then(e)},e.prototype.sortBy=function(e,t){var r=e.split(".").reverse(),n=r[0],i=r.length-1;function o(e,t){return t?o(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=o(e,i),n=o(t,i);return r<n?-a:r>n?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)},e.prototype.toArray=function(e){var t=this;return this._read((function(e){var r=t._ctx;if("next"===r.dir&&Cr(r,!0)&&r.limit>0){var n=r.valueMapper,i=Or(r,r.table.core.schema);return r.table.core.query({trans:e,limit:r.limit,values:!0,query:{index:i,range:r.range}}).then((function(e){var t=e.result;return n?t.map(n):t}))}var o=[];return xr(r,(function(e){return o.push(e)}),e,r.table.core).then((function(){return o}))}),e)},e.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,Cr(t)?kr(t,(function(){var t=e;return function(e,r){return 0===t||(1===t?(--t,!1):(r((function(){e.advance(t),t=0})),!1))}})):kr(t,(function(){var t=e;return function(){return--t<0}}))),this},e.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),kr(this._ctx,(function(){var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}}),!0),this},e.prototype.until=function(e,t){return Rr(this._ctx,(function(r,n,i){return!e(r.value)||(n(i),t)})),this},e.prototype.first=function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)},e.prototype.last=function(e){return this.reverse().first(e)},e.prototype.filter=function(e){var t,r;return Rr(this._ctx,(function(t){return e(t.value)})),t=this._ctx,r=e,t.isMatch=_r(t.isMatch,r),this},e.prototype.and=function(e){return this.filter(e)},e.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},e.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.key,r)}))},e.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},e.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.primaryKey,r)}))},e.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.key)})).then((function(){return r})).then(e)},e.prototype.primaryKeys=function(e){var t=this._ctx;if("next"===t.dir&&Cr(t,!0)&&t.limit>0)return this._read((function(e){var r=Or(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.primaryKey)})).then((function(){return r})).then(e)},e.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},e.prototype.firstKey=function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)},e.prototype.lastKey=function(e){return this.reverse().firstKey(e)},e.prototype.distinct=function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return Rr(this._ctx,(function(e){var t=e.primaryKey.toString(),n=J(r,t);return r[t]=!0,!n})),this},e.prototype.modify=function(e){var t=this,r=this._ctx;return this._write((function(n){var i;if("function"==typeof e)i=e;else{var o=K(e),a=o.length;i=function(t){for(var r=!1,n=0;n<a;++n){var i=o[n],s=e[i];le(t,i)!==s&&(he(t,i,s),r=!0)}return r}}var s=r.table.core,c=s.schema.primaryKey,u=c.outbound,l=c.extractKey,h="testmode"in Tn?1:2e3,d=t.db.core.cmp,f=[],p=0,g=[],v=function(e,t){var r=t.failures,n=t.numFailures;p+=e-n;for(var i=0,o=K(r);i<o.length;i++){var a=o[i];f.push(r[a])}};return t.clone().primaryKeys().then((function(e){var t=function(r){var o=Math.min(h,e.length-r);return s.getMany({trans:n,keys:e.slice(r,r+o)}).then((function(a){for(var c=[],f=[],p=u?[]:null,g=[],m=0;m<o;++m){var A=a[m],y={value:ye(A),primKey:e[r+m]};!1!==i.call(y,y.value,y)&&(null==y.value?g.push(e[r+m]):u||0===d(l(A),l(y.value))?(f.push(y.value),u&&p.push(e[r+m])):(g.push(e[r+m]),c.push(y.value)))}return Promise.resolve(c.length>0&&s.mutate({trans:n,type:"add",values:c}).then((function(e){for(var t in e.failures)g.splice(parseInt(t),1);v(c.length,e)}))).then((function(e){return f.length>0&&s.mutate({trans:n,type:"put",keys:p,values:f}).then((function(e){return v(f.length,e)}))})).then((function(){return g.length>0&&s.mutate({trans:n,type:"delete",keys:g}).then((function(e){return v(g.length,e)}))})).then((function(){return e.length>r+o&&t(r+h)}))}))};return t(0).then((function(){if(f.length>0)throw new Fe("Error modifying one or more objects",f,p,g);return e.length}))}))}))},e.prototype.delete=function(){var e=this._ctx,t=e.range;return Cr(e)&&(e.isPrimKey&&!vr||3===t.type)?this._write((function(r){var n=e.table.core.schema.primaryKey,i=t;return e.table.core.count({trans:r,query:{index:n,range:i}}).then((function(t){return e.table.core.mutate({trans:r,type:"deleteRange",range:i}).then((function(e){var r=e.failures,n=(e.lastResult,e.results,e.numFailures);if(n)throw new Fe("Could not delete some values",Object.keys(r).map((function(e){return r[e]})),t-n);return t-n}))}))})):this.modify((function(e,t){return t.value=null}))},e}();function Pr(e,t){return e<t?-1:e===t?0:1}function Mr(e,t){return e>t?-1:e===t?0:1}function Br(e,t,r){var n=e instanceof qr?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function jr(e){return new e.Collection(e,(function(){return Qr("")})).limit(0)}function Ur(e,t,r,n,i,o){for(var a=Math.min(e.length,n.length),s=-1,c=0;c<a;++c){var u=t[c];if(u!==n[c])return i(e[c],r[c])<0?e.substr(0,c)+r[c]+r.substr(c+1):i(e[c],n[c])<0?e.substr(0,c)+n[c]+r.substr(c+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;i(e[c],u)<0&&(s=c)}return a<n.length&&"next"===o?e+r.substr(e.length):a<e.length&&"prev"===o?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}function Fr(e,t,r,n){var i,o,a,s,c,u,l,h=r.length;if(!r.every((function(e){return"string"==typeof e})))return Br(e,dr);function d(e){i=function(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}(e),o=function(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}(e),a="next"===e?Pr:Mr;var t=r.map((function(e){return{lower:o(e),upper:i(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),u=e,l="next"===e?"":n}d("next");var f=new e.Collection(e,(function(){return Gr(s[0],c[h-1]+n)}));f._ondirectionchange=function(e){d(e)};var p=0;return f._addAlgorithm((function(e,r,n){var i=e.key;if("string"!=typeof i)return!1;var d=o(i);if(t(d,c,p))return!0;for(var f=null,g=p;g<h;++g){var v=Ur(i,d,s[g],c[g],a,u);null===v&&null===f?p=g+1:(null===f||a(f,v)>0)&&(f=v)}return r(null!==f?function(){e.continue(f+l)}:n),!1})),f}function Gr(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function Qr(e){return{type:1,lower:e,upper:e}}var qr=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!0,configurable:!0}),e.prototype.between=function(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?jr(this):new this.Collection(this,(function(){return Gr(e,t,!r,!n)}))}catch(e){return Br(this,hr)}},e.prototype.equals=function(e){return null==e?Br(this,hr):new this.Collection(this,(function(){return Qr(e)}))},e.prototype.above=function(e){return null==e?Br(this,hr):new this.Collection(this,(function(){return Gr(e,void 0,!0)}))},e.prototype.aboveOrEqual=function(e){return null==e?Br(this,hr):new this.Collection(this,(function(){return Gr(e,void 0,!1)}))},e.prototype.below=function(e){return null==e?Br(this,hr):new this.Collection(this,(function(){return Gr(void 0,e,!1,!0)}))},e.prototype.belowOrEqual=function(e){return null==e?Br(this,hr):new this.Collection(this,(function(){return Gr(void 0,e)}))},e.prototype.startsWith=function(e){return"string"!=typeof e?Br(this,dr):this.between(e,e+ur,!0,!0)},e.prototype.startsWithIgnoreCase=function(e){return""===e?this.startsWith(e):Fr(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],ur)},e.prototype.equalsIgnoreCase=function(e){return Fr(this,(function(e,t){return e===t[0]}),[e],"")},e.prototype.anyOfIgnoreCase=function(){var e=Ce.apply(Te,arguments);return 0===e.length?jr(this):Fr(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var e=Ce.apply(Te,arguments);return 0===e.length?jr(this):Fr(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,ur)},e.prototype.anyOf=function(){var e=this,t=Ce.apply(Te,arguments),r=this._cmp;try{t.sort(r)}catch(e){return Br(this,hr)}if(0===t.length)return jr(this);var n=new this.Collection(this,(function(){return Gr(t[0],t[t.length-1])}));n._ondirectionchange=function(n){r="next"===n?e._ascending:e._descending,t.sort(r)};var i=0;return n._addAlgorithm((function(e,n,o){for(var a=e.key;r(a,t[i])>0;)if(++i===t.length)return n(o),!1;return 0===r(a,t[i])||(n((function(){e.continue(t[i])})),!1)})),n},e.prototype.notEqual=function(e){return this.inAnyRange([[lr,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var e=Ce.apply(Te,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Br(this,hr)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[lr,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(e,t){var r=this,n=this._cmp,i=this._ascending,o=this._descending,a=this._min,s=this._max;if(0===e.length)return jr(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return Br(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Ve.InvalidArgument);var c=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;var l,h=i;function d(e,t){return h(e[0],t[0])}try{l=e.reduce((function(e,t){for(var r=0,i=e.length;r<i;++r){var o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=a(o[0],t[0]),o[1]=s(o[1],t[1]);break}}return r===i&&e.push(t),e}),[]),l.sort(d)}catch(e){return Br(this,hr)}var f=0,p=u?function(e){return i(e,l[f][1])>0}:function(e){return i(e,l[f][1])>=0},g=c?function(e){return o(e,l[f][0])>0}:function(e){return o(e,l[f][0])>=0};var v=p,m=new this.Collection(this,(function(){return Gr(l[0][0],l[l.length-1][1],!c,!u)}));return m._ondirectionchange=function(e){"next"===e?(v=p,h=i):(v=g,h=o),l.sort(d)},m._addAlgorithm((function(e,t,n){for(var o=e.key;v(o);)if(++f===l.length)return t(n),!1;return!!function(e){return!p(e)&&!g(e)}(o)||(0===r._cmp(o,l[f][1])||0===r._cmp(o,l[f][0])||t((function(){h===i?e.continue(l[f][0]):e.continue(l[f][1])})),!1)})),m},e.prototype.startsWithAnyOf=function(){var e=Ce.apply(Te,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?jr(this):this.inAnyRange(e.map((function(e){return[e,e+ur]}))):Br(this,"startsWithAnyOf() only works with strings")},e}();function Vr(e){return 1===e.length?e[0]:e}function Kr(e){try{return e.only([[]]),[[]]}catch(e){return ur}}function Hr(e){return Ut((function(t){return Wr(t),e(t.target.error),!1}))}function Wr(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var zr=function(){function e(){}return e.prototype._lock=function(){return se(!bt.global),++this._reculock,1!==this._reculock||bt.global||(bt.lockOwnerFor=this),this},e.prototype._unlock=function(){if(se(!bt.global),0==--this._reculock)for(bt.global||(bt.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{er(e[1],e[0])}catch(e){}}return this},e.prototype._locked=function(){return this._reculock&&bt.lockOwnerFor!==this},e.prototype.create=function(e){var t=this;if(!this.mode)return this;var r=this.db.idbdb,n=this.db._state.dbOpenError;if(se(!this.idbtrans),!e&&!r)switch(n&&n.name){case"DatabaseClosedError":throw new Ve.DatabaseClosed(n);case"MissingAPIError":throw new Ve.MissingAPI(n.message,n);default:throw new Ve.OpenFailed(n)}if(!this.active)throw new Ve.TransactionInactive;return se(null===this._completion._state),(e=this.idbtrans=e||r.transaction(Vr(this.storeNames),this.mode)).onerror=Ut((function(r){Wr(r),t._reject(e.error)})),e.onabort=Ut((function(r){Wr(r),t.active&&t._reject(new Ve.Abort(e.error)),t.active=!1,t.on("abort").fire(r)})),e.oncomplete=Ut((function(){t.active=!1,t._resolve()})),this},e.prototype._promise=function(e,t,r){var n=this;if("readwrite"===e&&"readwrite"!==this.mode)return ar(new Ve.ReadOnly("Transaction is readonly"));if(!this.active)return ar(new Ve.TransactionInactive);if(this._locked())return new It((function(i,o){n._blockedFuncs.push([function(){n._promise(e,t,r).then(i,o)},bt])}));if(r)return Ht((function(){var e=new It((function(e,r){n._lock();var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return e.finally((function(){return n._unlock()})),e._lib=!0,e}));var i=new It((function(e,r){var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return i._lib=!0,i},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(e){var t=this._root(),r=It.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return r}));else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new It((function(e,n){r.then((function(r){return t._waitingQueue.push(Ut(e.bind(null,r)))}),(function(e){return t._waitingQueue.push(Ut(n.bind(null,e)))})).finally((function(){t._waitingFor===i&&(t._waitingFor=null)}))}))},e.prototype.abort=function(){this.active&&this._reject(new Ve.Abort),this.active=!1},e.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(J(t,e))return t[e];var r=this.schema[e];if(!r)throw new Ve.NotFound("Table "+e+" not part of transaction");var n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n},e}();function Yr(e,t,r,n,i,o,a){return{name:e,keyPath:t,unique:r,multi:n,auto:i,compound:o,src:(r&&!a?"&":"")+(n?"*":"")+(i?"++":"")+Xr(t)}}function Xr(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function Jr(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:ue(r,(function(e){return[e.name,e]}))}}function Zr(e){return null==e?function(){}:"string"==typeof e?function(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return le(t,e)}}(e):function(t){return le(t,e)}}function $r(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}function en(e){return[].slice.call(e)}var tn=0;function rn(e){return null==e?":id":"string"==typeof e?e:"["+e.join("+")+"]"}function nn(e,t,r,n){var i=t.cmp.bind(t);function o(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var t=e.lower,n=e.upper,i=e.lowerOpen,o=e.upperOpen;return void 0===t?void 0===n?null:r.upperBound(n,!!o):void 0===n?r.lowerBound(t,!!i):r.bound(t,n,!!i,!!o)}var a=function(e,t){var r=en(e.objectStoreNames);return{schema:{name:e.name,tables:r.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,r=e.autoIncrement,n=H(t),i=null==t,o={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:Zr(t)},indexes:en(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,r=e.unique,n=e.multiEntry,i=e.keyPath,a={name:t,compound:H(i),keyPath:i,unique:r,multiEntry:n,extractKey:Zr(i)};return o[rn(i)]=a,a})),getIndexByKeyPath:function(e){return o[rn(e)]}};return o[":id"]=a.primaryKey,null!=t&&(o[rn(t)]=a.primaryKey),a}))},hasGetAll:r.length>0&&"getAll"in t.objectStore(r[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),s=a.schema,c=a.hasGetAll,u=s.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(r){var n=r.trans,i=r.type,a=r.keys,s=r.values,c=r.range,u=r.wantResults;return new Promise((function(r,l){r=Ut(r);var h=n.objectStore(t),d=null==h.keyPath,f="put"===i||"add"===i;if(!f&&"delete"!==i&&"deleteRange"!==i)throw new Error("Invalid operation type: "+i);var p=(a||s||{length:1}).length;if(a&&s&&a.length!==s.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return r({numFailures:0,failures:{},results:[],lastResult:void 0});var g,v=u&&V(a||$r(e.primaryKey,{type:i,keys:a,values:s})),m=[],A=0,y=function(e){++A,Wr(e),v&&(v[e.target._reqno]=void 0),m[e.target._reqno]=e.target.error},b=function(e){var t=e.target;v[t._reqno]=t.result};if("deleteRange"===i){if(4===c.type)return r({numFailures:A,failures:m,results:v,lastResult:void 0});g=3===c.type?h.clear():h.delete(o(c))}else{var _=f?d?[s,a]:[s,null]:[a,null],E=_[0],w=_[1];if(f)for(var I=0;I<p;++I)(g=w&&void 0!==w[I]?h[i](E[I],w[I]):h[i](E[I]))._reqno=I,v&&void 0===v[I]&&(g.onsuccess=b),g.onerror=y;else for(I=0;I<p;++I)(g=h[i](E[I]))._reqno=I,g.onerror=y}var S=function(e){var t=e.target.result;v&&(v[p-1]=t),r({numFailures:A,failures:m,results:v,lastResult:t})};g.onerror=function(e){y(e),S(e)},g.onsuccess=S}))},getMany:function(e){var r=e.trans,n=e.keys;return new Promise((function(e,i){e=Ut(e);for(var o,a=r.objectStore(t),s=n.length,c=new Array(s),u=0,l=0,h=function(t){var r=t.target;c[r._pos]=r.result,++l===u&&e(c)},d=Hr(i),f=0;f<s;++f)null!=n[f]&&((o=a.get(n[f]))._pos=f,o.onsuccess=h,o.onerror=d,++u);0===u&&e(c)}))},get:function(e){var r=e.trans,n=e.key;return new Promise((function(e,i){e=Ut(e);var o=r.objectStore(t).get(n);o.onsuccess=function(t){return e(t.target.result)},o.onerror=Hr(i)}))},query:function(e){return function(r){return new Promise((function(n,i){n=Ut(n);var a=r.trans,s=r.values,c=r.limit,u=r.query,l=c===1/0?void 0:c,h=u.index,d=u.range,f=a.objectStore(t),p=h.isPrimaryKey?f:f.index(h.name),g=o(d);if(0===c)return n({result:[]});if(e){var v=s?p.getAll(g,l):p.getAllKeys(g,l);v.onsuccess=function(e){return n({result:e.target.result})},v.onerror=Hr(i)}else{var m=0,A=s||!("openKeyCursor"in p)?p.openCursor(g):p.openKeyCursor(g),y=[];A.onsuccess=function(e){var t=A.result;return t?(y.push(s?t.value:t.primaryKey),++m===c?n({result:y}):void t.continue()):n({result:y})},A.onerror=Hr(i)}}))}}(c),openCursor:function(e){var r=e.trans,n=e.values,i=e.query,a=e.reverse,s=e.unique;return new Promise((function(e,c){e=Ut(e);var u=i.index,l=i.range,h=r.objectStore(t),d=u.isPrimaryKey?h:h.index(u.name),f=a?s?"prevunique":"prev":s?"nextunique":"next",p=n||!("openKeyCursor"in d)?d.openCursor(o(l),f):d.openKeyCursor(o(l),f);p.onerror=Hr(c),p.onsuccess=Ut((function(t){var n=p.result;if(n){n.___id=++tn,n.done=!1;var i=n.continue.bind(n),o=n.continuePrimaryKey;o&&(o=o.bind(n));var a=n.advance.bind(n),s=function(){throw new Error("Cursor not stopped")};n.trans=r,n.stop=n.continue=n.continuePrimaryKey=n.advance=function(){throw new Error("Cursor not started")},n.fail=Ut(c),n.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},n.start=function(e){var t=new Promise((function(e,t){e=Ut(e),p.onerror=Hr(t),n.fail=t,n.stop=function(t){n.stop=n.continue=n.continuePrimaryKey=n.advance=s,e(t)}})),r=function(){if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=function(){throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=Ut((function(e){p.onsuccess=r,r()})),n.continue=i,n.continuePrimaryKey=o,n.advance=a,r(),t},e(n)}else e(null)}),c)}))},count:function(e){var r=e.query,n=e.trans,i=r.index,a=r.range;return new Promise((function(e,r){var s=n.objectStore(t),c=i.isPrimaryKey?s:s.index(i.name),u=o(a),l=u?c.count(u):c.count();l.onsuccess=Ut((function(t){return e(t.target.result)})),l.onerror=Hr(r)}))}}}(e)})),l={};return u.forEach((function(e){return l[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!l[e])throw new Error("Table '"+e+"' not found");return l[e]},cmp:i,MIN_KEY:-1/0,MAX_KEY:Kr(r),schema:s}}function on(e,t,r,n){var i=r.IDBKeyRange,o=function(e,t){return t.reduce((function(e,t){var r=t.create;return q(q({},e),r(e))}),e)}(nn(t,r.indexedDB,i,n),e.dbcore);return{dbcore:o}}function an(e,t){var r=t.db,n=on(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach((function(t){var r=t.name;e.core.schema.tables.some((function(e){return e.name===r}))&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))}))}function sn(e,t,r,n){r.forEach((function(r){var i=n[r];t.forEach((function(t){var n=ne(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?ee(t,r,{get:function(){return this.table(r)},set:function(e){$(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,i))}))}))}function cn(e,t){t.forEach((function(t){for(var r in t)t[r]instanceof e.Table&&delete t[r]}))}function un(e,t){return e._cfg.version-t._cfg.version}function ln(e,t,r,n){var i=e._dbSchema,o=e._createTransaction("readwrite",e._storeNames,i);o.create(r),o._completion.catch(n);var a=o._reject.bind(o),s=bt.transless||bt;Ht((function(){bt.trans=o,bt.transless=s,0===t?(K(i).forEach((function(e){dn(r,e,i[e].primKey,i[e].indexes)})),an(e,r),It.follow((function(){return e.on.populate.fire(o)})).catch(a)):function(e,t,r,n){var i=[],o=e._versions,a=e._dbSchema=pn(e,e.idbdb,n),s=!1;function c(){return i.length?It.resolve(i.shift()(r.idbtrans)).then(c):It.resolve()}return o.filter((function(e){return e._cfg.version>=t})).forEach((function(o){i.push((function(){var i=a,c=o._cfg.dbschema;gn(e,i,n),gn(e,c,n),a=e._dbSchema=c;var u=hn(i,c);u.add.forEach((function(e){dn(n,e[0],e[1].primKey,e[1].indexes)})),u.change.forEach((function(e){if(e.recreate)throw new Ve.Upgrade("Not yet support for changing primary key");var t=n.objectStore(e.name);e.add.forEach((function(e){return fn(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),fn(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var l=o._cfg.contentUpgrade;if(l&&o._cfg.version>t){an(e,n),r._memoizedTables={},s=!0;var h=fe(c);u.del.forEach((function(e){h[e]=i[e]})),cn(e,[e.Transaction.prototype]),sn(e,[e.Transaction.prototype],K(h),h),r.schema=h;var d,f=Re(l);f&&Wt();var p=It.follow((function(){if((d=l(r))&&f){var e=zt.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?It.resolve(d):p.then((function(){return d}))}})),i.push((function(t){s&&gr||function(e,t){for(var r=0;r<t.db.objectStoreNames.length;++r){var n=t.db.objectStoreNames[r];null==e[n]&&t.db.deleteObjectStore(n)}}(o._cfg.dbschema,t);cn(e,[e.Transaction.prototype]),sn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema}))})),c().then((function(){var e,t;t=n,K(e=a).forEach((function(r){t.db.objectStoreNames.contains(r)||dn(t,r,e[r].primKey,e[r].indexes)}))}))}(e,t,o,r).catch(a)}))}function hn(e,t){var r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],o=t[r];if(i){var a={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto&&!pr)a.recreate=!0,n.change.push(a);else{var s=i.idxByName,c=o.idxByName,u=void 0;for(u in s)c[u]||a.del.push(u);for(u in c){var l=s[u],h=c[u];l?l.src!==h.src&&a.change.push(h):a.add.push(h)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}else n.add.push([r,o])}return n}function dn(e,t,r,n){var i=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach((function(e){return fn(i,e)})),i}function fn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function pn(e,t,r){var n={};return oe(t.objectStoreNames,0).forEach((function(e){for(var t=r.objectStore(e),i=t.keyPath,o=Yr(Xr(i),i||"",!1,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),a=[],s=0;s<t.indexNames.length;++s){var c=t.index(t.indexNames[s]);i=c.keyPath;var u=Yr(c.name,i,!!c.unique,!!c.multiEntry,!1,i&&"string"!=typeof i,!1);a.push(u)}n[e]=Jr(e,o,a)})),n}function gn(e,t,r){for(var n=r.db.objectStoreNames,i=0;i<n.length;++i){var o=n[i],a=r.objectStore(o);e._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var c=a.indexNames[s],u=a.index(c).keyPath,l="string"==typeof u?u:"["+oe(u).join("+")+"]";if(t[o]){var h=t[o].idxByName[l];h&&(h.name=c,delete t[o].idxByName[l],t[o].idxByName[c]=h)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&W.WorkerGlobalScope&&W instanceof W.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}var vn,mn=function(){function e(){}return e.prototype._parseStoresSpec=function(e,t){K(e).forEach((function(r){if(null!==e[r]){var n=e[r].split(",").map((function(e,t){var r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return Yr(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),H(n),0===t)})),i=n.shift();if(i.multi)throw new Ve.Schema("Primary key cannot be multi-valued");n.forEach((function(e){if(e.auto)throw new Ve.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Ve.Schema("Index must have a name and cannot be an empty string")})),t[r]=Jr(r,i,n)}}))},e.prototype.stores=function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?z(this._cfg.storesSource,e):e;var r=t._versions,n={},i={};return r.forEach((function(e){z(n,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(n,i)})),t._dbSchema=i,cn(t,[t._allTables,t,t.Transaction.prototype]),sn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],K(i),i),t._storeNames=K(i),this},e.prototype.upgrade=function(e){return this._cfg.contentUpgrade=e,this},e}();function An(e){return Ht((function(){return bt.letThrough=!0,e()}))}function yn(e){var t=e._state,r=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((function(){return t.dbOpenError?ar(t.dbOpenError):e}));ke&&(t.openCanceller._stackHolder=De()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var n=t.dbReadyResolve,i=null;return It.race([t.openCanceller,new It((function(n,o){if(!r)throw new Ve.MissingAPI("indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill.");var a=e.name,s=t.autoSchema?r.open(a):r.open(a,Math.round(10*e.verno));if(!s)throw new Ve.MissingAPI("IndexedDB API not available");s.onerror=Hr(o),s.onblocked=Ut(e._fireOnBlocked),s.onupgradeneeded=Ut((function(n){if(i=s.transaction,t.autoSchema&&!e._options.allowEmptyDB){s.onerror=Wr,i.abort(),s.result.close();var c=r.deleteDatabase(a);c.onsuccess=c.onerror=Ut((function(){o(new Ve.NoSuchDatabase("Database "+a+" doesnt exist"))}))}else{i.onerror=Hr(o);var u=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;e.idbdb=s.result,ln(e,u/10,i,o)}}),o),s.onsuccess=Ut((function(){i=null;var r=e.idbdb=s.result,o=oe(r.objectStoreNames);if(o.length>0)try{var c=r.transaction(Vr(o),"readonly");t.autoSchema?function(e,t,r){e.verno=t.version/10;var n=e._dbSchema=pn(0,t,r);e._storeNames=oe(t.objectStoreNames,0),sn(e,[e._allTables],K(n),n)}(e,r,c):(gn(e,e._dbSchema,c),function(e,t){var r=hn(pn(0,e.idbdb,t),e._dbSchema);return!(r.add.length||r.change.some((function(e){return e.add.length||e.change.length})))}(e,c)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),an(e,c)}catch(e){}fr.push(e),r.onversionchange=Ut((function(r){t.vcFired=!0,e.on("versionchange").fire(r)})),vn.add(a),n()}),o)}))]).then((function(){return t.onReadyBeingFired=[],It.resolve(An(e.on.ready.fire)).then((function e(){if(t.onReadyBeingFired.length>0){var r=t.onReadyBeingFired.reduce(tt,We);return t.onReadyBeingFired=[],It.resolve(An(r)).then(e)}}))})).finally((function(){t.onReadyBeingFired=null})).then((function(){return t.isBeingOpened=!1,e})).catch((function(r){try{i&&i.abort()}catch(e){}return t.isBeingOpened=!1,e.close(),t.dbOpenError=r,ar(t.dbOpenError)})).finally((function(){t.openComplete=!0,n()}))}function bn(e){var t=function(t){return e.next(t)},r=i(t),n=i((function(t){return e.throw(t)}));function i(e){return function(t){var i=e(t),o=i.value;return i.done?o:o&&"function"==typeof o.then?o.then(r,n):H(o)?Promise.all(o).then(r,n):r(o)}}return i(t)()}function _n(e,t,r){var n=arguments.length;if(n<2)throw new Ve.InvalidArgument("Too few arguments");for(var i=new Array(n-1);--n;)i[n-1]=arguments[n];r=i.pop();var o=ge(i);return[e,o,r]}function En(e,t,r,n,i){return It.resolve().then((function(){var o=bt.transless||bt,a=e._createTransaction(t,r,e._dbSchema,n),s={trans:a,transless:o};n?a.idbtrans=n.idbtrans:a.create();var c,u=Re(i);u&&Wt();var l=It.follow((function(){if(c=i.call(a,a))if(u){var e=zt.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=bn(c))}),s);return(c&&"function"==typeof c.then?It.resolve(c).then((function(e){return a.active?e:ar(new Ve.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(e){return n&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),ar(e)}))}))}function wn(e,t,r){for(var n=H(e)?e.slice():[e],i=0;i<r;++i)n.push(t);return n}var In={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return q(q({},e),{table:function(t){var r=e.table(t),n=r.schema,i={},o=[];function a(e,t,r){var n=rn(e),s=i[n]=i[n]||[],c=null==e?0:"string"==typeof e?1:e.length,u=t>0,l=q(q({},r),{isVirtual:u,isPrimaryKey:!u&&r.isPrimaryKey,keyTail:t,keyLength:c,extractKey:Zr(e),unique:!u&&r.unique});(s.push(l),l.isPrimaryKey||o.push(l),c>1)&&a(2===c?e[0]:e.slice(0,c-1),t+1,r);return s.sort((function(e,t){return e.keyTail-t.keyTail})),l}var s=a(n.primaryKey.keyPath,0,n.primaryKey);i[":id"]=[s];for(var c=0,u=n.indexes;c<u.length;c++){var l=u[c];a(l.keyPath,0,l)}function h(t){var r,n,i=t.query.index;return i.isVirtual?q(q({},t),{query:{index:i,range:(r=t.query.range,n=i.keyTail,{type:1===r.type?2:r.type,lower:wn(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:wn(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}):t}var d=q(q({},r),{schema:q(q({},n),{primaryKey:s,indexes:o,getIndexByKeyPath:function(e){var t=i[rn(e)];return t&&t[0]}}),count:function(e){return r.count(h(e))},query:function(e){return r.query(h(e))},openCursor:function(t){var n=t.query.index,i=n.keyTail,o=n.isVirtual,a=n.keyLength;if(!o)return r.openCursor(t);return r.openCursor(h(t)).then((function(r){return r&&function(r){var n=Object.create(r,{continue:{value:function(n){null!=n?r.continue(wn(n,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?r.continue(wn(r.key,t.reverse?e.MIN_KEY:e.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(t,n){r.continuePrimaryKey(wn(t,e.MAX_KEY,i),n)}},key:{get:function(){var e=r.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:function(){return r.value}}});return n}(r)}))}});return d}})}},Sn={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return q(q({},e),{table:function(t){var r=e.table(t),n=r.schema.primaryKey,i=q(q({},r),{mutate:function(e){var i=bt.trans,o=i.table(t).hook,a=o.deleting,s=o.creating,c=o.updating;switch(e.type){case"add":if(s.fire===We)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"put":if(s.fire===We&&c.fire===We)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"delete":if(a.fire===We)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"deleteRange":if(a.fire===We)break;return i._promise("readwrite",(function(){return function(e){return l(e.trans,e.range,1e4)}(e)}),!0)}return r.mutate(e);function u(e){var t=bt.trans,i=e.keys||$r(n,e);if(!i)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?q(q({},e),{keys:i,wantResults:!0}):q({},e)).type&&(e.values=V(e.values)),e.keys&&(e.keys=V(e.keys)),function(e,t,r){return"add"===t.type?Promise.resolve(new Array(t.values.length)):e.getMany({trans:t.trans,keys:r})}(r,e,i).then((function(o){var u=i.map((function(r,i){var u=o[i],l={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(l,r,u,t);else if("add"===e.type||void 0===u){var h=s.fire.call(l,r,e.values[i],t);null==r&&null!=h&&(r=h,e.keys[i]=r,n.outbound||he(e.values[i],n.keyPath,r))}else{var d=we(u,e.values[i]),f=c.fire.call(l,d,r,u,t);if(f){var p=e.values[i];Object.keys(f).forEach((function(e){J(p,e)?p[e]=f[e]:he(p,e,f[e])}))}}return l}));return r.mutate(e).then((function(t){for(var r=t.failures,n=t.results,a=t.numFailures,s=t.lastResult,c=0;c<i.length;++c){var l=n?n[c]:i[c],h=u[c];null==l?h.onerror&&h.onerror(r[c]):h.onsuccess&&h.onsuccess("put"===e.type&&o[c]?e.values[c]:l)}return{failures:r,results:n,numFailures:a,lastResult:s}})).catch((function(e){return u.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))}function l(e,t,i){return r.query({trans:e,values:!1,query:{index:n,range:t},limit:i}).then((function(r){var n=r.result;return u({type:"delete",keys:n,trans:e}).then((function(r){return r.numFailures>0?Promise.reject(r.failures[0]):n.length<i?{failures:[],numFailures:0,lastResult:void 0}:l(e,q(q({},t),{lower:n[n.length-1],lowerOpen:!0}),i)}))}))}}});return i}})}},Tn=function(){function e(t,r){var n=this;this._middlewares={},this.verno=0;var i=e.dependencies;this._options=r=q({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},r),this._deps={indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange};var o=r.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:We,dbReadyPromise:null,cancelOpen:We,openCanceller:null,autoSchema:!0};a.dbReadyPromise=new It((function(e){a.dbReadyResolve=e})),a.openCanceller=new It((function(e,t){a.cancelOpen=t})),this._state=a,this.name=t,this.on=Sr(this,"populate","blocked","versionchange",{ready:[tt,We]}),this.on.ready.subscribe=ae(this.on.ready.subscribe,(function(t){return function(r,i){e.vip((function(){var e=n._state;if(e.openComplete)e.dbOpenError||It.resolve().then(r),i&&t(r);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(r),i&&t(r);else{t(r);var o=n;i||t((function e(){o.on.ready.unsubscribe(r),o.on.ready.unsubscribe(e)}))}}))}})),this.Collection=function(e){return Tr(Lr.prototype,(function(t,r){this.db=e;var n=Er,i=null;if(r)try{n=r()}catch(e){i=e}var o=t._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:o.or,valueMapper:s!==ze?s:null}}))}(this),this.Table=function(e){return Tr(Ir.prototype,(function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:Sr(null,{creating:[Je,We],reading:[Ye,ze],updating:[$e,We],deleting:[Ze,We]})}))}(this),this.Transaction=function(e){return Tr(zr.prototype,(function(t,r,n,i){var o=this;this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.idbtrans=null,this.on=Sr(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new It((function(e,t){o._resolve=e,o._reject=t})),this._completion.then((function(){o.active=!1,o.on.complete.fire()}),(function(e){var t=o.active;return o.active=!1,o.on.error.fire(e),o.parent?o.parent._reject(e):t&&o.idbtrans&&o.idbtrans.abort(),ar(e)}))}))}(this),this.Version=function(e){return Tr(mn.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Tr(qr.prototype,(function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};var i=e._deps.indexedDB;if(!i)throw new Ve.MissingAPI("indexedDB API missing");this._cmp=this._ascending=i.cmp.bind(i),this._descending=function(e,t){return i.cmp(t,e)},this._max=function(e,t){return i.cmp(e,t)>0?e:t},this._min=function(e,t){return i.cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '"+n.name+"'. Closing db now to resume the upgrade."):console.warn("Another connection wants to delete database '"+n.name+"'. Closing db now to resume the delete request."),n.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('"+n.name+"') was blocked"):console.warn("Upgrade '"+n.name+"' blocked by other connection holding version "+e.oldVersion/10)})),this._maxKey=Kr(r.IDBKeyRange),this._createTransaction=function(e,t,r,i){return new n.Transaction(e,t,r,i)},this._fireOnBlocked=function(e){n.on("blocked").fire(e),fr.filter((function(e){return e.name===n.name&&e!==n&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(In),this.use(Sn),o.forEach((function(e){return e(n)}))}return e.prototype.version=function(e){if(isNaN(e)||e<.1)throw new Ve.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Ve.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,r=t.filter((function(t){return t._cfg.version===e}))[0];return r||(r=new this.Version(e),t.push(r),t.sort(un),r.stores({}),this._state.autoSchema=!1,r)},e.prototype._whenReady=function(e){var t=this;return this._state.openComplete||bt.letThrough?e():new It((function(e,r){if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void r(new Ve.DatabaseClosed);t.open().catch(We)}t._state.dbReadyPromise.then(e,r)})).then(e)},e.prototype.use=function(e){var t=e.stack,r=e.create,n=e.level,i=e.name;i&&this.unuse({stack:t,name:i});var o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:r,level:null==n?10:n,name:i}),o.sort((function(e,t){return e.level-t.level})),this},e.prototype.unuse=function(e){var t=e.stack,r=e.name,n=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return n?e.create!==n:!!r&&e.name!==r}))),this},e.prototype.open=function(){return yn(this)},e.prototype.close=function(){var e=fr.indexOf(this),t=this._state;if(e>=0&&fr.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(e){}this.idbdb=null}this._options.autoOpen=!1,t.dbOpenError=new Ve.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError),t.dbReadyPromise=new It((function(e){t.dbReadyResolve=e})),t.openCanceller=new It((function(e,r){t.cancelOpen=r}))},e.prototype.delete=function(){var e=this,t=arguments.length>0,r=this._state;return new It((function(n,i){var o=function(){e.close();var t=e._deps.indexedDB.deleteDatabase(e.name);t.onsuccess=Ut((function(){vn.remove(e.name),n()})),t.onerror=Hr(i),t.onblocked=e._fireOnBlocked};if(t)throw new Ve.InvalidArgument("Arguments not allowed in db.delete()");r.isBeingOpened?r.dbReadyPromise.then(o):o()}))},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return null!==this.idbdb},e.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name},e.prototype.hasFailed=function(){return null!==this._state.dbOpenError},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var e=this;return K(this._allTables).map((function(t){return e._allTables[t]}))},enumerable:!0,configurable:!0}),e.prototype.transaction=function(){var e=_n.apply(this,arguments);return this._transaction.apply(this,e)},e.prototype._transaction=function(e,t,r){var n=this,i=bt.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);var o,a,s=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=e instanceof n.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||e===yr)o=yr;else{if("rw"!=e&&e!=br)throw new Ve.InvalidArgument("Invalid transaction mode: "+e);o=br}if(i){if(i.mode===yr&&o===br){if(!s)throw new Ve.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&a.forEach((function(e){if(i&&-1===i.storeNames.indexOf(e)){if(!s)throw new Ve.SubTransaction("Table "+e+" not included in parent transaction.");i=null}})),s&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(function(t,r){r(e)})):ar(e)}var c=En.bind(null,this,o,a,i,r);return i?i._promise(o,c,"lock"):bt.trans?er(bt.transless,(function(){return n._whenReady(c)})):this._whenReady(c)},e.prototype.table=function(e){if(!J(this._allTables,e))throw new Ve.InvalidTable("Table "+e+" does not exist");return this._allTables[e]},e}(),Cn=Tn;Z(Cn,q(q({},He),{delete:function(e){return new Cn(e).delete()},exists:function(e){return new Cn(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){return vn?vn.getDatabaseNames().then(e):It.resolve([])},defineClass:function(){return function(e){z(this,e)}},ignoreTransaction:function(e){return bt.trans?er(bt.transless,e):e()},vip:An,async:function(e){return function(){try{var t=bn(e.apply(this,arguments));return t&&"function"==typeof t.then?t:It.resolve(t)}catch(e){return ar(e)}}},spawn:function(e,t,r){try{var n=bn(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:It.resolve(n)}catch(e){return ar(e)}},currentTransaction:{get:function(){return bt.trans||null}},waitFor:function(e,t){var r=It.resolve("function"==typeof e?Cn.ignoreTransaction(e):e).timeout(t||6e4);return bt.trans?bt.trans.waitFor(r):r},Promise:It,debug:{get:function(){return ke},set:function(e){Oe(e,"dexie"===e?function(){return!0}:mr)}},derive:te,extend:z,props:Z,override:ae,Events:Sr,getByKeyPath:le,setByKeyPath:he,delByKeyPath:de,shallowClone:fe,deepClone:ye,getObjectDiff:we,asap:ce,minKey:lr,addons:[],connections:fr,errnames:Qe,dependencies:function(){try{return{indexedDB:W.indexedDB||W.mozIndexedDB||W.webkitIndexedDB||W.msIndexedDB,IDBKeyRange:W.IDBKeyRange||W.webkitIDBKeyRange}}catch(e){return{indexedDB:null,IDBKeyRange:null}}}(),semVer:cr,version:cr.split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,r){return e+t/Math.pow(10,2*r)})),default:Cn,Dexie:Cn})),Cn.maxKey=Kr(Cn.dependencies.IDBKeyRange),function(e){try{vn=function(e){var t,r=e&&"function"==typeof e.databases;if(!r){var n=new Tn(Ar,{addons:[]});n.version(1).stores({dbnames:"name"}),t=n.table("dbnames")}return{getDatabaseNames:function(){return r?It.resolve(e.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return e!==Ar}))})):t.toCollection().primaryKeys()},add:function(e){return!r&&e!==Ar&&t.put({name:e}).catch(We)},remove:function(e){return!r&&e!==Ar&&t.delete(e).catch(We)}}}(e)}catch(e){}}(Tn.dependencies.indexedDB),It.rejectionMapper=function(e,t){if(!e||e instanceof je||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Ke[e.name])return e;var r=new Ke[e.name](t||e.message,e);return"stack"in e&&ee(r,"stack",{get:function(){return this.inner.stack}}),r},Oe(ke,mr);function Rn(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var kn=new(function(e){w(r,e);var t=Rn(r);function r(){var e;return y(this,r),(e=t.call(this,"AgoraLogger")).logs=void 0,e.openDatabase(),e.logs=e.table("logs"),e}return _(r,[{key:"openDatabase",value:function(){this.version(1).stores({logs:"++id, content, created_at"})}}]),r}(Tn));function On(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Nn,xn=function(){function e(){y(this,e),this._lastObjectIndex=-1,this.thread=new Q}var t,r,n;return _(e,[{key:"collectConsoleLogs",value:(n=A(k().mark((function e(){var t,r,n,i=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="",e.next=3,kn.logs.each((function(e){t+=e.content+"\n",i._lastObjectIndex=e.id}));case 3:return r=+Date.now(),n=new File([t],"".concat(r)),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"cleanupConsoleLogs",value:(r=A(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kn.logs.where("id").belowOrEqual(this._lastObjectIndex).delete();case 2:t=e.sent,console.log("[logger] delete ".concat(t," logs"));case 4:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"_addLocalFolderAsync",value:function(e,t){return new Promise((function(r,n){e.addLocalFolderAsync(t,(function(e,t){if(t)return n(t);r()}))}))}},{key:"_readFile",value:function(e){return new Promise((function(t,r){window.require("fs").readFile(e,(function(e,n){return e?r(e):t(n)}))}))}},{key:"collectElectronLogs",value:(t=A(k().mark((function e(t,r){var n,i,o,a,s,c;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=+Date.now(),i=window.require("adm-zip"),o=window.require("path"),a=new i,e.next=6,this._addLocalFolderAsync(a,r);case 6:return s=o.resolve(t,"logs.zip"),a.writeZip(s),e.next=10,this._readFile(s);case 10:return c=e.sent,e.abrupt("return",new File([c],"".concat(n)));case 12:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}],[{key:"warn",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.log.apply(e,[qn.WARN].concat(r))}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.log.apply(e,[qn.DEBUG].concat(r))}},{key:"info",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.log.apply(e,[qn.INFO].concat(r))}},{key:"error",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.log.apply(e,[qn.ERROR].concat(r))}},{key:"log",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=$n.logLevel;if(!(e>o)){var a="AgoraEdu-SDK [".concat(e,"]: "),s=[],c=(D(t={},"".concat(qn.WARN),{call:function(){s=[a].concat(n),console.warn.apply(console,s)}}),D(t,"".concat(qn.DEBUG),{call:function(){s=[a].concat(n),console.debug.apply(console,s)}}),D(t,"".concat(qn.INFO),{call:function(){s=[a].concat(n),console.info.apply(console,s)}}),D(t,"".concat(qn.ERROR),{call:function(){s=[a].concat(n),console.error.apply(console,s)}}),t),u="".concat(e);c.hasOwnProperty(u)?c[u].call():(s=[a].concat(n),console.log.apply(console,s))}}},{key:"setupConsoleHijack",value:function(){var t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?On(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):On(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e.originConsole);if(t.__hijackSetup)t.log("[logger] hijack already setup!");else{t.log("[logger] setup hijack..");var r=this.logger.thread,n=function(e,t){return"".concat(j()().format("YYYY-MM-DD HH:mm:ss")," ").concat((0,U.upperCase)(e||"unknown")," ").concat((0,U.escape)(t))};Object.keys(t).filter((function(e){return["info","error","warn","log","debug"].indexOf(e)>=0})).forEach((function(e,i){t[e]=function(e,t){return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=n(t.name,o.join(" "));r.postMessage({type:"log",data:s}),t.apply(e,o)}}(t,t[e])})),t.__hijackSetup=!0,window.console=t}}},{key:"restoreConsoleHijack",value:function(){console.log("[logger] restore hijack.."),window.console=e.originConsole,console.__hijackSetup=!1}}]),e}();xn.logger=new xn,xn.originConsole=window.console;var Dn=new Uint8Array(16);function Ln(){if(!Nn&&!(Nn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Nn(Dn)}const Pn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const Mn=function(e){return"string"==typeof e&&Pn.test(e)};for(var Bn=[],jn=0;jn<256;++jn)Bn.push((jn+256).toString(16).substr(1));const Un=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Bn[e[t+0]]+Bn[e[t+1]]+Bn[e[t+2]]+Bn[e[t+3]]+"-"+Bn[e[t+4]]+Bn[e[t+5]]+"-"+Bn[e[t+6]]+Bn[e[t+7]]+"-"+Bn[e[t+8]]+Bn[e[t+9]]+"-"+Bn[e[t+10]]+Bn[e[t+11]]+Bn[e[t+12]]+Bn[e[t+13]]+Bn[e[t+14]]+Bn[e[t+15]]).toLowerCase();if(!Mn(r))throw TypeError("Stringified UUID is invalid");return r};const Fn=function(e,t,r){var n=(e=e||{}).random||(e.rng||Ln)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return Un(n)};function Gn(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Qn,qn,Vn,Kn,Hn,Wn=function(e){w(r,e);var t=Gn(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r)}(x),zn=function(e){w(r,e);var t=Gn(r);function r(e,n,i){var o;return y(this,r),(o=t.call(this))._extra=i,o.id=Fn(),o.original=void 0,o.codeList=void 0,o.message=n.message,o.original=n,o.codeList=[e],o.stack=n.stack,o}return _(r,[{key:"servCode",get:function(){var e;return null===(e=this._extra)||void 0===e?void 0:e.servCode}}],[{key:"isOf",value:function(e){if(!(e instanceof r))return!1;for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n.includes(e.servCode)}}]),r}(M(Error)),Yn=function(e,t){return t instanceof zn?(t.codeList.push(e),t):new zn(e,t)},Xn=function(e){w(r,e);var t=Gn(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r,[{key:"_handleError",value:function(e,t){var r=(null==t?void 0:t.stack)||(null==t?void 0:t.message);xn.error("[RteErrorCenter] error ".concat(e,": ").concat(r))}},{key:"handleThrowableError",value:function(e,t){var r=Yn(e,t);throw this._handleError(e,r),r}},{key:"handleNonThrowableError",value:function(e,t){var r=Yn(e,t);this._handleError(e,r)}}]),r}(Wn);function Jn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Xn.shared=new Xn,function(e){e.RTE_ERR_MISSING_PARAMS="100000",e.RTE_ERR_SCENE_NOT_READY="100001",e.RTE_ERR_INVALID_DATA_STRUCT="100002",e.RTE_ERR_LOG_UPLOAD_FAIL="100003",e.RTE_ERR_RESTFUL_SERVICE_ERR="100004",e.RTE_ERR_RESTFUL_HTTP_CLIENT_ERR="100005",e.RTE_ERR_AGORA_FETCH_ERR="100006",e.RTE_ERR_ELECTRON_LOG_UPLOAD_ERR="100007",e.RTE_ERR_WEB_LOG_UPLOAD_ERR="100008",e.RTE_ERR_JOIN_SCENE_FAILED="100009",e.RTE_ERR_LEAVE_SCENE_FAIL="100010",e.RTE_ERR_EVENT_CALLBACK_ERR="100011",e.RTE_ERR_SCENE_ALREADY_JOINED="100012",e.RTE_ERR_ENGINE_NOT_READY="100013",e.RTE_ERR_CONFIG_NOT_READY="100014",e.RTE_ERR_RESTFUL_NETWORK_ERR="100015",e.RTE_ERR_RESTFUL_NETWORK_TIMEOUT_ERR="100016",e.RTE_ERR_LOCAL_USER_NOT_EXIST="100017",e.RTM_ERR_LOGGED_IN_ALREADY="200000",e.RTM_ERR_JOIN_FAILED="200001",e.RTM_ERR_LEAVE_FAILED="200002",e.RTM_ERR_DESTROY_FAILED="200003",e.RTM_ERR_LOGIN_FAIL="200004",e.RTM_ERR_REGION_NOT_SPECIFIED="200005",e.RTC_ERR_CAM_ERR="300000",e.RTC_ERR_MIC_ERR="300001",e.RTC_ERR_TRACK_PUBLISH_FAIL="300002",e.RTC_ERR_TRACK_UNPUBLISH_FAIL="300003",e.RTC_ERR_TRACK_SUBSCRIBE_FAIL="300004",e.RTC_ERR_TRACK_UNSUBSCRIBE_FAIL="300005",e.RTC_ERR_NO_CHANNEL_EXISTS="300006",e.RTC_ERR_INVALID_CANVAS="300007",e.RTC_ERR_SCREEN_SHARE_ERR="300008",e.RTC_ERR_CLIENT_LEAVE_CHANNEL_FAIL="300009",e.RTC_ERR_LEAVE_MAIN_CHANNEL_FAIL="300010",e.RTC_ERR_LEAVE_SUB_CHANNEL_FAIL="300011",e.RTC_ERR_LEAVE_CHANNEL_FAIL="300012",e.RTC_ERR_VDM_GET_DEVICES_FAIL="300013",e.RTC_ERR_ADM_GET_RECORD_DEVICES_FAIL="300014",e.RTC_ERR_ADM_GET_PLAYBACK_DEVICES_FAIL="300015",e.RTC_ERR_REGION_NOT_SPECIFIED="300016",e.RTC_ERR_RTC_ENGINE_INITIALZIE_FAILED="300017",e.RTC_ERR_RTC_VDM_NOT_READY="300018",e.RTC_ERR_RTC_ADM_NOT_READY="300019"}(Qn||(Qn={})),function(e){e[e.OFF=0]="OFF",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e[e.VERBOSE=5]="VERBOSE"}(qn||(qn={})),function(e){e[e.Electron=0]="Electron",e[e.Web=1]="Web"}(Vn||(Vn={})),function(e){e.zh="zh",e.en="en"}(Kn||(Kn={})),function(e){e.CN="CN",e.AP="AP",e.EU="EU",e.NA="NA"}(Hn||(Hn={}));var $n=function(){function e(t,r){y(this,e),this.appId=void 0,this.service={},this.rtcConfigs={},this.logFilePath=void 0,this.rtcSDKParameters=[],this.userId="",this.token="",this.ignoreUrlRegionPrefix=!1,this.language=Kn.zh,this.debugI18n=!1,this.region=Hn.CN,this.SCENE_JOIN_RETRY_ATTEMPTS=3,this.appId=t,r&&(r.language&&(this.language=r.language),r.region&&(this.region=r.region),r.rtcConfigs&&(this.rtcConfigs=Zn(Zn({},this.rtcConfigs),r.rtcConfigs)),r.rtcSDKParameters&&(this.rtcSDKParameters=r.rtcSDKParameters))}return _(e,null,[{key:"shared",get:function(){return this._config?this._config:Xn.shared.handleThrowableError(Qn.RTE_ERR_CONFIG_NOT_READY,new Error("classroom config not ready"))}},{key:"setConfig",value:function(e){this._config=e}},{key:"platform",get:function(){return navigator.userAgent.toLowerCase().indexOf(" electron/")>-1?Vn.Electron:Vn.Web}},{key:"version",get:function(){return"2.6.0"}}]),e}();$n._config=void 0,$n.logLevel=qn.DEBUG;__webpack_require__(4812),__webpack_require__(1249),__webpack_require__(9826),__webpack_require__(2707),__webpack_require__(2564);var ei,ti,ri=function(e,t){var r=e.__$$ignoreMethods||[];r=r.concat(t),e.__$$ignoreMethods=r};__webpack_require__(7727),__webpack_require__(6210);function ni(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e[e.pre=0]="pre",e[e.post=1]="post"}(ei||(ei={})),ti||(ti={});var ii=function(e,t,r){if(!r)try{return e.apply(null,t)}catch(e){}},oi=function(e,t,r,n,i,o,a){var s=function(e,t){return e.__$$ignoreMethods&&e.__$$ignoreMethods.indexOf(t)>-1}(r,n);ii(o,[{type:ei.pre,arguments:i,method:n,class:r.constructor.name,context:a}],s);var c,u,l=t.apply(e,i),h=function(e,t){ii(o,[{type:ei.post,arguments:i,return:e,method:n,class:r.constructor.name,context:a,error:t}],s)};l&&!!l.then?l.then((function(e){c=e})).catch((function(e){u=e})).finally((function(){h(c,u)})):h(l);return l},ai=function(e,t,r,n,i){return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return oi(this,e,t,r,a,n,i)}},si=function(e){return Object.getOwnPropertyNames(e).filter((function(t){return"function"==typeof e[t]}))},ci=function(){},ui=function(e){var t=xn[e]||ci;return function(e){if(e.type===ei.pre){var r;e.context.start=(new Date).getTime();var n=["[".concat(e.class,"] >>> [").concat(e.method,"]")];(null===(r=e.arguments)||void 0===r?void 0:r.length)&&n.push(", args:",e.arguments),t.apply(void 0,n)}else{var i=(new Date).getTime()-e.context.start,o=["[".concat(e.class,"] <<< [").concat(e.method,"]")];e.return&&o.push(", return:",e.return),e.error&&o.push(", err:",e.error),o.push(", Time elapsed: ".concat(i,"ms")),t.apply(void 0,o)}}},li=(__webpack_require__(3371),{info:function(e,t,r){var n=ui("info"),i=e[t],o=ai(i,e,t,n,{});return{configurable:!0,enumerable:!1,get:function(){return o.bind(this)}}},warn:function(e,t,r){var n=ui("warn"),i=e[t],o=ai(i,e,t,n,{});return{configurable:!0,enumerable:!1,get:function(){return o.bind(this)}}},error:function(e,t,r){var n=ui("error"),i=e[t],o=ai(i,e,t,n,{});return{configurable:!0,enumerable:!1,get:function(){return o.bind(this)}}},attach:function(e){var t=e.level,r=void 0===t?qn.INFO:t,n=e.proxyMethods,i=void 0===n||n;return function(e){var t=ui([,"error","warn","info","info","info"][r]),n=function(e){return Object.freeze({info:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];xn.info.apply(xn,["[".concat(e.name,"]")].concat(r))},warn:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];xn.warn.apply(xn,["[".concat(e.name,"]")].concat(r))},error:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];xn.error.apply(xn,["[".concat(e.name,"]")].concat(r))},debug:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];xn.debug.apply(xn,["[".concat(e.name,"]")].concat(r))}})}(e);return function(e,t,r,n,i){var o=e.prototype;return function(e){w(s,e);var a=ni(s);function s(){var e;y(this,s);for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];(e=a.call.apply(a,[this].concat(u)),ri(o,[]),i)&&si(o).forEach((function(n){var i=o[n];e[n]=ai(i,o,n,t,r).bind(S(e))}));return Object.keys(n).forEach((function(t){e[t]=n[t]})),e}return _(s)}(e)}(e,t,{},{logger:n},i)}},silence:function(e,t){ri(e,[t])}});function hi(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||g(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}__webpack_require__(4916),__webpack_require__(3123),__webpack_require__(561),__webpack_require__(189),__webpack_require__(8921),__webpack_require__(6248),__webpack_require__(3599),__webpack_require__(1477),__webpack_require__(3066),__webpack_require__(5389),__webpack_require__(401),__webpack_require__(5164),__webpack_require__(1238),__webpack_require__(4837),__webpack_require__(7485),__webpack_require__(465),__webpack_require__(6651),__webpack_require__(1437),__webpack_require__(5285),__webpack_require__(9865),__webpack_require__(5827);var di=32,fi=31,pi={};function gi(e){e&&(e.value=!0)}function vi(){}function mi(e){return void 0===e.size&&(e.size=e.__iterate(yi)),e.size}function Ai(e,t){if("number"!=typeof t){var r=t>>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?mi(e)+t:t}function yi(){return!0}function bi(e,t,r){return(0===e&&!Ii(e)||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function _i(e,t){return wi(e,t,0)}function Ei(e,t){return wi(e,t,t)}function wi(e,t,r){return void 0===e?r:Ii(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function Ii(e){return e<0||0===e&&1/e==-1/0}var Si="@@__IMMUTABLE_ITERABLE__@@";function Ti(e){return Boolean(e&&e[Si])}var Ci="@@__IMMUTABLE_KEYED__@@";function Ri(e){return Boolean(e&&e[Ci])}var ki="@@__IMMUTABLE_INDEXED__@@";function Oi(e){return Boolean(e&&e[ki])}function Ni(e){return Ri(e)||Oi(e)}var xi=function(e){return Ti(e)?e:to(e)},Di=function(e){function t(e){return Ri(e)?e:ro(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(xi),Li=function(e){function t(e){return Oi(e)?e:no(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(xi),Pi=function(e){function t(e){return Ti(e)&&!Ni(e)?e:io(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(xi);xi.Keyed=Di,xi.Indexed=Li,xi.Set=Pi;var Mi="@@__IMMUTABLE_SEQ__@@";function Bi(e){return Boolean(e&&e[Mi])}var ji="@@__IMMUTABLE_RECORD__@@";function Ui(e){return Boolean(e&&e[ji])}function Fi(e){return Ti(e)||Ui(e)}var Gi="@@__IMMUTABLE_ORDERED__@@";function Qi(e){return Boolean(e&&e[Gi])}var qi="function"==typeof Symbol&&Symbol.iterator,Vi="@@iterator",Ki=qi||Vi,Hi=function(e){this.next=e};function Wi(e,t,r,n){var i=0===e?t:1===e?r:[t,r];return n?n.value=i:n={value:i,done:!1},n}function zi(){return{value:void 0,done:!0}}function Yi(e){return!!Array.isArray(e)||!!Zi(e)}function Xi(e){return e&&"function"==typeof e.next}function Ji(e){var t=Zi(e);return t&&t.call(e)}function Zi(e){var t=e&&(qi&&e[qi]||e["@@iterator"]);if("function"==typeof t)return t}Hi.prototype.toString=function(){return"[Iterator]"},Hi.KEYS=0,Hi.VALUES=1,Hi.ENTRIES=2,Hi.prototype.inspect=Hi.prototype.toSource=function(){return this.toString()},Hi.prototype[Ki]=function(){return this};var $i=Object.prototype.hasOwnProperty;function eo(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var to=function(e){function t(e){return null==e?uo():Fi(e)?e.toSeq():function(e){var t=fo(e);if(t)return(n=Zi(r=e))&&n===r.entries?t.fromEntrySeq():function(e){var t=Zi(e);return t&&t===e.keys}(e)?t.toSetSeq():t;var r,n;if("object"==typeof e)return new ao(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[t?n-++i:i++];if(!1===e(o[1],o[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var r=this._cache;if(r){var n=r.length,i=0;return new Hi((function(){if(i===n)return{value:void 0,done:!0};var o=r[t?n-++i:i++];return Wi(e,o[0],o[1])}))}return this.__iteratorUncached(e,t)},t}(xi),ro=function(e){function t(e){return null==e?uo().toKeyedSeq():Ti(e)?Ri(e)?e.toSeq():e.fromEntrySeq():Ui(e)?e.toSeq():lo(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(to),no=function(e){function t(e){return null==e?uo():Ti(e)?Ri(e)?e.entrySeq():e.toIndexedSeq():Ui(e)?e.toSeq().entrySeq():ho(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(to),io=function(e){function t(e){return(Ti(e)&&!Ni(e)?e:no(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(to);to.isSeq=Bi,to.Keyed=ro,to.Set=io,to.Indexed=no,to.prototype[Mi]=!0;var oo=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[Ai(this,e)]:t},t.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length,i=0;i!==n;){var o=t?n-++i:i++;if(!1===e(r[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var r=this._array,n=r.length,i=0;return new Hi((function(){if(i===n)return{value:void 0,done:!0};var o=t?n-++i:i++;return Wi(e,o,r[o])}))},t}(no),ao=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return $i.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var a=n[t?i-++o:o++];if(!1===e(r[a],a,this))break}return o},t.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,i=n.length,o=0;return new Hi((function(){if(o===i)return{value:void 0,done:!0};var a=n[t?i-++o:o++];return Wi(e,a,r[a])}))},t}(ro);ao.prototype[Gi]=!0;var so,co=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=Ji(this._collection),n=0;if(Xi(r))for(var i;!(i=r.next()).done&&!1!==e(i.value,n++,this););return n},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=Ji(this._collection);if(!Xi(r))return new Hi(zi);var n=0;return new Hi((function(){var t=r.next();return t.done?t:Wi(e,n++,t.value)}))},t}(no);function uo(){return so||(so=new oo([]))}function lo(e){var t=fo(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new ao(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function ho(e){var t=fo(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function fo(e){return eo(e)?new oo(e):Yi(e)?new co(e):void 0}var po="@@__IMMUTABLE_MAP__@@";function go(e){return Boolean(e&&e[po])}function vo(e){return go(e)&&Qi(e)}function mo(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function Ao(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(mo(e)&&mo(t)&&e.equals(t))}var yo="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function bo(e){return e>>>1&1073741824|3221225471&e}var _o=Object.prototype.valueOf;function Eo(e){if(null==e)return wo(e);if("function"==typeof e.hashCode)return bo(e.hashCode(e));var t,r=(t=e).valueOf!==_o&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==r)return wo(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return bo(t)}(r);case"string":return r.length>Do?function(e){var t=Mo[e];void 0===t&&(t=Io(e),Po===Lo&&(Po=0,Mo={}),Po++,Mo[e]=t);return t}(r):Io(r);case"object":case"function":return function(e){var t;if(ko&&void 0!==(t=Ro.get(e)))return t;if(void 0!==(t=e[xo]))return t;if(!To){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[xo]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=Co(),ko)Ro.set(e,t);else{if(void 0!==So&&!1===So(e))throw new Error("Non-extensible objects are not allowed as keys.");if(To)Object.defineProperty(e,xo,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[xo]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[xo]=t}}return t}(r);case"symbol":return function(e){var t=Oo[e];if(void 0!==t)return t;return t=Co(),Oo[e]=t,t}(r);default:if("function"==typeof r.toString)return Io(r.toString());throw new Error("Value type "+typeof r+" cannot be hashed.")}}function wo(e){return null===e?1108378658:1108378659}function Io(e){for(var t=0,r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)|0;return bo(t)}var So=Object.isExtensible,To=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Co(){var e=++No;return 1073741824&No&&(No=0),e}var Ro,ko="function"==typeof WeakMap;ko&&(Ro=new WeakMap);var Oo=Object.create(null),No=0,xo="__immutablehash__";"function"==typeof Symbol&&(xo=Symbol(xo));var Do=16,Lo=255,Po=0,Mo={},Bo=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=qo(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var r=this,n=Qo(this,e,t);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(e,t)}),n},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t,n){return e(t,n,r)}),t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(ro);Bo.prototype[Gi]=!0;var jo=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var r=this,n=0;return t&&mi(this),this._iter.__iterate((function(i){return e(i,t?r.size-++n:n++,r)}),t)},t.prototype.__iterator=function(e,t){var r=this,n=this._iter.__iterator(1,t),i=0;return t&&mi(this),new Hi((function(){var o=n.next();return o.done?o:Wi(e,t?r.size-++i:i++,o.value,o)}))},t}(no),Uo=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t){return e(t,t,r)}),t)},t.prototype.__iterator=function(e,t){var r=this._iter.__iterator(1,t);return new Hi((function(){var t=r.next();return t.done?t:Wi(e,t.value,t.value,t)}))},t}(io),Fo=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t){if(t){ea(t);var n=Ti(t);return e(n?t.get(1):t[1],n?t.get(0):t[0],r)}}),t)},t.prototype.__iterator=function(e,t){var r=this._iter.__iterator(1,t);return new Hi((function(){for(;;){var t=r.next();if(t.done)return t;var n=t.value;if(n){ea(n);var i=Ti(n);return Wi(e,i?n.get(0):n[0],i?n.get(1):n[1],t)}}}))},t}(ro);function Go(e){var t=ra(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=na,t.__iterateUncached=function(t,r){var n=this;return e.__iterate((function(e,r){return!1!==t(r,e,n)}),r)},t.__iteratorUncached=function(t,r){if(2===t){var n=e.__iterator(t,r);return new Hi((function(){var e=n.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,r)},t}function Qo(e,t,r){var n=ra(e);return n.size=e.size,n.has=function(t){return e.has(t)},n.get=function(n,i){var o=e.get(n,pi);return o===pi?i:t.call(r,o,n,e)},n.__iterateUncached=function(n,i){var o=this;return e.__iterate((function(e,i,a){return!1!==n(t.call(r,e,i,a),i,o)}),i)},n.__iteratorUncached=function(n,i){var o=e.__iterator(2,i);return new Hi((function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return Wi(n,s,t.call(r,a[1],s,e),i)}))},n}function qo(e,t){var r=this,n=ra(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Go(e);return t.reverse=function(){return e.flip()},t}),n.get=function(r,n){return e.get(t?r:-1-r,n)},n.has=function(r){return e.has(t?r:-1-r)},n.includes=function(t){return e.includes(t)},n.cacheResult=na,n.__iterate=function(r,n){var i=this,o=0;return n&&mi(e),e.__iterate((function(e,a){return r(e,t?a:n?i.size-++o:o++,i)}),!n)},n.__iterator=function(n,i){var o=0;i&&mi(e);var a=e.__iterator(2,!i);return new Hi((function(){var e=a.next();if(e.done)return e;var s=e.value;return Wi(n,t?s[0]:i?r.size-++o:o++,s[1],e)}))},n}function Vo(e,t,r,n){var i=ra(e);return n&&(i.has=function(n){var i=e.get(n,pi);return i!==pi&&!!t.call(r,i,n,e)},i.get=function(n,i){var o=e.get(n,pi);return o!==pi&&t.call(r,o,n,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate((function(e,o,c){if(t.call(r,e,o,c))return s++,i(e,n?o:s-1,a)}),o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(2,o),s=0;return new Hi((function(){for(;;){var o=a.next();if(o.done)return o;var c=o.value,u=c[0],l=c[1];if(t.call(r,l,u,e))return Wi(i,n?u:s++,l,o)}}))},i}function Ko(e,t,r,n){var i=e.size;if(bi(t,r,i))return e;var o=_i(t,i),a=Ei(r,i);if(o!=o||a!=a)return Ko(e.toSeq().cacheResult(),t,r,n);var s,c=a-o;c==c&&(s=c<0?0:c);var u=ra(e);return u.size=0===s?s:e.size&&s||void 0,!n&&Bi(e)&&s>=0&&(u.get=function(t,r){return(t=Ai(this,t))>=0&&t<s?e.get(t+o,r):r}),u.__iterateUncached=function(t,r){var i=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(t,r);var a=0,c=!0,u=0;return e.__iterate((function(e,r){if(!c||!(c=a++<o))return u++,!1!==t(e,n?r:u-1,i)&&u!==s})),u},u.__iteratorUncached=function(t,r){if(0!==s&&r)return this.cacheResult().__iterator(t,r);if(0===s)return new Hi(zi);var i=e.__iterator(t,r),a=0,c=0;return new Hi((function(){for(;a++<o;)i.next();if(++c>s)return{value:void 0,done:!0};var e=i.next();return n||1===t||e.done?e:Wi(t,c-1,0===t?void 0:e.value[1],e)}))},u}function Ho(e,t,r,n){var i=ra(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,c=0;return e.__iterate((function(e,o,u){if(!s||!(s=t.call(r,e,o,u)))return c++,i(e,n?o:c-1,a)})),c},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(2,o),c=!0,u=0;return new Hi((function(){var e,o,l;do{if((e=s.next()).done)return n||1===i?e:Wi(i,u++,0===i?void 0:e.value[1],e);var h=e.value;o=h[0],l=h[1],c&&(c=t.call(r,l,o,a))}while(c);return 2===i?e:Wi(i,o,l,e)}))},i}function Wo(e,t){var r=Ri(e),n=[e].concat(t).map((function(e){return Ti(e)?r&&(e=Di(e)):e=r?lo(e):ho(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===n.length)return e;if(1===n.length){var i=n[0];if(i===e||r&&Ri(i)||Oi(e)&&Oi(i))return i}var o=new oo(n);return r?o=o.toKeyedSeq():Oi(e)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=n.reduce((function(e,t){if(void 0!==e){var r=t.size;if(void 0!==r)return e+r}}),0),o}function zo(e,t,r){var n=ra(e);return n.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function e(c,u){c.__iterate((function(o,c){return(!t||u<t)&&Ti(o)?e(o,u+1):(a++,!1===i(o,r?c:a-1,n)&&(s=!0)),!s}),o)}(e,0),a},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var o=e.__iterator(n,i),a=[],s=0;return new Hi((function(){for(;o;){var e=o.next();if(!1===e.done){var c=e.value;if(2===n&&(c=c[1]),t&&!(a.length<t)||!Ti(c))return r?e:Wi(n,s++,c,e);a.push(o),o=c.__iterator(n,i)}else o=a.pop()}return{value:void 0,done:!0}}))},n}function Yo(e,t,r){t||(t=ia);var n=Ri(e),i=0,o=e.toSeq().map((function(t,n){return[n,t,i++,r?r(t,n,e):t]})).valueSeq().toArray();return o.sort((function(e,r){return t(e[3],r[3])||e[2]-r[2]})).forEach(n?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),n?ro(o):Oi(e)?no(o):io(o)}function Xo(e,t,r){if(t||(t=ia),r){var n=e.toSeq().map((function(t,n){return[t,r(t,n,e)]})).reduce((function(e,r){return Jo(t,e[1],r[1])?r:e}));return n&&n[0]}return e.reduce((function(e,r){return Jo(t,e,r)?r:e}))}function Jo(e,t,r){var n=e(r,t);return 0===n&&r!==t&&(null==r||r!=r)||n>0}function Zo(e,t,r,n){var i=ra(e),o=new oo(r).map((function(e){return e.size}));return i.size=n?o.max():o.min(),i.__iterate=function(e,t){for(var r,n=this.__iterator(1,t),i=0;!(r=n.next()).done&&!1!==e(r.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map((function(e){return e=xi(e),Ji(i?e.reverse():e)})),a=0,s=!1;return new Hi((function(){var r;return s||(r=o.map((function(e){return e.next()})),s=n?r.every((function(e){return e.done})):r.some((function(e){return e.done}))),s?{value:void 0,done:!0}:Wi(e,a++,t.apply(null,r.map((function(e){return e.value}))))}))},i}function $o(e,t){return e===t?e:Bi(e)?t:e.constructor(t)}function ea(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function ta(e){return Ri(e)?Di:Oi(e)?Li:Pi}function ra(e){return Object.create((Ri(e)?ro:Oi(e)?no:io).prototype)}function na(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):to.prototype.cacheResult.call(this)}function ia(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function oa(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),i=0;i<r;i++)n[i]=e[i+t];return n}function aa(e,t){if(!e)throw new Error(t)}function sa(e){aa(e!==1/0,"Cannot perform this action with an infinite size.")}function ca(e){if(eo(e)&&"string"!=typeof e)return e;if(Qi(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}jo.prototype.cacheResult=Bo.prototype.cacheResult=Uo.prototype.cacheResult=Fo.prototype.cacheResult=na;var ua=Object.prototype.toString;function la(e){if(!e||"object"!=typeof e||"[object Object]"!==ua.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var r=t,n=Object.getPrototypeOf(t);null!==n;)r=n,n=Object.getPrototypeOf(r);return r===t}function ha(e){return"object"==typeof e&&(Fi(e)||Array.isArray(e)||la(e))}function da(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function fa(e,t){return Fi(e)?e.has(t):ha(e)&&$i.call(e,t)}function pa(e,t,r){return Fi(e)?e.get(t,r):fa(e,t)?"function"==typeof e.get?e.get(t):e[t]:r}function ga(e){if(Array.isArray(e))return oa(e);var t={};for(var r in e)$i.call(e,r)&&(t[r]=e[r]);return t}function va(e,t){if(!ha(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Fi(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!$i.call(e,t))return e;var r=ga(e);return Array.isArray(r)?r.splice(t,1):delete r[t],r}function ma(e,t,r){if(!ha(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Fi(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,r)}if($i.call(e,t)&&r===e[t])return e;var n=ga(e);return n[t]=r,n}function Aa(e,t,r,n){n||(n=r,r=void 0);var i=ya(Fi(e),e,ca(t),0,r,n);return i===pi?r:i}function ya(e,t,r,n,i,o){var a=t===pi;if(n===r.length){var s=a?i:t,c=o(s);return c===s?t:c}if(!a&&!ha(t))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,n).map(da)+"]: "+t);var u=r[n],l=a?pi:pa(t,u,pi),h=ya(l===pi?e:Fi(l),l,r,n+1,i,o);return h===l?t:h===pi?va(t,u):ma(a?e?Za():{}:t,u,h)}function ba(e,t,r){return Aa(e,t,pi,(function(){return r}))}function _a(e,t){return ba(this,e,t)}function Ea(e,t){return Aa(e,t,(function(){return pi}))}function wa(e){return Ea(this,e)}function Ia(e,t,r,n){return Aa(e,[t],r,n)}function Sa(e,t,r){return 1===arguments.length?e(this):Ia(this,e,t,r)}function Ta(e,t,r){return Aa(this,e,t,r)}function Ca(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return ka(this,e)}function Ra(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return ka(this,t,e)}function ka(e,t,r){for(var n=[],i=0;i<t.length;i++){var o=Di(t[i]);0!==o.size&&n.push(o)}return 0===n.length?e:0!==e.toSeq().size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var t=r?function(t,n){Ia(e,n,pi,(function(e){return e===pi?t:r(e,t,n)}))}:function(t,r){e.set(r,t)},i=0;i<n.length;i++)n[i].forEach(t)})):e.constructor(n[0])}function Oa(e,t,r){return Na(e,t,function(e){function t(r,n,i){return ha(r)&&ha(n)&&(o=n,a=to(r),s=to(o),Oi(a)===Oi(s)&&Ri(a)===Ri(s))?Na(r,[n],t):e?e(r,n,i):n;var o,a,s}return t}(r))}function Na(e,t,r){if(!ha(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(Fi(e))return"function"==typeof r&&e.mergeWith?e.mergeWith.apply(e,[r].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var n=Array.isArray(e),i=e,o=n?Li:Di,a=n?function(t){i===e&&(i=ga(i)),i.push(t)}:function(t,n){var o=$i.call(i,n),a=o&&r?r(i[n],t,n):t;o&&a===i[n]||(i===e&&(i=ga(i)),i[n]=a)},s=0;s<t.length;s++)o(t[s]).forEach(a);return i}function xa(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Oa(this,e)}function Da(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Oa(this,t,e)}function La(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Aa(this,e,Za(),(function(e){return Na(e,t)}))}function Pa(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Aa(this,e,Za(),(function(e){return Oa(e,t)}))}function Ma(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Ba(){return this.__ownerID?this:this.__ensureOwner(new vi)}function ja(){return this.__ensureOwner()}function Ua(){return this.__altered}var Fa=function(e){function t(t){return null==t?Za():go(t)&&!Qi(t)?t:Za().withMutations((function(r){var n=e(t);sa(n.size),n.forEach((function(e,t){return r.set(t,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Za().withMutations((function(t){for(var r=0;r<e.length;r+=2){if(r+1>=e.length)throw new Error("Missing value for key: "+e[r]);t.set(e[r],e[r+1])}}))},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return $a(this,e,t)},t.prototype.remove=function(e){return $a(this,e,pi)},t.prototype.deleteAll=function(e){var t=xi(e);return 0===t.size?this:this.withMutations((function(e){t.forEach((function(t){return e.remove(t)}))}))},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Za()},t.prototype.sort=function(e){return Is(Yo(this,e))},t.prototype.sortBy=function(e,t){return Is(Yo(this,t,e))},t.prototype.map=function(e,t){var r=this;return this.withMutations((function(n){n.forEach((function(i,o){n.set(o,e.call(t,i,o,r))}))}))},t.prototype.__iterator=function(e,t){return new za(this,e,t)},t.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate((function(t){return n++,e(t[1],t[0],r)}),t),n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ja(this.size,this._root,e,this.__hash):0===this.size?Za():(this.__ownerID=e,this.__altered=!1,this)},t}(Di);Fa.isMap=go;var Ga=Fa.prototype;Ga[po]=!0,Ga.delete=Ga.remove,Ga.removeAll=Ga.deleteAll,Ga.setIn=_a,Ga.removeIn=Ga.deleteIn=wa,Ga.update=Sa,Ga.updateIn=Ta,Ga.merge=Ga.concat=Ca,Ga.mergeWith=Ra,Ga.mergeDeep=xa,Ga.mergeDeepWith=Da,Ga.mergeIn=La,Ga.mergeDeepIn=Pa,Ga.withMutations=Ma,Ga.wasAltered=Ua,Ga.asImmutable=ja,Ga["@@transducer/init"]=Ga.asMutable=Ba,Ga["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Ga["@@transducer/result"]=function(e){return e.asImmutable()};var Qa=function(e,t){this.ownerID=e,this.entries=t};Qa.prototype.get=function(e,t,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(Ao(r,i[o][0]))return i[o][1];return n},Qa.prototype.update=function(e,t,r,n,i,o,a){for(var s=i===pi,c=this.entries,u=0,l=c.length;u<l&&!Ao(n,c[u][0]);u++);var h=u<l;if(h?c[u][1]===i:s)return this;if(gi(a),(s||!h)&&gi(o),!s||1!==c.length){if(!h&&!s&&c.length>=os)return function(e,t,r,n){e||(e=new vi);for(var i=new Ha(e,Eo(r),[r,n]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}(e,c,n,i);var d=e&&e===this.ownerID,f=d?c:oa(c);return h?s?u===l-1?f.pop():f[u]=f.pop():f[u]=[n,i]:f.push([n,i]),d?(this.entries=f,this):new Qa(e,f)}};var qa=function(e,t,r){this.ownerID=e,this.bitmap=t,this.nodes=r};qa.prototype.get=function(e,t,r,n){void 0===t&&(t=Eo(r));var i=1<<((0===e?t:t>>>e)&fi),o=this.bitmap;return 0==(o&i)?n:this.nodes[ns(o&i-1)].get(e+5,t,r,n)},qa.prototype.update=function(e,t,r,n,i,o,a){void 0===r&&(r=Eo(n));var s=(0===t?r:r>>>t)&fi,c=1<<s,u=this.bitmap,l=0!=(u&c);if(!l&&i===pi)return this;var h=ns(u&c-1),d=this.nodes,f=l?d[h]:void 0,p=es(f,e,t+5,r,n,i,o,a);if(p===f)return this;if(!l&&p&&d.length>=as)return function(e,t,r,n,i){for(var o=0,a=new Array(di),s=0;0!==r;s++,r>>>=1)a[s]=1&r?t[o++]:void 0;return a[n]=i,new Va(e,o+1,a)}(e,d,u,s,p);if(l&&!p&&2===d.length&&ts(d[1^h]))return d[1^h];if(l&&p&&1===d.length&&ts(p))return p;var g=e&&e===this.ownerID,v=l?p?u:u^c:u|c,m=l?p?is(d,h,p,g):function(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var i=new Array(n),o=0,a=0;a<n;a++)a===t&&(o=1),i[a]=e[a+o];return i}(d,h,g):function(e,t,r,n){var i=e.length+1;if(n&&t+1===i)return e[t]=r,e;for(var o=new Array(i),a=0,s=0;s<i;s++)s===t?(o[s]=r,a=-1):o[s]=e[s+a];return o}(d,h,p,g);return g?(this.bitmap=v,this.nodes=m,this):new qa(e,v,m)};var Va=function(e,t,r){this.ownerID=e,this.count=t,this.nodes=r};Va.prototype.get=function(e,t,r,n){void 0===t&&(t=Eo(r));var i=(0===e?t:t>>>e)&fi,o=this.nodes[i];return o?o.get(e+5,t,r,n):n},Va.prototype.update=function(e,t,r,n,i,o,a){void 0===r&&(r=Eo(n));var s=(0===t?r:r>>>t)&fi,c=i===pi,u=this.nodes,l=u[s];if(c&&!l)return this;var h=es(l,e,t+5,r,n,i,o,a);if(h===l)return this;var d=this.count;if(l){if(!h&&--d<ss)return function(e,t,r,n){for(var i=0,o=0,a=new Array(r),s=0,c=1,u=t.length;s<u;s++,c<<=1){var l=t[s];void 0!==l&&s!==n&&(i|=c,a[o++]=l)}return new qa(e,i,a)}(e,u,d,s)}else d++;var f=e&&e===this.ownerID,p=is(u,s,h,f);return f?(this.count=d,this.nodes=p,this):new Va(e,d,p)};var Ka=function(e,t,r){this.ownerID=e,this.keyHash=t,this.entries=r};Ka.prototype.get=function(e,t,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(Ao(r,i[o][0]))return i[o][1];return n},Ka.prototype.update=function(e,t,r,n,i,o,a){void 0===r&&(r=Eo(n));var s=i===pi;if(r!==this.keyHash)return s?this:(gi(a),gi(o),rs(this,e,t,r,[n,i]));for(var c=this.entries,u=0,l=c.length;u<l&&!Ao(n,c[u][0]);u++);var h=u<l;if(h?c[u][1]===i:s)return this;if(gi(a),(s||!h)&&gi(o),s&&2===l)return new Ha(e,this.keyHash,c[1^u]);var d=e&&e===this.ownerID,f=d?c:oa(c);return h?s?u===l-1?f.pop():f[u]=f.pop():f[u]=[n,i]:f.push([n,i]),d?(this.entries=f,this):new Ka(e,this.keyHash,f)};var Ha=function(e,t,r){this.ownerID=e,this.keyHash=t,this.entry=r};Ha.prototype.get=function(e,t,r,n){return Ao(r,this.entry[0])?this.entry[1]:n},Ha.prototype.update=function(e,t,r,n,i,o,a){var s=i===pi,c=Ao(n,this.entry[0]);return(c?i===this.entry[1]:s)?this:(gi(a),s?void gi(o):c?e&&e===this.ownerID?(this.entry[1]=i,this):new Ha(e,this.keyHash,[n,i]):(gi(o),rs(this,e,t,Eo(n),[n,i])))},Qa.prototype.iterate=Ka.prototype.iterate=function(e,t){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(!1===e(r[t?i-n:n]))return!1},qa.prototype.iterate=Va.prototype.iterate=function(e,t){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[t?i-n:n];if(o&&!1===o.iterate(e,t))return!1}},Ha.prototype.iterate=function(e,t){return e(this.entry)};var Wa,za=function(e){function t(e,t,r){this._type=t,this._reverse=r,this._stack=e._root&&Xa(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var r=t.node,n=t.index++,i=void 0;if(r.entry){if(0===n)return Ya(e,r.entry)}else if(r.entries){if(n<=(i=r.entries.length-1))return Ya(e,r.entries[this._reverse?i-n:n])}else if(n<=(i=r.nodes.length-1)){var o=r.nodes[this._reverse?i-n:n];if(o){if(o.entry)return Ya(e,o.entry);t=this._stack=Xa(o,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(Hi);function Ya(e,t){return Wi(e,t[0],t[1])}function Xa(e,t){return{node:e,index:0,__prev:t}}function Ja(e,t,r,n){var i=Object.create(Ga);return i.size=e,i._root=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Za(){return Wa||(Wa=Ja(0))}function $a(e,t,r){var n,i;if(e._root){var o={value:!1},a={value:!1};if(n=es(e._root,e.__ownerID,0,void 0,t,r,o,a),!a.value)return e;i=e.size+(o.value?r===pi?-1:1:0)}else{if(r===pi)return e;i=1,n=new Qa(e.__ownerID,[[t,r]])}return e.__ownerID?(e.size=i,e._root=n,e.__hash=void 0,e.__altered=!0,e):n?Ja(i,n):Za()}function es(e,t,r,n,i,o,a,s){return e?e.update(t,r,n,i,o,a,s):o===pi?e:(gi(s),gi(a),new Ha(t,n,[i,o]))}function ts(e){return e.constructor===Ha||e.constructor===Ka}function rs(e,t,r,n,i){if(e.keyHash===n)return new Ka(t,n,[e.entry,i]);var o,a=(0===r?e.keyHash:e.keyHash>>>r)&fi,s=(0===r?n:n>>>r)&fi,c=a===s?[rs(e,t,r+5,n,i)]:(o=new Ha(t,n,i),a<s?[e,o]:[o,e]);return new qa(t,1<<a|1<<s,c)}function ns(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function is(e,t,r,n){var i=n?e:oa(e);return i[t]=r,i}var os=8,as=16,ss=8,cs="@@__IMMUTABLE_LIST__@@";function us(e){return Boolean(e&&e[cs])}var ls=function(e){function t(t){var r=ms();if(null==t)return r;if(us(t))return t;var n=e(t),i=n.size;return 0===i?r:(sa(i),i>0&&i<di?vs(0,i,5,null,new ds(n.toArray())):r.withMutations((function(e){e.setSize(i),n.forEach((function(t,r){return e.set(r,t)}))})))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=Ai(this,e))>=0&&e<this.size){var r=bs(this,e+=this._origin);return r&&r.array[e&fi]}return t},t.prototype.set=function(e,t){return function(e,t,r){if((t=Ai(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?_s(e,t).set(0,r):_s(e,0,t+1).set(t,r)}));t+=e._origin;var n=e._tail,i=e._root,o={value:!1};t>=Es(e._capacity)?n=As(n,e.__ownerID,0,t,r,o):i=As(i,e.__ownerID,e._level,t,r,o);if(!o.value)return e;if(e.__ownerID)return e._root=i,e._tail=n,e.__hash=void 0,e.__altered=!0,e;return vs(e._origin,e._capacity,e._level,i,n)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):ms()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(r){_s(r,0,t+e.length);for(var n=0;n<e.length;n++)r.set(t+n,e[n])}))},t.prototype.pop=function(){return _s(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){_s(t,-e.length);for(var r=0;r<e.length;r++)t.set(r,e[r])}))},t.prototype.shift=function(){return _s(this,1)},t.prototype.concat=function(){for(var t=arguments,r=[],n=0;n<arguments.length;n++){var i=t[n],o=e("string"!=typeof i&&Yi(i)?i:[i]);0!==o.size&&r.push(o)}return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations((function(e){r.forEach((function(t){return t.forEach((function(t){return e.push(t)}))}))})):this.constructor(r[0])},t.prototype.setSize=function(e){return _s(this,0,e)},t.prototype.map=function(e,t){var r=this;return this.withMutations((function(n){for(var i=0;i<r.size;i++)n.set(i,e.call(t,n.get(i),i,r))}))},t.prototype.slice=function(e,t){var r=this.size;return bi(e,t,r)?this:_s(this,_i(e,r),Ei(t,r))},t.prototype.__iterator=function(e,t){var r=t?this.size:0,n=gs(this,t);return new Hi((function(){var i=n();return i===ps?{value:void 0,done:!0}:Wi(e,t?--r:r++,i)}))},t.prototype.__iterate=function(e,t){for(var r,n=t?this.size:0,i=gs(this,t);(r=i())!==ps&&!1!==e(r,t?--n:n++,this););return n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?vs(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?ms():(this.__ownerID=e,this.__altered=!1,this)},t}(Li);ls.isList=us;var hs=ls.prototype;hs[cs]=!0,hs.delete=hs.remove,hs.merge=hs.concat,hs.setIn=_a,hs.deleteIn=hs.removeIn=wa,hs.update=Sa,hs.updateIn=Ta,hs.mergeIn=La,hs.mergeDeepIn=Pa,hs.withMutations=Ma,hs.wasAltered=Ua,hs.asImmutable=ja,hs["@@transducer/init"]=hs.asMutable=Ba,hs["@@transducer/step"]=function(e,t){return e.push(t)},hs["@@transducer/result"]=function(e){return e.asImmutable()};var ds=function(e,t){this.array=e,this.ownerID=t};ds.prototype.removeBefore=function(e,t,r){if(r===t?1<<t:0===this.array.length)return this;var n=r>>>t&fi;if(n>=this.array.length)return new ds([],e);var i,o=0===n;if(t>0){var a=this.array[n];if((i=a&&a.removeBefore(e,t-5,r))===a&&o)return this}if(o&&!i)return this;var s=ys(this,e);if(!o)for(var c=0;c<n;c++)s.array[c]=void 0;return i&&(s.array[n]=i),s},ds.prototype.removeAfter=function(e,t,r){if(r===(t?1<<t:0)||0===this.array.length)return this;var n,i=r-1>>>t&fi;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((n=o&&o.removeAfter(e,t-5,r))===o&&i===this.array.length-1)return this}var a=ys(this,e);return a.array.splice(i+1),n&&(a.array[i]=n),a};var fs,ps={};function gs(e,t){var r=e._origin,n=e._capacity,i=Es(n),o=e._tail;return a(e._root,e._level,0);function a(e,s,c){return 0===s?function(e,a){var s=a===i?o&&o.array:e&&e.array,c=a>r?0:r-a,u=n-a;u>di&&(u=di);return function(){if(c===u)return ps;var e=t?--u:c++;return s&&s[e]}}(e,c):function(e,i,o){var s,c=e&&e.array,u=o>r?0:r-o>>i,l=1+(n-o>>i);l>di&&(l=di);return function(){for(;;){if(s){var e=s();if(e!==ps)return e;s=null}if(u===l)return ps;var r=t?--l:u++;s=a(c&&c[r],i-5,o+(r<<i))}}}(e,s,c)}}function vs(e,t,r,n,i,o,a){var s=Object.create(hs);return s.size=t-e,s._origin=e,s._capacity=t,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function ms(){return fs||(fs=vs(0,0,5))}function As(e,t,r,n,i,o){var a,s=n>>>r&fi,c=e&&s<e.array.length;if(!c&&void 0===i)return e;if(r>0){var u=e&&e.array[s],l=As(u,t,r-5,n,i,o);return l===u?e:((a=ys(e,t)).array[s]=l,a)}return c&&e.array[s]===i?e:(o&&gi(o),a=ys(e,t),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function ys(e,t){return t&&e&&t===e.ownerID?e:new ds(e?e.array.slice():[],t)}function bs(e,t){if(t>=Es(e._capacity))return e._tail;if(t<1<<e._level+5){for(var r=e._root,n=e._level;r&&n>0;)r=r.array[t>>>n&fi],n-=5;return r}}function _s(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new vi,i=e._origin,o=e._capacity,a=i+t,s=void 0===r?o:r<0?o+r:i+r;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var c=e._level,u=e._root,l=0;a+l<0;)u=new ds(u&&u.array.length?[void 0,u]:[],n),l+=1<<(c+=5);l&&(a+=l,i+=l,s+=l,o+=l);for(var h=Es(o),d=Es(s);d>=1<<c+5;)u=new ds(u&&u.array.length?[u]:[],n),c+=5;var f=e._tail,p=d<h?bs(e,s-1):d>h?new ds([],n):f;if(f&&d>h&&a<o&&f.array.length){for(var g=u=ys(u,n),v=c;v>5;v-=5){var m=h>>>v&fi;g=g.array[m]=ys(g.array[m],n)}g.array[h>>>5&fi]=f}if(s<o&&(p=p&&p.removeAfter(n,0,s)),a>=d)a-=d,s-=d,c=5,u=null,p=p&&p.removeBefore(n,0,a);else if(a>i||d<h){for(l=0;u;){var A=a>>>c&fi;if(A!==d>>>c&fi)break;A&&(l+=(1<<c)*A),c-=5,u=u.array[A]}u&&a>i&&(u=u.removeBefore(n,c,a-l)),u&&d<h&&(u=u.removeAfter(n,c,d-l)),l&&(a-=l,s-=l)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=c,e._root=u,e._tail=p,e.__hash=void 0,e.__altered=!0,e):vs(a,s,c,u,p)}function Es(e){return e<di?0:e-1>>>5<<5}var ws,Is=function(e){function t(e){return null==e?Ts():vo(e)?e:Ts().withMutations((function(t){var r=Di(e);sa(r.size),r.forEach((function(e,r){return t.set(r,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var r=this._map.get(e);return void 0!==r?this._list.get(r)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Ts()},t.prototype.set=function(e,t){return Cs(this,e,t)},t.prototype.remove=function(e){return Cs(this,e,pi)},t.prototype.__iterate=function(e,t){var r=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],r)}),t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),r=this._list.__ensureOwner(e);return e?Ss(t,r,e,this.__hash):0===this.size?Ts():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=r,this)},t}(Fa);function Ss(e,t,r,n){var i=Object.create(Is.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ts(){return ws||(ws=Ss(Za(),ms()))}function Cs(e,t,r){var n,i,o=e._map,a=e._list,s=o.get(t),c=void 0!==s;if(r===pi){if(!c)return e;a.size>=di&&a.size>=2*o.size?(n=(i=a.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(n.__ownerID=i.__ownerID=e.__ownerID)):(n=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(c){if(r===a.get(s)[1])return e;n=o,i=a.set(s,[t,r])}else n=o.set(t,a.size),i=a.set(a.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=i,e.__hash=void 0,e.__altered=!0,e):Ss(n,i)}Is.isOrderedMap=vo,Is.prototype[Gi]=!0,Is.prototype.delete=Is.prototype.remove;var Rs="@@__IMMUTABLE_STACK__@@";function ks(e){return Boolean(e&&e[Rs])}var Os=function(e){function t(e){return null==e?Ls():ks(e)?e:Ls().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var r=this._head;for(e=Ai(this,e);r&&e--;)r=r.next;return r?r.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:e[n],next:r};return this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):Ds(t,r)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&ks(t))return t;sa(t.size);var r=this.size,n=this._head;return t.__iterate((function(e){r++,n={value:e,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Ds(r,n)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ls()},t.prototype.slice=function(t,r){if(bi(t,r,this.size))return this;var n=_i(t,this.size);if(Ei(r,this.size)!==this.size)return e.prototype.slice.call(this,t,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Ds(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ds(this.size,this._head,e,this.__hash):0===this.size?Ls():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var r=this;if(t)return new oo(this.toArray()).__iterate((function(t,n){return e(t,n,r)}),t);for(var n=0,i=this._head;i&&!1!==e(i.value,n++,this);)i=i.next;return n},t.prototype.__iterator=function(e,t){if(t)return new oo(this.toArray()).__iterator(e,t);var r=0,n=this._head;return new Hi((function(){if(n){var t=n.value;return n=n.next,Wi(e,r++,t)}return{value:void 0,done:!0}}))},t}(Li);Os.isStack=ks;var Ns,xs=Os.prototype;function Ds(e,t,r,n){var i=Object.create(xs);return i.size=e,i._head=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ls(){return Ns||(Ns=Ds(0))}xs[Rs]=!0,xs.shift=xs.pop,xs.unshift=xs.push,xs.unshiftAll=xs.pushAll,xs.withMutations=Ma,xs.wasAltered=Ua,xs.asImmutable=ja,xs["@@transducer/init"]=xs.asMutable=Ba,xs["@@transducer/step"]=function(e,t){return e.unshift(t)},xs["@@transducer/result"]=function(e){return e.asImmutable()};var Ps="@@__IMMUTABLE_SET__@@";function Ms(e){return Boolean(e&&e[Ps])}function Bs(e){return Ms(e)&&Qi(e)}function js(e,t){if(e===t)return!0;if(!Ti(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||Ri(e)!==Ri(t)||Oi(e)!==Oi(t)||Qi(e)!==Qi(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!Ni(e);if(Qi(e)){var n=e.entries();return t.every((function(e,t){var i=n.next().value;return i&&Ao(i[1],e)&&(r||Ao(i[0],t))}))&&n.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var a=!0,s=t.__iterate((function(t,n){if(r?!e.has(t):i?!Ao(t,e.get(n,pi)):!Ao(e.get(n,pi),t))return a=!1,!1}));return a&&e.size===s}function Us(e,t){var r=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}function Fs(e){if(!e||"object"!=typeof e)return e;if(!Ti(e)){if(!ha(e))return e;e=to(e)}if(Ri(e)){var t={};return e.__iterate((function(e,r){t[r]=Fs(e)})),t}var r=[];return e.__iterate((function(e){r.push(Fs(e))})),r}var Gs=function(e){function t(t){return null==t?Hs():Ms(t)&&!Qi(t)?t:Hs().withMutations((function(r){var n=e(t);sa(n.size),n.forEach((function(e){return r.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(Di(e).keySeq())},t.intersect=function(e){return(e=xi(e).toArray()).length?qs.intersect.apply(t(e.pop()),e):Hs()},t.union=function(e){return(e=xi(e).toArray()).length?qs.union.apply(t(e.pop()),e):Hs()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Vs(this,this._map.set(e,e))},t.prototype.remove=function(e){return Vs(this,this._map.remove(e))},t.prototype.clear=function(){return Vs(this,this._map.clear())},t.prototype.map=function(e,t){var r=this,n=!1,i=Vs(this,this._map.mapEntries((function(i){var o=i[1],a=e.call(t,o,o,r);return a!==o&&(n=!0),[a,a]}),t));return n?i:this},t.prototype.union=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(r){for(var n=0;n<t.length;n++)e(t[n]).forEach((function(e){return r.add(e)}))})):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var n=[];return this.forEach((function(e){t.every((function(t){return t.includes(e)}))||n.push(e)})),this.withMutations((function(e){n.forEach((function(t){e.remove(t)}))}))},t.prototype.subtract=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var n=[];return this.forEach((function(e){t.some((function(t){return t.includes(e)}))&&n.push(e)})),this.withMutations((function(e){n.forEach((function(t){e.remove(t)}))}))},t.prototype.sort=function(e){return hc(Yo(this,e))},t.prototype.sortBy=function(e,t){return hc(Yo(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var r=this;return this._map.__iterate((function(t){return e(t,t,r)}),t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(Pi);Gs.isSet=Ms;var Qs,qs=Gs.prototype;function Vs(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Ks(e,t){var r=Object.create(qs);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function Hs(){return Qs||(Qs=Ks(Za()))}qs[Ps]=!0,qs.delete=qs.remove,qs.merge=qs.concat=qs.union,qs.withMutations=Ma,qs.asImmutable=ja,qs["@@transducer/init"]=qs.asMutable=Ba,qs["@@transducer/step"]=function(e,t){return e.add(t)},qs["@@transducer/result"]=function(e){return e.asImmutable()},qs.__empty=Hs,qs.__make=Ks;var Ws,zs=function(e){function t(e,r,n){if(!(this instanceof t))return new t(e,r,n);if(aa(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===r&&(r=1/0),n=void 0===n?1:Math.abs(n),r<e&&(n=-n),this._start=e,this._end=r,this._step=n,this.size=Math.max(0,Math.ceil((r-e)/n-1)+1),0===this.size){if(Ws)return Ws;Ws=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+Ai(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,r){return bi(e,r,this.size)?this:(e=_i(e,this.size),(r=Ei(r,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(r,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var r=t/this._step;if(r>=0&&r<this.size)return r}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var r=this.size,n=this._step,i=t?this._start+(r-1)*n:this._start,o=0;o!==r&&!1!==e(i,t?r-++o:o++,this);)i+=t?-n:n;return o},t.prototype.__iterator=function(e,t){var r=this.size,n=this._step,i=t?this._start+(r-1)*n:this._start,o=0;return new Hi((function(){if(o===r)return{value:void 0,done:!0};var a=i;return i+=t?-n:n,Wi(e,t?r-++o:o++,a)}))},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:js(this,e)},t}(no);function Ys(e,t,r){for(var n=ca(t),i=0;i!==n.length;)if((e=pa(e,n[i++],pi))===pi)return r;return e}function Xs(e,t){return Ys(this,e,t)}function Js(e,t){return Ys(e,t,pi)!==pi}function Zs(){sa(this.size);var e={};return this.__iterate((function(t,r){e[r]=t})),e}xi.isIterable=Ti,xi.isKeyed=Ri,xi.isIndexed=Oi,xi.isAssociative=Ni,xi.isOrdered=Qi,xi.Iterator=Hi,Us(xi,{toArray:function(){sa(this.size);var e=new Array(this.size||0),t=Ri(this),r=0;return this.__iterate((function(n,i){e[r++]=t?[i,n]:n})),e},toIndexedSeq:function(){return new jo(this)},toJS:function(){return Fs(this)},toKeyedSeq:function(){return new Bo(this,!0)},toMap:function(){return Fa(this.toKeyedSeq())},toObject:Zs,toOrderedMap:function(){return Is(this.toKeyedSeq())},toOrderedSet:function(){return hc(Ri(this)?this.valueSeq():this)},toSet:function(){return Gs(Ri(this)?this.valueSeq():this)},toSetSeq:function(){return new Uo(this)},toSeq:function(){return Oi(this)?this.toIndexedSeq():Ri(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Os(Ri(this)?this.valueSeq():this)},toList:function(){return ls(Ri(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return $o(this,Wo(this,e))},includes:function(e){return this.some((function(t){return Ao(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){sa(this.size);var r=!0;return this.__iterate((function(n,i,o){if(!e.call(t,n,i,o))return r=!1,!1})),r},filter:function(e,t){return $o(this,Vo(this,e,t,!0))},find:function(e,t,r){var n=this.findEntry(e,t);return n?n[1]:r},forEach:function(e,t){return sa(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){sa(this.size),e=void 0!==e?""+e:",";var t="",r=!0;return this.__iterate((function(n){r?r=!1:t+=e,t+=null!=n?n.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return $o(this,Qo(this,e,t))},reduce:function(e,t,r){return nc(this,e,t,r,arguments.length<2,!1)},reduceRight:function(e,t,r){return nc(this,e,t,r,arguments.length<2,!0)},reverse:function(){return $o(this,qo(this,!0))},slice:function(e,t){return $o(this,Ko(this,e,t,!0))},some:function(e,t){return!this.every(ac(e),t)},sort:function(e){return $o(this,Yo(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return mi(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,r){var n=Fa().asMutable();return e.__iterate((function(i,o){n.update(t.call(r,i,o,e),0,(function(e){return e+1}))})),n.asImmutable()}(this,e,t)},equals:function(e){return js(this,e)},entrySeq:function(){var e=this;if(e._cache)return new oo(e._cache);var t=e.toSeq().map(oc).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(ac(e),t)},findEntry:function(e,t,r){var n=r;return this.__iterate((function(r,i,o){if(e.call(t,r,i,o))return n=[i,r],!1})),n},findKey:function(e,t){var r=this.findEntry(e,t);return r&&r[0]},findLast:function(e,t,r){return this.toKeyedSeq().reverse().find(e,t,r)},findLastEntry:function(e,t,r){return this.toKeyedSeq().reverse().findEntry(e,t,r)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(yi,null,e)},flatMap:function(e,t){return $o(this,function(e,t,r){var n=ta(e);return e.toSeq().map((function(i,o){return n(t.call(r,i,o,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return $o(this,zo(this,e,!0))},fromEntrySeq:function(){return new Fo(this)},get:function(e,t){return this.find((function(t,r){return Ao(r,e)}),void 0,t)},getIn:Xs,groupBy:function(e,t){return function(e,t,r){var n=Ri(e),i=(Qi(e)?Is():Fa()).asMutable();e.__iterate((function(o,a){i.update(t.call(r,o,a,e),(function(e){return(e=e||[]).push(n?[a,o]:o),e}))}));var o=ta(e);return i.map((function(t){return $o(e,o(t))})).asImmutable()}(this,e,t)},has:function(e){return this.get(e,pi)!==pi},hasIn:function(e){return Js(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:xi(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:xi(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return Ao(t,e)}))},keySeq:function(){return this.toSeq().map(ic).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Xo(this,e)},maxBy:function(e,t){return Xo(this,t,e)},min:function(e){return Xo(this,e?sc(e):uc)},minBy:function(e,t){return Xo(this,t?sc(t):uc,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return $o(this,Ho(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(ac(e),t)},sortBy:function(e,t){return $o(this,Yo(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return $o(this,function(e,t,r){var n=ra(e);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var a=0;return e.__iterate((function(e,i,s){return t.call(r,e,i,s)&&++a&&n(e,i,o)})),a},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var a=e.__iterator(2,i),s=!0;return new Hi((function(){if(!s)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var i=e.value,c=i[0],u=i[1];return t.call(r,u,c,o)?2===n?e:Wi(n,c,u,e):(s=!1,{value:void 0,done:!0})}))},n}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(ac(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=Qi(e),r=Ri(e),n=t?1:0;return function(e,t){return t=yo(t,3432918353),t=yo(t<<15|t>>>-15,461845907),t=yo(t<<13|t>>>-13,5),t=yo((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=bo((t=yo(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(r?t?function(e,t){n=31*n+lc(Eo(e),Eo(t))|0}:function(e,t){n=n+lc(Eo(e),Eo(t))|0}:t?function(e){n=31*n+Eo(e)|0}:function(e){n=n+Eo(e)|0}),n)}(this))}});var $s=xi.prototype;$s[Si]=!0,$s[Ki]=$s.values,$s.toJSON=$s.toArray,$s.__toStringMapper=da,$s.inspect=$s.toSource=function(){return this.toString()},$s.chain=$s.flatMap,$s.contains=$s.includes,Us(Di,{flip:function(){return $o(this,Go(this))},mapEntries:function(e,t){var r=this,n=0;return $o(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(e,t){var r=this;return $o(this,this.toSeq().flip().map((function(n,i){return e.call(t,n,i,r)})).flip())}});var ec=Di.prototype;ec[Ci]=!0,ec[Ki]=$s.entries,ec.toJSON=Zs,ec.__toStringMapper=function(e,t){return da(t)+": "+da(e)},Us(Li,{toKeyedSeq:function(){return new Bo(this,!1)},filter:function(e,t){return $o(this,Vo(this,e,t,!1))},findIndex:function(e,t){var r=this.findEntry(e,t);return r?r[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return $o(this,qo(this,!1))},slice:function(e,t){return $o(this,Ko(this,e,t,!1))},splice:function(e,t){var r=arguments.length;if(t=Math.max(t||0,0),0===r||2===r&&!t)return this;e=_i(e,e<0?this.count():this.size);var n=this.slice(0,e);return $o(this,1===r?n:n.concat(oa(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var r=this.findLastEntry(e,t);return r?r[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return $o(this,zo(this,e,!1))},get:function(e,t){return(e=Ai(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,r){return r===e}),void 0,t)},has:function(e){return(e=Ai(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return $o(this,function(e,t){var r=ra(e);return r.size=e.size&&2*e.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return e.__iterate((function(e){return(!o||!1!==r(t,o++,i))&&!1!==r(e,o++,i)}),n),o},r.__iteratorUncached=function(r,n){var i,o=e.__iterator(1,n),a=0;return new Hi((function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?Wi(r,a++,t):Wi(r,a++,i.value,i)}))},r}(this,e))},interleave:function(){var e=[this].concat(oa(arguments)),t=Zo(this.toSeq(),no.of,e),r=t.flatten(!0);return t.size&&(r.size=t.size*e.length),$o(this,r)},keySeq:function(){return zs(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return $o(this,Ho(this,e,t,!1))},zip:function(){var e=[this].concat(oa(arguments));return $o(this,Zo(this,cc,e))},zipAll:function(){var e=[this].concat(oa(arguments));return $o(this,Zo(this,cc,e,!0))},zipWith:function(e){var t=oa(arguments);return t[0]=this,$o(this,Zo(this,e,t))}});var tc=Li.prototype;tc[ki]=!0,tc[Gi]=!0,Us(Pi,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}});var rc=Pi.prototype;function nc(e,t,r,n,i,o){return sa(e.size),e.__iterate((function(e,o,a){i?(i=!1,r=e):r=t.call(n,r,e,o,a)}),o),r}function ic(e,t){return t}function oc(e,t){return[t,e]}function ac(e){return function(){return!e.apply(this,arguments)}}function sc(e){return function(){return-e.apply(this,arguments)}}function cc(){return oa(arguments)}function uc(e,t){return e<t?1:e>t?-1:0}function lc(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}rc.has=$s.includes,rc.contains=rc.includes,rc.keys=rc.values,Us(ro,ec),Us(no,tc),Us(io,rc);var hc=function(e){function t(e){return null==e?gc():Bs(e)?e:gc().withMutations((function(t){var r=Pi(e);sa(r.size),r.forEach((function(e){return t.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(Di(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Gs);hc.isOrderedSet=Bs;var dc,fc=hc.prototype;function pc(e,t){var r=Object.create(fc);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function gc(){return dc||(dc=pc(Ts()))}fc[Gi]=!0,fc.zip=tc.zip,fc.zipWith=tc.zipWith,fc.zipAll=tc.zipAll,fc.__empty=gc,fc.__make=pc;var vc=function(e,t){var r;!function(e){if(Ui(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(Fi(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var n=function(o){var a=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(e),c=i._indices={};i._name=t,i._keys=s,i._defaultValues=e;for(var u=0;u<s.length;u++){var l=s[u];c[l]=u,i[l]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+yc(this)+' with property "'+l+'" since that property name is part of the Record API.'):_c(i,l)}}return this.__ownerID=void 0,this._values=ls().withMutations((function(e){e.setSize(a._keys.length),Di(o).forEach((function(t,r){e.set(a._indices[r],t===a._defaultValues[r]?void 0:t)}))})),this},i=n.prototype=Object.create(mc);return i.constructor=n,t&&(n.displayName=t),n};vc.prototype.toString=function(){for(var e,t=yc(this)+" { ",r=this._keys,n=0,i=r.length;n!==i;n++)t+=(n?", ":"")+(e=r[n])+": "+da(this.get(e));return t+" }"},vc.prototype.equals=function(e){return this===e||e&&bc(this).equals(bc(e))},vc.prototype.hashCode=function(){return bc(this).hashCode()},vc.prototype.has=function(e){return this._indices.hasOwnProperty(e)},vc.prototype.get=function(e,t){if(!this.has(e))return t;var r=this._indices[e],n=this._values.get(r);return void 0===n?this._defaultValues[e]:n},vc.prototype.set=function(e,t){if(this.has(e)){var r=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(r!==this._values&&!this.__ownerID)return Ac(this,r)}return this},vc.prototype.remove=function(e){return this.set(e)},vc.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Ac(this,e)},vc.prototype.wasAltered=function(){return this._values.wasAltered()},vc.prototype.toSeq=function(){return bc(this)},vc.prototype.toJS=function(){return Fs(this)},vc.prototype.entries=function(){return this.__iterator(2)},vc.prototype.__iterator=function(e,t){return bc(this).__iterator(e,t)},vc.prototype.__iterate=function(e,t){return bc(this).__iterate(e,t)},vc.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?Ac(this,t,e):(this.__ownerID=e,this._values=t,this)},vc.isRecord=Ui,vc.getDescriptiveName=yc;var mc=vc.prototype;function Ac(e,t,r){var n=Object.create(Object.getPrototypeOf(e));return n._values=t,n.__ownerID=r,n}function yc(e){return e.constructor.displayName||e.constructor.name||"Record"}function bc(e){return lo(e._keys.map((function(t){return[t,e.get(t)]})))}function _c(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){aa(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}mc[ji]=!0,mc.delete=mc.remove,mc.deleteIn=mc.removeIn=wa,mc.getIn=Xs,mc.hasIn=$s.hasIn,mc.merge=Ca,mc.mergeWith=Ra,mc.mergeIn=La,mc.mergeDeep=xa,mc.mergeDeepWith=Da,mc.mergeDeepIn=Pa,mc.setIn=_a,mc.update=Sa,mc.updateIn=Ta,mc.withMutations=Ma,mc.asMutable=Ba,mc.asImmutable=ja,mc[Ki]=mc.entries,mc.toJSON=mc.toObject=$s.toObject,mc.inspect=mc.toSource=function(){return this.toString()};var Ec,wc=function(e){function t(e,r){if(!(this instanceof t))return new t(e,r);if(this._value=e,this.size=void 0===r?1/0:Math.max(0,r),0===this.size){if(Ec)return Ec;Ec=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return Ao(this._value,e)},t.prototype.slice=function(e,r){var n=this.size;return bi(e,r,n)?this:new t(this._value,Ei(r,n)-_i(e,n))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return Ao(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return Ao(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var r=this.size,n=0;n!==r&&!1!==e(this._value,t?r-++n:n++,this););return n},t.prototype.__iterator=function(e,t){var r=this,n=this.size,i=0;return new Hi((function(){return i===n?{value:void 0,done:!0}:Wi(e,t?n-++i:i++,r._value)}))},t.prototype.equals=function(e){return e instanceof t?Ao(this._value,e._value):js(e)},t}(no);function Ic(e,t,r,n,i,o){if("string"!=typeof r&&!Fi(r)&&(eo(r)||Yi(r)||la(r))){if(~e.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");e.push(r),i&&""!==n&&i.push(n);var a=t.call(o,n,to(r).map((function(n,o){return Ic(e,t,n,o,i,r)})),i&&i.slice());return e.pop(),i&&i.pop(),a}return r}function Sc(e,t){return Oi(t)?t.toList():Ri(t)?t.toMap():t.toSet()}var Tc={version:"4.0.0",Collection:xi,Iterable:xi,Seq:to,Map:Fa,OrderedMap:Is,List:ls,Stack:Os,Set:Gs,OrderedSet:hc,Record:vc,Range:zs,Repeat:wc,is:Ao,fromJS:function(e,t){return Ic([],t||Sc,e,"",t&&t.length>2?[]:void 0,{"":e})},hash:Eo,isImmutable:Fi,isCollection:Ti,isKeyed:Ri,isIndexed:Oi,isAssociative:Ni,isOrdered:Qi,isValueObject:mo,isPlainObject:la,isSeq:Bi,isList:us,isMap:go,isOrderedMap:vo,isStack:ks,isSet:Ms,isOrderedSet:Bs,isRecord:Ui,get:pa,getIn:Ys,has:fa,hasIn:Js,merge:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Na(e,t)},mergeDeep:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Oa(e,t)},mergeWith:function(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Na(t,r,e)},mergeDeepWith:function(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Oa(t,r,e)},remove:va,removeIn:Ea,set:ma,setIn:ba,update:Ia,updateIn:Aa};const Cc=Tc;function Rc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function kc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rc(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Oc,Nc,xc,Dc,Lc=function(){function e(t){var r=this;y(this,e),this.sequence=void 0,this.users=new Map,this.streams=new Map,this.roomProperties=Cc.Map(),this.room=void 0;var n=t.seq,i=t.users,o=t.roomProperties,a=t.roomInfo;this.sequence=n,i.forEach((function(e){var t=Pc.fromData(e),n=e.streams;(void 0===n?[]:n).forEach((function(e){r.streams.set(e.streamUuid,Mc.fromData(kc(kc({},e),{},{fromUser:{userName:t.userName,role:t.userRole,userUuid:t.userUuid}})))})),r.users.set(e.userUuid,t)})),this.roomProperties=Cc.Map(o),this.room=Bc.fromData(a)}return _(e,null,[{key:"fromData",value:function(t){return new e(t)}}]),e}(),Pc=function(){function e(t){y(this,e),this.userUuid=void 0,this.userName=void 0,this.userRole=void 0,this.userProperties=void 0,this.userName=t.userName,this.userRole=t.role,this.userUuid=t.userUuid,this.userProperties=Cc.Map(t.userProperties)}return _(e,[{key:"setUserProperties",value:function(e){this.userProperties=Cc.Map(e)}},{key:"toString",value:function(){return this.userUuid}}],[{key:"fromData",value:function(t){return new e(t)}}]),e}(),Mc=function(){function e(t){y(this,e),this.streamUuid=void 0,this.streamName=void 0,this.fromUser=void 0,this.videoSourceType=void 0,this.audioSourceType=void 0,this.videoState=void 0,this.audioState=void 0,this.videoSourceState=void 0,this.audioSourceState=void 0,this.playUrl=void 0,this.flvPlayUrl=void 0,this.rtmpPlayUrl=void 0,this.previous=void 0,this.streamUuid=t.streamUuid,this.streamName=t.streamName,this.fromUser=t.fromUser,this.videoSourceType=t.videoSourceType,this.audioSourceType=t.audioSourceType,this.videoState=t.videoState,this.audioState=t.audioState,this.videoSourceState=t.videoSourceState,this.audioSourceState=t.audioSourceState,this.playUrl=t.playUrl,this.flvPlayUrl=t.flvPlayUrl,this.rtmpPlayUrl=t.rtmpPlayUrl,["streamUuid","fromUser","videoSourceType","audioSourceType","videoState","audioState","videoSourceState","audioSourceState"].forEach((function(e){void 0===t[e]&&xn.warn("stream key ".concat(e," is unexpectedly undefined"))})),this.fromUser||(xn.error("[stream-data-struct] stream must have owner info"),Xn.shared.handleThrowableError(Qn.RTE_ERR_INVALID_DATA_STRUCT,new Error("invalid stream data")))}return _(e,[{key:"toString",value:function(){return this.streamUuid}}],[{key:"fromData",value:function(t){return new e(t)}}]),e}(),Bc=function(){function e(t){y(this,e),this.roomName=void 0,this.roomUuid=void 0,this.roomScenario=void 0,this.roomName=t.roomName,this.roomUuid=t.roomUuid,this.roomScenario=t.roomScenario}return _(e,null,[{key:"fromData",value:function(t){return new e(t)}}]),e}(),jc=function(){function e(t){y(this,e),this.fromUser=void 0,this.message=void 0,this.type=void 0,this.sendTime=void 0,this.sensitiveWords=void 0,this.messageId=void 0,this.ext=void 0,this.fromUser=t.fromUser,this.message=t.message,this.type=t.type,this.sendTime=t.sendTime,this.sensitiveWords=t.sensitiveWords,this.messageId=t.messageId||t.peerMessageId,this.ext=t.ext}return _(e,[{key:"toString",value:function(){return"".concat(this.fromUser.userName,": ").concat(this.message)}}],[{key:"fromData",value:function(t){return new e(t)}}]),e}(),Uc=__webpack_require__(9850),Fc=__webpack_require__.n(Uc),Gc=__webpack_require__(2579),Qc=__webpack_require__.n(Gc);function qc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Vc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qc(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Kc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Hc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hc(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,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,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Hc(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 Wc(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e[e.Chat=3]="Chat",e[e.RoomProperty=4]="RoomProperty",e[e.RoomProperties=5]="RoomProperties",e[e.UserInOut=20]="UserInOut",e[e.UserInfo=21]="UserInfo",e[e.UserProperty=22]="UserProperty",e[e.UserProperties=23]="UserProperties",e[e.UserSubscribeInOut=24]="UserSubscribeInOut",e[e.StreamInOut=40]="StreamInOut",e[e.StreamsInOut=41]="StreamsInOut",e[e.MessageExtension=99]="MessageExtension",e[e.BatchUserProperties=25]="BatchUserProperties"}(Nc||(Nc={})),function(e){e[e.PeerChat=1]="PeerChat"}(xc||(xc={})),function(e){e.SnapshotUpdated="snapshot-updated",e.ChatReceived="chat-received",e.UserAdded="user-added",e.UserUpdated="user-updated",e.UserRemoved="user-removed",e.RoomPropertyUpdated="room-property-updated",e.UserPropertyUpdated="user-property-updated",e.BatchUserPropertyUpdated="batch-user-property-updated",e.LocalStreamAdded="local-stream-added",e.LocalStreamUpdate="local-stream-update",e.LocalStreamRemove="local-stream-removed",e.RemoteStreamAdded="remote-stream-added",e.RemoteStreamUpdate="remote-stream-update",e.RemoteStreamRemove="remote-stream-removed",e.ChatUserMessage="user-chat-message",e.ChatRoomMessage="room-chat-message",e.NetworkStats="network-stats",e.LocalAudioVolume="local-audio-volume",e.AudioVolumes="audio-volumes",e.LocalVideoCameraListChanged="local-video-camera-list-changed",e.LocalAudioRecordingListChanged="local-audio-recording-list-changed",e.LocalAudioPlaybackListChanged="local-audio-playback-list-changed",e.LocalVideoTrackStateChanged="local-video-track-state-changed",e.LocalAudioTrackStateChanged="local-audio-track-state-changed",e.RtcConnectionStateChanged="rtc-connection-state-changed",e.RtmConnectionStateChanged="rtm-connection-state-changed",e.RteConnectionStateChanged="rte-connection-state-changed",e.TimeStampGapUpdate="timestamp-gap-update"}(Dc||(Dc={}));var zc,Yc=li.attach({proxyMethods:!1})(Oc=function(e){w(r,e);var t=Wc(r);function r(e,n){var i,o=n.sceneId,a=n.userUuid,s=n.streamUuid;return y(this,r),(i=t.call(this)).logger=void 0,i._dataStore=void 0,i._timestampGap=0,i.sceneId=void 0,i.userUuid=void 0,i.streamUuid=void 0,i.sceneId=o,i.userUuid=a,i.streamUuid=s,i._dataStore=e,i}return _(r,[{key:"handleSnapshot",value:function(e){this._dataStore.setUsers(e.users),this._dataStore.setStreams(e.streams),this._dataStore.setRoomProperties(e.roomProperties),this._dataStore.setRoomInfo(e.room),this.emit(Dc.SnapshotUpdated,e)}},{key:"handleMessage",value:function(e){switch(e.sequence.cmd){case Nc.Chat:this._handleChat(e);break;case Nc.RoomProperty:case Nc.RoomProperties:this._handleRoomProperties(e);break;case Nc.UserInOut:this._handleUserInOut(e);break;case Nc.UserInfo:this._handleUserInfo(e);break;case Nc.UserProperty:this._handleUserProperty(e);break;case Nc.UserProperties:this._handleUserProperties(e);break;case Nc.BatchUserProperties:this._handleBatchUserProperties(e);break;case Nc.UserSubscribeInOut:this._handleUserSubscribe(e);break;case Nc.StreamInOut:this._handleStreamInOut(e);break;case Nc.StreamsInOut:this._handleStreamsInOut(e);break;case Nc.MessageExtension:this._handleMessageExtension(e)}this._syncTsGapWithServerAndLocal(e)}},{key:"handlePeerMessage",value:function(e){if(e.cmd===xc.PeerChat)this._handlePeerChat(e)}},{key:"_handlePeerChat",value:function(e){var t=e.data,r=jc.fromData(t);this._dataStore.addMessage(r),this.emit(Dc.ChatUserMessage,r)}},{key:"_handleChat",value:function(e){var t=e.sequence.data,r=jc.fromData(t);this._dataStore.addMessage(r),this.emit(Dc.ChatReceived,r)}},{key:"_mergeProperties",value:function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r],o=i.split(".");if(0!==o.length){var a,s=o.filter((function(e){return e})),c=e,u=Kc(s);try{for(u.s();!(a=u.n()).done;){var l=a.value;c[l]=c[l]||{},c=c[l]}}catch(e){u.e(e)}finally{u.f()}var h=1===s.length?e:Qc()(e,hi(s).splice(0,s.length-1).join("."),{}),d=Fc()(t[i]);"deleted"===d?delete h[hi(s).pop()]:h[hi(s).pop()]=d}else this.logger.error("invalid key when batch set room properties ".concat(i))}return e}},{key:"_handleRoomProperties",value:function(e){var t=e.sequence.data,r=t.changeProperties,n=t.cause,i=t.operator;this._dataStore.setRoomProperties(this._mergeProperties(this._dataStore.roomProperties.toJS(),r));var o=Array.from(new Set(Object.keys(r).map((function(e){return e.split(".")[0]}))));this.emit(Dc.RoomPropertyUpdated,o,this._dataStore.roomProperties,i,n)}},{key:"_handleUserSubscribe",value:function(e){var t=this,r=e.sequence.data.users,n=[],i=[];r.forEach((function(e){var r=Pc.fromData(e);if(1===e.subscribe){t._dataStore.setUser(r.userUuid,r);var o=e.streams;(void 0===o?[]:o).forEach((function(e){var n=Mc.fromData(Vc(Vc({},e),{},{fromUser:{userUuid:r.userUuid,role:r.userRole,userName:r.userName}}));t._dataStore.setStream(n.streamUuid,n)})),n.push(r)}else 0===e.subscribe&&(t._dataStore.deleteStream(e.streamUuid),t._dataStore.deleteUser(e.userUuid),i.push(r))})),n.length>0&&this.emit(Dc.UserAdded,n),i.length>0&&this.emit(Dc.UserRemoved,i)}},{key:"_handleUserInOut",value:function(e){var t=this,r=e.sequence.data,n=r.offlineUsers,i=r.onlineUsers,o=n.map((function(e){var r=Pc.fromData(e);return t._dataStore.deleteStream(e.streamUuid),t._dataStore.deleteUser(e.userUuid),r})),a=i.map((function(e){var r=Pc.fromData(e);t._dataStore.setUser(r.userUuid,r);var n=e.streams;return(void 0===n?[]:n).forEach((function(e){var n=Mc.fromData(Vc(Vc({},e),{},{fromUser:{userUuid:r.userUuid,role:r.userRole,userName:r.userName}}));t._dataStore.setStream(n.streamUuid,n)})),r}));if(a.length>0&&this.emit(Dc.UserAdded,a),o.length>0){var s=n.length?n[0].type:void 0;this.emit(Dc.UserRemoved,o,s)}}},{key:"_handleUserInfo",value:function(e){var t=e.sequence.data,r=t.userUuid,n=t.userName,i=t.role,o=this._dataStore.findUser(r);if(!o)return this.logger.warn("user ".concat(r," not exists, update info failed"));o.userName=n,o.userRole=i,this.emit(Dc.UserUpdated,o)}},{key:"_handleUserProperty",value:function(e){throw"not_implemented"}},{key:"_handleUserProperties",value:function(e){var t=e.sequence.data,r=t.changeProperties,n=t.cause,i=t.fromUser,o=t.operator,a=i.userUuid,s=this._dataStore.findUser(a);if(!s)return this.logger.warn("user ".concat(a," not exists, update property failed"));s.setUserProperties(this._mergeProperties(s.userProperties.toJS(),r)),this.emit(Dc.UserPropertyUpdated,a,s.userProperties.toObject(),o,n)}},{key:"_handleBatchUserProperties",value:function(e){var t=this,r=e.sequence.data,n=r.users,i=r.operator,o=r.cause,a=n.reduce((function(e,r){var n=r.fromUser,i=r.operator,o=r.cause,a=r.changeProperties,s=n.userUuid,c=t._dataStore.findUser(s);if(c){c.setUserProperties(t._mergeProperties(c.userProperties.toJS(),a));var u={userUuid:s,userProperties:c.userProperties.toObject(),operator:i,cause:o};e.push(u)}else t.logger.warn("user ".concat(s," not exists, update property failed"));return e}),[]);if(!a.length)return this.logger.warn("no user properties have changed");this.emit(Dc.BatchUserPropertyUpdated,a,i,o)}},{key:"_processStreamEvent",value:function(e,t){var r=t.fromUser.userUuid===this.userUuid;if(3===e){var n=this._dataStore.findStream(t.streamUuid);return this._dataStore.deleteStream(t.streamUuid),t.previous=n,r?Dc.LocalStreamRemove:Dc.RemoteStreamRemove}if(2===e){var i=this._dataStore.findStream(t.streamUuid);return this._dataStore.setStream(t.streamUuid,t),t.previous=i,r?Dc.LocalStreamUpdate:Dc.RemoteStreamUpdate}return t.previous=void 0,this._dataStore.setStream(t.streamUuid,t),r?Dc.LocalStreamAdded:Dc.RemoteStreamAdded}},{key:"_handleStreamInOut",value:function(e){var t=e.sequence.data,r=t.action,n=t.fromUser,i=t.streamUuid,o=t.streamName,a=t.videoSourceType,s=t.audioSourceType,c=t.videoSourceState,u=t.audioSourceState,l=t.videoState,h=t.audioState,d=t.operator,f=t.playUrl,p=t.flvPlayUrl,g=t.rtmpPlayUrl,v=Mc.fromData({streamName:o,streamUuid:i,fromUser:n,videoSourceType:a,audioSourceType:s,videoState:l,audioState:h,videoSourceState:c,audioSourceState:u,playUrl:f,flvPlayUrl:p,rtmpPlayUrl:g}),m=this._processStreamEvent(r,v);this.emit(m,[v],d)}},{key:"_handleStreamsInOut",value:function(e){var t=this,r=e.sequence.data,n=r.streams,i=r.operator,o=(r.cause,new Map);n.forEach((function(e){var r=e.action,n=Mc.fromData(e),i=t._processStreamEvent(r,n);o.has(i)?o.set(i,o.get(i).concat([n])):o.set(i,[n])})),o.forEach((function(e,r){t.emit(r,e,i)}))}},{key:"_handleMessageExtension",value:function(e){}},{key:"_syncTsGapWithServerAndLocal",value:function(e){var t=e.sequence.timestamp-Date.now();this._timestampGap!==t&&Math.abs(this._timestampGap-t)>800&&(this._timestampGap=t,this.emit(Dc.TimeStampGapUpdate,this._timestampGap))}}]),r}(x))||Oc,Xc=li.attach({proxyMethods:!1})(zc=function(){function e(t,r){var n=this,i=r.scene,o=r.userUuid,a=r.streamUuid,s=r.channelObserver,c=r.rtm;y(this,e),this.logger=void 0,this._scene=void 0,this.userUuid=void 0,this.streamUuid=void 0,this._channelObserver=void 0,this._snapshot=void 0,this._queueTasks=[],this._currentTask=void 0,this._lastSeq=-1,this._requestingGap=!1,this._handleChannelMessage=void 0,this._handlePeerMessage=void 0,this.handle=void 0,this.runNextTask=function(){if(n._currentTask)n.logger.debug("Task Running");else{var e=n.dequeueTask();e?(n._currentTask=e,n.processTask(n._currentTask).then((function(){n._currentTask=void 0,n.notifyTaskQueueUpdate()})).catch((function(e){n.logger.error("message handle failed: ".concat(e)),n._currentTask=void 0,n.notifyTaskQueueUpdate()}))):n.logger.debug("message handle queue clear")}},this._scene=i,this.streamUuid=a,this.userUuid=o,this._handleChannelMessage=this.handleChannelMessage.bind(this),this._handlePeerMessage=this.handlePeerMessage.bind(this),this._channelObserver=s,this._channelObserver.on("ChannelMessage",this._handleChannelMessage),c.on("MessageFromPeer",this._handlePeerMessage),this.handle=new Yc(t,{sceneId:i.sceneId,userUuid:o,streamUuid:a})}var t,r;return _(e,[{key:"handlePeerMessage",value:function(e){var t=e.message;if("server"===e.peerId){this.logger.debug("peer message",t);try{var r=JSON.parse(t);this.handle.handlePeerMessage(r)}catch(e){this.logger.error("".concat(e.message," original: ").concat(t))}}}},{key:"handleChannelMessage",value:function(e){var t=e.message;if("server"===e.memberId){this.logger.debug("channel message sceneId:".concat(this._scene.sceneId),t.text);try{var r=JSON.parse(t.text);this.addTask({sequence:r})}catch(e){this.logger.error("".concat(e.message," original: ").concat(t.text))}}}},{key:"syncSnapshot",value:function(e){this._snapshot=e,this.handle.handleSnapshot(e),this._lastSeq=e.sequence,this.notifyTaskQueueUpdate()}},{key:"findSequenceGap",value:function(){if(0===this._queueTasks.length)return null;var e=this._queueTasks[0].sequence.sequence;return e-this._lastSeq>1?{seq:this._lastSeq+1,count:e-this._lastSeq-1,queueHeadSeq:e}:null}},{key:"sortTasks",value:function(){this._queueTasks=this._queueTasks.sort((function(e,t){return e.sequence.sequence-t.sequence.sequence}))}},{key:"addTask",value:function(e){this._queueTasks.push(e),this.sortTasks(),this.notifyTaskQueueUpdate()}},{key:"prependTasks",value:function(e){this._queueTasks=e.concat(this._queueTasks),this.sortTasks()}},{key:"notifyTaskQueueUpdate",value:function(){if(this._snapshot){var e=this.findSequenceGap();if(e){var t=e.seq,r=e.count,n=e.queueHeadSeq;return this.logger.warn("gap ".concat(this._lastSeq," - ").concat(n," exists, need fill ").concat(t," ").concat(r,". stop task processing before gap is resolved")),void this.syncSequenceUntilSuccess(t,r)}this.runNextTask()}else this.logger.warn("Snapshot not ready yet..wait")}},{key:"dequeueTask",value:function(){return 0===this._queueTasks.length?null:this._queueTasks.shift()}},{key:"processTask",value:(r=A(k().mark((function e(t){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._snapshot){e.next=2;break}return e.abrupt("return");case 2:if(!(t.sequence.sequence<=this._lastSeq)){e.next=5;break}return this.logger.debug("skip sequence ".concat(t.sequence.sequence,", snapshot ").concat(this._snapshot.sequence)),e.abrupt("return");case 5:return this.logger.debug("process sequence ".concat(t.sequence.sequence,", snapshot ").concat(this._snapshot.sequence,", last ").concat(this._lastSeq)),this.handle.handleMessage(t),this._lastSeq=t.sequence.sequence,e.next=10,new Promise((function(e){return setTimeout(e,0)}));case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"syncSequenceUntilSuccess",value:(t=A(k().mark((function e(t,r){var n,i,o,a,s;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._requestingGap){e.next=2;break}return e.abrupt("return");case 2:this._requestingGap=!0,n=!1,this.logger.info("begin resolve gap ".concat(t," - ").concat(r));case 5:return e.prev=5,e.next=8,this._scene.getApiService().syncSequence(this._scene.sceneId,t,r);case 8:i=e.sent,o=i.list,a=Math.min(r,o.length),s=o.slice(0,a).map((function(e){return{sequence:e}})),this.prependTasks(s),n=!0,this.logger.info("gap resolved, new ".concat(s.length," tasks prepended ")),this.notifyTaskQueueUpdate(),e.next=23;break;case 18:return e.prev=18,e.t0=e.catch(5),this.logger.error("syncSequence failed: ".concat(e.t0)),e.next=23,new Promise((function(e){return setTimeout(e,3e3)}));case 23:if(!n){e.next=5;break}case 24:this._requestingGap=!1;case 25:case"end":return e.stop()}}),e,this,[[5,18]])}))),function(e,r){return t.apply(this,arguments)})},{key:"reset",value:function(){this._channelObserver.off("ChannelMessage",this._handleChannelMessage)}}]),e}())||zc,Jc=__webpack_require__(2699),Zc=__webpack_require__(3136),$c=__webpack_require__.n(Zc),eu=__webpack_require__(2775),tu=__webpack_require__.n(eu);__webpack_require__(9601),__webpack_require__(9720);function ru(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function nu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ru(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ru(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var iu=function(){var e=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var i=new AbortController,o=setTimeout((function(){return i.abort()}),1e4);fetch(t,nu(nu({},r),{},{signal:i.signal})).then((function(t){return e(t)})).catch((function(e){n(e)})).finally((function(){clearTimeout(o)}))})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ou=function(){function e(){y(this,e),this.host=void 0,this.pathPrefix=void 0,this.headers=void 0}var t;return _(e,[{key:"fetch",value:(t=A(k().mark((function e(t){var r,n,i,o,a,s,c,u,l,h,d,f,p,g,m,A;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.method,n=t.data,i=t.full_url,o=t.path,a=t.query,s=void 0===a?{}:a,c=$n.shared.service,u=c.host,l=c.pathPrefix,h={method:r,headers:Object.assign({},$n.shared.service.headers,this.headers,t.headers)},d=Object.entries(s).filter((function(e){return!!v(e,2)[1]})).map((function(e){var t=v(e,2),r=t[0],n=t[1];return"".concat(r,"=").concat(n)})),f=d.length>0?"?".concat(d.join("&")):"",n&&(h.body=JSON.stringify(n)),e.prev=6,!i){e.next=13;break}return e.next=10,iu("".concat(i),h);case 10:p=e.sent,e.next=16;break;case 13:return e.next=15,iu("".concat(t.host||this.host||u).concat(t.pathPrefix||this.pathPrefix||l||"").concat(o).concat(f),h);case 15:p=e.sent;case 16:e.next=24;break;case 18:if(e.prev=18,e.t0=e.catch(6),20!==(g=e.t0).code){e.next=23;break}return e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_RESTFUL_NETWORK_TIMEOUT_ERR,g));case 23:return e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_RESTFUL_NETWORK_ERR,g));case 24:return e.next=26,p.json();case 26:if(m=e.sent,0==(A=+m.code)){e.next=34;break}if(!isNaN(A)){e.next=33;break}return e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_RESTFUL_SERVICE_ERR,new zn(Qn.RTE_ERR_RESTFUL_SERVICE_ERR,new Error(m.msg),{servCode:-1})));case 33:return e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_RESTFUL_SERVICE_ERR,new zn(Qn.RTE_ERR_RESTFUL_SERVICE_ERR,new Error(m.msg),{servCode:A})));case 34:return e.abrupt("return",m);case 35:case"end":return e.stop()}}),e,this,[[6,18]])}))),function(e){return t.apply(this,arguments)})}]),e}();function au(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var su,cu=function(e){w(s,e);var t,r,n,i,o,a=au(s);function s(){var e;y(this,s);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(e=a.call.apply(a,[this].concat(r))).tickerMap=new Map,e.timer=void 0,e}return _(s,[{key:"guardParams",value:function(){var e=$n.shared.appId,t=$n.shared.userId;if(e&&t)return!0;Xn.shared.handleThrowableError(Qn.RTE_ERR_MISSING_PARAMS,new Error("invalid params"))}},{key:"platform",get:function(){return $n.platform===Vn.Electron?"electron":"web"}},{key:"buildBaseParams",value:function(e,t,r,n,i,o,a){var s=(new Date).getTime(),c=tu()("src=".concat(t,"&ts=").concat(s)),u=i.result,l=i.errCode,h=i.httpCode,d=i.api;return{pts:[{m:r,ls:{ctype:e,platform:this.platform,version:Nf.getVersion(),appId:$n.shared.appId,event:o,category:a,result:void 0===u?void 0:"".concat(+u),errCode:l,httpCode:h,api:d},vs:n}],sign:c,src:t,ts:s}}},{key:"buildEventParams",value:function(e,t,r,n){return this.buildBaseParams("flexibleClass","rte","event",r,n,e,t)}},{key:"buildHBParams",value:function(){return this.buildBaseParams("flexibleClass","rte","online_user",{count:1},{})}},{key:"reportHB",value:(o=A(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.guardParams()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.fetch({path:"/v1/report",method:"POST",data:this.buildHBParams()});case 4:return t=e.sent,e.abrupt("return",t.data);case 6:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"report",value:(i=A(k().mark((function e(t,r,n,i){var o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.guardParams()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.fetch({path:"/v1/report",method:"POST",data:this.buildEventParams(t,r,n,i||{})});case 4:return o=e.sent,e.abrupt("return",o.data);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return i.apply(this,arguments)})},{key:"tickerKey",value:function(e,t,r){return"".concat(e,"/").concat(t,"/").concat(r||"")}},{key:"startTick",value:function(e,t,r){this.tickerMap.set(this.tickerKey(e,t,r),(new Date).getTime())}},{key:"getElapse",value:function(e,t,r){var n=this.tickerKey(e,t,r);return this.tickerMap.has(n)?(new Date).getTime()-this.tickerMap.get(n):0}},{key:"reportEC",value:(n=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.report(t,r,{count:1},n));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"reportElapse",value:(r=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.report(t,r,{elapse:this.getElapse(t,r,null==n?void 0:n.api)},n));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"reportHttp",value:(t=A(k().mark((function e(t,r,n,i,o,a){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.report(t,r,{elapse:this.getElapse(t,r,n)},{api:n,httpCode:i,result:o,errCode:a}));case 1:case"end":return e.stop()}}),e,this)}))),function(e,r,n,i,o,a){return t.apply(this,arguments)})}]),s}(ou);function uu(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}cu.shared=new cu,function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.RECONNECTING="RECONNECTING",e.ABORTED="ABORTED"}(su||(su={}));var lu=function(e){return void 0!==e.text},hu=function(e){w(s,e);var t,r,n,i,o,a=uu(s);function s(){var e;return y(this,s),(e=a.call(this)).connectionState=su.DISCONNECTED,e.prevConnectionState=su.DISCONNECTED,e.channels={},e._client=void 0,e.connectionState=su.DISCONNECTED,e.prevConnectionState=su.DISCONNECTED,e.channels={},e._client=void 0,e}return _(s,[{key:"client",get:function(){return this._client}},{key:"sessionId",get:function(){return this.client.context.sid}},{key:"logFilter",get:function(){var e=$c().LOG_FILTER_INFO;switch($n.logLevel){case qn.WARN:e=$c().LOG_FILTER_WARNING;break;case qn.OFF:e=$c().LOG_FILTER_OFF;break;case qn.ERROR:e=$c().LOG_FILTER_ERROR}return e}},{key:"_region",get:function(){switch($n.shared.region){case Hn.CN:return"GLOBAL";case Hn.AP:return"ASIA";case Hn.EU:return"EUROPE";case Hn.NA:return"NORTH_AMERICA"}}},{key:"login",value:(o=A(k().mark((function e(t,r,n){var i,o=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,$c().setArea({areaCodes:[this._region]}),i=$c().createInstance($n.shared.appId,{enableLogUpload:n.uploadLog,logFilter:this.logFilter}),xn.info("[rtm] wrapper init"),i.on("ConnectionStateChanged",(function(e,t){xn.info("[rtm] [Wrapper] ConnectionStateChanged",e,t),o.prevConnectionState=o.connectionState,o.connectionState=e,o.emit(Dc.RtmConnectionStateChanged,{newState:e,reason:t})})),i.on("MessageFromPeer",(function(e,t,r){lu(e)&&(xn.debug("[rtm] [Wrapper] MessageFromPeer ".concat(e.text)),o.emit("MessageFromPeer",{message:e.text,peerId:t,props:r}))})),e.next=8,i.login({uid:r,token:t});case 8:this._client=i,e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),this._destroyRtm(i),Xn.shared.handleThrowableError(Qn.RTM_ERR_LOGIN_FAIL,e.t0);case 15:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(e,t,r){return o.apply(this,arguments)})},{key:"createObserverChannel",value:function(e){return[this.client.createChannel(e),new Jc.EventEmitter]}},{key:"join",value:(i=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,cu.shared.startTick("joinRoom","rtm","joinChannel"),this.channels[n]!==t){e.next=4;break}return e.abrupt("return",xn.warn("[rtm] skip channel ".concat(n," join as the channel is already joined")));case 4:return t.on("ChannelMessage",(function(e,t,i){r.emit("ChannelMessage",{channelName:n,message:e,memberId:t,messagePros:i})})),t.on("MemberJoined",(function(e){r.emit("MemberJoined",{channelName:n,memberId:e})})),t.on("MemberLeft",(function(e){r.emit("MemberLeft",{channelName:n,memberId:e})})),t.on("MemberCountUpdated",(function(e){r.emit("MemberCountUpdated",{channelName:n,memberCount:e})})),e.next=10,t.join();case 10:this.channels[n]=t,cu.shared.reportElapse("joinRoom","rtm",{api:"joinChannel",result:!0}),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(0),cu.shared.reportElapse("joinRoom","rtm",{api:"joinChannel",result:!1,errCode:"".concat(e.t0.message)}),Xn.shared.handleThrowableError(Qn.RTM_ERR_JOIN_FAILED,e.t0);case 18:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(e,t,r){return i.apply(this,arguments)})},{key:"leave",value:(n=A(k().mark((function e(t){var r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(r=this.channels[t])){e.next=7;break}return e.next=5,r.leave();case 5:r.removeAllListeners(),delete this.channels[t];case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),Xn.shared.handleNonThrowableError(Qn.RTM_ERR_LEAVE_FAILED,e.t0);case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e){return n.apply(this,arguments)})},{key:"releaseChannels",value:function(){for(var e=0,t=Object.keys(this.channels);e<t.length;e++){var r=t[e];this.channels[r]&&this.release(this.channels[r]),this.channels[r]=void 0}}},{key:"releaseClient",value:function(){this._client&&this.release(this._client)}},{key:"release",value:function(e){e.removeAllListeners(),xn.info("[AGRtmManager] eventClient removeAllListeners ")}},{key:"reset",value:function(){this.connectionState=su.DISCONNECTED,this.prevConnectionState=su.DISCONNECTED,this.releaseClient(),this.releaseChannels(),this.channels={},this.client&&(this.client.removeAllListeners(),xn.info("[AGRtmManager] removeAllListeners")),this._client=void 0,this.removeAllListeners(),xn.info("[AGRtmManager] self removeAllListeners")}},{key:"_destroyRtm",value:function(e){try{null==e||e.logout()}catch(e){Xn.shared.handleNonThrowableError(Qn.RTM_ERR_DESTROY_FAILED,e)}}},{key:"destroyRtm",value:function(){this._destroyRtm(this._client),this._client=void 0}},{key:"sendChannelMessage",value:(r=A(k().mark((function e(t,r,n){var i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this.channels[t],e.next=3,i.sendMessage(r,{enableHistoricalMessaging:n.enableHistoricalMessaging});case 3:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"sendPeerMessage",value:(t=A(k().mark((function e(t,r,n){var i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.sendMessageToPeer(r,t,{enableHistoricalMessaging:n.enableHistoricalMessaging});case 2:return i=e.sent,e.abrupt("return",i.hasPeerReceived);case 4:case"end":return e.stop()}}),e,this)}))),function(e,r,n){return t.apply(this,arguments)})}]),s}(Jc.EventEmitter);function du(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}__webpack_require__(86);var fu=__webpack_require__(4073),pu=__webpack_require__.n(fu),gu=(__webpack_require__(4129),__webpack_require__(8206),new Set),vu=function(e,t,r){var n=r.value;return{configurable:!0,enumerable:!1,get:function(){var e=this.__cacheMap;return e||(e=new WeakMap,this.__cacheMap=e,gu.add(this)),e.has(n)||e.set(n,n.bind(this)),e.get(n)},set:function(e){var t=this.__cacheMap;t||(t=new WeakMap,this.__cacheMap=t,gu.add(this)),t.set(e,e.bind(this))}}};function mu(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=C(e)););return e}function Au(){return Au="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=mu(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},Au.apply(this,arguments)}var yu,bu=__webpack_require__(8711),_u=__webpack_require__.n(bu),Eu=new Set,wu={debounced:function(e,t){return function(r,n,i){var o=i.value;return{configurable:!0,enumerable:!1,get:function(){var r=this.__cacheMap;return r||(r=new WeakMap,this.__cacheMap=r,Eu.add(this)),r.has(o)||r.set(o,(0,U.debounce)(o,e,t).bind(this)),r.get(o)},set:function(e){var t=this.__cacheMap;t||(t=new WeakMap,this.__cacheMap=t,Eu.add(this)),t.set(e,e.bind(this))}}}},throttled:function(e,t){return function(r,n,i){var o=i.value;return{configurable:!0,enumerable:!1,get:function(){var r=this.__cacheMap;return r||(r=new WeakMap,this.__cacheMap=r,Eu.add(this)),r.has(o)||r.set(o,(0,U.throttle)(o,e,t).bind(this)),r.get(o)},set:function(e){var t=this.__cacheMap;t||(t=new WeakMap,this.__cacheMap=t,Eu.add(this)),t.set(e,e.bind(this))}}}}};__webpack_require__(8478),__webpack_require__(3561),__webpack_require__(2049);!function(e){e[e.continue=0]="continue",e[e.exit=1]="exit"}(yu||(yu={}));var Iu=function(e){return new Promise(function(){var t=A(k().mark((function t(r,n){var i;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e();case 3:i=t.sent,r(i),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),n(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}())},Su=function(){function e(t){y(this,e),this.__arguments=t,this.__timer=void 0,this.__running=!1}return _(e,[{key:"start",value:function(){var e=this;if(this.__running)throw new Error("Task is already running");this.__running=!0,this.__arguments.immediate?Iu(this.__arguments.runnable).then((function(){e.poll()})):this.poll()}},{key:"poll",value:function(){var e=this;if(!this.__running)return this.stop();this.__timer=setTimeout(A(k().mark((function t(){return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Iu(e.__arguments.runnable).catch((function(t){e.__arguments.onFail(t)===yu.exit&&(e.__running=!1)}));case 2:!e.__arguments.once&&e.poll();case 3:case"end":return t.stop()}}),t)}))),this.__arguments.interval)}},{key:"stop",value:function(){clearTimeout(this.__timer),this.__running=!1}},{key:"isStopped",get:function(){return!this.__running}}]),e}(),Tu=function(){function e(t){y(this,e),this.__arguments=t,this.__timer=void 0,this.__running=!1}return _(e,[{key:"start",value:function(){var e=this;if(this.__running)throw new Error("Task is already running");this.__running=!0;var t=this.__arguments,r=t.immediate,n=t.interval;r&&this.poll(),this.__timer=setInterval((function(){e.poll()}),n)}},{key:"poll",value:function(){var e=this;if(!this.__running)return this.stop();var t=this.__arguments.runnable;Iu(t).catch((function(t){e.__arguments.onFail(t)===yu.exit&&(e.__running=!1)}))}},{key:"stop",value:function(){clearInterval(this.__timer),this.__running=!1}},{key:"isStopped",get:function(){return!this.__running}}]),e}(),Cu=function(){function e(){y(this,e)}return _(e,null,[{key:"second",value:function(e){return this._factors.second*e}},{key:"minute",value:function(e){return this._factors.minute*e}},{key:"hour",value:function(e){return this._factors.hour*e}}]),e}();Cu._factors={hour:36e5,minute:6e4,second:1e3};var Ru,ku,Ou=function(){function e(){y(this,e),this._tasks=new WeakSet}return _(e,[{key:"addPollingTask",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return yu.continue},i=new Su({runnable:e,interval:t,immediate:r,onFail:n});return i.start(),this._tasks.add(i),i}},{key:"addDelayTask",value:function(e,t){var r=this,n=new Su({runnable:e,interval:t,once:!0,onFail:function(){return yu.exit},onComplete:function(){r._tasks.delete(n)}});return n.start(),this._tasks.add(n),n}},{key:"addIntervalTask",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return yu.continue},i=new Tu({runnable:e,interval:t,immediate:r,onFail:n});return i.start(),this._tasks.add(i),i}}]),e}(),Nu=function(){return new Ou},xu=Nu();function Du(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e.ReadyToPlay="ready-to-play",e.InteractiveNeeded="interactive-needed",e.CdnDelayUpdated="cdn-delay-updated"}(Ru||(Ru={}));var Lu,Pu,Mu,Bu=li.attach({proxyMethods:!1})(ku=function(e){w(r,e);var t=Du(r);function r(e){var n;return y(this,r),(n=t.call(this))._streamUrl=e,n.logger=void 0,n._view=void 0,n._mediaElement=void 0,n._containerElement=void 0,n._hls=void 0,n._task=void 0,_u().isSupported()&&!n.browserHlsSupported()&&n._createHls(),n}return _(r,[{key:"_createHls",value:function(){var e=this;this._hls=new(_u())({lowLatencyMode:!0,progressive:!0,liveSyncDuration:1});var t=this._hls;t.on(_u().Events.MEDIA_ATTACHED,(function(){t.loadSource(e._streamUrl)})),t.on(_u().Events.ERROR,(function(r,n){if(e.logger.error("HLS ->","ERROR:",r,n),n.fatal)switch(n.type){case _u().ErrorTypes.NETWORK_ERROR:e.logger.error("fatal network error encountered, try to recover"),t.loadSource(e._streamUrl);break;case _u().ErrorTypes.MEDIA_ERROR:e.logger.error("fatal media error encountered, try to recover"),t.recoverMediaError();break;default:t.destroy()}})),t.on(_u().Events.MANIFEST_PARSED,(function(t,r){e.logger.info("HLS ->","manifest loaded, found "+r.levels.length+" quality level")})),t.on(_u().Events.FRAG_PARSING_METADATA,(function(t,r){e.logger.info("HLS ->","FRAG_PARSING_METADATA:",t,r)})),t.on(_u().Events.FRAG_PARSING_USERDATA,(function(t,r){var n=r.samples.reduce((function(e,t){var r=JSON.parse(t.userData).ts;return e>r?r:e}),Date.now()),i=Date.now()-n;e.logger.info("HLS ->","FRAG_PARSING_USERDATA:",t,r,i),e.emit(Ru.CdnDelayUpdated,i+3e3)}))}},{key:"_attachMediaTag",value:function(e,t){var r,n=this;if(e!==(null===(r=this._mediaElement)||void 0===r?void 0:r.tagName)&&this._detachMediaTag(),this._view){var i,o=document.createElement(e);o.style.width="100%",o.style.height="100%",o.style.objectFit="cover",o.autoplay=!0,o.muted=!t,o.setAttribute("playsinline","");var a=document.createElement("div");a.style.width="100%",a.style.height="100%",a.style.position="relative",a.style.overflow="hidden",a.style.backgroundColor="black",a.className="agora_stream_media_player",a.appendChild(o),this._view.appendChild(a),this._mediaElement=o,this._containerElement=a,null===(i=this._mediaElement)||void 0===i||i.addEventListener("canplay",(function(){n.emit(Ru.ReadyToPlay)}),{once:!0})}if(this._mediaElement&&this._hls)this._hls.attachMedia(this._mediaElement);else{if(!this._mediaElement||!this.browserHlsSupported())throw new Error("can not play hls on this device");this._mediaElement.src=this._streamUrl,this.emit(Ru.CdnDelayUpdated,7e3)}}},{key:"_detachMediaTag",value:function(){this._mediaElement&&(this._view&&this._containerElement&&(this._view.removeChild(this._containerElement),this._containerElement=void 0),this._mediaElement=void 0),this._hls&&this._hls.detachMedia()}},{key:"takeSnapshot",value:function(){return new Blob}},{key:"setView",value:function(e){this._view&&e&&this._view!==e&&this._detachMediaTag(),this._view=e}},{key:"play",value:function(e,t){var r=this;t&&this._attachMediaTag("video",e),e&&!t&&this._attachMediaTag("audio",e),this._mediaElement&&(this._mediaElement.play().then((function(){r.emit(Ru.InteractiveNeeded,!1)})).catch((function(e){"NotAllowedError"===e.name&&r.emit(Ru.InteractiveNeeded,!0)})),this.playAttempt())}},{key:"stop",value:function(){this._mediaElement&&this._mediaElement.pause(),this._detachMediaTag()}},{key:"playAttempt",value:function(){var e=this;this._task||(this._task=xu.addPollingTask(A(k().mark((function t(){return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e._mediaElement){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,e._mediaElement.play();case 5:e.emit(Ru.InteractiveNeeded,!1),e._task&&e._task.stop(),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),e.emit(Ru.InteractiveNeeded,!0);case 12:case"end":return t.stop()}}),t,null,[[2,9]])}))),1e3))}},{key:"on",value:function(e,t){return Au(C(r.prototype),"on",this).call(this,e,t)}},{key:"once",value:function(e,t){return Au(C(r.prototype),"once",this).call(this,e,t)}},{key:"off",value:function(e,t){return Au(C(r.prototype),"off",this).call(this,e,t)}},{key:"dispose",value:function(){this._detachMediaTag(),this._hls&&this._hls.destroy(),this._task&&this._task.stop()}},{key:"browserHlsSupported",value:function(){return!!document.createElement("video").canPlayType("application/vnd.apple.mpegURL")}}]),r}(x))||ku;function ju(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e[e.None=0]="None",e[e.Camera=1]="Camera",e[e.ScreenShare=2]="ScreenShare",e[e.MediaPlayer=3]="MediaPlayer"}(Lu||(Lu={})),function(e){e[e.None=0]="None",e[e.Mic=1]="Mic",e[e.Mix=2]="Mix",e[e.MediaPlayer=3]="MediaPlayer"}(Pu||(Pu={})),function(e){e[e.Unpublished=0]="Unpublished",e[e.Published=1]="Published"}(Mu||(Mu={}));var Uu,Fu,Gu=_((function e(t,r){var n=r.videoSourceType,i=r.audioSourceType;y(this,e),this.videoSourceType=Lu.None,this.audioSourceType=Pu.None,this.rtc=void 0,this.rtc=t,n&&(this.videoSourceType=n),i&&(this.audioSourceType=i)})),Qu=function(e){w(r,e);var t=ju(r);function r(e,n){var i,o,a;return y(this,r),(a=t.call(this,e,{videoSourceType:Lu.MediaPlayer,audioSourceType:Pu.MediaPlayer})).playVideo=void 0,a.playAudio=void 0,a.streamUrl=void 0,a.player=void 0,a.playVideo=null===(i=null==n?void 0:n.playVideo)||void 0===i||i,a.playAudio=null===(o=null==n?void 0:n.playAudio)||void 0===o||o,a}return _(r,[{key:"setPlayVideo",value:function(e){this.playVideo=e}},{key:"setPlayAudio",value:function(e){this.playAudio=e}},{key:"setView",value:function(e){this.player&&this.player.dispose(),this.player=new Bu(e.streamUrl),this.player.setView(e.view)}},{key:"start",value:function(){return this.player&&(this.playVideo||this.playAudio)&&this.player.play(this.playVideo,this.playAudio),0}},{key:"stop",value:function(){return this.player&&this.player.stop(),0}}]),r}(Gu),qu=function(e){w(r,e);var t=ju(r);function r(e){var n;return y(this,r),(n=t.call(this,e,{videoSourceType:Lu.Camera})).state=zu.stopped,e.onLocalVideoTrackStateChanged((function(e,t){t===Lu.Camera&&(n.state=e)})),n}return _(r,[{key:"setView",value:function(e){this.rtc.setupLocalVideo(e,Lu.Camera)}},{key:"setDeviceId",value:function(e){this.rtc.setVideoCameraDevice(e)}},{key:"setVideoEncoderConfiguration",value:function(){}},{key:"start",value:function(){return this.rtc.enableLocalVideo(!0)}},{key:"stop",value:function(){return this.rtc.enableLocalVideo(!1)}}]),r}(Gu),Vu=function(e){w(r,e);var t=ju(r);function r(e){var n;return y(this,r),(n=t.call(this,e,{audioSourceType:Pu.Mic})).state=zu.stopped,e.onLocalAudioTrackStateChanged((function(e,t){t===Pu.Mic&&(n.state=e)})),n}return _(r,[{key:"setRecordingDevice",value:function(e){return this.rtc.setAudioRecordingDevice(e)}},{key:"setPlaybackDevice",value:function(e){return this.rtc.setAudioPlaybackDevice(e)}},{key:"start",value:function(){return this.rtc.enableLocalAudio(!0)}},{key:"stop",value:function(){return this.rtc.enableLocalAudio(!1)}}]),r}(Gu),Ku=function(e){w(r,e);var t=ju(r);function r(e){return y(this,r),t.call(this,e,{videoSourceType:Lu.ScreenShare})}return _(r,[{key:"setView",value:function(e){this.rtc.setupLocalVideo(e,Lu.ScreenShare)}},{key:"start",value:function(){return this.rtc.startScreenCapture()}},{key:"startWithParams",value:function(e,t){return this.rtc.startScreenCapture(e,t)}},{key:"stop",value:function(){return this.rtc.stopScreenCapture()}}]),r}(Gu);!function(e){e[e.main=0]="main",e[e.sub=1]="sub"}(Fu||(Fu={}));var Hu,Wu,zu,Yu,Xu,Ju,Zu,$u,el,tl,rl=li.attach({level:qn.DEBUG})(Uu=function(){function e(t,r){y(this,e),this.channelName=void 0,this._adapter=void 0,this._adapter=r,this.channelName=t}return _(e,[{key:"connectionType",value:function(e){return void 0===e?Fu.main:e}},{key:"enableDualStream",value:function(e,t){return this._adapter.enableDualStream(e,this.connectionType(t))}},{key:"setLowStreamParameter",value:function(e,t){return this._adapter.setLowStreamParameter(e,this.connectionType(t))}},{key:"setRemoteVideoStreamType",value:function(e,t,r){return this._adapter.setRemoteVideoStreamType(e,t,this.connectionType(r))}},{key:"getRtcSid",value:function(){return this._adapter.getSessionId()}},{key:"join",value:function(e,t,r){return this._adapter.join(e,t,this.connectionType(r))}},{key:"leave",value:function(e){return this._adapter.leave(e)}},{key:"setClientRole",value:function(e){return this._adapter.setClientRole(e)}},{key:"muteLocalVideoStream",value:function(e,t){return this._adapter.muteLocalVideo(e,this.connectionType(t))}},{key:"muteLocalAudioStream",value:function(e,t){return this._adapter.muteLocalAudio(e,this.connectionType(t))}},{key:"muteLocalScreenStream",value:function(e,t){return this._adapter.muteLocalScreenShare(e,this.connectionType(t))}},{key:"muteRemoteVideoStream",value:function(e,t){return this._adapter.muteRemoteVideo(e,t)}},{key:"muteRemoteAudioStream",value:function(e,t){return this._adapter.muteRemoteAudio(e,t)}},{key:"onNetworkStats",value:function(e){return this._adapter.onNetworkStats(e)}},{key:"onAudioVolumeIndication",value:function(e){return this._adapter.onAudioVolumeIndication(e)}},{key:"onConnectionStageChanged",value:function(e){return this._adapter.onConnectionStateChanged(e)}}]),e}())||Uu;__webpack_require__(3290);!function(e){e[e.unknown=99]="unknown",e[e.bad=1]="bad",e[e.poor=2]="poor",e[e.good=3]="good",e[e.great=4]="great",e[e.down=5]="down"}(Hu||(Hu={})),function(e){e[e.Unknown=0]="Unknown",e[e.PermissionDenied=1]="PermissionDenied"}(Wu||(Wu={})),function(e){e[e.stopped=0]="stopped",e[e.starting=2]="starting",e[e.started=1]="started",e[e.error=-1]="error"}(zu||(zu={})),function(e){e[e.Idle=0]="Idle",e[e.Connecting=1]="Connecting",e[e.Connected=2]="Connected",e[e.Reconnecting=3]="Reconnecting"}(Yu||(Yu={})),function(e){e[e.AES_128_XTS=1]="AES_128_XTS",e[e.AES_128_ECB=2]="AES_128_ECB",e[e.AES_256_XTS=3]="AES_256_XTS",e[e.SM4_128_ECB=4]="SM4_128_ECB",e[e.AES_128_GCM=5]="AES_128_GCM",e[e.AES_256_GCM=6]="AES_256_GCM"}(Xu||(Xu={})),function(e){e[e.Window=0]="Window",e[e.Screen=1]="Screen"}(Ju||(Ju={})),function(e){e[e.fit=0]="fit",e[e.fill=1]="fill"}(Zu||(Zu={})),function(e){e[e.low=0]="low",e[e.normal=1]="normal",e[e.height=2]="height"}($u||($u={})),function(e){e[e.HIGH_STREAM=0]="HIGH_STREAM",e[e.LOW_STREAM=1]="LOW_STREAM"}(el||(el={}));var nl=(tl=function(){function e(t,r){var n=r.userUuid,i=r.userName,o=r.userRole,a=r.streamUuid,s=r.sceneId,c=r.rtcToken,u=r.rtc,l=r.userProperties;y(this,e),this.userUuid=void 0,this.userName=void 0,this.userRole=void 0,this.userProperties=void 0,this.streamUuid=void 0,this.sceneId=void 0,this.rtcToken=void 0,this._rtc=void 0,this._scene=void 0,this._debouncedSyncVideo=pu()(this._syncVideoSourceState,500),this._debouncedSyncAudio=pu()(this._syncAudioSourceState,500),this.subStream=void 0,this.userUuid=n,this.userName=i,this.userRole=o,this.userProperties=l,this.streamUuid=a,this.sceneId=s,this.rtcToken=c,this._rtc=u,this._scene=t,this._addEventHandler()}var t,r,n,i,o,a,s,c,u,l,h;return _(e,[{key:"toData",value:function(){var e=this.userName,t=this.userUuid,r=this.userRole,n=this.userProperties;return Pc.fromData({userName:e,userUuid:t,role:r,userProperties:n})}},{key:"destroy",value:function(){var e=this._scene.engine;e.getAgoraMediaControl().off(Sl.localVideoTrackChanged,this._handleVideoTrackStateChange),e.getAgoraMediaControl().off(Sl.localAudioTrackChanged,this._handleAudioTrackStateChange)}},{key:"_addEventHandler",value:function(){var e=this._scene.engine;e.getAgoraMediaControl().on(Sl.localVideoTrackChanged,this._handleVideoTrackStateChange),e.getAgoraMediaControl().on(Sl.localAudioTrackChanged,this._handleAudioTrackStateChange)}},{key:"_handleVideoTrackStateChange",value:function(e,t){t===Lu.Camera&&e!==zu.starting&&this._debouncedSyncVideo(e)}},{key:"_handleAudioTrackStateChange",value:function(e,t){t===Pu.Mic&&e!==zu.starting&&this._debouncedSyncAudio(e)}},{key:"_syncVideoSourceState",value:function(e){xn.info("sync video state ".concat(e)),this.updateLocalMediaState({videoSourceState:e})}},{key:"_syncAudioSourceState",value:function(e){xn.info("sync audio state ".concat(e)),this.updateLocalMediaState({audioSourceState:e})}},{key:"setSceneProperties",value:(h=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().updateRoomProperties({roomUuid:this.sceneId,properties:t,cause:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteSceneProperties",value:(l=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().deleteRoomProperties({roomUuid:this.sceneId,properties:t,cause:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"setUserProperties",value:(u=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().updateUserProperties({userUuid:this.userUuid,roomUuid:this.sceneId,properties:t,cause:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"deleteUserProperties",value:(c=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().deleteUserProperties({userUuid:this.userUuid,roomUuid:this.sceneId,properties:t,cause:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateLocalMediaState",value:(s=A(k().mark((function e(t,r){var n,i,o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.videoSourceState,o=t.audioSourceState,e.next=3,this._scene.getApiService().updateDeviceState(this.sceneId,this.userUuid,r&&r===Fu.sub?(null===(n=this.subStream)||void 0===n?void 0:n.streamUuid)||"0":this.streamUuid,{videoSourceState:i,audioSourceState:o});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateLocalMediaStream",value:(a=A(k().mark((function e(t,r){var n,i,o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.publishVideo,o=t.publishAudio,e.next=3,this._scene.getApiService().upsertStream(this.sceneId,this.userUuid,r&&r===Fu.sub?(null===(n=this.subStream)||void 0===n?void 0:n.streamUuid)||"0":this.streamUuid,{publishVideo:i,publishAudio:o});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateRemoteMediaStream",value:(o=A(k().mark((function e(t,r,n,i){var o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.publishVideo,a=n.publishAudio,e.next=3,this._scene.getApiService().upsertStream(this.sceneId,t,r,{publishVideo:o,publishAudio:a});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return o.apply(this,arguments)})},{key:"deleteLocalMediaStream",value:(i=A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().deleteStream(this.sceneId,this.userUuid,this.streamUuid);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"deleteLocalScreenStream",value:(n=A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.subStream){e.next=4;break}return e.next=3,this._scene.getApiService().deleteStream(this.sceneId,this.userUuid,this.subStream.streamUuid);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"sendRoomMessage",value:(r=A(k().mark((function e(t){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().sendRoomChatMessage(t,this.sceneId);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"publishStreamToCdn",value:(t=A(k().mark((function e(t){var r,n,i,o,a,s,c,u;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=$n.shared.rtcConfigs.defaultCameraEncoderConfigurations,i=(n=t||r||{}).height,o=void 0===i?0:i,a=n.width,s=void 0===a?0:a,c=n.bitrate,u=void 0===c?0:c,e.next=4,this._scene.getApiService().publishStreamToCdn(this.sceneId,this.userUuid,this.streamUuid,{converterOptions:{height:o,width:s,bitrate:u,seiOptions:{source:{metadata:!0,datastream:!1},sink:{type:5}}}});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"setupRemoteVideo",value:function(e){this._rtc.setupRemoteVideo(e)}}]),e}(),du(tl.prototype,"_handleVideoTrackStateChange",[vu],Object.getOwnPropertyDescriptor(tl.prototype,"_handleVideoTrackStateChange"),tl.prototype),du(tl.prototype,"_handleAudioTrackStateChange",[vu],Object.getOwnPropertyDescriptor(tl.prototype,"_handleAudioTrackStateChange"),tl.prototype),du(tl.prototype,"_syncVideoSourceState",[vu],Object.getOwnPropertyDescriptor(tl.prototype,"_syncVideoSourceState"),tl.prototype),du(tl.prototype,"_syncAudioSourceState",[vu],Object.getOwnPropertyDescriptor(tl.prototype,"_syncAudioSourceState"),tl.prototype),tl),il=__webpack_require__(8640),ol=__webpack_require__.n(il);function al(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?al(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):al(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var cl=function(){function e(t,r,n){y(this,e),this.fn=void 0,this.args=void 0,this.onRetryAttemptFail=void 0,this.onRetryAbort=void 0,this.opts=void 0,this.fn=t,this.args=r,this.opts=n}var t;return _(e,[{key:"fail",value:function(e){return this.onRetryAttemptFail=e,this}},{key:"abort",value:function(e){return this.onRetryAbort=e,this}},{key:"exec",value:(t=A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ol()(this.fn,this.args,sl(sl({retriesMax:3},this.opts),{},{onAttemptFail:this.onRetryAttemptFail}));case 3:e.next=12;break;case 5:if(e.prev=5,e.t0=e.catch(0),e.t1=this.onRetryAbort,!e.t1){e.next=11;break}return e.next=11,this.onRetryAbort(e.t0);case 11:throw e.t0;case 12:case"end":return e.stop()}}),e,this,[[0,5]])}))),function(){return t.apply(this,arguments)})}]),e}(),ul=function(e,t,r){return new cl(e,t,r)},ll=function(e){try{return JSON.stringify(e)}catch(e){}return"invalid json"},hl=function(e){return new Promise((function(t){setTimeout(t,e)}))},dl=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Promise.race([e,new Promise((function(e,n){setTimeout(r?n:e,t)}))])},fl=function(){function e(){y(this,e),this._users=Cc.Map(),this._roomProperties=Cc.Map({}),this._streams=Cc.Map(),this._roomInfo=Cc.Map(),this._messages=Cc.List([])}return _(e,[{key:"users",get:function(){return this._users}},{key:"setUsers",value:function(e){this._users=Cc.Map(e)}},{key:"setUser",value:function(e,t){this._users=this._users.set(e,t)}},{key:"deleteUser",value:function(e){this._users=this._users.delete(e)}},{key:"findUser",value:function(e){return this._users.get(e)}},{key:"roomProperties",get:function(){return this._roomProperties}},{key:"setRoomProperties",value:function(e){this._roomProperties=Cc.Map(e)}},{key:"streams",get:function(){return this._streams}},{key:"setStreams",value:function(e){this._streams=Cc.Map(e)}},{key:"findUserStreams",value:function(e){return Array.from(this._streams.values()).filter((function(t){return t.fromUser.userUuid===e}))}},{key:"setStream",value:function(e,t){this._streams=this._streams.set(e,t)}},{key:"deleteStream",value:function(e){this._streams=this._streams.delete(e)}},{key:"findStream",value:function(e){return this._streams.get(e)}},{key:"roomInfo",get:function(){return this._roomInfo}},{key:"setRoomInfo",value:function(e){this._roomInfo=Cc.Map(e)}},{key:"messages",get:function(){return this._messages}},{key:"addMessage",value:function(e){this._messages.push(e)}}]),e}();function pl(e,t){return e.then((function(e){return[null,e]})).catch((function(e){return t&&Object.assign(e,t),[e,void 0]}))}const gl=pl;var vl,ml,Al;function yl(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e[e.Idle=0]="Idle",e[e.Connecting=1]="Connecting",e[e.Connected=2]="Connected",e[e.Reconnecting=3]="Reconnecting",e[e.Error=4]="Error"}(vl||(vl={})),function(e){e[e.Communication=0]="Communication",e[e.LiveBroadcasting=1]="LiveBroadcasting"}(ml||(ml={})),function(e){e[e.Host=0]="Host",e[e.Audience=1]="Audience"}(Al||(Al={}));var bl,_l=function(e){w(g,e);var t,r,n,i,o,a,s,c,u,l,h,d,f,p=yl(g);function g(){return y(this,g),p.call(this)}return _(g,[{key:"checkIn",value:(f=A(k().mark((function e(t,r,n,i,o){var a,s;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v2/rooms/".concat(t,"/users/").concat(r),pathPrefix:"/edu/apps/".concat($n.shared.appId),method:"PUT",data:{boardRegion:"cn-hz",duration:18e3,role:o,roomName:n,roomType:4,userName:i,userProperties:{}}});case 2:return a=e.sent,s=a.data,e.abrupt("return",s);case 5:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n,i){return f.apply(this,arguments)})},{key:"entryRoom",value:(d=A(k().mark((function e(t){var r,n,i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return cu.shared.startTick("joinRoom","http","entry"),e.next=3,this.fetch({path:"/v1/rooms/".concat(t.roomUuid,"/users/").concat(t.userUuid,"/entry"),method:"POST",data:t});case 3:return r=e.sent,n=r.__status,i=r.code,cu.shared.reportHttp("joinRoom","http","entry",n,200===n,i),e.abrupt("return",r.data);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"syncSnapShot",value:(h=A(k().mark((function e(t){var r,n,i,o,a,s,c,u;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v1/rooms/".concat(t,"/snapshot"),method:"GET"});case 2:return n=e.sent,i=n.data,o=null!==(r=i.sequence)&&void 0!==r?r:0,a=Qc()(i,"snapshot.room.roomInfo",null),s=Qc()(i,"snapshot.room.roomProperties",null),c=Qc()(i,"snapshot.room.roomState"),u=Qc()(i,"snapshot.users",[]),e.abrupt("return",{seq:o,roomInfo:a,roomState:c,roomProperties:s,users:u});case 10:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"syncSequence",value:(l=A(k().mark((function e(t,r,n){var i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v1/rooms/".concat(t,"/sequences?nextId=").concat(r,"&count=").concat(n),method:"GET"});case 2:return i=e.sent,e.abrupt("return",i.data);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return l.apply(this,arguments)})},{key:"updateRoomProperties",value:(u=A(k().mark((function e(t){var r,n,i,o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.roomUuid,n=t.properties,i=t.cause,o={properties:n},i&&(o.cause=i),e.next=5,this.fetch({path:"/v1/rooms/".concat(r,"/properties"),method:"PUT",data:o});case 5:return a=e.sent,e.abrupt("return",a.data);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"deleteRoomProperties",value:(c=A(k().mark((function e(t){var r,n,i,o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.roomUuid,n=t.properties,i=t.cause,o={properties:n},i&&(o.cause=i),e.next=5,this.fetch({path:"/v1/rooms/".concat(r,"/properties"),method:"DELETE",data:o});case 5:return a=e.sent,e.abrupt("return",a.data);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"updateUserProperties",value:(s=A(k().mark((function e(t){var r,n,i,o,a,s;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.roomUuid,n=t.userUuid,i=t.properties,o=t.cause,a={properties:i,cause:void 0===o?void 0:o},e.next=4,this.fetch({path:"/v1/rooms/".concat(r,"/users/").concat(n,"/properties"),method:"PUT",data:a});case 4:return s=e.sent,e.abrupt("return",s.data);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"deleteUserProperties",value:(a=A(k().mark((function e(t){var r,n,i,o,a,s,c;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.roomUuid,n=t.userUuid,i=t.properties,o=t.cause,s={properties:i},(a=void 0===o?void 0:o)&&(s.cause=a),e.next=5,this.fetch({path:"/v1/rooms/".concat(r,"/users/").concat(n,"/properties"),method:"DELETE",data:s});case 5:return c=e.sent,e.abrupt("return",c.data);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"upsertStream",value:(o=A(k().mark((function e(t,r,n,i){var o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=i.publishVideo,a=i.publishAudio,e.next=3,this.fetch({path:"/v1/rooms/".concat(t,"/users/").concat(r,"/streams/").concat(n),method:"PUT",data:{videoState:o,audioState:a}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return o.apply(this,arguments)})},{key:"deleteStream",value:(i=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v1/rooms/".concat(t,"/users/").concat(r,"/streams/").concat(n),method:"DELETE"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return i.apply(this,arguments)})},{key:"updateDeviceState",value:(n=A(k().mark((function e(t,r,n,i){var o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=i.videoSourceState,a=i.audioSourceState,e.next=3,this.fetch({path:"/v1/rooms/".concat(t,"/users/").concat(r,"/streams/").concat(n),method:"PATCH",data:{videoSourceState:o,audioSourceState:a}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r,i){return n.apply(this,arguments)})},{key:"sendRoomChatMessage",value:(r=A(k().mark((function e(t,r){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v1/rooms/".concat(r,"/chat/channel"),method:"POST",data:{message:t,type:1}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"publishStreamToCdn",value:(t=A(k().mark((function e(t,r,n,i){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v1/rooms/".concat(t,"/users/").concat(r,"/streams/").concat(n),method:"PUT",data:i});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,r,n,i){return t.apply(this,arguments)})}]),g}(ou);function El(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?El(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):El(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Il(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Sl,Tl=li.attach({proxyMethods:!1})(bl=function(e){w(a,e);var t,r,n,i,o=Il(a);function a(e,t){var r;y(this,a),(r=o.call(this)).logger=void 0,r.sceneId=void 0,r._localUser=void 0,r._sceneState=vl.Idle,r._initialSync=!1,r._apiService=void 0,r._engine=void 0,r.dataStore=void 0,r._rtmManager=void 0,r._rtcManager=void 0,r._rtmChannel=void 0,r._rtcChannel=void 0,r._rtmChannelObserver=void 0,r._synchronizer=void 0,r._timestampGap=0,r.createTs=void 0,r.sceneId=e,r._engine=t.engine,r._rtmManager=t.rtm,r._rtcManager=t.rtc,r._rtmChannel=t.rtmChannel,r._rtmChannelObserver=t.rtmChannelObserver,r._rtcChannel=t.rtcChannel,r._apiService=new _l,r._apiService.pathPrefix=t.engine.apiServicePathPrefix,r.dataStore=new fl;var n=r._rtcChannel,i=r._rtmManager;return n.onNetworkStats((function(e){r.emit(Dc.NetworkStats,e)})),n.onAudioVolumeIndication((function(e){r.emit(Dc.AudioVolumes,e)})),n.onConnectionStageChanged((function(e,t){r.emit(Dc.RtcConnectionStateChanged,e,t)})),i.on(Dc.RtmConnectionStateChanged,r._handleRtmStateChange=r._handleRtmStateChange.bind(S(r))),r}return _(a,[{key:"getApiService",value:function(){return this._apiService}},{key:"localUser",get:function(){return this._localUser}},{key:"engine",get:function(){return this._engine}},{key:"rtcSid",get:function(){return this._rtcChannel.getRtcSid()}},{key:"rtmSid",get:function(){return this._rtmManager.sessionId}},{key:"rtcChannel",get:function(){return this._rtcChannel}},{key:"timestampServerLocalGap",get:function(){return this._timestampGap}},{key:"enableDualStream",value:function(e,t){return this._rtcChannel.enableDualStream(e,t)}},{key:"setLowStreamParameter",value:function(e,t){return this._rtcChannel.setLowStreamParameter(e,t)}},{key:"setRemoteVideoStreamType",value:function(e,t){return this._rtcChannel.setRemoteVideoStreamType(e,t)}},{key:"joinScene",value:(i=A(k().mark((function e(t){var r,n,i,o,a,s,c,u,l,h,d,f,p,g,v;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._sceneState===vl.Idle){e.next=3;break}return xn.warn("scene not idle"),e.abrupt("return");case 3:return e.prev=3,this._setRteConnectionState(vl.Connecting),r=this._engine.getAgoraMediaControl(),e.next=8,this.getApiService().entryRoom({userUuid:$n.shared.userId,roomUuid:this.sceneId,userName:t.userName,streamUuid:t.streamId,role:t.userRole,stream:{videoSourceState:r.createCameraVideoTrack().state,audioSourceState:r.createMicrophoneAudioTrack().state}});case 8:return n=e.sent,i=n.user,o=n.room,this.createTs=o.roomState.createTime,this._apiService.headers=wl(wl({},$n.shared.service.headers),{},{token:i.userToken}),e.next=15,this._rtmManager.join(this._rtmChannel,this._rtmChannelObserver,this.sceneId);case 15:return a=i.streamUuid,s=i.userName,c=i.userUuid,u=i.role,l=i.rtcToken,h=i.streams,d=void 0===h?[]:h,f=i.userProperties,p=d.map((function(e){return Mc.fromData({streamUuid:e.streamUuid,streamName:e.streamName,fromUser:{userName:s,userUuid:c,role:u},videoSourceState:e.videoSourceState,audioSourceState:e.audioSourceState,videoSourceType:e.videoSourceType,audioSourceType:e.audioSourceType,videoState:e.videoState,audioState:e.audioState,playUrl:e.playUrl,flvPlayUrl:e.flvPlayUrl,rtmpPlayUrl:e.rtmpPlayUrl})})),this.dataStore.setStreams(p),this._localUser=new nl(this,{userUuid:$n.shared.userId,userName:s,userRole:u,streamUuid:a,sceneId:this.sceneId,rtcToken:l,rtc:this._rtcManager,userProperties:f}),2===d.length&&(g=d.find((function(e){return e.streamUuid!==a})),this._localUser.subStream=g),this._synchronizer=new Xc(this.dataStore,{scene:this,userUuid:$n.shared.userId,streamUuid:a,channelObserver:this._rtmChannelObserver,rtm:this._rtmManager}),this._addEventListeners(this._synchronizer.handle),e.next=24,this.getApiService().syncSnapShot(this.sceneId);case 24:v=e.sent,this._synchronizer.syncSnapshot(Lc.fromData(v)),e.next=32;break;case 28:return e.prev=28,e.t0=e.catch(3),this._cleanup(),e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_JOIN_SCENE_FAILED,e.t0));case 32:case"end":return e.stop()}}),e,this,[[3,28]])}))),function(e){return i.apply(this,arguments)})},{key:"leaveScene",value:(n=A(k().mark((function e(){var t,r,n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gl(this._rtmManager.leave(this.sceneId));case 2:t=e.sent,r=v(t,1),(n=r[0])&&Xn.shared.handleNonThrowableError(Qn.RTE_ERR_LEAVE_SCENE_FAIL,n),this._rtmManager.off(Dc.RtmConnectionStateChanged,this._handleRtmStateChange),this._cleanup();case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"joinRTC",value:(r=A(k().mark((function e(t){var r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._initialSync&&this.localUser){e.next=2;break}return e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_SCENE_NOT_READY,new Error("try to join rtc before scene is ready ".concat(!!this._initialSync," ").concat(!!this.localUser))));case 2:if(!t){e.next=8;break}return e.next=5,this._rtcChannel.join(t.token,t.streamUuid,t.connectionType);case 5:case 10:return e.abrupt("return",e.sent);case 8:return e.next=10,this._rtcChannel.join(this.localUser.rtcToken,null===(r=this.localUser)||void 0===r?void 0:r.streamUuid);case 11:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"leaveRTC",value:(t=A(k().mark((function e(t){var r,n,i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gl(this._rtcChannel.leave(t));case 2:r=e.sent,n=v(r,1),(i=n[0])&&Xn.shared.handleNonThrowableError(Qn.RTC_ERR_LEAVE_CHANNEL_FAIL,i);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"muteRemoteAudioStream",value:function(e,t){return this._rtcChannel.muteRemoteAudioStream(e,t)}},{key:"muteRemoteVideoStream",value:function(e,t){return this._rtcChannel.muteRemoteVideoStream(e,t)}},{key:"_cleanup",value:function(){var e;null===(e=this._localUser)||void 0===e||e.destroy(),this._localUser=void 0,this._synchronizer=void 0,this._initialSync=!1}},{key:"_setRteConnectionState",value:function(e,t){var r=this._sceneState;this._sceneState=e,this._sceneState!==r&&this.emit(Dc.RteConnectionStateChanged,e,t)}},{key:"_setInitialSnapshotSync",value:function(e){this._initialSync=e,this._recalculateRteState()}},{key:"_recalculateRteState",value:function(e){var t=this._rtmManager.connectionState,r=this._initialSync;return t===su.DISCONNECTED?this._setRteConnectionState(vl.Idle):t===su.CONNECTING?this._setRteConnectionState(vl.Connecting):t===su.CONNECTED?r?this._setRteConnectionState(vl.Connected):this._setRteConnectionState(vl.Connecting):t===su.RECONNECTING?r?this._setRteConnectionState(vl.Reconnecting):this._setRteConnectionState(vl.Connecting):t===su.ABORTED?this._setRteConnectionState(vl.Error,e):void xn.warn("unhandled rte connection state: rtm: ".concat(t,", snapshot: ").concat(r))}},{key:"_handleUserAdded",value:function(e){var t=this,r=[],n=[];e.forEach((function(e){var i;if(t.logger.info("check streams with user",e),(null===(i=t.localUser)||void 0===i?void 0:i.userUuid)===e.userUuid){var o=t.dataStore.findUserStreams(e.userUuid);o.length?(t.logger.info("local streams come with user",o),r=r.concat(o)):t.logger.info("no local streams come with user",o)}else{var a=t.dataStore.findUserStreams(e.userUuid);a.length?(t.logger.info("remote streams come with user",a),n=n.concat(a)):t.logger.info("no remote streams come with user",a)}})),this.emit(Dc.LocalStreamAdded,r),this.emit(Dc.RemoteStreamAdded,n),this.emit(Dc.UserAdded,e)}},{key:"_handleUserRemoved",value:function(e,t){var r=this,n=[],i=[];e.forEach((function(e){var t;if((null===(t=r.localUser)||void 0===t?void 0:t.userUuid)===e.userUuid){var o=r.dataStore.findUserStreams(e.userUuid);o.length&&(n=n.concat(o))}else{var a=r.dataStore.findUserStreams(e.userUuid);a.length&&(i=i.concat(a))}})),this._handleLocalStreamRemoved(n),this._handleRemoteStreamsRemoved(i),this.emit(Dc.UserRemoved,e,t)}},{key:"_handleLocalStreamRemoved",value:function(e,t){0!==e.length&&(this.logger.info("_handleLocalStreamRemoved [".concat(e.join(","),"]")),this.emit(Dc.LocalStreamRemove,e,t))}},{key:"_handleRemoteStreamsRemoved",value:function(e,t){0!==e.length&&(this.logger.info("_handleRemoteStreamsRemoved [".concat(e.join(","),"]")),this.emit(Dc.RemoteStreamRemove,e,t))}},{key:"_addEventListeners",value:function(e){var t=this;e.on(Dc.SnapshotUpdated,(function(){if(t.logger.info("sceneId:".concat(t.sceneId," snapshot updated")),t._setInitialSnapshotSync(!0),!t.localUser)return Xn.shared.handleThrowableError(Qn.RTE_ERR_LOCAL_USER_NOT_EXIST,new Error("local user not exist"));var e=t.localUser.toData();t.dataStore.setUser(t.localUser.userUuid,Pc.fromData(e));var r=Array.from(t.dataStore.users.values()).filter((function(e){return e.userUuid!==t.localUser.userUuid}));r.push(e),r.length>0&&t._handleUserAdded(r),t._handleRoomPropertyChange(Array.from(t.dataStore.roomProperties.keys()),t.dataStore.roomProperties,{},{})})),e.on(Dc.ChatReceived,(function(e){t.emit(Dc.ChatReceived,e)})),e.on(Dc.UserAdded,(function(e){t.logger.info("sceneId:".concat(t.sceneId," user-added [").concat(e.join(","),"]")),t._handleUserAdded(e)})),e.on(Dc.UserUpdated,(function(e){t.logger.info("sceneId:".concat(t.sceneId," user-updated ").concat(e))})),e.on(Dc.UserRemoved,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," user-removed [").concat(e.join(","),"]")),t._handleUserRemoved(e,r)})),e.on(Dc.RoomPropertyUpdated,(function(e,r,n,i){t.logger.debug("sceneId:".concat(t.sceneId," room-property-updated ").concat(ll(r)," ").concat(ll(n)," ").concat(ll(i))),t._handleRoomPropertyChange(e,r,n,i)})),e.on(Dc.UserPropertyUpdated,(function(e,r,n,i){t.logger.debug("sceneId:".concat(t.sceneId," user-property-updated ").concat(e," ").concat(ll(r)," ").concat(ll(n)," ").concat(ll(i))),t.emit(Dc.UserPropertyUpdated,e,r,n,i)})),e.on(Dc.BatchUserPropertyUpdated,(function(e,r,n){t.logger.debug("batch-user-property-updated ".concat(ll(e)," ").concat(ll(r)," ").concat(ll(n))),t.emit(Dc.BatchUserPropertyUpdated,e,r,n)})),e.on(Dc.LocalStreamAdded,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," local-stream-added [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.LocalStreamAdded,e,r)})),e.on(Dc.LocalStreamUpdate,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," local-stream-upsert [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.LocalStreamUpdate,e,r)})),e.on(Dc.LocalStreamRemove,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," local-stream-removed [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.LocalStreamRemove,e,r)})),e.on(Dc.RemoteStreamAdded,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," remote-stream-added [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.RemoteStreamAdded,e,r)})),e.on(Dc.RemoteStreamUpdate,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," remote-stream-upsert [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.RemoteStreamUpdate,e,r)})),e.on(Dc.RemoteStreamRemove,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," remote-stream-removed [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.RemoteStreamRemove,e,r)})),e.on(Dc.ChatUserMessage,(function(e){t.emit(Dc.ChatUserMessage,e)})),e.on(Dc.TimeStampGapUpdate,(function(e){t._timestampGap=e,t.emit(Dc.TimeStampGapUpdate,e)}))}},{key:"_handleRoomPropertyChange",value:function(e,t,r,n){this.emit(Dc.RoomPropertyUpdated,e,t.toObject(),r,n)}},{key:"_handleRtmStateChange",value:function(e){this._recalculateRteState(e.reason)}}]),a}(Jc.EventEmitter))||bl;function Cl(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e.cameraListChanged="camera-list-changed",e.localAudioVolume="local-audio-volume",e.localAudioRecordingListChanged="local-audio-recording-list-changed",e.localVideoTrackChanged="local-video-track-changed",e.localAudioTrackChanged="local-audio-track-changed",e.trackStateChanged="track-state-changed",e.playbackDeviceListChanged="playback-device-list-changed",e.recordingDeviceListChanged="recording-device-list-changed",e.localAudioPlaybackVolumeIndicator="start-test-audio-playback-volume-indicator",e.audioPlaybackStateChanged="audio-playback-state-changed",e.localAudioFrame="local-audio-frame"}(Sl||(Sl={}));var Rl=function(e){w(r,e);var t=Cl(r);function r(e){var n;return y(this,r),(n=t.call(this)).camera=void 0,n.microphone=void 0,n.screen=void 0,n._rtc=void 0,n._rtc=e,n._addEventListener(e),n}return _(r,[{key:"_addEventListener",value:function(e){var t=this;e.getVideoDeviceManager().onLocalCameraListChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.cameraListChanged].concat(r))})),e.getAudioDeviceManager().onLocalRecordingDeviceListChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.recordingDeviceListChanged].concat(r))})),e.getAudioDeviceManager().onLocalPlaybackDeviceListChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.playbackDeviceListChanged].concat(r))})),e.getVideoDeviceManager().onLocalVideoTrackStateChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.localVideoTrackChanged].concat(r))})),e.getAudioDeviceManager().onLocalAudioTrackStateChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.localAudioTrackChanged].concat(r))})),e.getAudioDeviceManager().onLocalAudioVolume((function(e){t.emit(Sl.localAudioVolume,e)})),e.getAudioDeviceManager().onLocalAudioPlaybackTestVolumeChanged((function(e){t.emit(Sl.localAudioPlaybackVolumeIndicator,e)})),e.getAudioDeviceManager().onAudioFrame((function(e){t.emit(Sl.localAudioFrame,e)})),e.onLocalScreenShareTrackStateChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.localVideoTrackChanged].concat(r))}))}},{key:"createCameraVideoTrack",value:function(){return this.camera||(this.camera=new qu(this._rtc)),this.camera}},{key:"createMicrophoneAudioTrack",value:function(){return this.microphone||(this.microphone=new Vu(this._rtc)),this.microphone}},{key:"createScreenShareTrack",value:function(){return this.screen||(this.screen=new Ku(this._rtc)),this.screen}},{key:"getVideoCameraList",value:function(){return this._rtc.getVideoDeviceManager().getVideoCameraDevices()}},{key:"getAudioRecordingList",value:function(){return this._rtc.getAudioDeviceManager().getAudioRecordingDevices()}},{key:"getAudioPlaybackList",value:function(){return this._rtc.getAudioDeviceManager().getAudioPlaybackDevices()}},{key:"isScreenDeviceEnumerateSupported",value:function(){return this._rtc.isScreenDeviceEnumerateSupported()}},{key:"hasScreenSharePermission",value:function(){return this._rtc.hasScreenSharePermission()}},{key:"getWindowDevices",value:function(){return this._rtc.getWindowDevices()}},{key:"getDisplayDevices",value:function(){return this._rtc.getDisplayDevices()}},{key:"startAudioRecordingDeviceTest",value:function(e){return this._rtc.startAudioRecordingDeviceTest(e)}},{key:"stopAudioRecordingDeviceTest",value:function(){return this._rtc.stopAudioRecordingDeviceTest()}},{key:"startAudioPlaybackDeviceTest",value:function(e){return this._rtc.startAudioPlaybackDeviceTest(e)}},{key:"stopAudioPlaybackDeviceTest",value:function(){return this._rtc.stopAudioPlaybackDeviceTest()}},{key:"setAudioFrameCallback",value:function(){return this._rtc.setAudioFrameCallback()}},{key:"stopAudioFrameCallback",value:function(){return this._rtc.stopAudioFrameCallback()}},{key:"setBeautyEffectOptions",value:function(e,t){return this._rtc.setBeautyEffectOptions(e,t)}},{key:"setAudioRawDataConfig",value:function(e){return this._rtc.setAudioRawDataConfig(e)}},{key:"createStreamMediaTrack",value:function(){return new Qu(this._rtc)}},{key:"takeSnapshot",value:function(e,t,r){return this._rtc.takeSnapshot(e,t,r)}},{key:"getCurrentFrameData",value:function(e,t,r){return this._rtc.getCurrentFrameData(e,t,r)}}]),r}(x);__webpack_require__(1058);function kl(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Ol=function(e){w(r,e);var t=kl(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r)}(x),Nl=function(e){w(r,e);var t=kl(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r)}(x),xl=function(e){w(r,e);var t=kl(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r)}(x),Dl=function(e){w(r,e);var t=kl(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r,null,[{key:"getRtcVersion",value:function(){return""}}]),r}(x);function Ll(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Pl,Ml=function(e){w(r,e);var t=Ll(r);function r(e){var n;return y(this,r),(n=t.call(this)).adapter=e,n._deviceInfo=new Map,n._deviceIds=new Set,n._initializeDeviceList(),n}return _(r,[{key:"onLocalVideoTrackStateChanged",value:function(e){return this.adapter.onLocalVideoTrackStateChanged(e),0}},{key:"onLocalCameraListChanged",value:function(e){return this.on(Sl.cameraListChanged,e),0}},{key:"getVideoCameraDevices",value:function(){return this.cameraList}},{key:"cameraList",get:function(){var e=this,t=[];return this._deviceIds.forEach((function(r){var n=e._deviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"_emitCameraListChanged",value:function(e,t,r){this.emit(Sl.cameraListChanged,e,t,r)}},{key:"_initializeDeviceList",value:function(){var e=this;this.fetchDeviceList(),this.adapter.rtcEngine.on("videoDeviceStateChanged",(function(){e.fetchDeviceList()}))}},{key:"fetchDeviceList",value:function(){var e=this,t=this.adapter.rtcEngine.getVideoDevices(),r=[];this._deviceIds.clear(),this._deviceInfo.clear(),t.forEach((function(t){e._deviceInfo.set(t.deviceid,t),e._deviceIds.add(t.deviceid),r.push(t)})),this._emitCameraListChanged(!0,r,this.cameraList)}}]),r}(Ol),Bl=function(e){w(r,e);var t=Ll(r);function r(e){var n;return y(this,r),(n=t.call(this)).adapter=e,n._recordingDeviceInfo=new Map,n._recordingDeviceIds=new Set,n._playbackDeviceInfo=new Map,n._playbackDeviceIds=new Set,n._initializeDeviceList(),n}return _(r,[{key:"_initializeDeviceList",value:function(){var e=this;this._fetchRecordingDeviceList(),this._fetchPlaybackDeviceList(),this.adapter.rtcEngine.on("audioDeviceStateChanged",(function(){e._fetchRecordingDeviceList(),e._fetchPlaybackDeviceList()}))}},{key:"onLocalAudioPlaybackTestVolumeChanged",value:function(e){return this.adapter.onLocalAudioPlaybackTestVolumeChanged(e)}},{key:"onLocalAudioTrackStateChanged",value:function(e){return this.adapter.onLocalAudioTrackStateChanged(e)}},{key:"onLocalAudioVolume",value:function(e){return this.adapter.onLocalAudioVolume(e)}},{key:"onLocalRecordingDeviceListChanged",value:function(e){return this.on(Sl.recordingDeviceListChanged,e),0}},{key:"onLocalPlaybackDeviceListChanged",value:function(e){return this.on(Sl.playbackDeviceListChanged,e),0}},{key:"getAudioPlaybackDevices",value:function(){return this.speakerList}},{key:"getAudioRecordingDevices",value:function(){return this.microphoneList}},{key:"microphoneList",get:function(){var e=this,t=[];return this._recordingDeviceIds.forEach((function(r){var n=e._recordingDeviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"speakerList",get:function(){var e=this,t=[];return this._playbackDeviceIds.forEach((function(r){var n=e._playbackDeviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"_emitPlaybackListChanged",value:function(e,t,r){this.emit(Sl.playbackDeviceListChanged,e,t,r)}},{key:"_emitRecordingListChanged",value:function(e,t,r){this.emit(Sl.recordingDeviceListChanged,e,t,r)}},{key:"_fetchPlaybackDeviceList",value:function(){var e=this,t=this.adapter.rtcEngine.getAudioPlaybackDevices(),r=[];this._playbackDeviceInfo.clear(),this._playbackDeviceIds.clear(),t.forEach((function(t){e._playbackDeviceInfo.set(t.deviceid,t),e._playbackDeviceIds.add(t.deviceid),r.push(t)})),this._emitPlaybackListChanged(!0,r,this.speakerList)}},{key:"_fetchRecordingDeviceList",value:function(){var e=this,t=this.adapter.rtcEngine.getAudioRecordingDevices(),r=[];this._recordingDeviceInfo.clear(),this._recordingDeviceIds.clear(),t.forEach((function(t){e._recordingDeviceInfo.set(t.deviceid,t),e._recordingDeviceIds.add(t.deviceid),r.push(t)})),this._emitRecordingListChanged(!0,r,this.microphoneList)}},{key:"onAudioFrame",value:function(e){return 0}}]),r}(Nl),jl=function(){function e(){y(this,e),this.quality=Hu.good,this.qualities=[]}return _(e,[{key:"_updateQualities",value:function(t){this.qualities.push(t),this.qualities.length>e.MAX_QUALITY_NUMBER&&this.qualities.shift()}},{key:"_resetQualities",value:function(){this.qualities=[]}},{key:"toAGQuality",value:function(t){return void 0===t?this.quality:0===t||8===t||7===t?(this._resetQualities(),this.quality):6===t?(this._resetQualities(),this.quality=Hu.down,this.quality):(this._updateQualities(t),this.qualities.length<e.MAX_QUALITY_NUMBER||(this.qualities.reduce((function(e,t){return e+t}))>=e.QUALITY_THRESHOLD?this.quality=Hu.bad:this.quality=Hu.good),this.quality)}}]),e}();jl.MAX_QUALITY_NUMBER=3,jl.QUALITY_THRESHOLD=10;var Ul=li.attach({proxyMethods:!1})(Pl=function(){function e(){y(this,e),this.logger=void 0,this.rtt=void 0,this.downlinkNetworkQuality=0,this.uplinkNetworkQuality=0,this.end2EndDelay=0,this.txVideoPacketLoss=0,this.rxVideoPacketLoss=0,this.cpu=-1,this.cpuTotal=-1,this._downlinkNetworkQualityClacInstance=new jl,this._uplinkNetworkQualityClacInstance=new jl}return _(e,[{key:"networkStats",value:function(){var e={packetLoss:Math.max(this.txVideoPacketLoss,this.rxVideoPacketLoss),cpu:-1,delay:this.end2EndDelay,downlinkNetworkQuality:this._downlinkNetworkQualityClacInstance.toAGQuality(this.downlinkNetworkQuality),uplinkNetworkQuality:this._uplinkNetworkQualityClacInstance.toAGQuality(this.downlinkNetworkQuality)};return e}}]),e}())||Pl;function Fl(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Gl,Ql=function(e){w(n,e);var t,r=Fl(n);function n(){var e;y(this,n);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return(e=r.call.apply(r,[this].concat(i))).logger=void 0,e.running=!1,e.runnable=!0,e}return _(n,[{key:"run",value:function(){var e=this;if(!this.running&&this.runnable){this.running=!0;var t=setTimeout(A(k().mark((function r(){return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return clearTimeout(t),r.next=3,e.onExecution();case 3:e.running=!1;case 4:case"end":return r.stop()}}),r)}))),0)}}},{key:"onExecution",value:(t=A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"stop",value:function(){this.running=!1}}]),n}(x);function ql(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Vl,Kl,Hl,Wl=li.attach({proxyMethods:!1})(Gl=function(e){w(n,e);var t,r=ql(n);function n(e){var t;return y(this,n),(t=r.call(this)).logger=void 0,t.canvas=void 0,t.trackState=zu.stopped,t.cameraEnable=!1,t._rtcEngine=void 0,t.currentCanvas=void 0,t.videoStreamState=0,t._rtcEngine=e.rtcEngine,t}return _(n,[{key:"setCameraTrackState",value:function(e,t){this.trackState!==e&&(this.trackState=e,this.emit(Sl.trackStateChanged,e,Lu.Camera,t))}},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.debug("thread notify start..."),!this.cameraEnable){e.next=17;break}if(0!==(t=this.videoStreamState)&&3!==t){e.next=10;break}return e.delegateYield(k().mark((function e(){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.logger.debug("starting camera..."),r.setCameraTrackState(zu.starting),n=void 0,e.prev=3,0!==t){e.next=7;break}return e.next=7,new Promise((function(e){n=function(t){1!==t&&2!==t||e()},r._rtcEngine.on("localVideoStateChanged",n),r._rtcEngine.enableLocalVideo(!0);var t=$n.shared.rtcConfigs.defaultCameraEncoderConfigurations,i=t?{width:t.width,height:t.height,frameRate:t.frameRate,bitrate:t.bitrate,minFrameRate:0,orientationMode:0,minBitrate:0,mirrorMode:0,degradationPreference:1}:void 0;i&&(r._rtcEngine.setVideoEncoderConfiguration(i),r._rtcEngine.setVideoRenderFPS(i.frameRate))}));case 7:r.setCameraTrackState(zu.started),n&&r._rtcEngine.off("localVideoStateChanged",n),r.logger.debug("camera started."),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(3),r.setCameraTrackState(zu.error),n&&r._rtcEngine.off("localVideoStateChanged",n),e.abrupt("return","break");case 17:case"end":return e.stop()}}),e,null,[[3,12]])}))(),"t0",5);case 5:if("break"!==e.t0){e.next=8;break}return e.abrupt("break",23);case 8:e.next=11;break;case 10:this.trackState!==zu.started&&this.setCameraTrackState(zu.started);case 11:if(this.trackState!==zu.started){e.next=15;break}return(!this.currentCanvas&&this.canvas||this.currentCanvas&&this.canvas&&this.canvas.view!==this.currentCanvas.view)&&(this._rtcEngine.setupLocalVideo(this.canvas.view),this.currentCanvas=this.canvas),this.currentCanvas&&this.currentCanvas.view,e.abrupt("break",23);case 15:e.next=20;break;case 17:if(this.trackState!==zu.stopped&&(this.logger.debug("stopping camera..."),this._rtcEngine.enableLocalVideo(!1),this.currentCanvas&&this.currentCanvas.view,this.setCameraTrackState(zu.stopped),this.logger.debug("camera stopped")),this.trackState!==zu.stopped){e.next=20;break}return e.abrupt("break",23);case 20:return e.next=22,new Promise((function(e){return setTimeout(e,500)}));case 22:if(this.running){e.next=0;break}case 23:this.logger.debug("thread sleep...");case 24:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),n}(Ql))||Gl;function zl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yl(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Xl=_((function e(){y(this,e)}));try{Xl=__webpack_require__(5455).default}catch(e){$n.platform===Vn.Electron&&xn.warn("load electron sdk failed: ".concat(e))}var Jl=li.attach({proxyMethods:!1})((Kl=function(e){w(r,e);var t=Yl(r);function r(){var e;y(this,r),(e=t.call(this)).logger=void 0,e._vdm=void 0,e._adm=void 0,e._engine=void 0,e._channels=new Map,e._configs={},e._screenEventBus=new x,e.cameraThread=void 0,e._localVideoEnabled=!1,e._localAudioEnabled=!1,e.screenShareId=void 0,e.screenShareType=void 0,r.rtcEngine||(r.rtcEngine=new Xl),e._engine=r.rtcEngine;var n=r.logPath,i=0;if(n){xn.info("[RtcAdapterElectron] sdk log path: ".concat(n));window.require("path");i=e.rtcEngine.initialize($n.shared.appId,e._region,{filePath:n,fileSize:1024,level:1})}else xn.warn("[RtcAdapterElectron] no log path found, sdk logs will be put in default folder"),i=e.rtcEngine.initialize($n.shared.appId,e._region);return e.rtcEngine.registerMediaMetadataObserver(),0!==i&&Xn.shared.handleThrowableError(Qn.RTC_ERR_RTC_ENGINE_INITIALZIE_FAILED,new Error("rtc engine initialize failed ".concat(i))),$n.shared.rtcSDKParameters&&$n.shared.rtcSDKParameters.forEach((function(t){e.rtcEngine.setParameters(JSON.stringify(t))})),e._adm=new Bl(S(e)),e._vdm=new Ml(S(e)),e.cameraThread=new Wl(S(e)),e._addEventListeners(),e}return _(r,[{key:"configs",get:function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zl(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},this._configs)}},{key:"rtcEngine",get:function(){return this._engine}},{key:"createRtcChannel",value:function(e,t){var r=this._channels.get(e);return r||(r=new Zl(e,this.configs,t),this._channels.set(e,r)),r}},{key:"getVideoDeviceManager",value:function(){return this._vdm}},{key:"getAudioDeviceManager",value:function(){return this._adm}},{key:"getWindowDevices",value:function(){var e=this;return new Promise((function(t){e.rtcEngine.getScreenWindowsInfo((function(e){t(e.map((function(e){return{id:e.windowId,type:Ju.Window,title:e.name||e.ownerName,image:e.image,isCurrent:"".concat(e.processId)===window.main_pid}})))}))}))}},{key:"getDiaplayDevices",value:function(){var e=this;return new Promise((function(t){e.rtcEngine.getScreenDisplaysInfo((function(e){t(e.map((function(e){return{id:e.displayId.id,type:Ju.Screen,title:"Display",image:e.image}})))}))}))}},{key:"isScreenDeviceEnumerateSupported",value:function(){return!0}},{key:"setVideoCameraDevice",value:function(e){return this.rtcEngine.setVideoDevice(e)}},{key:"setAudioRecordingDevice",value:function(e){return this.rtcEngine.setAudioRecordingDevice(e)}},{key:"setAudioPlaybackDevice",value:function(e){return this.rtcEngine.setAudioPlaybackDevice(e)}},{key:"enableLocalVideo",value:function(e){return this._localVideoEnabled=e,this.updateRole(),this.cameraThread.cameraEnable=e,this.cameraThread.run(),0}},{key:"enableLocalAudio",value:function(e){return this._localAudioEnabled=e,this.updateRole(),this.rtcEngine.enableLocalAudio(e)}},{key:"setupLocalVideo",value:function(e,t){return t===Lu.Camera?(this.cameraThread.canvas=e,this.cameraThread.run()):t===Lu.ScreenShare&&this.rtcEngine.setupLocalVideoSource(e.view),0}},{key:"setupRemoteVideo",value:function(e){return this.rtcEngine.setupRemoteVideo(+e.streamUuid,e.view),this.rtcEngine.setupViewContentMode(+e.streamUuid,e.renderMode===Zu.fill?0:1,void 0),0}},{key:"startAudioRecordingDeviceTest",value:function(e){return this.rtcEngine.startAudioRecordingDeviceTest(e)}},{key:"stopAudioRecordingDeviceTest",value:function(){return this.rtcEngine.stopAudioRecordingDeviceTest()}},{key:"startAudioPlaybackDeviceTest",value:function(e){return this.rtcEngine.startAudioPlaybackDeviceTest(e)}},{key:"stopAudioPlaybackDeviceTest",value:function(){return this.rtcEngine.stopAudioPlaybackDeviceTest()}},{key:"startScreenCapture",value:function(e,t){return this.rtcEngine.videoSourceInitialize($n.shared.appId),void 0!==e&&(this.screenShareId=e,this.screenShareType=t,this._screenEventBus.emit(Sl.trackStateChanged,zu.started,Lu.ScreenShare)),0}},{key:"stopScreenCapture",value:function(){return this.screenShareId=void 0,this.screenShareType=void 0,this.rtcEngine.stopScreenCapture2(),this._screenEventBus.emit(Sl.trackStateChanged,zu.stopped,Lu.ScreenShare),0}},{key:"onLocalAudioPlaybackTestVolumeChanged",value:function(e){return this.on(Sl.localAudioPlaybackVolumeIndicator,e),0}},{key:"onLocalVideoTrackStateChanged",value:function(e){return this.cameraThread.on(Sl.trackStateChanged,e),0}},{key:"onLocalAudioTrackStateChanged",value:function(e){return this.on(Sl.localAudioTrackChanged,e),0}},{key:"onLocalAudioVolume",value:function(e){return this.on(Sl.localAudioVolume,e),0}},{key:"onLocalScreenShareTrackStateChanged",value:function(e){return this._screenEventBus.on(Sl.trackStateChanged,e),0}},{key:"onAudioFrame",value:function(e){return this.logger.warn("electron platform does not support this for now"),0}},{key:"setBeautyEffectOptions",value:function(e,t){return this.rtcEngine.setBeautyEffectOptions(e,t)}},{key:"setAudioFrameCallback",value:function(){return this.logger.warn("electron platform does not support this for now"),0}},{key:"stopAudioFrameCallback",value:function(){return this.logger.warn("electron platform does not support this for now"),0}},{key:"setAudioRawDataConfig",value:function(e){return this.logger.warn("electron platform does not support this for now"),0}},{key:"hasScreenSharePermission",value:function(){return!r.remote||"denied"!==r.remote.systemPreferences.getMediaAccessStatus("screen")}},{key:"takeSnapshot",value:function(e,t,r){var n=this;return new Promise((function(i,o){n.rtcEngine.once("snapshotTaken",(function(e,t,r,n,o,a){i({channel:e,uid:t,filePath:r,width:n,height:o,errCode:a})})),0!==n.rtcEngine.takeSnapshot(e,t,r)&&o()}))}},{key:"getCurrentFrameData",value:function(e,t,r){return this.logger.warn("electron platform does not support this"),new ImageData(1,1)}},{key:"destroy",value:function(){var e=this.rtcEngine.release();return r.rtcEngine=void 0,e}},{key:"_region",get:function(){switch($n.shared.region){case Hn.CN:return 4294967295;case Hn.AP:return 8;case Hn.EU:return 4;case Hn.NA:return 2}}},{key:"_addEventListeners",value:function(){var e=this;this.rtcEngine.on("localVideoStateChanged",(function(t,r){e.logger.info("[rtc] video state changed ".concat(t," ").concat(r)),e.cameraThread.videoStreamState=t})),this.rtcEngine.on("localAudioStateChanged",(function(t){0===t&&e.emit(Sl.localAudioTrackChanged,zu.stopped,Pu.Mic),2!==t&&1!==t||e.emit(Sl.localAudioTrackChanged,zu.started,Pu.Mic)})),this.rtcEngine.on("groupAudioVolumeIndication",(function(t){var r=t.find((function(e){return 0===e.uid})),n=t.find((function(e){return 1===e.uid}));r&&e.emit(Sl.localAudioVolume,r.volume/255),n&&e.emit(Sl.localAudioPlaybackVolumeIndicator,n.volume/255)}))}},{key:"updateRole",value:function(){var e;(null!==(e=$n.shared.rtcConfigs.channelProfile)&&void 0!==e?e:ml.LiveBroadcasting)===ml.LiveBroadcasting&&(this._localVideoEnabled||this._localAudioEnabled?(this.logger.info("update rtc role to host"),this.rtcEngine.setClientRole(1)):(this.logger.info("update rtc role to audience"),this.rtcEngine.setClientRole(2)))}}],[{key:"remote",get:function(){var e=window.require("electron").remote;if(e)return e;xn.warn("enableRemoteModule is not set, we will not be able to tell you screenshare access status in this case. You can still use screenshare feature though")}},{key:"getRtcVersion",value:function(){if(!this.version){var e=this.rtcEngine;e||(e=new Xl),this.version=e.getVersion(),this.rtcEngine||e.release()}var t=this.version,r=t.version,n=t.build;return"".concat(r,".").concat(n)}},{key:"logBasePath",get:function(){if(r.remote)return r.remote.app.getPath("logs")}},{key:"logFolderPath",get:function(){if(this.logBasePath)return window.require("path").resolve(this.logBasePath,"logs")}},{key:"logPath",get:function(){var e=this.logFolderPath;if(e)return window.require("path").resolve(e,"sdk.log")}}]),r}(Dl),Kl.rtcEngine=void 0,Kl.version=void 0,Vl=Kl))||Vl,Zl=li.attach({proxyMethods:!1})(Hl=function(e){w(r,e);var t=Yl(r);function r(e,n,i){var o;return y(this,r),(o=t.call(this)).logger=void 0,o.channelName=void 0,o.uid=void 0,o.base=void 0,o._muteLocalVideo=!1,o._muteLocalAudio=!1,o._metaTask=void 0,o._networkStats=new Ul,o.channelName=e,o.base=i,xu.addPollingTask((function(){o.emit(Dc.NetworkStats,o._networkStats.networkStats())}),Cu.second(2)),o._addEventListeners(),o}return _(r,[{key:"_channelProfile",get:function(){var e;return null!==(e=$n.shared.rtcConfigs.channelProfile)&&void 0!==e?e:ml.LiveBroadcasting}},{key:"getSessionId",value:function(){return this.base.rtcEngine.getCallId()}},{key:"enableDualStream",value:function(e){return 0===this.base.rtcEngine.enableDualStreamMode(e)?Promise.resolve():Promise.reject()}},{key:"setLowStreamParameter",value:function(e){return 0}},{key:"getCurrentFrameData",value:function(e){return this.logger.warn("electron platform does not support this"),new ImageData(1,1)}},{key:"setRemoteVideoStreamType",value:function(e,t){return 0===this.base.rtcEngine.setRemoteVideoStreamType(+e,t)?Promise.resolve():Promise.reject()}},{key:"onConnectionStateChanged",value:function(e){return this.on(Dc.RtcConnectionStateChanged,e),0}},{key:"leave",value:function(e){return(null!=e?e:Fu.main)===Fu.main?this.base.rtcEngine.leaveChannel():this.base.rtcEngine.videoSourceLeave(),Promise.resolve()}},{key:"setClientRole",value:function(e){return this.base.rtcEngine.setClientRole(e===Al.Host?1:2)}},{key:"onNetworkStats",value:function(e){return this.on(Dc.NetworkStats,e),0}},{key:"onAudioVolumeIndication",value:function(e){return this.on(Dc.AudioVolumes,e),0}},{key:"muteRemoteVideo",value:function(e,t){return this.base.rtcEngine.muteRemoteVideoStream(+e,t)}},{key:"muteRemoteAudio",value:function(e,t){return this.base.rtcEngine.muteRemoteAudioStream(+e,t)}},{key:"_startScreenCapture",value:function(){var e=this.base.screenShareType,t=this.base.screenShareId;if(void 0!==t&&void 0!==e)if(e===Ju.Screen){var r="darwin"===process.platform?{id:parseInt(t),width:0,height:0,x:0,y:0}:{width:0,height:0,x:0,y:0};this.base.rtcEngine.videoSourceStartScreenCaptureByScreen(r,{width:0,height:0,x:0,y:0},{width:0,height:0,frameRate:10,captureMouseCursor:!0,windowFocus:!0,bitrate:0,excludeWindowCount:0,excludeWindowList:[]})}else e===Ju.Window&&this.base.rtcEngine.videoSourceStartScreenCaptureByWindow(t,{width:0,height:0,x:0,y:0},{width:0,height:0,frameRate:10,captureMouseCursor:!0,windowFocus:!0,bitrate:0,excludeWindowCount:0,excludeWindowList:[]})}},{key:"join",value:function(e,t,r){var n=this;return new Promise((function(i,o){var a=n.base.rtcEngine;if(r===Fu.main)a.once("joinedChannel",(function(){i()})),a.setChannelProfile(n._channelProfile),a.enableAudioVolumeIndication(500,3),a.joinChannel(e,n.channelName,"",+t),n.uid=+t;else if(r===Fu.sub){a.once("videoSourceJoinedSuccess",(function(){n._startScreenCapture(),i()})),a.videoSourceSetChannelProfile(n._channelProfile);var s=a.videoSourceJoin(e,n.channelName,"",+t);n.logger.info("[rtc] videosource join ".concat(s))}}))}},{key:"muteLocalVideo",value:function(e,t){var r=this.base.rtcEngine.muteLocalVideoStream(e);return 0===r&&(this._muteLocalVideo=e),this._muteLocalVideo&&this._muteLocalAudio?this._stopEmitMetadata():this._emitMetadata(),r}},{key:"muteLocalAudio",value:function(e,t){var r=this.base.rtcEngine.muteLocalAudioStream(e);return 0===r&&(this._muteLocalAudio=e),this._muteLocalVideo&&this._muteLocalAudio?this._stopEmitMetadata():this._emitMetadata(),r}},{key:"muteLocalScreenShare",value:function(e,t){return 0}},{key:"_getRtcState",value:function(e){switch(e){case 1:case 5:return Yu.Idle;case 2:return Yu.Connecting;case 3:return Yu.Connected;case 4:return Yu.Reconnecting}}},{key:"_addEventListeners",value:function(){var e=this,t=this.base.rtcEngine;t.on("networkQuality",(function(t,r,n){0===t&&(e._networkStats.downlinkNetworkQuality=n,e._networkStats.uplinkNetworkQuality=r)})),t.on("rtcStats",(function(t){var r=t.txPacketLossRate,n=t.rxPacketLossRate,i=t.cpuAppUsage,o=t.cpuTotalUsage,a=t.lastmileDelay,s=t.gatewayRtt;e._networkStats.txVideoPacketLoss=r/100,e._networkStats.rxVideoPacketLoss=n/100,e._networkStats.rtt=s,e._networkStats.end2EndDelay=a,e._networkStats.cpu=i/100,e._networkStats.cpuTotal=o/100})),t.on("groupAudioVolumeIndication",(function(t){var r=new Map;t.forEach((function(e){return r.set(""+e.uid,e.volume)})),e.emit(Dc.AudioVolumes,r)})),t.on("connectionStateChanged",(function(t){e.emit(Dc.RtcConnectionStateChanged,e._getRtcState(t))})),t.on("videoSourceJoinedSuccess",(function(){e.emit(Dc.RtcConnectionStateChanged,Yu.Connected,Fu.sub)})),t.on("videoSourceLeaveChannel",(function(){e.emit(Dc.RtcConnectionStateChanged,Yu.Idle,Fu.sub)}))}},{key:"_emitMetadata",value:function(){var e=this;this._metaTask||(this._metaTask=xu.addPollingTask(A(k().mark((function t(){var r;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r="".concat(JSON.stringify({uid:e.uid,ts:Date.now()})),e.base.rtcEngine.sendMetadata({uid:e.uid,timeStampMs:Date.now(),size:r.length,buffer:r});case 2:case"end":return t.stop()}}),t)}))),500))}},{key:"_stopEmitMetadata",value:function(){this._metaTask&&(this._metaTask.stop(),this._metaTask=void 0)}}]),r}(xl))||Hl,$l=__webpack_require__(5904),eh=__webpack_require__.n($l);__webpack_require__(9575),__webpack_require__(2472),__webpack_require__(2990),__webpack_require__(8927),__webpack_require__(3105),__webpack_require__(5035),__webpack_require__(4345),__webpack_require__(7174),__webpack_require__(2846),__webpack_require__(4731),__webpack_require__(7209),__webpack_require__(6319),__webpack_require__(8867),__webpack_require__(7789),__webpack_require__(3739),__webpack_require__(9368),__webpack_require__(4483),__webpack_require__(2056),__webpack_require__(3462),__webpack_require__(678),__webpack_require__(7462),__webpack_require__(3824),__webpack_require__(5021),__webpack_require__(2974),__webpack_require__(5016);function th(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var rh=_((function e(t,r,n,i){var o;y(this,e),this.streamUuid=void 0,this.channelName=void 0,this.view=void 0,this.mirror=void 0,this.streamUuid=t,this.channelName=r,this.view=n,this.mirror=null!==(o=null==i?void 0:i.mirror)&&void 0!==o&&o})),nh=function(e){w(r,e);var t=th(r);function r(e,n,i,o){var a;return y(this,r),(a=t.call(this,e,n,i,o)).renderMode=Zu.fill,void 0!==(null==o?void 0:o.renderMode)&&(a.renderMode=o.renderMode),a}return _(r,null,[{key:"key",value:function(e,t){return"".concat(e,"-").concat(t)}}]),r}(rh),ih=function(e){w(r,e);var t=th(r);function r(e,n){return y(this,r),t.call(this,"0","",e,{mirror:n})}return _(r)}(nh),oh=function(e){w(r,e);var t=th(r);function r(e,n,i){var o,a,s;return y(this,r),(s=t.call(this,"","",n,i)).streamUrl=void 0,s.playVideo=void 0,s.playAudio=void 0,s.streamUrl=e,s.playVideo=null===(o=null==i?void 0:i.playVideo)||void 0===o||o,s.playAudio=null===(a=null==i?void 0:i.playAudio)||void 0===a||a,s}return _(r)}(rh);function ah(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}var sh=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),a=o.charCodeAt(0);if(255!==r[a])throw new TypeError(o+" is ambiguous");r[a]=i}var s=e.length,c=e.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function h(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,i=0;e[t]===c;)n++,t++;for(var o=(e.length-t)*u+1>>>0,a=new Uint8Array(o);e[t];){var l=r[e.charCodeAt(t)];if(255===l)return;for(var h=0,d=o-1;(0!==l||h<i)&&-1!==d;d--,h++)l+=s*a[d]>>>0,a[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=h,t++}if(" "!==e[t]){for(var f=o-i;f!==o&&0===a[f];)f++;for(var p=new Uint8Array(n+(o-f)),g=n;f!==o;)p[g++]=a[f++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var a=(o-i)*l+1>>>0,u=new Uint8Array(a);i!==o;){for(var h=t[i],d=0,f=a-1;(0!==h||d<n)&&-1!==f;f--,d++)h+=256*u[f]>>>0,u[f]=h%s>>>0,h=h/s>>>0;if(0!==h)throw new Error("Non-zero carry");n=d,i++}for(var p=a-n;p!==a&&0===u[p];)p++;for(var g=c.repeat(r);p<a;++p)g+=e.charAt(u[p]);return g},decodeUnsafe:h,decode:function(e){var r=h(e);if(r)return r;throw new Error(`Non-${t} character`)}}};const ch=sh,uh=(new Uint8Array(0),e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")});class lh{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class hh{constructor(e,t,r){this.name=e,this.prefix=t,this.baseDecode=r}decode(e){if("string"==typeof e){if(e[0]===this.prefix)return this.baseDecode(e.slice(1));throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)}throw Error("Can only multibase decode strings")}or(e){return fh(this,e)}}class dh{constructor(e){this.decoders=e}or(e){return fh(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const fh=(e,t)=>new dh({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class ph{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new lh(e,t,r),this.decoder=new hh(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const gh=({name:e,prefix:t,encode:r,decode:n})=>new ph(e,t,r,n),vh=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=ch(r,t);return gh({prefix:e,name:t,encode:n,decode:e=>uh(i(e))})},mh=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>gh({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<<r)-1;let o="",a=0,s=0;for(let n=0;n<e.length;++n)for(s=s<<8|e[n],a+=8;a>r;)a-=r,o+=t[i&s>>a];if(a&&(o+=t[i&s<<r-a]),n)for(;o.length*r&7;)o+="=";return o})(e,n,r),decode:t=>((e,t,r,n)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const a=new Uint8Array(o*r/8|0);let s=0,c=0,u=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${n} character`);c=c<<r|o,s+=r,s>=8&&(s-=8,a[u++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a})(t,n,r,e)}),Ah=gh({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),yh=mh({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),bh=mh({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),_h=vh({prefix:"9",name:"base10",alphabet:"0123456789"}),Eh=mh({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),wh=mh({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Ih=mh({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Sh=mh({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Th=mh({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Ch=mh({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Rh=mh({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),kh=mh({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Oh=mh({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Nh=mh({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),xh=mh({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Dh=vh({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Lh=vh({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Ph=vh({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Mh=vh({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Bh=mh({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),jh=mh({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Uh=mh({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Fh=mh({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Gh=function e(t,r,n){r=r||[];var i=n=n||0;for(;t>=Qh;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},Qh=Math.pow(2,31);var qh=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return e.bytes=a-r,i};var Vh=Math.pow(2,7),Kh=Math.pow(2,14),Hh=Math.pow(2,21),Wh=Math.pow(2,28),zh=Math.pow(2,35),Yh=Math.pow(2,42),Xh=Math.pow(2,49),Jh=Math.pow(2,56),Zh=Math.pow(2,63);const $h={encode:Gh,decode:qh,encodingLength:function(e){return e<Vh?1:e<Kh?2:e<Hh?3:e<Wh?4:e<zh?5:e<Yh?6:e<Xh?7:e<Jh?8:e<Zh?9:10}},ed=(e,t,r=0)=>($h.encode(e,t,r),t),td=e=>$h.encodingLength(e),rd=(e,t)=>{const r=t.byteLength,n=td(e),i=n+td(r),o=new Uint8Array(i+r);return ed(e,o,0),ed(r,o,n),o.set(t,i),new nd(e,r,t,o)};class nd{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const id=({name:e,code:t,encode:r})=>new od(e,t,r);class od{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?rd(this.code,t):t.then((e=>rd(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ad=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),sd=id({name:"sha2-256",code:18,encode:ad("SHA-256")}),cd=id({name:"sha2-512",code:19,encode:ad("SHA-512")}),ud=uh,ld={code:0,name:"identity",encode:ud,digest:e=>rd(0,ud(e))},hd="raw",dd=85,fd=e=>uh(e),pd=e=>uh(e),gd=new TextEncoder,vd=new TextDecoder,md="json",Ad=512,yd=e=>gd.encode(JSON.stringify(e)),bd=e=>JSON.parse(vd.decode(e));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom");Symbol.for("@ipld/js-cid/CID");const _d={...t,...r,...n,...i,...o,...a,...s,...c,...u};function Ed(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const wd=Ed("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Id=Ed("ascii","a",(e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(e=>{e=e.substring(1);const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}));var Sd,Td,Cd,Rd,kd,Od;function Nd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nd(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Dd(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Ld,Pd,Md,Bd=function(e){w(r,e);var t=Dd(r);function r(){var e;y(this,r);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).track=void 0,e}return _(r)}(Ql),jd=li.attach({proxyMethods:!1})(Sd=function(e){w(n,e);var t,r=Dd(n);function n(){var e;y(this,n);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return(e=r.call.apply(r,[this].concat(i))).canvas=void 0,e.trackState=zu.stopped,e.cameraEnable=!1,e._deviceId=void 0,e._deviceChanged=!1,e}return _(n,[{key:"setCameraTrackState",value:function(e,t){this.trackState!==e&&(this.trackState=e,this.emit(Sl.trackStateChanged,e,Lu.Camera,t))}},{key:"setDevice",value:function(e){this._deviceId=e,this._deviceChanged=!0}},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r,n,i=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.debug("thread notify start...");case 1:if(!this.cameraEnable){e.next=40;break}if(!this._deviceChanged){e.next=15;break}if(!this.track){e.next=14;break}if(e.prev=4,!this._deviceId){e.next=8;break}return e.next=8,this.track.setDevice(this._deviceId);case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(4),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_CAM_ERR,e.t0),e.abrupt("break",46);case 14:this._deviceChanged=!1;case 15:if(this.track){e.next=35;break}return this.logger.debug("starting camera..."),this.setCameraTrackState(zu.starting),e.prev=18,t=$n.shared.rtcConfigs,r=t.defaultCameraEncoderConfigurations,n=r?{width:r.width,height:r.height,frameRate:r.frameRate,bitrateMax:r.bitrate}:void 0,e.next=24,eh().createCameraVideoTrack({cameraId:this._deviceId,encoderConfig:n});case 24:this.track=e.sent,this.track.on("track-ended",(function(){var e;i.logger.warn("camera track ended"),null===(e=i.track)||void 0===e||e.close(),i.track=void 0,i.setCameraTrackState(zu.stopped)})),this.setCameraTrackState(zu.started),e.next=34;break;case 29:return e.prev=29,e.t1=e.catch(18),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_CAM_ERR,e.t1),this.setCameraTrackState(zu.error),e.abrupt("break",46);case 34:this.logger.debug("camera started.");case 35:if(this.track&&this.canvas&&this.canvas.view&&(this.track.play(this.canvas.view),this.setCameraTrackState(zu.started)),!this.track||!(this.canvas&&this.canvas.view&&this.track.isPlaying)&&this.canvas&&this.canvas.view){e.next=38;break}return e.abrupt("break",46);case 38:e.next=43;break;case 40:if(this.track&&(this.logger.debug("stopping camera..."),this.track.stop(),this.track.close(),this.track=void 0,this.setCameraTrackState(zu.stopped),this.logger.debug("camera stopped")),this.track){e.next=43;break}return e.abrupt("break",46);case 43:return e.next=45,new Promise((function(e){return setTimeout(e,500)}));case 45:if(this.running){e.next=1;break}case 46:this.logger.debug("thread sleep...");case 47:case"end":return e.stop()}}),e,this,[[4,10],[18,29]])}))),function(){return t.apply(this,arguments)})}]),n}(Bd))||Sd,Ud=li.attach({proxyMethods:!1})(Td=function(e){w(i,e);var t,r,n=Dd(i);function i(){var e;y(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).pcmTrack=void 0,e.micEnable=!1,e._recordingDeviceId=void 0,e._recordingDeviceChanged=!1,e.trackState=zu.stopped,e._volumePollingTask=void 0,e._audioRawConfig={frameSize:1024},e}return _(i,[{key:"setMicTrackState",value:function(e,t){var r,n=this;this.trackState!==e&&(this.trackState=e,this.emit(Sl.trackStateChanged,e,Pu.Mic,t),e===zu.started?this._volumePollingTask||(this._volumePollingTask=xu.addPollingTask((function(){if(n.track){var e=n.track.getVolumeLevel();e=Math.min(3*e,1),n.emit(Sl.localAudioVolume,e)}}),Cu.second(.5))):(null===(r=this._volumePollingTask)||void 0===r||r.stop(),this._volumePollingTask=void 0))}},{key:"setRecordingDevice",value:function(e){this._recordingDeviceId=e,this._recordingDeviceChanged=!0}},{key:"setAudioRawDataConfig",value:function(e){this._audioRawConfig=xd(xd({},this._audioRawConfig),e)}},{key:"setAudioFrameCallback",value:(r=A(k().mark((function e(){var t,r,n,i=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._recordingDeviceId){e.next=3;break}return this.logger.warn("Cannot set PCM callback as there's no selected recording devices"),e.abrupt("return");case 3:if(t=this._audioRawConfig,r=t.sampleRate,n=t.frameSize,this.pcmTrack){e.next=8;break}return e.next=7,eh().createMicrophoneAudioTrack({microphoneId:this._recordingDeviceId,encoderConfig:{sampleRate:r}});case 7:this.pcmTrack=e.sent;case 8:this.logger.info("Attach PCM listener"),this.pcmTrack.setAudioFrameCallback((function(e){i.emit(Sl.localAudioFrame,e)}),n);case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"stopAudioFrameCallback",value:function(){this.pcmTrack&&(this.logger.info("Detach PCM listener"),this.pcmTrack.setAudioFrameCallback(null),this.pcmTrack.close()),this.pcmTrack=void 0}},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r,n,i=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.info("thread notify start...");case 1:if(!this.micEnable){e.next=40;break}if(!this._recordingDeviceChanged){e.next=16;break}if(!this.track){e.next=15;break}if(e.prev=4,!this._recordingDeviceId){e.next=8;break}return e.next=8,this.track.setDevice(this._recordingDeviceId);case 8:e.next=15;break;case 10:return e.prev=10,e.t0=e.catch(4),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_MIC_ERR,e.t0),this.setMicTrackState(zu.error),e.abrupt("break",46);case 15:this._recordingDeviceChanged=!1;case 16:if(this.track){e.next=36;break}return this.logger.debug("starting mic..."),this.setMicTrackState(zu.starting),e.prev=19,t=$n.shared.rtcConfigs,r=t.defaultMicrophoneEncoderConfigurations,n=r?{sampleRate:r.sampleRate,sampleSize:r.sampleSize,stereo:r.stereo,bitrate:r.bitrate}:void 0,e.next=25,eh().createMicrophoneAudioTrack({microphoneId:this._recordingDeviceId,encoderConfig:n});case 25:this.track=e.sent,this.track.on("track-ended",(function(){var e;i.logger.warn("mic track ended"),null===(e=i.track)||void 0===e||e.close(),i.track=void 0,i.setMicTrackState(zu.stopped)})),this.setMicTrackState(zu.started),e.next=35;break;case 30:return e.prev=30,e.t1=e.catch(19),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_MIC_ERR,e.t1),this.setMicTrackState(zu.error),e.abrupt("break",46);case 35:this.logger.debug("mic started.");case 36:if(!this.track){e.next=38;break}return e.abrupt("break",46);case 38:e.next=43;break;case 40:if(this.track&&(this.track.stop(),this.track.close(),this.track=void 0,this.setMicTrackState(zu.stopped)),this.track){e.next=43;break}return e.abrupt("break",46);case 43:return e.next=45,new Promise((function(e){return setTimeout(e,500)}));case 45:if(this.running){e.next=1;break}case 46:this.logger.debug("thread sleep...");case 47:case"end":return e.stop()}}),e,this,[[4,10],[19,30]])}))),function(){return t.apply(this,arguments)})}]),i}(Bd))||Td,Fd=li.attach({proxyMethods:!1})(Cd=function(e){w(n,e);var t,r=Dd(n);function n(){var e;y(this,n);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return(e=r.call.apply(r,[this].concat(i))).canvas=void 0,e.audioTrack=void 0,e.withAudio=!1,e.screenEnable=!1,e.trackState=zu.stopped,e}return _(n,[{key:"playing",get:function(){return this.track&&this.track.isPlaying&&(!this.audioTrack||this.audioTrack&&this.audioTrack.isPlaying)}},{key:"setScreenShareTrackState",value:function(e,t){this.trackState!==e&&(this.trackState=e,this.emit(Sl.trackStateChanged,e,Lu.ScreenShare,t))}},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r,n,i,o=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.debug("thread notify start...");case 1:if(!this.screenEnable){e.next=37;break}if(this.track){e.next=32;break}if(this.logger.debug("starting screenshare..."),this.setScreenShareTrackState(zu.starting),e.prev=5,t=$n.shared.rtcConfigs,r=t.defaultScreenEncoderConfigurations,n=r?{width:r.width,height:r.height,frameRate:r.frameRate,bitrateMax:r.bitrate}:void 0,!this.withAudio){e.next=17;break}return e.next=12,eh().createScreenVideoTrack({encoderConfig:n},"enable");case 12:i=e.sent,this.track=i[0],this.audioTrack=i[1],e.next=20;break;case 17:return e.next=19,eh().createScreenVideoTrack({encoderConfig:n},"disable");case 19:this.track=e.sent;case 20:this.track.on("track-ended",(function(){var e;o.logger.warn("camera track ended"),null===(e=o.track)||void 0===e||e.close(),o.track=void 0,o.setScreenShareTrackState(zu.stopped)})),this.setScreenShareTrackState(zu.started),e.next=31;break;case 24:if(e.prev=24,e.t0=e.catch(5),"PERMISSION_DENIED"!==e.t0.code||/system/.test(e.t0.message)){e.next=28;break}return e.abrupt("break",44);case 28:return this.setScreenShareTrackState(zu.error,"PERMISSION_DENIED"===e.t0.code?Wu.PermissionDenied:Wu.Unknown),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_SCREEN_SHARE_ERR,e.t0),e.abrupt("break",44);case 31:this.logger.debug("screenshare started.");case 32:if(this.track&&this.canvas&&this.canvas.view&&this.track.play(this.canvas.view),!(!this.canvas||this.canvas&&this.playing)){e.next=35;break}return e.abrupt("break",44);case 35:e.next=41;break;case 37:if(this.track&&(this.logger.debug("stopping screenshare..."),this.track.stop(),this.track.close(),this.track=void 0,this.logger.debug("screenshare stopped"),this.setScreenShareTrackState(zu.stopped)),this.audioTrack&&(this.logger.debug("stopping screenshare audio..."),this.audioTrack.stop(),this.audioTrack.close(),this.audioTrack=void 0,this.logger.debug("screenshare audio stopped")),this.track||this.audioTrack){e.next=41;break}return e.abrupt("break",44);case 41:return e.next=43,new Promise((function(e){return setTimeout(e,500)}));case 43:if(this.running){e.next=1;break}case 44:this.logger.debug("thread sleep...");case 45:case"end":return e.stop()}}),e,this,[[5,24]])}))),function(){return t.apply(this,arguments)})}]),n}(Bd))||Cd,Gd=li.attach({proxyMethods:!1})((kd=function(e){w(i,e);var t,r,n=Dd(i);function i(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return y(this,i),(t=n.call(this))._options=r,t._client=void 0,t.mute=!1,t._trackThread=void 0,t._metaTask=void 0,t._client=e,t}return _(i,[{key:"track",get:function(){var e;return null===(e=this._trackThread)||void 0===e?void 0:e.track}},{key:"setTrackThread",value:function(e){var t;null===(t=this._trackThread)||void 0===t||t.off(Sl.trackStateChanged,this.handleTrackStateChanged),this._trackThread=e,e.on(Sl.trackStateChanged,this.handleTrackStateChanged)}},{key:"handleTrackStateChanged",value:function(e){e===zu.started&&this.run()}},{key:"isTrackPublished",value:function(e){return void 0!==this._client.localTracks.find((function(t){return t===e}))}},{key:"_emitMetadata",value:function(){var e=this;this._options.emitTsMetadata&&!this._metaTask&&(this._metaTask=xu.addPollingTask(A(k().mark((function t(){var r,n,i;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new Uint8Array([0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]),n=(new TextEncoder).encode("".concat(JSON.stringify({uid:e._client.uid,ts:Date.now()}))),i=ah([r,n]),t.next=5,e._client.sendMetadata(i);case 5:case"end":return t.stop()}}),t)}))),500))}},{key:"_stopEmitMetadata",value:function(){this._metaTask&&(this._metaTask.stop(),this._metaTask=void 0)}},{key:"_setClientRole",value:(r=A(k().mark((function e(t){var r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null!==(r=$n.shared.rtcConfigs.channelProfile)&&void 0!==r?r:ml.LiveBroadcasting)!==ml.LiveBroadcasting){e.next=4;break}return e.next=4,this._client.setClientRole(t);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r,n=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.debug("thread notify start..."),t=0;case 2:if(this.mute){e.next=27;break}if(!this.track||this.isTrackPublished(this.track)){e.next=23;break}return this.logger.debug("publishing..."),e.prev=5,e.next=8,this._setClientRole("host");case 8:if(!(r=this._client.localTracks.find((function(e){var t,r;return e.trackMediaType===(null===(t=n._trackThread)||void 0===t||null===(r=t.track)||void 0===r?void 0:r.trackMediaType)})))){e.next=14;break}return this.logger.warn("unpublishing old ".concat(r.trackMediaType," track...")),e.next=13,this._client.unpublish(r);case 13:this._stopEmitMetadata();case 14:return e.next=16,this._client.publish(this.track);case 16:this._emitMetadata(),this.logger.debug("published."),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(5),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_TRACK_PUBLISH_FAIL,e.t0);case 23:if(!this.track||!this.isTrackPublished(this.track)){e.next=25;break}return e.abrupt("break",51);case 25:e.next=46;break;case 27:if(!this.track||!this.isTrackPublished(this.track)){e.next=44;break}return this.logger.debug("unpublishing..."),e.prev=29,e.next=32,this._client.unpublish(this.track);case 32:if(this._stopEmitMetadata(),0!==this._client.localTracks.length){e.next=36;break}return e.next=36,this._setClientRole("audience");case 36:e.next=43;break;case 38:return e.prev=38,e.t1=e.catch(29),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_TRACK_UNPUBLISH_FAIL,e.t1),this.emit("trackUnpublishErr",e.t1),e.abrupt("break",51);case 43:this.logger.debug("unpublished.");case 44:if(!this.track||this.isTrackPublished(this.track)){e.next=46;break}return e.abrupt("break",51);case 46:return e.next=48,new Promise((function(e){return setTimeout(e,500)}));case 48:++t%10==0&&this.logger.debug("thread running...");case 50:if(this.running){e.next=2;break}case 51:this.logger.debug("thread sleep...");case 52:case"end":return e.stop()}}),e,this,[[5,20],[29,38]])}))),function(){return t.apply(this,arguments)})}]),i}(Ql),du(kd.prototype,"handleTrackStateChanged",[vu],Object.getOwnPropertyDescriptor(kd.prototype,"handleTrackStateChanged"),kd.prototype),Rd=kd))||Rd,Qd=li.attach({proxyMethods:!1})(Od=function(e){w(n,e);var t,r=Dd(n);function n(e,t,i){var o,a=i.channelName,s=i.muteMap,c=i.canvasMap,u=i.mediaType;return y(this,n),(o=r.call(this))._client=void 0,o._user=void 0,o._channelName=void 0,o._muteMap=void 0,o._canvasMap=void 0,o._mediaType=void 0,o._volumePollingTask=void 0,o._client=e,o._user=t,o._muteMap=s,o._mediaType=u,o._canvasMap=c,o._channelName=a,o}return _(n,[{key:"mute",get:function(){return!!this._muteMap.has(this.streamUuid)&&this._muteMap.get(this.streamUuid)}},{key:"streamUuid",get:function(){return"".concat(this._user.uid)}},{key:"canvas",get:function(){if("audio"!==this._mediaType&&this._canvasMap){var e=nh.key(this.streamUuid,this._channelName);return this._canvasMap.get(e)}}},{key:"isTrackSubscribed",value:function(){return"video"===this._mediaType?!!this._user.videoTrack:!!this._user.audioTrack}},{key:"track",get:function(){return"video"===this._mediaType?this._user.videoTrack:this._user.audioTrack}},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.debug("thread notify start..."),t=0;case 2:if(this.mute){e.next=19;break}if(this.isTrackSubscribed()){e.next=14;break}return this.logger.debug("[".concat(this._user.uid,"] subscribing ").concat(this._mediaType,"...")),e.prev=5,e.next=8,this._client.subscribe(this._user,this._mediaType);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_TRACK_SUBSCRIBE_FAIL,e.t0);case 13:this.logger.debug("[".concat(this._user.uid,"] subscribed."));case 14:if("video"===this._mediaType?this.track&&this.canvas&&this.canvas.view&&this.track.play(this.canvas.view,{fit:this.canvas.renderMode===Zu.fill?"cover":"contain"}):this.track&&(this._volumePollingTask||(this._volumePollingTask=xu.addPollingTask((function(){var e=r.track.getVolumeLevel();e=Math.min(3*e,1),r.emit("audio-volume-indication",e)}),Cu.second(.5))),this.track.play()),!this.isTrackSubscribed()){e.next=17;break}return e.abrupt("break",40);case 17:e.next=35;break;case 19:if(!this.isTrackSubscribed()){e.next=32;break}return this.logger.debug("[".concat(this._user.uid,"] unpublishing...")),e.prev=21,e.next=24,this._client.unsubscribe(this._user,this._mediaType);case 24:e.next=31;break;case 26:return e.prev=26,e.t1=e.catch(21),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_TRACK_UNSUBSCRIBE_FAIL,e.t1),this.emit("trackPublishErr",e.t1),e.abrupt("break",40);case 31:this.logger.debug("[".concat(this._user.uid,"] unpublished."));case 32:if(this.track&&(this.logger.debug("[".concat(this._user.uid,"] stopping track...")),this.track.stop(),this._volumePollingTask&&this._volumePollingTask.stop(),this.logger.debug("[".concat(this._user.uid,"] track stopped"))),this.isTrackSubscribed()){e.next=35;break}return e.abrupt("break",40);case 35:return e.next=37,new Promise((function(e){return setTimeout(e,500)}));case 37:++t%10==0&&this.logger.info("thread running...");case 39:if(this.running){e.next=2;break}case 40:this.logger.info("thread sleep...");case 41:case"end":return e.stop()}}),e,this,[[5,10],[21,26]])}))),function(){return t.apply(this,arguments)})}]),n}(Ql))||Od,qd=(__webpack_require__(2479),__webpack_require__(5306),li.attach({proxyMethods:!1})(Ld=function(){function e(){y(this,e),this.logger=void 0,this.rtt=void 0,this.downlinkNetworkQuality=0,this.uplinkNetworkQuality=0,this.end2EndDelay=0,this.txVideoPacketLoss=0,this.rxVideoPacketLoss=0,this._downlinkNetworkQualityClacInstance=new jl,this._uplinkNetworkQualityClacInstance=new jl}return _(e,[{key:"networkStats",value:function(){var e={packetLoss:Math.max(this.txVideoPacketLoss,this.rxVideoPacketLoss),cpu:-1,delay:this.end2EndDelay,downlinkNetworkQuality:this._downlinkNetworkQualityClacInstance.toAGQuality(this.downlinkNetworkQuality),uplinkNetworkQuality:this._uplinkNetworkQualityClacInstance.toAGQuality(this.downlinkNetworkQuality)};return e}}]),e}())||Ld);function Vd(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Kd=li.attach({proxyMethods:!1})(Pd=function(e){w(i,e);var t,r,n=Vd(i);function i(e,t,r,o){var a;y(this,i),(a=n.call(this)).logger=void 0,a._client=void 0,a._base=void 0,a._videoPublishThread=void 0,a._audioPublishThread=void 0,a._screenPublishThread=void 0,a.configs=void 0,a._connectionState=Yu.Idle,a.channelName=void 0,a.connectionType=void 0,a._networkStats=new qd,a._recentLocalPacketStats=[],a._recentRemotePacketStats=[],a.channelName=e,a.configs=t,a._base=r,a.connectionType=o,eh().setArea({areaCode:[a._rtcRegion()]}),$n.shared.rtcSDKParameters&&$n.shared.rtcSDKParameters.forEach((function(e){a._setPrivateParameter(e)})),a._client=eh().createClient({codec:a.configs.codec,mode:a.configs.mode});var s=$n.shared.rtcConfigs.encryption;s&&a._client.setEncryptionConfig(a._getEncryptionMode(s.mode),s.key);var c="h264"===a.configs.codec;return a._videoPublishThread=new Gd(a._client,{emitTsMetadata:c}),a._audioPublishThread=new Gd(a._client,{emitTsMetadata:c}),a._screenPublishThread=new Gd(a._client,{emitTsMetadata:c}),a._videoPublishThread.runnable=!1,a._audioPublishThread.runnable=!1,a._screenPublishThread.runnable=!1,a._client.on("connection-state-change",(function(e){a.setConnectionState(a._getRtcState(e))})),a._client.on("network-quality",(function(e){a._networkStats.uplinkNetworkQuality=e.uplinkNetworkQuality,a._networkStats.downlinkNetworkQuality=e.downlinkNetworkQuality;var t=a._client.getLocalVideoStats(),r=a._client.getRemoteVideoStats(),n=a._client.getRTCStats();a._networkStats.rtt=n.RTT;var i={lossPackets:t.sendPacketsLost,totalPackets:t.sendPackets};a._recentLocalPacketStats.unshift(i),a._recentLocalPacketStats=a._recentLocalPacketStats.slice(0,10);for(var o=0,s=0,c=0,u=Object.values(r),l=0,h=u;l<h.length;l++){var d=h[l];o+=d.receivePacketsLost,s+=d.receivePackets,c+=d.end2EndDelay}var f={lossPackets:o,totalPackets:s};a._recentRemotePacketStats.unshift(f),a._recentRemotePacketStats=a._recentRemotePacketStats.slice(0,10),u.length>0&&(a._networkStats.end2EndDelay=0===u.length?0:c/u.length);var p=a._getRecentPacketLoss(),g=p.rx,v=p.tx;a._networkStats.rxVideoPacketLoss=g,a._networkStats.txVideoPacketLoss=v,a.emit("network-stats-changed",a._networkStats.networkStats(),a.connectionType)})),a}return _(i,[{key:"base",get:function(){return this._base}},{key:"_setPrivateParameter",value:function(e){Object.keys(e).forEach((function(t){var r=e[t];t=t.replace("rtc.","").toUpperCase(),"string"!=typeof r&&(r=JSON.stringify(r)),eh().setParameter(t,r)}))}},{key:"_getRecentPacketLoss",value:function(){var e=this._recentLocalPacketStats[0],t=this._recentLocalPacketStats[this._recentLocalPacketStats.length-1],r=e.lossPackets-t.lossPackets,n=e.totalPackets-t.totalPackets,i=this._recentRemotePacketStats[0],o=this._recentRemotePacketStats[this._recentRemotePacketStats.length-1],a=i.lossPackets-o.lossPackets,s=i.totalPackets-o.totalPackets;return{rx:Math.abs(n>0?r/n:0),tx:Math.abs(s>0?a/s:0)}}},{key:"ready",get:function(){return this._connectionState===Yu.Connected}},{key:"setConnectionState",value:function(e){this._connectionState=e,e===Yu.Connected&&(this._videoPublishThread.runnable=!0,this._audioPublishThread.runnable=!0,this._screenPublishThread.runnable=!0,this._videoPublishThread.run(),this._audioPublishThread.run(),this._screenPublishThread.run()),e===Yu.Idle&&(this._videoPublishThread.runnable=!1,this._audioPublishThread.runnable=!1,this._screenPublishThread.runnable=!1),this.emit("rtc-connection-state-changed",e,this.connectionType)}},{key:"getClientSessionId",value:function(){return this._client._sessionId}},{key:"join",value:(r=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._client.join(t,this.channelName,r,+n);case 2:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"leave",value:(t=A(k().mark((function e(){var t,r,n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._videoPublishThread.stop(),this._audioPublishThread.stop(),this._screenPublishThread.stop(),e.next=5,gl(this._client.leave());case 5:t=e.sent,r=v(t,1),(n=r[0])&&Xn.shared.handleNonThrowableError(Qn.RTC_ERR_CLIENT_LEAVE_CHANNEL_FAIL,n);case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"muteLocalVideo",value:function(e){return this.logger.info("muteLocalVideo ".concat(e)),this.base.cameraThread?(this._videoPublishThread.mute=e,this._videoPublishThread.setTrackThread(this.base.cameraThread),this._videoPublishThread.run(),0):-1}},{key:"muteLocalAudio",value:function(e){return this.logger.info("muteLocalAudio ".concat(e)),this.base.micThread?(this._audioPublishThread.mute=e,this._audioPublishThread.setTrackThread(this.base.micThread),this._audioPublishThread.run(),0):-1}},{key:"muteLocalScreenShare",value:function(e){return this.logger.info("muteLocalScreenShare ".concat(e)),this.base.screenThread?(this._screenPublishThread.mute=e,this._screenPublishThread.setTrackThread(this.base.screenThread),this._screenPublishThread.run(),0):-1}},{key:"_rtcRegion",value:function(){switch($n.shared.region){case Hn.CN:return"GLOBAL";case Hn.AP:return"ASIA";case Hn.EU:return"EUROPE";case Hn.NA:return"NORTH_AMERICA"}}},{key:"_getRtcState",value:function(e){switch(e){case"CONNECTED":return Yu.Connected;case"CONNECTING":return Yu.Connecting;case"DISCONNECTING":case"DISCONNECTED":return Yu.Idle;case"RECONNECTING":return Yu.Reconnecting}}},{key:"_getEncryptionMode",value:function(e){switch(e){case Xu.AES_128_ECB:return"aes-128-ecb";case Xu.AES_128_GCM:return"aes-128-gcm";case Xu.AES_128_XTS:return"aes-128-xts";case Xu.AES_256_XTS:return"aes-256-xts";case Xu.AES_256_GCM:return"aes-256-gcm";case Xu.AES_256_XTS:return"aes-256-xts"}return"none"}}]),i}(x))||Pd,Hd=(Md=function(e){w(n,e);var t,r=Vd(n);function n(e,t,i,o){var a;y(this,n),(a=r.call(this,e,t,i,o))._remoteRtcUsers=new Map,a._muteRemoteVideo=new Map,a._muteRemoteAudio=new Map,a._audioVolumes=new Map,a._subscribeVideoThreads=new Map,a._subscribeAudioThreads=new Map;var s=(0,U.throttle)(a._notifyStreamVolumes,500);return a._client.on("user-published",(function(e,t){var r="".concat(e.uid);if(a._remoteRtcUsers.set(r,e),"video"===t){var n=new Qd(a._client,e,{channelName:a.channelName,muteMap:a._muteRemoteVideo,mediaType:"video",canvasMap:a.base.remoteCanvas});a._subscribeVideoThreads.set(r,n),n.runnable=a.ready}else{var i=new Qd(a._client,e,{channelName:a.channelName,muteMap:a._muteRemoteAudio,mediaType:"audio"});i.on("audio-volume-indication",(function(e){a._audioVolumes.set(r,e),s()})),a._subscribeAudioThreads.set(r,i),i.runnable=a.ready}a._notifySubscribeThreads(r,t)})),a._client.on("user-unpublished",(function(e){if(!e.hasAudio&&!e.hasVideo){var t="".concat(e.uid);a._remoteRtcUsers.delete(t);var r=a._subscribeVideoThreads.get(t),n=a._subscribeAudioThreads.get(t);r&&(r.stop(),a._subscribeVideoThreads.delete(t)),n&&(n.stop(),a._audioVolumes.delete(t),a._subscribeAudioThreads.delete(t))}})),a._client.on("user-left",(function(e){var t="".concat(e.uid);a._remoteRtcUsers.delete(t);var r=a._subscribeVideoThreads.get(t),n=a._subscribeAudioThreads.get(t);r&&(r.stop(),a._subscribeVideoThreads.delete(t)),n&&(n.stop(),a._audioVolumes.delete(t),a._subscribeAudioThreads.delete(t))})),a}return _(n,[{key:"videoSubscribeThread",value:function(e){return this._subscribeVideoThreads.get(e)}},{key:"_notifyStreamVolumes",value:function(){this.emit("audio-volume-indication",this._audioVolumes)}},{key:"_notifySubscribeThreads",value:function(e,t){var r="video"===t?this._subscribeVideoThreads.get(e):this._subscribeAudioThreads.get(e);r&&r.run()}},{key:"setConnectionState",value:function(e){e===Yu.Connected&&(this._subscribeVideoThreads.forEach((function(e){e.runnable=!0,e.run()})),this._subscribeAudioThreads.forEach((function(e){e.runnable=!0,e.run()}))),e===Yu.Idle&&(this._subscribeVideoThreads.forEach((function(e){e.runnable=!1})),this._subscribeAudioThreads.forEach((function(e){e.runnable=!1,e.run()}))),Au(C(n.prototype),"setConnectionState",this).call(this,e)}},{key:"muteRemoteVideo",value:function(e,t){return this.logger.info("muteRemoteVideo ".concat(e," ").concat(t)),this._muteRemoteVideo.set(e,t),this._notifySubscribeThreads(e,"video"),0}},{key:"muteRemoteAudio",value:function(e,t){return this.logger.info("muteRemoteAudio ".concat(e," ").concat(t)),this._muteRemoteAudio.set(e,t),this._notifySubscribeThreads(e,"audio"),0}},{key:"enableDualStream",value:function(e){return e?this._client.enableDualStream():this._client.disableDualStream()}},{key:"setLowStreamParameter",value:function(e){return this._client.setLowStreamParameter(e),0}},{key:"setRemoteVideoStreamType",value:function(e,t){return this._client.setRemoteVideoStreamType(+e,t)}},{key:"leave",value:(t=A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Au(C(n.prototype),"leave",this).call(this);case 2:this._remoteRtcUsers.clear(),this._subscribeVideoThreads.forEach((function(e){e.stop()})),this._subscribeVideoThreads.clear(),this._subscribeAudioThreads.forEach((function(e){e.stop()})),this._subscribeAudioThreads.clear(),this._remoteRtcUsers.clear();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),n}(Kd),du(Md.prototype,"_notifyStreamVolumes",[vu],Object.getOwnPropertyDescriptor(Md.prototype,"_notifyStreamVolumes"),Md.prototype),Md),Wd=function(e){w(r,e);var t=Vd(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r,[{key:"setLowStreamParameter",value:function(e){return this._client.setLowStreamParameter(e),0}},{key:"setRemoteVideoStreamType",value:function(e,t){return this._client.setRemoteVideoStreamType(+e,t)}},{key:"enableDualStream",value:function(e){return e?this._client.enableDualStream():this._client.disableDualStream()}}]),r}(Kd);function zd(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Yd=function(e){w(n,e);var t,r=zd(n);function n(e,t){var i;return y(this,n),(i=r.call(this)).adapter=e,i._deviceInfo=new Map,i._deviceIds=new Set,i._initializeDeviceList(t),i}return _(n,[{key:"onLocalVideoTrackStateChanged",value:function(e){return this.adapter.onLocalVideoTrackStateChanged(e),0}},{key:"onLocalCameraListChanged",value:function(e){return this.on(Sl.cameraListChanged,e),0}},{key:"getVideoCameraDevices",value:function(){return this.cameraList}},{key:"cameraList",get:function(){var e=this,t=[];return this._deviceIds.forEach((function(r){var n=e._deviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"_emitCameraListChanged",value:function(e,t,r){this.emit(Sl.cameraListChanged,e,t,r)}},{key:"_initializeDeviceList",value:(t=A(k().mark((function e(t){var r,n,i,o,a,s=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gl(eh().getCameras(t));case 2:r=e.sent,n=v(r,2),i=n[0],o=n[1],i&&Xn.shared.handleThrowableError(Qn.RTC_ERR_VDM_GET_DEVICES_FAIL,i),o&&(a=[],o.forEach((function(e){if("default"!==e.deviceId){var t={deviceid:e.deviceId,devicename:e.label};s._deviceInfo.set(e.deviceId,t),s._deviceIds.add(e.deviceId),a.push(t)}})),this._emitCameraListChanged(!0,a,this.cameraList)),eh().onCameraChanged=function(e){var t={deviceid:e.device.deviceId,devicename:e.device.label};"ACTIVE"===e.state?(s._deviceInfo.set(e.device.deviceId,t),s._deviceIds.add(e.device.deviceId),s._emitCameraListChanged(!0,[t],s.cameraList)):"INACTIVE"===e.state&&(s._deviceInfo.delete(e.device.deviceId),s._deviceIds.delete(e.device.deviceId),s._emitCameraListChanged(!1,[t],s.cameraList))};case 9:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),n}(Ol),Xd=function(e){w(i,e);var t,r,n=zd(i);function i(e,t){var r;return y(this,i),(r=n.call(this)).adapter=e,r._recordingDeviceInfo=new Map,r._recordingDeviceIds=new Set,r._playbackDeviceInfo=new Map,r._playbackDeviceIds=new Set,r._initializeDeviceList(t),r._initializePlaybackDeviceList(t),r}return _(i,[{key:"onLocalAudioPlaybackTestVolumeChanged",value:function(e){return this.adapter.onLocalAudioPlaybackTestVolumeChanged(e)}},{key:"onAudioFrame",value:function(e){return this.adapter.onAudioFrame(e)}},{key:"onLocalAudioTrackStateChanged",value:function(e){return this.adapter.onLocalAudioTrackStateChanged(e)}},{key:"onLocalAudioVolume",value:function(e){return this.adapter.onLocalAudioVolume(e)}},{key:"onLocalRecordingDeviceListChanged",value:function(e){return this.on(Sl.recordingDeviceListChanged,e),0}},{key:"onLocalPlaybackDeviceListChanged",value:function(e){return this.on(Sl.playbackDeviceListChanged,e),0}},{key:"microphoneList",get:function(){var e=this,t=[];return this._recordingDeviceIds.forEach((function(r){var n=e._recordingDeviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"speakerList",get:function(){var e=this,t=[];return this._playbackDeviceIds.forEach((function(r){var n=e._playbackDeviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"_emitPlaybackListChanged",value:function(e,t,r){this.emit(Sl.playbackDeviceListChanged,e,t,r)}},{key:"_emitRecordingListChanged",value:function(e,t,r){this.emit(Sl.recordingDeviceListChanged,e,t,r)}},{key:"_initializePlaybackDeviceList",value:(r=A(k().mark((function e(t){var r,n,i,o,a,s=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gl(eh().getPlaybackDevices(t));case 2:r=e.sent,n=v(r,2),i=n[0],o=n[1],i&&Xn.shared.handleThrowableError(Qn.RTC_ERR_ADM_GET_PLAYBACK_DEVICES_FAIL,i),o&&(a=[],o.forEach((function(e){if("default"!==e.deviceId){var t={deviceid:e.deviceId,devicename:e.label};s._playbackDeviceInfo.set(e.deviceId,t),s._playbackDeviceIds.add(e.deviceId),a.push(t)}})),this._emitPlaybackListChanged(!0,a,this.speakerList)),eh().onPlaybackDeviceChanged=function(e){var t={deviceid:e.device.deviceId,devicename:e.device.label};"ACTIVE"===e.state?(s._playbackDeviceInfo.set(e.device.deviceId,t),s._playbackDeviceIds.add(e.device.deviceId),s._emitPlaybackListChanged(!0,[t],s.speakerList)):"INACTIVE"===e.state&&(s._playbackDeviceInfo.delete(e.device.deviceId),s._playbackDeviceIds.delete(e.device.deviceId),s._emitPlaybackListChanged(!1,[t],s.speakerList))};case 9:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_initializeDeviceList",value:(t=A(k().mark((function e(t){var r,n,i,o,a,s=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gl(eh().getMicrophones(t));case 2:r=e.sent,n=v(r,2),i=n[0],o=n[1],i&&Xn.shared.handleThrowableError(Qn.RTC_ERR_ADM_GET_RECORD_DEVICES_FAIL,i),o&&(a=[],o.forEach((function(e){if("default"!==e.deviceId){var t={deviceid:e.deviceId,devicename:e.label};s._recordingDeviceInfo.set(e.deviceId,t),s._recordingDeviceIds.add(e.deviceId),a.push(t)}})),this._emitRecordingListChanged(!0,a,this.microphoneList)),eh().onMicrophoneChanged=function(e){var t={deviceid:e.device.deviceId,devicename:e.device.label};"ACTIVE"===e.state?(s._recordingDeviceInfo.set(e.device.deviceId,t),s._recordingDeviceIds.add(e.device.deviceId),s._emitRecordingListChanged(!0,[t],s.microphoneList)):"INACTIVE"===e.state&&(s._recordingDeviceInfo.delete(e.device.deviceId),s._recordingDeviceIds.delete(e.device.deviceId),s._emitRecordingListChanged(!1,[t],s.microphoneList))};case 9:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getAudioPlaybackDevices",value:function(){return this.speakerList}},{key:"getAudioRecordingDevices",value:function(){return this.microphoneList}}]),i}(Nl);__webpack_require__(4197);function Jd(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Zd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zd(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,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,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Zd(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 $d(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var ef,tf,rf,nf=function(e){w(r,e);var t=$d(r);function r(){var e;y(this,r),(e=t.call(this)).logger=void 0,e._audioContext=void 0,e._audioTagId=Fn(),e._playingSourceNode=void 0,e._analyserNode=void 0,e._volumePollingTask=void 0;try{window.AudioContext=window.AudioContext||window.webkitAudioContext,e._audioContext=new AudioContext,e._analyserNode=e._audioContext.createAnalyser(),e._analyserNode.smoothingTimeConstant=.3,e._analyserNode.fftSize=1024}catch(e){xn.error("[audio player] initialize audio context failed ".concat(e,"."))}return e}return _(r,[{key:"_getAudioVirtualDom",value:function(){if(document){var e=document.getElementById(this._audioTagId);if(!e){var t=document.createElement("audio");t.id=this._audioTagId,t.hidden=!0,document.body.appendChild(t),e=t}return e}xn.error("[audio player] audio element creation failed.")}},{key:"play",value:function(e){var t=this;this.stop();var r=this._audioContext,n=this._getAudioVirtualDom();if(n&&r){var i=r.createMediaElementSource(n);if(i.connect(r.destination),n.src=e,this._analyserNode){var o=this._analyserNode;i.connect(o);var a=new Float32Array(o.fftSize);this._volumePollingTask=xu.addPollingTask((function(){o.getFloatTimeDomainData(a);var e,r=0,n=Jd(a);try{for(n.s();!(e=n.n()).done;){var i=e.value;r+=i*i}}catch(e){n.e(e)}finally{n.f()}var s=Math.sqrt(r/a.length);t.emit(Sl.localAudioPlaybackVolumeIndicator,Math.min(s,1))}),Cu.second(.2))}n.addEventListener("ended",(function(){t.stop()})),this._playingSourceNode=i,n.play()}else xn.error("[audio player] start audio playback test failed.")}},{key:"stop",value:function(){var e=this._audioContext,t=this._getAudioVirtualDom();if(t&&e){var r;if(t.pause(),t.currentTime=0,this._analyserNode)try{var n;null===(n=this._playingSourceNode)||void 0===n||n.disconnect(this._analyserNode)}catch(e){xn.warn("[audio player] failed to detach analyser node")}if(this._audioContext)try{var i;null===(i=this._playingSourceNode)||void 0===i||i.disconnect(e.destination)}catch(e){xn.warn("[audio player] failed to detach audio context")}null===(r=this._volumePollingTask)||void 0===r||r.stop(),this._volumePollingTask=void 0,t.remove(),this.emit(Sl.localAudioPlaybackVolumeIndicator,0)}}}]),r}(x);function of(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function af(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?of(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):of(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function sf(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var cf,uf=li.attach({proxyMethods:!1})((tf=function(e){w(r,e);var t=sf(r);function r(e){var n;return y(this,r),(n=t.call(this)).logger=void 0,n._channels=new Map,n._vdm=new Yd(S(n),$n.shared.rtcConfigs.noDevicePermission),n._adm=new Xd(S(n),$n.shared.rtcConfigs.noDevicePermission),n.cameraThread=new jd,n.micThread=new Ud,n.screenThread=new Fd,n.remoteCanvas=new Map,n._audioPlayer=new nf,n._configs=void 0,n._configs=e,n}return _(r,[{key:"configs",get:function(){var e,t,n=null!==(e=$n.shared.rtcConfigs.channelProfile)&&void 0!==e?e:ml.LiveBroadcasting,i=(t={},D(t,ml.LiveBroadcasting,"live"),D(t,ml.Communication,"rtc"),t)[n]||"live";return af(af(af({},r.defaultConfigs),this._configs),{},{mode:i})}},{key:"createRtcChannel",value:function(e,t){var r=this._channels.get(e);return r||(r=new lf(e,this.configs,t),this._channels.set(e,r)),r}},{key:"getVideoDeviceManager",value:function(){return this._vdm}},{key:"setVideoCameraDevice",value:function(e){return this.cameraThread.setDevice(e),this.cameraThread.run(),0}},{key:"setAudioRecordingDevice",value:function(e){return this.micThread.setRecordingDevice(e),this.micThread.run(),0}},{key:"setAudioPlaybackDevice",value:function(e){throw new Error("Method not implemented.")}},{key:"getAudioDeviceManager",value:function(){return this._adm}},{key:"getWindowDevices",value:function(){throw new Error("Method not supported.")}},{key:"getDiaplayDevices",value:function(){throw new Error("Method not supported.")}},{key:"isScreenDeviceEnumerateSupported",value:function(){return!1}},{key:"enableLocalVideo",value:function(e){return this.cameraThread.cameraEnable=e,this.cameraThread.run(),0}},{key:"enableLocalAudio",value:function(e){return this.micThread.micEnable=e,this.micThread.run(),0}},{key:"setupLocalVideo",value:function(e,t){return t===Lu.Camera?(this.cameraThread.canvas=e,this.cameraThread.run()):(this.screenThread.canvas=e,this.screenThread.run()),0}},{key:"setupRemoteVideo",value:function(e){if(!e.channelName)return Xn.shared.handleThrowableError(Qn.RTC_ERR_NO_CHANNEL_EXISTS,new Error("invalid canvas w/o canvas name")),-1;this.remoteCanvas.set("".concat(e.streamUuid,"-").concat(e.channelName),e);var t=this._channels.get(e.channelName),r=null==t?void 0:t.main.videoSubscribeThread(e.streamUuid);return r&&r.run(),0}},{key:"startAudioRecordingDeviceTest",value:function(e){return this.logger.warn("web platform does not support this, it silence the error as recording device can be started testing w/o this api"),0}},{key:"stopAudioRecordingDeviceTest",value:function(){return this.logger.warn("web platform does not support this, it silence the error as recording device can be started testing w/o this api"),0}},{key:"startAudioPlaybackDeviceTest",value:function(e){return this._audioPlayer.play(e),0}},{key:"stopAudioPlaybackDeviceTest",value:function(){return this._audioPlayer.stop(),0}},{key:"startScreenCapture",value:function(e,t){return this.screenThread.screenEnable=!0,this.screenThread.run(),0}},{key:"stopScreenCapture",value:function(){return this.screenThread.screenEnable=!1,this.screenThread.run(),0}},{key:"onLocalAudioPlaybackTestVolumeChanged",value:function(e){return this._audioPlayer.on(Sl.localAudioPlaybackVolumeIndicator,e),0}},{key:"onLocalVideoTrackStateChanged",value:function(e){return this.cameraThread.on(Sl.trackStateChanged,e),0}},{key:"onLocalAudioTrackStateChanged",value:function(e){return this.micThread.on(Sl.trackStateChanged,e),0}},{key:"onLocalScreenShareTrackStateChanged",value:function(e){return this.screenThread.on(Sl.trackStateChanged,e),0}},{key:"onLocalAudioVolume",value:function(e){return this.micThread.on(Sl.localAudioVolume,e),0}},{key:"onAudioFrame",value:function(e){return this.micThread.on(Sl.localAudioFrame,e),0}},{key:"setBeautyEffectOptions",value:function(e,t){return this.logger.warn("web platform does not support this"),0}},{key:"setAudioFrameCallback",value:function(){return this.micThread.setAudioFrameCallback(),0}},{key:"stopAudioFrameCallback",value:function(){return this.micThread.stopAudioFrameCallback(),0}},{key:"setAudioRawDataConfig",value:function(e){return this.micThread.setAudioRawDataConfig(e),0}},{key:"hasScreenSharePermission",value:function(){return!0}},{key:"takeSnapshot",value:function(e,t,r){return this.logger.warn("web platform does not support this"),Promise.reject()}},{key:"getCurrentFrameData",value:function(e,t,r){if(r)return this.cameraThread.track.getCurrentFrameData();try{return this._channels.get(e).getCurrentFrameData(t)}catch(r){return this.logger.error("getCurrentFrameData from channel: ".concat(e," stream: ").concat(t," failed")),new ImageData(1,1)}}},{key:"destroy",value:function(){return this._channels.forEach((function(e){return e.leave()})),this._channels.clear(),this.enableLocalVideo(!1),this.enableLocalAudio(!1),this.stopScreenCapture(),0}}],[{key:"getRtcVersion",value:function(){return eh().VERSION}}]),r}(Dl),tf.defaultConfigs={codec:"vp8",mode:"live"},ef=tf))||ef,lf=li.attach({proxyMethods:!1})(rf=function(e){w(i,e);var t,r,n=sf(i);function i(e,t,r){var o;return y(this,i),(o=n.call(this)).logger=void 0,o.main=void 0,o.sub=void 0,o.channelName=void 0,o.channelName=e,o.main=new Hd(e,t,r,Fu.main),o.sub=new Wd(e,t,r,Fu.sub),o}return _(i,[{key:"getSessionId",value:function(){return this.main.getClientSessionId()}},{key:"client",value:function(e){return e===Fu.main?this.main:this.sub}},{key:"join",value:(r=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client(n).join($n.shared.appId,t,r);case 2:n===Fu.sub&&(this.main.muteRemoteVideo(r,!0),this.main.muteRemoteAudio(r,!0));case 3:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"leave",value:(t=A(k().mark((function e(t){var r,n,i,o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.sub.ready){e.next=7;break}return e.next=3,gl(this.sub.leave());case 3:n=e.sent,i=v(n,1),(r=i[0])&&Xn.shared.handleNonThrowableError(Qn.RTC_ERR_LEAVE_SUB_CHANNEL_FAIL,r);case 7:if(t===Fu.sub){e.next=14;break}return e.next=10,gl(this.main.leave());case 10:o=e.sent,a=v(o,1),(r=a[0])&&Xn.shared.handleNonThrowableError(Qn.RTC_ERR_LEAVE_MAIN_CHANNEL_FAIL,r);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"enableDualStream",value:function(e,t){return this.client(t).enableDualStream(e)}},{key:"setLowStreamParameter",value:function(e,t){return this.client(t).setLowStreamParameter(e),0}},{key:"setRemoteVideoStreamType",value:function(e,t,r){return this.client(r).setRemoteVideoStreamType(e,t)}},{key:"setClientRole",value:function(e){return 0}},{key:"muteLocalVideo",value:function(e,t){return this.logger.info("muteLocalVideo ".concat(e)),this.client(t).muteLocalVideo(e)}},{key:"muteLocalAudio",value:function(e,t){return this.logger.info("muteLocalAudio ".concat(e)),this.client(t).muteLocalAudio(e)}},{key:"muteLocalScreenShare",value:function(e,t){return this.logger.info("muteLocalScreenShare ".concat(e)),this.client(t).muteLocalScreenShare(e)}},{key:"muteRemoteVideo",value:function(e,t){return this.logger.info("muteRemoteVideo ".concat(e," ").concat(t)),this.main.muteRemoteVideo(e,t)}},{key:"muteRemoteAudio",value:function(e,t){return this.logger.info("muteRemoteAudio ".concat(e," ").concat(t)),this.main.muteRemoteAudio(e,t)}},{key:"getCurrentFrameData",value:function(e){try{return this.main.videoSubscribeThread(e).track.getCurrentFrameData()}catch(t){return this.logger.error("getCurrentFrameData from stream: ".concat(e," failed")),new ImageData(1,1)}}},{key:"onNetworkStats",value:function(e){return this.main.on("network-stats-changed",e),0}},{key:"onAudioVolumeIndication",value:function(e){return this.main.on("audio-volume-indication",e),0}},{key:"onConnectionStateChanged",value:function(e){return this.main.on("rtc-connection-state-changed",e),this.sub.on("rtc-connection-state-changed",e),0}}]),i}(xl))||rf,hf=function(){function e(){y(this,e)}return _(e,null,[{key:"getAdapter",value:function(e,t){switch(e){case Vn.Electron:return new Jl;case Vn.Web:return new uf(null==t?void 0:t.web)}}}]),e}(),df=li.attach({level:qn.DEBUG})(cf=function(){function e(t){y(this,e),this._adapter=void 0,this._channels=new Map,this._adapter=hf.getAdapter($n.platform,t)}return _(e,[{key:"getRtcChannel",value:function(e){var t=this._channels.get(e);if(!t){var r=this._adapter.createRtcChannel(e,this._adapter);t=new rl(e,r),this._channels.set(e,t)}return t}},{key:"getVideoDeviceManager",value:function(){return this._adapter.getVideoDeviceManager()}},{key:"getAudioDeviceManager",value:function(){return this._adapter.getAudioDeviceManager()}},{key:"getWindowDevices",value:function(){return this._adapter.getWindowDevices()}},{key:"getDisplayDevices",value:function(){return this._adapter.getDiaplayDevices()}},{key:"isScreenDeviceEnumerateSupported",value:function(){return this._adapter.isScreenDeviceEnumerateSupported()}},{key:"setVideoCameraDevice",value:function(e){return this._adapter.setVideoCameraDevice(e)}},{key:"setAudioRecordingDevice",value:function(e){return this._adapter.setAudioRecordingDevice(e)}},{key:"setAudioPlaybackDevice",value:function(e){return this._adapter.setAudioPlaybackDevice(e)}},{key:"enableLocalVideo",value:function(e){return this._adapter.enableLocalVideo(e)}},{key:"setupLocalVideo",value:function(e,t){return e.view.style.setProperty("transform",e.mirror?"rotateY(180deg)":""),this._adapter.setupLocalVideo(e,t)}},{key:"setupRemoteVideo",value:function(e){return e.view.style.setProperty("transform",e.mirror?"rotateY(180deg)":""),this._adapter.setupRemoteVideo(e)}},{key:"enableLocalAudio",value:function(e){return this._adapter.enableLocalAudio(e)}},{key:"startScreenCapture",value:function(e,t){return this._adapter.startScreenCapture(e,t)}},{key:"stopScreenCapture",value:function(){return this._adapter.stopScreenCapture()}},{key:"onLocalScreenShareTrackStateChanged",value:function(e){return this._adapter.onLocalScreenShareTrackStateChanged(e)}},{key:"startAudioRecordingDeviceTest",value:function(e){return this._adapter.startAudioRecordingDeviceTest(e)}},{key:"stopAudioRecordingDeviceTest",value:function(){return this._adapter.stopAudioRecordingDeviceTest()}},{key:"startAudioPlaybackDeviceTest",value:function(e){return this._adapter.startAudioPlaybackDeviceTest(e)}},{key:"stopAudioPlaybackDeviceTest",value:function(){return this._adapter.stopAudioPlaybackDeviceTest()}},{key:"setAudioFrameCallback",value:function(){return this._adapter.setAudioFrameCallback()}},{key:"stopAudioFrameCallback",value:function(){return this._adapter.stopAudioFrameCallback()}},{key:"onLocalCameraListChanged",value:function(e){return this._adapter.getVideoDeviceManager().onLocalCameraListChanged(e)}},{key:"onLocalRecordingDeviceListChanged",value:function(e){return this._adapter.getAudioDeviceManager().onLocalRecordingDeviceListChanged(e)}},{key:"onLocalPlaybackListChanged",value:function(e){return this._adapter.getAudioDeviceManager().onLocalPlaybackDeviceListChanged(e)}},{key:"onLocalVideoTrackStateChanged",value:function(e){return this._adapter.getVideoDeviceManager().onLocalVideoTrackStateChanged(e)}},{key:"onLocalAudioTrackStateChanged",value:function(e){return this._adapter.getAudioDeviceManager().onLocalAudioTrackStateChanged(e)}},{key:"onLocalAudioVolume",value:function(e){return this._adapter.getAudioDeviceManager().onLocalAudioVolume(e)}},{key:"setBeautyEffectOptions",value:function(e,t){return this._adapter.setBeautyEffectOptions(e,t)}},{key:"setAudioRawDataConfig",value:function(e){return this._adapter.setAudioRawDataConfig(e)}},{key:"hasScreenSharePermission",value:function(){return this._adapter.hasScreenSharePermission()}},{key:"takeSnapshot",value:function(e,t,r){return this._adapter.takeSnapshot(e,t,r)}},{key:"getCurrentFrameData",value:function(e,t,r){return this._adapter.getCurrentFrameData(e,t,r)}},{key:"destroy",value:function(){return this._adapter.destroy()}}]),e}())||cf,ff=__webpack_require__(3977),pf=__webpack_require__.n(ff),gf=__webpack_require__(9644),vf=__webpack_require__.n(gf),mf=(new(__webpack_require__(6353).UAParser)).getResult(),Af=function(){function e(t,r){y(this,e),this._appId=t,this._tagInfo=r,this._adapter=void 0,this._adapter=new yf(this._appId,this._tagInfo)}var t;return _(e,[{key:"upload",value:(t=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._adapter.upload(t,r);case 2:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}(),yf=function(){function e(t,r){y(this,e),this._appId=t,this._tagInfo=r,this._apiService=new ou,this._checkpoints=new Map}var t,r,n,i;return _(e,[{key:"_uploadByAli",value:(i=A(k().mark((function e(t,r,n,i){var o,a,s,c,u,l,h,d,f,p,g,v,m,A,y=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.ossKey,a=n.accessKeyId,s=n.accessKeySecret,c=n.bucketName,u=n.ossEndpoint,l=n.securityToken,h=i.callbackHost,d=i.callbackBody,f=i.callbackContentType,p=new(pf())({accessKeyId:a,accessKeySecret:s,bucket:c,endpoint:u,secure:!0,stsToken:l}),g=this._checkpoints.get(r),v="".concat(h,"/monitor/apps/").concat(this._appId,"/v1/log/oss/callback"),e.next=7,p.multipartUpload(o,t,{progress:function(e,t){y._checkpoints.set(r,t)},callback:{url:v,body:d,contentType:f},checkpoint:g});case 7:if(m=e.sent,200===(A=m.res).status){e.next=11;break}throw new Error("upload to ali oss error, status is ".concat(A.status));case 11:this._checkpoints.delete(r),p.generateObjectUrl(o);case 13:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return i.apply(this,arguments)})},{key:"_uploadByAws",value:(n=A(k().mark((function e(t,r,n,i){var o,a,s,c,u,l;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.preSignedUrl,a=i.callbackHost,s=i.callbackBody,c=i.callbackContentType,u="".concat(a,"/monitor/apps/").concat(this._appId,"/v1/log/oss/callback"),e.next=5,vf().put(o,t,{headers:{"Content-Type":t.type}});case 5:return e.next=7,vf().post(u,JSON.parse(s),{headers:D({},"content-type",c)});case 7:if(200===(l=e.sent).status){e.next=10;break}throw new Error("upload to aws oss error, status is ".concat(l.status));case 10:this._checkpoints.delete(r);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t,r,i){return n.apply(this,arguments)})},{key:"_fetchStsToken",value:(r=A(k().mark((function e(t,r){var n,i,o,a,s,c,u;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(new Date).getTime(),i={appId:$n.shared.appId,appVersion:$n.version,deviceName:mf.os.name,deviceVersion:mf.os.version,fileExt:r,platform:"web",tag:t},o=JSON.stringify(i),a="7AIsPeMJgQAppO0Z"+o+n,s=tu()(a),e.next=8,this._apiService.fetch({host:"https://api.sd-rtn.com",path:"/monitor/v1/log/oss/policy",data:i,method:"POST",headers:{sign:s,timestamp:n}});case 8:return c=e.sent,u=c.data,e.abrupt("return",{bucketName:u.bucketName,callbackBody:u.callbackBody,callbackContentType:u.callbackContentType,accessKeyId:u.accessKeyId,accessKeySecret:u.accessKeySecret,securityToken:u.securityToken,ossKey:u.ossKey,callbackHost:u.callbackHost,preSignedUrl:u.preSignedUrl,vendor:u.vendor,ossEndpoint:u.ossEndpoint});case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"upload",value:(t=A(k().mark((function e(t,r){var n,i,o,a,s,c,u,l,h,d,f,p,g,v,m,A,y;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._fetchStsToken(this._tagInfo,r);case 2:if(n=e.sent,i=n.vendor,1!==(o=void 0===i?-1:i)){e.next=10;break}return a=n.ossKey,s=n.callbackBody,c=n.callbackContentType,u=n.callbackHost,l=n.preSignedUrl,e.next=8,this._uploadByAws(t,a,{preSignedUrl:l},{callbackBody:s,callbackContentType:c,callbackHost:u});case 8:case 14:e.next=17;break;case 10:if(2!==o){e.next=16;break}return h=n.accessKeyId,d=n.accessKeySecret,f=n.bucketName,p=n.ossEndpoint,g=n.securityToken,v=n.ossKey,m=n.callbackBody,A=n.callbackContentType,y=n.callbackHost,e.next=14,this._uploadByAli(t,v,{accessKeyId:h,accessKeySecret:d,bucketName:f,ossEndpoint:p,securityToken:g,ossKey:v},{callbackBody:m,callbackContentType:A,callbackHost:y});case 16:throw new Error("vendor ".concat(o," is not supported"));case 17:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function bf(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var _f,Ef,wf,If,Sf,Tf=function(e){w(a,e);var t,r,n,i,o=bf(a);function a(){return y(this,a),o.apply(this,arguments)}return _(a,[{key:"uploadZipLogFile",value:(i=A(k().mark((function e(t,r){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.uploadToOss(t,r,"zip");case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"uploadLogFile",value:(n=A(k().mark((function e(t,r){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.uploadToOss(t,r,"log");case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"uploadToOss",value:(r=A(k().mark((function e(t,r,n){var i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=new Af($n.shared.appId,t),e.next=4,i.upload(r,n);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),Xn.shared.handleThrowableError(Qn.RTE_ERR_LOG_UPLOAD_FAIL,e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])}))),function(e,t,n){return r.apply(this,arguments)})},{key:"uploadElectronLog",value:(t=A(k().mark((function e(t){var r,n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.doGzip){e.next=8;break}return e.next=3,window.doGzip();case 3:return r=e.sent,e.next=6,this.uploadZipLogFile(t,r);case 6:return n=e.sent,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),a}(ou);function Cf(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e[e.Host=1]="Host",e[e.Controlled=2]="Controlled"}(_f||(_f={})),function(e){e.RequestControl="request-control",e.QuitControl="quit-control",e.RequestAuthorized="request-authorized",e.RequestUnauthorized="request-unauthorized"}(Ef||(Ef={}));try{var Rf=__webpack_require__(1709).AgoraRemoteDesktopControl;Sf=Rf}catch(e){$n.platform===Vn.Electron&&xn.warn("load electron rc sdk failed: ".concat(e))}var kf=li.attach({proxyMethods:!1})((If=function(e){w(l,e);var t,r,n,i,o,a,s,c,u=Cf(l);function l(e,t){var r;return y(this,l),(r=u.call(this))._rtcChannel=e,r._role=t,r.logger=void 0,r._rdcEngine=void 0,r._displays=[],r._streamId=void 0,r.handleRDCStateChange=function(e,t){var n;(n=r.logger).info.apply(n,["RDC state changed to",e].concat(hi(t?["with message",t]:[])))},r.handleRDCRequestControl=function(e){r.logger.info("RequestControl fired with args",e),r.emit(Ef.RequestControl,e)},r.handleRDCQuitControl=function(e){r.logger.info("QuitControl fired with args",e),r.emit(Ef.QuitControl,e)},r.handleRDCRequestControlAuthorized=function(e){r.logger.info("RequestAuthorized fired with args",e),r.emit(Ef.RequestAuthorized,e)},r.handleRDCRequestControlUnauthorized=function(e){r.logger.info("RequestUnauthorized fired with args",e),r.emit(Ef.RequestUnauthorized,e)},r._checkPlatform(),r._initialize(),r._addListeners(),r}return _(l,[{key:"_checkPlatform",value:function(){if(!($n.platform===Vn.Electron))throw new Error("Remote Control currently not supported in web browser")}},{key:"rdcEngine",get:function(){if(!this._rdcEngine)throw new Error("RCEngine not ready");return this._rdcEngine}},{key:"_initialize",value:function(){this._rdcEngine=new Sf(Jl.rtcEngine,{appId:$n.shared.appId,role:this._role})}},{key:"_addListeners",value:function(){this.rdcEngine.on("rdc-state",this.handleRDCStateChange),this.rdcEngine.on("rdc-request-control",this.handleRDCRequestControl),this.rdcEngine.on("rdc-quit-control",this.handleRDCQuitControl),this.rdcEngine.on("rdc-request-control-authorized",this.handleRDCRequestControlAuthorized),this.rdcEngine.on("rdc-request-control-unauthorized",this.handleRDCRequestControlUnauthorized)}},{key:"_removeListeners",value:function(){this.rdcEngine.off("rdc-state",this.handleRDCStateChange),this.rdcEngine.off("rdc-request-control",this.handleRDCRequestControl),this.rdcEngine.off("rdc-quit-control",this.handleRDCQuitControl),this.rdcEngine.off("rdc-request-control-authorized",this.handleRDCRequestControlAuthorized),this.rdcEngine.off("rdc-request-control-unauthorized",this.handleRDCRequestControlUnauthorized)}},{key:"join",value:(c=A(k().mark((function e(t){var r=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A(k().mark((function e(n,i){var o,a,s,c;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.userId,a=t.userToken,s=t.streamId,c=t.streamToken,r.logger.info("join rc channel [".concat(r._rtcChannel.channelName,"] with params"),t),r._streamId=s,r.rdcEngine.once("rdc-join-error",(function(e,t){0===e?(n(null),r.logger.info("rc channel joined")):(i(),r.logger.info("rc channel join failed, message: ".concat(t)))})),e.next=6,r.rdcEngine.join(o,a,r._rtcChannel.channelName,parseInt(s),c);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return c.apply(this,arguments)})},{key:"_waitForUserJoin",value:(s=A(k().mark((function e(t){var r,n,i=this,o=arguments;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=o.length>1&&void 0!==o[1]?o[1]:1e4,(n=function(){return l._channelUsers.has(t)})()){e.next=7;break}return e.next=5,dl(new Promise(function(){var e=A(k().mark((function e(o){var a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Date.now()+r;case 1:if(!(Date.now()<a)){e.next=11;break}if(i.logger.info("wait for user joining rc channel"),!n()){e.next=7;break}return i.logger.info("user [".concat(t,"] joined the rc channel!")),o(),e.abrupt("break",11);case 7:return e.next=9,hl(100);case 9:e.next=1;break;case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),r,!1);case 5:e.next=8;break;case 7:this.logger.info("user [".concat(t,"] has already joined the rc channel!"));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"requestControl",value:(a=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.info("request user ".concat(t," for remote controlling")),e.next=3,this._waitForUserJoin(r.streamId,r.timeout);case 3:this.rdcEngine.requestControl(t);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"takeControl",value:(o=A(k().mark((function e(t,r,n,i){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.info("take control of the remote device of user ".concat(t)),this.rdcEngine.takeControl(t,parseInt(r),n);case 2:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return o.apply(this,arguments)})},{key:"unauthorizeControl",value:(i=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.info("unauthorize user ".concat(t," for remote controlling")),this.rdcEngine.unauthorizeControl(t);case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"authorizeControl",value:(n=A(k().mark((function e(t,r,n){var i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.info("authorize user ".concat(t," for remote controlling")),i=this._displays.find((function(e){return e.id===r.id}))){e.next=4;break}throw new Error("Invalid display obj, display with id ".concat(JSON.stringify(r.id)," not exist"));case 4:this.logger.info("display with id ".concat(r.id," is going to be controled")),this.rdcEngine.authorizeControl(t,i);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"quitControl",value:function(e,t,r){this.logger.info("role ".concat(t," is quit control from ").concat(e," and streamId ").concat(r)),r?this.rdcEngine.quitControl(e,t,r):this.rdcEngine.quitControl(e,t)}},{key:"leave",value:(r=A(k().mark((function e(){var t,r,n=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.info("leave rc channel [".concat(this._rtcChannel.channelName,"],streamId is [").concat(this._streamId,"]")),Jl.rtcEngine.stopScreenCapture2(),Jl.rtcEngine.videoSourceLeave(),t=1e4,r=this._streamId){e.next=8;break}return this.logger.info("user not joined yet, no op"),e.abrupt("return");case 8:return e.next=10,dl(new Promise(function(){var e=A(k().mark((function e(i){var o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=Date.now()+t;case 1:if(!(Date.now()<o)){e.next=10;break}if(l._channelUsers.has(r)){e.next=6;break}return n.logger.info("user not in rc channel, stop loop"),i(),e.abrupt("break",10);case 6:return e.next=8,hl(100);case 8:e.next=1;break;case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t);case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"dispose",value:function(){this.logger.info("RCEngine start disposing"),this.logger.info("remove rc listeners"),this._removeListeners(),this.rdcEngine.dispose(),this.logger.info("RCEngine start disposed")}},{key:"getDisplays",value:(t=A(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.rdcEngine.getDisplays();case 2:return this._displays=e.sent,t=this._displays.map((function(e){return{id:e.id,size:{width:e.width,height:e.height},thumbnail:e.thumbnail}})),this.logger.info("get rc displays",t),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"initialize",value:function(){Jl.rtcEngine.on("userJoined",l.handleRTCUserJoined),Jl.rtcEngine.on("removeStream",l.handleRTCUserLeft)}},{key:"cleanup",value:function(){l._channelUsers.clear(),Jl.rtcEngine.off("userJoined",l.handleRTCUserJoined),Jl.rtcEngine.off("removeStream",l.handleRTCUserLeft)}}]),l}(x),If._channelUsers=new Set,If.handleRTCUserJoined=function(e){xn.info("RC user joined channel",e),If._channelUsers.add("".concat(e))},If.handleRTCUserLeft=function(e){xn.info("RC user left channel",e),If._channelUsers.delete("".concat(e))},wf=If))||wf;function Of(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Nf=function(e){w(i,e);var t,r,n=Of(i);function i(e){var t;return y(this,i),(t=n.call(this))._mediaControl=void 0,t._logService=void 0,t._rtmManager=void 0,t._rtcManager=void 0,t._apiServicePathPrefix="",$n.setConfig(e),xn.setupConsoleHijack(),t._logService=new Tf,t._rtmManager=new hu,t._rtcManager=new df(e.rtcConfigs),t._mediaControl=new Rl(t._rtcManager),$n.platform===Vn.Electron&&kf.initialize(),t}return _(i,[{key:"apiServicePathPrefix",get:function(){return this._apiServicePathPrefix}},{key:"destroy",value:function(){xn.info("RTE engine destroy"),this.getAgoraMediaControl().createCameraVideoTrack().stop(),this.getAgoraMediaControl().createMicrophoneAudioTrack().stop(),this.getAgoraMediaControl().createScreenShareTrack().stop(),$n.platform===Vn.Electron&&kf.cleanup(),this.logout(),xn.restoreConsoleHijack(),gu.forEach((function(e){delete e.__cacheMap})),gu=new Set,Eu.forEach((function(e){delete e.__cacheMap})),Eu=new Set}},{key:"login",value:(r=A(k().mark((function e(t,r){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return cu.shared.host="https://api.sd-rtn.com",cu.shared.pathPrefix="/cn/v1.0/projects/".concat($n.shared.appId,"/app-dev-report"),n=$n.shared.ignoreUrlRegionPrefix,this._apiServicePathPrefix="".concat(n?"":"/"+$n.shared.region.toLowerCase(),"/scene/apps/").concat($n.shared.appId),$n.shared.token=t,$n.shared.userId=r,$n.shared.service.headers={"Content-Type":"application/json","x-agora-token":t,"x-agora-uid":r,Authorization:'agora token="'.concat(t,'"')},e.next=9,this._rtmManager.login(t,r,{uploadLog:!1});case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"logout",value:function(){this._rtcManager.destroy(),this._rtmManager.destroyRtm()}},{key:"createAgoraRteScene",value:function(e){var t=v(this._rtmManager.createObserverChannel(e),2),r=t[0],n=t[1],i=this._rtcManager.getRtcChannel(e);return new Tl(e,{engine:this,rtc:this._rtcManager,rtcChannel:i,rtm:this._rtmManager,rtmChannel:r,rtmChannelObserver:n})}},{key:"createRemoteControlContext",value:function(e,t){return new kf(e.rtcChannel,t)}},{key:"getAgoraMediaControl",value:function(){return this._mediaControl}},{key:"uploadSDKLogToAgoraService",value:(t=A(k().mark((function e(t){var r,n,i,o,a,s,c,u,l,h,d;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pl(xn.logger.collectConsoleLogs());case 2:if(o=e.sent,a=v(o,2),r=a[0],n=a[1],r){e.next=20;break}return e.next=9,pl(this._logService.uploadLogFile(t,n));case 9:if(s=e.sent,c=v(s,1),!(r=c[0])){e.next=16;break}Xn.shared.handleNonThrowableError(Qn.RTE_ERR_WEB_LOG_UPLOAD_ERR,r),e.next=18;break;case 16:return e.next=18,pl(xn.logger.cleanupConsoleLogs());case 18:e.next=21;break;case 20:Xn.shared.handleNonThrowableError(Qn.RTE_ERR_WEB_LOG_UPLOAD_ERR,r);case 21:if($n.platform!==Vn.Electron){e.next=38;break}return e.next=24,pl(xn.logger.collectElectronLogs(Jl.logBasePath,Jl.logFolderPath));case 24:if(u=e.sent,l=v(u,2),r=l[0],i=l[1],r){e.next=37;break}return e.next=31,pl(this._logService.uploadZipLogFile(t,i));case 31:h=e.sent,d=v(h,1),(r=d[0])&&Xn.shared.handleNonThrowableError(Qn.RTE_ERR_ELECTRON_LOG_UPLOAD_ERR,r),e.next=38;break;case 37:Xn.shared.handleNonThrowableError(Qn.RTE_ERR_ELECTRON_LOG_UPLOAD_ERR,r);case 38:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}],[{key:"createWithConfig",value:function(e){return new i(e)}},{key:"getVersion",value:function(){return $n.version}},{key:"getRtcVersion",value:function(){return $n.platform===Vn.Electron?Jl.getRtcVersion():uf.getRtcVersion()}}]),i}(x)})(),__webpack_exports__})()}));
|
|
454
|
+
*/!function(i,o){"use strict";var a="function",s="undefined",c="object",u="model",l="name",h="type",d="vendor",f="version",p="architecture",g="console",v="mobile",m="tablet",A="smarttv",y="wearable",b={extend:function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},_={rgx:function(e,t){for(var r,n,i,s,u,l,h=0;h<t.length&&!u;){var d=t[h],f=t[h+1];for(r=n=0;r<d.length&&!u;)if(u=d[r++].exec(e))for(i=0;i<f.length;i++)l=u[++n],typeof(s=f[i])===c&&s.length>0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):o:this[s[0]]=l?s[1].call(this,l,s[2]):o:4==s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):o):this[s]=l||o;h+=2}},str:function(e,t){for(var r in t)if(typeof t[r]===c&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(b.has(t[r][n],e))return"?"===r?o:r}else if(b.has(t[r],e))return"?"===r?o:r;return e}},E={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},w={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6}).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[l,f],[/(opios)[\/\s]+([\w\.]+)/i],[[l,"Opera Mini"],f],[/\s(opr)\/([\w\.]+)/i],[[l,"Opera"],f],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[l,f],[/(konqueror)\/([\w\.]+)/i],[[l,"Konqueror"],f],[/(trident).+rv[:\s]([\w\.]{1,9}).+like\sgecko/i],[[l,"IE"],f],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[l,"Edge"],f],[/(yabrowser)\/([\w\.]+)/i],[[l,"Yandex"],f],[/(Avast)\/([\w\.]+)/i],[[l,"Avast Secure Browser"],f],[/(AVG)\/([\w\.]+)/i],[[l,"AVG Secure Browser"],f],[/(puffin)\/([\w\.]+)/i],[[l,"Puffin"],f],[/(focus)\/([\w\.]+)/i],[[l,"Firefox Focus"],f],[/(opt)\/([\w\.]+)/i],[[l,"Opera Touch"],f],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[l,"UCBrowser"],f],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],f],[/(windowswechat qbcore)\/([\w\.]+)/i],[[l,"WeChat(Win) Desktop"],f],[/(micromessenger)\/([\w\.]+)/i],[[l,"WeChat"],f],[/(brave)\/([\w\.]+)/i],[[l,"Brave"],f],[/(whale)\/([\w\.]+)/i],[[l,"Whale"],f],[/(qqbrowserlite)\/([\w\.]+)/i],[l,f],[/(QQ)\/([\d\.]+)/i],[l,f],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[l,f],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[l,f],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[l,f],[/(MetaSr)[\/\s]?([\w\.]+)/i],[l],[/(LBBROWSER)/i],[l],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[f,[l,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[f,[l,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[l,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[l,f],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[f,[l,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[l,/(.+)/,"$1 WebView"],f],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[l,/(.+(?:g|us))(.+)/,"$1 $2"],f],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[f,[l,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[l,"Sailfish Browser"],f],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[l,f],[/(dolfin)\/([\w\.]+)/i],[[l,"Dolphin"],f],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[l,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[l,"Chrome"],f],[/(coast)\/([\w\.]+)/i],[[l,"Opera Coast"],f],[/fxios\/([\w\.-]+)/i],[f,[l,"Firefox"]],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[f,[l,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[f,l],[/webkit.+?(gsa)\/([\w\.]+)\s.*(mobile\s?safari|safari)(\/[\w\.]+)/i],[[l,"GSA"],f],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[l,[f,_.str,E.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[l,f],[/(navigator|netscape)\/([\w\.-]+)/i],[[l,"Netscape"],f],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[l,f]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,b.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[p,/ower/,"",b.lowerize]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[p,b.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[u,d,[h,m]],[/applecoremedia\/[\w\.]+ \((ipad)/],[u,[d,"Apple"],[h,m]],[/(apple\s{0,1}tv)/i],[[u,"Apple TV"],[d,"Apple"],[h,A]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[d,u,[h,m]],[/(kf[A-z]+)(\sbuild\/|\)).+silk\//i],[u,[d,"Amazon"],[h,m]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[u,_.str,E.device.amazon.model],[d,"Amazon"],[h,v]],[/android.+aft([bms])\sbuild/i],[u,[d,"Amazon"],[h,A]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[u,d,[h,v]],[/\((ip[honed|\s\w*]+);/i],[u,[d,"Apple"],[h,v]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[d,u,[h,v]],[/\(bb10;\s(\w+)/i],[u,[d,"BlackBerry"],[h,v]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[u,[d,"Asus"],[h,m]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[d,"Sony"],[u,"Xperia Tablet"],[h,m]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,"Sony"],[h,v]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[d,u,[h,g]],[/android.+;\s(shield)\sbuild/i],[u,[d,"Nvidia"],[h,g]],[/(playstation\s[34portablevi]+)/i],[u,[d,"Sony"],[h,g]],[/(sprint\s(\w+))/i],[[d,_.str,E.device.sprint.vendor],[u,_.str,E.device.sprint.model],[h,v]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[d,[u,/_/g," "],[h,v]],[/(nexus\s9)/i],[u,[d,"HTC"],[h,m]],[/d\/huawei([\w\s-]+)[;\)]/i,/android.+\s(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?)/i],[u,[d,"Huawei"],[h,v]],[/android.+(bah2?-a?[lw]\d{2})/i],[u,[d,"Huawei"],[h,m]],[/(microsoft);\s(lumia[\s\w]+)/i],[d,u,[h,v]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[u,[d,"Microsoft"],[h,g]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,"Microsoft"],[h,v]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[u,[d,"Motorola"],[h,v]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[u,[d,"Motorola"],[h,m]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[d,b.trim],[u,b.trim],[h,A]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,"Samsung"],[h,A]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[h,A]],[/android.+((sch-i[89]0\d|shw-m380s|SM-P605|SM-P610|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[d,"Samsung"],u,[h,m]],[/smart-tv.+(samsung)/i],[d,[h,A],u],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[d,"Samsung"],u,[h,v]],[/sie-(\w*)/i],[u,[d,"Siemens"],[h,v]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[d,"Nokia"],u,[h,v]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[u,[d,"Acer"],[h,m]],[/android.+([vl]k\-?\d{3})\s+build/i],[u,[d,"LG"],[h,m]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[d,"LG"],u,[h,m]],[/linux;\snetcast.+smarttv/i,/lg\snetcast\.tv-201\d/i],[[d,"LG"],u,[h,A]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[u,[d,"LG"],[h,v]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[d,u,[h,m]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[u,[d,"Lenovo"],[h,m]],[/(lenovo)[_\s-]?([\w-]+)/i],[d,u,[h,v]],[/linux;.+((jolla));/i],[d,u,[h,v]],[/((pebble))app\/[\d\.]+\s/i],[d,u,[h,y]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[d,u,[h,v]],[/crkey/i],[[u,"Chromecast"],[d,"Google"],[h,A]],[/android.+;\s(glass)\s\d/i],[u,[d,"Google"],[h,y]],[/android.+;\s(pixel c)[\s)]/i],[u,[d,"Google"],[h,m]],[/android.+;\s(pixel( [2-9]a?)?( xl)?)[\s)]/i],[u,[d,"Google"],[h,v]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/android.+(redmi[\s\-_]?(?:note|k)?(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i,/android.+(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[u,/_/g," "],[d,"Xiaomi"],[h,v]],[/android.+(mi[\s\-_]?(?:pad)(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i],[[u,/_/g," "],[d,"Xiaomi"],[h,m]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[u,[d,"Meizu"],[h,v]],[/(mz)-([\w-]{2,})/i],[[d,"Meizu"],u,[h,v]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[u,[d,"OnePlus"],[h,v]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[u,[d,"RCA"],[h,m]],[/android.+[;\/\s](Venue[\d\s]{2,7})\s+build/i],[u,[d,"Dell"],[h,m]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[u,[d,"Verizon"],[h,m]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[d,"Barnes & Noble"],u,[h,m]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[u,[d,"NuVision"],[h,m]],[/android.+;\s(k88)\sbuild/i],[u,[d,"ZTE"],[h,m]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[u,[d,"Swiss"],[h,v]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[u,[d,"Swiss"],[h,m]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[u,[d,"Zeki"],[h,m]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[d,"Dragon Touch"],u,[h,m]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[u,[d,"Insignia"],[h,m]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[u,[d,"NextBook"],[h,m]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[d,"Voice"],u,[h,v]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[d,"LvTel"],u,[h,v]],[/android.+;\s(PH-1)\s/i],[u,[d,"Essential"],[h,v]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[u,[d,"Envizen"],[h,m]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[d,u,[h,m]],[/android.+[;\/]\s*(Trio[\s\w\-\.]+)\s+build/i],[u,[d,"MachSpeed"],[h,m]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[d,u,[h,m]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[u,[d,"Rotor"],[h,m]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[d,u,[h,m]],[/android .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[u,[h,v]],[/android .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[u,[h,m]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,b.lowerize],d,u],[/[\s\/\(](smart-?tv)[;\)]/i],[[h,A]],[/(android[\w\.\s\-]{0,9});.+build/i],[u,[d,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[f,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[l,f],[/rv\:([\w\.]{1,9}).+(gecko)/i],[f,l]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[l,f],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[l,[f,_.str,E.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[l,"Windows"],[f,_.str,E.os.windows.version]],[/\((bb)(10);/i],[[l,"BlackBerry"],f],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[l,f],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[l,"Symbian"],f],[/\((series40);/i],[l],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[l,"Firefox OS"],f],[/crkey\/([\d\.]+)/i],[f,[l,"Chromecast"]],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[l,f],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[l,"Chromium OS"],f],[/(sunos)\s?([\w\.\d]*)/i],[[l,"Solaris"],f],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[l,f],[/(haiku)\s(\w+)/i],[l,f],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[f,/_/g,"."],[l,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[l,"Mac OS"],[f,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[l,f]]},I=function(e,t){if("object"==typeof e&&(t=e,e=o),!(this instanceof I))return new I(e,t).getResult();var r=e||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),n=t?b.extend(w,t):w;return this.getBrowser=function(){var e={name:o,version:o};return _.rgx.call(e,r,n.browser),e.major=b.major(e.version),e},this.getCPU=function(){var e={architecture:o};return _.rgx.call(e,r,n.cpu),e},this.getDevice=function(){var e={vendor:o,model:o,type:o};return _.rgx.call(e,r,n.device),e},this.getEngine=function(){var e={name:o,version:o};return _.rgx.call(e,r,n.engine),e},this.getOS=function(){var e={name:o,version:o};return _.rgx.call(e,r,n.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=e,this},this};I.VERSION="0.7.23",I.BROWSER={NAME:l,MAJOR:"major",VERSION:f},I.CPU={ARCHITECTURE:p},I.DEVICE={MODEL:u,VENDOR:d,TYPE:h,CONSOLE:g,MOBILE:v,SMARTTV:A,TABLET:m,WEARABLE:y,EMBEDDED:"embedded"},I.ENGINE={NAME:l,VERSION:f},I.OS={NAME:l,VERSION:f},typeof t!==s?(e.exports&&(t=e.exports=I),t.UAParser=I):(n=function(){return I}.call(t,r,t,e))===o||(e.exports=n);var S=i&&(i.jQuery||i.Zepto);if(S&&!S.ua){var T=new I;S.ua=T.getResult(),S.ua.get=function(){return T.getUA()},S.ua.set=function(e){T.setUA(e);var t=T.getResult();for(var r in t)S.ua[r]=t[r]}}}("object"==typeof window?window:this)},1005:e=>{"use strict";e.exports=function(e,t,r,n){var i=self||window;try{try{var o;try{o=new i.Blob([e])}catch(t){(o=new(i.BlobBuilder||i.WebKitBlobBuilder||i.MozBlobBuilder||i.MSBlobBuilder)).append(e),o=o.getBlob()}var a=i.URL||i.webkitURL,s=a.createObjectURL(o),c=new i[t](s,r);return a.revokeObjectURL(s),c}catch(n){return new i[t]("data:application/javascript,".concat(encodeURIComponent(e)),r)}}catch(e){if(!n)throw Error("Inline worker is not supported");return new i[t](n,r)}}},9662:(e,t,r)=>{var n=r(7854),i=r(614),o=r(6330),a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a function")}},9483:(e,t,r)=>{var n=r(7854),i=r(4411),o=r(6330),a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a constructor")}},6077:(e,t,r)=>{var n=r(7854),i=r(614),o=n.String,a=n.TypeError;e.exports=function(e){if("object"==typeof e||i(e))return e;throw a("Can't set "+o(e)+" as a prototype")}},1223:(e,t,r)=>{var n=r(5112),i=r(30),o=r(3070),a=n("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},1530:(e,t,r)=>{"use strict";var n=r(8710).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},5787:(e,t,r)=>{var n=r(7854),i=r(7976),o=n.TypeError;e.exports=function(e,t){if(i(t,e))return e;throw o("Incorrect invocation")}},9670:(e,t,r)=>{var n=r(7854),i=r(111),o=n.String,a=n.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not an object")}},5381:e=>{e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7556:(e,t,r)=>{var n=r(7293);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},260:(e,t,r)=>{"use strict";var n,i,o,a=r(5381),s=r(9781),c=r(7854),u=r(614),l=r(111),h=r(2597),d=r(648),f=r(6330),p=r(8880),g=r(1320),v=r(3070).f,m=r(7976),A=r(9518),y=r(7674),b=r(5112),_=r(9711),E=c.Int8Array,w=E&&E.prototype,I=c.Uint8ClampedArray,S=I&&I.prototype,T=E&&A(E),C=w&&A(w),R=Object.prototype,k=c.TypeError,O=b("toStringTag"),N=_("TYPED_ARRAY_TAG"),x=_("TYPED_ARRAY_CONSTRUCTOR"),D=a&&!!y&&"Opera"!==d(c.opera),L=!1,P={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},M={BigInt64Array:8,BigUint64Array:8},B=function(e){if(!l(e))return!1;var t=d(e);return h(P,t)||h(M,t)};for(n in P)(o=(i=c[n])&&i.prototype)?p(o,x,i):D=!1;for(n in M)(o=(i=c[n])&&i.prototype)&&p(o,x,i);if((!D||!u(T)||T===Function.prototype)&&(T=function(){throw k("Incorrect invocation")},D))for(n in P)c[n]&&y(c[n],T);if((!D||!C||C===R)&&(C=T.prototype,D))for(n in P)c[n]&&y(c[n].prototype,C);if(D&&A(S)!==C&&y(S,C),s&&!h(C,O))for(n in L=!0,v(C,O,{get:function(){return l(this)?this[N]:void 0}}),P)c[n]&&p(c[n],N,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_CONSTRUCTOR:x,TYPED_ARRAY_TAG:L&&N,aTypedArray:function(e){if(B(e))return e;throw k("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!y||m(T,e)))return e;throw k(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(s){if(r)for(var i in P){var o=c[i];if(o&&h(o.prototype,e))try{delete o.prototype[e]}catch(e){}}C[e]&&!r||g(C,e,r?t:D&&w[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(s){if(y){if(r)for(n in P)if((i=c[n])&&h(i,e))try{delete i[e]}catch(e){}if(T[e]&&!r)return;try{return g(T,e,r?t:D&&T[e]||t)}catch(e){}}for(n in P)!(i=c[n])||i[e]&&!r||g(i,e,t)}},isView:function(e){if(!l(e))return!1;var t=d(e);return"DataView"===t||h(P,t)||h(M,t)},isTypedArray:B,TypedArray:T,TypedArrayPrototype:C}},3331:(e,t,r)=>{"use strict";var n=r(7854),i=r(1702),o=r(9781),a=r(5381),s=r(6530),c=r(8880),u=r(2248),l=r(7293),h=r(5787),d=r(9303),f=r(7466),p=r(7067),g=r(1179),v=r(9518),m=r(7674),A=r(8006).f,y=r(3070).f,b=r(1285),_=r(1589),E=r(8003),w=r(9909),I=s.PROPER,S=s.CONFIGURABLE,T=w.get,C=w.set,R="ArrayBuffer",k="DataView",O="Wrong index",N=n.ArrayBuffer,x=N,D=x&&x.prototype,L=n.DataView,P=L&&L.prototype,M=Object.prototype,B=n.Array,j=n.RangeError,U=i(b),F=i([].reverse),G=g.pack,Q=g.unpack,q=function(e){return[255&e]},V=function(e){return[255&e,e>>8&255]},K=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},H=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},W=function(e){return G(e,23,4)},z=function(e){return G(e,52,8)},Y=function(e,t){y(e.prototype,t,{get:function(){return T(this)[t]}})},X=function(e,t,r,n){var i=p(r),o=T(e);if(i+t>o.byteLength)throw j(O);var a=T(o.buffer).bytes,s=i+o.byteOffset,c=_(a,s,s+t);return n?c:F(c)},J=function(e,t,r,n,i,o){var a=p(r),s=T(e);if(a+t>s.byteLength)throw j(O);for(var c=T(s.buffer).bytes,u=a+s.byteOffset,l=n(+i),h=0;h<t;h++)c[u+h]=l[o?h:t-h-1]};if(a){var Z=I&&N.name!==R;if(l((function(){N(1)}))&&l((function(){new N(-1)}))&&!l((function(){return new N,new N(1.5),new N(NaN),Z&&!S})))Z&&S&&c(N,"name",R);else{(x=function(e){return h(this,D),new N(p(e))}).prototype=D;for(var $,ee=A(N),te=0;ee.length>te;)($=ee[te++])in x||c(x,$,N[$]);D.constructor=x}m&&v(P)!==M&&m(P,M);var re=new L(new x(2)),ne=i(P.setInt8);re.setInt8(0,2147483648),re.setInt8(1,2147483649),!re.getInt8(0)&&re.getInt8(1)||u(P,{setInt8:function(e,t){ne(this,e,t<<24>>24)},setUint8:function(e,t){ne(this,e,t<<24>>24)}},{unsafe:!0})}else D=(x=function(e){h(this,D);var t=p(e);C(this,{bytes:U(B(t),0),byteLength:t}),o||(this.byteLength=t)}).prototype,P=(L=function(e,t,r){h(this,P),h(e,D);var n=T(e).byteLength,i=d(t);if(i<0||i>n)throw j("Wrong offset");if(i+(r=void 0===r?n-i:f(r))>n)throw j("Wrong length");C(this,{buffer:e,byteLength:r,byteOffset:i}),o||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,o&&(Y(x,"byteLength"),Y(L,"buffer"),Y(L,"byteLength"),Y(L,"byteOffset")),u(P,{getInt8:function(e){return X(this,1,e)[0]<<24>>24},getUint8:function(e){return X(this,1,e)[0]},getInt16:function(e){var t=X(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=X(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return H(X(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return H(X(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Q(X(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Q(X(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){J(this,1,e,q,t)},setUint8:function(e,t){J(this,1,e,q,t)},setInt16:function(e,t){J(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){J(this,2,e,V,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){J(this,4,e,K,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){J(this,4,e,K,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){J(this,4,e,W,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){J(this,8,e,z,t,arguments.length>2?arguments[2]:void 0)}});E(x,R),E(L,k),e.exports={ArrayBuffer:x,DataView:L}},1048:(e,t,r)=>{"use strict";var n=r(7908),i=r(1400),o=r(6244),a=Math.min;e.exports=[].copyWithin||function(e,t){var r=n(this),s=o(r),c=i(e,s),u=i(t,s),l=arguments.length>2?arguments[2]:void 0,h=a((void 0===l?s:i(l,s))-u,s-c),d=1;for(u<c&&c<u+h&&(d=-1,u+=h-1,c+=h-1);h-- >0;)u in r?r[c]=r[u]:delete r[c],c+=d,u+=d;return r}},1285:(e,t,r)=>{"use strict";var n=r(7908),i=r(1400),o=r(6244);e.exports=function(e){for(var t=n(this),r=o(t),a=arguments.length,s=i(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,u=void 0===c?r:i(c,r);u>s;)t[s++]=e;return t}},8533:(e,t,r)=>{"use strict";var n=r(2092).forEach,i=r(9341)("forEach");e.exports=i?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},7745:(e,t,r)=>{var n=r(6244);e.exports=function(e,t){for(var r=0,i=n(t),o=new e(i);i>r;)o[r]=t[r++];return o}},8457:(e,t,r)=>{"use strict";var n=r(7854),i=r(9974),o=r(6916),a=r(7908),s=r(3411),c=r(7659),u=r(4411),l=r(6244),h=r(6135),d=r(8554),f=r(1246),p=n.Array;e.exports=function(e){var t=a(e),r=u(this),n=arguments.length,g=n>1?arguments[1]:void 0,v=void 0!==g;v&&(g=i(g,n>2?arguments[2]:void 0));var m,A,y,b,_,E,w=f(t),I=0;if(!w||this==p&&c(w))for(m=l(t),A=r?new this(m):p(m);m>I;I++)E=v?g(t[I],I):t[I],h(A,I,E);else for(_=(b=d(t,w)).next,A=r?new this:[];!(y=o(_,b)).done;I++)E=v?s(b,g,[y.value,I],!0):y.value,h(A,I,E);return A.length=I,A}},1318:(e,t,r)=>{var n=r(5656),i=r(1400),o=r(6244),a=function(e){return function(t,r,a){var s,c=n(t),u=o(c),l=i(a,u);if(e&&r!=r){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:(e,t,r)=>{var n=r(9974),i=r(1702),o=r(8361),a=r(7908),s=r(6244),c=r(5417),u=i([].push),l=function(e){var t=1==e,r=2==e,i=3==e,l=4==e,h=6==e,d=7==e,f=5==e||h;return function(p,g,v,m){for(var A,y,b=a(p),_=o(b),E=n(g,v),w=s(_),I=0,S=m||c,T=t?S(p,w):r||d?S(p,0):void 0;w>I;I++)if((f||I in _)&&(y=E(A=_[I],I,b),e))if(t)T[I]=y;else if(y)switch(e){case 3:return!0;case 5:return A;case 6:return I;case 2:u(T,A)}else switch(e){case 4:return!1;case 7:u(T,A)}return h?-1:i||l?l:T}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},6583:(e,t,r)=>{"use strict";var n=r(2104),i=r(5656),o=r(9303),a=r(6244),s=r(9341),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,h=s("lastIndexOf"),d=l||!h;e.exports=d?function(e){if(l)return n(u,this,arguments)||0;var t=i(this),r=a(t),s=r-1;for(arguments.length>1&&(s=c(s,o(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:u},1194:(e,t,r)=>{var n=r(7293),i=r(5112),o=r(7392),a=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:(e,t,r)=>{"use strict";var n=r(7293);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){throw 1},1)}))}},3671:(e,t,r)=>{var n=r(7854),i=r(9662),o=r(7908),a=r(8361),s=r(6244),c=n.TypeError,u=function(e){return function(t,r,n,u){i(r);var l=o(t),h=a(l),d=s(l),f=e?d-1:0,p=e?-1:1;if(n<2)for(;;){if(f in h){u=h[f],f+=p;break}if(f+=p,e?f<0:d<=f)throw c("Reduce of empty array with no initial value")}for(;e?f>=0:d>f;f+=p)f in h&&(u=r(u,h[f],f,l));return u}};e.exports={left:u(!1),right:u(!0)}},1589:(e,t,r)=>{var n=r(7854),i=r(1400),o=r(6244),a=r(6135),s=n.Array,c=Math.max;e.exports=function(e,t,r){for(var n=o(e),u=i(t,n),l=i(void 0===r?n:r,n),h=s(c(l-u,0)),d=0;u<l;u++,d++)a(h,d,e[u]);return h.length=d,h}},206:(e,t,r)=>{var n=r(1702);e.exports=n([].slice)},4362:(e,t,r)=>{var n=r(1589),i=Math.floor,o=function(e,t){var r=e.length,c=i(r/2);return r<8?a(e,t):s(e,o(n(e,0,c),t),o(n(e,c),t),t)},a=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},s=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e};e.exports=o},7475:(e,t,r)=>{var n=r(7854),i=r(3157),o=r(4411),a=r(111),s=r(5112)("species"),c=n.Array;e.exports=function(e){var t;return i(e)&&(t=e.constructor,(o(t)&&(t===c||i(t.prototype))||a(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?c:t}},5417:(e,t,r)=>{var n=r(7475);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},3411:(e,t,r)=>{var n=r(9670),i=r(9212);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},7072:(e,t,r)=>{var n=r(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},4326:(e,t,r)=>{var n=r(1702),i=n({}.toString),o=n("".slice);e.exports=function(e){return o(i(e),8,-1)}},648:(e,t,r)=>{var n=r(7854),i=r(1694),o=r(614),a=r(4326),s=r(5112)("toStringTag"),c=n.Object,u="Arguments"==a(function(){return arguments}());e.exports=i?a:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=c(e),s))?r:u?a(t):"Object"==(n=a(t))&&o(t.callee)?"Arguments":n}},1501:(e,t,r)=>{"use strict";var n=r(6916),i=r(9662),o=r(9670);e.exports=function(){for(var e=o(this),t=i(e.add),r=0,a=arguments.length;r<a;r++)n(t,e,arguments[r]);return e}},4092:(e,t,r)=>{"use strict";var n=r(6916),i=r(9662),o=r(9670);e.exports=function(){for(var e,t=o(this),r=i(t.delete),a=!0,s=0,c=arguments.length;s<c;s++)e=n(r,t,arguments[s]),a=a&&e;return!!a}},5631:(e,t,r)=>{"use strict";var n=r(3070).f,i=r(30),o=r(2248),a=r(9974),s=r(5787),c=r(408),u=r(654),l=r(6340),h=r(9781),d=r(2423).fastKey,f=r(9909),p=f.set,g=f.getterFor;e.exports={getConstructor:function(e,t,r,u){var l=e((function(e,n){s(e,f),p(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),h||(e.size=0),null!=n&&c(n,e[u],{that:e,AS_ENTRIES:r})})),f=l.prototype,v=g(t),m=function(e,t,r){var n,i,o=v(e),a=A(e,t);return a?a.value=r:(o.last=a={index:i=d(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=a),n&&(n.next=a),h?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},A=function(e,t){var r,n=v(e),i=d(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return o(f,{clear:function(){for(var e=v(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,h?e.size=0:this.size=0},delete:function(e){var t=this,r=v(t),n=A(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),h?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=v(this),n=a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!A(this,e)}}),o(f,r?{get:function(e){var t=A(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),h&&n(f,"size",{get:function(){return v(this).size}}),l},setStrong:function(e,t,r){var n=t+" Iterator",i=g(t),o=g(n);u(e,t,(function(e,t){p(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),l(t)}}},9320:(e,t,r)=>{"use strict";var n=r(1702),i=r(2248),o=r(2423).getWeakData,a=r(9670),s=r(111),c=r(5787),u=r(408),l=r(2092),h=r(2597),d=r(9909),f=d.set,p=d.getterFor,g=l.find,v=l.findIndex,m=n([].splice),A=0,y=function(e){return e.frozen||(e.frozen=new b)},b=function(){this.entries=[]},_=function(e,t){return g(e.entries,(function(e){return e[0]===t}))};b.prototype={get:function(e){var t=_(this,e);if(t)return t[1]},has:function(e){return!!_(this,e)},set:function(e,t){var r=_(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=v(this.entries,(function(t){return t[0]===e}));return~t&&m(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,r,n){var l=e((function(e,i){c(e,d),f(e,{type:t,id:A++,frozen:void 0}),null!=i&&u(i,e[n],{that:e,AS_ENTRIES:r})})),d=l.prototype,g=p(t),v=function(e,t,r){var n=g(e),i=o(a(t),!0);return!0===i?y(n).set(t,r):i[n.id]=r,e};return i(d,{delete:function(e){var t=g(this);if(!s(e))return!1;var r=o(e);return!0===r?y(t).delete(e):r&&h(r,t.id)&&delete r[t.id]},has:function(e){var t=g(this);if(!s(e))return!1;var r=o(e);return!0===r?y(t).has(e):r&&h(r,t.id)}}),i(d,r?{get:function(e){var t=g(this);if(s(e)){var r=o(e);return!0===r?y(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return v(this,e,t)}}:{add:function(e){return v(this,e,!0)}}),l}}},7710:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(1702),a=r(4705),s=r(1320),c=r(2423),u=r(408),l=r(5787),h=r(614),d=r(111),f=r(7293),p=r(7072),g=r(8003),v=r(9587);e.exports=function(e,t,r){var m=-1!==e.indexOf("Map"),A=-1!==e.indexOf("Weak"),y=m?"set":"add",b=i[e],_=b&&b.prototype,E=b,w={},I=function(e){var t=o(_[e]);s(_,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(A&&!d(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return A&&!d(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(A&&!d(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(a(e,!h(b)||!(A||_.forEach&&!f((function(){(new b).entries().next()})))))E=r.getConstructor(t,e,m,y),c.enable();else if(a(e,!0)){var S=new E,T=S[y](A?{}:-0,1)!=S,C=f((function(){S.has(1)})),R=p((function(e){new b(e)})),k=!A&&f((function(){for(var e=new b,t=5;t--;)e[y](t,t);return!e.has(-0)}));R||((E=t((function(e,t){l(e,_);var r=v(new b,e,E);return null!=t&&u(t,r[y],{that:r,AS_ENTRIES:m}),r}))).prototype=_,_.constructor=E),(C||k)&&(I("delete"),I("has"),m&&I("get")),(k||T)&&I(y),A&&_.clear&&delete _.clear}return w[e]=E,n({global:!0,forced:E!=b},w),g(E,e),A||r.setStrong(E,e,m),E}},9920:(e,t,r)=>{var n=r(2597),i=r(3887),o=r(1236),a=r(3070);e.exports=function(e,t,r){for(var s=i(t),c=a.f,u=o.f,l=0;l<s.length;l++){var h=s[l];n(e,h)||r&&n(r,h)||c(e,h,u(t,h))}}},4964:(e,t,r)=>{var n=r(5112)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},8544:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4230:(e,t,r)=>{var n=r(1702),i=r(4488),o=r(1340),a=/"/g,s=n("".replace);e.exports=function(e,t,r,n){var c=o(i(e)),u="<"+t;return""!==r&&(u+=" "+r+'="'+s(o(n),a,""")+'"'),u+">"+c+"</"+t+">"}},4994:(e,t,r)=>{"use strict";var n=r(3383).IteratorPrototype,i=r(30),o=r(9114),a=r(8003),s=r(7497),c=function(){return this};e.exports=function(e,t,r,u){var l=t+" Iterator";return e.prototype=i(n,{next:o(+!u,r)}),a(e,l,!1,!0),s[l]=c,e}},8880:(e,t,r)=>{var n=r(9781),i=r(3070),o=r(9114);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},9114:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:(e,t,r)=>{"use strict";var n=r(4948),i=r(3070),o=r(9114);e.exports=function(e,t,r){var a=n(t);a in e?i.f(e,a,o(0,r)):e[a]=r}},654:(e,t,r)=>{"use strict";var n=r(2109),i=r(6916),o=r(1913),a=r(6530),s=r(614),c=r(4994),u=r(9518),l=r(7674),h=r(8003),d=r(8880),f=r(1320),p=r(5112),g=r(7497),v=r(3383),m=a.PROPER,A=a.CONFIGURABLE,y=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,_=p("iterator"),E="keys",w="values",I="entries",S=function(){return this};e.exports=function(e,t,r,a,p,v,T){c(r,t,a);var C,R,k,O=function(e){if(e===p&&P)return P;if(!b&&e in D)return D[e];switch(e){case E:case w:case I:return function(){return new r(this,e)}}return function(){return new r(this)}},N=t+" Iterator",x=!1,D=e.prototype,L=D[_]||D["@@iterator"]||p&&D[p],P=!b&&L||O(p),M="Array"==t&&D.entries||L;if(M&&(C=u(M.call(new e)))!==Object.prototype&&C.next&&(o||u(C)===y||(l?l(C,y):s(C[_])||f(C,_,S)),h(C,N,!0,!0),o&&(g[N]=S)),m&&p==w&&L&&L.name!==w&&(!o&&A?d(D,"name",w):(x=!0,P=function(){return i(L,this)})),p)if(R={values:O(w),keys:v?P:O(E),entries:O(I)},T)for(k in R)(b||x||!(k in D))&&f(D,k,R[k]);else n({target:t,proto:!0,forced:b||x},R);return o&&!T||D[_]===P||f(D,_,P,{name:p}),g[t]=P,R}},7235:(e,t,r)=>{var n=r(857),i=r(2597),o=r(6061),a=r(3070).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},9781:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(e,t,r)=>{var n=r(7854),i=r(111),o=n.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},8324:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(e,t,r)=>{var n=r(317)("span").classList,i=n&&n.constructor&&n.constructor.prototype;e.exports=i===Object.prototype?void 0:i},8886:(e,t,r)=>{var n=r(8113).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},7871:e=>{e.exports="object"==typeof window},256:(e,t,r)=>{var n=r(8113);e.exports=/MSIE|Trident/.test(n)},1528:(e,t,r)=>{var n=r(8113),i=r(7854);e.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==i.Pebble},6833:(e,t,r)=>{var n=r(8113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:(e,t,r)=>{var n=r(4326),i=r(7854);e.exports="process"==n(i.process)},1036:(e,t,r)=>{var n=r(8113);e.exports=/web0s(?!.*chrome)/i.test(n)},8113:(e,t,r)=>{var n=r(5005);e.exports=n("navigator","userAgent")||""},7392:(e,t,r)=>{var n,i,o=r(7854),a=r(8113),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(i=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},8008:(e,t,r)=>{var n=r(8113).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(e,t,r)=>{var n=r(7854),i=r(1236).f,o=r(8880),a=r(1320),s=r(3505),c=r(9920),u=r(4705);e.exports=function(e,t){var r,l,h,d,f,p=e.target,g=e.global,v=e.stat;if(r=g?n:v?n[p]||s(p,{}):(n[p]||{}).prototype)for(l in t){if(d=t[l],h=e.noTargetGet?(f=i(r,l))&&f.value:r[l],!u(g?l:p+(v?".":"#")+l,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;c(d,h)}(e.sham||h&&h.sham)&&o(d,"sham",!0),a(r,l,d,e)}}},7293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:(e,t,r)=>{"use strict";r(4916);var n=r(1702),i=r(1320),o=r(2261),a=r(7293),s=r(5112),c=r(8880),u=s("species"),l=RegExp.prototype;e.exports=function(e,t,r,h){var d=s(e),f=!a((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),p=f&&!a((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[d]=/./[d]),r.exec=function(){return t=!0,null},r[d](""),!t}));if(!f||!p||r){var g=n(/./[d]),v=t(d,""[e],(function(e,t,r,i,a){var s=n(e),c=t.exec;return c===o||c===l.exec?f&&!a?{done:!0,value:g(t,r,i)}:{done:!0,value:s(r,t,i)}:{done:!1}}));i(String.prototype,e,v[0]),i(l,d,v[1])}h&&c(l[d],"sham",!0)}},6677:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:e=>{var t=Function.prototype,r=t.apply,n=t.bind,i=t.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?i.bind(r):function(){return i.apply(r,arguments)})},9974:(e,t,r)=>{var n=r(1702),i=r(9662),o=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?o(e,t):function(){return e.apply(t,arguments)}}},7065:(e,t,r)=>{"use strict";var n=r(7854),i=r(1702),o=r(9662),a=r(111),s=r(2597),c=r(206),u=n.Function,l=i([].concat),h=i([].join),d={},f=function(e,t,r){if(!s(d,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";d[t]=u("C,a","return new C("+h(n,",")+")")}return d[t](e,r)};e.exports=u.bind||function(e){var t=o(this),r=t.prototype,n=c(arguments,1),i=function(){var r=l(n,c(arguments));return this instanceof i?f(t,r.length,r):t.apply(e,r)};return a(r)&&(i.prototype=r),i}},6916:e=>{var t=Function.prototype.call;e.exports=t.bind?t.bind(t):function(){return t.apply(t,arguments)}},6530:(e,t,r)=>{var n=r(9781),i=r(2597),o=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},1702:e=>{var t=Function.prototype,r=t.bind,n=t.call,i=r&&r.bind(n);e.exports=r?function(e){return e&&i(n,e)}:function(e){return e&&function(){return n.apply(e,arguments)}}},5005:(e,t,r)=>{var n=r(7854),i=r(614),o=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},1246:(e,t,r)=>{var n=r(648),i=r(8173),o=r(7497),a=r(5112)("iterator");e.exports=function(e){if(null!=e)return i(e,a)||i(e,"@@iterator")||o[n(e)]}},8554:(e,t,r)=>{var n=r(7854),i=r(6916),o=r(9662),a=r(9670),s=r(6330),c=r(1246),u=n.TypeError;e.exports=function(e,t){var r=arguments.length<2?c(e):t;if(o(r))return a(i(r,e));throw u(s(e)+" is not iterable")}},4647:(e,t,r)=>{var n=r(6916);e.exports=function(e){return n(Map.prototype.entries,e)}},8173:(e,t,r)=>{var n=r(9662);e.exports=function(e,t){var r=e[t];return null==r?void 0:n(r)}},6767:(e,t,r)=>{var n=r(6916);e.exports=function(e){return n(Set.prototype.values,e)}},647:(e,t,r)=>{var n=r(1702),i=r(7908),o=Math.floor,a=n("".charAt),s=n("".replace),c=n("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,r,n,h,d){var f=r+e.length,p=n.length,g=l;return void 0!==h&&(h=i(h),g=u),s(d,g,(function(i,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return c(t,0,r);case"'":return c(t,f);case"<":u=h[c(s,1,-1)];break;default:var l=+s;if(0===l)return i;if(l>p){var d=o(l/10);return 0===d?i:d<=p?void 0===n[d-1]?a(s,1):n[d-1]+a(s,1):i}u=n[l-1]}return void 0===u?"":u}))}},7854:(e,t,r)=>{var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:(e,t,r)=>{var n=r(1702),i=r(7908),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},3501:e=>{e.exports={}},842:(e,t,r)=>{var n=r(7854);e.exports=function(e,t){var r=n.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}},490:(e,t,r)=>{var n=r(5005);e.exports=n("document","documentElement")},4664:(e,t,r)=>{var n=r(9781),i=r(7293),o=r(317);e.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},1179:(e,t,r)=>{var n=r(7854).Array,i=Math.abs,o=Math.pow,a=Math.floor,s=Math.log,c=Math.LN2;e.exports={pack:function(e,t,r){var u,l,h,d=n(r),f=8*r-t-1,p=(1<<f)-1,g=p>>1,v=23===t?o(2,-24)-o(2,-77):0,m=e<0||0===e&&1/e<0?1:0,A=0;for((e=i(e))!=e||e===1/0?(l=e!=e?1:0,u=p):(u=a(s(e)/c),e*(h=o(2,-u))<1&&(u--,h*=2),(e+=u+g>=1?v/h:v*o(2,1-g))*h>=2&&(u++,h/=2),u+g>=p?(l=0,u=p):u+g>=1?(l=(e*h-1)*o(2,t),u+=g):(l=e*o(2,g-1)*o(2,t),u=0));t>=8;)d[A++]=255&l,l/=256,t-=8;for(u=u<<t|l,f+=t;f>0;)d[A++]=255&u,u/=256,f-=8;return d[--A]|=128*m,d},unpack:function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,s=a>>1,c=i-7,u=n-1,l=e[u--],h=127&l;for(l>>=7;c>0;)h=256*h+e[u--],c-=8;for(r=h&(1<<-c)-1,h>>=-c,c+=t;c>0;)r=256*r+e[u--],c-=8;if(0===h)h=1-s;else{if(h===a)return r?NaN:l?-1/0:1/0;r+=o(2,t),h-=s}return(l?-1:1)*r*o(2,h-t)}}},8361:(e,t,r)=>{var n=r(7854),i=r(1702),o=r(7293),a=r(4326),s=n.Object,c=i("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?c(e,""):s(e)}:s},9587:(e,t,r)=>{var n=r(614),i=r(111),o=r(7674);e.exports=function(e,t,r){var a,s;return o&&n(a=t.constructor)&&a!==r&&i(s=a.prototype)&&s!==r.prototype&&o(e,s),e}},2788:(e,t,r)=>{var n=r(1702),i=r(614),o=r(5465),a=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},2423:(e,t,r)=>{var n=r(2109),i=r(1702),o=r(3501),a=r(111),s=r(2597),c=r(3070).f,u=r(8006),l=r(1156),h=r(2050),d=r(9711),f=r(6677),p=!1,g=d("meta"),v=0,m=function(e){c(e,g,{value:{objectID:"O"+v++,weakData:{}}})},A=e.exports={enable:function(){A.enable=function(){},p=!0;var e=u.f,t=i([].splice),r={};r[g]=1,e(r).length&&(u.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===g){t(n,i,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,g)){if(!h(e))return"F";if(!t)return"E";m(e)}return e[g].objectID},getWeakData:function(e,t){if(!s(e,g)){if(!h(e))return!0;if(!t)return!1;m(e)}return e[g].weakData},onFreeze:function(e){return f&&p&&h(e)&&!s(e,g)&&m(e),e}};o[g]=!0},9909:(e,t,r)=>{var n,i,o,a=r(8536),s=r(7854),c=r(1702),u=r(111),l=r(8880),h=r(2597),d=r(5465),f=r(6200),p=r(3501),g="Object already initialized",v=s.TypeError,m=s.WeakMap;if(a||d.state){var A=d.state||(d.state=new m),y=c(A.get),b=c(A.has),_=c(A.set);n=function(e,t){if(b(A,e))throw new v(g);return t.facade=e,_(A,e,t),t},i=function(e){return y(A,e)||{}},o=function(e){return b(A,e)}}else{var E=f("state");p[E]=!0,n=function(e,t){if(h(e,E))throw new v(g);return t.facade=e,l(e,E,t),t},i=function(e){return h(e,E)?e[E]:{}},o=function(e){return h(e,E)}}e.exports={set:n,get:i,has:o,enforce:function(e){return o(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=i(t)).type!==e)throw v("Incompatible receiver, "+e+" required");return r}}}},7659:(e,t,r)=>{var n=r(5112),i=r(7497),o=n("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:(e,t,r)=>{var n=r(4326);e.exports=Array.isArray||function(e){return"Array"==n(e)}},614:e=>{e.exports=function(e){return"function"==typeof e}},4411:(e,t,r)=>{var n=r(1702),i=r(7293),o=r(614),a=r(648),s=r(5005),c=r(2788),u=function(){},l=[],h=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=n(d.exec),p=!d.exec(u),g=function(e){if(!o(e))return!1;try{return h(u,l,e),!0}catch(e){return!1}},v=function(e){if(!o(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!f(d,c(e))}catch(e){return!0}};v.sham=!0,e.exports=!h||i((function(){var e;return g(g.call)||!g(Object)||!g((function(){e=!0}))||e}))?v:g},4705:(e,t,r)=>{var n=r(7293),i=r(614),o=/#|\.prototype\./,a=function(e,t){var r=c[s(e)];return r==l||r!=u&&(i(t)?n(t):!!t)},s=a.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},5988:(e,t,r)=>{var n=r(111),i=Math.floor;e.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&i(e)===e}},111:(e,t,r)=>{var n=r(614);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},1913:e=>{e.exports=!1},7850:(e,t,r)=>{var n=r(111),i=r(4326),o=r(5112)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},2190:(e,t,r)=>{var n=r(7854),i=r(5005),o=r(614),a=r(7976),s=r(3307),c=n.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return o(t)&&a(t.prototype,c(e))}},408:(e,t,r)=>{var n=r(7854),i=r(9974),o=r(6916),a=r(9670),s=r(6330),c=r(7659),u=r(6244),l=r(7976),h=r(8554),d=r(1246),f=r(9212),p=n.TypeError,g=function(e,t){this.stopped=e,this.result=t},v=g.prototype;e.exports=function(e,t,r){var n,m,A,y,b,_,E,w=r&&r.that,I=!(!r||!r.AS_ENTRIES),S=!(!r||!r.IS_ITERATOR),T=!(!r||!r.INTERRUPTED),C=i(t,w),R=function(e){return n&&f(n,"normal",e),new g(!0,e)},k=function(e){return I?(a(e),T?C(e[0],e[1],R):C(e[0],e[1])):T?C(e,R):C(e)};if(S)n=e;else{if(!(m=d(e)))throw p(s(e)+" is not iterable");if(c(m)){for(A=0,y=u(e);y>A;A++)if((b=k(e[A]))&&l(v,b))return b;return new g(!1)}n=h(e,m)}for(_=n.next;!(E=o(_,n)).done;){try{b=k(E.value)}catch(e){f(n,"throw",e)}if("object"==typeof b&&b&&l(v,b))return b}return new g(!1)}},9212:(e,t,r)=>{var n=r(6916),i=r(9670),o=r(8173);e.exports=function(e,t,r){var a,s;i(e);try{if(!(a=o(e,"return"))){if("throw"===t)throw r;return r}a=n(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw r;if(s)throw a;return i(a),r}},3383:(e,t,r)=>{"use strict";var n,i,o,a=r(7293),s=r(614),c=r(30),u=r(9518),l=r(1320),h=r(5112),d=r(1913),f=h("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(n=i):p=!0),null==n||a((function(){var e={};return n[f].call(e)!==e}))?n={}:d&&(n=c(n)),s(n[f])||l(n,f,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},7497:e=>{e.exports={}},6244:(e,t,r)=>{var n=r(7466);e.exports=function(e){return n(e.length)}},5948:(e,t,r)=>{var n,i,o,a,s,c,u,l,h=r(7854),d=r(9974),f=r(1236).f,p=r(261).set,g=r(6833),v=r(1528),m=r(1036),A=r(5268),y=h.MutationObserver||h.WebKitMutationObserver,b=h.document,_=h.process,E=h.Promise,w=f(h,"queueMicrotask"),I=w&&w.value;I||(n=function(){var e,t;for(A&&(e=_.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},g||A||m||!y||!b?!v&&E&&E.resolve?((u=E.resolve(void 0)).constructor=E,l=d(u.then,u),a=function(){l(n)}):A?a=function(){_.nextTick(n)}:(p=d(p,h),a=function(){p(n)}):(s=!0,c=b.createTextNode(""),new y(n).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),e.exports=I||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},3366:(e,t,r)=>{var n=r(7854);e.exports=n.Promise},133:(e,t,r)=>{var n=r(7392),i=r(7293);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8536:(e,t,r)=>{var n=r(7854),i=r(614),o=r(2788),a=n.WeakMap;e.exports=i(a)&&/native code/.test(o(a))},8523:(e,t,r)=>{"use strict";var n=r(9662),i=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=n(t),this.reject=n(r)};e.exports.f=function(e){return new i(e)}},3929:(e,t,r)=>{var n=r(7854),i=r(7850),o=n.TypeError;e.exports=function(e){if(i(e))throw o("The method doesn't accept regular expressions");return e}},3009:(e,t,r)=>{var n=r(7854),i=r(7293),o=r(1702),a=r(1340),s=r(3111).trim,c=r(1361),u=n.parseInt,l=n.Symbol,h=l&&l.iterator,d=/^[+-]?0x/i,f=o(d.exec),p=8!==u(c+"08")||22!==u(c+"0x16")||h&&!i((function(){u(Object(h))}));e.exports=p?function(e,t){var r=s(a(e));return u(r,t>>>0||(f(d,r)?16:10))}:u},1574:(e,t,r)=>{"use strict";var n=r(9781),i=r(1702),o=r(6916),a=r(7293),s=r(1956),c=r(5181),u=r(5296),l=r(7908),h=r(8361),d=Object.assign,f=Object.defineProperty,p=i([].concat);e.exports=!d||a((function(){if(n&&1!==d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(e){t[e]=e})),7!=d({},e)[r]||s(d({},t)).join("")!=i}))?function(e,t){for(var r=l(e),i=arguments.length,a=1,d=c.f,f=u.f;i>a;)for(var g,v=h(arguments[a++]),m=d?p(s(v),d(v)):s(v),A=m.length,y=0;A>y;)g=m[y++],n&&!o(f,v,g)||(r[g]=v[g]);return r}:d},30:(e,t,r)=>{var n,i=r(9670),o=r(6048),a=r(748),s=r(3501),c=r(490),u=r(317),l=r(6200),h=l("IE_PROTO"),d=function(){},f=function(e){return"<script>"+e+"</"+"script>"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t;g="undefined"!=typeof document?document.domain&&n?p(n):((t=u("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):p(n);for(var r=a.length;r--;)delete g.prototype[a[r]];return g()};s[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(d.prototype=i(e),r=new d,d.prototype=null,r[h]=e):r=g(),void 0===t?r:o(r,t)}},6048:(e,t,r)=>{var n=r(9781),i=r(3070),o=r(9670),a=r(5656),s=r(1956);e.exports=n?Object.defineProperties:function(e,t){o(e);for(var r,n=a(t),c=s(t),u=c.length,l=0;u>l;)i.f(e,r=c[l++],n[r]);return e}},3070:(e,t,r)=>{var n=r(7854),i=r(9781),o=r(4664),a=r(9670),s=r(4948),c=n.TypeError,u=Object.defineProperty;t.f=i?u:function(e,t,r){if(a(e),t=s(t),a(r),o)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},1236:(e,t,r)=>{var n=r(9781),i=r(6916),o=r(5296),a=r(9114),s=r(5656),c=r(4948),u=r(2597),l=r(4664),h=Object.getOwnPropertyDescriptor;t.f=n?h:function(e,t){if(e=s(e),t=c(t),l)try{return h(e,t)}catch(e){}if(u(e,t))return a(!i(o.f,e,t),e[t])}},1156:(e,t,r)=>{var n=r(4326),i=r(5656),o=r(8006).f,a=r(1589),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==n(e)?function(e){try{return o(e)}catch(e){return a(s)}}(e):o(i(e))}},8006:(e,t,r)=>{var n=r(6324),i=r(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},5181:(e,t)=>{t.f=Object.getOwnPropertySymbols},9518:(e,t,r)=>{var n=r(7854),i=r(2597),o=r(614),a=r(7908),s=r(6200),c=r(8544),u=s("IE_PROTO"),l=n.Object,h=l.prototype;e.exports=c?l.getPrototypeOf:function(e){var t=a(e);if(i(t,u))return t[u];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof l?h:null}},2050:(e,t,r)=>{var n=r(7293),i=r(111),o=r(4326),a=r(7556),s=Object.isExtensible,c=n((function(){s(1)}));e.exports=c||a?function(e){return!!i(e)&&((!a||"ArrayBuffer"!=o(e))&&(!s||s(e)))}:s},7976:(e,t,r)=>{var n=r(1702);e.exports=n({}.isPrototypeOf)},6324:(e,t,r)=>{var n=r(1702),i=r(2597),o=r(5656),a=r(1318).indexOf,s=r(3501),c=n([].push);e.exports=function(e,t){var r,n=o(e),u=0,l=[];for(r in n)!i(s,r)&&i(n,r)&&c(l,r);for(;t.length>u;)i(n,r=t[u++])&&(~a(l,r)||c(l,r));return l}},1956:(e,t,r)=>{var n=r(6324),i=r(748);e.exports=Object.keys||function(e){return n(e,i)}},5296:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);t.f=i?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},7674:(e,t,r)=>{var n=r(1702),i=r(9670),o=r(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return i(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},4699:(e,t,r)=>{var n=r(9781),i=r(1702),o=r(1956),a=r(5656),s=i(r(5296).f),c=i([].push),u=function(e){return function(t){for(var r,i=a(t),u=o(i),l=u.length,h=0,d=[];l>h;)r=u[h++],n&&!s(i,r)||c(d,e?[r,i[r]]:i[r]);return d}};e.exports={entries:u(!0),values:u(!1)}},288:(e,t,r)=>{"use strict";var n=r(1694),i=r(648);e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(e,t,r)=>{var n=r(7854),i=r(6916),o=r(614),a=r(111),s=n.TypeError;e.exports=function(e,t){var r,n;if("string"===t&&o(r=e.toString)&&!a(n=i(r,e)))return n;if(o(r=e.valueOf)&&!a(n=i(r,e)))return n;if("string"!==t&&o(r=e.toString)&&!a(n=i(r,e)))return n;throw s("Can't convert object to primitive value")}},3887:(e,t,r)=>{var n=r(5005),i=r(1702),o=r(8006),a=r(5181),s=r(9670),c=i([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),r=a.f;return r?c(t,r(e)):t}},857:(e,t,r)=>{var n=r(7854);e.exports=n},2534:e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},9478:(e,t,r)=>{var n=r(9670),i=r(111),o=r(8523);e.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;var r=o.f(e);return(0,r.resolve)(t),r.promise}},8572:e=>{var t=function(){this.head=null,this.tail=null};t.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}},e.exports=t},2248:(e,t,r)=>{var n=r(1320);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},1320:(e,t,r)=>{var n=r(7854),i=r(614),o=r(2597),a=r(8880),s=r(3505),c=r(2788),u=r(9909),l=r(6530).CONFIGURABLE,h=u.get,d=u.enforce,f=String(String).split("String");(e.exports=function(e,t,r,c){var u,h=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,g=!!c&&!!c.noTargetGet,v=c&&void 0!==c.name?c.name:t;i(r)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(r,"name")||l&&r.name!==v)&&a(r,"name",v),(u=d(r)).source||(u.source=f.join("string"==typeof v?v:""))),e!==n?(h?!g&&e[t]&&(p=!0):delete e[t],p?e[t]=r:a(e,t,r)):p?e[t]=r:s(t,r)})(Function.prototype,"toString",(function(){return i(this)&&h(this).source||c(this)}))},7651:(e,t,r)=>{var n=r(7854),i=r(6916),o=r(9670),a=r(614),s=r(4326),c=r(2261),u=n.TypeError;e.exports=function(e,t){var r=e.exec;if(a(r)){var n=i(r,e,t);return null!==n&&o(n),n}if("RegExp"===s(e))return i(c,e,t);throw u("RegExp#exec called on incompatible receiver")}},2261:(e,t,r)=>{"use strict";var n,i,o=r(6916),a=r(1702),s=r(1340),c=r(7066),u=r(2999),l=r(2309),h=r(30),d=r(9909).get,f=r(9441),p=r(7168),g=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,m=v,A=a("".charAt),y=a("".indexOf),b=a("".replace),_=a("".slice),E=(i=/b*/g,o(v,n=/a/,"a"),o(v,i,"a"),0!==n.lastIndex||0!==i.lastIndex),w=u.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(E||I||w||f||p)&&(m=function(e){var t,r,n,i,a,u,l,f=this,p=d(f),S=s(e),T=p.raw;if(T)return T.lastIndex=f.lastIndex,t=o(m,T,S),f.lastIndex=T.lastIndex,t;var C=p.groups,R=w&&f.sticky,k=o(c,f),O=f.source,N=0,x=S;if(R&&(k=b(k,"y",""),-1===y(k,"g")&&(k+="g"),x=_(S,f.lastIndex),f.lastIndex>0&&(!f.multiline||f.multiline&&"\n"!==A(S,f.lastIndex-1))&&(O="(?: "+O+")",x=" "+x,N++),r=new RegExp("^(?:"+O+")",k)),I&&(r=new RegExp("^"+O+"$(?!\\s)",k)),E&&(n=f.lastIndex),i=o(v,R?r:f,x),R?i?(i.input=_(i.input,N),i[0]=_(i[0],N),i.index=f.lastIndex,f.lastIndex+=i[0].length):f.lastIndex=0:E&&i&&(f.lastIndex=f.global?i.index+i[0].length:n),I&&i&&i.length>1&&o(g,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&C)for(i.groups=u=h(null),a=0;a<C.length;a++)u[(l=C[a])[0]]=i[l[1]];return i}),e.exports=m},7066:(e,t,r)=>{"use strict";var n=r(9670);e.exports=function(){var e=n(this),t="";return 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}},2999:(e,t,r)=>{var n=r(7293),i=r(7854).RegExp,o=n((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=o||n((function(){return!i("a","y").sticky})),s=o||n((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},9441:(e,t,r)=>{var n=r(7293),i=r(7854).RegExp;e.exports=n((function(){var e=i(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},7168:(e,t,r)=>{var n=r(7293),i=r(7854).RegExp;e.exports=n((function(){var e=i("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},4488:(e,t,r)=>{var n=r(7854).TypeError;e.exports=function(e){if(null==e)throw n("Can't call method on "+e);return e}},6465:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},3505:(e,t,r)=>{var n=r(7854),i=Object.defineProperty;e.exports=function(e,t){try{i(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},6340:(e,t,r)=>{"use strict";var n=r(5005),i=r(3070),o=r(5112),a=r(9781),s=o("species");e.exports=function(e){var t=n(e),r=i.f;a&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},8003:(e,t,r)=>{var n=r(3070).f,i=r(2597),o=r(5112)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!i(e,o)&&n(e,o,{configurable:!0,value:t})}},6200:(e,t,r)=>{var n=r(2309),i=r(9711),o=n("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:(e,t,r)=>{var n=r(7854),i=r(3505),o="__core-js_shared__",a=n[o]||i(o,{});e.exports=a},2309:(e,t,r)=>{var n=r(1913),i=r(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.20.1",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:(e,t,r)=>{var n=r(9670),i=r(9483),o=r(5112)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||null==(r=n(a)[o])?t:i(r)}},3429:(e,t,r)=>{var n=r(7293);e.exports=function(e){return n((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},8710:(e,t,r)=>{var n=r(1702),i=r(9303),o=r(1340),a=r(4488),s=n("".charAt),c=n("".charCodeAt),u=n("".slice),l=function(e){return function(t,r){var n,l,h=o(a(t)),d=i(r),f=h.length;return d<0||d>=f?e?"":void 0:(n=c(h,d))<55296||n>56319||d+1===f||(l=c(h,d+1))<56320||l>57343?e?s(h,d):n:e?u(h,d,d+2):l-56320+(n-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},3111:(e,t,r)=>{var n=r(1702),i=r(4488),o=r(1340),a=r(1361),s=n("".replace),c="["+a+"]",u=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),h=function(e){return function(t){var r=o(i(t));return 1&e&&(r=s(r,u,"")),2&e&&(r=s(r,l,"")),r}};e.exports={start:h(1),end:h(2),trim:h(3)}},261:(e,t,r)=>{var n,i,o,a,s=r(7854),c=r(2104),u=r(9974),l=r(614),h=r(2597),d=r(7293),f=r(490),p=r(206),g=r(317),v=r(6833),m=r(5268),A=s.setImmediate,y=s.clearImmediate,b=s.process,_=s.Dispatch,E=s.Function,w=s.MessageChannel,I=s.String,S=0,T={},C="onreadystatechange";try{n=s.location}catch(e){}var R=function(e){if(h(T,e)){var t=T[e];delete T[e],t()}},k=function(e){return function(){R(e)}},O=function(e){R(e.data)},N=function(e){s.postMessage(I(e),n.protocol+"//"+n.host)};A&&y||(A=function(e){var t=p(arguments,1);return T[++S]=function(){c(l(e)?e:E(e),void 0,t)},i(S),S},y=function(e){delete T[e]},m?i=function(e){b.nextTick(k(e))}:_&&_.now?i=function(e){_.now(k(e))}:w&&!v?(a=(o=new w).port2,o.port1.onmessage=O,i=u(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!d(N)?(i=N,s.addEventListener("message",O,!1)):i=C in g("script")?function(e){f.appendChild(g("script")).onreadystatechange=function(){f.removeChild(this),R(e)}}:function(e){setTimeout(k(e),0)}),e.exports={set:A,clear:y}},1400:(e,t,r)=>{var n=r(9303),i=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):o(r,t)}},7067:(e,t,r)=>{var n=r(7854),i=r(9303),o=r(7466),a=n.RangeError;e.exports=function(e){if(void 0===e)return 0;var t=i(e),r=o(t);if(t!==r)throw a("Wrong length or index");return r}},5656:(e,t,r)=>{var n=r(8361),i=r(4488);e.exports=function(e){return n(i(e))}},9303:e=>{var t=Math.ceil,r=Math.floor;e.exports=function(e){var n=+e;return n!=n||0===n?0:(n>0?r:t)(n)}},7466:(e,t,r)=>{var n=r(9303),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},7908:(e,t,r)=>{var n=r(7854),i=r(4488),o=n.Object;e.exports=function(e){return o(i(e))}},4590:(e,t,r)=>{var n=r(7854),i=r(3002),o=n.RangeError;e.exports=function(e,t){var r=i(e);if(r%t)throw o("Wrong offset");return r}},3002:(e,t,r)=>{var n=r(7854),i=r(9303),o=n.RangeError;e.exports=function(e){var t=i(e);if(t<0)throw o("The argument can't be less than 0");return t}},7593:(e,t,r)=>{var n=r(7854),i=r(6916),o=r(111),a=r(2190),s=r(8173),c=r(2140),u=r(5112),l=n.TypeError,h=u("toPrimitive");e.exports=function(e,t){if(!o(e)||a(e))return e;var r,n=s(e,h);if(n){if(void 0===t&&(t="default"),r=i(n,e,t),!o(r)||a(r))return r;throw l("Can't convert object to primitive value")}return void 0===t&&(t="number"),c(e,t)}},4948:(e,t,r)=>{var n=r(7593),i=r(2190);e.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},1694:(e,t,r)=>{var n={};n[r(5112)("toStringTag")]="z",e.exports="[object z]"===String(n)},1340:(e,t,r)=>{var n=r(7854),i=r(648),o=n.String;e.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},6330:(e,t,r)=>{var n=r(7854).String;e.exports=function(e){try{return n(e)}catch(e){return"Object"}}},9843:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(6916),a=r(9781),s=r(3832),c=r(260),u=r(3331),l=r(5787),h=r(9114),d=r(8880),f=r(5988),p=r(7466),g=r(7067),v=r(4590),m=r(4948),A=r(2597),y=r(648),b=r(111),_=r(2190),E=r(30),w=r(7976),I=r(7674),S=r(8006).f,T=r(7321),C=r(2092).forEach,R=r(6340),k=r(3070),O=r(1236),N=r(9909),x=r(9587),D=N.get,L=N.set,P=k.f,M=O.f,B=Math.round,j=i.RangeError,U=u.ArrayBuffer,F=U.prototype,G=u.DataView,Q=c.NATIVE_ARRAY_BUFFER_VIEWS,q=c.TYPED_ARRAY_CONSTRUCTOR,V=c.TYPED_ARRAY_TAG,K=c.TypedArray,H=c.TypedArrayPrototype,W=c.aTypedArrayConstructor,z=c.isTypedArray,Y="BYTES_PER_ELEMENT",X="Wrong length",J=function(e,t){W(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},Z=function(e,t){P(e,t,{get:function(){return D(this)[t]}})},$=function(e){var t;return w(F,e)||"ArrayBuffer"==(t=y(e))||"SharedArrayBuffer"==t},ee=function(e,t){return z(e)&&!_(t)&&t in e&&f(+t)&&t>=0},te=function(e,t){return t=m(t),ee(e,t)?h(2,e[t]):M(e,t)},re=function(e,t,r){return t=m(t),!(ee(e,t)&&b(r)&&A(r,"value"))||A(r,"get")||A(r,"set")||r.configurable||A(r,"writable")&&!r.writable||A(r,"enumerable")&&!r.enumerable?P(e,t,r):(e[t]=r.value,e)};a?(Q||(O.f=te,k.f=re,Z(H,"buffer"),Z(H,"byteOffset"),Z(H,"byteLength"),Z(H,"length")),n({target:"Object",stat:!0,forced:!Q},{getOwnPropertyDescriptor:te,defineProperty:re}),e.exports=function(e,t,r){var a=e.match(/\d+$/)[0]/8,c=e+(r?"Clamped":"")+"Array",u="get"+e,h="set"+e,f=i[c],m=f,A=m&&m.prototype,y={},_=function(e,t){P(e,t,{get:function(){return function(e,t){var r=D(e);return r.view[u](t*a+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var i=D(e);r&&(n=(n=B(n))<0?0:n>255?255:255&n),i.view[h](t*a+i.byteOffset,n,!0)}(this,t,e)},enumerable:!0})};Q?s&&(m=t((function(e,t,r,n){return l(e,A),x(b(t)?$(t)?void 0!==n?new f(t,v(r,a),n):void 0!==r?new f(t,v(r,a)):new f(t):z(t)?J(m,t):o(T,m,t):new f(g(t)),e,m)})),I&&I(m,K),C(S(f),(function(e){e in m||d(m,e,f[e])})),m.prototype=A):(m=t((function(e,t,r,n){l(e,A);var i,s,c,u=0,h=0;if(b(t)){if(!$(t))return z(t)?J(m,t):o(T,m,t);i=t,h=v(r,a);var d=t.byteLength;if(void 0===n){if(d%a)throw j(X);if((s=d-h)<0)throw j(X)}else if((s=p(n)*a)+h>d)throw j(X);c=s/a}else c=g(t),i=new U(s=c*a);for(L(e,{buffer:i,byteOffset:h,byteLength:s,length:c,view:new G(i)});u<c;)_(e,u++)})),I&&I(m,K),A=m.prototype=E(H)),A.constructor!==m&&d(A,"constructor",m),d(A,q,m),V&&d(A,V,c),y[c]=m,n({global:!0,forced:m!=f,sham:!Q},y),Y in m||d(m,Y,a),Y in A||d(A,Y,a),R(c)}):e.exports=function(){}},3832:(e,t,r)=>{var n=r(7854),i=r(7293),o=r(7072),a=r(260).NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,c=n.Int8Array;e.exports=!a||!i((function(){c(1)}))||!i((function(){new c(-1)}))||!o((function(e){new c,new c(null),new c(1.5),new c(e)}),!0)||i((function(){return 1!==new c(new s(2),1,void 0).length}))},3074:(e,t,r)=>{var n=r(7745),i=r(6304);e.exports=function(e,t){return n(i(e),t)}},7321:(e,t,r)=>{var n=r(9974),i=r(6916),o=r(9483),a=r(7908),s=r(6244),c=r(8554),u=r(1246),l=r(7659),h=r(260).aTypedArrayConstructor;e.exports=function(e){var t,r,d,f,p,g,v=o(this),m=a(e),A=arguments.length,y=A>1?arguments[1]:void 0,b=void 0!==y,_=u(m);if(_&&!l(_))for(g=(p=c(m,_)).next,m=[];!(f=i(g,p)).done;)m.push(f.value);for(b&&A>2&&(y=n(y,arguments[2])),r=s(m),d=new(h(v))(r),t=0;r>t;t++)d[t]=b?y(m[t],t):m[t];return d}},6304:(e,t,r)=>{var n=r(260),i=r(6707),o=n.TYPED_ARRAY_CONSTRUCTOR,a=n.aTypedArrayConstructor;e.exports=function(e){return a(i(e,e[o]))}},9711:(e,t,r)=>{var n=r(1702),i=0,o=Math.random(),a=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+o,36)}},3307:(e,t,r)=>{var n=r(133);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:(e,t,r)=>{var n=r(5112);t.f=n},5112:(e,t,r)=>{var n=r(7854),i=r(2309),o=r(2597),a=r(9711),s=r(133),c=r(3307),u=i("wks"),l=n.Symbol,h=l&&l.for,d=c?l:l&&l.withoutSetter||a;e.exports=function(e){if(!o(u,e)||!s&&"string"!=typeof u[e]){var t="Symbol."+e;s&&o(l,e)?u[e]=l[e]:u[e]=c&&h?h(t):d(t)}return u[e]}},1361:e=>{e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},9575:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(7293),a=r(3331),s=r(9670),c=r(1400),u=r(7466),l=r(6707),h=a.ArrayBuffer,d=a.DataView,f=d.prototype,p=i(h.prototype.slice),g=i(f.getUint8),v=i(f.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(p&&void 0===t)return p(s(this),e);for(var r=s(this).byteLength,n=c(e,r),i=c(void 0===t?r:t,r),o=new(l(this,h))(u(i-n)),a=new d(this),f=new d(o),m=0;n<i;)v(f,m++,g(a,n++));return o}})},2222:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(7293),a=r(3157),s=r(111),c=r(7908),u=r(6244),l=r(6135),h=r(5417),d=r(1194),f=r(5112),p=r(7392),g=f("isConcatSpreadable"),v=9007199254740991,m="Maximum allowed index exceeded",A=i.TypeError,y=p>=51||!o((function(){var e=[];return e[g]=!1,e.concat()[0]!==e})),b=d("concat"),_=function(e){if(!s(e))return!1;var t=e[g];return void 0!==t?!!t:a(e)};n({target:"Array",proto:!0,forced:!y||!b},{concat:function(e){var t,r,n,i,o,a=c(this),s=h(a,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(_(o=-1===t?a:arguments[t])){if(d+(i=u(o))>v)throw A(m);for(r=0;r<i;r++,d++)r in o&&l(s,d,o[r])}else{if(d>=v)throw A(m);l(s,d++,o)}return s.length=d,s}})},3290:(e,t,r)=>{var n=r(2109),i=r(1285),o=r(1223);n({target:"Array",proto:!0},{fill:i}),o("fill")},7327:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).filter;n({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},9826:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).find,o=r(1223),a="find",s=!0;a in[]&&Array(1).find((function(){s=!1})),n({target:"Array",proto:!0,forced:s},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(a)},9554:(e,t,r)=>{"use strict";var n=r(2109),i=r(8533);n({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},1038:(e,t,r)=>{var n=r(2109),i=r(8457);n({target:"Array",stat:!0,forced:!r(7072)((function(e){Array.from(e)}))},{from:i})},6699:(e,t,r)=>{"use strict";var n=r(2109),i=r(1318).includes,o=r(1223);n({target:"Array",proto:!0},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},2772:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(1318).indexOf,a=r(9341),s=i([].indexOf),c=!!s&&1/s([1],1,-0)<0,u=a("indexOf");n({target:"Array",proto:!0,forced:c||!u},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return c?s(this,e,t)||0:o(this,e,t)}})},9753:(e,t,r)=>{r(2109)({target:"Array",stat:!0},{isArray:r(3157)})},6992:(e,t,r)=>{"use strict";var n=r(5656),i=r(1223),o=r(7497),a=r(9909),s=r(3070).f,c=r(654),u=r(1913),l=r(9781),h="Array Iterator",d=a.set,f=a.getterFor(h);e.exports=c(Array,"Array",(function(e,t){d(this,{type:h,target:n(e),index:0,kind:t})}),(function(){var e=f(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");var p=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!u&&l&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(e){}},9600:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(8361),a=r(5656),s=r(9341),c=i([].join),u=o!=Object,l=s("join",",");n({target:"Array",proto:!0,forced:u||!l},{join:function(e){return c(a(this),void 0===e?",":e)}})},1249:(e,t,r)=>{"use strict";var n=r(2109),i=r(2092).map;n({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},5827:(e,t,r)=>{"use strict";var n=r(2109),i=r(3671).left,o=r(9341),a=r(7392),s=r(5268);n({target:"Array",proto:!0,forced:!o("reduce")||!s&&a>79&&a<83},{reduce:function(e){var t=arguments.length;return i(this,e,t,t>1?arguments[1]:void 0)}})},7042:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(3157),a=r(4411),s=r(111),c=r(1400),u=r(6244),l=r(5656),h=r(6135),d=r(5112),f=r(1194),p=r(206),g=f("slice"),v=d("species"),m=i.Array,A=Math.max;n({target:"Array",proto:!0,forced:!g},{slice:function(e,t){var r,n,i,d=l(this),f=u(d),g=c(e,f),y=c(void 0===t?f:t,f);if(o(d)&&(r=d.constructor,(a(r)&&(r===m||o(r.prototype))||s(r)&&null===(r=r[v]))&&(r=void 0),r===m||void 0===r))return p(d,g,y);for(n=new(void 0===r?m:r)(A(y-g,0)),i=0;g<y;g++,i++)g in d&&h(n,i,d[g]);return n.length=i,n}})},2707:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(9662),a=r(7908),s=r(6244),c=r(1340),u=r(7293),l=r(4362),h=r(9341),d=r(8886),f=r(256),p=r(7392),g=r(8008),v=[],m=i(v.sort),A=i(v.push),y=u((function(){v.sort(void 0)})),b=u((function(){v.sort(null)})),_=h("sort"),E=!u((function(){if(p)return p<70;if(!(d&&d>3)){if(f)return!0;if(g)return g<603;var e,t,r,n,i="";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++)v.push({k:t+n,v:r})}for(v.sort((function(e,t){return t.v-e.v})),n=0;n<v.length;n++)t=v[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));n({target:"Array",proto:!0,forced:y||!b||!_||!E},{sort:function(e){void 0!==e&&o(e);var t=a(this);if(E)return void 0===e?m(t):m(t,e);var r,n,i=[],u=s(t);for(n=0;n<u;n++)n in t&&A(i,t[n]);for(l(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:c(t)>c(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<u;)delete t[n++];return t}})},561:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(1400),a=r(9303),s=r(6244),c=r(7908),u=r(5417),l=r(6135),h=r(1194)("splice"),d=i.TypeError,f=Math.max,p=Math.min,g=9007199254740991,v="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!h},{splice:function(e,t){var r,n,i,h,m,A,y=c(this),b=s(y),_=o(e,b),E=arguments.length;if(0===E?r=n=0:1===E?(r=0,n=b-_):(r=E-2,n=p(f(a(t),0),b-_)),b+r-n>g)throw d(v);for(i=u(y,n),h=0;h<n;h++)(m=_+h)in y&&l(i,h,y[m]);if(i.length=n,r<n){for(h=_;h<b-n;h++)A=h+r,(m=h+n)in y?y[A]=y[m]:delete y[A];for(h=b;h>b-n+r;h--)delete y[h-1]}else if(r>n)for(h=b-n;h>_;h--)A=h+r-1,(m=h+n-1)in y?y[A]=y[m]:delete y[A];for(h=0;h<r;h++)y[h+_]=arguments[h+2];return y.length=b-n+r,i}})},3843:(e,t,r)=>{var n=r(2109),i=r(7854),o=r(1702),a=i.Date,s=o(a.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return s(new a)}})},3710:(e,t,r)=>{var n=r(1702),i=r(1320),o=Date.prototype,a="Invalid Date",s="toString",c=n(o.toString),u=n(o.getTime);String(new Date(NaN))!=a&&i(o,s,(function(){var e=u(this);return e==e?c(this):a}))},4812:(e,t,r)=>{r(2109)({target:"Function",proto:!0},{bind:r(7065)})},8309:(e,t,r)=>{var n=r(9781),i=r(6530).EXISTS,o=r(1702),a=r(3070).f,s=Function.prototype,c=o(s.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(u.exec);n&&!i&&a(s,"name",{configurable:!0,get:function(){try{return l(u,c(this))[1]}catch(e){return""}}})},1532:(e,t,r)=>{"use strict";r(7710)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(5631))},9601:(e,t,r)=>{var n=r(2109),i=r(1574);n({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},3321:(e,t,r)=>{var n=r(2109),i=r(9781);n({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:r(6048)})},9070:(e,t,r)=>{var n=r(2109),i=r(9781);n({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:r(3070).f})},9720:(e,t,r)=>{var n=r(2109),i=r(4699).entries;n({target:"Object",stat:!0},{entries:function(e){return i(e)}})},3371:(e,t,r)=>{var n=r(2109),i=r(6677),o=r(7293),a=r(111),s=r(2423).onFreeze,c=Object.freeze;n({target:"Object",stat:!0,forced:o((function(){c(1)})),sham:!i},{freeze:function(e){return c&&a(e)?c(s(e)):e}})},5003:(e,t,r)=>{var n=r(2109),i=r(7293),o=r(5656),a=r(1236).f,s=r(9781),c=i((function(){a(1)}));n({target:"Object",stat:!0,forced:!s||c,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},9337:(e,t,r)=>{var n=r(2109),i=r(9781),o=r(3887),a=r(5656),s=r(1236),c=r(6135);n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,r,n=a(e),i=s.f,u=o(n),l={},h=0;u.length>h;)void 0!==(r=i(n,t=u[h++]))&&c(l,t,r);return l}})},6210:(e,t,r)=>{var n=r(2109),i=r(7293),o=r(1156).f;n({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},7941:(e,t,r)=>{var n=r(2109),i=r(7908),o=r(1956);n({target:"Object",stat:!0,forced:r(7293)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},1539:(e,t,r)=>{var n=r(1694),i=r(1320),o=r(288);n||i(Object.prototype,"toString",o,{unsafe:!0})},2479:(e,t,r)=>{var n=r(2109),i=r(4699).values;n({target:"Object",stat:!0},{values:function(e){return i(e)}})},1058:(e,t,r)=>{var n=r(2109),i=r(3009);n({global:!0,forced:parseInt!=i},{parseInt:i})},7727:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(3366),a=r(7293),s=r(5005),c=r(614),u=r(6707),l=r(9478),h=r(1320);if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,s("Promise")),r=c(e);return this.then(r?function(r){return l(t,e()).then((function(){return r}))}:e,r?function(r){return l(t,e()).then((function(){throw r}))}:e)}}),!i&&c(o)){var d=s("Promise").prototype.finally;o.prototype.finally!==d&&h(o.prototype,"finally",d,{unsafe:!0})}},8674:(e,t,r)=>{"use strict";var n,i,o,a,s=r(2109),c=r(1913),u=r(7854),l=r(5005),h=r(6916),d=r(3366),f=r(1320),p=r(2248),g=r(7674),v=r(8003),m=r(6340),A=r(9662),y=r(614),b=r(111),_=r(5787),E=r(2788),w=r(408),I=r(7072),S=r(6707),T=r(261).set,C=r(5948),R=r(9478),k=r(842),O=r(8523),N=r(2534),x=r(8572),D=r(9909),L=r(4705),P=r(5112),M=r(7871),B=r(5268),j=r(7392),U=P("species"),F="Promise",G=D.getterFor(F),Q=D.set,q=D.getterFor(F),V=d&&d.prototype,K=d,H=V,W=u.TypeError,z=u.document,Y=u.process,X=O.f,J=X,Z=!!(z&&z.createEvent&&u.dispatchEvent),$=y(u.PromiseRejectionEvent),ee="unhandledrejection",te=!1,re=L(F,(function(){var e=E(K),t=e!==String(K);if(!t&&66===j)return!0;if(c&&!H.finally)return!0;if(j>=51&&/native code/.test(e))return!1;var r=new K((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[U]=n,!(te=r.then((function(){}))instanceof n)||!t&&M&&!$})),ne=re||!I((function(e){K.all(e).catch((function(){}))})),ie=function(e){var t;return!(!b(e)||!y(t=e.then))&&t},oe=function(e,t){var r,n,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&le(t),t.rejection=1),!0===s?r=o:(l&&l.enter(),r=s(o),l&&(l.exit(),i=!0)),r===e.promise?u(W("Promise-chain cycle")):(n=ie(r))?h(n,r,c,u):c(r)):u(o)}catch(e){l&&!i&&l.exit(),u(e)}},ae=function(e,t){e.notified||(e.notified=!0,C((function(){for(var r,n=e.reactions;r=n.get();)oe(r,e);e.notified=!1,t&&!e.rejection&&ce(e)})))},se=function(e,t,r){var n,i;Z?((n=z.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!$&&(i=u["on"+e])?i(n):e===ee&&k("Unhandled promise rejection",r)},ce=function(e){h(T,u,(function(){var t,r=e.facade,n=e.value;if(ue(e)&&(t=N((function(){B?Y.emit("unhandledRejection",n,r):se(ee,r,n)})),e.rejection=B||ue(e)?2:1,t.error))throw t.value}))},ue=function(e){return 1!==e.rejection&&!e.parent},le=function(e){h(T,u,(function(){var t=e.facade;B?Y.emit("rejectionHandled",t):se("rejectionhandled",t,e.value)}))},he=function(e,t,r){return function(n){e(t,n,r)}},de=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,ae(e,!0))},fe=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw W("Promise can't be resolved itself");var n=ie(t);n?C((function(){var r={done:!1};try{h(n,t,he(fe,r,e),he(de,r,e))}catch(t){de(r,t,e)}})):(e.value=t,e.state=1,ae(e,!1))}catch(t){de({done:!1},t,e)}}};if(re&&(H=(K=function(e){_(this,H),A(e),h(n,this);var t=G(this);try{e(he(fe,t),he(de,t))}catch(e){de(t,e)}}).prototype,(n=function(e){Q(this,{type:F,done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:0,value:void 0})}).prototype=p(H,{then:function(e,t){var r=q(this),n=X(S(this,K));return r.parent=!0,n.ok=!y(e)||e,n.fail=y(t)&&t,n.domain=B?Y.domain:void 0,0==r.state?r.reactions.add(n):C((function(){oe(n,r)})),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new n,t=G(e);this.promise=e,this.resolve=he(fe,t),this.reject=he(de,t)},O.f=X=function(e){return e===K||e===o?new i(e):J(e)},!c&&y(d)&&V!==Object.prototype)){a=V.then,te||(f(V,"then",(function(e,t){var r=this;return new K((function(e,t){h(a,r,e,t)})).then(e,t)}),{unsafe:!0}),f(V,"catch",H.catch,{unsafe:!0}));try{delete V.constructor}catch(e){}g&&g(V,H)}s({global:!0,wrap:!0,forced:re},{Promise:K}),v(K,F,!1,!0),m(F),o=l(F),s({target:F,stat:!0,forced:re},{reject:function(e){var t=X(this);return h(t.reject,void 0,e),t.promise}}),s({target:F,stat:!0,forced:c||re},{resolve:function(e){return R(c&&this===o?K:this,e)}}),s({target:F,stat:!0,forced:ne},{all:function(e){var t=this,r=X(t),n=r.resolve,i=r.reject,o=N((function(){var r=A(t.resolve),o=[],a=0,s=1;w(e,(function(e){var c=a++,u=!1;s++,h(r,t,e).then((function(e){u||(u=!0,o[c]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise},race:function(e){var t=this,r=X(t),n=r.reject,i=N((function(){var i=A(t.resolve);w(e,(function(e){h(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}})},2419:(e,t,r)=>{var n=r(2109),i=r(5005),o=r(2104),a=r(7065),s=r(9483),c=r(9670),u=r(111),l=r(30),h=r(7293),d=i("Reflect","construct"),f=Object.prototype,p=[].push,g=h((function(){function e(){}return!(d((function(){}),[],e)instanceof e)})),v=!h((function(){d((function(){}))})),m=g||v;n({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(e,t){s(e),c(t);var r=arguments.length<3?e:s(arguments[2]);if(v&&!g)return d(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return o(p,n,t),new(o(a,e,n))}var i=r.prototype,h=l(u(i)?i:f),m=o(e,h,t);return u(m)?m:h}})},4916:(e,t,r)=>{"use strict";var n=r(2109),i=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},189:(e,t,r)=>{"use strict";r(7710)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(5631))},2023:(e,t,r)=>{"use strict";var n=r(2109),i=r(1702),o=r(3929),a=r(4488),s=r(1340),c=r(4964),u=i("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(e){return!!~u(s(a(this)),s(o(e)),arguments.length>1?arguments[1]:void 0)}})},8783:(e,t,r)=>{"use strict";var n=r(8710).charAt,i=r(1340),o=r(9909),a=r(654),s="String Iterator",c=o.set,u=o.getterFor(s);a(String,"String",(function(e){c(this,{type:s,string:i(e),index:0})}),(function(){var e,t=u(this),r=t.string,i=t.index;return i>=r.length?{value:void 0,done:!0}:(e=n(r,i),t.index+=e.length,{value:e,done:!1})}))},5306:(e,t,r)=>{"use strict";var n=r(2104),i=r(6916),o=r(1702),a=r(7007),s=r(7293),c=r(9670),u=r(614),l=r(9303),h=r(7466),d=r(1340),f=r(4488),p=r(1530),g=r(8173),v=r(647),m=r(7651),A=r(5112)("replace"),y=Math.max,b=Math.min,_=o([].concat),E=o([].push),w=o("".indexOf),I=o("".slice),S="$0"==="a".replace(/./,"$0"),T=!!/./[A]&&""===/./[A]("a","$0");a("replace",(function(e,t,r){var o=T?"$":"$0";return[function(e,r){var n=f(this),o=null==e?void 0:g(e,A);return o?i(o,e,n,r):i(t,d(n),e,r)},function(e,i){var a=c(this),s=d(e);if("string"==typeof i&&-1===w(i,o)&&-1===w(i,"$<")){var f=r(t,a,s,i);if(f.done)return f.value}var g=u(i);g||(i=d(i));var A=a.global;if(A){var S=a.unicode;a.lastIndex=0}for(var T=[];;){var C=m(a,s);if(null===C)break;if(E(T,C),!A)break;""===d(C[0])&&(a.lastIndex=p(s,h(a.lastIndex),S))}for(var R,k="",O=0,N=0;N<T.length;N++){for(var x=d((C=T[N])[0]),D=y(b(l(C.index),s.length),0),L=[],P=1;P<C.length;P++)E(L,void 0===(R=C[P])?R:String(R));var M=C.groups;if(g){var B=_([x],L,D,s);void 0!==M&&E(B,M);var j=d(n(i,void 0,B))}else j=v(x,s,D,L,M,i);D>=O&&(k+=I(s,O,D)+j,O=D+x.length)}return k+I(s,O)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!S||T)},3123:(e,t,r)=>{"use strict";var n=r(2104),i=r(6916),o=r(1702),a=r(7007),s=r(7850),c=r(9670),u=r(4488),l=r(6707),h=r(1530),d=r(7466),f=r(1340),p=r(8173),g=r(1589),v=r(7651),m=r(2261),A=r(2999),y=r(7293),b=A.UNSUPPORTED_Y,_=4294967295,E=Math.min,w=[].push,I=o(/./.exec),S=o(w),T=o("".slice),C=!y((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]}));a("split",(function(e,t,r){var o;return o="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 o=f(u(this)),a=void 0===r?_:r>>>0;if(0===a)return[];if(void 0===e)return[o];if(!s(e))return i(t,o,e,a);for(var c,l,h,d=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),v=0,A=new RegExp(e.source,p+"g");(c=i(m,A,o))&&!((l=A.lastIndex)>v&&(S(d,T(o,v,c.index)),c.length>1&&c.index<o.length&&n(w,d,g(c,1)),h=c[0].length,v=l,d.length>=a));)A.lastIndex===c.index&&A.lastIndex++;return v===o.length?!h&&I(A,"")||S(d,""):S(d,T(o,v)),d.length>a?g(d,0,a):d}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:i(t,this,e,r)}:t,[function(t,r){var n=u(this),a=null==t?void 0:p(t,e);return a?i(a,t,n,r):i(o,f(n),t,r)},function(e,n){var i=c(this),a=f(e),s=r(o,i,a,n,o!==t);if(s.done)return s.value;var u=l(i,RegExp),p=i.unicode,g=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(b?"g":"y"),m=new u(b?"^(?:"+i.source+")":i,g),A=void 0===n?_:n>>>0;if(0===A)return[];if(0===a.length)return null===v(m,a)?[a]:[];for(var y=0,w=0,I=[];w<a.length;){m.lastIndex=b?0:w;var C,R=v(m,b?T(a,w):a);if(null===R||(C=E(d(m.lastIndex+(b?w:0)),a.length))===y)w=h(a,w,p);else{if(S(I,T(a,y,w)),I.length===A)return I;for(var k=1;k<=R.length-1;k++)if(S(I,R[k]),I.length===A)return I;w=y=C}}return S(I,T(a,y)),I}]}),!C,b)},86:(e,t,r)=>{"use strict";var n=r(2109),i=r(4230);n({target:"String",proto:!0,forced:r(3429)("sub")},{sub:function(){return i(this,"sub","","")}})},1817:(e,t,r)=>{"use strict";var n=r(2109),i=r(9781),o=r(7854),a=r(1702),s=r(2597),c=r(614),u=r(7976),l=r(1340),h=r(3070).f,d=r(9920),f=o.Symbol,p=f&&f.prototype;if(i&&c(f)&&(!("description"in p)||void 0!==f().description)){var g={},v=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=u(p,this)?new f(e):void 0===e?f():f(e);return""===e&&(g[t]=!0),t};d(v,f),v.prototype=p,p.constructor=v;var m="Symbol(test)"==String(f("test")),A=a(p.toString),y=a(p.valueOf),b=/^Symbol\((.*)\)[^)]+$/,_=a("".replace),E=a("".slice);h(p,"description",{configurable:!0,get:function(){var e=y(this),t=A(e);if(s(g,e))return"";var r=m?E(t,7,-1):_(t,b,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:v})}},2165:(e,t,r)=>{r(7235)("iterator")},2526:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(5005),a=r(2104),s=r(6916),c=r(1702),u=r(1913),l=r(9781),h=r(133),d=r(7293),f=r(2597),p=r(3157),g=r(614),v=r(111),m=r(7976),A=r(2190),y=r(9670),b=r(7908),_=r(5656),E=r(4948),w=r(1340),I=r(9114),S=r(30),T=r(1956),C=r(8006),R=r(1156),k=r(5181),O=r(1236),N=r(3070),x=r(5296),D=r(206),L=r(1320),P=r(2309),M=r(6200),B=r(3501),j=r(9711),U=r(5112),F=r(6061),G=r(7235),Q=r(8003),q=r(9909),V=r(2092).forEach,K=M("hidden"),H="Symbol",W=U("toPrimitive"),z=q.set,Y=q.getterFor(H),X=Object.prototype,J=i.Symbol,Z=J&&J.prototype,$=i.TypeError,ee=i.QObject,te=o("JSON","stringify"),re=O.f,ne=N.f,ie=R.f,oe=x.f,ae=c([].push),se=P("symbols"),ce=P("op-symbols"),ue=P("string-to-symbol-registry"),le=P("symbol-to-string-registry"),he=P("wks"),de=!ee||!ee.prototype||!ee.prototype.findChild,fe=l&&d((function(){return 7!=S(ne({},"a",{get:function(){return ne(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=re(X,t);n&&delete X[t],ne(e,t,r),n&&e!==X&&ne(X,t,n)}:ne,pe=function(e,t){var r=se[e]=S(Z);return z(r,{type:H,tag:e,description:t}),l||(r.description=t),r},ge=function(e,t,r){e===X&&ge(ce,t,r),y(e);var n=E(t);return y(r),f(se,n)?(r.enumerable?(f(e,K)&&e[K][n]&&(e[K][n]=!1),r=S(r,{enumerable:I(0,!1)})):(f(e,K)||ne(e,K,I(1,{})),e[K][n]=!0),fe(e,n,r)):ne(e,n,r)},ve=function(e,t){y(e);var r=_(t),n=T(r).concat(be(r));return V(n,(function(t){l&&!s(me,r,t)||ge(e,t,r[t])})),e},me=function(e){var t=E(e),r=s(oe,this,t);return!(this===X&&f(se,t)&&!f(ce,t))&&(!(r||!f(this,t)||!f(se,t)||f(this,K)&&this[K][t])||r)},Ae=function(e,t){var r=_(e),n=E(t);if(r!==X||!f(se,n)||f(ce,n)){var i=re(r,n);return!i||!f(se,n)||f(r,K)&&r[K][n]||(i.enumerable=!0),i}},ye=function(e){var t=ie(_(e)),r=[];return V(t,(function(e){f(se,e)||f(B,e)||ae(r,e)})),r},be=function(e){var t=e===X,r=ie(t?ce:_(e)),n=[];return V(r,(function(e){!f(se,e)||t&&!f(X,e)||ae(n,se[e])})),n};(h||(J=function(){if(m(Z,this))throw $("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?w(arguments[0]):void 0,t=j(e),r=function(e){this===X&&s(r,ce,e),f(this,K)&&f(this[K],t)&&(this[K][t]=!1),fe(this,t,I(1,e))};return l&&de&&fe(X,t,{configurable:!0,set:r}),pe(t,e)},L(Z=J.prototype,"toString",(function(){return Y(this).tag})),L(J,"withoutSetter",(function(e){return pe(j(e),e)})),x.f=me,N.f=ge,O.f=Ae,C.f=R.f=ye,k.f=be,F.f=function(e){return pe(U(e),e)},l&&(ne(Z,"description",{configurable:!0,get:function(){return Y(this).description}}),u||L(X,"propertyIsEnumerable",me,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!h,sham:!h},{Symbol:J}),V(T(he),(function(e){G(e)})),n({target:H,stat:!0,forced:!h},{for:function(e){var t=w(e);if(f(ue,t))return ue[t];var r=J(t);return ue[t]=r,le[r]=t,r},keyFor:function(e){if(!A(e))throw $(e+" is not a symbol");if(f(le,e))return le[e]},useSetter:function(){de=!0},useSimple:function(){de=!1}}),n({target:"Object",stat:!0,forced:!h,sham:!l},{create:function(e,t){return void 0===t?S(e):ve(S(e),t)},defineProperty:ge,defineProperties:ve,getOwnPropertyDescriptor:Ae}),n({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:ye,getOwnPropertySymbols:be}),n({target:"Object",stat:!0,forced:d((function(){k.f(1)}))},{getOwnPropertySymbols:function(e){return k.f(b(e))}}),te)&&n({target:"JSON",stat:!0,forced:!h||d((function(){var e=J();return"[null]"!=te([e])||"{}"!=te({a:e})||"{}"!=te(Object(e))}))},{stringify:function(e,t,r){var n=D(arguments),i=t;if((v(t)||void 0!==e)&&!A(e))return p(t)||(t=function(e,t){if(g(i)&&(t=s(i,this,e,t)),!A(t))return t}),n[1]=t,a(te,null,n)}});if(!Z[W]){var _e=Z.valueOf;L(Z,W,(function(e){return s(_e,this)}))}Q(J,H),B[K]=!0},2990:(e,t,r)=>{"use strict";var n=r(1702),i=r(260),o=n(r(1048)),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(e,t){return o(a(this),e,t,arguments.length>2?arguments[2]:void 0)}))},8927:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).every,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3105:(e,t,r)=>{"use strict";var n=r(260),i=r(6916),o=r(1285),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return i(o,a(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}))},5035:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).filter,o=r(3074),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(e){var t=i(a(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)}))},7174:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).findIndex,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4345:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).find,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4197:(e,t,r)=>{r(9843)("Float32",(function(e){return function(t,r,n){return e(this,t,r,n)}}))},2846:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).forEach,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(e){i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},4731:(e,t,r)=>{"use strict";var n=r(260),i=r(1318).includes,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},7209:(e,t,r)=>{"use strict";var n=r(260),i=r(1318).indexOf,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},6319:(e,t,r)=>{"use strict";var n=r(7854),i=r(7293),o=r(1702),a=r(260),s=r(6992),c=r(5112)("iterator"),u=n.Uint8Array,l=o(s.values),h=o(s.keys),d=o(s.entries),f=a.aTypedArray,p=a.exportTypedArrayMethod,g=u&&u.prototype,v=!i((function(){g[c].call([1])})),m=!!g&&g.values&&g[c]===g.values&&"values"===g.values.name,A=function(){return l(f(this))};p("entries",(function(){return d(f(this))}),v),p("keys",(function(){return h(f(this))}),v),p("values",A,v||!m,{name:"values"}),p(c,A,v||!m,{name:"values"})},8867:(e,t,r)=>{"use strict";var n=r(260),i=r(1702),o=n.aTypedArray,a=n.exportTypedArrayMethod,s=i([].join);a("join",(function(e){return s(o(this),e)}))},7789:(e,t,r)=>{"use strict";var n=r(260),i=r(2104),o=r(6583),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return i(o,a(this),t>1?[e,arguments[1]]:[e])}))},3739:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).map,o=r(6304),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(o(e))(t)}))}))},4483:(e,t,r)=>{"use strict";var n=r(260),i=r(3671).right,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},9368:(e,t,r)=>{"use strict";var n=r(260),i=r(3671).left,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return i(o(this),e,t,t>1?arguments[1]:void 0)}))},2056:(e,t,r)=>{"use strict";var n=r(260),i=n.aTypedArray,o=n.exportTypedArrayMethod,a=Math.floor;o("reverse",(function(){for(var e,t=this,r=i(t).length,n=a(r/2),o=0;o<n;)e=t[o],t[o++]=t[--r],t[r]=e;return t}))},3462:(e,t,r)=>{"use strict";var n=r(7854),i=r(260),o=r(6244),a=r(4590),s=r(7908),c=r(7293),u=n.RangeError,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("set",(function(e){l(this);var t=a(arguments.length>1?arguments[1]:void 0,1),r=this.length,n=s(e),i=o(n),c=0;if(i+t>r)throw u("Wrong length");for(;c<i;)this[t+c]=n[c++]}),c((function(){new Int8Array(1).set({})})))},678:(e,t,r)=>{"use strict";var n=r(260),i=r(6304),o=r(7293),a=r(206),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(e,t){for(var r=a(s(this),e,t),n=i(this),o=0,c=r.length,u=new n(c);c>o;)u[o]=r[o++];return u}),o((function(){new Int8Array(1).slice()})))},7462:(e,t,r)=>{"use strict";var n=r(260),i=r(2092).some,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)}))},3824:(e,t,r)=>{"use strict";var n=r(7854),i=r(1702),o=r(7293),a=r(9662),s=r(4362),c=r(260),u=r(8886),l=r(256),h=r(7392),d=r(8008),f=n.Array,p=c.aTypedArray,g=c.exportTypedArrayMethod,v=n.Uint16Array,m=v&&i(v.prototype.sort),A=!(!m||o((function(){m(new v(2),null)}))&&o((function(){m(new v(2),{})}))),y=!!m&&!o((function(){if(h)return h<74;if(u)return u<67;if(l)return!0;if(d)return d<602;var e,t,r=new v(516),n=f(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(m(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));g("sort",(function(e){return void 0!==e&&a(e),y?m(this,e):s(p(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!y||A)},5021:(e,t,r)=>{"use strict";var n=r(260),i=r(7466),o=r(1400),a=r(6304),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(e,t){var r=s(this),n=r.length,c=o(e,n);return new(a(r))(r.buffer,r.byteOffset+c*r.BYTES_PER_ELEMENT,i((void 0===t?n:o(t,n))-c))}))},2974:(e,t,r)=>{"use strict";var n=r(7854),i=r(2104),o=r(260),a=r(7293),s=r(206),c=n.Int8Array,u=o.aTypedArray,l=o.exportTypedArrayMethod,h=[].toLocaleString,d=!!c&&a((function(){h.call(new c(1))}));l("toLocaleString",(function(){return i(h,d?s(u(this)):u(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new c([1,2]).toLocaleString()}))||!a((function(){c.prototype.toLocaleString.call([1,2])})))},5016:(e,t,r)=>{"use strict";var n=r(260).exportTypedArrayMethod,i=r(7293),o=r(7854),a=r(1702),s=o.Uint8Array,c=s&&s.prototype||{},u=[].toString,l=a([].join);i((function(){u.call({})}))&&(u=function(){return l(this)});var h=c.toString!=u;n("toString",u,h)},2472:(e,t,r)=>{r(9843)("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}))},4129:(e,t,r)=>{"use strict";var n,i=r(7854),o=r(1702),a=r(2248),s=r(2423),c=r(7710),u=r(9320),l=r(111),h=r(2050),d=r(9909).enforce,f=r(8536),p=!i.ActiveXObject&&"ActiveXObject"in i,g=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},v=c("WeakMap",g,u);if(f&&p){n=u.getConstructor(g,"WeakMap",!0),s.enable();var m=v.prototype,A=o(m.delete),y=o(m.has),b=o(m.get),_=o(m.set);a(m,{delete:function(e){if(l(e)&&!h(e)){var t=d(this);return t.frozen||(t.frozen=new n),A(this,e)||t.frozen.delete(e)}return A(this,e)},has:function(e){if(l(e)&&!h(e)){var t=d(this);return t.frozen||(t.frozen=new n),y(this,e)||t.frozen.has(e)}return y(this,e)},get:function(e){if(l(e)&&!h(e)){var t=d(this);return t.frozen||(t.frozen=new n),y(this,e)?b(this,e):t.frozen.get(e)}return b(this,e)},set:function(e,t){if(l(e)&&!h(e)){var r=d(this);r.frozen||(r.frozen=new n),y(this,e)?_(this,e,t):r.frozen.set(e,t)}else _(this,e,t);return this}})}},8478:(e,t,r)=>{"use strict";r(7710)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(9320))},72:(e,t,r)=>{"use strict";r(2109)({target:"Map",proto:!0,real:!0,forced:r(1913)},{deleteAll:r(4092)})},9137:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(4647),c=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{every:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return!c(r,(function(e,r,i){if(!n(r,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},1957:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(9974),s=r(6916),c=r(9662),u=r(9670),l=r(6707),h=r(4647),d=r(408);i({target:"Map",proto:!0,real:!0,forced:n},{filter:function(e){var t=u(this),r=h(t),n=a(e,arguments.length>1?arguments[1]:void 0),i=new(l(t,o("Map"))),f=c(i.set);return d(r,(function(e,r){n(r,e,t)&&s(f,i,e,r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},103:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(4647),c=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{findKey:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return c(r,(function(e,r,i){if(n(r,e,t))return i(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},6306:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(4647),c=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{find:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return c(r,(function(e,r,i){if(n(r,e,t))return i(r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},4592:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(9670),a=r(4647),s=r(6465),c=r(408);i({target:"Map",proto:!0,real:!0,forced:n},{includes:function(e){return c(a(o(this)),(function(t,r,n){if(s(r,e))return n()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},8276:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(4647),s=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{keyOf:function(e){return s(a(o(this)),(function(t,r,n){if(r===e)return n(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},5082:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(9974),s=r(6916),c=r(9662),u=r(9670),l=r(6707),h=r(4647),d=r(408);i({target:"Map",proto:!0,real:!0,forced:n},{mapKeys:function(e){var t=u(this),r=h(t),n=a(e,arguments.length>1?arguments[1]:void 0),i=new(l(t,o("Map"))),f=c(i.set);return d(r,(function(e,r){s(f,i,n(r,e,t),r)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},2813:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(9974),s=r(6916),c=r(9662),u=r(9670),l=r(6707),h=r(4647),d=r(408);i({target:"Map",proto:!0,real:!0,forced:n},{mapValues:function(e){var t=u(this),r=h(t),n=a(e,arguments.length>1?arguments[1]:void 0),i=new(l(t,o("Map"))),f=c(i.set);return d(r,(function(e,r){s(f,i,e,n(r,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},8222:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9662),a=r(9670),s=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{merge:function(e){for(var t=a(this),r=o(t.set),n=arguments.length,i=0;i<n;)s(arguments[i++],r,{that:t,AS_ENTRIES:!0});return t}})},8563:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(1913),a=r(9670),s=r(9662),c=r(4647),u=r(408),l=i.TypeError;n({target:"Map",proto:!0,real:!0,forced:o},{reduce:function(e){var t=a(this),r=c(t),n=arguments.length<2,i=n?void 0:arguments[1];if(s(e),u(r,(function(r,o){n?(n=!1,i=o):i=e(i,o,r,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),n)throw l("Reduce of empty map with no initial value");return i}})},336:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(4647),c=r(408);n({target:"Map",proto:!0,real:!0,forced:i},{some:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return c(r,(function(e,r,i){if(n(r,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},7512:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(7854),a=r(6916),s=r(9670),c=r(9662),u=o.TypeError;i({target:"Map",proto:!0,real:!0,forced:n},{update:function(e,t){var r=s(this),n=c(r.get),i=c(r.has),o=c(r.set),l=arguments.length;c(t);var h=a(i,r,e);if(!h&&l<3)throw u("Updating absent value");var d=h?a(n,r,e):c(l>2?arguments[2]:void 0)(e,r);return a(o,r,e,t(d,e,r)),r}})},8921:(e,t,r)=>{"use strict";r(2109)({target:"Set",proto:!0,real:!0,forced:r(1913)},{addAll:r(1501)})},6248:(e,t,r)=>{"use strict";r(2109)({target:"Set",proto:!0,real:!0,forced:r(1913)},{deleteAll:r(4092)})},3599:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(6916),s=r(9662),c=r(9670),u=r(6707),l=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{difference:function(e){var t=c(this),r=new(u(t,o("Set")))(t),n=s(r.delete);return l(e,(function(e){a(n,r,e)})),r}})},1477:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(6767),c=r(408);n({target:"Set",proto:!0,real:!0,forced:i},{every:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return!c(r,(function(e,r){if(!n(e,e,t))return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},3066:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(6916),s=r(9662),c=r(9670),u=r(9974),l=r(6707),h=r(6767),d=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{filter:function(e){var t=c(this),r=h(t),n=u(e,arguments.length>1?arguments[1]:void 0),i=new(l(t,o("Set"))),f=s(i.add);return d(r,(function(e){n(e,e,t)&&a(f,i,e)}),{IS_ITERATOR:!0}),i}})},5389:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(6767),c=r(408);n({target:"Set",proto:!0,real:!0,forced:i},{find:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return c(r,(function(e,r){if(n(e,e,t))return r(e)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},401:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(6916),s=r(9662),c=r(9670),u=r(6707),l=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{intersection:function(e){var t=c(this),r=new(u(t,o("Set"))),n=s(t.has),i=s(r.add);return l(e,(function(e){a(n,t,e)&&a(i,r,e)})),r}})},5164:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(6916),a=r(9662),s=r(9670),c=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{isDisjointFrom:function(e){var t=s(this),r=a(t.has);return!c(e,(function(e,n){if(!0===o(r,t,e))return n()}),{INTERRUPTED:!0}).stopped}})},1238:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(6916),s=r(9662),c=r(614),u=r(9670),l=r(8554),h=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{isSubsetOf:function(e){var t=l(this),r=u(e),n=r.has;return c(n)||(r=new(o("Set"))(e),n=s(r.has)),!h(t,(function(e,t){if(!1===a(n,r,e))return t()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},4837:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(6916),a=r(9662),s=r(9670),c=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{isSupersetOf:function(e){var t=s(this),r=a(t.has);return!c(e,(function(e,n){if(!1===o(r,t,e))return n()}),{INTERRUPTED:!0}).stopped}})},7485:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(1702),a=r(9670),s=r(1340),c=r(6767),u=r(408),l=o([].join),h=[].push;i({target:"Set",proto:!0,real:!0,forced:n},{join:function(e){var t=a(this),r=c(t),n=void 0===e?",":s(e),i=[];return u(r,h,{that:i,IS_ITERATOR:!0}),l(i,n)}})},465:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(9974),s=r(6916),c=r(9662),u=r(9670),l=r(6707),h=r(6767),d=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{map:function(e){var t=u(this),r=h(t),n=a(e,arguments.length>1?arguments[1]:void 0),i=new(l(t,o("Set"))),f=c(i.add);return d(r,(function(e){s(f,i,n(e,e,t))}),{IS_ITERATOR:!0}),i}})},6651:(e,t,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(1913),a=r(9662),s=r(9670),c=r(6767),u=r(408),l=i.TypeError;n({target:"Set",proto:!0,real:!0,forced:o},{reduce:function(e){var t=s(this),r=c(t),n=arguments.length<2,i=n?void 0:arguments[1];if(a(e),u(r,(function(r){n?(n=!1,i=r):i=e(i,r,r,t)}),{IS_ITERATOR:!0}),n)throw l("Reduce of empty set with no initial value");return i}})},1437:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(9670),a=r(9974),s=r(6767),c=r(408);n({target:"Set",proto:!0,real:!0,forced:i},{some:function(e){var t=o(this),r=s(t),n=a(e,arguments.length>1?arguments[1]:void 0);return c(r,(function(e,r){if(n(e,e,t))return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},5285:(e,t,r)=>{"use strict";var n=r(1913),i=r(2109),o=r(5005),a=r(6916),s=r(9662),c=r(9670),u=r(6707),l=r(408);i({target:"Set",proto:!0,real:!0,forced:n},{symmetricDifference:function(e){var t=c(this),r=new(u(t,o("Set")))(t),n=s(r.delete),i=s(r.add);return l(e,(function(e){a(n,r,e)||a(i,r,e)})),r}})},9865:(e,t,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(5005),a=r(9662),s=r(9670),c=r(6707),u=r(408);n({target:"Set",proto:!0,real:!0,forced:i},{union:function(e){var t=s(this),r=new(c(t,o("Set")))(t);return u(e,a(r.add),{that:r}),r}})},8206:(e,t,r)=>{"use strict";r(2109)({target:"WeakMap",proto:!0,real:!0,forced:r(1913)},{deleteAll:r(4092)})},3561:(e,t,r)=>{"use strict";r(2109)({target:"WeakSet",proto:!0,real:!0,forced:r(1913)},{addAll:r(1501)})},2049:(e,t,r)=>{"use strict";r(2109)({target:"WeakSet",proto:!0,real:!0,forced:r(1913)},{deleteAll:r(4092)})},4747:(e,t,r)=>{var n=r(7854),i=r(8324),o=r(8509),a=r(8533),s=r(8880),c=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var u in i)i[u]&&c(n[u]&&n[u].prototype);c(o)},3948:(e,t,r)=>{var n=r(7854),i=r(8324),o=r(8509),a=r(6992),s=r(8880),c=r(5112),u=c("iterator"),l=c("toStringTag"),h=a.values,d=function(e,t){if(e){if(e[u]!==h)try{s(e,u,h)}catch(t){e[u]=h}if(e[l]||s(e,l,t),i[t])for(var r in a)if(e[r]!==a[r])try{s(e,r,a[r])}catch(t){e[r]=a[r]}}};for(var f in i)d(n[f]&&n[f].prototype,f);d(o,"DOMTokenList")},2564:(e,t,r)=>{var n=r(2109),i=r(7854),o=r(2104),a=r(614),s=r(8113),c=r(206),u=/MSIE .\./.test(s),l=i.Function,h=function(e){return function(t,r){var n=arguments.length>2,i=n?c(arguments,2):void 0;return e(n?function(){o(a(t)?t:l(t),this,i)}:t,r)}};n({global:!0,bind:!0,forced:u},{setTimeout:h(i.setTimeout),setInterval:h(i.setInterval)})},5455:e=>{"use strict";e.exports=require("agora-electron-sdk")},5760:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__5760__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.amdO={},__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})();var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AGError:()=>zn,AGErrorWrapper:()=>Yn,AGEventEmitter:()=>x,AGMediaEncryptionMode:()=>Xu,AGNetworkQuality:()=>Hu,AGRenderMode:()=>Zu,AGRtcConnectionType:()=>Fu,AGRteErrorCode:()=>Qn,AGRteTrackErrorReason:()=>Wu,AGScreenShareType:()=>Ju,AbstractErrorCenter:()=>Wn,ActionWhenTaskFail:()=>yu,AgoraChatMessage:()=>jc,AgoraMediaControl:()=>Rl,AgoraMediaControlEventType:()=>Sl,AgoraMediaPlayerCanvas:()=>oh,AgoraRCEventType:()=>Ef,AgoraRCRole:()=>_f,AgoraRegion:()=>Hn,AgoraRoom:()=>Bc,AgoraRtcLocalVideoCanvas:()=>ih,AgoraRtcVideoCanvas:()=>nh,AgoraRteAudioSourceType:()=>Pu,AgoraRteCameraVideoTrack:()=>qu,AgoraRteConnectionState:()=>vl,AgoraRteEngine:()=>Nf,AgoraRteEngineConfig:()=>$n,AgoraRteEventType:()=>Dc,AgoraRteLogLevel:()=>qn,AgoraRteMediaPublishState:()=>Mu,AgoraRteMediaSourceState:()=>zu,AgoraRteMediaTrack:()=>Gu,AgoraRteMicrophoneAudioTrack:()=>Vu,AgoraRteRemoteStreamType:()=>el,AgoraRteRuntimePlatform:()=>Vn,AgoraRteScene:()=>Tl,AgoraRteScreenShareTrack:()=>Ku,AgoraRteStreamMediaTrack:()=>Qu,AgoraRteThread:()=>Ql,AgoraRteVideoSourceType:()=>Lu,AgoraStream:()=>Mc,AgoraUser:()=>Pc,ApiBase:()=>ou,ChannelProfile:()=>ml,Duration:()=>Cu,LighteningLevel:()=>$u,Lodash:()=>wu,Log:()=>li,Logger:()=>xn,MediaPlayerEvents:()=>Ru,RtcState:()=>Yu,RteLanguage:()=>Kn,Scheduler:()=>e,StreamMediaPlayer:()=>Bu,bound:()=>vu,retryAttempt:()=>ul});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{Duration:()=>Cu,createScheduler:()=>Nu,shared:()=>xu});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{identity:()=>Ah});var r={};__webpack_require__.r(r),__webpack_require__.d(r,{base2:()=>yh});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{base8:()=>bh});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{base10:()=>_h});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{base16:()=>Eh,base16upper:()=>wh});var a={};__webpack_require__.r(a),__webpack_require__.d(a,{base32:()=>Ih,base32hex:()=>Rh,base32hexpad:()=>Oh,base32hexpadupper:()=>Nh,base32hexupper:()=>kh,base32pad:()=>Th,base32padupper:()=>Ch,base32upper:()=>Sh,base32z:()=>xh});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{base36:()=>Dh,base36upper:()=>Lh});var c={};__webpack_require__.r(c),__webpack_require__.d(c,{base58btc:()=>Ph,base58flickr:()=>Mh});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{base64:()=>Bh,base64pad:()=>jh,base64url:()=>Uh,base64urlpad:()=>Fh});var l={};__webpack_require__.r(l),__webpack_require__.d(l,{sha256:()=>sd,sha512:()=>cd});var h={};__webpack_require__.r(h),__webpack_require__.d(h,{identity:()=>ld});var d={};__webpack_require__.r(d),__webpack_require__.d(d,{code:()=>dd,decode:()=>pd,encode:()=>fd,name:()=>hd});var f={};__webpack_require__.r(f),__webpack_require__.d(f,{code:()=>Ad,decode:()=>bd,encode:()=>yd,name:()=>md});__webpack_require__(2419);function p(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 g(e,t){if(e){if("string"==typeof e)return p(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)?p(e,t):void 0}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(e,t)||g(e,t)||function(){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 m(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function A(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){m(o,n,i,a,s,"next",e)}function s(e){m(o,n,i,a,s,"throw",e)}a(void 0)}))}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(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 _(e,t,r){return t&&b(e.prototype,t),r&&b(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function w(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&&E(e,t)}function I(e){return I="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},I(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){if(t&&("object"===I(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}var R=__webpack_require__(7162),k=__webpack_require__.n(R);__webpack_require__(2222),__webpack_require__(7042),__webpack_require__(8309),__webpack_require__(1038),__webpack_require__(2526),__webpack_require__(1817),__webpack_require__(2165),__webpack_require__(9753),__webpack_require__(6992),__webpack_require__(1532),__webpack_require__(1539),__webpack_require__(8783),__webpack_require__(72),__webpack_require__(9137),__webpack_require__(1957),__webpack_require__(6306),__webpack_require__(103),__webpack_require__(4592),__webpack_require__(8276),__webpack_require__(5082),__webpack_require__(2813),__webpack_require__(8222),__webpack_require__(8563),__webpack_require__(336),__webpack_require__(7512),__webpack_require__(3948),__webpack_require__(7327);function O(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,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,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function N(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}var x=function(){function e(){y(this,e),this._eventMap=new Map}return _(e,[{key:"once",value:function(e,t){var r=this;return this.on(e,(function n(){r.off(e,n),t.apply(void 0,arguments)})),this}},{key:"on",value:function(e,t){var r,n=null!==(r=this._eventMap.get(e))&&void 0!==r?r:[];return n.push(t),this._eventMap.set(e,n),this}},{key:"off",value:function(e,t){var r=this._eventMap.get(e);return r&&this._eventMap.set(e,r.filter((function(e){return e!==t}))),this}},{key:"removeAllEventListeners",value:function(){this._eventMap.clear()}},{key:"emit",value:function(e){for(var t,r=null!==(t=this._eventMap.get(e))&&void 0!==t?t:[],n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var a,s=O(r);try{for(s.s();!(a=s.n()).done;){var c=a.value;try{c&&c.apply(void 0,i)}catch(t){var u=t,l=u.stack||u.message;console.error("[event] handling event ".concat(e," fail: ").concat(l))}}}catch(e){s.e(e)}finally{s.f()}return this}}]),e}();__webpack_require__(7941),__webpack_require__(5003),__webpack_require__(9554),__webpack_require__(4747),__webpack_require__(9337),__webpack_require__(3321),__webpack_require__(9070);function D(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}__webpack_require__(2772);function L(){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 P(e,t,r){return P=L()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&E(i,r.prototype),i},P.apply(null,arguments)}function M(e){var t="function"==typeof Map?new Map:void 0;return M=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return P(e,arguments,C(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),E(n,e)},M(e)}__webpack_require__(6699),__webpack_require__(2023),__webpack_require__(3843),__webpack_require__(3710),__webpack_require__(8674),__webpack_require__(9600);var B=__webpack_require__(5760),j=__webpack_require__.n(B),U=__webpack_require__(6635),F=__webpack_require__(1005),G=__webpack_require__.n(F);function Q(){return G()('(()=>{var t={7162:(t,e,n)=>{t.exports=n(5047)},857:(t,e,n)=>{var r=n(7772).Symbol;t.exports=r},3366:(t,e,n)=>{var r=n(857),o=n(2107),i=n(7157),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},1704:(t,e,n)=>{var r=n(2153),o=/^\\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(o,""):t}},1242:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},2107:(t,e,n)=>{var r=n(857),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}},7157:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},7772:(t,e,n)=>{var r=n(1242),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},2153:t=>{var e=/\\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},4073:(t,e,n)=>{var r=n(9259),o=n(1100),i=n(7642),a=Math.max,u=Math.min;t.exports=function(t,e,n){var c,s,f,l,h,p,d=0,v=!1,y=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=c,r=s;return c=s=void 0,d=e,l=t.apply(r,n)}function b(t){return d=t,h=setTimeout(_,e),v?g(t):l}function w(t){var n=t-p;return void 0===p||n>=e||n<0||y&&t-d>=f}function _(){var t=o();if(w(t))return x(t);h=setTimeout(_,function(t){var n=e-(t-p);return y?u(n,f-(t-d)):n}(t))}function x(t){return h=void 0,m&&c?g(t):(c=s=void 0,l)}function k(){var t=o(),n=w(t);if(c=arguments,s=this,p=t,n){if(void 0===h)return b(p);if(y)return clearTimeout(h),h=setTimeout(_,e),g(p)}return void 0===h&&(h=setTimeout(_,e)),l}return e=i(e)||0,r(n)&&(v=!!n.leading,f=(y="maxWait"in n)?a(i(n.maxWait)||0,e):f,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==h&&clearTimeout(h),d=0,c=p=s=h=void 0},k.flush=function(){return void 0===h?l:x(o())},k}},9259:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},5125:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},4795:(t,e,n)=>{var r=n(3366),o=n(5125);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},1100:(t,e,n)=>{var r=n(7772);t.exports=function(){return r.Date.now()}},7642:(t,e,n)=>{var r=n(1704),o=n(9259),i=n(4795),a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=u.test(t);return n||c.test(t)?s(t.slice(2),n?2:8):a.test(t)?NaN:+t}},5047:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new S(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=j(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=f(t,e,n);if("normal"===c.type){if(r=n.done?d:h,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function m(){}function g(){}var b={};c(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==n&&r.call(_,i)&&(b=_);var x=g.prototype=y.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function j(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a \'throw\' method")}return v}var o=f(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function T(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:e,done:!0}}return m.prototype=g,c(x,"constructor",g),c(g,"constructor",m),m.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},k(O.prototype),c(O.prototype,a,(function(){return this})),t.AsyncIterator=O,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),c(x,u,"Generator"),c(x,i,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},9662:(t,e,n)=>{var r=n(7854),o=n(614),i=n(6330),a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},9483:(t,e,n)=>{var r=n(7854),o=n(4411),i=n(6330),a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},6077:(t,e,n)=>{var r=n(7854),o=n(614),i=r.String,a=r.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw a("Can\'t set "+i(t)+" as a prototype")}},5787:(t,e,n)=>{var r=n(7854),o=n(7976),i=r.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},9670:(t,e,n)=>{var r=n(7854),o=n(111),i=r.String,a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},1318:(t,e,n)=>{var r=n(5656),o=n(1400),i=n(6244),a=function(t){return function(e,n,a){var u,c=r(e),s=i(c),f=o(a,s);if(t&&n!=n){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},1194:(t,e,n)=>{var r=n(7293),o=n(5112),i=n(7392),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},206:(t,e,n)=>{var r=n(1702);t.exports=r([].slice)},7475:(t,e,n)=>{var r=n(7854),o=n(3157),i=n(4411),a=n(111),u=n(5112)("species"),c=r.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===c||o(e.prototype))||a(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?c:e}},5417:(t,e,n)=>{var r=n(7475);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},7072:(t,e,n)=>{var r=n(5112)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},4326:(t,e,n)=>{var r=n(1702),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},648:(t,e,n)=>{var r=n(7854),o=n(1694),i=n(614),a=n(4326),u=n(5112)("toStringTag"),c=r.Object,s="Arguments"==a(function(){return arguments}());t.exports=o?a:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),u))?n:s?a(e):"Object"==(r=a(e))&&i(e.callee)?"Arguments":r}},9920:(t,e,n)=>{var r=n(2597),o=n(3887),i=n(1236),a=n(3070);t.exports=function(t,e,n){for(var u=o(e),c=a.f,s=i.f,f=0;f<u.length;f++){var l=u[f];r(t,l)||n&&r(n,l)||c(t,l,s(e,l))}}},8880:(t,e,n)=>{var r=n(9781),o=n(3070),i=n(9114);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,n)=>{"use strict";var r=n(4948),o=n(3070),i=n(9114);t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},9781:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,n)=>{var r=n(7854),o=n(111),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},7871:t=>{t.exports="object"==typeof window},1528:(t,e,n)=>{var r=n(8113),o=n(7854);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},6833:(t,e,n)=>{var r=n(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:(t,e,n)=>{var r=n(4326),o=n(7854);t.exports="process"==r(o.process)},1036:(t,e,n)=>{var r=n(8113);t.exports=/web0s(?!.*chrome)/i.test(r)},8113:(t,e,n)=>{var r=n(5005);t.exports=r("navigator","userAgent")||""},7392:(t,e,n)=>{var r,o,i=n(7854),a=n(8113),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,f=s&&s.v8;f&&(o=(r=f.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\\/(\\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\\/(\\d+)/))&&(o=+r[1]),t.exports=o},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,n)=>{var r=n(7854),o=n(1236).f,i=n(8880),a=n(1320),u=n(3505),c=n(9920),s=n(4705);t.exports=function(t,e){var n,f,l,h,p,d=t.target,v=t.global,y=t.stat;if(n=v?r:y?r[d]||u(d,{}):(r[d]||{}).prototype)for(f in e){if(h=e[f],l=t.noTargetGet?(p=o(n,f))&&p.value:n[f],!s(v?f:d+(y?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;c(h,l)}(t.sham||l&&l.sham)&&i(h,"sham",!0),a(n,f,h,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},2104:t=>{var e=Function.prototype,n=e.apply,r=e.bind,o=e.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(n):function(){return o.apply(n,arguments)})},9974:(t,e,n)=>{var r=n(1702),o=n(9662),i=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?i(t,e):function(){return t.apply(e,arguments)}}},7065:(t,e,n)=>{"use strict";var r=n(7854),o=n(1702),i=n(9662),a=n(111),u=n(2597),c=n(206),s=r.Function,f=o([].concat),l=o([].join),h={},p=function(t,e,n){if(!u(h,e)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";h[e]=s("C,a","return new C("+l(r,",")+")")}return h[e](t,n)};t.exports=s.bind||function(t){var e=i(this),n=e.prototype,r=c(arguments,1),o=function(){var n=f(r,c(arguments));return this instanceof o?p(e,n.length,n):e.apply(t,n)};return a(n)&&(o.prototype=n),o}},6916:t=>{var e=Function.prototype.call;t.exports=e.bind?e.bind(e):function(){return e.apply(e,arguments)}},6530:(t,e,n)=>{var r=n(9781),o=n(2597),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},1702:t=>{var e=Function.prototype,n=e.bind,r=e.call,o=n&&n.bind(r);t.exports=n?function(t){return t&&o(r,t)}:function(t){return t&&function(){return r.apply(t,arguments)}}},5005:(t,e,n)=>{var r=n(7854),o=n(614),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},1246:(t,e,n)=>{var r=n(648),o=n(8173),i=n(7497),a=n(5112)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[r(t)]}},8554:(t,e,n)=>{var r=n(7854),o=n(6916),i=n(9662),a=n(9670),u=n(6330),c=n(1246),s=r.TypeError;t.exports=function(t,e){var n=arguments.length<2?c(t):e;if(i(n))return a(o(n,t));throw s(u(t)+" is not iterable")}},8173:(t,e,n)=>{var r=n(9662);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},7854:(t,e,n)=>{var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:(t,e,n)=>{var r=n(1702),o=n(7908),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3501:t=>{t.exports={}},842:(t,e,n)=>{var r=n(7854);t.exports=function(t,e){var n=r.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}},490:(t,e,n)=>{var r=n(5005);t.exports=r("document","documentElement")},4664:(t,e,n)=>{var r=n(9781),o=n(7293),i=n(317);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,n)=>{var r=n(7854),o=n(1702),i=n(7293),a=n(4326),u=r.Object,c=o("".split);t.exports=i((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?c(t,""):u(t)}:u},2788:(t,e,n)=>{var r=n(1702),o=n(614),i=n(5465),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},9909:(t,e,n)=>{var r,o,i,a=n(8536),u=n(7854),c=n(1702),s=n(111),f=n(8880),l=n(2597),h=n(5465),p=n(6200),d=n(3501),v="Object already initialized",y=u.TypeError,m=u.WeakMap;if(a||h.state){var g=h.state||(h.state=new m),b=c(g.get),w=c(g.has),_=c(g.set);r=function(t,e){if(w(g,t))throw new y(v);return e.facade=t,_(g,t,e),e},o=function(t){return b(g,t)||{}},i=function(t){return w(g,t)}}else{var x=p("state");d[x]=!0,r=function(t,e){if(l(t,x))throw new y(v);return e.facade=t,f(t,x,e),e},o=function(t){return l(t,x)?t[x]:{}},i=function(t){return l(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!s(e)||(n=o(e)).type!==t)throw y("Incompatible receiver, "+t+" required");return n}}}},7659:(t,e,n)=>{var r=n(5112),o=n(7497),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},3157:(t,e,n)=>{var r=n(4326);t.exports=Array.isArray||function(t){return"Array"==r(t)}},614:t=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,n)=>{var r=n(1702),o=n(7293),i=n(614),a=n(648),u=n(5005),c=n(2788),s=function(){},f=[],l=u("Reflect","construct"),h=/^\\s*(?:class|function)\\b/,p=r(h.exec),d=!h.exec(s),v=function(t){if(!i(t))return!1;try{return l(s,f,t),!0}catch(t){return!1}},y=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!p(h,c(t))}catch(t){return!0}};y.sham=!0,t.exports=!l||o((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?y:v},4705:(t,e,n)=>{var r=n(7293),o=n(614),i=/#|\\.prototype\\./,a=function(t,e){var n=c[u(t)];return n==f||n!=s&&(o(e)?r(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},111:(t,e,n)=>{var r=n(614);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},1913:t=>{t.exports=!1},2190:(t,e,n)=>{var r=n(7854),o=n(5005),i=n(614),a=n(7976),u=n(3307),c=r.Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&a(e.prototype,c(t))}},408:(t,e,n)=>{var r=n(7854),o=n(9974),i=n(6916),a=n(9670),u=n(6330),c=n(7659),s=n(6244),f=n(7976),l=n(8554),h=n(1246),p=n(9212),d=r.TypeError,v=function(t,e){this.stopped=t,this.result=e},y=v.prototype;t.exports=function(t,e,n){var r,m,g,b,w,_,x,k=n&&n.that,O=!(!n||!n.AS_ENTRIES),j=!(!n||!n.IS_ITERATOR),E=!(!n||!n.INTERRUPTED),P=o(e,k),S=function(t){return r&&p(r,"normal",t),new v(!0,t)},T=function(t){return O?(a(t),E?P(t[0],t[1],S):P(t[0],t[1])):E?P(t,S):P(t)};if(j)r=t;else{if(!(m=h(t)))throw d(u(t)+" is not iterable");if(c(m)){for(g=0,b=s(t);b>g;g++)if((w=T(t[g]))&&f(y,w))return w;return new v(!1)}r=l(t,m)}for(_=r.next;!(x=i(_,r)).done;){try{w=T(x.value)}catch(t){p(r,"throw",t)}if("object"==typeof w&&w&&f(y,w))return w}return new v(!1)}},9212:(t,e,n)=>{var r=n(6916),o=n(9670),i=n(8173);t.exports=function(t,e,n){var a,u;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw n;return n}a=r(a,t)}catch(t){u=!0,a=t}if("throw"===e)throw n;if(u)throw a;return o(a),n}},7497:t=>{t.exports={}},6244:(t,e,n)=>{var r=n(7466);t.exports=function(t){return r(t.length)}},5948:(t,e,n)=>{var r,o,i,a,u,c,s,f,l=n(7854),h=n(9974),p=n(1236).f,d=n(261).set,v=n(6833),y=n(1528),m=n(1036),g=n(5268),b=l.MutationObserver||l.WebKitMutationObserver,w=l.document,_=l.process,x=l.Promise,k=p(l,"queueMicrotask"),O=k&&k.value;O||(r=function(){var t,e;for(g&&(t=_.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},v||g||m||!b||!w?!y&&x&&x.resolve?((s=x.resolve(void 0)).constructor=x,f=h(s.then,s),a=function(){f(r)}):g?a=function(){_.nextTick(r)}:(d=h(d,l),a=function(){d(r)}):(u=!0,c=w.createTextNode(""),new b(r).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=O||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},1070:(t,e,n)=>{var r=n(7854);t.exports=r.Promise},133:(t,e,n)=>{var r=n(7392),o=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8536:(t,e,n)=>{var r=n(7854),o=n(614),i=n(2788),a=r.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},8523:(t,e,n)=>{"use strict";var r=n(9662),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},30:(t,e,n)=>{var r,o=n(9670),i=n(6048),a=n(748),u=n(3501),c=n(490),s=n(317),f=n(6200),l=f("IE_PROTO"),h=function(){},p=function(t){return"<script>"+t+"</"+"script>"},d=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;v="undefined"!=typeof document?document.domain&&r?d(r):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):d(r);for(var n=a.length;n--;)delete v.prototype[a[n]];return v()};u[l]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=o(t),n=new h,h.prototype=null,n[l]=t):n=v(),void 0===e?n:i(n,e)}},6048:(t,e,n)=>{var r=n(9781),o=n(3070),i=n(9670),a=n(5656),u=n(1956);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),c=u(e),s=c.length,f=0;s>f;)o.f(t,n=c[f++],r[n]);return t}},3070:(t,e,n)=>{var r=n(7854),o=n(9781),i=n(4664),a=n(9670),u=n(4948),c=r.TypeError,s=Object.defineProperty;e.f=o?s:function(t,e,n){if(a(t),e=u(e),a(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:(t,e,n)=>{var r=n(9781),o=n(6916),i=n(5296),a=n(9114),u=n(5656),c=n(4948),s=n(2597),f=n(4664),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=u(t),e=c(e),f)try{return l(t,e)}catch(t){}if(s(t,e))return a(!o(i.f,t,e),t[e])}},8006:(t,e,n)=>{var r=n(6324),o=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},7976:(t,e,n)=>{var r=n(1702);t.exports=r({}.isPrototypeOf)},6324:(t,e,n)=>{var r=n(1702),o=n(2597),i=n(5656),a=n(1318).indexOf,u=n(3501),c=r([].push);t.exports=function(t,e){var n,r=i(t),s=0,f=[];for(n in r)!o(u,n)&&o(r,n)&&c(f,n);for(;e.length>s;)o(r,n=e[s++])&&(~a(f,n)||c(f,n));return f}},1956:(t,e,n)=>{var r=n(6324),o=n(748);t.exports=Object.keys||function(t){return r(t,o)}},5296:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},7674:(t,e,n)=>{var r=n(1702),o=n(9670),i=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},288:(t,e,n)=>{"use strict";var r=n(1694),o=n(648);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},2140:(t,e,n)=>{var r=n(7854),o=n(6916),i=n(614),a=n(111),u=r.TypeError;t.exports=function(t,e){var n,r;if("string"===e&&i(n=t.toString)&&!a(r=o(n,t)))return r;if(i(n=t.valueOf)&&!a(r=o(n,t)))return r;if("string"!==e&&i(n=t.toString)&&!a(r=o(n,t)))return r;throw u("Can\'t convert object to primitive value")}},3887:(t,e,n)=>{var r=n(5005),o=n(1702),i=n(8006),a=n(5181),u=n(9670),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(u(t)),n=a.f;return n?c(e,n(t)):e}},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},9478:(t,e,n)=>{var r=n(9670),o=n(111),i=n(8523);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},8572:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=e},2248:(t,e,n)=>{var r=n(1320);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},1320:(t,e,n)=>{var r=n(7854),o=n(614),i=n(2597),a=n(8880),u=n(3505),c=n(2788),s=n(9909),f=n(6530).CONFIGURABLE,l=s.get,h=s.enforce,p=String(String).split("String");(t.exports=function(t,e,n,c){var s,l=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,v=!!c&&!!c.noTargetGet,y=c&&void 0!==c.name?c.name:e;o(n)&&("Symbol("===String(y).slice(0,7)&&(y="["+String(y).replace(/^Symbol\\(([^)]*)\\)/,"$1")+"]"),(!i(n,"name")||f&&n.name!==y)&&a(n,"name",y),(s=h(n)).source||(s.source=p.join("string"==typeof y?y:""))),t!==r?(l?!v&&t[e]&&(d=!0):delete t[e],d?t[e]=n:a(t,e,n)):d?t[e]=n:u(e,n)})(Function.prototype,"toString",(function(){return o(this)&&l(this).source||c(this)}))},4488:(t,e,n)=>{var r=n(7854).TypeError;t.exports=function(t){if(null==t)throw r("Can\'t call method on "+t);return t}},3505:(t,e,n)=>{var r=n(7854),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},6340:(t,e,n)=>{"use strict";var r=n(5005),o=n(3070),i=n(5112),a=n(9781),u=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[u]&&n(e,u,{configurable:!0,get:function(){return this}})}},8003:(t,e,n)=>{var r=n(3070).f,o=n(2597),i=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!o(t,i)&&r(t,i,{configurable:!0,value:e})}},6200:(t,e,n)=>{var r=n(2309),o=n(9711),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:(t,e,n)=>{var r=n(7854),o=n(3505),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},2309:(t,e,n)=>{var r=n(1913),o=n(5465);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.20.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:(t,e,n)=>{var r=n(9670),o=n(9483),i=n(5112)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},261:(t,e,n)=>{var r,o,i,a,u=n(7854),c=n(2104),s=n(9974),f=n(614),l=n(2597),h=n(7293),p=n(490),d=n(206),v=n(317),y=n(6833),m=n(5268),g=u.setImmediate,b=u.clearImmediate,w=u.process,_=u.Dispatch,x=u.Function,k=u.MessageChannel,O=u.String,j=0,E={},P="onreadystatechange";try{r=u.location}catch(t){}var S=function(t){if(l(E,t)){var e=E[t];delete E[t],e()}},T=function(t){return function(){S(t)}},A=function(t){S(t.data)},C=function(t){u.postMessage(O(t),r.protocol+"//"+r.host)};g&&b||(g=function(t){var e=d(arguments,1);return E[++j]=function(){c(f(t)?t:x(t),void 0,e)},o(j),j},b=function(t){delete E[t]},m?o=function(t){w.nextTick(T(t))}:_&&_.now?o=function(t){_.now(T(t))}:k&&!y?(a=(i=new k).port2,i.port1.onmessage=A,o=s(a.postMessage,a)):u.addEventListener&&f(u.postMessage)&&!u.importScripts&&r&&"file:"!==r.protocol&&!h(C)?(o=C,u.addEventListener("message",A,!1)):o=P in v("script")?function(t){p.appendChild(v("script")).onreadystatechange=function(){p.removeChild(this),S(t)}}:function(t){setTimeout(T(t),0)}),t.exports={set:g,clear:b}},1400:(t,e,n)=>{var r=n(9303),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},5656:(t,e,n)=>{var r=n(8361),o=n(4488);t.exports=function(t){return r(o(t))}},9303:t=>{var e=Math.ceil,n=Math.floor;t.exports=function(t){var r=+t;return r!=r||0===r?0:(r>0?n:e)(r)}},7466:(t,e,n)=>{var r=n(9303),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},7908:(t,e,n)=>{var r=n(7854),o=n(4488),i=r.Object;t.exports=function(t){return i(o(t))}},7593:(t,e,n)=>{var r=n(7854),o=n(6916),i=n(111),a=n(2190),u=n(8173),c=n(2140),s=n(5112),f=r.TypeError,l=s("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var n,r=u(t,l);if(r){if(void 0===e&&(e="default"),n=o(r,t,e),!i(n)||a(n))return n;throw f("Can\'t convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},4948:(t,e,n)=>{var r=n(7593),o=n(2190);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},1694:(t,e,n)=>{var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},6330:(t,e,n)=>{var r=n(7854).String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},9711:(t,e,n)=>{var r=n(1702),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},3307:(t,e,n)=>{var r=n(133);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:(t,e,n)=>{var r=n(7854),o=n(2309),i=n(2597),a=n(9711),u=n(133),c=n(3307),s=o("wks"),f=r.Symbol,l=f&&f.for,h=c?f:f&&f.withoutSetter||a;t.exports=function(t){if(!i(s,t)||!u&&"string"!=typeof s[t]){var e="Symbol."+t;u&&i(f,t)?s[t]=f[t]:s[t]=c&&l?l(e):h(e)}return s[t]}},2222:(t,e,n)=>{"use strict";var r=n(2109),o=n(7854),i=n(7293),a=n(3157),u=n(111),c=n(7908),s=n(6244),f=n(6135),l=n(5417),h=n(1194),p=n(5112),d=n(7392),v=p("isConcatSpreadable"),y=9007199254740991,m="Maximum allowed index exceeded",g=o.TypeError,b=d>=51||!i((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),w=h("concat"),_=function(t){if(!u(t))return!1;var e=t[v];return void 0!==e?!!e:a(t)};r({target:"Array",proto:!0,forced:!b||!w},{concat:function(t){var e,n,r,o,i,a=c(this),u=l(a,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(_(i=-1===e?a:arguments[e])){if(h+(o=s(i))>y)throw g(m);for(n=0;n<o;n++,h++)n in i&&f(u,h,i[n])}else{if(h>=y)throw g(m);f(u,h++,i)}return u.length=h,u}})},5069:(t,e,n)=>{"use strict";var r=n(2109),o=n(1702),i=n(3157),a=o([].reverse),u=[1,2];r({target:"Array",proto:!0,forced:String(u)===String(u.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},3843:(t,e,n)=>{var r=n(2109),o=n(7854),i=n(1702),a=o.Date,u=i(a.prototype.getTime);r({target:"Date",stat:!0},{now:function(){return u(new a)}})},3710:(t,e,n)=>{var r=n(1702),o=n(1320),i=Date.prototype,a="Invalid Date",u="toString",c=r(i.toString),s=r(i.getTime);String(new Date(NaN))!=a&&o(i,u,(function(){var t=s(this);return t==t?c(this):a}))},1539:(t,e,n)=>{var r=n(1694),o=n(1320),i=n(288);r||o(Object.prototype,"toString",i,{unsafe:!0})},8674:(t,e,n)=>{"use strict";var r,o,i,a,u=n(2109),c=n(1913),s=n(7854),f=n(5005),l=n(6916),h=n(1070),p=n(1320),d=n(2248),v=n(7674),y=n(8003),m=n(6340),g=n(9662),b=n(614),w=n(111),_=n(5787),x=n(2788),k=n(408),O=n(7072),j=n(6707),E=n(261).set,P=n(5948),S=n(9478),T=n(842),A=n(8523),C=n(2534),K=n(8572),I=n(9909),D=n(4705),R=n(5112),F=n(7871),B=n(5268),N=n(7392),M=R("species"),q="Promise",L=I.getterFor(q),U=I.set,G=I.getterFor(q),W=h&&h.prototype,z=h,V=W,Y=s.TypeError,H=s.document,X=s.process,Q=A.f,$=Q,J=!!(H&&H.createEvent&&s.dispatchEvent),Z=b(s.PromiseRejectionEvent),tt="unhandledrejection",et=!1,nt=D(q,(function(){var t=x(z),e=t!==String(z);if(!e&&66===N)return!0;if(c&&!V.finally)return!0;if(N>=51&&/native code/.test(t))return!1;var n=new z((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[M]=r,!(et=n.then((function(){}))instanceof r)||!e&&F&&!Z})),rt=nt||!O((function(t){z.all(t).catch((function(){}))})),ot=function(t){var e;return!(!w(t)||!b(e=t.then))&&e},it=function(t,e){var n,r,o,i=e.value,a=1==e.state,u=a?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{u?(a||(2===e.rejection&&ft(e),e.rejection=1),!0===u?n=i:(f&&f.enter(),n=u(i),f&&(f.exit(),o=!0)),n===t.promise?s(Y("Promise-chain cycle")):(r=ot(n))?l(r,n,c,s):c(n)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},at=function(t,e){t.notified||(t.notified=!0,P((function(){for(var n,r=t.reactions;n=r.get();)it(n,t);t.notified=!1,e&&!t.rejection&&ct(t)})))},ut=function(t,e,n){var r,o;J?((r=H.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!Z&&(o=s["on"+t])?o(r):t===tt&&T("Unhandled promise rejection",n)},ct=function(t){l(E,s,(function(){var e,n=t.facade,r=t.value;if(st(t)&&(e=C((function(){B?X.emit("unhandledRejection",r,n):ut(tt,n,r)})),t.rejection=B||st(t)?2:1,e.error))throw e.value}))},st=function(t){return 1!==t.rejection&&!t.parent},ft=function(t){l(E,s,(function(){var e=t.facade;B?X.emit("rejectionHandled",e):ut("rejectionhandled",e,t.value)}))},lt=function(t,e,n){return function(r){t(e,r,n)}},ht=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,at(t,!0))},pt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Y("Promise can\'t be resolved itself");var r=ot(e);r?P((function(){var n={done:!1};try{l(r,e,lt(pt,n,t),lt(ht,n,t))}catch(e){ht(n,e,t)}})):(t.value=e,t.state=1,at(t,!1))}catch(e){ht({done:!1},e,t)}}};if(nt&&(V=(z=function(t){_(this,V),g(t),l(r,this);var e=L(this);try{t(lt(pt,e),lt(ht,e))}catch(t){ht(e,t)}}).prototype,(r=function(t){U(this,{type:q,done:!1,notified:!1,parent:!1,reactions:new K,rejection:!1,state:0,value:void 0})}).prototype=d(V,{then:function(t,e){var n=G(this),r=Q(j(this,z));return n.parent=!0,r.ok=!b(t)||t,r.fail=b(e)&&e,r.domain=B?X.domain:void 0,0==n.state?n.reactions.add(r):P((function(){it(r,n)})),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=L(t);this.promise=t,this.resolve=lt(pt,e),this.reject=lt(ht,e)},A.f=Q=function(t){return t===z||t===i?new o(t):$(t)},!c&&b(h)&&W!==Object.prototype)){a=W.then,et||(p(W,"then",(function(t,e){var n=this;return new z((function(t,e){l(a,n,t,e)})).then(t,e)}),{unsafe:!0}),p(W,"catch",V.catch,{unsafe:!0}));try{delete W.constructor}catch(t){}v&&v(W,V)}u({global:!0,wrap:!0,forced:nt},{Promise:z}),y(z,q,!1,!0),m(q),i=f(q),u({target:q,stat:!0,forced:nt},{reject:function(t){var e=Q(this);return l(e.reject,void 0,t),e.promise}}),u({target:q,stat:!0,forced:c||nt},{resolve:function(t){return S(c&&this===i?z:this,t)}}),u({target:q,stat:!0,forced:rt},{all:function(t){var e=this,n=Q(e),r=n.resolve,o=n.reject,i=C((function(){var n=g(e.resolve),i=[],a=0,u=1;k(t,(function(t){var c=a++,s=!1;u++,l(n,e,t).then((function(t){s||(s=!0,i[c]=t,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=Q(e),r=n.reject,o=C((function(){var o=g(e.resolve);k(t,(function(t){l(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},2419:(t,e,n)=>{var r=n(2109),o=n(5005),i=n(2104),a=n(7065),u=n(9483),c=n(9670),s=n(111),f=n(30),l=n(7293),h=o("Reflect","construct"),p=Object.prototype,d=[].push,v=l((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),y=!l((function(){h((function(){}))})),m=v||y;r({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(t,e){u(t),c(e);var n=arguments.length<3?t:u(arguments[2]);if(y&&!v)return h(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return i(d,r,e),new(i(a,t,r))}var o=n.prototype,l=f(s(o)?o:p),m=i(t,l,e);return s(m)?m:l}})}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";function t(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function e(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function u(e){t(a,o,i,u,c,"next",e)}function c(e){t(a,o,i,u,c,"throw",e)}u(void 0)}))}}var r=n(7162),o=n.n(r),i=(n(3710),n(5069),n(2222),n(3843),n(4073)),a=n.n(i);n(2419);function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function h(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}(t)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var d=function(){return d=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},d.apply(this,arguments)};function v(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}var y=Object.keys,m=Array.isArray,g="undefined"!=typeof self?self:"undefined"!=typeof window?window:global;function b(t,e){return"object"!=typeof e||y(e).forEach((function(n){t[n]=e[n]})),t}"undefined"==typeof Promise||g.Promise||(g.Promise=Promise);var w=Object.getPrototypeOf,_={}.hasOwnProperty;function x(t,e){return _.call(t,e)}function k(t,e){"function"==typeof e&&(e=e(w(t))),y(e).forEach((function(n){j(t,n,e[n])}))}var O=Object.defineProperty;function j(t,e,n,r){O(t,e,b(n&&x(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function E(t){return{from:function(e){return t.prototype=Object.create(e.prototype),j(t.prototype,"constructor",t),{extend:k.bind(null,t.prototype)}}}}var P=Object.getOwnPropertyDescriptor;function S(t,e){var n;return P(t,e)||(n=w(t))&&S(n,e)}var T=[].slice;function A(t,e,n){return T.call(t,e,n)}function C(t,e){return e(t)}function K(t){if(!t)throw new Error("Assertion Failed")}function I(t){g.setImmediate?setImmediate(t):setTimeout(t,0)}function D(t,e){return t.reduce((function(t,n,r){var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})}function R(t,e){if(x(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=R(t,e[r]);n.push(i)}return n}var a=e.indexOf(".");if(-1!==a){var u=t[e.substr(0,a)];return void 0===u?void 0:R(u,e.substr(a+1))}}function F(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){K("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)F(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var a=e.substr(0,i),u=e.substr(i+1);if(""===u)void 0===n?m(t)&&!isNaN(parseInt(a))?t.splice(a,1):delete t[a]:t[a]=n;else{var c=t[a];c||(c=t[a]={}),F(c,u,n)}}else void 0===n?m(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}function B(t,e){"string"==typeof e?F(t,e,void 0):"length"in e&&[].map.call(e,(function(e){F(t,e,void 0)}))}function N(t){var e={};for(var n in t)x(t,n)&&(e[n]=t[n]);return e}var M=[].concat;function q(t){return M.apply([],t)}var L="Boolean,String,Date,RegExp,Blob,File,FileList,ArrayBuffer,DataView,Uint8ClampedArray,ImageData,Map,Set".split(",").concat(q([8,16,32,64].map((function(t){return["Int","Uint","Float"].map((function(e){return e+t+"Array"}))})))).filter((function(t){return g[t]})),U=L.map((function(t){return g[t]})),G=D(L,(function(t){return[t,!0]}));function W(t){if(!t||"object"!=typeof t)return t;var e;if(m(t)){e=[];for(var n=0,r=t.length;n<r;++n)e.push(W(t[n]))}else if(U.indexOf(t.constructor)>=0)e=t;else for(var o in e=t.constructor?Object.create(t.constructor.prototype):{},t)x(t,o)&&(e[o]=W(t[o]));return e}var z={}.toString;function V(t){return z.call(t).slice(8,-1)}var Y=function(t,e){return"Array"===e?""+t.map((function(t){return Y(t,V(t))})):"ArrayBuffer"===e?""+new Uint8Array(t):"Date"===e?t.getTime():ArrayBuffer.isView(t)?""+new Uint8Array(t.buffer):t};function H(t,e,n,r){return n=n||{},r=r||"",y(t).forEach((function(o){if(x(e,o)){var i=t[o],a=e[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=V(i),c=V(a);u===c?G[u]?Y(i,u)!==Y(a,c)&&(n[r+o]=e[o]):H(i,a,n,r+o+"."):n[r+o]=e[o]}else i!==a&&(n[r+o]=e[o])}else n[r+o]=void 0})),y(e).forEach((function(o){x(t,o)||(n[r+o]=e[o])})),n}var X="undefined"!=typeof Symbol&&Symbol.iterator,Q=X?function(t){var e;return null!=t&&(e=t[X])&&e.apply(t)}:function(){return null},$={};function J(t){var e,n,r,o;if(1===arguments.length){if(m(t))return t.slice();if(this===$&&"string"==typeof t)return[t];if(o=Q(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n}var Z="undefined"!=typeof Symbol?function(t){return"AsyncFunction"===t[Symbol.toStringTag]}:function(){return!1},tt="undefined"!=typeof location&&/^(http|https):\\/\\/(localhost|127\\.0\\.0\\.1)/.test(location.href);function et(t,e){tt=t,nt=e}var nt=function(){return!0},rt=!new Error("").stack;function ot(){if(rt)try{throw new Error}catch(t){return t}return new Error}function it(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\\n").length),n.split("\\n").slice(e).filter(nt).map((function(t){return"\\n"+t})).join("")):""}var at=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ut=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(at),ct={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed"};function st(t,e){this._e=ot(),this.name=t,this.message=e}function ft(t,e){return t+". Errors: "+Object.keys(e).map((function(t){return e[t].toString()})).filter((function(t,e,n){return n.indexOf(t)===e})).join("\\n")}function lt(t,e,n,r){this._e=ot(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=ft(t,e)}function ht(t,e){this._e=ot(),this.name="BulkError",this.failures=e,this.message=ft(t,e)}E(st).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+it(this._e,2))}},toString:function(){return this.name+": "+this.message}}),E(lt).from(st),E(ht).from(st);var pt=ut.reduce((function(t,e){return t[e]=e+"Error",t}),{}),dt=st,vt=ut.reduce((function(t,e){var n=e+"Error";function r(t,r){this._e=ot(),this.name=n,t?"string"==typeof t?(this.message=t+(r?"\\n "+r:""),this.inner=r||null):"object"==typeof t&&(this.message=t.name+" "+t.message,this.inner=t):(this.message=ct[e]||n,this.inner=null)}return E(r).from(dt),t[e]=r,t}),{});vt.Syntax=SyntaxError,vt.Type=TypeError,vt.Range=RangeError;var yt=at.reduce((function(t,e){return t[e+"Error"]=vt[e],t}),{});var mt=ut.reduce((function(t,e){return-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=vt[e]),t}),{});function gt(){}function bt(t){return t}function wt(t,e){return null==t||t===bt?e:function(n){return e(t(n))}}function _t(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function xt(t,e){return t===gt?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?_t(r,this.onsuccess):r),o&&(this.onerror=this.onerror?_t(o,this.onerror):o),void 0!==i?i:n}}function kt(t,e){return t===gt?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?_t(n,this.onsuccess):n),r&&(this.onerror=this.onerror?_t(r,this.onerror):r)}}function Ot(t,e){return t===gt?e:function(n){var r=t.apply(this,arguments);b(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?_t(o,this.onsuccess):o),i&&(this.onerror=this.onerror?_t(i,this.onerror):i),void 0===r?void 0===a?void 0:a:b(r,a)}}function jt(t,e){return t===gt?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}}function Et(t,e){return t===gt?e:function(){var n=t.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return e.apply(r,i)}))}return e.apply(this,arguments)}}mt.ModifyError=lt,mt.DexieError=st,mt.BulkError=ht;var Pt={},St="undefined"==typeof Promise?[]:function(){var t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,t.__proto__,t];var e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,e.__proto__,t]}(),Tt=St[0],At=St[1],Ct=St[2],Kt=At&&At.then,It=Tt&&Tt.constructor,Dt=!!Ct,Rt=!1,Ft=Ct?function(){Ct.then(ie)}:g.setImmediate?setImmediate.bind(null,ie):g.MutationObserver?function(){var t=document.createElement("div");new MutationObserver((function(){ie(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:function(){setTimeout(ie,0)},Bt=function(t,e){Vt.push([t,e]),Mt&&(Ft(),Mt=!1)},Nt=!0,Mt=!0,qt=[],Lt=[],Ut=null,Gt=bt,Wt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ae,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(t){try{Ae(t[0],t[1])}catch(t){}}))}},zt=Wt,Vt=[],Yt=0,Ht=[];function Xt(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=gt,this._lib=!1;var e=this._PSD=zt;if(tt&&(this._stackHolder=ot(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==Pt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Zt(this,this._value))}this._state=null,this._value=null,++e.ref,Jt(this,t)}var Qt={get:function(){var t=zt,e=ve;function n(n,r){var o=this,i=!t.global&&(t!==zt||e!==ve),a=i&&!be(),u=new Xt((function(e,u){ee(o,new $t(Pe(n,t,i,a),Pe(r,t,i,a),e,u,t))}));return tt&&oe(u,this),u}return n.prototype=Pt,n},set:function(t){j(this,"then",t&&t.prototype===Pt?Qt:{get:function(){return t},set:Qt.set})}};function $t(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o}function Jt(t,e){try{e((function(e){if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&ae();e&&"function"==typeof e.then?Jt(t,(function(t,n){e instanceof Xt?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,te(t)),n&&ue()}}),Zt.bind(null,t))}catch(e){Zt(t,e)}}function Zt(t,e){if(Lt.push(e),null===t._state){var n=t._lib&&ae();e=Gt(e),t._state=!1,t._value=e,tt&&null!==e&&"object"==typeof e&&!e._promise&&function(t,e,n){try{t.apply(null,n)}catch(t){e&&e(t)}}((function(){var n=S(e,"stack");e._promise=t,j(e,"stack",{get:function(){return Rt?n&&(n.get?n.get.apply(e):n.value):t.stack}})})),function(t){qt.some((function(e){return e._value===t._value}))||qt.push(t)}(t),te(t),n&&ue()}}function te(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)ee(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===Yt&&(++Yt,Bt((function(){0==--Yt&&ce()}),[]))}function ee(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++Yt,Bt(ne,[n,t,e])}else t._listeners.push(e)}function ne(t,e,n){try{Ut=e;var r,o=e._value;e._state?r=t(o):(Lt.length&&(Lt=[]),r=t(o),-1===Lt.indexOf(o)&&function(t){var e=qt.length;for(;e;)if(qt[--e]._value===t._value)return void qt.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{Ut=null,0==--Yt&&ce(),--n.psd.ref||n.psd.finalize()}}function re(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,a=t._value;null!=a?(o=a.name||"Error",i=a.message||a,r=it(a,0)):(o=a,i=""),e.push(o+(i?": "+i:"")+r)}return tt&&((r=it(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&re(t._prev,e,n)),e}function oe(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)}function ie(){ae()&&ue()}function ae(){var t=Nt;return Nt=!1,Mt=!1,t}function ue(){var t,e,n;do{for(;Vt.length>0;)for(t=Vt,Vt=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(Vt.length>0);Nt=!0,Mt=!0}function ce(){var t=qt;qt=[],t.forEach((function(t){t._PSD.onunhandled.call(null,t._value,t)}));for(var e=Ht.slice(0),n=e.length;n;)e[--n]()}function se(t){return new Xt(Pt,!1,t)}function fe(t,e){var n=zt;return function(){var r=ae(),o=zt;try{return ke(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{ke(o,!1),r&&ue()}}}k(Xt.prototype,{then:Qt,_then:function(t,e){ee(this,new $t(null,null,t,e,zt))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(function(t){return t instanceof e?n(t):se(t)})):this.then(null,(function(t){return t&&t.name===e?n(t):se(t)}))},finally:function(t){return this.then((function(e){return t(),e}),(function(e){return t(),se(e)}))},stack:{get:function(){if(this._stack)return this._stack;try{Rt=!0;var t=re(this,[],20).join("\\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{Rt=!1}}},timeout:function(t,e){var n=this;return t<1/0?new Xt((function(r,o){var i=setTimeout((function(){return o(new vt.Timeout(e))}),t);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&j(Xt.prototype,Symbol.toStringTag,"Dexie.Promise"),Wt.env=Oe(),k(Xt,{all:function(){var t=J.apply(null,arguments).map(we);return new Xt((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach((function(o,i){return Xt.resolve(o).then((function(n){t[i]=n,--r||e(t)}),n)}))}))},resolve:function(t){if(t instanceof Xt)return t;if(t&&"function"==typeof t.then)return new Xt((function(e,n){t.then(e,n)}));var e=new Xt(Pt,!0,t);return oe(e,Ut),e},reject:se,race:function(){var t=J.apply(null,arguments).map(we);return new Xt((function(e,n){t.map((function(t){return Xt.resolve(t).then(e,n)}))}))},PSD:{get:function(){return zt},set:function(t){return zt=t}},totalEchoes:{get:function(){return ve}},newPSD:me,usePSD:je,scheduler:{get:function(){return Bt},set:function(t){Bt=t}},rejectionMapper:{get:function(){return Gt},set:function(t){Gt=t}},follow:function(t,e){return new Xt((function(n,r){return me((function(e,n){var r=zt;r.unhandleds=[],r.onunhandled=n,r.finalize=_t((function(){var t=this;!function(t){function e(){t(),Ht.splice(Ht.indexOf(e),1)}Ht.push(e),++Yt,Bt((function(){0==--Yt&&ce()}),[])}((function(){0===t.unhandleds.length?e():n(t.unhandleds[0])}))}),r.finalize),t()}),e,n,r)}))}}),It&&(It.allSettled&&j(Xt,"allSettled",(function(){var t=J.apply(null,arguments).map(we);return new Xt((function(e){0===t.length&&e([]);var n=t.length,r=new Array(n);t.forEach((function(t,o){return Xt.resolve(t).then((function(t){return r[o]={status:"fulfilled",value:t}}),(function(t){return r[o]={status:"rejected",reason:t}})).then((function(){return--n||e(r)}))}))}))})),It.any&&"undefined"!=typeof AggregateError&&j(Xt,"any",(function(){var t=J.apply(null,arguments).map(we);return new Xt((function(e,n){0===t.length&&n(new AggregateError([]));var r=t.length,o=new Array(r);t.forEach((function(t,i){return Xt.resolve(t).then((function(t){return e(t)}),(function(t){o[i]=t,--r||n(new AggregateError(o))}))}))}))})));var le={awaits:0,echoes:0,id:0},he=0,pe=[],de=0,ve=0,ye=0;function me(t,e,n,r){var o=zt,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++ye;var a=Wt.env;i.env=Dt?{Promise:Xt,PromiseProp:{value:Xt,configurable:!0,writable:!0},all:Xt.all,race:Xt.race,allSettled:Xt.allSettled,any:Xt.any,resolve:Xt.resolve,reject:Xt.reject,nthen:Se(a.nthen,i),gthen:Se(a.gthen,i)}:{},e&&b(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=je(i,t,n,r);return 0===i.ref&&i.finalize(),u}function ge(){return le.id||(le.id=++he),++le.awaits,le.echoes+=100,le.id}function be(){return!!le.awaits&&(0==--le.awaits&&(le.id=0),le.echoes=100*le.awaits,!0)}function we(t){return le.echoes&&t&&t.constructor===It?(ge(),t.then((function(t){return be(),t}),(function(t){return be(),Ce(t)}))):t}function _e(t){++ve,le.echoes&&0!=--le.echoes||(le.echoes=le.id=0),pe.push(zt),ke(t,!0)}function xe(){var t=pe[pe.length-1];pe.pop(),ke(t,!1)}function ke(t,e){var n=zt;if((e?!le.echoes||de++&&t===zt:!de||--de&&t===zt)||Ee(e?_e.bind(null,t):xe),t!==zt&&(zt=t,n===Wt&&(Wt.env=Oe()),Dt)){var r=Wt.env.Promise,o=t.env;At.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(g,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function Oe(){var t=g.Promise;return Dt?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(g,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:At.then,gthen:t.prototype.then}:{}}function je(t,e,n,r,o){var i=zt;try{return ke(t,!0),e(n,r,o)}finally{ke(i,!1)}}function Ee(t){Kt.call(Tt,t)}function Pe(t,e,n,r){return"function"!=typeof t?t:function(){var o=zt;n&&ge(),ke(e,!0);try{return t.apply(this,arguments)}finally{ke(o,!1),r&&Ee(be)}}}function Se(t,e){return function(n,r){return t.call(this,Pe(n,e),Pe(r,e))}}-1===(""+Kt).indexOf("[native code]")&&(ge=be=gt);var Te="unhandledrejection";function Ae(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(g.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(Te,!0,!0),b(r,o)):g.CustomEvent&&b(r=new CustomEvent(Te,{detail:o}),o),r&&g.dispatchEvent&&(dispatchEvent(r),!g.PromiseRejectionEvent&&g.onunhandledrejection))try{g.onunhandledrejection(r)}catch(t){}tt&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: "+(t.stack||t))}catch(t){}}var Ce=Xt.reject;function Ke(t,e,n,r){if(t._state.openComplete||zt.letThrough){var o=t._createTransaction(e,n,t._dbSchema);try{o.create()}catch(t){return Ce(t)}return o._promise(e,(function(t,e){return me((function(){return zt.trans=o,r(t,e,o)}))})).then((function(t){return o._completion.then((function(){return t}))}))}if(!t._state.isBeingOpened){if(!t._options.autoOpen)return Ce(new vt.DatabaseClosed);t.open().catch(gt)}return t._state.dbReadyPromise.then((function(){return Ke(t,e,n,r)}))}var Ie="3.0.3",De=String.fromCharCode(65535),Re=-1/0,Fe="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Be="String expected.",Ne=[],Me="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),qe=Me,Le=Me,Ue=function(t){return!/(dexie\\.js|dexie\\.min\\.js)/.test(t)},Ge="__dbnames",We="readonly",ze="readwrite";function Ve(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e}var Ye={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function He(t){return function(e){return void 0===R(e,t)&&B(e=W(e),t),e}}var Xe=function(){function t(){}return t.prototype._trans=function(t,e,n){var r=this._tx||zt.trans,o=this.name;function i(t,n,r){if(!r.schema[o])throw new vt.NotFound("Table "+o+" not part of transaction");return e(r.idbtrans,r)}var a=ae();try{return r&&r.db===this.db?r===zt.trans?r._promise(t,i,n):me((function(){return r._promise(t,i,n)}),{trans:r,transless:zt.transless||zt}):Ke(this.db,t,[this.name],i)}finally{a&&ue()}},t.prototype.get=function(t,e){var n=this;return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(function(e){return n.core.get({trans:e,key:t}).then((function(t){return n.hook.reading.fire(t)}))})).then(e)},t.prototype.where=function(t){if("string"==typeof t)return new this.db.WhereClause(this,t);if(m(t))return new this.db.WhereClause(this,"["+t.join("+")+"]");var e=y(t);if(1===e.length)return this.where(e[0]).equals(t[e[0]]);var n=this.schema.indexes.concat(this.schema.primKey).filter((function(t){return t.compound&&e.every((function(e){return t.keyPath.indexOf(e)>=0}))&&t.keyPath.every((function(t){return e.indexOf(t)>=0}))}))[0];if(n&&this.db._maxKey!==De)return this.where(n.name).equals(n.keyPath.map((function(e){return t[e]})));!n&&tt&&console.warn("The query "+JSON.stringify(t)+" on "+this.name+" would benefit of a compound index ["+e.join("+")+"]");var r=this.schema.idxByName,o=this.db._deps.indexedDB;function i(t,e){try{return 0===o.cmp(t,e)}catch(t){return!1}}var a=e.reduce((function(e,n){var o=e[0],a=e[1],u=r[n],c=t[n];return[o||u,o||!u?Ve(a,u&&u.multi?function(t){var e=R(t,n);return m(e)&&e.some((function(t){return i(c,t)}))}:function(t){return i(c,R(t,n))}):a]}),[null,null]),u=a[0],c=a[1];return u?this.where(u.name).equals(t[u.keyPath]).filter(c):n?this.filter(c):this.where(e).equals("")},t.prototype.filter=function(t){return this.toCollection().and(t)},t.prototype.count=function(t){return this.toCollection().count(t)},t.prototype.offset=function(t){return this.toCollection().offset(t)},t.prototype.limit=function(t){return this.toCollection().limit(t)},t.prototype.each=function(t){return this.toCollection().each(t)},t.prototype.toArray=function(t){return this.toCollection().toArray(t)},t.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},t.prototype.orderBy=function(t){return new this.db.Collection(new this.db.WhereClause(this,m(t)?"["+t.join("+")+"]":t))},t.prototype.reverse=function(){return this.toCollection().reverse()},t.prototype.mapToClass=function(t){this.schema.mappedClass=t;var e=function(e){if(!e)return e;var n=Object.create(t.prototype);for(var r in e)if(x(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t},t.prototype.defineClass=function(){return this.mapToClass((function(t){b(this,t)}))},t.prototype.add=function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=t;return i&&o&&(a=He(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[a]})})).then((function(t){return t.numFailures?Xt.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{F(t,i,e)}catch(t){}return e}))},t.prototype.update=function(t,e){if("object"!=typeof e||m(e))throw new vt.InvalidArgument("Modifications must be an object.");if("object"!=typeof t||m(t))return this.where(":id").equals(t).modify(e);y(e).forEach((function(n){F(t,n,e[n])}));var n=R(t,this.schema.primKey.keyPath);return void 0===n?Ce(new vt.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(n).modify(e)},t.prototype.put=function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=t;return i&&o&&(a=He(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"put",values:[a],keys:null!=e?[e]:null})})).then((function(t){return t.numFailures?Xt.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{F(t,i,e)}catch(t){}return e}))},t.prototype.delete=function(t){var e=this;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:[t]})})).then((function(t){return t.numFailures?Xt.reject(t.failures[0]):void 0}))},t.prototype.clear=function(){var t=this;return this._trans("readwrite",(function(e){return t.core.mutate({trans:e,type:"deleteRange",range:Ye})})).then((function(t){return t.numFailures?Xt.reject(t.failures[0]):void 0}))},t.prototype.bulkGet=function(t){var e=this;return this._trans("readonly",(function(n){return e.core.getMany({keys:t,trans:n}).then((function(t){return t.map((function(t){return e.hook.reading.fire(t)}))}))}))},t.prototype.bulkAdd=function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new vt.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new vt.InvalidArgument("Arguments objects and keys must have the same length");var c=t.length,s=u&&a?t.map(He(u)):t;return r.core.mutate({trans:e,type:"add",keys:o,values:s,wantResults:i}).then((function(t){var e=t.numFailures,n=t.results,o=t.lastResult,a=t.failures;if(0===e)return i?n:o;throw new ht(r.name+".bulkAdd(): "+e+" of "+c+" operations failed",Object.keys(a).map((function(t){return a[t]})))}))}))},t.prototype.bulkPut=function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new vt.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new vt.InvalidArgument("Arguments objects and keys must have the same length");var c=t.length,s=u&&a?t.map(He(u)):t;return r.core.mutate({trans:e,type:"put",keys:o,values:s,wantResults:i}).then((function(t){var e=t.numFailures,n=t.results,o=t.lastResult,a=t.failures;if(0===e)return i?n:o;throw new ht(r.name+".bulkPut(): "+e+" of "+c+" operations failed",Object.keys(a).map((function(t){return a[t]})))}))}))},t.prototype.bulkDelete=function(t){var e=this,n=t.length;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:t})})).then((function(t){var r=t.numFailures,o=t.lastResult,i=t.failures;if(0===r)return o;throw new ht(e.name+".bulkDelete(): "+r+" of "+n+" operations failed",i)}))},t}();function Qe(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return a(t);r||(r=jt),o||(o=gt);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function a(t){y(t).forEach((function(e){var n=t[e];if(m(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new vt.InvalidArgument("Invalid event config");var r=i(e,bt,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){I((function(){t.apply(null,e)}))}))}))}}))}}function $e(t,e){return E(e).from({prototype:t}),e}function Je(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)}function Ze(t,e){t.filter=Ve(t.filter,e)}function tn(t,e,n){var r=t.replayFilter;t.replayFilter=r?function(){return Ve(r(),e())}:e,t.justLimit=n&&!r}function en(t,e){if(t.isPrimKey)return e.primaryKey;var n=e.getIndexByKeyPath(t.index);if(!n)throw new vt.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n}function nn(t,e,n){var r=en(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})}function rn(t,e,n,r){var o=t.replayFilter?Ve(t.filter,t.replayFilter()):t.filter;if(t.or){var i={},a=function(t,n,r){if(!o||o(n,r,(function(t){return n.stop(t)}),(function(t){return n.fail(t)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),x(i,u)||(i[u]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(a,n),on(nn(t,r,n),t.algorithm,a,!t.keysOnly&&t.valueMapper)])}return on(nn(t,r,n),Ve(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)}function on(t,e,n,r){var o=fe(r?function(t,e,o){return n(r(t),e,o)}:n);return t.then((function(t){if(t)return t.start((function(){var n=function(){return t.continue()};e&&!e(t,(function(t){return n=t}),(function(e){t.stop(e),n=gt}),(function(e){t.fail(e),n=gt}))||o(t.value,t,(function(t){return n=t})),n()}))}))}var an=function(){function t(){}return t.prototype._read=function(t,e){var n=this._ctx;return n.error?n.table._trans(null,Ce.bind(null,n.error)):n.table._trans("readonly",t).then(e)},t.prototype._write=function(t){var e=this._ctx;return e.error?e.table._trans(null,Ce.bind(null,e.error)):e.table._trans("readwrite",t,"locked")},t.prototype._addAlgorithm=function(t){var e=this._ctx;e.algorithm=Ve(e.algorithm,t)},t.prototype._iterate=function(t,e){return rn(this._ctx,t,e,this._ctx.table.core)},t.prototype.clone=function(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&b(n,t),e._ctx=n,e},t.prototype.raw=function(){return this._ctx.valueMapper=null,this},t.prototype.each=function(t){var e=this._ctx;return this._read((function(n){return rn(e,t,n,e.table.core)}))},t.prototype.count=function(t){var e=this;return this._read((function(t){var n=e._ctx,r=n.table.core;if(Je(n,!0))return r.count({trans:t,query:{index:en(n,r.schema),range:n.range}}).then((function(t){return Math.min(t,n.limit)}));var o=0;return rn(n,(function(){return++o,!1}),t,r).then((function(){return o}))})).then(t)},t.prototype.sortBy=function(t,e){var n=t.split(".").reverse(),r=n[0],o=n.length-1;function i(t,e){return e?i(t[n[e]],e-1):t[r]}var a="next"===this._ctx.dir?1:-1;function u(t,e){var n=i(t,o),r=i(e,o);return n<r?-a:n>r?a:0}return this.toArray((function(t){return t.sort(u)})).then(e)},t.prototype.toArray=function(t){var e=this;return this._read((function(t){var n=e._ctx;if("next"===n.dir&&Je(n,!0)&&n.limit>0){var r=n.valueMapper,o=en(n,n.table.core.schema);return n.table.core.query({trans:t,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(t){var e=t.result;return r?e.map(r):e}))}var i=[];return rn(n,(function(t){return i.push(t)}),t,n.table.core).then((function(){return i}))}),t)},t.prototype.offset=function(t){var e=this._ctx;return t<=0||(e.offset+=t,Je(e)?tn(e,(function(){var e=t;return function(t,n){return 0===e||(1===e?(--e,!1):(n((function(){t.advance(e),e=0})),!1))}})):tn(e,(function(){var e=t;return function(){return--e<0}}))),this},t.prototype.limit=function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),tn(this._ctx,(function(){var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this},t.prototype.until=function(t,e){return Ze(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this},t.prototype.first=function(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)},t.prototype.last=function(t){return this.reverse().first(t)},t.prototype.filter=function(t){return Ze(this._ctx,(function(e){return t(e.value)})),function(t,e){t.isMatch=Ve(t.isMatch,e)}(this._ctx,t),this},t.prototype.and=function(t){return this.filter(t)},t.prototype.or=function(t){return new this.db.WhereClause(this._ctx.table,t,this)},t.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},t.prototype.desc=function(){return this.reverse()},t.prototype.eachKey=function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))},t.prototype.eachUniqueKey=function(t){return this._ctx.unique="unique",this.eachKey(t)},t.prototype.eachPrimaryKey=function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))},t.prototype.keys=function(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)},t.prototype.primaryKeys=function(t){var e=this._ctx;if("next"===e.dir&&Je(e,!0)&&e.limit>0)return this._read((function(t){var n=en(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((function(t){return t.result})).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)},t.prototype.uniqueKeys=function(t){return this._ctx.unique="unique",this.keys(t)},t.prototype.firstKey=function(t){return this.limit(1).keys((function(t){return t[0]})).then(t)},t.prototype.lastKey=function(t){return this.reverse().firstKey(t)},t.prototype.distinct=function(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return Ze(this._ctx,(function(t){var e=t.primaryKey.toString(),r=x(n,e);return n[e]=!0,!r})),this},t.prototype.modify=function(t){var e=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof t)o=t;else{var i=y(t),a=i.length;o=function(e){for(var n=!1,r=0;r<a;++r){var o=i[r],u=t[o];R(e,o)!==u&&(F(e,o,u),n=!0)}return n}}var u=n.table.core,c=u.schema.primaryKey,s=c.outbound,f=c.extractKey,l="testmode"in $n?1:2e3,h=e.db.core.cmp,p=[],d=0,v=[],m=function(t,e){var n=e.failures,r=e.numFailures;d+=t-r;for(var o=0,i=y(n);o<i.length;o++){var a=i[o];p.push(n[a])}};return e.clone().primaryKeys().then((function(t){var e=function(n){var i=Math.min(l,t.length-n);return u.getMany({trans:r,keys:t.slice(n,n+i)}).then((function(a){for(var c=[],p=[],d=s?[]:null,v=[],y=0;y<i;++y){var g=a[y],b={value:W(g),primKey:t[n+y]};!1!==o.call(b,b.value,b)&&(null==b.value?v.push(t[n+y]):s||0===h(f(g),f(b.value))?(p.push(b.value),s&&d.push(t[n+y])):(v.push(t[n+y]),c.push(b.value)))}return Promise.resolve(c.length>0&&u.mutate({trans:r,type:"add",values:c}).then((function(t){for(var e in t.failures)v.splice(parseInt(e),1);m(c.length,t)}))).then((function(t){return p.length>0&&u.mutate({trans:r,type:"put",keys:d,values:p}).then((function(t){return m(p.length,t)}))})).then((function(){return v.length>0&&u.mutate({trans:r,type:"delete",keys:v}).then((function(t){return m(v.length,t)}))})).then((function(){return t.length>n+i&&e(n+l)}))}))};return e(0).then((function(){if(p.length>0)throw new lt("Error modifying one or more objects",p,d,v);return t.length}))}))}))},t.prototype.delete=function(){var t=this._ctx,e=t.range;return Je(t)&&(t.isPrimKey&&!Le||3===e.type)?this._write((function(n){var r=t.table.core.schema.primaryKey,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((function(e){return t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(t){var n=t.failures,r=(t.lastResult,t.results,t.numFailures);if(r)throw new lt("Could not delete some values",Object.keys(n).map((function(t){return n[t]})),e-r);return e-r}))}))})):this.modify((function(t,e){return e.value=null}))},t}();function un(t,e){return t<e?-1:t===e?0:1}function cn(t,e){return t>e?-1:t===e?0:1}function sn(t,e,n){var r=t instanceof vn?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r}function fn(t){return new t.Collection(t,(function(){return dn("")})).limit(0)}function ln(t,e,n,r,o,i){for(var a=Math.min(t.length,r.length),u=-1,c=0;c<a;++c){var s=e[c];if(s!==r[c])return o(t[c],n[c])<0?t.substr(0,c)+n[c]+n.substr(c+1):o(t[c],r[c])<0?t.substr(0,c)+r[c]+n.substr(c+1):u>=0?t.substr(0,u)+e[u]+n.substr(u+1):null;o(t[c],s)<0&&(u=c)}return a<r.length&&"next"===i?t+n.substr(t.length):a<t.length&&"prev"===i?t.substr(0,n.length):u<0?null:t.substr(0,u)+r[u]+n.substr(u+1)}function hn(t,e,n,r){var o,i,a,u,c,s,f,l=n.length;if(!n.every((function(t){return"string"==typeof t})))return sn(t,Be);function h(t){o=function(t){return"next"===t?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()}}(t),i=function(t){return"next"===t?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()}}(t),a="next"===t?un:cn;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return a(t.lower,e.lower)}));u=e.map((function(t){return t.upper})),c=e.map((function(t){return t.lower})),s=t,f="next"===t?"":r}h("next");var p=new t.Collection(t,(function(){return pn(u[0],c[l-1]+r)}));p._ondirectionchange=function(t){h(t)};var d=0;return p._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var h=i(o);if(e(h,c,d))return!0;for(var p=null,v=d;v<l;++v){var y=ln(o,h,u[v],c[v],a,s);null===y&&null===p?d=v+1:(null===p||a(p,y)>0)&&(p=y)}return n(null!==p?function(){t.continue(p+f)}:r),!1})),p}function pn(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}}function dn(t){return{type:1,lower:t,upper:t}}var vn=function(){function t(){}return Object.defineProperty(t.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!0,configurable:!0}),t.prototype.between=function(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?fn(this):new this.Collection(this,(function(){return pn(t,e,!n,!r)}))}catch(t){return sn(this,Fe)}},t.prototype.equals=function(t){return null==t?sn(this,Fe):new this.Collection(this,(function(){return dn(t)}))},t.prototype.above=function(t){return null==t?sn(this,Fe):new this.Collection(this,(function(){return pn(t,void 0,!0)}))},t.prototype.aboveOrEqual=function(t){return null==t?sn(this,Fe):new this.Collection(this,(function(){return pn(t,void 0,!1)}))},t.prototype.below=function(t){return null==t?sn(this,Fe):new this.Collection(this,(function(){return pn(void 0,t,!1,!0)}))},t.prototype.belowOrEqual=function(t){return null==t?sn(this,Fe):new this.Collection(this,(function(){return pn(void 0,t)}))},t.prototype.startsWith=function(t){return"string"!=typeof t?sn(this,Be):this.between(t,t+De,!0,!0)},t.prototype.startsWithIgnoreCase=function(t){return""===t?this.startsWith(t):hn(this,(function(t,e){return 0===t.indexOf(e[0])}),[t],De)},t.prototype.equalsIgnoreCase=function(t){return hn(this,(function(t,e){return t===e[0]}),[t],"")},t.prototype.anyOfIgnoreCase=function(){var t=J.apply($,arguments);return 0===t.length?fn(this):hn(this,(function(t,e){return-1!==e.indexOf(t)}),t,"")},t.prototype.startsWithAnyOfIgnoreCase=function(){var t=J.apply($,arguments);return 0===t.length?fn(this):hn(this,(function(t,e){return e.some((function(e){return 0===t.indexOf(e)}))}),t,De)},t.prototype.anyOf=function(){var t=this,e=J.apply($,arguments),n=this._cmp;try{e.sort(n)}catch(t){return sn(this,Fe)}if(0===e.length)return fn(this);var r=new this.Collection(this,(function(){return pn(e[0],e[e.length-1])}));r._ondirectionchange=function(r){n="next"===r?t._ascending:t._descending,e.sort(n)};var o=0;return r._addAlgorithm((function(t,r,i){for(var a=t.key;n(a,e[o])>0;)if(++o===e.length)return r(i),!1;return 0===n(a,e[o])||(r((function(){t.continue(e[o])})),!1)})),r},t.prototype.notEqual=function(t){return this.inAnyRange([[Re,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},t.prototype.noneOf=function(){var t=J.apply($,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return sn(this,Fe)}var e=t.reduce((function(t,e){return t?t.concat([[t[t.length-1][1],e]]):[[Re,e]]}),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})},t.prototype.inAnyRange=function(t,e){var n=this,r=this._cmp,o=this._ascending,i=this._descending,a=this._min,u=this._max;if(0===t.length)return fn(this);if(!t.every((function(t){return void 0!==t[0]&&void 0!==t[1]&&o(t[0],t[1])<=0})))return sn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",vt.InvalidArgument);var c=!e||!1!==e.includeLowers,s=e&&!0===e.includeUppers;var f,l=o;function h(t,e){return l(t[0],e[0])}try{f=t.reduce((function(t,e){for(var n=0,o=t.length;n<o;++n){var i=t[n];if(r(e[0],i[1])<0&&r(e[1],i[0])>0){i[0]=a(i[0],e[0]),i[1]=u(i[1],e[1]);break}}return n===o&&t.push(e),t}),[]),f.sort(h)}catch(t){return sn(this,Fe)}var p=0,d=s?function(t){return o(t,f[p][1])>0}:function(t){return o(t,f[p][1])>=0},v=c?function(t){return i(t,f[p][0])>0}:function(t){return i(t,f[p][0])>=0};var y=d,m=new this.Collection(this,(function(){return pn(f[0][0],f[f.length-1][1],!c,!s)}));return m._ondirectionchange=function(t){"next"===t?(y=d,l=o):(y=v,l=i),f.sort(h)},m._addAlgorithm((function(t,e,r){for(var i=t.key;y(i);)if(++p===f.length)return e(r),!1;return!!function(t){return!d(t)&&!v(t)}(i)||(0===n._cmp(i,f[p][1])||0===n._cmp(i,f[p][0])||e((function(){l===o?t.continue(f[p][0]):t.continue(f[p][1])})),!1)})),m},t.prototype.startsWithAnyOf=function(){var t=J.apply($,arguments);return t.every((function(t){return"string"==typeof t}))?0===t.length?fn(this):this.inAnyRange(t.map((function(t){return[t,t+De]}))):sn(this,"startsWithAnyOf() only works with strings")},t}();function yn(t){return 1===t.length?t[0]:t}function mn(t){try{return t.only([[]]),[[]]}catch(t){return De}}function gn(t){return fe((function(e){return bn(e),t(e.target.error),!1}))}function bn(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()}var wn=function(){function t(){}return t.prototype._lock=function(){return K(!zt.global),++this._reculock,1!==this._reculock||zt.global||(zt.lockOwnerFor=this),this},t.prototype._unlock=function(){if(K(!zt.global),0==--this._reculock)for(zt.global||(zt.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{je(t[1],t[0])}catch(t){}}return this},t.prototype._locked=function(){return this._reculock&&zt.lockOwnerFor!==this},t.prototype.create=function(t){var e=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(K(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new vt.DatabaseClosed(r);case"MissingAPIError":throw new vt.MissingAPI(r.message,r);default:throw new vt.OpenFailed(r)}if(!this.active)throw new vt.TransactionInactive;return K(null===this._completion._state),(t=this.idbtrans=t||n.transaction(yn(this.storeNames),this.mode)).onerror=fe((function(n){bn(n),e._reject(t.error)})),t.onabort=fe((function(n){bn(n),e.active&&e._reject(new vt.Abort(t.error)),e.active=!1,e.on("abort").fire(n)})),t.oncomplete=fe((function(){e.active=!1,e._resolve()})),this},t.prototype._promise=function(t,e,n){var r=this;if("readwrite"===t&&"readwrite"!==this.mode)return Ce(new vt.ReadOnly("Transaction is readonly"));if(!this.active)return Ce(new vt.TransactionInactive);if(this._locked())return new Xt((function(o,i){r._blockedFuncs.push([function(){r._promise(t,e,n).then(o,i)},zt])}));if(n)return me((function(){var t=new Xt((function(t,n){r._lock();var o=e(t,n,r);o&&o.then&&o.then(t,n)}));return t.finally((function(){return r._unlock()})),t._lib=!0,t}));var o=new Xt((function(t,n){var o=e(t,n,r);o&&o.then&&o.then(t,n)}));return o._lib=!0,o},t.prototype._root=function(){return this.parent?this.parent._root():this},t.prototype.waitFor=function(t){var e=this._root(),n=Xt.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((function(){return n}));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new Xt((function(t,r){n.then((function(n){return e._waitingQueue.push(fe(t.bind(null,n)))}),(function(t){return e._waitingQueue.push(fe(r.bind(null,t)))})).finally((function(){e._waitingFor===o&&(e._waitingFor=null)}))}))},t.prototype.abort=function(){this.active&&this._reject(new vt.Abort),this.active=!1},t.prototype.table=function(t){var e=this._memoizedTables||(this._memoizedTables={});if(x(e,t))return e[t];var n=this.schema[t];if(!n)throw new vt.NotFound("Table "+t+" not part of transaction");var r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r},t}();function _n(t,e,n,r,o,i,a){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+xn(e)}}function xn(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""}function kn(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:D(n,(function(t){return[t.name,t]}))}}function On(t){return null==t?function(){}:"string"==typeof t?function(t){return 1===t.split(".").length?function(e){return e[t]}:function(e){return R(e,t)}}(t):function(e){return R(e,t)}}function jn(t,e){return"delete"===e.type?e.keys:e.keys||e.values.map(t.extractKey)}function En(t){return[].slice.call(t)}var Pn=0;function Sn(t){return null==t?":id":"string"==typeof t?t:"["+t.join("+")+"]"}function Tn(t,e,n,r){var o=e.cmp.bind(e);function i(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");var e=t.lower,r=t.upper,o=t.lowerOpen,i=t.upperOpen;return void 0===e?void 0===r?null:n.upperBound(r,!!i):void 0===r?n.lowerBound(e,!!o):n.bound(e,r,!!o,!!i)}var a=function(t,e){var n=En(t.objectStoreNames);return{schema:{name:t.name,tables:n.map((function(t){return e.objectStore(t)})).map((function(t){var e=t.keyPath,n=t.autoIncrement,r=m(e),o=null==e,i={},a={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:On(e)},indexes:En(t.indexNames).map((function(e){return t.index(e)})).map((function(t){var e=t.name,n=t.unique,r=t.multiEntry,o=t.keyPath,a={name:e,compound:m(o),keyPath:o,unique:n,multiEntry:r,extractKey:On(o)};return i[Sn(o)]=a,a})),getIndexByKeyPath:function(t){return i[Sn(t)]}};return i[":id"]=a.primaryKey,null!=e&&(i[Sn(e)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in e.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\\/|Edge\\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\\/(\\d*)/))[1]<604)}}(t,r),u=a.schema,c=a.hasGetAll,s=u.tables.map((function(t){return function(t){var e=t.name;return{name:e,schema:t,mutate:function(n){var r=n.trans,o=n.type,a=n.keys,u=n.values,c=n.range,s=n.wantResults;return new Promise((function(n,f){n=fe(n);var l=r.objectStore(e),h=null==l.keyPath,p="put"===o||"add"===o;if(!p&&"delete"!==o&&"deleteRange"!==o)throw new Error("Invalid operation type: "+o);var d=(a||u||{length:1}).length;if(a&&u&&a.length!==u.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return n({numFailures:0,failures:{},results:[],lastResult:void 0});var y,m=s&&v(a||jn(t.primaryKey,{type:o,keys:a,values:u})),g=[],b=0,w=function(t){++b,bn(t),m&&(m[t.target._reqno]=void 0),g[t.target._reqno]=t.target.error},_=function(t){var e=t.target;m[e._reqno]=e.result};if("deleteRange"===o){if(4===c.type)return n({numFailures:b,failures:g,results:m,lastResult:void 0});y=3===c.type?l.clear():l.delete(i(c))}else{var x=p?h?[u,a]:[u,null]:[a,null],k=x[0],O=x[1];if(p)for(var j=0;j<d;++j)(y=O&&void 0!==O[j]?l[o](k[j],O[j]):l[o](k[j]))._reqno=j,m&&void 0===m[j]&&(y.onsuccess=_),y.onerror=w;else for(j=0;j<d;++j)(y=l[o](k[j]))._reqno=j,y.onerror=w}var E=function(t){var e=t.target.result;m&&(m[d-1]=e),n({numFailures:b,failures:g,results:m,lastResult:e})};y.onerror=function(t){w(t),E(t)},y.onsuccess=E}))},getMany:function(t){var n=t.trans,r=t.keys;return new Promise((function(t,o){t=fe(t);for(var i,a=n.objectStore(e),u=r.length,c=new Array(u),s=0,f=0,l=function(e){var n=e.target;c[n._pos]=n.result,++f===s&&t(c)},h=gn(o),p=0;p<u;++p)null!=r[p]&&((i=a.get(r[p]))._pos=p,i.onsuccess=l,i.onerror=h,++s);0===s&&t(c)}))},get:function(t){var n=t.trans,r=t.key;return new Promise((function(t,o){t=fe(t);var i=n.objectStore(e).get(r);i.onsuccess=function(e){return t(e.target.result)},i.onerror=gn(o)}))},query:function(t){return function(n){return new Promise((function(r,o){r=fe(r);var a=n.trans,u=n.values,c=n.limit,s=n.query,f=c===1/0?void 0:c,l=s.index,h=s.range,p=a.objectStore(e),d=l.isPrimaryKey?p:p.index(l.name),v=i(h);if(0===c)return r({result:[]});if(t){var y=u?d.getAll(v,f):d.getAllKeys(v,f);y.onsuccess=function(t){return r({result:t.target.result})},y.onerror=gn(o)}else{var m=0,g=u||!("openKeyCursor"in d)?d.openCursor(v):d.openKeyCursor(v),b=[];g.onsuccess=function(t){var e=g.result;return e?(b.push(u?e.value:e.primaryKey),++m===c?r({result:b}):void e.continue()):r({result:b})},g.onerror=gn(o)}}))}}(c),openCursor:function(t){var n=t.trans,r=t.values,o=t.query,a=t.reverse,u=t.unique;return new Promise((function(t,c){t=fe(t);var s=o.index,f=o.range,l=n.objectStore(e),h=s.isPrimaryKey?l:l.index(s.name),p=a?u?"prevunique":"prev":u?"nextunique":"next",d=r||!("openKeyCursor"in h)?h.openCursor(i(f),p):h.openKeyCursor(i(f),p);d.onerror=gn(c),d.onsuccess=fe((function(e){var r=d.result;if(r){r.___id=++Pn,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=n,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=fe(c),r.next=function(){var t=this,e=1;return this.start((function(){return e--?t.continue():t.stop()})).then((function(){return t}))},r.start=function(t){var e=new Promise((function(t,e){t=fe(t),d.onerror=gn(e),r.fail=e,r.stop=function(e){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,t(e)}})),n=function(){if(d.result)try{t()}catch(t){r.fail(t)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return d.onsuccess=fe((function(t){d.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),e},t(r)}else t(null)}),c)}))},count:function(t){var n=t.query,r=t.trans,o=n.index,a=n.range;return new Promise((function(t,n){var u=r.objectStore(e),c=o.isPrimaryKey?u:u.index(o.name),s=i(a),f=s?c.count(s):c.count();f.onsuccess=fe((function(e){return t(e.target.result)})),f.onerror=gn(n)}))}}}(t)})),f={};return s.forEach((function(t){return f[t.name]=t})),{stack:"dbcore",transaction:t.transaction.bind(t),table:function(t){if(!f[t])throw new Error("Table \'"+t+"\' not found");return f[t]},cmp:o,MIN_KEY:-1/0,MAX_KEY:mn(n),schema:u}}function An(t,e,n,r){var o=n.IDBKeyRange,i=function(t,e){return e.reduce((function(t,e){var n=e.create;return d(d({},t),n(t))}),t)}(Tn(e,n.indexedDB,o,r),t.dbcore);return{dbcore:i}}function Cn(t,e){var n=e.db,r=An(t._middlewares,n,t._deps,e);t.core=r.dbcore,t.tables.forEach((function(e){var n=e.name;t.core.schema.tables.some((function(t){return t.name===n}))&&(e.core=t.core.table(n),t[n]instanceof t.Table&&(t[n].core=e.core))}))}function Kn(t,e,n,r){n.forEach((function(n){var o=r[n];e.forEach((function(e){var r=S(e,n);(!r||"value"in r&&void 0===r.value)&&(e===t.Transaction.prototype||e instanceof t.Transaction?j(e,n,{get:function(){return this.table(n)},set:function(t){O(this,n,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):e[n]=new t.Table(n,o))}))}))}function In(t,e){e.forEach((function(e){for(var n in e)e[n]instanceof t.Table&&delete e[n]}))}function Dn(t,e){return t._cfg.version-e._cfg.version}function Rn(t,e,n,r){var o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=zt.transless||zt;me((function(){zt.trans=i,zt.transless=u,0===e?(y(o).forEach((function(t){Bn(n,t,o[t].primKey,o[t].indexes)})),Cn(t,n),Xt.follow((function(){return t.on.populate.fire(i)})).catch(a)):function(t,e,n,r){var o=[],i=t._versions,a=t._dbSchema=Mn(t,t.idbdb,r),u=!1;function c(){return o.length?Xt.resolve(o.shift()(n.idbtrans)).then(c):Xt.resolve()}return i.filter((function(t){return t._cfg.version>=e})).forEach((function(i){o.push((function(){var o=a,c=i._cfg.dbschema;qn(t,o,r),qn(t,c,r),a=t._dbSchema=c;var s=Fn(o,c);s.add.forEach((function(t){Bn(r,t[0],t[1].primKey,t[1].indexes)})),s.change.forEach((function(t){if(t.recreate)throw new vt.Upgrade("Not yet support for changing primary key");var e=r.objectStore(t.name);t.add.forEach((function(t){return Nn(e,t)})),t.change.forEach((function(t){e.deleteIndex(t.name),Nn(e,t)})),t.del.forEach((function(t){return e.deleteIndex(t)}))}));var f=i._cfg.contentUpgrade;if(f&&i._cfg.version>e){Cn(t,r),n._memoizedTables={},u=!0;var l=N(c);s.del.forEach((function(t){l[t]=o[t]})),In(t,[t.Transaction.prototype]),Kn(t,[t.Transaction.prototype],y(l),l),n.schema=l;var h,p=Z(f);p&&ge();var d=Xt.follow((function(){if((h=f(n))&&p){var t=be.bind(null,null);h.then(t,t)}}));return h&&"function"==typeof h.then?Xt.resolve(h):d.then((function(){return h}))}})),o.push((function(e){u&&qe||function(t,e){for(var n=0;n<e.db.objectStoreNames.length;++n){var r=e.db.objectStoreNames[n];null==t[r]&&e.db.deleteObjectStore(r)}}(i._cfg.dbschema,e);In(t,[t.Transaction.prototype]),Kn(t,[t.Transaction.prototype],t._storeNames,t._dbSchema),n.schema=t._dbSchema}))})),c().then((function(){var t,e;e=r,y(t=a).forEach((function(n){e.db.objectStoreNames.contains(n)||Bn(e,n,t[n].primKey,t[n].indexes)}))}))}(t,e,i,n).catch(a)}))}function Fn(t,e){var n,r={del:[],add:[],change:[]};for(n in t)e[n]||r.del.push(n);for(n in e){var o=t[n],i=e[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Me)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,c=i.idxByName,s=void 0;for(s in u)c[s]||a.del.push(s);for(s in c){var f=u[s],l=c[s];f?f.src!==l.src&&a.change.push(l):a.add.push(l)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r}function Bn(t,e,n,r){var o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(t){return Nn(o,t)})),o}function Nn(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})}function Mn(t,e,n){var r={};return A(e.objectStoreNames,0).forEach((function(t){for(var e=n.objectStore(t),o=e.keyPath,i=_n(xn(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<e.indexNames.length;++u){var c=e.index(e.indexNames[u]);o=c.keyPath;var s=_n(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[t]=kn(t,i,a)})),r}function qn(t,e,n){for(var r=n.db.objectStoreNames,o=0;o<r.length;++o){var i=r[o],a=n.objectStore(i);t._hasGetAll="getAll"in a;for(var u=0;u<a.indexNames.length;++u){var c=a.indexNames[u],s=a.index(c).keyPath,f="string"==typeof s?s:"["+A(s).join("+")+"]";if(e[i]){var l=e[i].idxByName[f];l&&(l.name=c,delete e[i].idxByName[f],e[i].idxByName[c]=l)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\\/|Edge\\/)/.test(navigator.userAgent)&&g.WorkerGlobalScope&&g instanceof g.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\\/(\\d*)/))[1]<604&&(t._hasGetAll=!1)}var Ln,Un=function(){function t(){}return t.prototype._parseStoresSpec=function(t,e){y(t).forEach((function(n){if(null!==t[n]){var r=t[n].split(",").map((function(t,e){var n=(t=t.trim()).replace(/([&*]|\\+\\+)/g,""),r=/^\\[/.test(n)?n.match(/^\\[(.*)\\]$/)[1].split("+"):n;return _n(n,r||null,/\\&/.test(t),/\\*/.test(t),/\\+\\+/.test(t),m(r),0===e)})),o=r.shift();if(o.multi)throw new vt.Schema("Primary key cannot be multi-valued");r.forEach((function(t){if(t.auto)throw new vt.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new vt.Schema("Index must have a name and cannot be an empty string")})),e[n]=kn(n,o,r)}}))},t.prototype.stores=function(t){var e=this.db;this._cfg.storesSource=this._cfg.storesSource?b(this._cfg.storesSource,t):t;var n=e._versions,r={},o={};return n.forEach((function(t){b(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,In(e,[e._allTables,e,e.Transaction.prototype]),Kn(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],y(o),o),e._storeNames=y(o),this},t.prototype.upgrade=function(t){return this._cfg.contentUpgrade=t,this},t}();function Gn(t){return me((function(){return zt.letThrough=!0,t()}))}function Wn(t){var e=t._state,n=t._deps.indexedDB;if(e.isBeingOpened||t.idbdb)return e.dbReadyPromise.then((function(){return e.dbOpenError?Ce(e.dbOpenError):t}));tt&&(e.openCanceller._stackHolder=ot()),e.isBeingOpened=!0,e.dbOpenError=null,e.openComplete=!1;var r=e.dbReadyResolve,o=null;return Xt.race([e.openCanceller,new Xt((function(r,i){if(!n)throw new vt.MissingAPI("indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill.");var a=t.name,u=e.autoSchema?n.open(a):n.open(a,Math.round(10*t.verno));if(!u)throw new vt.MissingAPI("IndexedDB API not available");u.onerror=gn(i),u.onblocked=fe(t._fireOnBlocked),u.onupgradeneeded=fe((function(r){if(o=u.transaction,e.autoSchema&&!t._options.allowEmptyDB){u.onerror=bn,o.abort(),u.result.close();var c=n.deleteDatabase(a);c.onsuccess=c.onerror=fe((function(){i(new vt.NoSuchDatabase("Database "+a+" doesnt exist"))}))}else{o.onerror=gn(i);var s=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;t.idbdb=u.result,Rn(t,s/10,o,i)}}),i),u.onsuccess=fe((function(){o=null;var n=t.idbdb=u.result,i=A(n.objectStoreNames);if(i.length>0)try{var c=n.transaction(yn(i),"readonly");e.autoSchema?function(t,e,n){t.verno=e.version/10;var r=t._dbSchema=Mn(0,e,n);t._storeNames=A(e.objectStoreNames,0),Kn(t,[t._allTables],y(r),r)}(t,n,c):(qn(t,t._dbSchema,c),function(t,e){var n=Fn(Mn(0,t.idbdb,e),t._dbSchema);return!(n.add.length||n.change.some((function(t){return t.add.length||t.change.length})))}(t,c)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Cn(t,c)}catch(t){}Ne.push(t),n.onversionchange=fe((function(n){e.vcFired=!0,t.on("versionchange").fire(n)})),Ln.add(a),r()}),i)}))]).then((function(){return e.onReadyBeingFired=[],Xt.resolve(Gn(t.on.ready.fire)).then((function t(){if(e.onReadyBeingFired.length>0){var n=e.onReadyBeingFired.reduce(Et,gt);return e.onReadyBeingFired=[],Xt.resolve(Gn(n)).then(t)}}))})).finally((function(){e.onReadyBeingFired=null})).then((function(){return e.isBeingOpened=!1,t})).catch((function(n){try{o&&o.abort()}catch(t){}return e.isBeingOpened=!1,t.close(),e.dbOpenError=n,Ce(e.dbOpenError)})).finally((function(){e.openComplete=!0,r()}))}function zn(t){var e=function(e){return t.next(e)},n=o(e),r=o((function(e){return t.throw(e)}));function o(t){return function(e){var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):m(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()}function Vn(t,e,n){var r=arguments.length;if(r<2)throw new vt.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=q(o);return[t,i,n]}function Yn(t,e,n,r,o){return Xt.resolve().then((function(){var i=zt.transless||zt,a=t._createTransaction(e,n,t._dbSchema,r),u={trans:a,transless:i};r?a.idbtrans=r.idbtrans:a.create();var c,s=Z(o);s&&ge();var f=Xt.follow((function(){if(c=o.call(a,a))if(s){var t=be.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=zn(c))}),u);return(c&&"function"==typeof c.then?Xt.resolve(c).then((function(t){return a.active?t:Ce(new vt.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):f.then((function(){return c}))).then((function(t){return r&&a._resolve(),a._completion.then((function(){return t}))})).catch((function(t){return a._reject(t),Ce(t)}))}))}function Hn(t,e,n){for(var r=m(t)?t.slice():[t],o=0;o<n;++o)r.push(e);return r}var Xn={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return d(d({},t),{table:function(e){var n=t.table(e),r=n.schema,o={},i=[];function a(t,e,n){var r=Sn(t),u=o[r]=o[r]||[],c=null==t?0:"string"==typeof t?1:t.length,s=e>0,f=d(d({},n),{isVirtual:s,isPrimaryKey:!s&&n.isPrimaryKey,keyTail:e,keyLength:c,extractKey:On(t),unique:!s&&n.unique});(u.push(f),f.isPrimaryKey||i.push(f),c>1)&&a(2===c?t[0]:t.slice(0,c-1),e+1,n);return u.sort((function(t,e){return t.keyTail-e.keyTail})),f}var u=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[u];for(var c=0,s=r.indexes;c<s.length;c++){var f=s[c];a(f.keyPath,0,f)}function l(e){var n,r,o=e.query.index;return o.isVirtual?d(d({},e),{query:{index:o,range:(n=e.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:Hn(n.lower,n.lowerOpen?t.MAX_KEY:t.MIN_KEY,r),lowerOpen:!0,upper:Hn(n.upper,n.upperOpen?t.MIN_KEY:t.MAX_KEY,r),upperOpen:!0})}}):e}var h=d(d({},n),{schema:d(d({},r),{primaryKey:u,indexes:i,getIndexByKeyPath:function(t){var e=o[Sn(t)];return e&&e[0]}}),count:function(t){return n.count(l(t))},query:function(t){return n.query(l(t))},openCursor:function(e){var r=e.query.index,o=r.keyTail,i=r.isVirtual,a=r.keyLength;if(!i)return n.openCursor(e);return n.openCursor(l(e)).then((function(n){return n&&function(n){var r=Object.create(n,{continue:{value:function(r){null!=r?n.continue(Hn(r,e.reverse?t.MAX_KEY:t.MIN_KEY,o)):e.unique?n.continue(Hn(n.key,e.reverse?t.MIN_KEY:t.MAX_KEY,o)):n.continue()}},continuePrimaryKey:{value:function(e,r){n.continuePrimaryKey(Hn(e,t.MAX_KEY,o),r)}},key:{get:function(){var t=n.key;return 1===a?t[0]:t.slice(0,a)}},value:{get:function(){return n.value}}});return r}(n)}))}});return h}})}},Qn={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(t){return d(d({},t),{table:function(e){var n=t.table(e),r=n.schema.primaryKey,o=d(d({},n),{mutate:function(t){var o=zt.trans,i=o.table(e).hook,a=i.deleting,u=i.creating,c=i.updating;switch(t.type){case"add":if(u.fire===gt)break;return o._promise("readwrite",(function(){return s(t)}),!0);case"put":if(u.fire===gt&&c.fire===gt)break;return o._promise("readwrite",(function(){return s(t)}),!0);case"delete":if(a.fire===gt)break;return o._promise("readwrite",(function(){return s(t)}),!0);case"deleteRange":if(a.fire===gt)break;return o._promise("readwrite",(function(){return function(t){return f(t.trans,t.range,1e4)}(t)}),!0)}return n.mutate(t);function s(t){var e=zt.trans,o=t.keys||jn(r,t);if(!o)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?d(d({},t),{keys:o,wantResults:!0}):d({},t)).type&&(t.values=v(t.values)),t.keys&&(t.keys=v(t.keys)),function(t,e,n){return"add"===e.type?Promise.resolve(new Array(e.values.length)):t.getMany({trans:e.trans,keys:n})}(n,t,o).then((function(i){var s=o.map((function(n,o){var s=i[o],f={onerror:null,onsuccess:null};if("delete"===t.type)a.fire.call(f,n,s,e);else if("add"===t.type||void 0===s){var l=u.fire.call(f,n,t.values[o],e);null==n&&null!=l&&(n=l,t.keys[o]=n,r.outbound||F(t.values[o],r.keyPath,n))}else{var h=H(s,t.values[o]),p=c.fire.call(f,h,n,s,e);if(p){var d=t.values[o];Object.keys(p).forEach((function(t){x(d,t)?d[t]=p[t]:F(d,t,p[t])}))}}return f}));return n.mutate(t).then((function(e){for(var n=e.failures,r=e.results,a=e.numFailures,u=e.lastResult,c=0;c<o.length;++c){var f=r?r[c]:o[c],l=s[c];null==f?l.onerror&&l.onerror(n[c]):l.onsuccess&&l.onsuccess("put"===t.type&&i[c]?t.values[c]:f)}return{failures:n,results:r,numFailures:a,lastResult:u}})).catch((function(t){return s.forEach((function(e){return e.onerror&&e.onerror(t)})),Promise.reject(t)}))}))}function f(t,e,o){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:o}).then((function(n){var r=n.result;return s({type:"delete",keys:r,trans:t}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<o?{failures:[],numFailures:0,lastResult:void 0}:f(t,d(d({},e),{lower:r[r.length-1],lowerOpen:!0}),o)}))}))}}});return o}})}},$n=function(){function t(e,n){var r=this;this._middlewares={},this.verno=0;var o=t.dependencies;this._options=n=d({addons:t.addons,autoOpen:!0,indexedDB:o.indexedDB,IDBKeyRange:o.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var i=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:gt,dbReadyPromise:null,cancelOpen:gt,openCanceller:null,autoSchema:!0};a.dbReadyPromise=new Xt((function(t){a.dbReadyResolve=t})),a.openCanceller=new Xt((function(t,e){a.cancelOpen=e})),this._state=a,this.name=e,this.on=Qe(this,"populate","blocked","versionchange",{ready:[Et,gt]}),this.on.ready.subscribe=C(this.on.ready.subscribe,(function(e){return function(n,o){t.vip((function(){var t=r._state;if(t.openComplete)t.dbOpenError||Xt.resolve().then(n),o&&e(n);else if(t.onReadyBeingFired)t.onReadyBeingFired.push(n),o&&e(n);else{e(n);var i=r;o||e((function t(){i.on.ready.unsubscribe(n),i.on.ready.unsubscribe(t)}))}}))}})),this.Collection=function(t){return $e(an.prototype,(function(e,n){this.db=t;var r=Ye,o=null;if(n)try{r=n()}catch(t){o=t}var i=e._ctx,a=i.table,u=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:r,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:i.or,valueMapper:u!==bt?u:null}}))}(this),this.Table=function(t){return $e(Xe.prototype,(function(e,n,r){this.db=t,this._tx=r,this.name=e,this.schema=n,this.hook=t._allTables[e]?t._allTables[e].hook:Qe(null,{creating:[xt,gt],reading:[wt,bt],updating:[Ot,gt],deleting:[kt,gt]})}))}(this),this.Transaction=function(t){return $e(wn.prototype,(function(e,n,r,o){var i=this;this.db=t,this.mode=e,this.storeNames=n,this.schema=r,this.idbtrans=null,this.on=Qe(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Xt((function(t,e){i._resolve=t,i._reject=e})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(t){var e=i.active;return i.active=!1,i.on.error.fire(t),i.parent?i.parent._reject(t):e&&i.idbtrans&&i.idbtrans.abort(),Ce(t)}))}))}(this),this.Version=function(t){return $e(Un.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(t){return $e(vn.prototype,(function(e,n,r){this.db=t,this._ctx={table:e,index:":id"===n?null:n,or:r};var o=t._deps.indexedDB;if(!o)throw new vt.MissingAPI("indexedDB API missing");this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(t,e){return o.cmp(e,t)},this._max=function(t,e){return o.cmp(t,e)>0?t:e},this._min=function(t,e){return o.cmp(t,e)<0?t:e},this._IDBKeyRange=t._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(t){t.newVersion>0?console.warn("Another connection wants to upgrade database \'"+r.name+"\'. Closing db now to resume the upgrade."):console.warn("Another connection wants to delete database \'"+r.name+"\'. Closing db now to resume the delete request."),r.close()})),this.on("blocked",(function(t){!t.newVersion||t.newVersion<t.oldVersion?console.warn("Dexie.delete(\'"+r.name+"\') was blocked"):console.warn("Upgrade \'"+r.name+"\' blocked by other connection holding version "+t.oldVersion/10)})),this._maxKey=mn(n.IDBKeyRange),this._createTransaction=function(t,e,n,o){return new r.Transaction(t,e,n,o)},this._fireOnBlocked=function(t){r.on("blocked").fire(t),Ne.filter((function(t){return t.name===r.name&&t!==r&&!t._state.vcFired})).map((function(e){return e.on("versionchange").fire(t)}))},this.use(Xn),this.use(Qn),i.forEach((function(t){return t(r)}))}return t.prototype.version=function(t){if(isNaN(t)||t<.1)throw new vt.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new vt.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);var e=this._versions,n=e.filter((function(e){return e._cfg.version===t}))[0];return n||(n=new this.Version(t),e.push(n),e.sort(Dn),n.stores({}),this._state.autoSchema=!1,n)},t.prototype._whenReady=function(t){var e=this;return this._state.openComplete||zt.letThrough?t():new Xt((function(t,n){if(!e._state.isBeingOpened){if(!e._options.autoOpen)return void n(new vt.DatabaseClosed);e.open().catch(gt)}e._state.dbReadyPromise.then(t,n)})).then(t)},t.prototype.use=function(t){var e=t.stack,n=t.create,r=t.level,o=t.name;o&&this.unuse({stack:e,name:o});var i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:n,level:null==r?10:r,name:o}),i.sort((function(t,e){return t.level-e.level})),this},t.prototype.unuse=function(t){var e=t.stack,n=t.name,r=t.create;return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((function(t){return r?t.create!==r:!!n&&t.name!==n}))),this},t.prototype.open=function(){return Wn(this)},t.prototype.close=function(){var t=Ne.indexOf(this),e=this._state;if(t>=0&&Ne.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(t){}this.idbdb=null}this._options.autoOpen=!1,e.dbOpenError=new vt.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError),e.dbReadyPromise=new Xt((function(t){e.dbReadyResolve=t})),e.openCanceller=new Xt((function(t,n){e.cancelOpen=n}))},t.prototype.delete=function(){var t=this,e=arguments.length>0,n=this._state;return new Xt((function(r,o){var i=function(){t.close();var e=t._deps.indexedDB.deleteDatabase(t.name);e.onsuccess=fe((function(){Ln.remove(t.name),r()})),e.onerror=gn(o),e.onblocked=t._fireOnBlocked};if(e)throw new vt.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()}))},t.prototype.backendDB=function(){return this.idbdb},t.prototype.isOpen=function(){return null!==this.idbdb},t.prototype.hasBeenClosed=function(){var t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name},t.prototype.hasFailed=function(){return null!==this._state.dbOpenError},t.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(t.prototype,"tables",{get:function(){var t=this;return y(this._allTables).map((function(e){return t._allTables[e]}))},enumerable:!0,configurable:!0}),t.prototype.transaction=function(){var t=Vn.apply(this,arguments);return this._transaction.apply(this,t)},t.prototype._transaction=function(t,e,n){var r=this,o=zt.trans;o&&o.db===this&&-1===t.indexOf("!")||(o=null);var i,a,u=-1!==t.indexOf("?");t=t.replace("!","").replace("?","");try{if(a=e.map((function(t){var e=t instanceof r.Table?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||t===We)i=We;else{if("rw"!=t&&t!=ze)throw new vt.InvalidArgument("Invalid transaction mode: "+t);i=ze}if(o){if(o.mode===We&&i===ze){if(!u)throw new vt.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(t){if(o&&-1===o.storeNames.indexOf(t)){if(!u)throw new vt.SubTransaction("Table "+t+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(t){return o?o._promise(null,(function(e,n){n(t)})):Ce(t)}var c=Yn.bind(null,this,i,a,o,n);return o?o._promise(i,c,"lock"):zt.trans?je(zt.transless,(function(){return r._whenReady(c)})):this._whenReady(c)},t.prototype.table=function(t){if(!x(this._allTables,t))throw new vt.InvalidTable("Table "+t+" does not exist");return this._allTables[t]},t}(),Jn=$n;k(Jn,d(d({},mt),{delete:function(t){return new Jn(t).delete()},exists:function(t){return new Jn(t,{addons:[]}).open().then((function(t){return t.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(t){return Ln?Ln.getDatabaseNames().then(t):Xt.resolve([])},defineClass:function(){return function(t){b(this,t)}},ignoreTransaction:function(t){return zt.trans?je(zt.transless,t):t()},vip:Gn,async:function(t){return function(){try{var e=zn(t.apply(this,arguments));return e&&"function"==typeof e.then?e:Xt.resolve(e)}catch(t){return Ce(t)}}},spawn:function(t,e,n){try{var r=zn(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:Xt.resolve(r)}catch(t){return Ce(t)}},currentTransaction:{get:function(){return zt.trans||null}},waitFor:function(t,e){var n=Xt.resolve("function"==typeof t?Jn.ignoreTransaction(t):t).timeout(e||6e4);return zt.trans?zt.trans.waitFor(n):n},Promise:Xt,debug:{get:function(){return tt},set:function(t){et(t,"dexie"===t?function(){return!0}:Ue)}},derive:E,extend:b,props:k,override:C,Events:Qe,getByKeyPath:R,setByKeyPath:F,delByKeyPath:B,shallowClone:N,deepClone:W,getObjectDiff:H,asap:I,minKey:Re,addons:[],connections:Ne,errnames:pt,dependencies:function(){try{return{indexedDB:g.indexedDB||g.mozIndexedDB||g.webkitIndexedDB||g.msIndexedDB,IDBKeyRange:g.IDBKeyRange||g.webkitIDBKeyRange}}catch(t){return{indexedDB:null,IDBKeyRange:null}}}(),semVer:Ie,version:Ie.split(".").map((function(t){return parseInt(t)})).reduce((function(t,e,n){return t+e/Math.pow(10,2*n)})),default:Jn,Dexie:Jn})),Jn.maxKey=mn(Jn.dependencies.IDBKeyRange),function(t){try{Ln=function(t){var e,n=t&&"function"==typeof t.databases;if(!n){var r=new $n(Ge,{addons:[]});r.version(1).stores({dbnames:"name"}),e=r.table("dbnames")}return{getDatabaseNames:function(){return n?Xt.resolve(t.databases()).then((function(t){return t.map((function(t){return t.name})).filter((function(t){return t!==Ge}))})):e.toCollection().primaryKeys()},add:function(t){return!n&&t!==Ge&&e.put({name:t}).catch(gt)},remove:function(t){return!n&&t!==Ge&&e.delete(t).catch(gt)}}}(t)}catch(t){}}($n.dependencies.indexedDB),Xt.rejectionMapper=function(t,e){if(!t||t instanceof st||t instanceof TypeError||t instanceof SyntaxError||!t.name||!yt[t.name])return t;var n=new yt[t.name](e||t.message,t);return"stack"in t&&j(n,"stack",{get:function(){return this.inner.stack}}),n},et(tt,Ue);function Zn(t){var e=function(){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(t){return!1}}();return function(){var n,r=p(t);if(e){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}var tr=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(n,t);var e=Zn(n);function n(){var t;return u(this,n),(t=e.call(this,"AgoraLogger")).logs=void 0,t.openDatabase(),t.logs=t.table("logs"),t}return s(n,[{key:"openDatabase",value:function(){this.version(1).stores({logs:"++id, content, created_at"})}}]),n}($n)),er=(n(1539),n(8674),function(){function t(){u(this,t),this.mutex=Promise.resolve()}var n;return s(t,[{key:"lock",value:function(){var t=function(t){};return this.mutex=this.mutex.then((function(){return new Promise(t)})),new Promise((function(e){t=e}))}},{key:"dispatch",value:(n=e(o().mark((function t(e){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.lock();case 2:return n=t.sent,t.prev=3,t.next=6,Promise.resolve(e());case 6:return t.abrupt("return",t.sent);case 7:return t.prev=7,n(),t.finish(7);case 10:case"end":return t.stop()}}),t,this,[[3,,7,10]])}))),function(t){return n.apply(this,arguments)})}]),t}());console.log("[log worker] log worker initialzied");var nr=self,rr=new er,or=[],ir=function(){var t;(t=console).debug.apply(t,arguments)},ar=a()((function(){rr.dispatch(e(o().mark((function t(){var e,n,r,i,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(new Date).getTime(),n=or,or=[],t.prev=3,t.next=6,tr.logs.count();case 6:if(r=t.sent,!((i=n.length+r-5e4)>0)){t.next=12;break}return t.next=11,tr.logs.orderBy(":id").reverse().limit(i).delete();case 11:console.debug("[log worker] clear ".concat(i," records"));case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(3),console.error("[log worker] clear db failed");case 17:return t.prev=17,t.next=20,tr.logs.bulkPut(n);case 20:t.next=25;break;case 22:t.prev=22,t.t1=t.catch(17),console.error("[log worker] bulkPut ".concat(n.length," failed"));case 25:a=(new Date).getTime(),ir("[log worker] done writing ".concat(n.length," records in ").concat(a-e,"ms"));case 27:case"end":return t.stop()}}),t,null,[[3,14],[17,22]])}))))}),2e3,{maxWait:3e4});nr.onmessage=function(){var t=e(o().mark((function t(e){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.data&&"log"===e.data.type&&(n=new Date,or.push({content:e.data.data,created_at:+Date.now(),timestamp:"".concat(n)}),ar());case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})()})();',"Worker",void 0,__webpack_require__.p+"index.worker.js")}var q=function(){return q=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},q.apply(this,arguments)};function V(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}var K=Object.keys,H=Array.isArray,W="undefined"!=typeof self?self:"undefined"!=typeof window?window:global;function z(e,t){return"object"!=typeof t||K(t).forEach((function(r){e[r]=t[r]})),e}"undefined"==typeof Promise||W.Promise||(W.Promise=Promise);var Y=Object.getPrototypeOf,X={}.hasOwnProperty;function J(e,t){return X.call(e,t)}function Z(e,t){"function"==typeof t&&(t=t(Y(e))),K(t).forEach((function(r){ee(e,r,t[r])}))}var $=Object.defineProperty;function ee(e,t,r,n){$(e,t,z(r&&J(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function te(e){return{from:function(t){return e.prototype=Object.create(t.prototype),ee(e.prototype,"constructor",e),{extend:Z.bind(null,e.prototype)}}}}var re=Object.getOwnPropertyDescriptor;function ne(e,t){var r;return re(e,t)||(r=Y(e))&&ne(r,t)}var ie=[].slice;function oe(e,t,r){return ie.call(e,t,r)}function ae(e,t){return t(e)}function se(e){if(!e)throw new Error("Assertion Failed")}function ce(e){W.setImmediate?setImmediate(e):setTimeout(e,0)}function ue(e,t){return e.reduce((function(e,r,n){var i=t(r,n);return i&&(e[i[0]]=i[1]),e}),{})}function le(e,t){if(J(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,i=t.length;n<i;++n){var o=le(e,t[n]);r.push(o)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:le(s,t.substr(a+1))}}function he(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){se("string"!=typeof r&&"length"in r);for(var n=0,i=t.length;n<i;++n)he(e,t[n],r[n])}else{var o=t.indexOf(".");if(-1!==o){var a=t.substr(0,o),s=t.substr(o+1);if(""===s)void 0===r?H(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var c=e[a];c||(c=e[a]={}),he(c,s,r)}}else void 0===r?H(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function de(e,t){"string"==typeof t?he(e,t,void 0):"length"in t&&[].map.call(t,(function(t){he(e,t,void 0)}))}function fe(e){var t={};for(var r in e)J(e,r)&&(t[r]=e[r]);return t}var pe=[].concat;function ge(e){return pe.apply([],e)}var ve="Boolean,String,Date,RegExp,Blob,File,FileList,ArrayBuffer,DataView,Uint8ClampedArray,ImageData,Map,Set".split(",").concat(ge([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return W[e]})),me=ve.map((function(e){return W[e]})),Ae=ue(ve,(function(e){return[e,!0]}));function ye(e){if(!e||"object"!=typeof e)return e;var t;if(H(e)){t=[];for(var r=0,n=e.length;r<n;++r)t.push(ye(e[r]))}else if(me.indexOf(e.constructor)>=0)t=e;else for(var i in t=e.constructor?Object.create(e.constructor.prototype):{},e)J(e,i)&&(t[i]=ye(e[i]));return t}var be={}.toString;function _e(e){return be.call(e).slice(8,-1)}var Ee=function(e,t){return"Array"===t?""+e.map((function(e){return Ee(e,_e(e))})):"ArrayBuffer"===t?""+new Uint8Array(e):"Date"===t?e.getTime():ArrayBuffer.isView(e)?""+new Uint8Array(e.buffer):e};function we(e,t,r,n){return r=r||{},n=n||"",K(e).forEach((function(i){if(J(t,i)){var o=e[i],a=t[i];if("object"==typeof o&&"object"==typeof a&&o&&a){var s=_e(o),c=_e(a);s===c?Ae[s]?Ee(o,s)!==Ee(a,c)&&(r[n+i]=t[i]):we(o,a,r,n+i+"."):r[n+i]=t[i]}else o!==a&&(r[n+i]=t[i])}else r[n+i]=void 0})),K(t).forEach((function(i){J(e,i)||(r[n+i]=t[i])})),r}var Ie="undefined"!=typeof Symbol&&Symbol.iterator,Se=Ie?function(e){var t;return null!=e&&(t=e[Ie])&&t.apply(e)}:function(){return null},Te={};function Ce(e){var t,r,n,i;if(1===arguments.length){if(H(e))return e.slice();if(this===Te&&"string"==typeof e)return[e];if(i=Se(e)){for(r=[];!(n=i.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=new Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return r}var Re="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},ke="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Oe(e,t){ke=e,Ne=t}var Ne=function(){return!0},xe=!new Error("").stack;function De(){if(xe)try{throw new Error}catch(e){return e}return new Error}function Le(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(Ne).map((function(e){return"\n"+e})).join("")):""}var Pe=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Me=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Pe),Be={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed"};function je(e,t){this._e=De(),this.name=e,this.message=t}function Ue(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,r){return r.indexOf(e)===t})).join("\n")}function Fe(e,t,r,n){this._e=De(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=Ue(e,t)}function Ge(e,t){this._e=De(),this.name="BulkError",this.failures=t,this.message=Ue(e,t)}te(je).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Le(this._e,2))}},toString:function(){return this.name+": "+this.message}}),te(Fe).from(je),te(Ge).from(je);var Qe=Me.reduce((function(e,t){return e[t]=t+"Error",e}),{}),qe=je,Ve=Me.reduce((function(e,t){var r=t+"Error";function n(e,n){this._e=De(),this.name=r,e?"string"==typeof e?(this.message=e+(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message=e.name+" "+e.message,this.inner=e):(this.message=Be[t]||r,this.inner=null)}return te(n).from(qe),e[t]=n,e}),{});Ve.Syntax=SyntaxError,Ve.Type=TypeError,Ve.Range=RangeError;var Ke=Pe.reduce((function(e,t){return e[t+"Error"]=Ve[t],e}),{});var He=Me.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Ve[t]),e}),{});function We(){}function ze(e){return e}function Ye(e,t){return null==e||e===ze?t:function(r){return t(e(r))}}function Xe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Je(e,t){return e===We?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?Xe(n,this.onsuccess):n),i&&(this.onerror=this.onerror?Xe(i,this.onerror):i),void 0!==o?o:r}}function Ze(e,t){return e===We?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?Xe(r,this.onsuccess):r),n&&(this.onerror=this.onerror?Xe(n,this.onerror):n)}}function $e(e,t){return e===We?t:function(r){var n=e.apply(this,arguments);z(r,n);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?Xe(i,this.onsuccess):i),o&&(this.onerror=this.onerror?Xe(o,this.onerror):o),void 0===n?void 0===a?void 0:a:z(n,a)}}function et(e,t){return e===We?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function tt(e,t){return e===We?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return r.then((function(){return t.apply(n,o)}))}return t.apply(this,arguments)}}He.ModifyError=Fe,He.DexieError=je,He.BulkError=Ge;var rt={},nt="undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,e.__proto__,e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,t.__proto__,e]}(),it=nt[0],ot=nt[1],at=nt[2],st=ot&&ot.then,ct=it&&it.constructor,ut=!!at,lt=!1,ht=at?function(){at.then(Lt)}:W.setImmediate?setImmediate.bind(null,Lt):W.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){Lt(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(Lt,0)},dt=function(e,t){_t.push([e,t]),pt&&(ht(),pt=!1)},ft=!0,pt=!0,gt=[],vt=[],mt=null,At=ze,yt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:or,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{or(e[0],e[1])}catch(e){}}))}},bt=yt,_t=[],Et=0,wt=[];function It(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=We,this._lib=!1;var t=this._PSD=bt;if(ke&&(this._stackHolder=De(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==rt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Rt(this,this._value))}this._state=null,this._value=null,++t.ref,Ct(this,e)}var St={get:function(){var e=bt,t=Vt;function r(r,n){var i=this,o=!e.global&&(e!==bt||t!==Vt),a=o&&!zt(),s=new It((function(t,s){Ot(i,new Tt(rr(r,e,o,a),rr(n,e,o,a),t,s,e))}));return ke&&Dt(s,this),s}return r.prototype=rt,r},set:function(e){ee(this,"then",e&&e.prototype===rt?St:{get:function(){return e},set:St.set})}};function Tt(e,t,r,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=i}function Ct(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&Pt();t&&"function"==typeof t.then?Ct(e,(function(e,r){t instanceof It?t._then(e,r):t.then(e,r)})):(e._state=!0,e._value=t,kt(e)),r&&Mt()}}),Rt.bind(null,e))}catch(t){Rt(e,t)}}function Rt(e,t){if(vt.push(t),null===e._state){var r=e._lib&&Pt();t=At(t),e._state=!1,e._value=t,ke&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,r){try{e.apply(null,r)}catch(e){t&&t(e)}}((function(){var r=ne(t,"stack");t._promise=e,ee(t,"stack",{get:function(){return lt?r&&(r.get?r.get.apply(t):r.value):e.stack}})})),function(e){gt.some((function(t){return t._value===e._value}))||gt.push(e)}(e),kt(e),r&&Mt()}}function kt(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)Ot(e,t[r]);var i=e._PSD;--i.ref||i.finalize(),0===Et&&(++Et,dt((function(){0==--Et&&Bt()}),[]))}function Ot(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Et,dt(Nt,[r,e,t])}else e._listeners.push(t)}function Nt(e,t,r){try{mt=t;var n,i=t._value;t._state?n=e(i):(vt.length&&(vt=[]),n=e(i),-1===vt.indexOf(i)&&function(e){var t=gt.length;for(;t;)if(gt[--t]._value===e._value)return void gt.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{mt=null,0==--Et&&Bt(),--r.psd.ref||r.psd.finalize()}}function xt(e,t,r){if(t.length===r)return t;var n="";if(!1===e._state){var i,o,a=e._value;null!=a?(i=a.name||"Error",o=a.message||a,n=Le(a,0)):(i=a,o=""),t.push(i+(o?": "+o:"")+n)}return ke&&((n=Le(e._stackHolder,2))&&-1===t.indexOf(n)&&t.push(n),e._prev&&xt(e._prev,t,r)),t}function Dt(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function Lt(){Pt()&&Mt()}function Pt(){var e=ft;return ft=!1,pt=!1,e}function Mt(){var e,t,r;do{for(;_t.length>0;)for(e=_t,_t=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}}while(_t.length>0);ft=!0,pt=!0}function Bt(){var e=gt;gt=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=wt.slice(0),r=t.length;r;)t[--r]()}function jt(e){return new It(rt,!1,e)}function Ut(e,t){var r=bt;return function(){var n=Pt(),i=bt;try{return Zt(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{Zt(i,!1),n&&Mt()}}}Z(It.prototype,{then:St,_then:function(e,t){Ot(this,new Tt(null,null,e,t,bt))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,(function(e){return e instanceof t?r(e):jt(e)})):this.then(null,(function(e){return e&&e.name===t?r(e):jt(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),jt(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{lt=!0;var e=xt(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{lt=!1}}},timeout:function(e,t){var r=this;return e<1/0?new It((function(n,i){var o=setTimeout((function(){return i(new Ve.Timeout(t))}),e);r.then(n,i).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&ee(It.prototype,Symbol.toStringTag,"Dexie.Promise"),yt.env=$t(),Z(It,{all:function(){var e=Ce.apply(null,arguments).map(Yt);return new It((function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((function(i,o){return It.resolve(i).then((function(r){e[o]=r,--n||t(e)}),r)}))}))},resolve:function(e){if(e instanceof It)return e;if(e&&"function"==typeof e.then)return new It((function(t,r){e.then(t,r)}));var t=new It(rt,!0,e);return Dt(t,mt),t},reject:jt,race:function(){var e=Ce.apply(null,arguments).map(Yt);return new It((function(t,r){e.map((function(e){return It.resolve(e).then(t,r)}))}))},PSD:{get:function(){return bt},set:function(e){return bt=e}},totalEchoes:{get:function(){return Vt}},newPSD:Ht,usePSD:er,scheduler:{get:function(){return dt},set:function(e){dt=e}},rejectionMapper:{get:function(){return At},set:function(e){At=e}},follow:function(e,t){return new It((function(r,n){return Ht((function(t,r){var n=bt;n.unhandleds=[],n.onunhandled=r,n.finalize=Xe((function(){var e=this;!function(e){function t(){e(),wt.splice(wt.indexOf(t),1)}wt.push(t),++Et,dt((function(){0==--Et&&Bt()}),[])}((function(){0===e.unhandleds.length?t():r(e.unhandleds[0])}))}),n.finalize),e()}),t,r,n)}))}}),ct&&(ct.allSettled&&ee(It,"allSettled",(function(){var e=Ce.apply(null,arguments).map(Yt);return new It((function(t){0===e.length&&t([]);var r=e.length,n=new Array(r);e.forEach((function(e,i){return It.resolve(e).then((function(e){return n[i]={status:"fulfilled",value:e}}),(function(e){return n[i]={status:"rejected",reason:e}})).then((function(){return--r||t(n)}))}))}))})),ct.any&&"undefined"!=typeof AggregateError&&ee(It,"any",(function(){var e=Ce.apply(null,arguments).map(Yt);return new It((function(t,r){0===e.length&&r(new AggregateError([]));var n=e.length,i=new Array(n);e.forEach((function(e,o){return It.resolve(e).then((function(e){return t(e)}),(function(e){i[o]=e,--n||r(new AggregateError(i))}))}))}))})));var Ft={awaits:0,echoes:0,id:0},Gt=0,Qt=[],qt=0,Vt=0,Kt=0;function Ht(e,t,r,n){var i=bt,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++Kt;var a=yt.env;o.env=ut?{Promise:It,PromiseProp:{value:It,configurable:!0,writable:!0},all:It.all,race:It.race,allSettled:It.allSettled,any:It.any,resolve:It.resolve,reject:It.reject,nthen:nr(a.nthen,o),gthen:nr(a.gthen,o)}:{},t&&z(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=er(o,e,r,n);return 0===o.ref&&o.finalize(),s}function Wt(){return Ft.id||(Ft.id=++Gt),++Ft.awaits,Ft.echoes+=100,Ft.id}function zt(){return!!Ft.awaits&&(0==--Ft.awaits&&(Ft.id=0),Ft.echoes=100*Ft.awaits,!0)}function Yt(e){return Ft.echoes&&e&&e.constructor===ct?(Wt(),e.then((function(e){return zt(),e}),(function(e){return zt(),ar(e)}))):e}function Xt(e){++Vt,Ft.echoes&&0!=--Ft.echoes||(Ft.echoes=Ft.id=0),Qt.push(bt),Zt(e,!0)}function Jt(){var e=Qt[Qt.length-1];Qt.pop(),Zt(e,!1)}function Zt(e,t){var r=bt;if((t?!Ft.echoes||qt++&&e===bt:!qt||--qt&&e===bt)||tr(t?Xt.bind(null,e):Jt),e!==bt&&(bt=e,r===yt&&(yt.env=$t()),ut)){var n=yt.env.Promise,i=e.env;ot.then=i.nthen,n.prototype.then=i.gthen,(r.global||e.global)&&(Object.defineProperty(W,"Promise",i.PromiseProp),n.all=i.all,n.race=i.race,n.resolve=i.resolve,n.reject=i.reject,i.allSettled&&(n.allSettled=i.allSettled),i.any&&(n.any=i.any))}}function $t(){var e=W.Promise;return ut?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(W,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:ot.then,gthen:e.prototype.then}:{}}function er(e,t,r,n,i){var o=bt;try{return Zt(e,!0),t(r,n,i)}finally{Zt(o,!1)}}function tr(e){st.call(it,e)}function rr(e,t,r,n){return"function"!=typeof e?e:function(){var i=bt;r&&Wt(),Zt(t,!0);try{return e.apply(this,arguments)}finally{Zt(i,!1),n&&tr(zt)}}}function nr(e,t){return function(r,n){return e.call(this,rr(r,t),rr(n,t))}}-1===(""+st).indexOf("[native code]")&&(Wt=zt=We);var ir="unhandledrejection";function or(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,i={promise:t,reason:e};if(W.document&&document.createEvent?((n=document.createEvent("Event")).initEvent(ir,!0,!0),z(n,i)):W.CustomEvent&&z(n=new CustomEvent(ir,{detail:i}),i),n&&W.dispatchEvent&&(dispatchEvent(n),!W.PromiseRejectionEvent&&W.onunhandledrejection))try{W.onunhandledrejection(n)}catch(e){}ke&&n&&!n.defaultPrevented&&console.warn("Unhandled rejection: "+(e.stack||e))}catch(e){}}var ar=It.reject;function sr(e,t,r,n){if(e._state.openComplete||bt.letThrough){var i=e._createTransaction(t,r,e._dbSchema);try{i.create()}catch(e){return ar(e)}return i._promise(t,(function(e,t){return Ht((function(){return bt.trans=i,n(e,t,i)}))})).then((function(e){return i._completion.then((function(){return e}))}))}if(!e._state.isBeingOpened){if(!e._options.autoOpen)return ar(new Ve.DatabaseClosed);e.open().catch(We)}return e._state.dbReadyPromise.then((function(){return sr(e,t,r,n)}))}var cr="3.0.3",ur=String.fromCharCode(65535),lr=-1/0,hr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",dr="String expected.",fr=[],pr="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),gr=pr,vr=pr,mr=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},Ar="__dbnames",yr="readonly",br="readwrite";function _r(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var Er={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function wr(e){return function(t){return void 0===le(t,e)&&de(t=ye(t),e),t}}var Ir=function(){function e(){}return e.prototype._trans=function(e,t,r){var n=this._tx||bt.trans,i=this.name;function o(e,r,n){if(!n.schema[i])throw new Ve.NotFound("Table "+i+" not part of transaction");return t(n.idbtrans,n)}var a=Pt();try{return n&&n.db===this.db?n===bt.trans?n._promise(e,o,r):Ht((function(){return n._promise(e,o,r)}),{trans:n,transless:bt.transless||bt}):sr(this.db,e,[this.name],o)}finally{a&&Mt()}},e.prototype.get=function(e,t){var r=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return r.core.get({trans:t,key:e}).then((function(e){return r.hook.reading.fire(e)}))})).then(t)},e.prototype.where=function(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(H(e))return new this.db.WhereClause(this,"["+e.join("+")+"]");var t=K(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&t.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return t.indexOf(e)>=0}))}))[0];if(r&&this.db._maxKey!==ur)return this.where(r.name).equals(r.keyPath.map((function(t){return e[t]})));!r&&ke&&console.warn("The query "+JSON.stringify(e)+" on "+this.name+" would benefit of a compound index ["+t.join("+")+"]");var n=this.schema.idxByName,i=this.db._deps.indexedDB;function o(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}}var a=t.reduce((function(t,r){var i=t[0],a=t[1],s=n[r],c=e[r];return[i||s,i||!s?_r(a,s&&s.multi?function(e){var t=le(e,r);return H(t)&&t.some((function(e){return o(c,e)}))}:function(e){return o(c,le(e,r))}):a]}),[null,null]),s=a[0],c=a[1];return s?this.where(s.name).equals(e[s.keyPath]).filter(c):r?this.filter(c):this.where(t).equals("")},e.prototype.filter=function(e){return this.toCollection().and(e)},e.prototype.count=function(e){return this.toCollection().count(e)},e.prototype.offset=function(e){return this.toCollection().offset(e)},e.prototype.limit=function(e){return this.toCollection().limit(e)},e.prototype.each=function(e){return this.toCollection().each(e)},e.prototype.toArray=function(e){return this.toCollection().toArray(e)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,H(e)?"["+e.join("+")+"]":e))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var r=Object.create(e.prototype);for(var n in t)if(J(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e},e.prototype.defineClass=function(){return this.mapToClass((function(e){z(this,e)}))},e.prototype.add=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=wr(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?It.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{he(e,o,t)}catch(e){}return t}))},e.prototype.update=function(e,t){if("object"!=typeof t||H(t))throw new Ve.InvalidArgument("Modifications must be an object.");if("object"!=typeof e||H(e))return this.where(":id").equals(e).modify(t);K(t).forEach((function(r){he(e,r,t[r])}));var r=le(e,this.schema.primKey.keyPath);return void 0===r?ar(new Ve.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(t)},e.prototype.put=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=wr(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?It.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{he(e,o,t)}catch(e){}return t}))},e.prototype.delete=function(e){var t=this;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?It.reject(e.failures[0]):void 0}))},e.prototype.clear=function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:Er})})).then((function(e){return e.numFailures?It.reject(e.failures[0]):void 0}))},e.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",(function(r){return t.core.getMany({keys:e,trans:r}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))},e.prototype.bulkAdd=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new Ve.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new Ve.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,u=s&&a?e.map(wr(s)):e;return n.core.mutate({trans:t,type:"add",keys:i,values:u,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new Ge(n.name+".bulkAdd(): "+t+" of "+c+" operations failed",Object.keys(a).map((function(e){return a[e]})))}))}))},e.prototype.bulkPut=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new Ve.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new Ve.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,u=s&&a?e.map(wr(s)):e;return n.core.mutate({trans:t,type:"put",keys:i,values:u,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new Ge(n.name+".bulkPut(): "+t+" of "+c+" operations failed",Object.keys(a).map((function(e){return a[e]})))}))}))},e.prototype.bulkDelete=function(e){var t=this,r=e.length;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:e})})).then((function(e){var n=e.numFailures,i=e.lastResult,o=e.failures;if(0===n)return i;throw new Ge(t.name+".bulkDelete(): "+n+" of "+r+" operations failed",o)}))},e}();function Sr(e){var t={},r=function(r,n){if(n){for(var i=arguments.length,o=new Array(i-1);--i;)o[i-1]=arguments[i];return t[r].subscribe.apply(null,o),e}if("string"==typeof r)return t[r]};r.addEventType=o;for(var n=1,i=arguments.length;n<i;++n)o(arguments[n]);return r;function o(e,n,i){if("object"==typeof e)return a(e);n||(n=et),i||(i=We);var o={subscribers:[],fire:i,subscribe:function(e){-1===o.subscribers.indexOf(e)&&(o.subscribers.push(e),o.fire=n(o.fire,e))},unsubscribe:function(e){o.subscribers=o.subscribers.filter((function(t){return t!==e})),o.fire=o.subscribers.reduce(n,i)}};return t[e]=r[e]=o,o}function a(e){K(e).forEach((function(t){var r=e[t];if(H(r))o(t,e[t][0],e[t][1]);else{if("asap"!==r)throw new Ve.InvalidArgument("Invalid event config");var n=o(t,ze,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach((function(e){ce((function(){e.apply(null,t)}))}))}))}}))}}function Tr(e,t){return te(t).from({prototype:e}),t}function Cr(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Rr(e,t){e.filter=_r(e.filter,t)}function kr(e,t,r){var n=e.replayFilter;e.replayFilter=n?function(){return _r(n(),t())}:t,e.justLimit=r&&!n}function Or(e,t){if(e.isPrimKey)return t.primaryKey;var r=t.getIndexByKeyPath(e.index);if(!r)throw new Ve.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function Nr(e,t,r){var n=Or(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function xr(e,t,r,n){var i=e.replayFilter?_r(e.filter,e.replayFilter()):e.filter;if(e.or){var o={},a=function(e,r,n){if(!i||i(r,n,(function(e){return r.stop(e)}),(function(e){return r.fail(e)}))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),J(o,s)||(o[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),Dr(Nr(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Dr(Nr(e,n,r),_r(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function Dr(e,t,r,n){var i=Ut(n?function(e,t,i){return r(n(e),t,i)}:r);return e.then((function(e){if(e)return e.start((function(){var r=function(){return e.continue()};t&&!t(e,(function(e){return r=e}),(function(t){e.stop(t),r=We}),(function(t){e.fail(t),r=We}))||i(e.value,e,(function(e){return r=e})),r()}))}))}var Lr=function(){function e(){}return e.prototype._read=function(e,t){var r=this._ctx;return r.error?r.table._trans(null,ar.bind(null,r.error)):r.table._trans("readonly",e).then(t)},e.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,ar.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},e.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=_r(t.algorithm,e)},e.prototype._iterate=function(e,t){return xr(this._ctx,e,t,this._ctx.table.core)},e.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&z(r,e),t._ctx=r,t},e.prototype.raw=function(){return this._ctx.valueMapper=null,this},e.prototype.each=function(e){var t=this._ctx;return this._read((function(r){return xr(t,e,r,t.table.core)}))},e.prototype.count=function(e){var t=this;return this._read((function(e){var r=t._ctx,n=r.table.core;if(Cr(r,!0))return n.count({trans:e,query:{index:Or(r,n.schema),range:r.range}}).then((function(e){return Math.min(e,r.limit)}));var i=0;return xr(r,(function(){return++i,!1}),e,n).then((function(){return i}))})).then(e)},e.prototype.sortBy=function(e,t){var r=e.split(".").reverse(),n=r[0],i=r.length-1;function o(e,t){return t?o(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=o(e,i),n=o(t,i);return r<n?-a:r>n?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)},e.prototype.toArray=function(e){var t=this;return this._read((function(e){var r=t._ctx;if("next"===r.dir&&Cr(r,!0)&&r.limit>0){var n=r.valueMapper,i=Or(r,r.table.core.schema);return r.table.core.query({trans:e,limit:r.limit,values:!0,query:{index:i,range:r.range}}).then((function(e){var t=e.result;return n?t.map(n):t}))}var o=[];return xr(r,(function(e){return o.push(e)}),e,r.table.core).then((function(){return o}))}),e)},e.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,Cr(t)?kr(t,(function(){var t=e;return function(e,r){return 0===t||(1===t?(--t,!1):(r((function(){e.advance(t),t=0})),!1))}})):kr(t,(function(){var t=e;return function(){return--t<0}}))),this},e.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),kr(this._ctx,(function(){var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}}),!0),this},e.prototype.until=function(e,t){return Rr(this._ctx,(function(r,n,i){return!e(r.value)||(n(i),t)})),this},e.prototype.first=function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)},e.prototype.last=function(e){return this.reverse().first(e)},e.prototype.filter=function(e){var t,r;return Rr(this._ctx,(function(t){return e(t.value)})),t=this._ctx,r=e,t.isMatch=_r(t.isMatch,r),this},e.prototype.and=function(e){return this.filter(e)},e.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},e.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.key,r)}))},e.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},e.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.primaryKey,r)}))},e.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.key)})).then((function(){return r})).then(e)},e.prototype.primaryKeys=function(e){var t=this._ctx;if("next"===t.dir&&Cr(t,!0)&&t.limit>0)return this._read((function(e){var r=Or(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.primaryKey)})).then((function(){return r})).then(e)},e.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},e.prototype.firstKey=function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)},e.prototype.lastKey=function(e){return this.reverse().firstKey(e)},e.prototype.distinct=function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return Rr(this._ctx,(function(e){var t=e.primaryKey.toString(),n=J(r,t);return r[t]=!0,!n})),this},e.prototype.modify=function(e){var t=this,r=this._ctx;return this._write((function(n){var i;if("function"==typeof e)i=e;else{var o=K(e),a=o.length;i=function(t){for(var r=!1,n=0;n<a;++n){var i=o[n],s=e[i];le(t,i)!==s&&(he(t,i,s),r=!0)}return r}}var s=r.table.core,c=s.schema.primaryKey,u=c.outbound,l=c.extractKey,h="testmode"in Tn?1:2e3,d=t.db.core.cmp,f=[],p=0,g=[],v=function(e,t){var r=t.failures,n=t.numFailures;p+=e-n;for(var i=0,o=K(r);i<o.length;i++){var a=o[i];f.push(r[a])}};return t.clone().primaryKeys().then((function(e){var t=function(r){var o=Math.min(h,e.length-r);return s.getMany({trans:n,keys:e.slice(r,r+o)}).then((function(a){for(var c=[],f=[],p=u?[]:null,g=[],m=0;m<o;++m){var A=a[m],y={value:ye(A),primKey:e[r+m]};!1!==i.call(y,y.value,y)&&(null==y.value?g.push(e[r+m]):u||0===d(l(A),l(y.value))?(f.push(y.value),u&&p.push(e[r+m])):(g.push(e[r+m]),c.push(y.value)))}return Promise.resolve(c.length>0&&s.mutate({trans:n,type:"add",values:c}).then((function(e){for(var t in e.failures)g.splice(parseInt(t),1);v(c.length,e)}))).then((function(e){return f.length>0&&s.mutate({trans:n,type:"put",keys:p,values:f}).then((function(e){return v(f.length,e)}))})).then((function(){return g.length>0&&s.mutate({trans:n,type:"delete",keys:g}).then((function(e){return v(g.length,e)}))})).then((function(){return e.length>r+o&&t(r+h)}))}))};return t(0).then((function(){if(f.length>0)throw new Fe("Error modifying one or more objects",f,p,g);return e.length}))}))}))},e.prototype.delete=function(){var e=this._ctx,t=e.range;return Cr(e)&&(e.isPrimKey&&!vr||3===t.type)?this._write((function(r){var n=e.table.core.schema.primaryKey,i=t;return e.table.core.count({trans:r,query:{index:n,range:i}}).then((function(t){return e.table.core.mutate({trans:r,type:"deleteRange",range:i}).then((function(e){var r=e.failures,n=(e.lastResult,e.results,e.numFailures);if(n)throw new Fe("Could not delete some values",Object.keys(r).map((function(e){return r[e]})),t-n);return t-n}))}))})):this.modify((function(e,t){return t.value=null}))},e}();function Pr(e,t){return e<t?-1:e===t?0:1}function Mr(e,t){return e>t?-1:e===t?0:1}function Br(e,t,r){var n=e instanceof qr?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function jr(e){return new e.Collection(e,(function(){return Qr("")})).limit(0)}function Ur(e,t,r,n,i,o){for(var a=Math.min(e.length,n.length),s=-1,c=0;c<a;++c){var u=t[c];if(u!==n[c])return i(e[c],r[c])<0?e.substr(0,c)+r[c]+r.substr(c+1):i(e[c],n[c])<0?e.substr(0,c)+n[c]+r.substr(c+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;i(e[c],u)<0&&(s=c)}return a<n.length&&"next"===o?e+r.substr(e.length):a<e.length&&"prev"===o?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}function Fr(e,t,r,n){var i,o,a,s,c,u,l,h=r.length;if(!r.every((function(e){return"string"==typeof e})))return Br(e,dr);function d(e){i=function(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}(e),o=function(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}(e),a="next"===e?Pr:Mr;var t=r.map((function(e){return{lower:o(e),upper:i(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),u=e,l="next"===e?"":n}d("next");var f=new e.Collection(e,(function(){return Gr(s[0],c[h-1]+n)}));f._ondirectionchange=function(e){d(e)};var p=0;return f._addAlgorithm((function(e,r,n){var i=e.key;if("string"!=typeof i)return!1;var d=o(i);if(t(d,c,p))return!0;for(var f=null,g=p;g<h;++g){var v=Ur(i,d,s[g],c[g],a,u);null===v&&null===f?p=g+1:(null===f||a(f,v)>0)&&(f=v)}return r(null!==f?function(){e.continue(f+l)}:n),!1})),f}function Gr(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function Qr(e){return{type:1,lower:e,upper:e}}var qr=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!0,configurable:!0}),e.prototype.between=function(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?jr(this):new this.Collection(this,(function(){return Gr(e,t,!r,!n)}))}catch(e){return Br(this,hr)}},e.prototype.equals=function(e){return null==e?Br(this,hr):new this.Collection(this,(function(){return Qr(e)}))},e.prototype.above=function(e){return null==e?Br(this,hr):new this.Collection(this,(function(){return Gr(e,void 0,!0)}))},e.prototype.aboveOrEqual=function(e){return null==e?Br(this,hr):new this.Collection(this,(function(){return Gr(e,void 0,!1)}))},e.prototype.below=function(e){return null==e?Br(this,hr):new this.Collection(this,(function(){return Gr(void 0,e,!1,!0)}))},e.prototype.belowOrEqual=function(e){return null==e?Br(this,hr):new this.Collection(this,(function(){return Gr(void 0,e)}))},e.prototype.startsWith=function(e){return"string"!=typeof e?Br(this,dr):this.between(e,e+ur,!0,!0)},e.prototype.startsWithIgnoreCase=function(e){return""===e?this.startsWith(e):Fr(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],ur)},e.prototype.equalsIgnoreCase=function(e){return Fr(this,(function(e,t){return e===t[0]}),[e],"")},e.prototype.anyOfIgnoreCase=function(){var e=Ce.apply(Te,arguments);return 0===e.length?jr(this):Fr(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var e=Ce.apply(Te,arguments);return 0===e.length?jr(this):Fr(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,ur)},e.prototype.anyOf=function(){var e=this,t=Ce.apply(Te,arguments),r=this._cmp;try{t.sort(r)}catch(e){return Br(this,hr)}if(0===t.length)return jr(this);var n=new this.Collection(this,(function(){return Gr(t[0],t[t.length-1])}));n._ondirectionchange=function(n){r="next"===n?e._ascending:e._descending,t.sort(r)};var i=0;return n._addAlgorithm((function(e,n,o){for(var a=e.key;r(a,t[i])>0;)if(++i===t.length)return n(o),!1;return 0===r(a,t[i])||(n((function(){e.continue(t[i])})),!1)})),n},e.prototype.notEqual=function(e){return this.inAnyRange([[lr,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var e=Ce.apply(Te,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Br(this,hr)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[lr,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(e,t){var r=this,n=this._cmp,i=this._ascending,o=this._descending,a=this._min,s=this._max;if(0===e.length)return jr(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return Br(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Ve.InvalidArgument);var c=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;var l,h=i;function d(e,t){return h(e[0],t[0])}try{l=e.reduce((function(e,t){for(var r=0,i=e.length;r<i;++r){var o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=a(o[0],t[0]),o[1]=s(o[1],t[1]);break}}return r===i&&e.push(t),e}),[]),l.sort(d)}catch(e){return Br(this,hr)}var f=0,p=u?function(e){return i(e,l[f][1])>0}:function(e){return i(e,l[f][1])>=0},g=c?function(e){return o(e,l[f][0])>0}:function(e){return o(e,l[f][0])>=0};var v=p,m=new this.Collection(this,(function(){return Gr(l[0][0],l[l.length-1][1],!c,!u)}));return m._ondirectionchange=function(e){"next"===e?(v=p,h=i):(v=g,h=o),l.sort(d)},m._addAlgorithm((function(e,t,n){for(var o=e.key;v(o);)if(++f===l.length)return t(n),!1;return!!function(e){return!p(e)&&!g(e)}(o)||(0===r._cmp(o,l[f][1])||0===r._cmp(o,l[f][0])||t((function(){h===i?e.continue(l[f][0]):e.continue(l[f][1])})),!1)})),m},e.prototype.startsWithAnyOf=function(){var e=Ce.apply(Te,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?jr(this):this.inAnyRange(e.map((function(e){return[e,e+ur]}))):Br(this,"startsWithAnyOf() only works with strings")},e}();function Vr(e){return 1===e.length?e[0]:e}function Kr(e){try{return e.only([[]]),[[]]}catch(e){return ur}}function Hr(e){return Ut((function(t){return Wr(t),e(t.target.error),!1}))}function Wr(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var zr=function(){function e(){}return e.prototype._lock=function(){return se(!bt.global),++this._reculock,1!==this._reculock||bt.global||(bt.lockOwnerFor=this),this},e.prototype._unlock=function(){if(se(!bt.global),0==--this._reculock)for(bt.global||(bt.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{er(e[1],e[0])}catch(e){}}return this},e.prototype._locked=function(){return this._reculock&&bt.lockOwnerFor!==this},e.prototype.create=function(e){var t=this;if(!this.mode)return this;var r=this.db.idbdb,n=this.db._state.dbOpenError;if(se(!this.idbtrans),!e&&!r)switch(n&&n.name){case"DatabaseClosedError":throw new Ve.DatabaseClosed(n);case"MissingAPIError":throw new Ve.MissingAPI(n.message,n);default:throw new Ve.OpenFailed(n)}if(!this.active)throw new Ve.TransactionInactive;return se(null===this._completion._state),(e=this.idbtrans=e||r.transaction(Vr(this.storeNames),this.mode)).onerror=Ut((function(r){Wr(r),t._reject(e.error)})),e.onabort=Ut((function(r){Wr(r),t.active&&t._reject(new Ve.Abort(e.error)),t.active=!1,t.on("abort").fire(r)})),e.oncomplete=Ut((function(){t.active=!1,t._resolve()})),this},e.prototype._promise=function(e,t,r){var n=this;if("readwrite"===e&&"readwrite"!==this.mode)return ar(new Ve.ReadOnly("Transaction is readonly"));if(!this.active)return ar(new Ve.TransactionInactive);if(this._locked())return new It((function(i,o){n._blockedFuncs.push([function(){n._promise(e,t,r).then(i,o)},bt])}));if(r)return Ht((function(){var e=new It((function(e,r){n._lock();var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return e.finally((function(){return n._unlock()})),e._lib=!0,e}));var i=new It((function(e,r){var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return i._lib=!0,i},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(e){var t=this._root(),r=It.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return r}));else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new It((function(e,n){r.then((function(r){return t._waitingQueue.push(Ut(e.bind(null,r)))}),(function(e){return t._waitingQueue.push(Ut(n.bind(null,e)))})).finally((function(){t._waitingFor===i&&(t._waitingFor=null)}))}))},e.prototype.abort=function(){this.active&&this._reject(new Ve.Abort),this.active=!1},e.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(J(t,e))return t[e];var r=this.schema[e];if(!r)throw new Ve.NotFound("Table "+e+" not part of transaction");var n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n},e}();function Yr(e,t,r,n,i,o,a){return{name:e,keyPath:t,unique:r,multi:n,auto:i,compound:o,src:(r&&!a?"&":"")+(n?"*":"")+(i?"++":"")+Xr(t)}}function Xr(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function Jr(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:ue(r,(function(e){return[e.name,e]}))}}function Zr(e){return null==e?function(){}:"string"==typeof e?function(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return le(t,e)}}(e):function(t){return le(t,e)}}function $r(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}function en(e){return[].slice.call(e)}var tn=0;function rn(e){return null==e?":id":"string"==typeof e?e:"["+e.join("+")+"]"}function nn(e,t,r,n){var i=t.cmp.bind(t);function o(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var t=e.lower,n=e.upper,i=e.lowerOpen,o=e.upperOpen;return void 0===t?void 0===n?null:r.upperBound(n,!!o):void 0===n?r.lowerBound(t,!!i):r.bound(t,n,!!i,!!o)}var a=function(e,t){var r=en(e.objectStoreNames);return{schema:{name:e.name,tables:r.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,r=e.autoIncrement,n=H(t),i=null==t,o={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:Zr(t)},indexes:en(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,r=e.unique,n=e.multiEntry,i=e.keyPath,a={name:t,compound:H(i),keyPath:i,unique:r,multiEntry:n,extractKey:Zr(i)};return o[rn(i)]=a,a})),getIndexByKeyPath:function(e){return o[rn(e)]}};return o[":id"]=a.primaryKey,null!=t&&(o[rn(t)]=a.primaryKey),a}))},hasGetAll:r.length>0&&"getAll"in t.objectStore(r[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),s=a.schema,c=a.hasGetAll,u=s.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(r){var n=r.trans,i=r.type,a=r.keys,s=r.values,c=r.range,u=r.wantResults;return new Promise((function(r,l){r=Ut(r);var h=n.objectStore(t),d=null==h.keyPath,f="put"===i||"add"===i;if(!f&&"delete"!==i&&"deleteRange"!==i)throw new Error("Invalid operation type: "+i);var p=(a||s||{length:1}).length;if(a&&s&&a.length!==s.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return r({numFailures:0,failures:{},results:[],lastResult:void 0});var g,v=u&&V(a||$r(e.primaryKey,{type:i,keys:a,values:s})),m=[],A=0,y=function(e){++A,Wr(e),v&&(v[e.target._reqno]=void 0),m[e.target._reqno]=e.target.error},b=function(e){var t=e.target;v[t._reqno]=t.result};if("deleteRange"===i){if(4===c.type)return r({numFailures:A,failures:m,results:v,lastResult:void 0});g=3===c.type?h.clear():h.delete(o(c))}else{var _=f?d?[s,a]:[s,null]:[a,null],E=_[0],w=_[1];if(f)for(var I=0;I<p;++I)(g=w&&void 0!==w[I]?h[i](E[I],w[I]):h[i](E[I]))._reqno=I,v&&void 0===v[I]&&(g.onsuccess=b),g.onerror=y;else for(I=0;I<p;++I)(g=h[i](E[I]))._reqno=I,g.onerror=y}var S=function(e){var t=e.target.result;v&&(v[p-1]=t),r({numFailures:A,failures:m,results:v,lastResult:t})};g.onerror=function(e){y(e),S(e)},g.onsuccess=S}))},getMany:function(e){var r=e.trans,n=e.keys;return new Promise((function(e,i){e=Ut(e);for(var o,a=r.objectStore(t),s=n.length,c=new Array(s),u=0,l=0,h=function(t){var r=t.target;c[r._pos]=r.result,++l===u&&e(c)},d=Hr(i),f=0;f<s;++f)null!=n[f]&&((o=a.get(n[f]))._pos=f,o.onsuccess=h,o.onerror=d,++u);0===u&&e(c)}))},get:function(e){var r=e.trans,n=e.key;return new Promise((function(e,i){e=Ut(e);var o=r.objectStore(t).get(n);o.onsuccess=function(t){return e(t.target.result)},o.onerror=Hr(i)}))},query:function(e){return function(r){return new Promise((function(n,i){n=Ut(n);var a=r.trans,s=r.values,c=r.limit,u=r.query,l=c===1/0?void 0:c,h=u.index,d=u.range,f=a.objectStore(t),p=h.isPrimaryKey?f:f.index(h.name),g=o(d);if(0===c)return n({result:[]});if(e){var v=s?p.getAll(g,l):p.getAllKeys(g,l);v.onsuccess=function(e){return n({result:e.target.result})},v.onerror=Hr(i)}else{var m=0,A=s||!("openKeyCursor"in p)?p.openCursor(g):p.openKeyCursor(g),y=[];A.onsuccess=function(e){var t=A.result;return t?(y.push(s?t.value:t.primaryKey),++m===c?n({result:y}):void t.continue()):n({result:y})},A.onerror=Hr(i)}}))}}(c),openCursor:function(e){var r=e.trans,n=e.values,i=e.query,a=e.reverse,s=e.unique;return new Promise((function(e,c){e=Ut(e);var u=i.index,l=i.range,h=r.objectStore(t),d=u.isPrimaryKey?h:h.index(u.name),f=a?s?"prevunique":"prev":s?"nextunique":"next",p=n||!("openKeyCursor"in d)?d.openCursor(o(l),f):d.openKeyCursor(o(l),f);p.onerror=Hr(c),p.onsuccess=Ut((function(t){var n=p.result;if(n){n.___id=++tn,n.done=!1;var i=n.continue.bind(n),o=n.continuePrimaryKey;o&&(o=o.bind(n));var a=n.advance.bind(n),s=function(){throw new Error("Cursor not stopped")};n.trans=r,n.stop=n.continue=n.continuePrimaryKey=n.advance=function(){throw new Error("Cursor not started")},n.fail=Ut(c),n.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},n.start=function(e){var t=new Promise((function(e,t){e=Ut(e),p.onerror=Hr(t),n.fail=t,n.stop=function(t){n.stop=n.continue=n.continuePrimaryKey=n.advance=s,e(t)}})),r=function(){if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=function(){throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=Ut((function(e){p.onsuccess=r,r()})),n.continue=i,n.continuePrimaryKey=o,n.advance=a,r(),t},e(n)}else e(null)}),c)}))},count:function(e){var r=e.query,n=e.trans,i=r.index,a=r.range;return new Promise((function(e,r){var s=n.objectStore(t),c=i.isPrimaryKey?s:s.index(i.name),u=o(a),l=u?c.count(u):c.count();l.onsuccess=Ut((function(t){return e(t.target.result)})),l.onerror=Hr(r)}))}}}(e)})),l={};return u.forEach((function(e){return l[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!l[e])throw new Error("Table '"+e+"' not found");return l[e]},cmp:i,MIN_KEY:-1/0,MAX_KEY:Kr(r),schema:s}}function on(e,t,r,n){var i=r.IDBKeyRange,o=function(e,t){return t.reduce((function(e,t){var r=t.create;return q(q({},e),r(e))}),e)}(nn(t,r.indexedDB,i,n),e.dbcore);return{dbcore:o}}function an(e,t){var r=t.db,n=on(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach((function(t){var r=t.name;e.core.schema.tables.some((function(e){return e.name===r}))&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))}))}function sn(e,t,r,n){r.forEach((function(r){var i=n[r];t.forEach((function(t){var n=ne(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?ee(t,r,{get:function(){return this.table(r)},set:function(e){$(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,i))}))}))}function cn(e,t){t.forEach((function(t){for(var r in t)t[r]instanceof e.Table&&delete t[r]}))}function un(e,t){return e._cfg.version-t._cfg.version}function ln(e,t,r,n){var i=e._dbSchema,o=e._createTransaction("readwrite",e._storeNames,i);o.create(r),o._completion.catch(n);var a=o._reject.bind(o),s=bt.transless||bt;Ht((function(){bt.trans=o,bt.transless=s,0===t?(K(i).forEach((function(e){dn(r,e,i[e].primKey,i[e].indexes)})),an(e,r),It.follow((function(){return e.on.populate.fire(o)})).catch(a)):function(e,t,r,n){var i=[],o=e._versions,a=e._dbSchema=pn(e,e.idbdb,n),s=!1;function c(){return i.length?It.resolve(i.shift()(r.idbtrans)).then(c):It.resolve()}return o.filter((function(e){return e._cfg.version>=t})).forEach((function(o){i.push((function(){var i=a,c=o._cfg.dbschema;gn(e,i,n),gn(e,c,n),a=e._dbSchema=c;var u=hn(i,c);u.add.forEach((function(e){dn(n,e[0],e[1].primKey,e[1].indexes)})),u.change.forEach((function(e){if(e.recreate)throw new Ve.Upgrade("Not yet support for changing primary key");var t=n.objectStore(e.name);e.add.forEach((function(e){return fn(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),fn(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var l=o._cfg.contentUpgrade;if(l&&o._cfg.version>t){an(e,n),r._memoizedTables={},s=!0;var h=fe(c);u.del.forEach((function(e){h[e]=i[e]})),cn(e,[e.Transaction.prototype]),sn(e,[e.Transaction.prototype],K(h),h),r.schema=h;var d,f=Re(l);f&&Wt();var p=It.follow((function(){if((d=l(r))&&f){var e=zt.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?It.resolve(d):p.then((function(){return d}))}})),i.push((function(t){s&&gr||function(e,t){for(var r=0;r<t.db.objectStoreNames.length;++r){var n=t.db.objectStoreNames[r];null==e[n]&&t.db.deleteObjectStore(n)}}(o._cfg.dbschema,t);cn(e,[e.Transaction.prototype]),sn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema}))})),c().then((function(){var e,t;t=n,K(e=a).forEach((function(r){t.db.objectStoreNames.contains(r)||dn(t,r,e[r].primKey,e[r].indexes)}))}))}(e,t,o,r).catch(a)}))}function hn(e,t){var r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],o=t[r];if(i){var a={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto&&!pr)a.recreate=!0,n.change.push(a);else{var s=i.idxByName,c=o.idxByName,u=void 0;for(u in s)c[u]||a.del.push(u);for(u in c){var l=s[u],h=c[u];l?l.src!==h.src&&a.change.push(h):a.add.push(h)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}else n.add.push([r,o])}return n}function dn(e,t,r,n){var i=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach((function(e){return fn(i,e)})),i}function fn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function pn(e,t,r){var n={};return oe(t.objectStoreNames,0).forEach((function(e){for(var t=r.objectStore(e),i=t.keyPath,o=Yr(Xr(i),i||"",!1,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),a=[],s=0;s<t.indexNames.length;++s){var c=t.index(t.indexNames[s]);i=c.keyPath;var u=Yr(c.name,i,!!c.unique,!!c.multiEntry,!1,i&&"string"!=typeof i,!1);a.push(u)}n[e]=Jr(e,o,a)})),n}function gn(e,t,r){for(var n=r.db.objectStoreNames,i=0;i<n.length;++i){var o=n[i],a=r.objectStore(o);e._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var c=a.indexNames[s],u=a.index(c).keyPath,l="string"==typeof u?u:"["+oe(u).join("+")+"]";if(t[o]){var h=t[o].idxByName[l];h&&(h.name=c,delete t[o].idxByName[l],t[o].idxByName[c]=h)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&W.WorkerGlobalScope&&W instanceof W.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}var vn,mn=function(){function e(){}return e.prototype._parseStoresSpec=function(e,t){K(e).forEach((function(r){if(null!==e[r]){var n=e[r].split(",").map((function(e,t){var r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return Yr(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),H(n),0===t)})),i=n.shift();if(i.multi)throw new Ve.Schema("Primary key cannot be multi-valued");n.forEach((function(e){if(e.auto)throw new Ve.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Ve.Schema("Index must have a name and cannot be an empty string")})),t[r]=Jr(r,i,n)}}))},e.prototype.stores=function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?z(this._cfg.storesSource,e):e;var r=t._versions,n={},i={};return r.forEach((function(e){z(n,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(n,i)})),t._dbSchema=i,cn(t,[t._allTables,t,t.Transaction.prototype]),sn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],K(i),i),t._storeNames=K(i),this},e.prototype.upgrade=function(e){return this._cfg.contentUpgrade=e,this},e}();function An(e){return Ht((function(){return bt.letThrough=!0,e()}))}function yn(e){var t=e._state,r=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((function(){return t.dbOpenError?ar(t.dbOpenError):e}));ke&&(t.openCanceller._stackHolder=De()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var n=t.dbReadyResolve,i=null;return It.race([t.openCanceller,new It((function(n,o){if(!r)throw new Ve.MissingAPI("indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill.");var a=e.name,s=t.autoSchema?r.open(a):r.open(a,Math.round(10*e.verno));if(!s)throw new Ve.MissingAPI("IndexedDB API not available");s.onerror=Hr(o),s.onblocked=Ut(e._fireOnBlocked),s.onupgradeneeded=Ut((function(n){if(i=s.transaction,t.autoSchema&&!e._options.allowEmptyDB){s.onerror=Wr,i.abort(),s.result.close();var c=r.deleteDatabase(a);c.onsuccess=c.onerror=Ut((function(){o(new Ve.NoSuchDatabase("Database "+a+" doesnt exist"))}))}else{i.onerror=Hr(o);var u=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;e.idbdb=s.result,ln(e,u/10,i,o)}}),o),s.onsuccess=Ut((function(){i=null;var r=e.idbdb=s.result,o=oe(r.objectStoreNames);if(o.length>0)try{var c=r.transaction(Vr(o),"readonly");t.autoSchema?function(e,t,r){e.verno=t.version/10;var n=e._dbSchema=pn(0,t,r);e._storeNames=oe(t.objectStoreNames,0),sn(e,[e._allTables],K(n),n)}(e,r,c):(gn(e,e._dbSchema,c),function(e,t){var r=hn(pn(0,e.idbdb,t),e._dbSchema);return!(r.add.length||r.change.some((function(e){return e.add.length||e.change.length})))}(e,c)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),an(e,c)}catch(e){}fr.push(e),r.onversionchange=Ut((function(r){t.vcFired=!0,e.on("versionchange").fire(r)})),vn.add(a),n()}),o)}))]).then((function(){return t.onReadyBeingFired=[],It.resolve(An(e.on.ready.fire)).then((function e(){if(t.onReadyBeingFired.length>0){var r=t.onReadyBeingFired.reduce(tt,We);return t.onReadyBeingFired=[],It.resolve(An(r)).then(e)}}))})).finally((function(){t.onReadyBeingFired=null})).then((function(){return t.isBeingOpened=!1,e})).catch((function(r){try{i&&i.abort()}catch(e){}return t.isBeingOpened=!1,e.close(),t.dbOpenError=r,ar(t.dbOpenError)})).finally((function(){t.openComplete=!0,n()}))}function bn(e){var t=function(t){return e.next(t)},r=i(t),n=i((function(t){return e.throw(t)}));function i(e){return function(t){var i=e(t),o=i.value;return i.done?o:o&&"function"==typeof o.then?o.then(r,n):H(o)?Promise.all(o).then(r,n):r(o)}}return i(t)()}function _n(e,t,r){var n=arguments.length;if(n<2)throw new Ve.InvalidArgument("Too few arguments");for(var i=new Array(n-1);--n;)i[n-1]=arguments[n];r=i.pop();var o=ge(i);return[e,o,r]}function En(e,t,r,n,i){return It.resolve().then((function(){var o=bt.transless||bt,a=e._createTransaction(t,r,e._dbSchema,n),s={trans:a,transless:o};n?a.idbtrans=n.idbtrans:a.create();var c,u=Re(i);u&&Wt();var l=It.follow((function(){if(c=i.call(a,a))if(u){var e=zt.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=bn(c))}),s);return(c&&"function"==typeof c.then?It.resolve(c).then((function(e){return a.active?e:ar(new Ve.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(e){return n&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),ar(e)}))}))}function wn(e,t,r){for(var n=H(e)?e.slice():[e],i=0;i<r;++i)n.push(t);return n}var In={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return q(q({},e),{table:function(t){var r=e.table(t),n=r.schema,i={},o=[];function a(e,t,r){var n=rn(e),s=i[n]=i[n]||[],c=null==e?0:"string"==typeof e?1:e.length,u=t>0,l=q(q({},r),{isVirtual:u,isPrimaryKey:!u&&r.isPrimaryKey,keyTail:t,keyLength:c,extractKey:Zr(e),unique:!u&&r.unique});(s.push(l),l.isPrimaryKey||o.push(l),c>1)&&a(2===c?e[0]:e.slice(0,c-1),t+1,r);return s.sort((function(e,t){return e.keyTail-t.keyTail})),l}var s=a(n.primaryKey.keyPath,0,n.primaryKey);i[":id"]=[s];for(var c=0,u=n.indexes;c<u.length;c++){var l=u[c];a(l.keyPath,0,l)}function h(t){var r,n,i=t.query.index;return i.isVirtual?q(q({},t),{query:{index:i,range:(r=t.query.range,n=i.keyTail,{type:1===r.type?2:r.type,lower:wn(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:wn(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}):t}var d=q(q({},r),{schema:q(q({},n),{primaryKey:s,indexes:o,getIndexByKeyPath:function(e){var t=i[rn(e)];return t&&t[0]}}),count:function(e){return r.count(h(e))},query:function(e){return r.query(h(e))},openCursor:function(t){var n=t.query.index,i=n.keyTail,o=n.isVirtual,a=n.keyLength;if(!o)return r.openCursor(t);return r.openCursor(h(t)).then((function(r){return r&&function(r){var n=Object.create(r,{continue:{value:function(n){null!=n?r.continue(wn(n,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?r.continue(wn(r.key,t.reverse?e.MIN_KEY:e.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(t,n){r.continuePrimaryKey(wn(t,e.MAX_KEY,i),n)}},key:{get:function(){var e=r.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:function(){return r.value}}});return n}(r)}))}});return d}})}},Sn={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return q(q({},e),{table:function(t){var r=e.table(t),n=r.schema.primaryKey,i=q(q({},r),{mutate:function(e){var i=bt.trans,o=i.table(t).hook,a=o.deleting,s=o.creating,c=o.updating;switch(e.type){case"add":if(s.fire===We)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"put":if(s.fire===We&&c.fire===We)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"delete":if(a.fire===We)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"deleteRange":if(a.fire===We)break;return i._promise("readwrite",(function(){return function(e){return l(e.trans,e.range,1e4)}(e)}),!0)}return r.mutate(e);function u(e){var t=bt.trans,i=e.keys||$r(n,e);if(!i)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?q(q({},e),{keys:i,wantResults:!0}):q({},e)).type&&(e.values=V(e.values)),e.keys&&(e.keys=V(e.keys)),function(e,t,r){return"add"===t.type?Promise.resolve(new Array(t.values.length)):e.getMany({trans:t.trans,keys:r})}(r,e,i).then((function(o){var u=i.map((function(r,i){var u=o[i],l={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(l,r,u,t);else if("add"===e.type||void 0===u){var h=s.fire.call(l,r,e.values[i],t);null==r&&null!=h&&(r=h,e.keys[i]=r,n.outbound||he(e.values[i],n.keyPath,r))}else{var d=we(u,e.values[i]),f=c.fire.call(l,d,r,u,t);if(f){var p=e.values[i];Object.keys(f).forEach((function(e){J(p,e)?p[e]=f[e]:he(p,e,f[e])}))}}return l}));return r.mutate(e).then((function(t){for(var r=t.failures,n=t.results,a=t.numFailures,s=t.lastResult,c=0;c<i.length;++c){var l=n?n[c]:i[c],h=u[c];null==l?h.onerror&&h.onerror(r[c]):h.onsuccess&&h.onsuccess("put"===e.type&&o[c]?e.values[c]:l)}return{failures:r,results:n,numFailures:a,lastResult:s}})).catch((function(e){return u.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))}function l(e,t,i){return r.query({trans:e,values:!1,query:{index:n,range:t},limit:i}).then((function(r){var n=r.result;return u({type:"delete",keys:n,trans:e}).then((function(r){return r.numFailures>0?Promise.reject(r.failures[0]):n.length<i?{failures:[],numFailures:0,lastResult:void 0}:l(e,q(q({},t),{lower:n[n.length-1],lowerOpen:!0}),i)}))}))}}});return i}})}},Tn=function(){function e(t,r){var n=this;this._middlewares={},this.verno=0;var i=e.dependencies;this._options=r=q({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},r),this._deps={indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange};var o=r.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:We,dbReadyPromise:null,cancelOpen:We,openCanceller:null,autoSchema:!0};a.dbReadyPromise=new It((function(e){a.dbReadyResolve=e})),a.openCanceller=new It((function(e,t){a.cancelOpen=t})),this._state=a,this.name=t,this.on=Sr(this,"populate","blocked","versionchange",{ready:[tt,We]}),this.on.ready.subscribe=ae(this.on.ready.subscribe,(function(t){return function(r,i){e.vip((function(){var e=n._state;if(e.openComplete)e.dbOpenError||It.resolve().then(r),i&&t(r);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(r),i&&t(r);else{t(r);var o=n;i||t((function e(){o.on.ready.unsubscribe(r),o.on.ready.unsubscribe(e)}))}}))}})),this.Collection=function(e){return Tr(Lr.prototype,(function(t,r){this.db=e;var n=Er,i=null;if(r)try{n=r()}catch(e){i=e}var o=t._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:o.or,valueMapper:s!==ze?s:null}}))}(this),this.Table=function(e){return Tr(Ir.prototype,(function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:Sr(null,{creating:[Je,We],reading:[Ye,ze],updating:[$e,We],deleting:[Ze,We]})}))}(this),this.Transaction=function(e){return Tr(zr.prototype,(function(t,r,n,i){var o=this;this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.idbtrans=null,this.on=Sr(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new It((function(e,t){o._resolve=e,o._reject=t})),this._completion.then((function(){o.active=!1,o.on.complete.fire()}),(function(e){var t=o.active;return o.active=!1,o.on.error.fire(e),o.parent?o.parent._reject(e):t&&o.idbtrans&&o.idbtrans.abort(),ar(e)}))}))}(this),this.Version=function(e){return Tr(mn.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Tr(qr.prototype,(function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};var i=e._deps.indexedDB;if(!i)throw new Ve.MissingAPI("indexedDB API missing");this._cmp=this._ascending=i.cmp.bind(i),this._descending=function(e,t){return i.cmp(t,e)},this._max=function(e,t){return i.cmp(e,t)>0?e:t},this._min=function(e,t){return i.cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '"+n.name+"'. Closing db now to resume the upgrade."):console.warn("Another connection wants to delete database '"+n.name+"'. Closing db now to resume the delete request."),n.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('"+n.name+"') was blocked"):console.warn("Upgrade '"+n.name+"' blocked by other connection holding version "+e.oldVersion/10)})),this._maxKey=Kr(r.IDBKeyRange),this._createTransaction=function(e,t,r,i){return new n.Transaction(e,t,r,i)},this._fireOnBlocked=function(e){n.on("blocked").fire(e),fr.filter((function(e){return e.name===n.name&&e!==n&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(In),this.use(Sn),o.forEach((function(e){return e(n)}))}return e.prototype.version=function(e){if(isNaN(e)||e<.1)throw new Ve.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Ve.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,r=t.filter((function(t){return t._cfg.version===e}))[0];return r||(r=new this.Version(e),t.push(r),t.sort(un),r.stores({}),this._state.autoSchema=!1,r)},e.prototype._whenReady=function(e){var t=this;return this._state.openComplete||bt.letThrough?e():new It((function(e,r){if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void r(new Ve.DatabaseClosed);t.open().catch(We)}t._state.dbReadyPromise.then(e,r)})).then(e)},e.prototype.use=function(e){var t=e.stack,r=e.create,n=e.level,i=e.name;i&&this.unuse({stack:t,name:i});var o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:r,level:null==n?10:n,name:i}),o.sort((function(e,t){return e.level-t.level})),this},e.prototype.unuse=function(e){var t=e.stack,r=e.name,n=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return n?e.create!==n:!!r&&e.name!==r}))),this},e.prototype.open=function(){return yn(this)},e.prototype.close=function(){var e=fr.indexOf(this),t=this._state;if(e>=0&&fr.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(e){}this.idbdb=null}this._options.autoOpen=!1,t.dbOpenError=new Ve.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError),t.dbReadyPromise=new It((function(e){t.dbReadyResolve=e})),t.openCanceller=new It((function(e,r){t.cancelOpen=r}))},e.prototype.delete=function(){var e=this,t=arguments.length>0,r=this._state;return new It((function(n,i){var o=function(){e.close();var t=e._deps.indexedDB.deleteDatabase(e.name);t.onsuccess=Ut((function(){vn.remove(e.name),n()})),t.onerror=Hr(i),t.onblocked=e._fireOnBlocked};if(t)throw new Ve.InvalidArgument("Arguments not allowed in db.delete()");r.isBeingOpened?r.dbReadyPromise.then(o):o()}))},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return null!==this.idbdb},e.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name},e.prototype.hasFailed=function(){return null!==this._state.dbOpenError},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var e=this;return K(this._allTables).map((function(t){return e._allTables[t]}))},enumerable:!0,configurable:!0}),e.prototype.transaction=function(){var e=_n.apply(this,arguments);return this._transaction.apply(this,e)},e.prototype._transaction=function(e,t,r){var n=this,i=bt.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);var o,a,s=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=e instanceof n.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||e===yr)o=yr;else{if("rw"!=e&&e!=br)throw new Ve.InvalidArgument("Invalid transaction mode: "+e);o=br}if(i){if(i.mode===yr&&o===br){if(!s)throw new Ve.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&a.forEach((function(e){if(i&&-1===i.storeNames.indexOf(e)){if(!s)throw new Ve.SubTransaction("Table "+e+" not included in parent transaction.");i=null}})),s&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(function(t,r){r(e)})):ar(e)}var c=En.bind(null,this,o,a,i,r);return i?i._promise(o,c,"lock"):bt.trans?er(bt.transless,(function(){return n._whenReady(c)})):this._whenReady(c)},e.prototype.table=function(e){if(!J(this._allTables,e))throw new Ve.InvalidTable("Table "+e+" does not exist");return this._allTables[e]},e}(),Cn=Tn;Z(Cn,q(q({},He),{delete:function(e){return new Cn(e).delete()},exists:function(e){return new Cn(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){return vn?vn.getDatabaseNames().then(e):It.resolve([])},defineClass:function(){return function(e){z(this,e)}},ignoreTransaction:function(e){return bt.trans?er(bt.transless,e):e()},vip:An,async:function(e){return function(){try{var t=bn(e.apply(this,arguments));return t&&"function"==typeof t.then?t:It.resolve(t)}catch(e){return ar(e)}}},spawn:function(e,t,r){try{var n=bn(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:It.resolve(n)}catch(e){return ar(e)}},currentTransaction:{get:function(){return bt.trans||null}},waitFor:function(e,t){var r=It.resolve("function"==typeof e?Cn.ignoreTransaction(e):e).timeout(t||6e4);return bt.trans?bt.trans.waitFor(r):r},Promise:It,debug:{get:function(){return ke},set:function(e){Oe(e,"dexie"===e?function(){return!0}:mr)}},derive:te,extend:z,props:Z,override:ae,Events:Sr,getByKeyPath:le,setByKeyPath:he,delByKeyPath:de,shallowClone:fe,deepClone:ye,getObjectDiff:we,asap:ce,minKey:lr,addons:[],connections:fr,errnames:Qe,dependencies:function(){try{return{indexedDB:W.indexedDB||W.mozIndexedDB||W.webkitIndexedDB||W.msIndexedDB,IDBKeyRange:W.IDBKeyRange||W.webkitIDBKeyRange}}catch(e){return{indexedDB:null,IDBKeyRange:null}}}(),semVer:cr,version:cr.split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,r){return e+t/Math.pow(10,2*r)})),default:Cn,Dexie:Cn})),Cn.maxKey=Kr(Cn.dependencies.IDBKeyRange),function(e){try{vn=function(e){var t,r=e&&"function"==typeof e.databases;if(!r){var n=new Tn(Ar,{addons:[]});n.version(1).stores({dbnames:"name"}),t=n.table("dbnames")}return{getDatabaseNames:function(){return r?It.resolve(e.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return e!==Ar}))})):t.toCollection().primaryKeys()},add:function(e){return!r&&e!==Ar&&t.put({name:e}).catch(We)},remove:function(e){return!r&&e!==Ar&&t.delete(e).catch(We)}}}(e)}catch(e){}}(Tn.dependencies.indexedDB),It.rejectionMapper=function(e,t){if(!e||e instanceof je||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Ke[e.name])return e;var r=new Ke[e.name](t||e.message,e);return"stack"in e&&ee(r,"stack",{get:function(){return this.inner.stack}}),r},Oe(ke,mr);function Rn(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var kn=new(function(e){w(r,e);var t=Rn(r);function r(){var e;return y(this,r),(e=t.call(this,"AgoraLogger")).logs=void 0,e.openDatabase(),e.logs=e.table("logs"),e}return _(r,[{key:"openDatabase",value:function(){this.version(1).stores({logs:"++id, content, created_at"})}}]),r}(Tn));function On(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Nn,xn=function(){function e(){y(this,e),this._lastObjectIndex=-1,this.thread=new Q}var t,r,n;return _(e,[{key:"collectConsoleLogs",value:(n=A(k().mark((function e(){var t,r,n,i=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="",e.next=3,kn.logs.each((function(e){t+=e.content+"\n",i._lastObjectIndex=e.id}));case 3:return r=+Date.now(),n=new File([t],"".concat(r)),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"cleanupConsoleLogs",value:(r=A(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kn.logs.where("id").belowOrEqual(this._lastObjectIndex).delete();case 2:t=e.sent,console.log("[logger] delete ".concat(t," logs"));case 4:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"_addLocalFolderAsync",value:function(e,t){return new Promise((function(r,n){e.addLocalFolderAsync(t,(function(e,t){if(t)return n(t);r()}))}))}},{key:"_readFile",value:function(e){return new Promise((function(t,r){window.require("fs").readFile(e,(function(e,n){return e?r(e):t(n)}))}))}},{key:"collectElectronLogs",value:(t=A(k().mark((function e(t,r){var n,i,o,a,s,c;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=+Date.now(),i=window.require("adm-zip"),o=window.require("path"),a=new i,e.next=6,this._addLocalFolderAsync(a,r);case 6:return s=o.resolve(t,"logs.zip"),a.writeZip(s),e.next=10,this._readFile(s);case 10:return c=e.sent,e.abrupt("return",new File([c],"".concat(n)));case 12:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}],[{key:"warn",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.log.apply(e,[qn.WARN].concat(r))}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.log.apply(e,[qn.DEBUG].concat(r))}},{key:"info",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.log.apply(e,[qn.INFO].concat(r))}},{key:"error",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];e.log.apply(e,[qn.ERROR].concat(r))}},{key:"log",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=$n.logLevel;if(!(e>o)){var a="AgoraEdu-SDK [".concat(e,"]: "),s=[],c=(D(t={},"".concat(qn.WARN),{call:function(){s=[a].concat(n),console.warn.apply(console,s)}}),D(t,"".concat(qn.DEBUG),{call:function(){s=[a].concat(n),console.debug.apply(console,s)}}),D(t,"".concat(qn.INFO),{call:function(){s=[a].concat(n),console.info.apply(console,s)}}),D(t,"".concat(qn.ERROR),{call:function(){s=[a].concat(n),console.error.apply(console,s)}}),t),u="".concat(e);c.hasOwnProperty(u)?c[u].call():(s=[a].concat(n),console.log.apply(console,s))}}},{key:"setupConsoleHijack",value:function(){var t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?On(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):On(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e.originConsole);if(t.__hijackSetup)t.log("[logger] hijack already setup!");else{t.log("[logger] setup hijack..");var r=this.logger.thread,n=function(e,t){return"".concat(j()().format("YYYY-MM-DD HH:mm:ss")," ").concat((0,U.upperCase)(e||"unknown")," ").concat((0,U.escape)(t))};Object.keys(t).filter((function(e){return["info","error","warn","log","debug"].indexOf(e)>=0})).forEach((function(e,i){t[e]=function(e,t){return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=n(t.name,o.join(" "));r.postMessage({type:"log",data:s}),t.apply(e,o)}}(t,t[e])})),t.__hijackSetup=!0,window.console=t}}},{key:"restoreConsoleHijack",value:function(){console.log("[logger] restore hijack.."),window.console=e.originConsole,console.__hijackSetup=!1}}]),e}();xn.logger=new xn,xn.originConsole=window.console;var Dn=new Uint8Array(16);function Ln(){if(!Nn&&!(Nn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Nn(Dn)}const Pn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const Mn=function(e){return"string"==typeof e&&Pn.test(e)};for(var Bn=[],jn=0;jn<256;++jn)Bn.push((jn+256).toString(16).substr(1));const Un=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Bn[e[t+0]]+Bn[e[t+1]]+Bn[e[t+2]]+Bn[e[t+3]]+"-"+Bn[e[t+4]]+Bn[e[t+5]]+"-"+Bn[e[t+6]]+Bn[e[t+7]]+"-"+Bn[e[t+8]]+Bn[e[t+9]]+"-"+Bn[e[t+10]]+Bn[e[t+11]]+Bn[e[t+12]]+Bn[e[t+13]]+Bn[e[t+14]]+Bn[e[t+15]]).toLowerCase();if(!Mn(r))throw TypeError("Stringified UUID is invalid");return r};const Fn=function(e,t,r){var n=(e=e||{}).random||(e.rng||Ln)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return Un(n)};function Gn(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Qn,qn,Vn,Kn,Hn,Wn=function(e){w(r,e);var t=Gn(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r)}(x),zn=function(e){w(r,e);var t=Gn(r);function r(e,n,i){var o;return y(this,r),(o=t.call(this))._extra=i,o.id=Fn(),o.original=void 0,o.codeList=void 0,o.message=n.message,o.original=n,o.codeList=[e],o.stack=n.stack,o}return _(r,[{key:"servCode",get:function(){var e;return null===(e=this._extra)||void 0===e?void 0:e.servCode}}],[{key:"isOf",value:function(e){if(!(e instanceof r))return!1;for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n.includes(e.servCode)}}]),r}(M(Error)),Yn=function(e,t){return t instanceof zn?(t.codeList.push(e),t):new zn(e,t)},Xn=function(e){w(r,e);var t=Gn(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r,[{key:"_handleError",value:function(e,t){var r=(null==t?void 0:t.stack)||(null==t?void 0:t.message);xn.error("[RteErrorCenter] error ".concat(e,": ").concat(r))}},{key:"handleThrowableError",value:function(e,t){var r=Yn(e,t);throw this._handleError(e,r),r}},{key:"handleNonThrowableError",value:function(e,t){var r=Yn(e,t);this._handleError(e,r)}}]),r}(Wn);function Jn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Xn.shared=new Xn,function(e){e.RTE_ERR_MISSING_PARAMS="100000",e.RTE_ERR_SCENE_NOT_READY="100001",e.RTE_ERR_INVALID_DATA_STRUCT="100002",e.RTE_ERR_LOG_UPLOAD_FAIL="100003",e.RTE_ERR_RESTFUL_SERVICE_ERR="100004",e.RTE_ERR_RESTFUL_HTTP_CLIENT_ERR="100005",e.RTE_ERR_AGORA_FETCH_ERR="100006",e.RTE_ERR_ELECTRON_LOG_UPLOAD_ERR="100007",e.RTE_ERR_WEB_LOG_UPLOAD_ERR="100008",e.RTE_ERR_JOIN_SCENE_FAILED="100009",e.RTE_ERR_LEAVE_SCENE_FAIL="100010",e.RTE_ERR_EVENT_CALLBACK_ERR="100011",e.RTE_ERR_SCENE_ALREADY_JOINED="100012",e.RTE_ERR_ENGINE_NOT_READY="100013",e.RTE_ERR_CONFIG_NOT_READY="100014",e.RTE_ERR_RESTFUL_NETWORK_ERR="100015",e.RTE_ERR_RESTFUL_NETWORK_TIMEOUT_ERR="100016",e.RTE_ERR_LOCAL_USER_NOT_EXIST="100017",e.RTM_ERR_LOGGED_IN_ALREADY="200000",e.RTM_ERR_JOIN_FAILED="200001",e.RTM_ERR_LEAVE_FAILED="200002",e.RTM_ERR_DESTROY_FAILED="200003",e.RTM_ERR_LOGIN_FAIL="200004",e.RTM_ERR_REGION_NOT_SPECIFIED="200005",e.RTC_ERR_CAM_ERR="300000",e.RTC_ERR_MIC_ERR="300001",e.RTC_ERR_TRACK_PUBLISH_FAIL="300002",e.RTC_ERR_TRACK_UNPUBLISH_FAIL="300003",e.RTC_ERR_TRACK_SUBSCRIBE_FAIL="300004",e.RTC_ERR_TRACK_UNSUBSCRIBE_FAIL="300005",e.RTC_ERR_NO_CHANNEL_EXISTS="300006",e.RTC_ERR_INVALID_CANVAS="300007",e.RTC_ERR_SCREEN_SHARE_ERR="300008",e.RTC_ERR_CLIENT_LEAVE_CHANNEL_FAIL="300009",e.RTC_ERR_LEAVE_MAIN_CHANNEL_FAIL="300010",e.RTC_ERR_LEAVE_SUB_CHANNEL_FAIL="300011",e.RTC_ERR_LEAVE_CHANNEL_FAIL="300012",e.RTC_ERR_VDM_GET_DEVICES_FAIL="300013",e.RTC_ERR_ADM_GET_RECORD_DEVICES_FAIL="300014",e.RTC_ERR_ADM_GET_PLAYBACK_DEVICES_FAIL="300015",e.RTC_ERR_REGION_NOT_SPECIFIED="300016",e.RTC_ERR_RTC_ENGINE_INITIALZIE_FAILED="300017",e.RTC_ERR_RTC_VDM_NOT_READY="300018",e.RTC_ERR_RTC_ADM_NOT_READY="300019"}(Qn||(Qn={})),function(e){e[e.OFF=0]="OFF",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e[e.VERBOSE=5]="VERBOSE"}(qn||(qn={})),function(e){e[e.Electron=0]="Electron",e[e.Web=1]="Web"}(Vn||(Vn={})),function(e){e.zh="zh",e.en="en"}(Kn||(Kn={})),function(e){e.CN="CN",e.AP="AP",e.EU="EU",e.NA="NA"}(Hn||(Hn={}));var $n=function(){function e(t,r){y(this,e),this.appId=void 0,this.service={},this.rtcConfigs={},this.logFilePath=void 0,this.rtcSDKParameters=[],this.userId="",this.token="",this.ignoreUrlRegionPrefix=!1,this.language=Kn.zh,this.debugI18n=!1,this.region=Hn.CN,this.SCENE_JOIN_RETRY_ATTEMPTS=3,this.appId=t,r&&(r.language&&(this.language=r.language),r.region&&(this.region=r.region),r.rtcConfigs&&(this.rtcConfigs=Zn(Zn({},this.rtcConfigs),r.rtcConfigs)),r.rtcSDKParameters&&(this.rtcSDKParameters=r.rtcSDKParameters))}return _(e,null,[{key:"shared",get:function(){return this._config?this._config:Xn.shared.handleThrowableError(Qn.RTE_ERR_CONFIG_NOT_READY,new Error("classroom config not ready"))}},{key:"setConfig",value:function(e){this._config=e}},{key:"platform",get:function(){return navigator.userAgent.toLowerCase().indexOf(" electron/")>-1?Vn.Electron:Vn.Web}},{key:"version",get:function(){return"2.6.2"}}]),e}();$n._config=void 0,$n.logLevel=qn.DEBUG;__webpack_require__(4812),__webpack_require__(1249),__webpack_require__(9826),__webpack_require__(2707),__webpack_require__(2564);var ei,ti,ri=function(e,t){var r=e.__$$ignoreMethods||[];r=r.concat(t),e.__$$ignoreMethods=r};__webpack_require__(7727),__webpack_require__(6210);function ni(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e[e.pre=0]="pre",e[e.post=1]="post"}(ei||(ei={})),ti||(ti={});var ii=function(e,t,r){if(!r)try{return e.apply(null,t)}catch(e){}},oi=function(e,t,r,n,i,o,a){var s=function(e,t){return e.__$$ignoreMethods&&e.__$$ignoreMethods.indexOf(t)>-1}(r,n);ii(o,[{type:ei.pre,arguments:i,method:n,class:r.constructor.name,context:a}],s);var c,u,l=t.apply(e,i),h=function(e,t){ii(o,[{type:ei.post,arguments:i,return:e,method:n,class:r.constructor.name,context:a,error:t}],s)};l&&!!l.then?l.then((function(e){c=e})).catch((function(e){u=e})).finally((function(){h(c,u)})):h(l);return l},ai=function(e,t,r,n,i){return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return oi(this,e,t,r,a,n,i)}},si=function(e){return Object.getOwnPropertyNames(e).filter((function(t){return"function"==typeof e[t]}))},ci=function(){},ui=function(e){var t=xn[e]||ci;return function(e){if(e.type===ei.pre){var r;e.context.start=(new Date).getTime();var n=["[".concat(e.class,"] >>> [").concat(e.method,"]")];(null===(r=e.arguments)||void 0===r?void 0:r.length)&&n.push(", args:",e.arguments),t.apply(void 0,n)}else{var i=(new Date).getTime()-e.context.start,o=["[".concat(e.class,"] <<< [").concat(e.method,"]")];e.return&&o.push(", return:",e.return),e.error&&o.push(", err:",e.error),o.push(", Time elapsed: ".concat(i,"ms")),t.apply(void 0,o)}}},li=(__webpack_require__(3371),{info:function(e,t,r){var n=ui("info"),i=e[t],o=ai(i,e,t,n,{});return{configurable:!0,enumerable:!1,get:function(){return o.bind(this)}}},warn:function(e,t,r){var n=ui("warn"),i=e[t],o=ai(i,e,t,n,{});return{configurable:!0,enumerable:!1,get:function(){return o.bind(this)}}},error:function(e,t,r){var n=ui("error"),i=e[t],o=ai(i,e,t,n,{});return{configurable:!0,enumerable:!1,get:function(){return o.bind(this)}}},attach:function(e){var t=e.level,r=void 0===t?qn.INFO:t,n=e.proxyMethods,i=void 0===n||n;return function(e){var t=ui([,"error","warn","info","info","info"][r]),n=function(e){return Object.freeze({info:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];xn.info.apply(xn,["[".concat(e.name,"]")].concat(r))},warn:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];xn.warn.apply(xn,["[".concat(e.name,"]")].concat(r))},error:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];xn.error.apply(xn,["[".concat(e.name,"]")].concat(r))},debug:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];xn.debug.apply(xn,["[".concat(e.name,"]")].concat(r))}})}(e);return function(e,t,r,n,i){var o=e.prototype;return function(e){w(s,e);var a=ni(s);function s(){var e;y(this,s);for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];(e=a.call.apply(a,[this].concat(u)),ri(o,[]),i)&&si(o).forEach((function(n){var i=o[n];e[n]=ai(i,o,n,t,r).bind(S(e))}));return Object.keys(n).forEach((function(t){e[t]=n[t]})),e}return _(s)}(e)}(e,t,{},{logger:n},i)}},silence:function(e,t){ri(e,[t])}});function hi(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||g(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}__webpack_require__(4916),__webpack_require__(3123),__webpack_require__(561),__webpack_require__(189),__webpack_require__(8921),__webpack_require__(6248),__webpack_require__(3599),__webpack_require__(1477),__webpack_require__(3066),__webpack_require__(5389),__webpack_require__(401),__webpack_require__(5164),__webpack_require__(1238),__webpack_require__(4837),__webpack_require__(7485),__webpack_require__(465),__webpack_require__(6651),__webpack_require__(1437),__webpack_require__(5285),__webpack_require__(9865),__webpack_require__(5827);var di=32,fi=31,pi={};function gi(e){e&&(e.value=!0)}function vi(){}function mi(e){return void 0===e.size&&(e.size=e.__iterate(yi)),e.size}function Ai(e,t){if("number"!=typeof t){var r=t>>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?mi(e)+t:t}function yi(){return!0}function bi(e,t,r){return(0===e&&!Ii(e)||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function _i(e,t){return wi(e,t,0)}function Ei(e,t){return wi(e,t,t)}function wi(e,t,r){return void 0===e?r:Ii(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function Ii(e){return e<0||0===e&&1/e==-1/0}var Si="@@__IMMUTABLE_ITERABLE__@@";function Ti(e){return Boolean(e&&e[Si])}var Ci="@@__IMMUTABLE_KEYED__@@";function Ri(e){return Boolean(e&&e[Ci])}var ki="@@__IMMUTABLE_INDEXED__@@";function Oi(e){return Boolean(e&&e[ki])}function Ni(e){return Ri(e)||Oi(e)}var xi=function(e){return Ti(e)?e:to(e)},Di=function(e){function t(e){return Ri(e)?e:ro(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(xi),Li=function(e){function t(e){return Oi(e)?e:no(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(xi),Pi=function(e){function t(e){return Ti(e)&&!Ni(e)?e:io(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(xi);xi.Keyed=Di,xi.Indexed=Li,xi.Set=Pi;var Mi="@@__IMMUTABLE_SEQ__@@";function Bi(e){return Boolean(e&&e[Mi])}var ji="@@__IMMUTABLE_RECORD__@@";function Ui(e){return Boolean(e&&e[ji])}function Fi(e){return Ti(e)||Ui(e)}var Gi="@@__IMMUTABLE_ORDERED__@@";function Qi(e){return Boolean(e&&e[Gi])}var qi="function"==typeof Symbol&&Symbol.iterator,Vi="@@iterator",Ki=qi||Vi,Hi=function(e){this.next=e};function Wi(e,t,r,n){var i=0===e?t:1===e?r:[t,r];return n?n.value=i:n={value:i,done:!1},n}function zi(){return{value:void 0,done:!0}}function Yi(e){return!!Array.isArray(e)||!!Zi(e)}function Xi(e){return e&&"function"==typeof e.next}function Ji(e){var t=Zi(e);return t&&t.call(e)}function Zi(e){var t=e&&(qi&&e[qi]||e["@@iterator"]);if("function"==typeof t)return t}Hi.prototype.toString=function(){return"[Iterator]"},Hi.KEYS=0,Hi.VALUES=1,Hi.ENTRIES=2,Hi.prototype.inspect=Hi.prototype.toSource=function(){return this.toString()},Hi.prototype[Ki]=function(){return this};var $i=Object.prototype.hasOwnProperty;function eo(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var to=function(e){function t(e){return null==e?uo():Fi(e)?e.toSeq():function(e){var t=fo(e);if(t)return(n=Zi(r=e))&&n===r.entries?t.fromEntrySeq():function(e){var t=Zi(e);return t&&t===e.keys}(e)?t.toSetSeq():t;var r,n;if("object"==typeof e)return new ao(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[t?n-++i:i++];if(!1===e(o[1],o[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var r=this._cache;if(r){var n=r.length,i=0;return new Hi((function(){if(i===n)return{value:void 0,done:!0};var o=r[t?n-++i:i++];return Wi(e,o[0],o[1])}))}return this.__iteratorUncached(e,t)},t}(xi),ro=function(e){function t(e){return null==e?uo().toKeyedSeq():Ti(e)?Ri(e)?e.toSeq():e.fromEntrySeq():Ui(e)?e.toSeq():lo(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(to),no=function(e){function t(e){return null==e?uo():Ti(e)?Ri(e)?e.entrySeq():e.toIndexedSeq():Ui(e)?e.toSeq().entrySeq():ho(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(to),io=function(e){function t(e){return(Ti(e)&&!Ni(e)?e:no(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(to);to.isSeq=Bi,to.Keyed=ro,to.Set=io,to.Indexed=no,to.prototype[Mi]=!0;var oo=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[Ai(this,e)]:t},t.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length,i=0;i!==n;){var o=t?n-++i:i++;if(!1===e(r[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var r=this._array,n=r.length,i=0;return new Hi((function(){if(i===n)return{value:void 0,done:!0};var o=t?n-++i:i++;return Wi(e,o,r[o])}))},t}(no),ao=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return $i.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var a=n[t?i-++o:o++];if(!1===e(r[a],a,this))break}return o},t.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,i=n.length,o=0;return new Hi((function(){if(o===i)return{value:void 0,done:!0};var a=n[t?i-++o:o++];return Wi(e,a,r[a])}))},t}(ro);ao.prototype[Gi]=!0;var so,co=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=Ji(this._collection),n=0;if(Xi(r))for(var i;!(i=r.next()).done&&!1!==e(i.value,n++,this););return n},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=Ji(this._collection);if(!Xi(r))return new Hi(zi);var n=0;return new Hi((function(){var t=r.next();return t.done?t:Wi(e,n++,t.value)}))},t}(no);function uo(){return so||(so=new oo([]))}function lo(e){var t=fo(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new ao(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function ho(e){var t=fo(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function fo(e){return eo(e)?new oo(e):Yi(e)?new co(e):void 0}var po="@@__IMMUTABLE_MAP__@@";function go(e){return Boolean(e&&e[po])}function vo(e){return go(e)&&Qi(e)}function mo(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function Ao(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(mo(e)&&mo(t)&&e.equals(t))}var yo="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function bo(e){return e>>>1&1073741824|3221225471&e}var _o=Object.prototype.valueOf;function Eo(e){if(null==e)return wo(e);if("function"==typeof e.hashCode)return bo(e.hashCode(e));var t,r=(t=e).valueOf!==_o&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==r)return wo(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return bo(t)}(r);case"string":return r.length>Do?function(e){var t=Mo[e];void 0===t&&(t=Io(e),Po===Lo&&(Po=0,Mo={}),Po++,Mo[e]=t);return t}(r):Io(r);case"object":case"function":return function(e){var t;if(ko&&void 0!==(t=Ro.get(e)))return t;if(void 0!==(t=e[xo]))return t;if(!To){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[xo]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=Co(),ko)Ro.set(e,t);else{if(void 0!==So&&!1===So(e))throw new Error("Non-extensible objects are not allowed as keys.");if(To)Object.defineProperty(e,xo,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[xo]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[xo]=t}}return t}(r);case"symbol":return function(e){var t=Oo[e];if(void 0!==t)return t;return t=Co(),Oo[e]=t,t}(r);default:if("function"==typeof r.toString)return Io(r.toString());throw new Error("Value type "+typeof r+" cannot be hashed.")}}function wo(e){return null===e?1108378658:1108378659}function Io(e){for(var t=0,r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)|0;return bo(t)}var So=Object.isExtensible,To=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Co(){var e=++No;return 1073741824&No&&(No=0),e}var Ro,ko="function"==typeof WeakMap;ko&&(Ro=new WeakMap);var Oo=Object.create(null),No=0,xo="__immutablehash__";"function"==typeof Symbol&&(xo=Symbol(xo));var Do=16,Lo=255,Po=0,Mo={},Bo=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=qo(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var r=this,n=Qo(this,e,t);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(e,t)}),n},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t,n){return e(t,n,r)}),t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(ro);Bo.prototype[Gi]=!0;var jo=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var r=this,n=0;return t&&mi(this),this._iter.__iterate((function(i){return e(i,t?r.size-++n:n++,r)}),t)},t.prototype.__iterator=function(e,t){var r=this,n=this._iter.__iterator(1,t),i=0;return t&&mi(this),new Hi((function(){var o=n.next();return o.done?o:Wi(e,t?r.size-++i:i++,o.value,o)}))},t}(no),Uo=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t){return e(t,t,r)}),t)},t.prototype.__iterator=function(e,t){var r=this._iter.__iterator(1,t);return new Hi((function(){var t=r.next();return t.done?t:Wi(e,t.value,t.value,t)}))},t}(io),Fo=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t){if(t){ea(t);var n=Ti(t);return e(n?t.get(1):t[1],n?t.get(0):t[0],r)}}),t)},t.prototype.__iterator=function(e,t){var r=this._iter.__iterator(1,t);return new Hi((function(){for(;;){var t=r.next();if(t.done)return t;var n=t.value;if(n){ea(n);var i=Ti(n);return Wi(e,i?n.get(0):n[0],i?n.get(1):n[1],t)}}}))},t}(ro);function Go(e){var t=ra(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=na,t.__iterateUncached=function(t,r){var n=this;return e.__iterate((function(e,r){return!1!==t(r,e,n)}),r)},t.__iteratorUncached=function(t,r){if(2===t){var n=e.__iterator(t,r);return new Hi((function(){var e=n.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,r)},t}function Qo(e,t,r){var n=ra(e);return n.size=e.size,n.has=function(t){return e.has(t)},n.get=function(n,i){var o=e.get(n,pi);return o===pi?i:t.call(r,o,n,e)},n.__iterateUncached=function(n,i){var o=this;return e.__iterate((function(e,i,a){return!1!==n(t.call(r,e,i,a),i,o)}),i)},n.__iteratorUncached=function(n,i){var o=e.__iterator(2,i);return new Hi((function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return Wi(n,s,t.call(r,a[1],s,e),i)}))},n}function qo(e,t){var r=this,n=ra(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Go(e);return t.reverse=function(){return e.flip()},t}),n.get=function(r,n){return e.get(t?r:-1-r,n)},n.has=function(r){return e.has(t?r:-1-r)},n.includes=function(t){return e.includes(t)},n.cacheResult=na,n.__iterate=function(r,n){var i=this,o=0;return n&&mi(e),e.__iterate((function(e,a){return r(e,t?a:n?i.size-++o:o++,i)}),!n)},n.__iterator=function(n,i){var o=0;i&&mi(e);var a=e.__iterator(2,!i);return new Hi((function(){var e=a.next();if(e.done)return e;var s=e.value;return Wi(n,t?s[0]:i?r.size-++o:o++,s[1],e)}))},n}function Vo(e,t,r,n){var i=ra(e);return n&&(i.has=function(n){var i=e.get(n,pi);return i!==pi&&!!t.call(r,i,n,e)},i.get=function(n,i){var o=e.get(n,pi);return o!==pi&&t.call(r,o,n,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate((function(e,o,c){if(t.call(r,e,o,c))return s++,i(e,n?o:s-1,a)}),o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(2,o),s=0;return new Hi((function(){for(;;){var o=a.next();if(o.done)return o;var c=o.value,u=c[0],l=c[1];if(t.call(r,l,u,e))return Wi(i,n?u:s++,l,o)}}))},i}function Ko(e,t,r,n){var i=e.size;if(bi(t,r,i))return e;var o=_i(t,i),a=Ei(r,i);if(o!=o||a!=a)return Ko(e.toSeq().cacheResult(),t,r,n);var s,c=a-o;c==c&&(s=c<0?0:c);var u=ra(e);return u.size=0===s?s:e.size&&s||void 0,!n&&Bi(e)&&s>=0&&(u.get=function(t,r){return(t=Ai(this,t))>=0&&t<s?e.get(t+o,r):r}),u.__iterateUncached=function(t,r){var i=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(t,r);var a=0,c=!0,u=0;return e.__iterate((function(e,r){if(!c||!(c=a++<o))return u++,!1!==t(e,n?r:u-1,i)&&u!==s})),u},u.__iteratorUncached=function(t,r){if(0!==s&&r)return this.cacheResult().__iterator(t,r);if(0===s)return new Hi(zi);var i=e.__iterator(t,r),a=0,c=0;return new Hi((function(){for(;a++<o;)i.next();if(++c>s)return{value:void 0,done:!0};var e=i.next();return n||1===t||e.done?e:Wi(t,c-1,0===t?void 0:e.value[1],e)}))},u}function Ho(e,t,r,n){var i=ra(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,c=0;return e.__iterate((function(e,o,u){if(!s||!(s=t.call(r,e,o,u)))return c++,i(e,n?o:c-1,a)})),c},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(2,o),c=!0,u=0;return new Hi((function(){var e,o,l;do{if((e=s.next()).done)return n||1===i?e:Wi(i,u++,0===i?void 0:e.value[1],e);var h=e.value;o=h[0],l=h[1],c&&(c=t.call(r,l,o,a))}while(c);return 2===i?e:Wi(i,o,l,e)}))},i}function Wo(e,t){var r=Ri(e),n=[e].concat(t).map((function(e){return Ti(e)?r&&(e=Di(e)):e=r?lo(e):ho(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===n.length)return e;if(1===n.length){var i=n[0];if(i===e||r&&Ri(i)||Oi(e)&&Oi(i))return i}var o=new oo(n);return r?o=o.toKeyedSeq():Oi(e)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=n.reduce((function(e,t){if(void 0!==e){var r=t.size;if(void 0!==r)return e+r}}),0),o}function zo(e,t,r){var n=ra(e);return n.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function e(c,u){c.__iterate((function(o,c){return(!t||u<t)&&Ti(o)?e(o,u+1):(a++,!1===i(o,r?c:a-1,n)&&(s=!0)),!s}),o)}(e,0),a},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var o=e.__iterator(n,i),a=[],s=0;return new Hi((function(){for(;o;){var e=o.next();if(!1===e.done){var c=e.value;if(2===n&&(c=c[1]),t&&!(a.length<t)||!Ti(c))return r?e:Wi(n,s++,c,e);a.push(o),o=c.__iterator(n,i)}else o=a.pop()}return{value:void 0,done:!0}}))},n}function Yo(e,t,r){t||(t=ia);var n=Ri(e),i=0,o=e.toSeq().map((function(t,n){return[n,t,i++,r?r(t,n,e):t]})).valueSeq().toArray();return o.sort((function(e,r){return t(e[3],r[3])||e[2]-r[2]})).forEach(n?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),n?ro(o):Oi(e)?no(o):io(o)}function Xo(e,t,r){if(t||(t=ia),r){var n=e.toSeq().map((function(t,n){return[t,r(t,n,e)]})).reduce((function(e,r){return Jo(t,e[1],r[1])?r:e}));return n&&n[0]}return e.reduce((function(e,r){return Jo(t,e,r)?r:e}))}function Jo(e,t,r){var n=e(r,t);return 0===n&&r!==t&&(null==r||r!=r)||n>0}function Zo(e,t,r,n){var i=ra(e),o=new oo(r).map((function(e){return e.size}));return i.size=n?o.max():o.min(),i.__iterate=function(e,t){for(var r,n=this.__iterator(1,t),i=0;!(r=n.next()).done&&!1!==e(r.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map((function(e){return e=xi(e),Ji(i?e.reverse():e)})),a=0,s=!1;return new Hi((function(){var r;return s||(r=o.map((function(e){return e.next()})),s=n?r.every((function(e){return e.done})):r.some((function(e){return e.done}))),s?{value:void 0,done:!0}:Wi(e,a++,t.apply(null,r.map((function(e){return e.value}))))}))},i}function $o(e,t){return e===t?e:Bi(e)?t:e.constructor(t)}function ea(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function ta(e){return Ri(e)?Di:Oi(e)?Li:Pi}function ra(e){return Object.create((Ri(e)?ro:Oi(e)?no:io).prototype)}function na(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):to.prototype.cacheResult.call(this)}function ia(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function oa(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),i=0;i<r;i++)n[i]=e[i+t];return n}function aa(e,t){if(!e)throw new Error(t)}function sa(e){aa(e!==1/0,"Cannot perform this action with an infinite size.")}function ca(e){if(eo(e)&&"string"!=typeof e)return e;if(Qi(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}jo.prototype.cacheResult=Bo.prototype.cacheResult=Uo.prototype.cacheResult=Fo.prototype.cacheResult=na;var ua=Object.prototype.toString;function la(e){if(!e||"object"!=typeof e||"[object Object]"!==ua.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var r=t,n=Object.getPrototypeOf(t);null!==n;)r=n,n=Object.getPrototypeOf(r);return r===t}function ha(e){return"object"==typeof e&&(Fi(e)||Array.isArray(e)||la(e))}function da(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function fa(e,t){return Fi(e)?e.has(t):ha(e)&&$i.call(e,t)}function pa(e,t,r){return Fi(e)?e.get(t,r):fa(e,t)?"function"==typeof e.get?e.get(t):e[t]:r}function ga(e){if(Array.isArray(e))return oa(e);var t={};for(var r in e)$i.call(e,r)&&(t[r]=e[r]);return t}function va(e,t){if(!ha(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Fi(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!$i.call(e,t))return e;var r=ga(e);return Array.isArray(r)?r.splice(t,1):delete r[t],r}function ma(e,t,r){if(!ha(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Fi(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,r)}if($i.call(e,t)&&r===e[t])return e;var n=ga(e);return n[t]=r,n}function Aa(e,t,r,n){n||(n=r,r=void 0);var i=ya(Fi(e),e,ca(t),0,r,n);return i===pi?r:i}function ya(e,t,r,n,i,o){var a=t===pi;if(n===r.length){var s=a?i:t,c=o(s);return c===s?t:c}if(!a&&!ha(t))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,n).map(da)+"]: "+t);var u=r[n],l=a?pi:pa(t,u,pi),h=ya(l===pi?e:Fi(l),l,r,n+1,i,o);return h===l?t:h===pi?va(t,u):ma(a?e?Za():{}:t,u,h)}function ba(e,t,r){return Aa(e,t,pi,(function(){return r}))}function _a(e,t){return ba(this,e,t)}function Ea(e,t){return Aa(e,t,(function(){return pi}))}function wa(e){return Ea(this,e)}function Ia(e,t,r,n){return Aa(e,[t],r,n)}function Sa(e,t,r){return 1===arguments.length?e(this):Ia(this,e,t,r)}function Ta(e,t,r){return Aa(this,e,t,r)}function Ca(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return ka(this,e)}function Ra(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return ka(this,t,e)}function ka(e,t,r){for(var n=[],i=0;i<t.length;i++){var o=Di(t[i]);0!==o.size&&n.push(o)}return 0===n.length?e:0!==e.toSeq().size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var t=r?function(t,n){Ia(e,n,pi,(function(e){return e===pi?t:r(e,t,n)}))}:function(t,r){e.set(r,t)},i=0;i<n.length;i++)n[i].forEach(t)})):e.constructor(n[0])}function Oa(e,t,r){return Na(e,t,function(e){function t(r,n,i){return ha(r)&&ha(n)&&(o=n,a=to(r),s=to(o),Oi(a)===Oi(s)&&Ri(a)===Ri(s))?Na(r,[n],t):e?e(r,n,i):n;var o,a,s}return t}(r))}function Na(e,t,r){if(!ha(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(Fi(e))return"function"==typeof r&&e.mergeWith?e.mergeWith.apply(e,[r].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var n=Array.isArray(e),i=e,o=n?Li:Di,a=n?function(t){i===e&&(i=ga(i)),i.push(t)}:function(t,n){var o=$i.call(i,n),a=o&&r?r(i[n],t,n):t;o&&a===i[n]||(i===e&&(i=ga(i)),i[n]=a)},s=0;s<t.length;s++)o(t[s]).forEach(a);return i}function xa(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Oa(this,e)}function Da(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Oa(this,t,e)}function La(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Aa(this,e,Za(),(function(e){return Na(e,t)}))}function Pa(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Aa(this,e,Za(),(function(e){return Oa(e,t)}))}function Ma(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Ba(){return this.__ownerID?this:this.__ensureOwner(new vi)}function ja(){return this.__ensureOwner()}function Ua(){return this.__altered}var Fa=function(e){function t(t){return null==t?Za():go(t)&&!Qi(t)?t:Za().withMutations((function(r){var n=e(t);sa(n.size),n.forEach((function(e,t){return r.set(t,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Za().withMutations((function(t){for(var r=0;r<e.length;r+=2){if(r+1>=e.length)throw new Error("Missing value for key: "+e[r]);t.set(e[r],e[r+1])}}))},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return $a(this,e,t)},t.prototype.remove=function(e){return $a(this,e,pi)},t.prototype.deleteAll=function(e){var t=xi(e);return 0===t.size?this:this.withMutations((function(e){t.forEach((function(t){return e.remove(t)}))}))},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Za()},t.prototype.sort=function(e){return Is(Yo(this,e))},t.prototype.sortBy=function(e,t){return Is(Yo(this,t,e))},t.prototype.map=function(e,t){var r=this;return this.withMutations((function(n){n.forEach((function(i,o){n.set(o,e.call(t,i,o,r))}))}))},t.prototype.__iterator=function(e,t){return new za(this,e,t)},t.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate((function(t){return n++,e(t[1],t[0],r)}),t),n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ja(this.size,this._root,e,this.__hash):0===this.size?Za():(this.__ownerID=e,this.__altered=!1,this)},t}(Di);Fa.isMap=go;var Ga=Fa.prototype;Ga[po]=!0,Ga.delete=Ga.remove,Ga.removeAll=Ga.deleteAll,Ga.setIn=_a,Ga.removeIn=Ga.deleteIn=wa,Ga.update=Sa,Ga.updateIn=Ta,Ga.merge=Ga.concat=Ca,Ga.mergeWith=Ra,Ga.mergeDeep=xa,Ga.mergeDeepWith=Da,Ga.mergeIn=La,Ga.mergeDeepIn=Pa,Ga.withMutations=Ma,Ga.wasAltered=Ua,Ga.asImmutable=ja,Ga["@@transducer/init"]=Ga.asMutable=Ba,Ga["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Ga["@@transducer/result"]=function(e){return e.asImmutable()};var Qa=function(e,t){this.ownerID=e,this.entries=t};Qa.prototype.get=function(e,t,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(Ao(r,i[o][0]))return i[o][1];return n},Qa.prototype.update=function(e,t,r,n,i,o,a){for(var s=i===pi,c=this.entries,u=0,l=c.length;u<l&&!Ao(n,c[u][0]);u++);var h=u<l;if(h?c[u][1]===i:s)return this;if(gi(a),(s||!h)&&gi(o),!s||1!==c.length){if(!h&&!s&&c.length>=os)return function(e,t,r,n){e||(e=new vi);for(var i=new Ha(e,Eo(r),[r,n]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}(e,c,n,i);var d=e&&e===this.ownerID,f=d?c:oa(c);return h?s?u===l-1?f.pop():f[u]=f.pop():f[u]=[n,i]:f.push([n,i]),d?(this.entries=f,this):new Qa(e,f)}};var qa=function(e,t,r){this.ownerID=e,this.bitmap=t,this.nodes=r};qa.prototype.get=function(e,t,r,n){void 0===t&&(t=Eo(r));var i=1<<((0===e?t:t>>>e)&fi),o=this.bitmap;return 0==(o&i)?n:this.nodes[ns(o&i-1)].get(e+5,t,r,n)},qa.prototype.update=function(e,t,r,n,i,o,a){void 0===r&&(r=Eo(n));var s=(0===t?r:r>>>t)&fi,c=1<<s,u=this.bitmap,l=0!=(u&c);if(!l&&i===pi)return this;var h=ns(u&c-1),d=this.nodes,f=l?d[h]:void 0,p=es(f,e,t+5,r,n,i,o,a);if(p===f)return this;if(!l&&p&&d.length>=as)return function(e,t,r,n,i){for(var o=0,a=new Array(di),s=0;0!==r;s++,r>>>=1)a[s]=1&r?t[o++]:void 0;return a[n]=i,new Va(e,o+1,a)}(e,d,u,s,p);if(l&&!p&&2===d.length&&ts(d[1^h]))return d[1^h];if(l&&p&&1===d.length&&ts(p))return p;var g=e&&e===this.ownerID,v=l?p?u:u^c:u|c,m=l?p?is(d,h,p,g):function(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var i=new Array(n),o=0,a=0;a<n;a++)a===t&&(o=1),i[a]=e[a+o];return i}(d,h,g):function(e,t,r,n){var i=e.length+1;if(n&&t+1===i)return e[t]=r,e;for(var o=new Array(i),a=0,s=0;s<i;s++)s===t?(o[s]=r,a=-1):o[s]=e[s+a];return o}(d,h,p,g);return g?(this.bitmap=v,this.nodes=m,this):new qa(e,v,m)};var Va=function(e,t,r){this.ownerID=e,this.count=t,this.nodes=r};Va.prototype.get=function(e,t,r,n){void 0===t&&(t=Eo(r));var i=(0===e?t:t>>>e)&fi,o=this.nodes[i];return o?o.get(e+5,t,r,n):n},Va.prototype.update=function(e,t,r,n,i,o,a){void 0===r&&(r=Eo(n));var s=(0===t?r:r>>>t)&fi,c=i===pi,u=this.nodes,l=u[s];if(c&&!l)return this;var h=es(l,e,t+5,r,n,i,o,a);if(h===l)return this;var d=this.count;if(l){if(!h&&--d<ss)return function(e,t,r,n){for(var i=0,o=0,a=new Array(r),s=0,c=1,u=t.length;s<u;s++,c<<=1){var l=t[s];void 0!==l&&s!==n&&(i|=c,a[o++]=l)}return new qa(e,i,a)}(e,u,d,s)}else d++;var f=e&&e===this.ownerID,p=is(u,s,h,f);return f?(this.count=d,this.nodes=p,this):new Va(e,d,p)};var Ka=function(e,t,r){this.ownerID=e,this.keyHash=t,this.entries=r};Ka.prototype.get=function(e,t,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(Ao(r,i[o][0]))return i[o][1];return n},Ka.prototype.update=function(e,t,r,n,i,o,a){void 0===r&&(r=Eo(n));var s=i===pi;if(r!==this.keyHash)return s?this:(gi(a),gi(o),rs(this,e,t,r,[n,i]));for(var c=this.entries,u=0,l=c.length;u<l&&!Ao(n,c[u][0]);u++);var h=u<l;if(h?c[u][1]===i:s)return this;if(gi(a),(s||!h)&&gi(o),s&&2===l)return new Ha(e,this.keyHash,c[1^u]);var d=e&&e===this.ownerID,f=d?c:oa(c);return h?s?u===l-1?f.pop():f[u]=f.pop():f[u]=[n,i]:f.push([n,i]),d?(this.entries=f,this):new Ka(e,this.keyHash,f)};var Ha=function(e,t,r){this.ownerID=e,this.keyHash=t,this.entry=r};Ha.prototype.get=function(e,t,r,n){return Ao(r,this.entry[0])?this.entry[1]:n},Ha.prototype.update=function(e,t,r,n,i,o,a){var s=i===pi,c=Ao(n,this.entry[0]);return(c?i===this.entry[1]:s)?this:(gi(a),s?void gi(o):c?e&&e===this.ownerID?(this.entry[1]=i,this):new Ha(e,this.keyHash,[n,i]):(gi(o),rs(this,e,t,Eo(n),[n,i])))},Qa.prototype.iterate=Ka.prototype.iterate=function(e,t){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(!1===e(r[t?i-n:n]))return!1},qa.prototype.iterate=Va.prototype.iterate=function(e,t){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[t?i-n:n];if(o&&!1===o.iterate(e,t))return!1}},Ha.prototype.iterate=function(e,t){return e(this.entry)};var Wa,za=function(e){function t(e,t,r){this._type=t,this._reverse=r,this._stack=e._root&&Xa(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var r=t.node,n=t.index++,i=void 0;if(r.entry){if(0===n)return Ya(e,r.entry)}else if(r.entries){if(n<=(i=r.entries.length-1))return Ya(e,r.entries[this._reverse?i-n:n])}else if(n<=(i=r.nodes.length-1)){var o=r.nodes[this._reverse?i-n:n];if(o){if(o.entry)return Ya(e,o.entry);t=this._stack=Xa(o,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(Hi);function Ya(e,t){return Wi(e,t[0],t[1])}function Xa(e,t){return{node:e,index:0,__prev:t}}function Ja(e,t,r,n){var i=Object.create(Ga);return i.size=e,i._root=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Za(){return Wa||(Wa=Ja(0))}function $a(e,t,r){var n,i;if(e._root){var o={value:!1},a={value:!1};if(n=es(e._root,e.__ownerID,0,void 0,t,r,o,a),!a.value)return e;i=e.size+(o.value?r===pi?-1:1:0)}else{if(r===pi)return e;i=1,n=new Qa(e.__ownerID,[[t,r]])}return e.__ownerID?(e.size=i,e._root=n,e.__hash=void 0,e.__altered=!0,e):n?Ja(i,n):Za()}function es(e,t,r,n,i,o,a,s){return e?e.update(t,r,n,i,o,a,s):o===pi?e:(gi(s),gi(a),new Ha(t,n,[i,o]))}function ts(e){return e.constructor===Ha||e.constructor===Ka}function rs(e,t,r,n,i){if(e.keyHash===n)return new Ka(t,n,[e.entry,i]);var o,a=(0===r?e.keyHash:e.keyHash>>>r)&fi,s=(0===r?n:n>>>r)&fi,c=a===s?[rs(e,t,r+5,n,i)]:(o=new Ha(t,n,i),a<s?[e,o]:[o,e]);return new qa(t,1<<a|1<<s,c)}function ns(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function is(e,t,r,n){var i=n?e:oa(e);return i[t]=r,i}var os=8,as=16,ss=8,cs="@@__IMMUTABLE_LIST__@@";function us(e){return Boolean(e&&e[cs])}var ls=function(e){function t(t){var r=ms();if(null==t)return r;if(us(t))return t;var n=e(t),i=n.size;return 0===i?r:(sa(i),i>0&&i<di?vs(0,i,5,null,new ds(n.toArray())):r.withMutations((function(e){e.setSize(i),n.forEach((function(t,r){return e.set(r,t)}))})))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=Ai(this,e))>=0&&e<this.size){var r=bs(this,e+=this._origin);return r&&r.array[e&fi]}return t},t.prototype.set=function(e,t){return function(e,t,r){if((t=Ai(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?_s(e,t).set(0,r):_s(e,0,t+1).set(t,r)}));t+=e._origin;var n=e._tail,i=e._root,o={value:!1};t>=Es(e._capacity)?n=As(n,e.__ownerID,0,t,r,o):i=As(i,e.__ownerID,e._level,t,r,o);if(!o.value)return e;if(e.__ownerID)return e._root=i,e._tail=n,e.__hash=void 0,e.__altered=!0,e;return vs(e._origin,e._capacity,e._level,i,n)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):ms()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(r){_s(r,0,t+e.length);for(var n=0;n<e.length;n++)r.set(t+n,e[n])}))},t.prototype.pop=function(){return _s(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){_s(t,-e.length);for(var r=0;r<e.length;r++)t.set(r,e[r])}))},t.prototype.shift=function(){return _s(this,1)},t.prototype.concat=function(){for(var t=arguments,r=[],n=0;n<arguments.length;n++){var i=t[n],o=e("string"!=typeof i&&Yi(i)?i:[i]);0!==o.size&&r.push(o)}return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations((function(e){r.forEach((function(t){return t.forEach((function(t){return e.push(t)}))}))})):this.constructor(r[0])},t.prototype.setSize=function(e){return _s(this,0,e)},t.prototype.map=function(e,t){var r=this;return this.withMutations((function(n){for(var i=0;i<r.size;i++)n.set(i,e.call(t,n.get(i),i,r))}))},t.prototype.slice=function(e,t){var r=this.size;return bi(e,t,r)?this:_s(this,_i(e,r),Ei(t,r))},t.prototype.__iterator=function(e,t){var r=t?this.size:0,n=gs(this,t);return new Hi((function(){var i=n();return i===ps?{value:void 0,done:!0}:Wi(e,t?--r:r++,i)}))},t.prototype.__iterate=function(e,t){for(var r,n=t?this.size:0,i=gs(this,t);(r=i())!==ps&&!1!==e(r,t?--n:n++,this););return n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?vs(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?ms():(this.__ownerID=e,this.__altered=!1,this)},t}(Li);ls.isList=us;var hs=ls.prototype;hs[cs]=!0,hs.delete=hs.remove,hs.merge=hs.concat,hs.setIn=_a,hs.deleteIn=hs.removeIn=wa,hs.update=Sa,hs.updateIn=Ta,hs.mergeIn=La,hs.mergeDeepIn=Pa,hs.withMutations=Ma,hs.wasAltered=Ua,hs.asImmutable=ja,hs["@@transducer/init"]=hs.asMutable=Ba,hs["@@transducer/step"]=function(e,t){return e.push(t)},hs["@@transducer/result"]=function(e){return e.asImmutable()};var ds=function(e,t){this.array=e,this.ownerID=t};ds.prototype.removeBefore=function(e,t,r){if(r===t?1<<t:0===this.array.length)return this;var n=r>>>t&fi;if(n>=this.array.length)return new ds([],e);var i,o=0===n;if(t>0){var a=this.array[n];if((i=a&&a.removeBefore(e,t-5,r))===a&&o)return this}if(o&&!i)return this;var s=ys(this,e);if(!o)for(var c=0;c<n;c++)s.array[c]=void 0;return i&&(s.array[n]=i),s},ds.prototype.removeAfter=function(e,t,r){if(r===(t?1<<t:0)||0===this.array.length)return this;var n,i=r-1>>>t&fi;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((n=o&&o.removeAfter(e,t-5,r))===o&&i===this.array.length-1)return this}var a=ys(this,e);return a.array.splice(i+1),n&&(a.array[i]=n),a};var fs,ps={};function gs(e,t){var r=e._origin,n=e._capacity,i=Es(n),o=e._tail;return a(e._root,e._level,0);function a(e,s,c){return 0===s?function(e,a){var s=a===i?o&&o.array:e&&e.array,c=a>r?0:r-a,u=n-a;u>di&&(u=di);return function(){if(c===u)return ps;var e=t?--u:c++;return s&&s[e]}}(e,c):function(e,i,o){var s,c=e&&e.array,u=o>r?0:r-o>>i,l=1+(n-o>>i);l>di&&(l=di);return function(){for(;;){if(s){var e=s();if(e!==ps)return e;s=null}if(u===l)return ps;var r=t?--l:u++;s=a(c&&c[r],i-5,o+(r<<i))}}}(e,s,c)}}function vs(e,t,r,n,i,o,a){var s=Object.create(hs);return s.size=t-e,s._origin=e,s._capacity=t,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function ms(){return fs||(fs=vs(0,0,5))}function As(e,t,r,n,i,o){var a,s=n>>>r&fi,c=e&&s<e.array.length;if(!c&&void 0===i)return e;if(r>0){var u=e&&e.array[s],l=As(u,t,r-5,n,i,o);return l===u?e:((a=ys(e,t)).array[s]=l,a)}return c&&e.array[s]===i?e:(o&&gi(o),a=ys(e,t),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function ys(e,t){return t&&e&&t===e.ownerID?e:new ds(e?e.array.slice():[],t)}function bs(e,t){if(t>=Es(e._capacity))return e._tail;if(t<1<<e._level+5){for(var r=e._root,n=e._level;r&&n>0;)r=r.array[t>>>n&fi],n-=5;return r}}function _s(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new vi,i=e._origin,o=e._capacity,a=i+t,s=void 0===r?o:r<0?o+r:i+r;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var c=e._level,u=e._root,l=0;a+l<0;)u=new ds(u&&u.array.length?[void 0,u]:[],n),l+=1<<(c+=5);l&&(a+=l,i+=l,s+=l,o+=l);for(var h=Es(o),d=Es(s);d>=1<<c+5;)u=new ds(u&&u.array.length?[u]:[],n),c+=5;var f=e._tail,p=d<h?bs(e,s-1):d>h?new ds([],n):f;if(f&&d>h&&a<o&&f.array.length){for(var g=u=ys(u,n),v=c;v>5;v-=5){var m=h>>>v&fi;g=g.array[m]=ys(g.array[m],n)}g.array[h>>>5&fi]=f}if(s<o&&(p=p&&p.removeAfter(n,0,s)),a>=d)a-=d,s-=d,c=5,u=null,p=p&&p.removeBefore(n,0,a);else if(a>i||d<h){for(l=0;u;){var A=a>>>c&fi;if(A!==d>>>c&fi)break;A&&(l+=(1<<c)*A),c-=5,u=u.array[A]}u&&a>i&&(u=u.removeBefore(n,c,a-l)),u&&d<h&&(u=u.removeAfter(n,c,d-l)),l&&(a-=l,s-=l)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=c,e._root=u,e._tail=p,e.__hash=void 0,e.__altered=!0,e):vs(a,s,c,u,p)}function Es(e){return e<di?0:e-1>>>5<<5}var ws,Is=function(e){function t(e){return null==e?Ts():vo(e)?e:Ts().withMutations((function(t){var r=Di(e);sa(r.size),r.forEach((function(e,r){return t.set(r,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var r=this._map.get(e);return void 0!==r?this._list.get(r)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Ts()},t.prototype.set=function(e,t){return Cs(this,e,t)},t.prototype.remove=function(e){return Cs(this,e,pi)},t.prototype.__iterate=function(e,t){var r=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],r)}),t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),r=this._list.__ensureOwner(e);return e?Ss(t,r,e,this.__hash):0===this.size?Ts():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=r,this)},t}(Fa);function Ss(e,t,r,n){var i=Object.create(Is.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ts(){return ws||(ws=Ss(Za(),ms()))}function Cs(e,t,r){var n,i,o=e._map,a=e._list,s=o.get(t),c=void 0!==s;if(r===pi){if(!c)return e;a.size>=di&&a.size>=2*o.size?(n=(i=a.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(n.__ownerID=i.__ownerID=e.__ownerID)):(n=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(c){if(r===a.get(s)[1])return e;n=o,i=a.set(s,[t,r])}else n=o.set(t,a.size),i=a.set(a.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=i,e.__hash=void 0,e.__altered=!0,e):Ss(n,i)}Is.isOrderedMap=vo,Is.prototype[Gi]=!0,Is.prototype.delete=Is.prototype.remove;var Rs="@@__IMMUTABLE_STACK__@@";function ks(e){return Boolean(e&&e[Rs])}var Os=function(e){function t(e){return null==e?Ls():ks(e)?e:Ls().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var r=this._head;for(e=Ai(this,e);r&&e--;)r=r.next;return r?r.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:e[n],next:r};return this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):Ds(t,r)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&ks(t))return t;sa(t.size);var r=this.size,n=this._head;return t.__iterate((function(e){r++,n={value:e,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Ds(r,n)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ls()},t.prototype.slice=function(t,r){if(bi(t,r,this.size))return this;var n=_i(t,this.size);if(Ei(r,this.size)!==this.size)return e.prototype.slice.call(this,t,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Ds(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ds(this.size,this._head,e,this.__hash):0===this.size?Ls():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var r=this;if(t)return new oo(this.toArray()).__iterate((function(t,n){return e(t,n,r)}),t);for(var n=0,i=this._head;i&&!1!==e(i.value,n++,this);)i=i.next;return n},t.prototype.__iterator=function(e,t){if(t)return new oo(this.toArray()).__iterator(e,t);var r=0,n=this._head;return new Hi((function(){if(n){var t=n.value;return n=n.next,Wi(e,r++,t)}return{value:void 0,done:!0}}))},t}(Li);Os.isStack=ks;var Ns,xs=Os.prototype;function Ds(e,t,r,n){var i=Object.create(xs);return i.size=e,i._head=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ls(){return Ns||(Ns=Ds(0))}xs[Rs]=!0,xs.shift=xs.pop,xs.unshift=xs.push,xs.unshiftAll=xs.pushAll,xs.withMutations=Ma,xs.wasAltered=Ua,xs.asImmutable=ja,xs["@@transducer/init"]=xs.asMutable=Ba,xs["@@transducer/step"]=function(e,t){return e.unshift(t)},xs["@@transducer/result"]=function(e){return e.asImmutable()};var Ps="@@__IMMUTABLE_SET__@@";function Ms(e){return Boolean(e&&e[Ps])}function Bs(e){return Ms(e)&&Qi(e)}function js(e,t){if(e===t)return!0;if(!Ti(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||Ri(e)!==Ri(t)||Oi(e)!==Oi(t)||Qi(e)!==Qi(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!Ni(e);if(Qi(e)){var n=e.entries();return t.every((function(e,t){var i=n.next().value;return i&&Ao(i[1],e)&&(r||Ao(i[0],t))}))&&n.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var a=!0,s=t.__iterate((function(t,n){if(r?!e.has(t):i?!Ao(t,e.get(n,pi)):!Ao(e.get(n,pi),t))return a=!1,!1}));return a&&e.size===s}function Us(e,t){var r=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}function Fs(e){if(!e||"object"!=typeof e)return e;if(!Ti(e)){if(!ha(e))return e;e=to(e)}if(Ri(e)){var t={};return e.__iterate((function(e,r){t[r]=Fs(e)})),t}var r=[];return e.__iterate((function(e){r.push(Fs(e))})),r}var Gs=function(e){function t(t){return null==t?Hs():Ms(t)&&!Qi(t)?t:Hs().withMutations((function(r){var n=e(t);sa(n.size),n.forEach((function(e){return r.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(Di(e).keySeq())},t.intersect=function(e){return(e=xi(e).toArray()).length?qs.intersect.apply(t(e.pop()),e):Hs()},t.union=function(e){return(e=xi(e).toArray()).length?qs.union.apply(t(e.pop()),e):Hs()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Vs(this,this._map.set(e,e))},t.prototype.remove=function(e){return Vs(this,this._map.remove(e))},t.prototype.clear=function(){return Vs(this,this._map.clear())},t.prototype.map=function(e,t){var r=this,n=!1,i=Vs(this,this._map.mapEntries((function(i){var o=i[1],a=e.call(t,o,o,r);return a!==o&&(n=!0),[a,a]}),t));return n?i:this},t.prototype.union=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(r){for(var n=0;n<t.length;n++)e(t[n]).forEach((function(e){return r.add(e)}))})):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var n=[];return this.forEach((function(e){t.every((function(t){return t.includes(e)}))||n.push(e)})),this.withMutations((function(e){n.forEach((function(t){e.remove(t)}))}))},t.prototype.subtract=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var n=[];return this.forEach((function(e){t.some((function(t){return t.includes(e)}))&&n.push(e)})),this.withMutations((function(e){n.forEach((function(t){e.remove(t)}))}))},t.prototype.sort=function(e){return hc(Yo(this,e))},t.prototype.sortBy=function(e,t){return hc(Yo(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var r=this;return this._map.__iterate((function(t){return e(t,t,r)}),t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(Pi);Gs.isSet=Ms;var Qs,qs=Gs.prototype;function Vs(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Ks(e,t){var r=Object.create(qs);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function Hs(){return Qs||(Qs=Ks(Za()))}qs[Ps]=!0,qs.delete=qs.remove,qs.merge=qs.concat=qs.union,qs.withMutations=Ma,qs.asImmutable=ja,qs["@@transducer/init"]=qs.asMutable=Ba,qs["@@transducer/step"]=function(e,t){return e.add(t)},qs["@@transducer/result"]=function(e){return e.asImmutable()},qs.__empty=Hs,qs.__make=Ks;var Ws,zs=function(e){function t(e,r,n){if(!(this instanceof t))return new t(e,r,n);if(aa(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===r&&(r=1/0),n=void 0===n?1:Math.abs(n),r<e&&(n=-n),this._start=e,this._end=r,this._step=n,this.size=Math.max(0,Math.ceil((r-e)/n-1)+1),0===this.size){if(Ws)return Ws;Ws=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+Ai(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,r){return bi(e,r,this.size)?this:(e=_i(e,this.size),(r=Ei(r,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(r,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var r=t/this._step;if(r>=0&&r<this.size)return r}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var r=this.size,n=this._step,i=t?this._start+(r-1)*n:this._start,o=0;o!==r&&!1!==e(i,t?r-++o:o++,this);)i+=t?-n:n;return o},t.prototype.__iterator=function(e,t){var r=this.size,n=this._step,i=t?this._start+(r-1)*n:this._start,o=0;return new Hi((function(){if(o===r)return{value:void 0,done:!0};var a=i;return i+=t?-n:n,Wi(e,t?r-++o:o++,a)}))},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:js(this,e)},t}(no);function Ys(e,t,r){for(var n=ca(t),i=0;i!==n.length;)if((e=pa(e,n[i++],pi))===pi)return r;return e}function Xs(e,t){return Ys(this,e,t)}function Js(e,t){return Ys(e,t,pi)!==pi}function Zs(){sa(this.size);var e={};return this.__iterate((function(t,r){e[r]=t})),e}xi.isIterable=Ti,xi.isKeyed=Ri,xi.isIndexed=Oi,xi.isAssociative=Ni,xi.isOrdered=Qi,xi.Iterator=Hi,Us(xi,{toArray:function(){sa(this.size);var e=new Array(this.size||0),t=Ri(this),r=0;return this.__iterate((function(n,i){e[r++]=t?[i,n]:n})),e},toIndexedSeq:function(){return new jo(this)},toJS:function(){return Fs(this)},toKeyedSeq:function(){return new Bo(this,!0)},toMap:function(){return Fa(this.toKeyedSeq())},toObject:Zs,toOrderedMap:function(){return Is(this.toKeyedSeq())},toOrderedSet:function(){return hc(Ri(this)?this.valueSeq():this)},toSet:function(){return Gs(Ri(this)?this.valueSeq():this)},toSetSeq:function(){return new Uo(this)},toSeq:function(){return Oi(this)?this.toIndexedSeq():Ri(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Os(Ri(this)?this.valueSeq():this)},toList:function(){return ls(Ri(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return $o(this,Wo(this,e))},includes:function(e){return this.some((function(t){return Ao(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){sa(this.size);var r=!0;return this.__iterate((function(n,i,o){if(!e.call(t,n,i,o))return r=!1,!1})),r},filter:function(e,t){return $o(this,Vo(this,e,t,!0))},find:function(e,t,r){var n=this.findEntry(e,t);return n?n[1]:r},forEach:function(e,t){return sa(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){sa(this.size),e=void 0!==e?""+e:",";var t="",r=!0;return this.__iterate((function(n){r?r=!1:t+=e,t+=null!=n?n.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return $o(this,Qo(this,e,t))},reduce:function(e,t,r){return nc(this,e,t,r,arguments.length<2,!1)},reduceRight:function(e,t,r){return nc(this,e,t,r,arguments.length<2,!0)},reverse:function(){return $o(this,qo(this,!0))},slice:function(e,t){return $o(this,Ko(this,e,t,!0))},some:function(e,t){return!this.every(ac(e),t)},sort:function(e){return $o(this,Yo(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return mi(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,r){var n=Fa().asMutable();return e.__iterate((function(i,o){n.update(t.call(r,i,o,e),0,(function(e){return e+1}))})),n.asImmutable()}(this,e,t)},equals:function(e){return js(this,e)},entrySeq:function(){var e=this;if(e._cache)return new oo(e._cache);var t=e.toSeq().map(oc).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(ac(e),t)},findEntry:function(e,t,r){var n=r;return this.__iterate((function(r,i,o){if(e.call(t,r,i,o))return n=[i,r],!1})),n},findKey:function(e,t){var r=this.findEntry(e,t);return r&&r[0]},findLast:function(e,t,r){return this.toKeyedSeq().reverse().find(e,t,r)},findLastEntry:function(e,t,r){return this.toKeyedSeq().reverse().findEntry(e,t,r)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(yi,null,e)},flatMap:function(e,t){return $o(this,function(e,t,r){var n=ta(e);return e.toSeq().map((function(i,o){return n(t.call(r,i,o,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return $o(this,zo(this,e,!0))},fromEntrySeq:function(){return new Fo(this)},get:function(e,t){return this.find((function(t,r){return Ao(r,e)}),void 0,t)},getIn:Xs,groupBy:function(e,t){return function(e,t,r){var n=Ri(e),i=(Qi(e)?Is():Fa()).asMutable();e.__iterate((function(o,a){i.update(t.call(r,o,a,e),(function(e){return(e=e||[]).push(n?[a,o]:o),e}))}));var o=ta(e);return i.map((function(t){return $o(e,o(t))})).asImmutable()}(this,e,t)},has:function(e){return this.get(e,pi)!==pi},hasIn:function(e){return Js(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:xi(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:xi(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return Ao(t,e)}))},keySeq:function(){return this.toSeq().map(ic).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Xo(this,e)},maxBy:function(e,t){return Xo(this,t,e)},min:function(e){return Xo(this,e?sc(e):uc)},minBy:function(e,t){return Xo(this,t?sc(t):uc,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return $o(this,Ho(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(ac(e),t)},sortBy:function(e,t){return $o(this,Yo(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return $o(this,function(e,t,r){var n=ra(e);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var a=0;return e.__iterate((function(e,i,s){return t.call(r,e,i,s)&&++a&&n(e,i,o)})),a},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var a=e.__iterator(2,i),s=!0;return new Hi((function(){if(!s)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var i=e.value,c=i[0],u=i[1];return t.call(r,u,c,o)?2===n?e:Wi(n,c,u,e):(s=!1,{value:void 0,done:!0})}))},n}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(ac(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=Qi(e),r=Ri(e),n=t?1:0;return function(e,t){return t=yo(t,3432918353),t=yo(t<<15|t>>>-15,461845907),t=yo(t<<13|t>>>-13,5),t=yo((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=bo((t=yo(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(r?t?function(e,t){n=31*n+lc(Eo(e),Eo(t))|0}:function(e,t){n=n+lc(Eo(e),Eo(t))|0}:t?function(e){n=31*n+Eo(e)|0}:function(e){n=n+Eo(e)|0}),n)}(this))}});var $s=xi.prototype;$s[Si]=!0,$s[Ki]=$s.values,$s.toJSON=$s.toArray,$s.__toStringMapper=da,$s.inspect=$s.toSource=function(){return this.toString()},$s.chain=$s.flatMap,$s.contains=$s.includes,Us(Di,{flip:function(){return $o(this,Go(this))},mapEntries:function(e,t){var r=this,n=0;return $o(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(e,t){var r=this;return $o(this,this.toSeq().flip().map((function(n,i){return e.call(t,n,i,r)})).flip())}});var ec=Di.prototype;ec[Ci]=!0,ec[Ki]=$s.entries,ec.toJSON=Zs,ec.__toStringMapper=function(e,t){return da(t)+": "+da(e)},Us(Li,{toKeyedSeq:function(){return new Bo(this,!1)},filter:function(e,t){return $o(this,Vo(this,e,t,!1))},findIndex:function(e,t){var r=this.findEntry(e,t);return r?r[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return $o(this,qo(this,!1))},slice:function(e,t){return $o(this,Ko(this,e,t,!1))},splice:function(e,t){var r=arguments.length;if(t=Math.max(t||0,0),0===r||2===r&&!t)return this;e=_i(e,e<0?this.count():this.size);var n=this.slice(0,e);return $o(this,1===r?n:n.concat(oa(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var r=this.findLastEntry(e,t);return r?r[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return $o(this,zo(this,e,!1))},get:function(e,t){return(e=Ai(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,r){return r===e}),void 0,t)},has:function(e){return(e=Ai(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return $o(this,function(e,t){var r=ra(e);return r.size=e.size&&2*e.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return e.__iterate((function(e){return(!o||!1!==r(t,o++,i))&&!1!==r(e,o++,i)}),n),o},r.__iteratorUncached=function(r,n){var i,o=e.__iterator(1,n),a=0;return new Hi((function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?Wi(r,a++,t):Wi(r,a++,i.value,i)}))},r}(this,e))},interleave:function(){var e=[this].concat(oa(arguments)),t=Zo(this.toSeq(),no.of,e),r=t.flatten(!0);return t.size&&(r.size=t.size*e.length),$o(this,r)},keySeq:function(){return zs(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return $o(this,Ho(this,e,t,!1))},zip:function(){var e=[this].concat(oa(arguments));return $o(this,Zo(this,cc,e))},zipAll:function(){var e=[this].concat(oa(arguments));return $o(this,Zo(this,cc,e,!0))},zipWith:function(e){var t=oa(arguments);return t[0]=this,$o(this,Zo(this,e,t))}});var tc=Li.prototype;tc[ki]=!0,tc[Gi]=!0,Us(Pi,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}});var rc=Pi.prototype;function nc(e,t,r,n,i,o){return sa(e.size),e.__iterate((function(e,o,a){i?(i=!1,r=e):r=t.call(n,r,e,o,a)}),o),r}function ic(e,t){return t}function oc(e,t){return[t,e]}function ac(e){return function(){return!e.apply(this,arguments)}}function sc(e){return function(){return-e.apply(this,arguments)}}function cc(){return oa(arguments)}function uc(e,t){return e<t?1:e>t?-1:0}function lc(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}rc.has=$s.includes,rc.contains=rc.includes,rc.keys=rc.values,Us(ro,ec),Us(no,tc),Us(io,rc);var hc=function(e){function t(e){return null==e?gc():Bs(e)?e:gc().withMutations((function(t){var r=Pi(e);sa(r.size),r.forEach((function(e){return t.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(Di(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Gs);hc.isOrderedSet=Bs;var dc,fc=hc.prototype;function pc(e,t){var r=Object.create(fc);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function gc(){return dc||(dc=pc(Ts()))}fc[Gi]=!0,fc.zip=tc.zip,fc.zipWith=tc.zipWith,fc.zipAll=tc.zipAll,fc.__empty=gc,fc.__make=pc;var vc=function(e,t){var r;!function(e){if(Ui(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(Fi(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var n=function(o){var a=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(e),c=i._indices={};i._name=t,i._keys=s,i._defaultValues=e;for(var u=0;u<s.length;u++){var l=s[u];c[l]=u,i[l]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+yc(this)+' with property "'+l+'" since that property name is part of the Record API.'):_c(i,l)}}return this.__ownerID=void 0,this._values=ls().withMutations((function(e){e.setSize(a._keys.length),Di(o).forEach((function(t,r){e.set(a._indices[r],t===a._defaultValues[r]?void 0:t)}))})),this},i=n.prototype=Object.create(mc);return i.constructor=n,t&&(n.displayName=t),n};vc.prototype.toString=function(){for(var e,t=yc(this)+" { ",r=this._keys,n=0,i=r.length;n!==i;n++)t+=(n?", ":"")+(e=r[n])+": "+da(this.get(e));return t+" }"},vc.prototype.equals=function(e){return this===e||e&&bc(this).equals(bc(e))},vc.prototype.hashCode=function(){return bc(this).hashCode()},vc.prototype.has=function(e){return this._indices.hasOwnProperty(e)},vc.prototype.get=function(e,t){if(!this.has(e))return t;var r=this._indices[e],n=this._values.get(r);return void 0===n?this._defaultValues[e]:n},vc.prototype.set=function(e,t){if(this.has(e)){var r=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(r!==this._values&&!this.__ownerID)return Ac(this,r)}return this},vc.prototype.remove=function(e){return this.set(e)},vc.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Ac(this,e)},vc.prototype.wasAltered=function(){return this._values.wasAltered()},vc.prototype.toSeq=function(){return bc(this)},vc.prototype.toJS=function(){return Fs(this)},vc.prototype.entries=function(){return this.__iterator(2)},vc.prototype.__iterator=function(e,t){return bc(this).__iterator(e,t)},vc.prototype.__iterate=function(e,t){return bc(this).__iterate(e,t)},vc.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?Ac(this,t,e):(this.__ownerID=e,this._values=t,this)},vc.isRecord=Ui,vc.getDescriptiveName=yc;var mc=vc.prototype;function Ac(e,t,r){var n=Object.create(Object.getPrototypeOf(e));return n._values=t,n.__ownerID=r,n}function yc(e){return e.constructor.displayName||e.constructor.name||"Record"}function bc(e){return lo(e._keys.map((function(t){return[t,e.get(t)]})))}function _c(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){aa(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}mc[ji]=!0,mc.delete=mc.remove,mc.deleteIn=mc.removeIn=wa,mc.getIn=Xs,mc.hasIn=$s.hasIn,mc.merge=Ca,mc.mergeWith=Ra,mc.mergeIn=La,mc.mergeDeep=xa,mc.mergeDeepWith=Da,mc.mergeDeepIn=Pa,mc.setIn=_a,mc.update=Sa,mc.updateIn=Ta,mc.withMutations=Ma,mc.asMutable=Ba,mc.asImmutable=ja,mc[Ki]=mc.entries,mc.toJSON=mc.toObject=$s.toObject,mc.inspect=mc.toSource=function(){return this.toString()};var Ec,wc=function(e){function t(e,r){if(!(this instanceof t))return new t(e,r);if(this._value=e,this.size=void 0===r?1/0:Math.max(0,r),0===this.size){if(Ec)return Ec;Ec=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return Ao(this._value,e)},t.prototype.slice=function(e,r){var n=this.size;return bi(e,r,n)?this:new t(this._value,Ei(r,n)-_i(e,n))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return Ao(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return Ao(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var r=this.size,n=0;n!==r&&!1!==e(this._value,t?r-++n:n++,this););return n},t.prototype.__iterator=function(e,t){var r=this,n=this.size,i=0;return new Hi((function(){return i===n?{value:void 0,done:!0}:Wi(e,t?n-++i:i++,r._value)}))},t.prototype.equals=function(e){return e instanceof t?Ao(this._value,e._value):js(e)},t}(no);function Ic(e,t,r,n,i,o){if("string"!=typeof r&&!Fi(r)&&(eo(r)||Yi(r)||la(r))){if(~e.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");e.push(r),i&&""!==n&&i.push(n);var a=t.call(o,n,to(r).map((function(n,o){return Ic(e,t,n,o,i,r)})),i&&i.slice());return e.pop(),i&&i.pop(),a}return r}function Sc(e,t){return Oi(t)?t.toList():Ri(t)?t.toMap():t.toSet()}var Tc={version:"4.0.0",Collection:xi,Iterable:xi,Seq:to,Map:Fa,OrderedMap:Is,List:ls,Stack:Os,Set:Gs,OrderedSet:hc,Record:vc,Range:zs,Repeat:wc,is:Ao,fromJS:function(e,t){return Ic([],t||Sc,e,"",t&&t.length>2?[]:void 0,{"":e})},hash:Eo,isImmutable:Fi,isCollection:Ti,isKeyed:Ri,isIndexed:Oi,isAssociative:Ni,isOrdered:Qi,isValueObject:mo,isPlainObject:la,isSeq:Bi,isList:us,isMap:go,isOrderedMap:vo,isStack:ks,isSet:Ms,isOrderedSet:Bs,isRecord:Ui,get:pa,getIn:Ys,has:fa,hasIn:Js,merge:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Na(e,t)},mergeDeep:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Oa(e,t)},mergeWith:function(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Na(t,r,e)},mergeDeepWith:function(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Oa(t,r,e)},remove:va,removeIn:Ea,set:ma,setIn:ba,update:Ia,updateIn:Aa};const Cc=Tc;function Rc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function kc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rc(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Oc,Nc,xc,Dc,Lc=function(){function e(t){var r=this;y(this,e),this.sequence=void 0,this.users=new Map,this.streams=new Map,this.roomProperties=Cc.Map(),this.room=void 0;var n=t.seq,i=t.users,o=t.roomProperties,a=t.roomInfo;this.sequence=n,i.forEach((function(e){var t=Pc.fromData(e),n=e.streams;(void 0===n?[]:n).forEach((function(e){r.streams.set(e.streamUuid,Mc.fromData(kc(kc({},e),{},{fromUser:{userName:t.userName,role:t.userRole,userUuid:t.userUuid}})))})),r.users.set(e.userUuid,t)})),this.roomProperties=Cc.Map(o),this.room=Bc.fromData(a)}return _(e,null,[{key:"fromData",value:function(t){return new e(t)}}]),e}(),Pc=function(){function e(t){y(this,e),this.userUuid=void 0,this.userName=void 0,this.userRole=void 0,this.userProperties=void 0,this.userName=t.userName,this.userRole=t.role,this.userUuid=t.userUuid,this.userProperties=Cc.Map(t.userProperties)}return _(e,[{key:"setUserProperties",value:function(e){this.userProperties=Cc.Map(e)}},{key:"toString",value:function(){return this.userUuid}}],[{key:"fromData",value:function(t){return new e(t)}}]),e}(),Mc=function(){function e(t){y(this,e),this.streamUuid=void 0,this.streamName=void 0,this.fromUser=void 0,this.videoSourceType=void 0,this.audioSourceType=void 0,this.videoState=void 0,this.audioState=void 0,this.videoSourceState=void 0,this.audioSourceState=void 0,this.playUrl=void 0,this.flvPlayUrl=void 0,this.rtmpPlayUrl=void 0,this.previous=void 0,this.streamUuid=t.streamUuid,this.streamName=t.streamName,this.fromUser=t.fromUser,this.videoSourceType=t.videoSourceType,this.audioSourceType=t.audioSourceType,this.videoState=t.videoState,this.audioState=t.audioState,this.videoSourceState=t.videoSourceState,this.audioSourceState=t.audioSourceState,this.playUrl=t.playUrl,this.flvPlayUrl=t.flvPlayUrl,this.rtmpPlayUrl=t.rtmpPlayUrl,["streamUuid","fromUser","videoSourceType","audioSourceType","videoState","audioState","videoSourceState","audioSourceState"].forEach((function(e){void 0===t[e]&&xn.warn("stream key ".concat(e," is unexpectedly undefined"))})),this.fromUser||(xn.error("[stream-data-struct] stream must have owner info"),Xn.shared.handleThrowableError(Qn.RTE_ERR_INVALID_DATA_STRUCT,new Error("invalid stream data")))}return _(e,[{key:"toString",value:function(){return this.streamUuid}}],[{key:"fromData",value:function(t){return new e(t)}}]),e}(),Bc=function(){function e(t){y(this,e),this.roomName=void 0,this.roomUuid=void 0,this.roomScenario=void 0,this.roomName=t.roomName,this.roomUuid=t.roomUuid,this.roomScenario=t.roomScenario}return _(e,null,[{key:"fromData",value:function(t){return new e(t)}}]),e}(),jc=function(){function e(t){y(this,e),this.fromUser=void 0,this.message=void 0,this.type=void 0,this.sendTime=void 0,this.sensitiveWords=void 0,this.messageId=void 0,this.ext=void 0,this.fromUser=t.fromUser,this.message=t.message,this.type=t.type,this.sendTime=t.sendTime,this.sensitiveWords=t.sensitiveWords,this.messageId=t.messageId||t.peerMessageId,this.ext=t.ext}return _(e,[{key:"toString",value:function(){return"".concat(this.fromUser.userName,": ").concat(this.message)}}],[{key:"fromData",value:function(t){return new e(t)}}]),e}(),Uc=__webpack_require__(9850),Fc=__webpack_require__.n(Uc),Gc=__webpack_require__(2579),Qc=__webpack_require__.n(Gc);function qc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Vc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qc(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Kc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Hc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hc(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,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,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Hc(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 Wc(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e[e.Chat=3]="Chat",e[e.RoomProperty=4]="RoomProperty",e[e.RoomProperties=5]="RoomProperties",e[e.UserInOut=20]="UserInOut",e[e.UserInfo=21]="UserInfo",e[e.UserProperty=22]="UserProperty",e[e.UserProperties=23]="UserProperties",e[e.UserSubscribeInOut=24]="UserSubscribeInOut",e[e.StreamInOut=40]="StreamInOut",e[e.StreamsInOut=41]="StreamsInOut",e[e.MessageExtension=99]="MessageExtension",e[e.BatchUserProperties=25]="BatchUserProperties"}(Nc||(Nc={})),function(e){e[e.PeerChat=1]="PeerChat"}(xc||(xc={})),function(e){e.SnapshotUpdated="snapshot-updated",e.ChatReceived="chat-received",e.UserAdded="user-added",e.UserUpdated="user-updated",e.UserRemoved="user-removed",e.RoomPropertyUpdated="room-property-updated",e.UserPropertyUpdated="user-property-updated",e.BatchUserPropertyUpdated="batch-user-property-updated",e.LocalStreamAdded="local-stream-added",e.LocalStreamUpdate="local-stream-update",e.LocalStreamRemove="local-stream-removed",e.RemoteStreamAdded="remote-stream-added",e.RemoteStreamUpdate="remote-stream-update",e.RemoteStreamRemove="remote-stream-removed",e.ChatUserMessage="user-chat-message",e.ChatRoomMessage="room-chat-message",e.NetworkStats="network-stats",e.LocalAudioVolume="local-audio-volume",e.AudioVolumes="audio-volumes",e.LocalVideoCameraListChanged="local-video-camera-list-changed",e.LocalAudioRecordingListChanged="local-audio-recording-list-changed",e.LocalAudioPlaybackListChanged="local-audio-playback-list-changed",e.LocalVideoTrackStateChanged="local-video-track-state-changed",e.LocalAudioTrackStateChanged="local-audio-track-state-changed",e.RtcConnectionStateChanged="rtc-connection-state-changed",e.RtmConnectionStateChanged="rtm-connection-state-changed",e.RteConnectionStateChanged="rte-connection-state-changed",e.TimeStampGapUpdate="timestamp-gap-update"}(Dc||(Dc={}));var zc,Yc=li.attach({proxyMethods:!1})(Oc=function(e){w(r,e);var t=Wc(r);function r(e,n){var i,o=n.sceneId,a=n.userUuid,s=n.streamUuid;return y(this,r),(i=t.call(this)).logger=void 0,i._dataStore=void 0,i._timestampGap=0,i.sceneId=void 0,i.userUuid=void 0,i.streamUuid=void 0,i.sceneId=o,i.userUuid=a,i.streamUuid=s,i._dataStore=e,i}return _(r,[{key:"handleSnapshot",value:function(e){this._dataStore.setUsers(e.users),this._dataStore.setStreams(e.streams),this._dataStore.setRoomProperties(e.roomProperties),this._dataStore.setRoomInfo(e.room),this.emit(Dc.SnapshotUpdated,e)}},{key:"handleMessage",value:function(e){switch(e.sequence.cmd){case Nc.Chat:this._handleChat(e);break;case Nc.RoomProperty:case Nc.RoomProperties:this._handleRoomProperties(e);break;case Nc.UserInOut:this._handleUserInOut(e);break;case Nc.UserInfo:this._handleUserInfo(e);break;case Nc.UserProperty:this._handleUserProperty(e);break;case Nc.UserProperties:this._handleUserProperties(e);break;case Nc.BatchUserProperties:this._handleBatchUserProperties(e);break;case Nc.UserSubscribeInOut:this._handleUserSubscribe(e);break;case Nc.StreamInOut:this._handleStreamInOut(e);break;case Nc.StreamsInOut:this._handleStreamsInOut(e);break;case Nc.MessageExtension:this._handleMessageExtension(e)}this._syncTsGapWithServerAndLocal(e)}},{key:"handlePeerMessage",value:function(e){if(e.cmd===xc.PeerChat)this._handlePeerChat(e)}},{key:"_handlePeerChat",value:function(e){var t=e.data,r=jc.fromData(t);this._dataStore.addMessage(r),this.emit(Dc.ChatUserMessage,r)}},{key:"_handleChat",value:function(e){var t=e.sequence.data,r=jc.fromData(t);this._dataStore.addMessage(r),this.emit(Dc.ChatReceived,r)}},{key:"_mergeProperties",value:function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r],o=i.split(".");if(0!==o.length){var a,s=o.filter((function(e){return e})),c=e,u=Kc(s);try{for(u.s();!(a=u.n()).done;){var l=a.value;c[l]=c[l]||{},c=c[l]}}catch(e){u.e(e)}finally{u.f()}var h=1===s.length?e:Qc()(e,hi(s).splice(0,s.length-1).join("."),{}),d=Fc()(t[i]);"deleted"===d?delete h[hi(s).pop()]:h[hi(s).pop()]=d}else this.logger.error("invalid key when batch set room properties ".concat(i))}return e}},{key:"_handleRoomProperties",value:function(e){var t=e.sequence.data,r=t.changeProperties,n=t.cause,i=t.operator;this._dataStore.setRoomProperties(this._mergeProperties(this._dataStore.roomProperties.toJS(),r));var o=Array.from(new Set(Object.keys(r).map((function(e){return e.split(".")[0]}))));this.emit(Dc.RoomPropertyUpdated,o,this._dataStore.roomProperties,i,n)}},{key:"_handleUserSubscribe",value:function(e){var t=this,r=e.sequence.data.users,n=[],i=[];r.forEach((function(e){var r=Pc.fromData(e);if(1===e.subscribe){t._dataStore.setUser(r.userUuid,r);var o=e.streams;(void 0===o?[]:o).forEach((function(e){var n=Mc.fromData(Vc(Vc({},e),{},{fromUser:{userUuid:r.userUuid,role:r.userRole,userName:r.userName}}));t._dataStore.setStream(n.streamUuid,n)})),n.push(r)}else 0===e.subscribe&&(t._dataStore.deleteStream(e.streamUuid),t._dataStore.deleteUser(e.userUuid),i.push(r))})),n.length>0&&this.emit(Dc.UserAdded,n),i.length>0&&this.emit(Dc.UserRemoved,i)}},{key:"_handleUserInOut",value:function(e){var t=this,r=e.sequence.data,n=r.offlineUsers,i=r.onlineUsers,o=n.map((function(e){var r=Pc.fromData(e);return t._dataStore.deleteStream(e.streamUuid),t._dataStore.deleteUser(e.userUuid),r})),a=i.map((function(e){var r=Pc.fromData(e);t._dataStore.setUser(r.userUuid,r);var n=e.streams;return(void 0===n?[]:n).forEach((function(e){var n=Mc.fromData(Vc(Vc({},e),{},{fromUser:{userUuid:r.userUuid,role:r.userRole,userName:r.userName}}));t._dataStore.setStream(n.streamUuid,n)})),r}));if(a.length>0&&this.emit(Dc.UserAdded,a),o.length>0){var s=n.length?n[0].type:void 0;this.emit(Dc.UserRemoved,o,s)}}},{key:"_handleUserInfo",value:function(e){var t=e.sequence.data,r=t.userUuid,n=t.userName,i=t.role,o=this._dataStore.findUser(r);if(!o)return this.logger.warn("user ".concat(r," not exists, update info failed"));o.userName=n,o.userRole=i,this.emit(Dc.UserUpdated,o)}},{key:"_handleUserProperty",value:function(e){throw"not_implemented"}},{key:"_handleUserProperties",value:function(e){var t=e.sequence.data,r=t.changeProperties,n=t.cause,i=t.fromUser,o=t.operator,a=i.userUuid,s=this._dataStore.findUser(a);if(!s)return this.logger.warn("user ".concat(a," not exists, update property failed"));s.setUserProperties(this._mergeProperties(s.userProperties.toJS(),r)),this.emit(Dc.UserPropertyUpdated,a,s.userProperties.toObject(),o,n)}},{key:"_handleBatchUserProperties",value:function(e){var t=this,r=e.sequence.data,n=r.users,i=r.operator,o=r.cause,a=n.reduce((function(e,r){var n=r.fromUser,i=r.operator,o=r.cause,a=r.changeProperties,s=n.userUuid,c=t._dataStore.findUser(s);if(c){c.setUserProperties(t._mergeProperties(c.userProperties.toJS(),a));var u={userUuid:s,userProperties:c.userProperties.toObject(),operator:i,cause:o};e.push(u)}else t.logger.warn("user ".concat(s," not exists, update property failed"));return e}),[]);if(!a.length)return this.logger.warn("no user properties have changed");this.emit(Dc.BatchUserPropertyUpdated,a,i,o)}},{key:"_processStreamEvent",value:function(e,t){var r=t.fromUser.userUuid===this.userUuid;if(3===e){var n=this._dataStore.findStream(t.streamUuid);return this._dataStore.deleteStream(t.streamUuid),t.previous=n,r?Dc.LocalStreamRemove:Dc.RemoteStreamRemove}if(2===e){var i=this._dataStore.findStream(t.streamUuid);return this._dataStore.setStream(t.streamUuid,t),t.previous=i,r?Dc.LocalStreamUpdate:Dc.RemoteStreamUpdate}return t.previous=void 0,this._dataStore.setStream(t.streamUuid,t),r?Dc.LocalStreamAdded:Dc.RemoteStreamAdded}},{key:"_handleStreamInOut",value:function(e){var t=e.sequence.data,r=t.action,n=t.fromUser,i=t.streamUuid,o=t.streamName,a=t.videoSourceType,s=t.audioSourceType,c=t.videoSourceState,u=t.audioSourceState,l=t.videoState,h=t.audioState,d=t.operator,f=t.playUrl,p=t.flvPlayUrl,g=t.rtmpPlayUrl,v=Mc.fromData({streamName:o,streamUuid:i,fromUser:n,videoSourceType:a,audioSourceType:s,videoState:l,audioState:h,videoSourceState:c,audioSourceState:u,playUrl:f,flvPlayUrl:p,rtmpPlayUrl:g}),m=this._processStreamEvent(r,v);this.emit(m,[v],d)}},{key:"_handleStreamsInOut",value:function(e){var t=this,r=e.sequence.data,n=r.streams,i=r.operator,o=(r.cause,new Map);n.forEach((function(e){var r=e.action,n=Mc.fromData(e),i=t._processStreamEvent(r,n);o.has(i)?o.set(i,o.get(i).concat([n])):o.set(i,[n])})),o.forEach((function(e,r){t.emit(r,e,i)}))}},{key:"_handleMessageExtension",value:function(e){}},{key:"_syncTsGapWithServerAndLocal",value:function(e){var t=e.sequence.timestamp-Date.now();this._timestampGap!==t&&Math.abs(this._timestampGap-t)>800&&(this._timestampGap=t,this.emit(Dc.TimeStampGapUpdate,this._timestampGap))}}]),r}(x))||Oc,Xc=li.attach({proxyMethods:!1})(zc=function(){function e(t,r){var n=this,i=r.scene,o=r.userUuid,a=r.streamUuid,s=r.channelObserver,c=r.rtm;y(this,e),this.logger=void 0,this._scene=void 0,this.userUuid=void 0,this.streamUuid=void 0,this._channelObserver=void 0,this._snapshot=void 0,this._queueTasks=[],this._currentTask=void 0,this._lastSeq=-1,this._requestingGap=!1,this._handleChannelMessage=void 0,this._handlePeerMessage=void 0,this.handle=void 0,this.runNextTask=function(){if(n._currentTask)n.logger.debug("Task Running");else{var e=n.dequeueTask();e?(n._currentTask=e,n.processTask(n._currentTask).then((function(){n._currentTask=void 0,n.notifyTaskQueueUpdate()})).catch((function(e){n.logger.error("message handle failed: ".concat(e)),n._currentTask=void 0,n.notifyTaskQueueUpdate()}))):n.logger.debug("message handle queue clear")}},this._scene=i,this.streamUuid=a,this.userUuid=o,this._handleChannelMessage=this.handleChannelMessage.bind(this),this._handlePeerMessage=this.handlePeerMessage.bind(this),this._channelObserver=s,this._channelObserver.on("ChannelMessage",this._handleChannelMessage),c.on("MessageFromPeer",this._handlePeerMessage),this.handle=new Yc(t,{sceneId:i.sceneId,userUuid:o,streamUuid:a})}var t,r;return _(e,[{key:"handlePeerMessage",value:function(e){var t=e.message;if("server"===e.peerId){this.logger.debug("peer message",t);try{var r=JSON.parse(t);this.handle.handlePeerMessage(r)}catch(e){this.logger.error("".concat(e.message," original: ").concat(t))}}}},{key:"handleChannelMessage",value:function(e){var t=e.message;if("server"===e.memberId){this.logger.debug("channel message sceneId:".concat(this._scene.sceneId),t.text);try{var r=JSON.parse(t.text);this.addTask({sequence:r})}catch(e){this.logger.error("".concat(e.message," original: ").concat(t.text))}}}},{key:"syncSnapshot",value:function(e){this._snapshot=e,this.handle.handleSnapshot(e),this._lastSeq=e.sequence,this.notifyTaskQueueUpdate()}},{key:"findSequenceGap",value:function(){if(0===this._queueTasks.length)return null;var e=this._queueTasks[0].sequence.sequence;return e-this._lastSeq>1?{seq:this._lastSeq+1,count:e-this._lastSeq-1,queueHeadSeq:e}:null}},{key:"sortTasks",value:function(){this._queueTasks=this._queueTasks.sort((function(e,t){return e.sequence.sequence-t.sequence.sequence}))}},{key:"addTask",value:function(e){this._queueTasks.push(e),this.sortTasks(),this.notifyTaskQueueUpdate()}},{key:"prependTasks",value:function(e){this._queueTasks=e.concat(this._queueTasks),this.sortTasks()}},{key:"notifyTaskQueueUpdate",value:function(){if(this._snapshot){var e=this.findSequenceGap();if(e){var t=e.seq,r=e.count,n=e.queueHeadSeq;return this.logger.warn("gap ".concat(this._lastSeq," - ").concat(n," exists, need fill ").concat(t," ").concat(r,". stop task processing before gap is resolved")),void this.syncSequenceUntilSuccess(t,r)}this.runNextTask()}else this.logger.warn("Snapshot not ready yet..wait")}},{key:"dequeueTask",value:function(){return 0===this._queueTasks.length?null:this._queueTasks.shift()}},{key:"processTask",value:(r=A(k().mark((function e(t){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._snapshot){e.next=2;break}return e.abrupt("return");case 2:if(!(t.sequence.sequence<=this._lastSeq)){e.next=5;break}return this.logger.debug("skip sequence ".concat(t.sequence.sequence,", snapshot ").concat(this._snapshot.sequence)),e.abrupt("return");case 5:return this.logger.debug("process sequence ".concat(t.sequence.sequence,", snapshot ").concat(this._snapshot.sequence,", last ").concat(this._lastSeq)),this.handle.handleMessage(t),this._lastSeq=t.sequence.sequence,e.next=10,new Promise((function(e){return setTimeout(e,0)}));case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"syncSequenceUntilSuccess",value:(t=A(k().mark((function e(t,r){var n,i,o,a,s;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._requestingGap){e.next=2;break}return e.abrupt("return");case 2:this._requestingGap=!0,n=!1,this.logger.info("begin resolve gap ".concat(t," - ").concat(r));case 5:return e.prev=5,e.next=8,this._scene.getApiService().syncSequence(this._scene.sceneId,t,r);case 8:i=e.sent,o=i.list,a=Math.min(r,o.length),s=o.slice(0,a).map((function(e){return{sequence:e}})),this.prependTasks(s),n=!0,this.logger.info("gap resolved, new ".concat(s.length," tasks prepended ")),this.notifyTaskQueueUpdate(),e.next=23;break;case 18:return e.prev=18,e.t0=e.catch(5),this.logger.error("syncSequence failed: ".concat(e.t0)),e.next=23,new Promise((function(e){return setTimeout(e,3e3)}));case 23:if(!n){e.next=5;break}case 24:this._requestingGap=!1;case 25:case"end":return e.stop()}}),e,this,[[5,18]])}))),function(e,r){return t.apply(this,arguments)})},{key:"reset",value:function(){this._channelObserver.off("ChannelMessage",this._handleChannelMessage)}}]),e}())||zc,Jc=__webpack_require__(2699),Zc=__webpack_require__(3136),$c=__webpack_require__.n(Zc),eu=__webpack_require__(2775),tu=__webpack_require__.n(eu);__webpack_require__(9601),__webpack_require__(9720);function ru(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function nu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ru(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ru(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var iu=function(){var e=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var i=new AbortController,o=setTimeout((function(){return i.abort()}),1e4);fetch(t,nu(nu({},r),{},{signal:i.signal})).then((function(t){return e(t)})).catch((function(e){n(e)})).finally((function(){clearTimeout(o)}))})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ou=function(){function e(){y(this,e),this.host=void 0,this.pathPrefix=void 0,this.headers=void 0}var t;return _(e,[{key:"fetch",value:(t=A(k().mark((function e(t){var r,n,i,o,a,s,c,u,l,h,d,f,p,g,m,A;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.method,n=t.data,i=t.full_url,o=t.path,a=t.query,s=void 0===a?{}:a,c=$n.shared.service,u=c.host,l=c.pathPrefix,h={method:r,headers:Object.assign({},$n.shared.service.headers,this.headers,t.headers)},d=Object.entries(s).filter((function(e){return!!v(e,2)[1]})).map((function(e){var t=v(e,2),r=t[0],n=t[1];return"".concat(r,"=").concat(n)})),f=d.length>0?"?".concat(d.join("&")):"",n&&(h.body=JSON.stringify(n)),e.prev=6,!i){e.next=13;break}return e.next=10,iu("".concat(i),h);case 10:p=e.sent,e.next=16;break;case 13:return e.next=15,iu("".concat(t.host||this.host||u).concat(t.pathPrefix||this.pathPrefix||l||"").concat(o).concat(f),h);case 15:p=e.sent;case 16:e.next=24;break;case 18:if(e.prev=18,e.t0=e.catch(6),20!==(g=e.t0).code){e.next=23;break}return e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_RESTFUL_NETWORK_TIMEOUT_ERR,g));case 23:return e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_RESTFUL_NETWORK_ERR,g));case 24:return e.next=26,p.json();case 26:if(m=e.sent,0==(A=+m.code)){e.next=34;break}if(!isNaN(A)){e.next=33;break}return e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_RESTFUL_SERVICE_ERR,new zn(Qn.RTE_ERR_RESTFUL_SERVICE_ERR,new Error(m.msg),{servCode:-1})));case 33:return e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_RESTFUL_SERVICE_ERR,new zn(Qn.RTE_ERR_RESTFUL_SERVICE_ERR,new Error(m.msg),{servCode:A})));case 34:return e.abrupt("return",m);case 35:case"end":return e.stop()}}),e,this,[[6,18]])}))),function(e){return t.apply(this,arguments)})}]),e}();function au(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var su,cu=function(e){w(s,e);var t,r,n,i,o,a=au(s);function s(){var e;y(this,s);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(e=a.call.apply(a,[this].concat(r))).tickerMap=new Map,e.timer=void 0,e}return _(s,[{key:"guardParams",value:function(){var e=$n.shared.appId,t=$n.shared.userId;if(e&&t)return!0;Xn.shared.handleThrowableError(Qn.RTE_ERR_MISSING_PARAMS,new Error("invalid params"))}},{key:"platform",get:function(){return $n.platform===Vn.Electron?"electron":"web"}},{key:"buildBaseParams",value:function(e,t,r,n,i,o,a){var s=(new Date).getTime(),c=tu()("src=".concat(t,"&ts=").concat(s)),u=i.result,l=i.errCode,h=i.httpCode,d=i.api;return{pts:[{m:r,ls:{ctype:e,platform:this.platform,version:Nf.getVersion(),appId:$n.shared.appId,event:o,category:a,result:void 0===u?void 0:"".concat(+u),errCode:l,httpCode:h,api:d},vs:n}],sign:c,src:t,ts:s}}},{key:"buildEventParams",value:function(e,t,r,n){return this.buildBaseParams("flexibleClass","rte","event",r,n,e,t)}},{key:"buildHBParams",value:function(){return this.buildBaseParams("flexibleClass","rte","online_user",{count:1},{})}},{key:"reportHB",value:(o=A(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.guardParams()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.fetch({path:"/v1/report",method:"POST",data:this.buildHBParams()});case 4:return t=e.sent,e.abrupt("return",t.data);case 6:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"report",value:(i=A(k().mark((function e(t,r,n,i){var o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.guardParams()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.fetch({path:"/v1/report",method:"POST",data:this.buildEventParams(t,r,n,i||{})});case 4:return o=e.sent,e.abrupt("return",o.data);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return i.apply(this,arguments)})},{key:"tickerKey",value:function(e,t,r){return"".concat(e,"/").concat(t,"/").concat(r||"")}},{key:"startTick",value:function(e,t,r){this.tickerMap.set(this.tickerKey(e,t,r),(new Date).getTime())}},{key:"getElapse",value:function(e,t,r){var n=this.tickerKey(e,t,r);return this.tickerMap.has(n)?(new Date).getTime()-this.tickerMap.get(n):0}},{key:"reportEC",value:(n=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.report(t,r,{count:1},n));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"reportElapse",value:(r=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.report(t,r,{elapse:this.getElapse(t,r,null==n?void 0:n.api)},n));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"reportHttp",value:(t=A(k().mark((function e(t,r,n,i,o,a){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.report(t,r,{elapse:this.getElapse(t,r,n)},{api:n,httpCode:i,result:o,errCode:a}));case 1:case"end":return e.stop()}}),e,this)}))),function(e,r,n,i,o,a){return t.apply(this,arguments)})}]),s}(ou);function uu(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}cu.shared=new cu,function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.RECONNECTING="RECONNECTING",e.ABORTED="ABORTED"}(su||(su={}));var lu=function(e){return void 0!==e.text},hu=function(e){w(s,e);var t,r,n,i,o,a=uu(s);function s(){var e;return y(this,s),(e=a.call(this)).connectionState=su.DISCONNECTED,e.prevConnectionState=su.DISCONNECTED,e.channels={},e._client=void 0,e.connectionState=su.DISCONNECTED,e.prevConnectionState=su.DISCONNECTED,e.channels={},e._client=void 0,e}return _(s,[{key:"client",get:function(){return this._client}},{key:"sessionId",get:function(){return this.client.context.sid}},{key:"logFilter",get:function(){var e=$c().LOG_FILTER_INFO;switch($n.logLevel){case qn.WARN:e=$c().LOG_FILTER_WARNING;break;case qn.OFF:e=$c().LOG_FILTER_OFF;break;case qn.ERROR:e=$c().LOG_FILTER_ERROR}return e}},{key:"_region",get:function(){switch($n.shared.region){case Hn.CN:return"GLOBAL";case Hn.AP:return"ASIA";case Hn.EU:return"EUROPE";case Hn.NA:return"NORTH_AMERICA"}}},{key:"login",value:(o=A(k().mark((function e(t,r,n){var i,o=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,$c().setArea({areaCodes:[this._region]}),i=$c().createInstance($n.shared.appId,{enableLogUpload:n.uploadLog,logFilter:this.logFilter}),xn.info("[rtm] wrapper init"),i.on("ConnectionStateChanged",(function(e,t){xn.info("[rtm] [Wrapper] ConnectionStateChanged",e,t),o.prevConnectionState=o.connectionState,o.connectionState=e,o.emit(Dc.RtmConnectionStateChanged,{newState:e,reason:t})})),i.on("MessageFromPeer",(function(e,t,r){lu(e)&&(xn.debug("[rtm] [Wrapper] MessageFromPeer ".concat(e.text)),o.emit("MessageFromPeer",{message:e.text,peerId:t,props:r}))})),e.next=8,i.login({uid:r,token:t});case 8:this._client=i,e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),this._destroyRtm(i),Xn.shared.handleThrowableError(Qn.RTM_ERR_LOGIN_FAIL,e.t0);case 15:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(e,t,r){return o.apply(this,arguments)})},{key:"createObserverChannel",value:function(e){return[this.client.createChannel(e),new Jc.EventEmitter]}},{key:"join",value:(i=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,cu.shared.startTick("joinRoom","rtm","joinChannel"),this.channels[n]!==t){e.next=4;break}return e.abrupt("return",xn.warn("[rtm] skip channel ".concat(n," join as the channel is already joined")));case 4:return t.on("ChannelMessage",(function(e,t,i){r.emit("ChannelMessage",{channelName:n,message:e,memberId:t,messagePros:i})})),t.on("MemberJoined",(function(e){r.emit("MemberJoined",{channelName:n,memberId:e})})),t.on("MemberLeft",(function(e){r.emit("MemberLeft",{channelName:n,memberId:e})})),t.on("MemberCountUpdated",(function(e){r.emit("MemberCountUpdated",{channelName:n,memberCount:e})})),e.next=10,t.join();case 10:this.channels[n]=t,cu.shared.reportElapse("joinRoom","rtm",{api:"joinChannel",result:!0}),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(0),cu.shared.reportElapse("joinRoom","rtm",{api:"joinChannel",result:!1,errCode:"".concat(e.t0.message)}),Xn.shared.handleThrowableError(Qn.RTM_ERR_JOIN_FAILED,e.t0);case 18:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(e,t,r){return i.apply(this,arguments)})},{key:"leave",value:(n=A(k().mark((function e(t){var r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(r=this.channels[t])){e.next=7;break}return e.next=5,r.leave();case 5:r.removeAllListeners(),delete this.channels[t];case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),Xn.shared.handleNonThrowableError(Qn.RTM_ERR_LEAVE_FAILED,e.t0);case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e){return n.apply(this,arguments)})},{key:"releaseChannels",value:function(){for(var e=0,t=Object.keys(this.channels);e<t.length;e++){var r=t[e];this.channels[r]&&this.release(this.channels[r]),this.channels[r]=void 0}}},{key:"releaseClient",value:function(){this._client&&this.release(this._client)}},{key:"release",value:function(e){e.removeAllListeners(),xn.info("[AGRtmManager] eventClient removeAllListeners ")}},{key:"reset",value:function(){this.connectionState=su.DISCONNECTED,this.prevConnectionState=su.DISCONNECTED,this.releaseClient(),this.releaseChannels(),this.channels={},this.client&&(this.client.removeAllListeners(),xn.info("[AGRtmManager] removeAllListeners")),this._client=void 0,this.removeAllListeners(),xn.info("[AGRtmManager] self removeAllListeners")}},{key:"_destroyRtm",value:function(e){try{null==e||e.logout()}catch(e){Xn.shared.handleNonThrowableError(Qn.RTM_ERR_DESTROY_FAILED,e)}}},{key:"destroyRtm",value:function(){this._destroyRtm(this._client),this._client=void 0}},{key:"sendChannelMessage",value:(r=A(k().mark((function e(t,r,n){var i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this.channels[t],e.next=3,i.sendMessage(r,{enableHistoricalMessaging:n.enableHistoricalMessaging});case 3:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"sendPeerMessage",value:(t=A(k().mark((function e(t,r,n){var i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.sendMessageToPeer(r,t,{enableHistoricalMessaging:n.enableHistoricalMessaging});case 2:return i=e.sent,e.abrupt("return",i.hasPeerReceived);case 4:case"end":return e.stop()}}),e,this)}))),function(e,r,n){return t.apply(this,arguments)})}]),s}(Jc.EventEmitter);function du(e,t,r,n,i){var o={};return Object.keys(n).forEach((function(e){o[e]=n[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}__webpack_require__(86);var fu=__webpack_require__(4073),pu=__webpack_require__.n(fu),gu=(__webpack_require__(4129),__webpack_require__(8206),new Set),vu=function(e,t,r){var n=r.value;return{configurable:!0,enumerable:!1,get:function(){var e=this.__cacheMap;return e||(e=new WeakMap,this.__cacheMap=e,gu.add(this)),e.has(n)||e.set(n,n.bind(this)),e.get(n)},set:function(e){var t=this.__cacheMap;t||(t=new WeakMap,this.__cacheMap=t,gu.add(this)),t.set(e,e.bind(this))}}};function mu(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=C(e)););return e}function Au(){return Au="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=mu(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},Au.apply(this,arguments)}var yu,bu=__webpack_require__(8711),_u=__webpack_require__.n(bu),Eu=new Set,wu={debounced:function(e,t){return function(r,n,i){var o=i.value;return{configurable:!0,enumerable:!1,get:function(){var r=this.__cacheMap;return r||(r=new WeakMap,this.__cacheMap=r,Eu.add(this)),r.has(o)||r.set(o,(0,U.debounce)(o,e,t).bind(this)),r.get(o)},set:function(e){var t=this.__cacheMap;t||(t=new WeakMap,this.__cacheMap=t,Eu.add(this)),t.set(e,e.bind(this))}}}},throttled:function(e,t){return function(r,n,i){var o=i.value;return{configurable:!0,enumerable:!1,get:function(){var r=this.__cacheMap;return r||(r=new WeakMap,this.__cacheMap=r,Eu.add(this)),r.has(o)||r.set(o,(0,U.throttle)(o,e,t).bind(this)),r.get(o)},set:function(e){var t=this.__cacheMap;t||(t=new WeakMap,this.__cacheMap=t,Eu.add(this)),t.set(e,e.bind(this))}}}}};__webpack_require__(8478),__webpack_require__(3561),__webpack_require__(2049);!function(e){e[e.continue=0]="continue",e[e.exit=1]="exit"}(yu||(yu={}));var Iu=function(e){return new Promise(function(){var t=A(k().mark((function t(r,n){var i;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e();case 3:i=t.sent,r(i),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),n(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}())},Su=function(){function e(t){y(this,e),this.__arguments=t,this.__timer=void 0,this.__running=!1}return _(e,[{key:"start",value:function(){var e=this;if(this.__running)throw new Error("Task is already running");this.__running=!0,this.__arguments.immediate?Iu(this.__arguments.runnable).then((function(){e.poll()})):this.poll()}},{key:"poll",value:function(){var e=this;if(!this.__running)return this.stop();this.__timer=setTimeout(A(k().mark((function t(){return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Iu(e.__arguments.runnable).catch((function(t){e.__arguments.onFail(t)===yu.exit&&(e.__running=!1)}));case 2:!e.__arguments.once&&e.poll();case 3:case"end":return t.stop()}}),t)}))),this.__arguments.interval)}},{key:"stop",value:function(){clearTimeout(this.__timer),this.__running=!1}},{key:"isStopped",get:function(){return!this.__running}}]),e}(),Tu=function(){function e(t){y(this,e),this.__arguments=t,this.__timer=void 0,this.__running=!1}return _(e,[{key:"start",value:function(){var e=this;if(this.__running)throw new Error("Task is already running");this.__running=!0;var t=this.__arguments,r=t.immediate,n=t.interval;r&&this.poll(),this.__timer=setInterval((function(){e.poll()}),n)}},{key:"poll",value:function(){var e=this;if(!this.__running)return this.stop();var t=this.__arguments.runnable;Iu(t).catch((function(t){e.__arguments.onFail(t)===yu.exit&&(e.__running=!1)}))}},{key:"stop",value:function(){clearInterval(this.__timer),this.__running=!1}},{key:"isStopped",get:function(){return!this.__running}}]),e}(),Cu=function(){function e(){y(this,e)}return _(e,null,[{key:"second",value:function(e){return this._factors.second*e}},{key:"minute",value:function(e){return this._factors.minute*e}},{key:"hour",value:function(e){return this._factors.hour*e}}]),e}();Cu._factors={hour:36e5,minute:6e4,second:1e3};var Ru,ku,Ou=function(){function e(){y(this,e),this._tasks=new WeakSet}return _(e,[{key:"addPollingTask",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return yu.continue},i=new Su({runnable:e,interval:t,immediate:r,onFail:n});return i.start(),this._tasks.add(i),i}},{key:"addDelayTask",value:function(e,t){var r=this,n=new Su({runnable:e,interval:t,once:!0,onFail:function(){return yu.exit},onComplete:function(){r._tasks.delete(n)}});return n.start(),this._tasks.add(n),n}},{key:"addIntervalTask",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return yu.continue},i=new Tu({runnable:e,interval:t,immediate:r,onFail:n});return i.start(),this._tasks.add(i),i}}]),e}(),Nu=function(){return new Ou},xu=Nu();function Du(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e.ReadyToPlay="ready-to-play",e.InteractiveNeeded="interactive-needed",e.CdnDelayUpdated="cdn-delay-updated"}(Ru||(Ru={}));var Lu,Pu,Mu,Bu=li.attach({proxyMethods:!1})(ku=function(e){w(r,e);var t=Du(r);function r(e){var n;return y(this,r),(n=t.call(this))._streamUrl=e,n.logger=void 0,n._view=void 0,n._mediaElement=void 0,n._containerElement=void 0,n._hls=void 0,n._task=void 0,_u().isSupported()&&!n.browserHlsSupported()&&n._createHls(),n}return _(r,[{key:"_createHls",value:function(){var e=this;this._hls=new(_u())({lowLatencyMode:!0,progressive:!0,liveSyncDuration:1});var t=this._hls;t.on(_u().Events.MEDIA_ATTACHED,(function(){t.loadSource(e._streamUrl)})),t.on(_u().Events.ERROR,(function(r,n){if(e.logger.error("HLS ->","ERROR:",r,n),n.fatal)switch(n.type){case _u().ErrorTypes.NETWORK_ERROR:e.logger.error("fatal network error encountered, try to recover"),t.loadSource(e._streamUrl);break;case _u().ErrorTypes.MEDIA_ERROR:e.logger.error("fatal media error encountered, try to recover"),t.recoverMediaError();break;default:t.destroy()}})),t.on(_u().Events.MANIFEST_PARSED,(function(t,r){e.logger.info("HLS ->","manifest loaded, found "+r.levels.length+" quality level")})),t.on(_u().Events.FRAG_PARSING_METADATA,(function(t,r){e.logger.info("HLS ->","FRAG_PARSING_METADATA:",t,r)})),t.on(_u().Events.FRAG_PARSING_USERDATA,(function(t,r){var n=r.samples.reduce((function(e,t){var r=JSON.parse(t.userData).ts;return e>r?r:e}),Date.now()),i=Date.now()-n;e.logger.info("HLS ->","FRAG_PARSING_USERDATA:",t,r,i),e.emit(Ru.CdnDelayUpdated,i+3e3)}))}},{key:"_attachMediaTag",value:function(e,t){var r,n=this;if(e!==(null===(r=this._mediaElement)||void 0===r?void 0:r.tagName)&&this._detachMediaTag(),this._view){var i,o=document.createElement(e);o.style.width="100%",o.style.height="100%",o.style.objectFit="cover",o.autoplay=!0,o.muted=!t,o.setAttribute("playsinline","");var a=document.createElement("div");a.style.width="100%",a.style.height="100%",a.style.position="relative",a.style.overflow="hidden",a.style.backgroundColor="black",a.className="agora_stream_media_player",a.appendChild(o),this._view.appendChild(a),this._mediaElement=o,this._containerElement=a,null===(i=this._mediaElement)||void 0===i||i.addEventListener("canplay",(function(){n.emit(Ru.ReadyToPlay)}),{once:!0})}if(this._mediaElement&&this._hls)this._hls.attachMedia(this._mediaElement);else{if(!this._mediaElement||!this.browserHlsSupported())throw new Error("can not play hls on this device");this._mediaElement.src=this._streamUrl,this.emit(Ru.CdnDelayUpdated,7e3)}}},{key:"_detachMediaTag",value:function(){this._mediaElement&&(this._view&&this._containerElement&&(this._view.removeChild(this._containerElement),this._containerElement=void 0),this._mediaElement=void 0),this._hls&&this._hls.detachMedia()}},{key:"takeSnapshot",value:function(){return new Blob}},{key:"setView",value:function(e){this._view&&e&&this._view!==e&&this._detachMediaTag(),this._view=e}},{key:"play",value:function(e,t){var r=this;t&&this._attachMediaTag("video",e),e&&!t&&this._attachMediaTag("audio",e),this._mediaElement&&(this._mediaElement.play().then((function(){r.emit(Ru.InteractiveNeeded,!1)})).catch((function(e){"NotAllowedError"===e.name&&r.emit(Ru.InteractiveNeeded,!0)})),this.playAttempt())}},{key:"stop",value:function(){this._mediaElement&&this._mediaElement.pause(),this._detachMediaTag()}},{key:"playAttempt",value:function(){var e=this;this._task||(this._task=xu.addPollingTask(A(k().mark((function t(){return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e._mediaElement){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,e._mediaElement.play();case 5:e.emit(Ru.InteractiveNeeded,!1),e._task&&e._task.stop(),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),e.emit(Ru.InteractiveNeeded,!0);case 12:case"end":return t.stop()}}),t,null,[[2,9]])}))),1e3))}},{key:"on",value:function(e,t){return Au(C(r.prototype),"on",this).call(this,e,t)}},{key:"once",value:function(e,t){return Au(C(r.prototype),"once",this).call(this,e,t)}},{key:"off",value:function(e,t){return Au(C(r.prototype),"off",this).call(this,e,t)}},{key:"dispose",value:function(){this._detachMediaTag(),this._hls&&this._hls.destroy(),this._task&&this._task.stop()}},{key:"browserHlsSupported",value:function(){return!!document.createElement("video").canPlayType("application/vnd.apple.mpegURL")}}]),r}(x))||ku;function ju(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e[e.None=0]="None",e[e.Camera=1]="Camera",e[e.ScreenShare=2]="ScreenShare",e[e.MediaPlayer=3]="MediaPlayer"}(Lu||(Lu={})),function(e){e[e.None=0]="None",e[e.Mic=1]="Mic",e[e.Mix=2]="Mix",e[e.MediaPlayer=3]="MediaPlayer"}(Pu||(Pu={})),function(e){e[e.Unpublished=0]="Unpublished",e[e.Published=1]="Published"}(Mu||(Mu={}));var Uu,Fu,Gu=_((function e(t,r){var n=r.videoSourceType,i=r.audioSourceType;y(this,e),this.videoSourceType=Lu.None,this.audioSourceType=Pu.None,this.rtc=void 0,this.rtc=t,n&&(this.videoSourceType=n),i&&(this.audioSourceType=i)})),Qu=function(e){w(r,e);var t=ju(r);function r(e,n){var i,o,a;return y(this,r),(a=t.call(this,e,{videoSourceType:Lu.MediaPlayer,audioSourceType:Pu.MediaPlayer})).playVideo=void 0,a.playAudio=void 0,a.streamUrl=void 0,a.player=void 0,a.playVideo=null===(i=null==n?void 0:n.playVideo)||void 0===i||i,a.playAudio=null===(o=null==n?void 0:n.playAudio)||void 0===o||o,a}return _(r,[{key:"setPlayVideo",value:function(e){this.playVideo=e}},{key:"setPlayAudio",value:function(e){this.playAudio=e}},{key:"setView",value:function(e){this.player&&this.player.dispose(),this.player=new Bu(e.streamUrl),this.player.setView(e.view)}},{key:"start",value:function(){return this.player&&(this.playVideo||this.playAudio)&&this.player.play(this.playVideo,this.playAudio),0}},{key:"stop",value:function(){return this.player&&this.player.stop(),0}}]),r}(Gu),qu=function(e){w(r,e);var t=ju(r);function r(e){var n;return y(this,r),(n=t.call(this,e,{videoSourceType:Lu.Camera})).state=zu.stopped,e.onLocalVideoTrackStateChanged((function(e,t){t===Lu.Camera&&(n.state=e)})),n}return _(r,[{key:"setView",value:function(e){this.rtc.setupLocalVideo(e,Lu.Camera)}},{key:"setDeviceId",value:function(e){this.rtc.setVideoCameraDevice(e)}},{key:"setVideoEncoderConfiguration",value:function(){}},{key:"start",value:function(){return this.rtc.enableLocalVideo(!0)}},{key:"stop",value:function(){return this.rtc.enableLocalVideo(!1)}}]),r}(Gu),Vu=function(e){w(r,e);var t=ju(r);function r(e){var n;return y(this,r),(n=t.call(this,e,{audioSourceType:Pu.Mic})).state=zu.stopped,e.onLocalAudioTrackStateChanged((function(e,t){t===Pu.Mic&&(n.state=e)})),n}return _(r,[{key:"setRecordingDevice",value:function(e){return this.rtc.setAudioRecordingDevice(e)}},{key:"setPlaybackDevice",value:function(e){return this.rtc.setAudioPlaybackDevice(e)}},{key:"start",value:function(){return this.rtc.enableLocalAudio(!0)}},{key:"stop",value:function(){return this.rtc.enableLocalAudio(!1)}}]),r}(Gu),Ku=function(e){w(r,e);var t=ju(r);function r(e){return y(this,r),t.call(this,e,{videoSourceType:Lu.ScreenShare})}return _(r,[{key:"setView",value:function(e){this.rtc.setupLocalVideo(e,Lu.ScreenShare)}},{key:"start",value:function(){return this.rtc.startScreenCapture()}},{key:"startWithParams",value:function(e,t){return this.rtc.startScreenCapture(e,t)}},{key:"stop",value:function(){return this.rtc.stopScreenCapture()}}]),r}(Gu);!function(e){e[e.main=0]="main",e[e.sub=1]="sub"}(Fu||(Fu={}));var Hu,Wu,zu,Yu,Xu,Ju,Zu,$u,el,tl,rl=li.attach({level:qn.DEBUG})(Uu=function(){function e(t,r){y(this,e),this.channelName=void 0,this._adapter=void 0,this._adapter=r,this.channelName=t}return _(e,[{key:"connectionType",value:function(e){return void 0===e?Fu.main:e}},{key:"enableDualStream",value:function(e,t){return this._adapter.enableDualStream(e,this.connectionType(t))}},{key:"setLowStreamParameter",value:function(e,t){return this._adapter.setLowStreamParameter(e,this.connectionType(t))}},{key:"setRemoteVideoStreamType",value:function(e,t,r){return this._adapter.setRemoteVideoStreamType(e,t,this.connectionType(r))}},{key:"getRtcSid",value:function(){return this._adapter.getSessionId()}},{key:"join",value:function(e,t,r){return this._adapter.join(e,t,this.connectionType(r))}},{key:"leave",value:function(e){return this._adapter.leave(e)}},{key:"setClientRole",value:function(e){return this._adapter.setClientRole(e)}},{key:"muteLocalVideoStream",value:function(e,t){return this._adapter.muteLocalVideo(e,this.connectionType(t))}},{key:"muteLocalAudioStream",value:function(e,t){return this._adapter.muteLocalAudio(e,this.connectionType(t))}},{key:"muteLocalScreenStream",value:function(e,t){return this._adapter.muteLocalScreenShare(e,this.connectionType(t))}},{key:"muteRemoteVideoStream",value:function(e,t){return this._adapter.muteRemoteVideo(e,t)}},{key:"muteRemoteAudioStream",value:function(e,t){return this._adapter.muteRemoteAudio(e,t)}},{key:"onNetworkStats",value:function(e){return this._adapter.onNetworkStats(e)}},{key:"onAudioVolumeIndication",value:function(e){return this._adapter.onAudioVolumeIndication(e)}},{key:"onConnectionStageChanged",value:function(e){return this._adapter.onConnectionStateChanged(e)}}]),e}())||Uu;__webpack_require__(3290);!function(e){e[e.unknown=99]="unknown",e[e.bad=1]="bad",e[e.poor=2]="poor",e[e.good=3]="good",e[e.great=4]="great",e[e.down=5]="down"}(Hu||(Hu={})),function(e){e[e.Unknown=0]="Unknown",e[e.PermissionDenied=1]="PermissionDenied"}(Wu||(Wu={})),function(e){e[e.stopped=0]="stopped",e[e.starting=2]="starting",e[e.started=1]="started",e[e.error=-1]="error"}(zu||(zu={})),function(e){e[e.Idle=0]="Idle",e[e.Connecting=1]="Connecting",e[e.Connected=2]="Connected",e[e.Reconnecting=3]="Reconnecting"}(Yu||(Yu={})),function(e){e[e.AES_128_XTS=1]="AES_128_XTS",e[e.AES_128_ECB=2]="AES_128_ECB",e[e.AES_256_XTS=3]="AES_256_XTS",e[e.SM4_128_ECB=4]="SM4_128_ECB",e[e.AES_128_GCM=5]="AES_128_GCM",e[e.AES_256_GCM=6]="AES_256_GCM"}(Xu||(Xu={})),function(e){e[e.Window=0]="Window",e[e.Screen=1]="Screen"}(Ju||(Ju={})),function(e){e[e.fit=0]="fit",e[e.fill=1]="fill"}(Zu||(Zu={})),function(e){e[e.low=0]="low",e[e.normal=1]="normal",e[e.height=2]="height"}($u||($u={})),function(e){e[e.HIGH_STREAM=0]="HIGH_STREAM",e[e.LOW_STREAM=1]="LOW_STREAM"}(el||(el={}));var nl=(tl=function(){function e(t,r){var n=r.userUuid,i=r.userName,o=r.userRole,a=r.streamUuid,s=r.sceneId,c=r.rtcToken,u=r.rtc,l=r.userProperties;y(this,e),this.userUuid=void 0,this.userName=void 0,this.userRole=void 0,this.userProperties=void 0,this.streamUuid=void 0,this.sceneId=void 0,this.rtcToken=void 0,this._rtc=void 0,this._scene=void 0,this._debouncedSyncVideo=pu()(this._syncVideoSourceState,500),this._debouncedSyncAudio=pu()(this._syncAudioSourceState,500),this.subStream=void 0,this.userUuid=n,this.userName=i,this.userRole=o,this.userProperties=l,this.streamUuid=a,this.sceneId=s,this.rtcToken=c,this._rtc=u,this._scene=t,this._addEventHandler()}var t,r,n,i,o,a,s,c,u,l,h;return _(e,[{key:"toData",value:function(){var e=this.userName,t=this.userUuid,r=this.userRole,n=this.userProperties;return Pc.fromData({userName:e,userUuid:t,role:r,userProperties:n})}},{key:"destroy",value:function(){var e=this._scene.engine;e.getAgoraMediaControl().off(Sl.localVideoTrackChanged,this._handleVideoTrackStateChange),e.getAgoraMediaControl().off(Sl.localAudioTrackChanged,this._handleAudioTrackStateChange)}},{key:"_addEventHandler",value:function(){var e=this._scene.engine;e.getAgoraMediaControl().on(Sl.localVideoTrackChanged,this._handleVideoTrackStateChange),e.getAgoraMediaControl().on(Sl.localAudioTrackChanged,this._handleAudioTrackStateChange)}},{key:"_handleVideoTrackStateChange",value:function(e,t){t===Lu.Camera&&e!==zu.starting&&this._debouncedSyncVideo(e)}},{key:"_handleAudioTrackStateChange",value:function(e,t){t===Pu.Mic&&e!==zu.starting&&this._debouncedSyncAudio(e)}},{key:"_syncVideoSourceState",value:function(e){xn.info("sync video state ".concat(e)),this.updateLocalMediaState({videoSourceState:e})}},{key:"_syncAudioSourceState",value:function(e){xn.info("sync audio state ".concat(e)),this.updateLocalMediaState({audioSourceState:e})}},{key:"setSceneProperties",value:(h=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().updateRoomProperties({roomUuid:this.sceneId,properties:t,cause:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteSceneProperties",value:(l=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().deleteRoomProperties({roomUuid:this.sceneId,properties:t,cause:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"setUserProperties",value:(u=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().updateUserProperties({userUuid:this.userUuid,roomUuid:this.sceneId,properties:t,cause:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"deleteUserProperties",value:(c=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().deleteUserProperties({userUuid:this.userUuid,roomUuid:this.sceneId,properties:t,cause:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateLocalMediaState",value:(s=A(k().mark((function e(t,r){var n,i,o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.videoSourceState,o=t.audioSourceState,e.next=3,this._scene.getApiService().updateDeviceState(this.sceneId,this.userUuid,r&&r===Fu.sub?(null===(n=this.subStream)||void 0===n?void 0:n.streamUuid)||"0":this.streamUuid,{videoSourceState:i,audioSourceState:o});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateLocalMediaStream",value:(a=A(k().mark((function e(t,r){var n,i,o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.publishVideo,o=t.publishAudio,e.next=3,this._scene.getApiService().upsertStream(this.sceneId,this.userUuid,r&&r===Fu.sub?(null===(n=this.subStream)||void 0===n?void 0:n.streamUuid)||"0":this.streamUuid,{publishVideo:i,publishAudio:o});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateRemoteMediaStream",value:(o=A(k().mark((function e(t,r,n,i){var o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.publishVideo,a=n.publishAudio,e.next=3,this._scene.getApiService().upsertStream(this.sceneId,t,r,{publishVideo:o,publishAudio:a});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return o.apply(this,arguments)})},{key:"deleteLocalMediaStream",value:(i=A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().deleteStream(this.sceneId,this.userUuid,this.streamUuid);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"deleteLocalScreenStream",value:(n=A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.subStream){e.next=4;break}return e.next=3,this._scene.getApiService().deleteStream(this.sceneId,this.userUuid,this.subStream.streamUuid);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"sendRoomMessage",value:(r=A(k().mark((function e(t){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._scene.getApiService().sendRoomChatMessage(t,this.sceneId);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"publishStreamToCdn",value:(t=A(k().mark((function e(t){var r,n,i,o,a,s,c,u;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=$n.shared.rtcConfigs.defaultCameraEncoderConfigurations,i=(n=t||r||{}).height,o=void 0===i?0:i,a=n.width,s=void 0===a?0:a,c=n.bitrate,u=void 0===c?0:c,e.next=4,this._scene.getApiService().publishStreamToCdn(this.sceneId,this.userUuid,this.streamUuid,{converterOptions:{height:o,width:s,bitrate:u,seiOptions:{source:{metadata:!0,datastream:!1},sink:{type:5}}}});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"setupRemoteVideo",value:function(e){this._rtc.setupRemoteVideo(e)}}]),e}(),du(tl.prototype,"_handleVideoTrackStateChange",[vu],Object.getOwnPropertyDescriptor(tl.prototype,"_handleVideoTrackStateChange"),tl.prototype),du(tl.prototype,"_handleAudioTrackStateChange",[vu],Object.getOwnPropertyDescriptor(tl.prototype,"_handleAudioTrackStateChange"),tl.prototype),du(tl.prototype,"_syncVideoSourceState",[vu],Object.getOwnPropertyDescriptor(tl.prototype,"_syncVideoSourceState"),tl.prototype),du(tl.prototype,"_syncAudioSourceState",[vu],Object.getOwnPropertyDescriptor(tl.prototype,"_syncAudioSourceState"),tl.prototype),tl),il=__webpack_require__(8640),ol=__webpack_require__.n(il);function al(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?al(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):al(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var cl=function(){function e(t,r,n){y(this,e),this.fn=void 0,this.args=void 0,this.onRetryAttemptFail=void 0,this.onRetryAbort=void 0,this.opts=void 0,this.fn=t,this.args=r,this.opts=n}var t;return _(e,[{key:"fail",value:function(e){return this.onRetryAttemptFail=e,this}},{key:"abort",value:function(e){return this.onRetryAbort=e,this}},{key:"exec",value:(t=A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ol()(this.fn,this.args,sl(sl({retriesMax:3},this.opts),{},{onAttemptFail:this.onRetryAttemptFail}));case 3:e.next=12;break;case 5:if(e.prev=5,e.t0=e.catch(0),e.t1=this.onRetryAbort,!e.t1){e.next=11;break}return e.next=11,this.onRetryAbort(e.t0);case 11:throw e.t0;case 12:case"end":return e.stop()}}),e,this,[[0,5]])}))),function(){return t.apply(this,arguments)})}]),e}(),ul=function(e,t,r){return new cl(e,t,r)},ll=function(e){try{return JSON.stringify(e)}catch(e){}return"invalid json"},hl=function(e){return new Promise((function(t){setTimeout(t,e)}))},dl=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Promise.race([e,new Promise((function(e,n){setTimeout(r?n:e,t)}))])},fl=function(){function e(){y(this,e),this._users=Cc.Map(),this._roomProperties=Cc.Map({}),this._streams=Cc.Map(),this._roomInfo=Cc.Map(),this._messages=Cc.List([])}return _(e,[{key:"users",get:function(){return this._users}},{key:"setUsers",value:function(e){this._users=Cc.Map(e)}},{key:"setUser",value:function(e,t){this._users=this._users.set(e,t)}},{key:"deleteUser",value:function(e){this._users=this._users.delete(e)}},{key:"findUser",value:function(e){return this._users.get(e)}},{key:"roomProperties",get:function(){return this._roomProperties}},{key:"setRoomProperties",value:function(e){this._roomProperties=Cc.Map(e)}},{key:"streams",get:function(){return this._streams}},{key:"setStreams",value:function(e){this._streams=Cc.Map(e)}},{key:"findUserStreams",value:function(e){return Array.from(this._streams.values()).filter((function(t){return t.fromUser.userUuid===e}))}},{key:"setStream",value:function(e,t){this._streams=this._streams.set(e,t)}},{key:"deleteStream",value:function(e){this._streams=this._streams.delete(e)}},{key:"findStream",value:function(e){return this._streams.get(e)}},{key:"roomInfo",get:function(){return this._roomInfo}},{key:"setRoomInfo",value:function(e){this._roomInfo=Cc.Map(e)}},{key:"messages",get:function(){return this._messages}},{key:"addMessage",value:function(e){this._messages.push(e)}}]),e}();function pl(e,t){return e.then((function(e){return[null,e]})).catch((function(e){return t&&Object.assign(e,t),[e,void 0]}))}const gl=pl;var vl,ml,Al;function yl(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e[e.Idle=0]="Idle",e[e.Connecting=1]="Connecting",e[e.Connected=2]="Connected",e[e.Reconnecting=3]="Reconnecting",e[e.Error=4]="Error"}(vl||(vl={})),function(e){e[e.Communication=0]="Communication",e[e.LiveBroadcasting=1]="LiveBroadcasting"}(ml||(ml={})),function(e){e[e.Host=0]="Host",e[e.Audience=1]="Audience"}(Al||(Al={}));var bl,_l=function(e){w(g,e);var t,r,n,i,o,a,s,c,u,l,h,d,f,p=yl(g);function g(){return y(this,g),p.call(this)}return _(g,[{key:"checkIn",value:(f=A(k().mark((function e(t,r,n,i,o){var a,s;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v2/rooms/".concat(t,"/users/").concat(r),pathPrefix:"/edu/apps/".concat($n.shared.appId),method:"PUT",data:{boardRegion:"cn-hz",duration:18e3,role:o,roomName:n,roomType:4,userName:i,userProperties:{}}});case 2:return a=e.sent,s=a.data,e.abrupt("return",s);case 5:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n,i){return f.apply(this,arguments)})},{key:"entryRoom",value:(d=A(k().mark((function e(t){var r,n,i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return cu.shared.startTick("joinRoom","http","entry"),e.next=3,this.fetch({path:"/v1/rooms/".concat(t.roomUuid,"/users/").concat(t.userUuid,"/entry"),method:"POST",data:t});case 3:return r=e.sent,n=r.__status,i=r.code,cu.shared.reportHttp("joinRoom","http","entry",n,200===n,i),e.abrupt("return",r.data);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"syncSnapShot",value:(h=A(k().mark((function e(t){var r,n,i,o,a,s,c,u;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v1/rooms/".concat(t,"/snapshot"),method:"GET"});case 2:return n=e.sent,i=n.data,o=null!==(r=i.sequence)&&void 0!==r?r:0,a=Qc()(i,"snapshot.room.roomInfo",null),s=Qc()(i,"snapshot.room.roomProperties",null),c=Qc()(i,"snapshot.room.roomState"),u=Qc()(i,"snapshot.users",[]),e.abrupt("return",{seq:o,roomInfo:a,roomState:c,roomProperties:s,users:u});case 10:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"syncSequence",value:(l=A(k().mark((function e(t,r,n){var i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v1/rooms/".concat(t,"/sequences?nextId=").concat(r,"&count=").concat(n),method:"GET"});case 2:return i=e.sent,e.abrupt("return",i.data);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return l.apply(this,arguments)})},{key:"updateRoomProperties",value:(u=A(k().mark((function e(t){var r,n,i,o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.roomUuid,n=t.properties,i=t.cause,o={properties:n},i&&(o.cause=i),e.next=5,this.fetch({path:"/v1/rooms/".concat(r,"/properties"),method:"PUT",data:o});case 5:return a=e.sent,e.abrupt("return",a.data);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"deleteRoomProperties",value:(c=A(k().mark((function e(t){var r,n,i,o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.roomUuid,n=t.properties,i=t.cause,o={properties:n},i&&(o.cause=i),e.next=5,this.fetch({path:"/v1/rooms/".concat(r,"/properties"),method:"DELETE",data:o});case 5:return a=e.sent,e.abrupt("return",a.data);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"updateUserProperties",value:(s=A(k().mark((function e(t){var r,n,i,o,a,s;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.roomUuid,n=t.userUuid,i=t.properties,o=t.cause,a={properties:i,cause:void 0===o?void 0:o},e.next=4,this.fetch({path:"/v1/rooms/".concat(r,"/users/").concat(n,"/properties"),method:"PUT",data:a});case 4:return s=e.sent,e.abrupt("return",s.data);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"deleteUserProperties",value:(a=A(k().mark((function e(t){var r,n,i,o,a,s,c;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.roomUuid,n=t.userUuid,i=t.properties,o=t.cause,s={properties:i},(a=void 0===o?void 0:o)&&(s.cause=a),e.next=5,this.fetch({path:"/v1/rooms/".concat(r,"/users/").concat(n,"/properties"),method:"DELETE",data:s});case 5:return c=e.sent,e.abrupt("return",c.data);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"upsertStream",value:(o=A(k().mark((function e(t,r,n,i){var o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=i.publishVideo,a=i.publishAudio,e.next=3,this.fetch({path:"/v1/rooms/".concat(t,"/users/").concat(r,"/streams/").concat(n),method:"PUT",data:{videoState:o,audioState:a}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return o.apply(this,arguments)})},{key:"deleteStream",value:(i=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v1/rooms/".concat(t,"/users/").concat(r,"/streams/").concat(n),method:"DELETE"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return i.apply(this,arguments)})},{key:"updateDeviceState",value:(n=A(k().mark((function e(t,r,n,i){var o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=i.videoSourceState,a=i.audioSourceState,e.next=3,this.fetch({path:"/v1/rooms/".concat(t,"/users/").concat(r,"/streams/").concat(n),method:"PATCH",data:{videoSourceState:o,audioSourceState:a}});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r,i){return n.apply(this,arguments)})},{key:"sendRoomChatMessage",value:(r=A(k().mark((function e(t,r){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v1/rooms/".concat(r,"/chat/channel"),method:"POST",data:{message:t,type:1}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"publishStreamToCdn",value:(t=A(k().mark((function e(t,r,n,i){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetch({path:"/v1/rooms/".concat(t,"/users/").concat(r,"/streams/").concat(n),method:"PUT",data:i});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e,r,n,i){return t.apply(this,arguments)})}]),g}(ou);function El(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?El(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):El(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Il(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Sl,Tl=li.attach({proxyMethods:!1})(bl=function(e){w(a,e);var t,r,n,i,o=Il(a);function a(e,t){var r;y(this,a),(r=o.call(this)).logger=void 0,r.sceneId=void 0,r._localUser=void 0,r._sceneState=vl.Idle,r._initialSync=!1,r._apiService=void 0,r._engine=void 0,r.dataStore=void 0,r._rtmManager=void 0,r._rtcManager=void 0,r._rtmChannel=void 0,r._rtcChannel=void 0,r._rtmChannelObserver=void 0,r._synchronizer=void 0,r._timestampGap=0,r.createTs=void 0,r.sceneId=e,r._engine=t.engine,r._rtmManager=t.rtm,r._rtcManager=t.rtc,r._rtmChannel=t.rtmChannel,r._rtmChannelObserver=t.rtmChannelObserver,r._rtcChannel=t.rtcChannel,r._apiService=new _l,r._apiService.pathPrefix=t.engine.apiServicePathPrefix,r.dataStore=new fl;var n=r._rtcChannel,i=r._rtmManager;return n.onNetworkStats((function(e){r.emit(Dc.NetworkStats,e)})),n.onAudioVolumeIndication((function(e){r.emit(Dc.AudioVolumes,e)})),n.onConnectionStageChanged((function(e,t){r.emit(Dc.RtcConnectionStateChanged,e,t)})),i.on(Dc.RtmConnectionStateChanged,r._handleRtmStateChange=r._handleRtmStateChange.bind(S(r))),r}return _(a,[{key:"getApiService",value:function(){return this._apiService}},{key:"localUser",get:function(){return this._localUser}},{key:"engine",get:function(){return this._engine}},{key:"rtcSid",get:function(){return this._rtcChannel.getRtcSid()}},{key:"rtmSid",get:function(){return this._rtmManager.sessionId}},{key:"rtcChannel",get:function(){return this._rtcChannel}},{key:"timestampServerLocalGap",get:function(){return this._timestampGap}},{key:"enableDualStream",value:function(e,t){return this._rtcChannel.enableDualStream(e,t)}},{key:"setLowStreamParameter",value:function(e,t){return this._rtcChannel.setLowStreamParameter(e,t)}},{key:"setRemoteVideoStreamType",value:function(e,t){return this._rtcChannel.setRemoteVideoStreamType(e,t)}},{key:"joinScene",value:(i=A(k().mark((function e(t){var r,n,i,o,a,s,c,u,l,h,d,f,p,g,v;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._sceneState===vl.Idle){e.next=3;break}return xn.warn("scene not idle"),e.abrupt("return");case 3:return e.prev=3,this._setRteConnectionState(vl.Connecting),r=this._engine.getAgoraMediaControl(),e.next=8,this.getApiService().entryRoom({userUuid:$n.shared.userId,roomUuid:this.sceneId,userName:t.userName,streamUuid:t.streamId,role:t.userRole,stream:{videoSourceState:r.createCameraVideoTrack().state,audioSourceState:r.createMicrophoneAudioTrack().state}});case 8:return n=e.sent,i=n.user,o=n.room,this.createTs=o.roomState.createTime,this._apiService.headers=wl(wl({},$n.shared.service.headers),{},{token:i.userToken}),e.next=15,this._rtmManager.join(this._rtmChannel,this._rtmChannelObserver,this.sceneId);case 15:return a=i.streamUuid,s=i.userName,c=i.userUuid,u=i.role,l=i.rtcToken,h=i.streams,d=void 0===h?[]:h,f=i.userProperties,p=d.map((function(e){return Mc.fromData({streamUuid:e.streamUuid,streamName:e.streamName,fromUser:{userName:s,userUuid:c,role:u},videoSourceState:e.videoSourceState,audioSourceState:e.audioSourceState,videoSourceType:e.videoSourceType,audioSourceType:e.audioSourceType,videoState:e.videoState,audioState:e.audioState,playUrl:e.playUrl,flvPlayUrl:e.flvPlayUrl,rtmpPlayUrl:e.rtmpPlayUrl})})),this.dataStore.setStreams(p),this._localUser=new nl(this,{userUuid:$n.shared.userId,userName:s,userRole:u,streamUuid:a,sceneId:this.sceneId,rtcToken:l,rtc:this._rtcManager,userProperties:f}),2===d.length&&(g=d.find((function(e){return e.streamUuid!==a})),this._localUser.subStream=g),this._synchronizer=new Xc(this.dataStore,{scene:this,userUuid:$n.shared.userId,streamUuid:a,channelObserver:this._rtmChannelObserver,rtm:this._rtmManager}),this._addEventListeners(this._synchronizer.handle),e.next=24,this.getApiService().syncSnapShot(this.sceneId);case 24:v=e.sent,this._synchronizer.syncSnapshot(Lc.fromData(v)),e.next=32;break;case 28:return e.prev=28,e.t0=e.catch(3),this._cleanup(),e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_JOIN_SCENE_FAILED,e.t0));case 32:case"end":return e.stop()}}),e,this,[[3,28]])}))),function(e){return i.apply(this,arguments)})},{key:"leaveScene",value:(n=A(k().mark((function e(){var t,r,n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gl(this._rtmManager.leave(this.sceneId));case 2:t=e.sent,r=v(t,1),(n=r[0])&&Xn.shared.handleNonThrowableError(Qn.RTE_ERR_LEAVE_SCENE_FAIL,n),this._rtmManager.off(Dc.RtmConnectionStateChanged,this._handleRtmStateChange),this._cleanup();case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"joinRTC",value:(r=A(k().mark((function e(t){var r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._initialSync&&this.localUser){e.next=2;break}return e.abrupt("return",Xn.shared.handleThrowableError(Qn.RTE_ERR_SCENE_NOT_READY,new Error("try to join rtc before scene is ready ".concat(!!this._initialSync," ").concat(!!this.localUser))));case 2:if(!t){e.next=8;break}return e.next=5,this._rtcChannel.join(t.token,t.streamUuid,t.connectionType);case 5:case 10:return e.abrupt("return",e.sent);case 8:return e.next=10,this._rtcChannel.join(this.localUser.rtcToken,null===(r=this.localUser)||void 0===r?void 0:r.streamUuid);case 11:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"leaveRTC",value:(t=A(k().mark((function e(t){var r,n,i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gl(this._rtcChannel.leave(t));case 2:r=e.sent,n=v(r,1),(i=n[0])&&Xn.shared.handleNonThrowableError(Qn.RTC_ERR_LEAVE_CHANNEL_FAIL,i);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"muteRemoteAudioStream",value:function(e,t){return this._rtcChannel.muteRemoteAudioStream(e,t)}},{key:"muteRemoteVideoStream",value:function(e,t){return this._rtcChannel.muteRemoteVideoStream(e,t)}},{key:"_cleanup",value:function(){var e;null===(e=this._localUser)||void 0===e||e.destroy(),this._localUser=void 0,this._synchronizer=void 0,this._initialSync=!1}},{key:"_setRteConnectionState",value:function(e,t){var r=this._sceneState;this._sceneState=e,this._sceneState!==r&&this.emit(Dc.RteConnectionStateChanged,e,t)}},{key:"_setInitialSnapshotSync",value:function(e){this._initialSync=e,this._recalculateRteState()}},{key:"_recalculateRteState",value:function(e){var t=this._rtmManager.connectionState,r=this._initialSync;return t===su.DISCONNECTED?this._setRteConnectionState(vl.Idle):t===su.CONNECTING?this._setRteConnectionState(vl.Connecting):t===su.CONNECTED?r?this._setRteConnectionState(vl.Connected):this._setRteConnectionState(vl.Connecting):t===su.RECONNECTING?r?this._setRteConnectionState(vl.Reconnecting):this._setRteConnectionState(vl.Connecting):t===su.ABORTED?this._setRteConnectionState(vl.Error,e):void xn.warn("unhandled rte connection state: rtm: ".concat(t,", snapshot: ").concat(r))}},{key:"_handleUserAdded",value:function(e){var t=this,r=[],n=[];e.forEach((function(e){var i;if(t.logger.info("check streams with user",e),(null===(i=t.localUser)||void 0===i?void 0:i.userUuid)===e.userUuid){var o=t.dataStore.findUserStreams(e.userUuid);o.length?(t.logger.info("local streams come with user",o),r=r.concat(o)):t.logger.info("no local streams come with user",o)}else{var a=t.dataStore.findUserStreams(e.userUuid);a.length?(t.logger.info("remote streams come with user",a),n=n.concat(a)):t.logger.info("no remote streams come with user",a)}})),this.emit(Dc.LocalStreamAdded,r),this.emit(Dc.RemoteStreamAdded,n),this.emit(Dc.UserAdded,e)}},{key:"_handleUserRemoved",value:function(e,t){var r=this,n=[],i=[];e.forEach((function(e){var t;if((null===(t=r.localUser)||void 0===t?void 0:t.userUuid)===e.userUuid){var o=r.dataStore.findUserStreams(e.userUuid);o.length&&(n=n.concat(o))}else{var a=r.dataStore.findUserStreams(e.userUuid);a.length&&(i=i.concat(a))}})),this._handleLocalStreamRemoved(n),this._handleRemoteStreamsRemoved(i),this.emit(Dc.UserRemoved,e,t)}},{key:"_handleLocalStreamRemoved",value:function(e,t){0!==e.length&&(this.logger.info("_handleLocalStreamRemoved [".concat(e.join(","),"]")),this.emit(Dc.LocalStreamRemove,e,t))}},{key:"_handleRemoteStreamsRemoved",value:function(e,t){0!==e.length&&(this.logger.info("_handleRemoteStreamsRemoved [".concat(e.join(","),"]")),this.emit(Dc.RemoteStreamRemove,e,t))}},{key:"_addEventListeners",value:function(e){var t=this;e.on(Dc.SnapshotUpdated,(function(){if(t.logger.info("sceneId:".concat(t.sceneId," snapshot updated")),t._setInitialSnapshotSync(!0),!t.localUser)return Xn.shared.handleThrowableError(Qn.RTE_ERR_LOCAL_USER_NOT_EXIST,new Error("local user not exist"));var e=t.localUser.toData();t.dataStore.setUser(t.localUser.userUuid,Pc.fromData(e));var r=Array.from(t.dataStore.users.values()).filter((function(e){return e.userUuid!==t.localUser.userUuid}));r.push(e),r.length>0&&t._handleUserAdded(r),t._handleRoomPropertyChange(Array.from(t.dataStore.roomProperties.keys()),t.dataStore.roomProperties,{},{})})),e.on(Dc.ChatReceived,(function(e){t.emit(Dc.ChatReceived,e)})),e.on(Dc.UserAdded,(function(e){t.logger.info("sceneId:".concat(t.sceneId," user-added [").concat(e.join(","),"]")),t._handleUserAdded(e)})),e.on(Dc.UserUpdated,(function(e){t.logger.info("sceneId:".concat(t.sceneId," user-updated ").concat(e))})),e.on(Dc.UserRemoved,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," user-removed [").concat(e.join(","),"]")),t._handleUserRemoved(e,r)})),e.on(Dc.RoomPropertyUpdated,(function(e,r,n,i){t.logger.debug("sceneId:".concat(t.sceneId," room-property-updated ").concat(ll(r)," ").concat(ll(n)," ").concat(ll(i))),t._handleRoomPropertyChange(e,r,n,i)})),e.on(Dc.UserPropertyUpdated,(function(e,r,n,i){t.logger.debug("sceneId:".concat(t.sceneId," user-property-updated ").concat(e," ").concat(ll(r)," ").concat(ll(n)," ").concat(ll(i))),t.emit(Dc.UserPropertyUpdated,e,r,n,i)})),e.on(Dc.BatchUserPropertyUpdated,(function(e,r,n){t.logger.debug("batch-user-property-updated ".concat(ll(e)," ").concat(ll(r)," ").concat(ll(n))),t.emit(Dc.BatchUserPropertyUpdated,e,r,n)})),e.on(Dc.LocalStreamAdded,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," local-stream-added [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.LocalStreamAdded,e,r)})),e.on(Dc.LocalStreamUpdate,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," local-stream-upsert [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.LocalStreamUpdate,e,r)})),e.on(Dc.LocalStreamRemove,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," local-stream-removed [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.LocalStreamRemove,e,r)})),e.on(Dc.RemoteStreamAdded,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," remote-stream-added [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.RemoteStreamAdded,e,r)})),e.on(Dc.RemoteStreamUpdate,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," remote-stream-upsert [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.RemoteStreamUpdate,e,r)})),e.on(Dc.RemoteStreamRemove,(function(e,r){t.logger.info("sceneId:".concat(t.sceneId," remote-stream-removed [").concat(e.join(","),"]")),0!==e.length&&t.emit(Dc.RemoteStreamRemove,e,r)})),e.on(Dc.ChatUserMessage,(function(e){t.emit(Dc.ChatUserMessage,e)})),e.on(Dc.TimeStampGapUpdate,(function(e){t._timestampGap=e,t.emit(Dc.TimeStampGapUpdate,e)}))}},{key:"_handleRoomPropertyChange",value:function(e,t,r,n){this.emit(Dc.RoomPropertyUpdated,e,t.toObject(),r,n)}},{key:"_handleRtmStateChange",value:function(e){this._recalculateRteState(e.reason)}}]),a}(Jc.EventEmitter))||bl;function Cl(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e.cameraListChanged="camera-list-changed",e.localAudioVolume="local-audio-volume",e.localAudioRecordingListChanged="local-audio-recording-list-changed",e.localVideoTrackChanged="local-video-track-changed",e.localAudioTrackChanged="local-audio-track-changed",e.trackStateChanged="track-state-changed",e.playbackDeviceListChanged="playback-device-list-changed",e.recordingDeviceListChanged="recording-device-list-changed",e.localAudioPlaybackVolumeIndicator="start-test-audio-playback-volume-indicator",e.audioPlaybackStateChanged="audio-playback-state-changed",e.localAudioFrame="local-audio-frame"}(Sl||(Sl={}));var Rl=function(e){w(r,e);var t=Cl(r);function r(e){var n;return y(this,r),(n=t.call(this)).camera=void 0,n.microphone=void 0,n.screen=void 0,n._rtc=void 0,n._rtc=e,n._addEventListener(e),n}return _(r,[{key:"_addEventListener",value:function(e){var t=this;e.getVideoDeviceManager().onLocalCameraListChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.cameraListChanged].concat(r))})),e.getAudioDeviceManager().onLocalRecordingDeviceListChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.recordingDeviceListChanged].concat(r))})),e.getAudioDeviceManager().onLocalPlaybackDeviceListChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.playbackDeviceListChanged].concat(r))})),e.getVideoDeviceManager().onLocalVideoTrackStateChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.localVideoTrackChanged].concat(r))})),e.getAudioDeviceManager().onLocalAudioTrackStateChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.localAudioTrackChanged].concat(r))})),e.getAudioDeviceManager().onLocalAudioVolume((function(e){t.emit(Sl.localAudioVolume,e)})),e.getAudioDeviceManager().onLocalAudioPlaybackTestVolumeChanged((function(e){t.emit(Sl.localAudioPlaybackVolumeIndicator,e)})),e.getAudioDeviceManager().onAudioFrame((function(e){t.emit(Sl.localAudioFrame,e)})),e.onLocalScreenShareTrackStateChanged((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.emit.apply(t,[Sl.localVideoTrackChanged].concat(r))}))}},{key:"createCameraVideoTrack",value:function(){return this.camera||(this.camera=new qu(this._rtc)),this.camera}},{key:"createMicrophoneAudioTrack",value:function(){return this.microphone||(this.microphone=new Vu(this._rtc)),this.microphone}},{key:"createScreenShareTrack",value:function(){return this.screen||(this.screen=new Ku(this._rtc)),this.screen}},{key:"getVideoCameraList",value:function(){return this._rtc.getVideoDeviceManager().getVideoCameraDevices()}},{key:"getAudioRecordingList",value:function(){return this._rtc.getAudioDeviceManager().getAudioRecordingDevices()}},{key:"getAudioPlaybackList",value:function(){return this._rtc.getAudioDeviceManager().getAudioPlaybackDevices()}},{key:"isScreenDeviceEnumerateSupported",value:function(){return this._rtc.isScreenDeviceEnumerateSupported()}},{key:"hasScreenSharePermission",value:function(){return this._rtc.hasScreenSharePermission()}},{key:"getWindowDevices",value:function(){return this._rtc.getWindowDevices()}},{key:"getDisplayDevices",value:function(){return this._rtc.getDisplayDevices()}},{key:"startAudioRecordingDeviceTest",value:function(e){return this._rtc.startAudioRecordingDeviceTest(e)}},{key:"stopAudioRecordingDeviceTest",value:function(){return this._rtc.stopAudioRecordingDeviceTest()}},{key:"startAudioPlaybackDeviceTest",value:function(e){return this._rtc.startAudioPlaybackDeviceTest(e)}},{key:"stopAudioPlaybackDeviceTest",value:function(){return this._rtc.stopAudioPlaybackDeviceTest()}},{key:"setAudioFrameCallback",value:function(){return this._rtc.setAudioFrameCallback()}},{key:"stopAudioFrameCallback",value:function(){return this._rtc.stopAudioFrameCallback()}},{key:"setBeautyEffectOptions",value:function(e,t){return this._rtc.setBeautyEffectOptions(e,t)}},{key:"setAudioRawDataConfig",value:function(e){return this._rtc.setAudioRawDataConfig(e)}},{key:"createStreamMediaTrack",value:function(){return new Qu(this._rtc)}},{key:"takeSnapshot",value:function(e,t,r){return this._rtc.takeSnapshot(e,t,r)}},{key:"getCurrentFrameData",value:function(e,t,r){return this._rtc.getCurrentFrameData(e,t,r)}}]),r}(x);__webpack_require__(1058);function kl(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Ol=function(e){w(r,e);var t=kl(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r)}(x),Nl=function(e){w(r,e);var t=kl(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r)}(x),xl=function(e){w(r,e);var t=kl(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r)}(x),Dl=function(e){w(r,e);var t=kl(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r,null,[{key:"getRtcVersion",value:function(){return""}}]),r}(x);function Ll(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Pl,Ml=function(e){w(r,e);var t=Ll(r);function r(e){var n;return y(this,r),(n=t.call(this)).adapter=e,n._deviceInfo=new Map,n._deviceIds=new Set,n._initializeDeviceList(),n}return _(r,[{key:"onLocalVideoTrackStateChanged",value:function(e){return this.adapter.onLocalVideoTrackStateChanged(e),0}},{key:"onLocalCameraListChanged",value:function(e){return this.on(Sl.cameraListChanged,e),0}},{key:"getVideoCameraDevices",value:function(){return this.cameraList}},{key:"cameraList",get:function(){var e=this,t=[];return this._deviceIds.forEach((function(r){var n=e._deviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"_emitCameraListChanged",value:function(e,t,r){this.emit(Sl.cameraListChanged,e,t,r)}},{key:"_initializeDeviceList",value:function(){var e=this;this.fetchDeviceList(),this.adapter.rtcEngine.on("videoDeviceStateChanged",(function(){e.fetchDeviceList()}))}},{key:"fetchDeviceList",value:function(){var e=this,t=this.adapter.rtcEngine.getVideoDevices(),r=[];this._deviceIds.clear(),this._deviceInfo.clear(),t.forEach((function(t){e._deviceInfo.set(t.deviceid,t),e._deviceIds.add(t.deviceid),r.push(t)})),this._emitCameraListChanged(!0,r,this.cameraList)}}]),r}(Ol),Bl=function(e){w(r,e);var t=Ll(r);function r(e){var n;return y(this,r),(n=t.call(this)).adapter=e,n._recordingDeviceInfo=new Map,n._recordingDeviceIds=new Set,n._playbackDeviceInfo=new Map,n._playbackDeviceIds=new Set,n._initializeDeviceList(),n}return _(r,[{key:"_initializeDeviceList",value:function(){var e=this;this._fetchRecordingDeviceList(),this._fetchPlaybackDeviceList(),this.adapter.rtcEngine.on("audioDeviceStateChanged",(function(){e._fetchRecordingDeviceList(),e._fetchPlaybackDeviceList()}))}},{key:"onLocalAudioPlaybackTestVolumeChanged",value:function(e){return this.adapter.onLocalAudioPlaybackTestVolumeChanged(e)}},{key:"onLocalAudioTrackStateChanged",value:function(e){return this.adapter.onLocalAudioTrackStateChanged(e)}},{key:"onLocalAudioVolume",value:function(e){return this.adapter.onLocalAudioVolume(e)}},{key:"onLocalRecordingDeviceListChanged",value:function(e){return this.on(Sl.recordingDeviceListChanged,e),0}},{key:"onLocalPlaybackDeviceListChanged",value:function(e){return this.on(Sl.playbackDeviceListChanged,e),0}},{key:"getAudioPlaybackDevices",value:function(){return this.speakerList}},{key:"getAudioRecordingDevices",value:function(){return this.microphoneList}},{key:"microphoneList",get:function(){var e=this,t=[];return this._recordingDeviceIds.forEach((function(r){var n=e._recordingDeviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"speakerList",get:function(){var e=this,t=[];return this._playbackDeviceIds.forEach((function(r){var n=e._playbackDeviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"_emitPlaybackListChanged",value:function(e,t,r){this.emit(Sl.playbackDeviceListChanged,e,t,r)}},{key:"_emitRecordingListChanged",value:function(e,t,r){this.emit(Sl.recordingDeviceListChanged,e,t,r)}},{key:"_fetchPlaybackDeviceList",value:function(){var e=this,t=this.adapter.rtcEngine.getAudioPlaybackDevices(),r=[];this._playbackDeviceInfo.clear(),this._playbackDeviceIds.clear(),t.forEach((function(t){e._playbackDeviceInfo.set(t.deviceid,t),e._playbackDeviceIds.add(t.deviceid),r.push(t)})),this._emitPlaybackListChanged(!0,r,this.speakerList)}},{key:"_fetchRecordingDeviceList",value:function(){var e=this,t=this.adapter.rtcEngine.getAudioRecordingDevices(),r=[];this._recordingDeviceInfo.clear(),this._recordingDeviceIds.clear(),t.forEach((function(t){e._recordingDeviceInfo.set(t.deviceid,t),e._recordingDeviceIds.add(t.deviceid),r.push(t)})),this._emitRecordingListChanged(!0,r,this.microphoneList)}},{key:"onAudioFrame",value:function(e){return 0}}]),r}(Nl),jl=function(){function e(){y(this,e),this.quality=Hu.good,this.qualities=[]}return _(e,[{key:"_updateQualities",value:function(t){this.qualities.push(t),this.qualities.length>e.MAX_QUALITY_NUMBER&&this.qualities.shift()}},{key:"_resetQualities",value:function(){this.qualities=[]}},{key:"toAGQuality",value:function(t){return void 0===t?this.quality:0===t||8===t||7===t?(this._resetQualities(),this.quality):6===t?(this._resetQualities(),this.quality=Hu.down,this.quality):(this._updateQualities(t),this.qualities.length<e.MAX_QUALITY_NUMBER||(this.qualities.reduce((function(e,t){return e+t}))>=e.QUALITY_THRESHOLD?this.quality=Hu.bad:this.quality=Hu.good),this.quality)}}]),e}();jl.MAX_QUALITY_NUMBER=3,jl.QUALITY_THRESHOLD=10;var Ul=li.attach({proxyMethods:!1})(Pl=function(){function e(){y(this,e),this.logger=void 0,this.rtt=void 0,this.downlinkNetworkQuality=0,this.uplinkNetworkQuality=0,this.end2EndDelay=0,this.txVideoPacketLoss=0,this.rxVideoPacketLoss=0,this.cpu=-1,this.cpuTotal=-1,this._downlinkNetworkQualityClacInstance=new jl,this._uplinkNetworkQualityClacInstance=new jl}return _(e,[{key:"networkStats",value:function(){var e={packetLoss:Math.max(this.txVideoPacketLoss,this.rxVideoPacketLoss),cpu:-1,delay:this.end2EndDelay,downlinkNetworkQuality:this._downlinkNetworkQualityClacInstance.toAGQuality(this.downlinkNetworkQuality),uplinkNetworkQuality:this._uplinkNetworkQualityClacInstance.toAGQuality(this.downlinkNetworkQuality)};return e}}]),e}())||Pl;function Fl(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Gl,Ql=function(e){w(n,e);var t,r=Fl(n);function n(){var e;y(this,n);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return(e=r.call.apply(r,[this].concat(i))).logger=void 0,e.running=!1,e.runnable=!0,e}return _(n,[{key:"run",value:function(){var e=this;if(!this.running&&this.runnable){this.running=!0;var t=setTimeout(A(k().mark((function r(){return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return clearTimeout(t),r.next=3,e.onExecution();case 3:e.running=!1;case 4:case"end":return r.stop()}}),r)}))),0)}}},{key:"onExecution",value:(t=A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"stop",value:function(){this.running=!1}}]),n}(x);function ql(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Vl,Kl,Hl,Wl=li.attach({proxyMethods:!1})(Gl=function(e){w(n,e);var t,r=ql(n);function n(e){var t;return y(this,n),(t=r.call(this)).logger=void 0,t.canvas=void 0,t.trackState=zu.stopped,t.cameraEnable=!1,t._rtcEngine=void 0,t.currentCanvas=void 0,t.videoStreamState=0,t._rtcEngine=e.rtcEngine,t}return _(n,[{key:"setCameraTrackState",value:function(e,t){this.trackState!==e&&(this.trackState=e,this.emit(Sl.trackStateChanged,e,Lu.Camera,t))}},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.debug("thread notify start..."),!this.cameraEnable){e.next=17;break}if(0!==(t=this.videoStreamState)&&3!==t){e.next=10;break}return e.delegateYield(k().mark((function e(){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.logger.debug("starting camera..."),r.setCameraTrackState(zu.starting),n=void 0,e.prev=3,0!==t){e.next=7;break}return e.next=7,new Promise((function(e){n=function(t){1!==t&&2!==t||e()},r._rtcEngine.on("localVideoStateChanged",n),r._rtcEngine.enableLocalVideo(!0);var t=$n.shared.rtcConfigs.defaultCameraEncoderConfigurations,i=t?{width:t.width,height:t.height,frameRate:t.frameRate,bitrate:t.bitrate,minFrameRate:0,orientationMode:0,minBitrate:0,mirrorMode:0,degradationPreference:1}:void 0;i&&(r._rtcEngine.setVideoEncoderConfiguration(i),r._rtcEngine.setVideoRenderFPS(i.frameRate))}));case 7:r.setCameraTrackState(zu.started),n&&r._rtcEngine.off("localVideoStateChanged",n),r.logger.debug("camera started."),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(3),r.setCameraTrackState(zu.error),n&&r._rtcEngine.off("localVideoStateChanged",n),e.abrupt("return","break");case 17:case"end":return e.stop()}}),e,null,[[3,12]])}))(),"t0",5);case 5:if("break"!==e.t0){e.next=8;break}return e.abrupt("break",23);case 8:e.next=11;break;case 10:this.trackState!==zu.started&&this.setCameraTrackState(zu.started);case 11:if(this.trackState!==zu.started){e.next=15;break}return(!this.currentCanvas&&this.canvas||this.currentCanvas&&this.canvas&&this.canvas.view!==this.currentCanvas.view)&&(this._rtcEngine.setupLocalVideo(this.canvas.view),this.currentCanvas=this.canvas),this.currentCanvas&&this.currentCanvas.view,e.abrupt("break",23);case 15:e.next=20;break;case 17:if(this.trackState!==zu.stopped&&(this.logger.debug("stopping camera..."),this._rtcEngine.enableLocalVideo(!1),this.currentCanvas&&this.currentCanvas.view,this.setCameraTrackState(zu.stopped),this.logger.debug("camera stopped")),this.trackState!==zu.stopped){e.next=20;break}return e.abrupt("break",23);case 20:return e.next=22,new Promise((function(e){return setTimeout(e,500)}));case 22:if(this.running){e.next=0;break}case 23:this.logger.debug("thread sleep...");case 24:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),n}(Ql))||Gl;function zl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yl(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Xl=_((function e(){y(this,e)}));try{Xl=__webpack_require__(5455).default}catch(e){$n.platform===Vn.Electron&&xn.warn("load electron sdk failed: ".concat(e))}var Jl=li.attach({proxyMethods:!1})((Kl=function(e){w(r,e);var t=Yl(r);function r(){var e;y(this,r),(e=t.call(this)).logger=void 0,e._vdm=void 0,e._adm=void 0,e._engine=void 0,e._channels=new Map,e._configs={},e._screenEventBus=new x,e.cameraThread=void 0,e._localVideoEnabled=!1,e._localAudioEnabled=!1,e.screenShareId=void 0,e.screenShareType=void 0,r.rtcEngine||(r.rtcEngine=new Xl),e._engine=r.rtcEngine;var n=r.logPath,i=0;if(n){xn.info("[RtcAdapterElectron] sdk log path: ".concat(n));window.require("path");i=e.rtcEngine.initialize($n.shared.appId,e._region,{filePath:n,fileSize:1024,level:1})}else xn.warn("[RtcAdapterElectron] no log path found, sdk logs will be put in default folder"),i=e.rtcEngine.initialize($n.shared.appId,e._region);return e.rtcEngine.registerMediaMetadataObserver(),0!==i&&Xn.shared.handleThrowableError(Qn.RTC_ERR_RTC_ENGINE_INITIALZIE_FAILED,new Error("rtc engine initialize failed ".concat(i))),$n.shared.rtcSDKParameters&&$n.shared.rtcSDKParameters.forEach((function(t){e.rtcEngine.setParameters(JSON.stringify(t))})),e._adm=new Bl(S(e)),e._vdm=new Ml(S(e)),e.cameraThread=new Wl(S(e)),e._addEventListeners(),e}return _(r,[{key:"configs",get:function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zl(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},this._configs)}},{key:"rtcEngine",get:function(){return this._engine}},{key:"createRtcChannel",value:function(e,t){var r=this._channels.get(e);return r||(r=new Zl(e,this.configs,t),this._channels.set(e,r)),r}},{key:"getVideoDeviceManager",value:function(){return this._vdm}},{key:"getAudioDeviceManager",value:function(){return this._adm}},{key:"getWindowDevices",value:function(){var e=this;return new Promise((function(t){e.rtcEngine.getScreenWindowsInfo((function(e){t(e.map((function(e){return{id:e.windowId,type:Ju.Window,title:e.name||e.ownerName,image:e.image,isCurrent:"".concat(e.processId)===window.main_pid}})))}))}))}},{key:"getDiaplayDevices",value:function(){var e=this;return new Promise((function(t){e.rtcEngine.getScreenDisplaysInfo((function(e){t(e.map((function(e){return{id:e.displayId.id,type:Ju.Screen,title:"Display",image:e.image}})))}))}))}},{key:"isScreenDeviceEnumerateSupported",value:function(){return!0}},{key:"setVideoCameraDevice",value:function(e){return this.rtcEngine.setVideoDevice(e)}},{key:"setAudioRecordingDevice",value:function(e){return this.rtcEngine.setAudioRecordingDevice(e)}},{key:"setAudioPlaybackDevice",value:function(e){return this.rtcEngine.setAudioPlaybackDevice(e)}},{key:"enableLocalVideo",value:function(e){return this._localVideoEnabled=e,this.updateRole(),this.cameraThread.cameraEnable=e,this.cameraThread.run(),0}},{key:"enableLocalAudio",value:function(e){return this._localAudioEnabled=e,this.updateRole(),this.rtcEngine.enableLocalAudio(e)}},{key:"setupLocalVideo",value:function(e,t){return t===Lu.Camera?(this.cameraThread.canvas=e,this.cameraThread.run()):t===Lu.ScreenShare&&this.rtcEngine.setupLocalVideoSource(e.view),0}},{key:"setupRemoteVideo",value:function(e){return this.rtcEngine.setupRemoteVideo(+e.streamUuid,e.view),this.rtcEngine.setupViewContentMode(+e.streamUuid,e.renderMode===Zu.fill?0:1,void 0),0}},{key:"startAudioRecordingDeviceTest",value:function(e){return this.rtcEngine.startAudioRecordingDeviceTest(e)}},{key:"stopAudioRecordingDeviceTest",value:function(){return this.rtcEngine.stopAudioRecordingDeviceTest()}},{key:"startAudioPlaybackDeviceTest",value:function(e){return this.rtcEngine.startAudioPlaybackDeviceTest(e)}},{key:"stopAudioPlaybackDeviceTest",value:function(){return this.rtcEngine.stopAudioPlaybackDeviceTest()}},{key:"startScreenCapture",value:function(e,t){return this.rtcEngine.videoSourceInitialize($n.shared.appId),void 0!==e&&(this.screenShareId=e,this.screenShareType=t,this._screenEventBus.emit(Sl.trackStateChanged,zu.started,Lu.ScreenShare)),0}},{key:"stopScreenCapture",value:function(){return this.screenShareId=void 0,this.screenShareType=void 0,this.rtcEngine.stopScreenCapture2(),this._screenEventBus.emit(Sl.trackStateChanged,zu.stopped,Lu.ScreenShare),0}},{key:"onLocalAudioPlaybackTestVolumeChanged",value:function(e){return this.on(Sl.localAudioPlaybackVolumeIndicator,e),0}},{key:"onLocalVideoTrackStateChanged",value:function(e){return this.cameraThread.on(Sl.trackStateChanged,e),0}},{key:"onLocalAudioTrackStateChanged",value:function(e){return this.on(Sl.localAudioTrackChanged,e),0}},{key:"onLocalAudioVolume",value:function(e){return this.on(Sl.localAudioVolume,e),0}},{key:"onLocalScreenShareTrackStateChanged",value:function(e){return this._screenEventBus.on(Sl.trackStateChanged,e),0}},{key:"onAudioFrame",value:function(e){return this.logger.warn("electron platform does not support this for now"),0}},{key:"setBeautyEffectOptions",value:function(e,t){return this.rtcEngine.setBeautyEffectOptions(e,t)}},{key:"setAudioFrameCallback",value:function(){return this.logger.warn("electron platform does not support this for now"),0}},{key:"stopAudioFrameCallback",value:function(){return this.logger.warn("electron platform does not support this for now"),0}},{key:"setAudioRawDataConfig",value:function(e){return this.logger.warn("electron platform does not support this for now"),0}},{key:"hasScreenSharePermission",value:function(){return!r.remote||"denied"!==r.remote.systemPreferences.getMediaAccessStatus("screen")}},{key:"takeSnapshot",value:function(e,t,r){var n=this;return new Promise((function(i,o){n.rtcEngine.once("snapshotTaken",(function(e,t,r,n,o,a){i({channel:e,uid:t,filePath:r,width:n,height:o,errCode:a})})),0!==n.rtcEngine.takeSnapshot(e,t,r)&&o()}))}},{key:"getCurrentFrameData",value:function(e,t,r){return this.logger.warn("electron platform does not support this"),new ImageData(1,1)}},{key:"destroy",value:function(){var e=this.rtcEngine.release();return r.rtcEngine=void 0,e}},{key:"_region",get:function(){switch($n.shared.region){case Hn.CN:return 4294967295;case Hn.AP:return 8;case Hn.EU:return 4;case Hn.NA:return 2}}},{key:"_addEventListeners",value:function(){var e=this;this.rtcEngine.on("localVideoStateChanged",(function(t,r){e.logger.info("[rtc] video state changed ".concat(t," ").concat(r)),e.cameraThread.videoStreamState=t})),this.rtcEngine.on("localAudioStateChanged",(function(t){0===t&&e.emit(Sl.localAudioTrackChanged,zu.stopped,Pu.Mic),2!==t&&1!==t||e.emit(Sl.localAudioTrackChanged,zu.started,Pu.Mic)})),this.rtcEngine.on("groupAudioVolumeIndication",(function(t){var r=t.find((function(e){return 0===e.uid})),n=t.find((function(e){return 1===e.uid}));r&&e.emit(Sl.localAudioVolume,r.volume/255),n&&e.emit(Sl.localAudioPlaybackVolumeIndicator,n.volume/255)}))}},{key:"updateRole",value:function(){var e;(null!==(e=$n.shared.rtcConfigs.channelProfile)&&void 0!==e?e:ml.LiveBroadcasting)===ml.LiveBroadcasting&&(this._localVideoEnabled||this._localAudioEnabled?(this.logger.info("update rtc role to host"),this.rtcEngine.setClientRole(1)):(this.logger.info("update rtc role to audience"),this.rtcEngine.setClientRole(2)))}}],[{key:"remote",get:function(){var e=window.require("electron").remote;if(e)return e;xn.warn("enableRemoteModule is not set, we will not be able to tell you screenshare access status in this case. You can still use screenshare feature though")}},{key:"getRtcVersion",value:function(){if(!this.version){var e=this.rtcEngine;e||(e=new Xl),this.version=e.getVersion(),this.rtcEngine||e.release()}var t=this.version,r=t.version,n=t.build;return"".concat(r,".").concat(n)}},{key:"logBasePath",get:function(){if(r.remote)return r.remote.app.getPath("logs")}},{key:"logFolderPath",get:function(){if(this.logBasePath)return window.require("path").resolve(this.logBasePath,"logs")}},{key:"logPath",get:function(){var e=this.logFolderPath;if(e)return window.require("path").resolve(e,"sdk.log")}}]),r}(Dl),Kl.rtcEngine=void 0,Kl.version=void 0,Vl=Kl))||Vl,Zl=li.attach({proxyMethods:!1})(Hl=function(e){w(r,e);var t=Yl(r);function r(e,n,i){var o;return y(this,r),(o=t.call(this)).logger=void 0,o.channelName=void 0,o.uid=void 0,o.base=void 0,o._muteLocalVideo=!1,o._muteLocalAudio=!1,o._metaTask=void 0,o._networkStats=new Ul,o.channelName=e,o.base=i,xu.addPollingTask((function(){o.emit(Dc.NetworkStats,o._networkStats.networkStats())}),Cu.second(2)),o._addEventListeners(),o}return _(r,[{key:"_channelProfile",get:function(){var e;return null!==(e=$n.shared.rtcConfigs.channelProfile)&&void 0!==e?e:ml.LiveBroadcasting}},{key:"getSessionId",value:function(){return this.base.rtcEngine.getCallId()}},{key:"enableDualStream",value:function(e){return 0===this.base.rtcEngine.enableDualStreamMode(e)?Promise.resolve():Promise.reject()}},{key:"setLowStreamParameter",value:function(e){var t={"che.video.lowBitRateStreamParameter":e};return this.base.rtcEngine.setParameters(JSON.stringify(t))}},{key:"getCurrentFrameData",value:function(e){return this.logger.warn("electron platform does not support this"),new ImageData(1,1)}},{key:"setRemoteVideoStreamType",value:function(e,t){return 0===this.base.rtcEngine.setRemoteVideoStreamType(+e,t)?Promise.resolve():Promise.reject()}},{key:"onConnectionStateChanged",value:function(e){return this.on(Dc.RtcConnectionStateChanged,e),0}},{key:"leave",value:function(e){return(null!=e?e:Fu.main)===Fu.main?this.base.rtcEngine.leaveChannel():this.base.rtcEngine.videoSourceLeave(),Promise.resolve()}},{key:"setClientRole",value:function(e){return this.base.rtcEngine.setClientRole(e===Al.Host?1:2)}},{key:"onNetworkStats",value:function(e){return this.on(Dc.NetworkStats,e),0}},{key:"onAudioVolumeIndication",value:function(e){return this.on(Dc.AudioVolumes,e),0}},{key:"muteRemoteVideo",value:function(e,t){return this.base.rtcEngine.muteRemoteVideoStream(+e,t)}},{key:"muteRemoteAudio",value:function(e,t){return this.base.rtcEngine.muteRemoteAudioStream(+e,t)}},{key:"_startScreenCapture",value:function(){var e,t,r,n,i=this.base.screenShareType,o=this.base.screenShareId;if(void 0!==o&&void 0!==i){var a=$n.shared.rtcConfigs.defaultScreenEncoderConfigurations,s={width:null!==(e=null==a?void 0:a.width)&&void 0!==e?e:0,height:null!==(t=null==a?void 0:a.height)&&void 0!==t?t:0,frameRate:null!==(r=null==a?void 0:a.frameRate)&&void 0!==r?r:10,bitrate:null!==(n=null==a?void 0:a.bitrate)&&void 0!==n?n:0,captureMouseCursor:!0,windowFocus:!0,excludeWindowCount:0,excludeWindowList:[]},c={width:0,height:0,x:0,y:0};if(i===Ju.Screen){var u="darwin"===process.platform?{id:parseInt(o),width:0,height:0,x:0,y:0}:{width:0,height:0,x:0,y:0};this.base.rtcEngine.videoSourceStartScreenCaptureByScreen(u,c,s)}else i===Ju.Window&&this.base.rtcEngine.videoSourceStartScreenCaptureByWindow(o,c,s)}}},{key:"join",value:function(e,t,r){var n=this;return new Promise((function(i,o){var a=n.base.rtcEngine;if(r===Fu.main)a.once("joinedChannel",(function(){i()})),a.setChannelProfile(n._channelProfile),a.enableAudioVolumeIndication(500,3),a.joinChannel(e,n.channelName,"",+t),n.uid=+t;else if(r===Fu.sub){a.once("videoSourceJoinedSuccess",(function(){n._startScreenCapture(),i()})),a.videoSourceSetChannelProfile(n._channelProfile);var s=a.videoSourceJoin(e,n.channelName,"",+t);n.logger.info("[rtc] videosource join ".concat(s))}}))}},{key:"muteLocalVideo",value:function(e,t){var r=this.base.rtcEngine.muteLocalVideoStream(e);return 0===r&&(this._muteLocalVideo=e),this._muteLocalVideo&&this._muteLocalAudio?this._stopEmitMetadata():this._emitMetadata(),r}},{key:"muteLocalAudio",value:function(e,t){var r=this.base.rtcEngine.muteLocalAudioStream(e);return 0===r&&(this._muteLocalAudio=e),this._muteLocalVideo&&this._muteLocalAudio?this._stopEmitMetadata():this._emitMetadata(),r}},{key:"muteLocalScreenShare",value:function(e,t){return 0}},{key:"_getRtcState",value:function(e){switch(e){case 1:case 5:return Yu.Idle;case 2:return Yu.Connecting;case 3:return Yu.Connected;case 4:return Yu.Reconnecting}}},{key:"_addEventListeners",value:function(){var e=this,t=this.base.rtcEngine;t.on("networkQuality",(function(t,r,n){0===t&&(e._networkStats.downlinkNetworkQuality=n,e._networkStats.uplinkNetworkQuality=r)})),t.on("rtcStats",(function(t){var r=t.txPacketLossRate,n=t.rxPacketLossRate,i=t.cpuAppUsage,o=t.cpuTotalUsage,a=t.lastmileDelay,s=t.gatewayRtt;e._networkStats.txVideoPacketLoss=r/100,e._networkStats.rxVideoPacketLoss=n/100,e._networkStats.rtt=s,e._networkStats.end2EndDelay=a,e._networkStats.cpu=i/100,e._networkStats.cpuTotal=o/100})),t.on("groupAudioVolumeIndication",(function(t){var r=new Map;t.forEach((function(e){return r.set(""+e.uid,e.volume)})),e.emit(Dc.AudioVolumes,r)})),t.on("connectionStateChanged",(function(t){e.emit(Dc.RtcConnectionStateChanged,e._getRtcState(t))})),t.on("videoSourceJoinedSuccess",(function(){e.emit(Dc.RtcConnectionStateChanged,Yu.Connected,Fu.sub)})),t.on("videoSourceLeaveChannel",(function(){e.emit(Dc.RtcConnectionStateChanged,Yu.Idle,Fu.sub)}))}},{key:"_emitMetadata",value:function(){var e=this;this._metaTask||(this._metaTask=xu.addPollingTask(A(k().mark((function t(){var r;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r="".concat(JSON.stringify({uid:e.uid,ts:Date.now()})),e.base.rtcEngine.sendMetadata({uid:e.uid,timeStampMs:Date.now(),size:r.length,buffer:r});case 2:case"end":return t.stop()}}),t)}))),500))}},{key:"_stopEmitMetadata",value:function(){this._metaTask&&(this._metaTask.stop(),this._metaTask=void 0)}}]),r}(xl))||Hl,$l=__webpack_require__(5904),eh=__webpack_require__.n($l);__webpack_require__(9575),__webpack_require__(2472),__webpack_require__(2990),__webpack_require__(8927),__webpack_require__(3105),__webpack_require__(5035),__webpack_require__(4345),__webpack_require__(7174),__webpack_require__(2846),__webpack_require__(4731),__webpack_require__(7209),__webpack_require__(6319),__webpack_require__(8867),__webpack_require__(7789),__webpack_require__(3739),__webpack_require__(9368),__webpack_require__(4483),__webpack_require__(2056),__webpack_require__(3462),__webpack_require__(678),__webpack_require__(7462),__webpack_require__(3824),__webpack_require__(5021),__webpack_require__(2974),__webpack_require__(5016);function th(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var rh=_((function e(t,r,n,i){var o;y(this,e),this.streamUuid=void 0,this.channelName=void 0,this.view=void 0,this.mirror=void 0,this.streamUuid=t,this.channelName=r,this.view=n,this.mirror=null!==(o=null==i?void 0:i.mirror)&&void 0!==o&&o})),nh=function(e){w(r,e);var t=th(r);function r(e,n,i,o){var a;return y(this,r),(a=t.call(this,e,n,i,o)).renderMode=Zu.fill,void 0!==(null==o?void 0:o.renderMode)&&(a.renderMode=o.renderMode),a}return _(r,null,[{key:"key",value:function(e,t){return"".concat(e,"-").concat(t)}}]),r}(rh),ih=function(e){w(r,e);var t=th(r);function r(e,n){return y(this,r),t.call(this,"0","",e,{mirror:n})}return _(r)}(nh),oh=function(e){w(r,e);var t=th(r);function r(e,n,i){var o,a,s;return y(this,r),(s=t.call(this,"","",n,i)).streamUrl=void 0,s.playVideo=void 0,s.playAudio=void 0,s.streamUrl=e,s.playVideo=null===(o=null==i?void 0:i.playVideo)||void 0===o||o,s.playAudio=null===(a=null==i?void 0:i.playAudio)||void 0===a||a,s}return _(r)}(rh);function ah(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}var sh=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),a=o.charCodeAt(0);if(255!==r[a])throw new TypeError(o+" is ambiguous");r[a]=i}var s=e.length,c=e.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function h(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,i=0;e[t]===c;)n++,t++;for(var o=(e.length-t)*u+1>>>0,a=new Uint8Array(o);e[t];){var l=r[e.charCodeAt(t)];if(255===l)return;for(var h=0,d=o-1;(0!==l||h<i)&&-1!==d;d--,h++)l+=s*a[d]>>>0,a[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=h,t++}if(" "!==e[t]){for(var f=o-i;f!==o&&0===a[f];)f++;for(var p=new Uint8Array(n+(o-f)),g=n;f!==o;)p[g++]=a[f++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var a=(o-i)*l+1>>>0,u=new Uint8Array(a);i!==o;){for(var h=t[i],d=0,f=a-1;(0!==h||d<n)&&-1!==f;f--,d++)h+=256*u[f]>>>0,u[f]=h%s>>>0,h=h/s>>>0;if(0!==h)throw new Error("Non-zero carry");n=d,i++}for(var p=a-n;p!==a&&0===u[p];)p++;for(var g=c.repeat(r);p<a;++p)g+=e.charAt(u[p]);return g},decodeUnsafe:h,decode:function(e){var r=h(e);if(r)return r;throw new Error(`Non-${t} character`)}}};const ch=sh,uh=(new Uint8Array(0),e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")});class lh{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class hh{constructor(e,t,r){this.name=e,this.prefix=t,this.baseDecode=r}decode(e){if("string"==typeof e){if(e[0]===this.prefix)return this.baseDecode(e.slice(1));throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)}throw Error("Can only multibase decode strings")}or(e){return fh(this,e)}}class dh{constructor(e){this.decoders=e}or(e){return fh(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const fh=(e,t)=>new dh({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class ph{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new lh(e,t,r),this.decoder=new hh(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const gh=({name:e,prefix:t,encode:r,decode:n})=>new ph(e,t,r,n),vh=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=ch(r,t);return gh({prefix:e,name:t,encode:n,decode:e=>uh(i(e))})},mh=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>gh({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<<r)-1;let o="",a=0,s=0;for(let n=0;n<e.length;++n)for(s=s<<8|e[n],a+=8;a>r;)a-=r,o+=t[i&s>>a];if(a&&(o+=t[i&s<<r-a]),n)for(;o.length*r&7;)o+="=";return o})(e,n,r),decode:t=>((e,t,r,n)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const a=new Uint8Array(o*r/8|0);let s=0,c=0,u=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${n} character`);c=c<<r|o,s+=r,s>=8&&(s-=8,a[u++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a})(t,n,r,e)}),Ah=gh({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),yh=mh({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),bh=mh({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),_h=vh({prefix:"9",name:"base10",alphabet:"0123456789"}),Eh=mh({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),wh=mh({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Ih=mh({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Sh=mh({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Th=mh({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Ch=mh({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Rh=mh({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),kh=mh({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Oh=mh({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Nh=mh({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),xh=mh({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Dh=vh({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Lh=vh({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Ph=vh({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Mh=vh({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Bh=mh({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),jh=mh({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Uh=mh({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Fh=mh({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Gh=function e(t,r,n){r=r||[];var i=n=n||0;for(;t>=Qh;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},Qh=Math.pow(2,31);var qh=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return e.bytes=a-r,i};var Vh=Math.pow(2,7),Kh=Math.pow(2,14),Hh=Math.pow(2,21),Wh=Math.pow(2,28),zh=Math.pow(2,35),Yh=Math.pow(2,42),Xh=Math.pow(2,49),Jh=Math.pow(2,56),Zh=Math.pow(2,63);const $h={encode:Gh,decode:qh,encodingLength:function(e){return e<Vh?1:e<Kh?2:e<Hh?3:e<Wh?4:e<zh?5:e<Yh?6:e<Xh?7:e<Jh?8:e<Zh?9:10}},ed=(e,t,r=0)=>($h.encode(e,t,r),t),td=e=>$h.encodingLength(e),rd=(e,t)=>{const r=t.byteLength,n=td(e),i=n+td(r),o=new Uint8Array(i+r);return ed(e,o,0),ed(r,o,n),o.set(t,i),new nd(e,r,t,o)};class nd{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const id=({name:e,code:t,encode:r})=>new od(e,t,r);class od{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?rd(this.code,t):t.then((e=>rd(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ad=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),sd=id({name:"sha2-256",code:18,encode:ad("SHA-256")}),cd=id({name:"sha2-512",code:19,encode:ad("SHA-512")}),ud=uh,ld={code:0,name:"identity",encode:ud,digest:e=>rd(0,ud(e))},hd="raw",dd=85,fd=e=>uh(e),pd=e=>uh(e),gd=new TextEncoder,vd=new TextDecoder,md="json",Ad=512,yd=e=>gd.encode(JSON.stringify(e)),bd=e=>JSON.parse(vd.decode(e));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom");Symbol.for("@ipld/js-cid/CID");const _d={...t,...r,...n,...i,...o,...a,...s,...c,...u};function Ed(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const wd=Ed("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Id=Ed("ascii","a",(e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(e=>{e=e.substring(1);const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}));var Sd,Td,Cd,Rd,kd,Od;function Nd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nd(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Dd(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Ld,Pd,Md,Bd=function(e){w(r,e);var t=Dd(r);function r(){var e;y(this,r);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).track=void 0,e}return _(r)}(Ql),jd=li.attach({proxyMethods:!1})(Sd=function(e){w(n,e);var t,r=Dd(n);function n(){var e;y(this,n);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return(e=r.call.apply(r,[this].concat(i))).canvas=void 0,e.trackState=zu.stopped,e.cameraEnable=!1,e._deviceId=void 0,e._deviceChanged=!1,e}return _(n,[{key:"setCameraTrackState",value:function(e,t){this.trackState!==e&&(this.trackState=e,this.emit(Sl.trackStateChanged,e,Lu.Camera,t))}},{key:"setDevice",value:function(e){this._deviceId=e,this._deviceChanged=!0}},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r,n,i=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.debug("thread notify start...");case 1:if(!this.cameraEnable){e.next=40;break}if(!this._deviceChanged){e.next=15;break}if(!this.track){e.next=14;break}if(e.prev=4,!this._deviceId){e.next=8;break}return e.next=8,this.track.setDevice(this._deviceId);case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(4),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_CAM_ERR,e.t0),e.abrupt("break",46);case 14:this._deviceChanged=!1;case 15:if(this.track){e.next=35;break}return this.logger.debug("starting camera..."),this.setCameraTrackState(zu.starting),e.prev=18,t=$n.shared.rtcConfigs,r=t.defaultCameraEncoderConfigurations,n=r?{width:r.width,height:r.height,frameRate:r.frameRate,bitrateMax:r.bitrate}:void 0,e.next=24,eh().createCameraVideoTrack({cameraId:this._deviceId,encoderConfig:n});case 24:this.track=e.sent,this.track.on("track-ended",(function(){var e;i.logger.warn("camera track ended"),null===(e=i.track)||void 0===e||e.close(),i.track=void 0,i.setCameraTrackState(zu.stopped)})),this.setCameraTrackState(zu.started),e.next=34;break;case 29:return e.prev=29,e.t1=e.catch(18),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_CAM_ERR,e.t1),this.setCameraTrackState(zu.error),e.abrupt("break",46);case 34:this.logger.debug("camera started.");case 35:if(this.track&&this.canvas&&this.canvas.view&&(this.track.play(this.canvas.view),this.setCameraTrackState(zu.started)),!this.track||!(this.canvas&&this.canvas.view&&this.track.isPlaying)&&this.canvas&&this.canvas.view){e.next=38;break}return e.abrupt("break",46);case 38:e.next=43;break;case 40:if(this.track&&(this.logger.debug("stopping camera..."),this.track.stop(),this.track.close(),this.track=void 0,this.setCameraTrackState(zu.stopped),this.logger.debug("camera stopped")),this.track){e.next=43;break}return e.abrupt("break",46);case 43:return e.next=45,new Promise((function(e){return setTimeout(e,500)}));case 45:if(this.running){e.next=1;break}case 46:this.logger.debug("thread sleep...");case 47:case"end":return e.stop()}}),e,this,[[4,10],[18,29]])}))),function(){return t.apply(this,arguments)})}]),n}(Bd))||Sd,Ud=li.attach({proxyMethods:!1})(Td=function(e){w(i,e);var t,r,n=Dd(i);function i(){var e;y(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).pcmTrack=void 0,e.micEnable=!1,e._recordingDeviceId=void 0,e._recordingDeviceChanged=!1,e.trackState=zu.stopped,e._volumePollingTask=void 0,e._audioRawConfig={frameSize:1024},e}return _(i,[{key:"setMicTrackState",value:function(e,t){var r,n=this;this.trackState!==e&&(this.trackState=e,this.emit(Sl.trackStateChanged,e,Pu.Mic,t),e===zu.started?this._volumePollingTask||(this._volumePollingTask=xu.addPollingTask((function(){if(n.track){var e=n.track.getVolumeLevel();e=Math.min(3*e,1),n.emit(Sl.localAudioVolume,e)}}),Cu.second(.5))):(null===(r=this._volumePollingTask)||void 0===r||r.stop(),this._volumePollingTask=void 0))}},{key:"setRecordingDevice",value:function(e){this._recordingDeviceId=e,this._recordingDeviceChanged=!0}},{key:"setAudioRawDataConfig",value:function(e){this._audioRawConfig=xd(xd({},this._audioRawConfig),e)}},{key:"setAudioFrameCallback",value:(r=A(k().mark((function e(){var t,r,n,i=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._recordingDeviceId){e.next=3;break}return this.logger.warn("Cannot set PCM callback as there's no selected recording devices"),e.abrupt("return");case 3:if(t=this._audioRawConfig,r=t.sampleRate,n=t.frameSize,this.pcmTrack){e.next=8;break}return e.next=7,eh().createMicrophoneAudioTrack({microphoneId:this._recordingDeviceId,encoderConfig:{sampleRate:r}});case 7:this.pcmTrack=e.sent;case 8:this.logger.info("Attach PCM listener"),this.pcmTrack.setAudioFrameCallback((function(e){i.emit(Sl.localAudioFrame,e)}),n);case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"stopAudioFrameCallback",value:function(){this.pcmTrack&&(this.logger.info("Detach PCM listener"),this.pcmTrack.setAudioFrameCallback(null),this.pcmTrack.close()),this.pcmTrack=void 0}},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r,n,i=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.info("thread notify start...");case 1:if(!this.micEnable){e.next=40;break}if(!this._recordingDeviceChanged){e.next=16;break}if(!this.track){e.next=15;break}if(e.prev=4,!this._recordingDeviceId){e.next=8;break}return e.next=8,this.track.setDevice(this._recordingDeviceId);case 8:e.next=15;break;case 10:return e.prev=10,e.t0=e.catch(4),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_MIC_ERR,e.t0),this.setMicTrackState(zu.error),e.abrupt("break",46);case 15:this._recordingDeviceChanged=!1;case 16:if(this.track){e.next=36;break}return this.logger.debug("starting mic..."),this.setMicTrackState(zu.starting),e.prev=19,t=$n.shared.rtcConfigs,r=t.defaultMicrophoneEncoderConfigurations,n=r?{sampleRate:r.sampleRate,sampleSize:r.sampleSize,stereo:r.stereo,bitrate:r.bitrate}:void 0,e.next=25,eh().createMicrophoneAudioTrack({microphoneId:this._recordingDeviceId,encoderConfig:n});case 25:this.track=e.sent,this.track.on("track-ended",(function(){var e;i.logger.warn("mic track ended"),null===(e=i.track)||void 0===e||e.close(),i.track=void 0,i.setMicTrackState(zu.stopped)})),this.setMicTrackState(zu.started),e.next=35;break;case 30:return e.prev=30,e.t1=e.catch(19),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_MIC_ERR,e.t1),this.setMicTrackState(zu.error),e.abrupt("break",46);case 35:this.logger.debug("mic started.");case 36:if(!this.track){e.next=38;break}return e.abrupt("break",46);case 38:e.next=43;break;case 40:if(this.track&&(this.track.stop(),this.track.close(),this.track=void 0,this.setMicTrackState(zu.stopped)),this.track){e.next=43;break}return e.abrupt("break",46);case 43:return e.next=45,new Promise((function(e){return setTimeout(e,500)}));case 45:if(this.running){e.next=1;break}case 46:this.logger.debug("thread sleep...");case 47:case"end":return e.stop()}}),e,this,[[4,10],[19,30]])}))),function(){return t.apply(this,arguments)})}]),i}(Bd))||Td,Fd=li.attach({proxyMethods:!1})(Cd=function(e){w(n,e);var t,r=Dd(n);function n(){var e;y(this,n);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return(e=r.call.apply(r,[this].concat(i))).canvas=void 0,e.audioTrack=void 0,e.withAudio=!1,e.screenEnable=!1,e.trackState=zu.stopped,e}return _(n,[{key:"playing",get:function(){return this.track&&this.track.isPlaying&&(!this.audioTrack||this.audioTrack&&this.audioTrack.isPlaying)}},{key:"setScreenShareTrackState",value:function(e,t){this.trackState!==e&&(this.trackState=e,this.emit(Sl.trackStateChanged,e,Lu.ScreenShare,t))}},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r,n,i,o=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.debug("thread notify start...");case 1:if(!this.screenEnable){e.next=37;break}if(this.track){e.next=32;break}if(this.logger.debug("starting screenshare..."),this.setScreenShareTrackState(zu.starting),e.prev=5,t=$n.shared.rtcConfigs,r=t.defaultScreenEncoderConfigurations,n=r?{width:r.width,height:r.height,frameRate:r.frameRate,bitrateMax:r.bitrate}:void 0,!this.withAudio){e.next=17;break}return e.next=12,eh().createScreenVideoTrack({encoderConfig:n},"enable");case 12:i=e.sent,this.track=i[0],this.audioTrack=i[1],e.next=20;break;case 17:return e.next=19,eh().createScreenVideoTrack({encoderConfig:n},"disable");case 19:this.track=e.sent;case 20:this.track.on("track-ended",(function(){var e;o.logger.warn("camera track ended"),null===(e=o.track)||void 0===e||e.close(),o.track=void 0,o.setScreenShareTrackState(zu.stopped)})),this.setScreenShareTrackState(zu.started),e.next=31;break;case 24:if(e.prev=24,e.t0=e.catch(5),"PERMISSION_DENIED"!==e.t0.code||/system/.test(e.t0.message)){e.next=28;break}return e.abrupt("break",44);case 28:return this.setScreenShareTrackState(zu.error,"PERMISSION_DENIED"===e.t0.code?Wu.PermissionDenied:Wu.Unknown),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_SCREEN_SHARE_ERR,e.t0),e.abrupt("break",44);case 31:this.logger.debug("screenshare started.");case 32:if(this.track&&this.canvas&&this.canvas.view&&this.track.play(this.canvas.view),!(!this.canvas||this.canvas&&this.playing)){e.next=35;break}return e.abrupt("break",44);case 35:e.next=41;break;case 37:if(this.track&&(this.logger.debug("stopping screenshare..."),this.track.stop(),this.track.close(),this.track=void 0,this.logger.debug("screenshare stopped"),this.setScreenShareTrackState(zu.stopped)),this.audioTrack&&(this.logger.debug("stopping screenshare audio..."),this.audioTrack.stop(),this.audioTrack.close(),this.audioTrack=void 0,this.logger.debug("screenshare audio stopped")),this.track||this.audioTrack){e.next=41;break}return e.abrupt("break",44);case 41:return e.next=43,new Promise((function(e){return setTimeout(e,500)}));case 43:if(this.running){e.next=1;break}case 44:this.logger.debug("thread sleep...");case 45:case"end":return e.stop()}}),e,this,[[5,24]])}))),function(){return t.apply(this,arguments)})}]),n}(Bd))||Cd,Gd=li.attach({proxyMethods:!1})((kd=function(e){w(i,e);var t,r,n=Dd(i);function i(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return y(this,i),(t=n.call(this))._options=r,t._client=void 0,t.mute=!1,t._trackThread=void 0,t._metaTask=void 0,t._client=e,t}return _(i,[{key:"track",get:function(){var e;return null===(e=this._trackThread)||void 0===e?void 0:e.track}},{key:"setTrackThread",value:function(e){var t;null===(t=this._trackThread)||void 0===t||t.off(Sl.trackStateChanged,this.handleTrackStateChanged),this._trackThread=e,e.on(Sl.trackStateChanged,this.handleTrackStateChanged)}},{key:"handleTrackStateChanged",value:function(e){e===zu.started&&this.run()}},{key:"isTrackPublished",value:function(e){return void 0!==this._client.localTracks.find((function(t){return t===e}))}},{key:"_emitMetadata",value:function(){var e=this;this._options.emitTsMetadata&&!this._metaTask&&(this._metaTask=xu.addPollingTask(A(k().mark((function t(){var r,n,i;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new Uint8Array([0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]),n=(new TextEncoder).encode("".concat(JSON.stringify({uid:e._client.uid,ts:Date.now()}))),i=ah([r,n]),t.next=5,e._client.sendMetadata(i);case 5:case"end":return t.stop()}}),t)}))),500))}},{key:"_stopEmitMetadata",value:function(){this._metaTask&&(this._metaTask.stop(),this._metaTask=void 0)}},{key:"_setClientRole",value:(r=A(k().mark((function e(t){var r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null!==(r=$n.shared.rtcConfigs.channelProfile)&&void 0!==r?r:ml.LiveBroadcasting)!==ml.LiveBroadcasting){e.next=4;break}return e.next=4,this._client.setClientRole(t);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r,n=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.debug("thread notify start..."),t=0;case 2:if(this.mute){e.next=27;break}if(!this.track||this.isTrackPublished(this.track)){e.next=23;break}return this.logger.debug("publishing..."),e.prev=5,e.next=8,this._setClientRole("host");case 8:if(!(r=this._client.localTracks.find((function(e){var t,r;return e.trackMediaType===(null===(t=n._trackThread)||void 0===t||null===(r=t.track)||void 0===r?void 0:r.trackMediaType)})))){e.next=14;break}return this.logger.warn("unpublishing old ".concat(r.trackMediaType," track...")),e.next=13,this._client.unpublish(r);case 13:this._stopEmitMetadata();case 14:return e.next=16,this._client.publish(this.track);case 16:this._emitMetadata(),this.logger.debug("published."),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(5),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_TRACK_PUBLISH_FAIL,e.t0);case 23:if(!this.track||!this.isTrackPublished(this.track)){e.next=25;break}return e.abrupt("break",51);case 25:e.next=46;break;case 27:if(!this.track||!this.isTrackPublished(this.track)){e.next=44;break}return this.logger.debug("unpublishing..."),e.prev=29,e.next=32,this._client.unpublish(this.track);case 32:if(this._stopEmitMetadata(),0!==this._client.localTracks.length){e.next=36;break}return e.next=36,this._setClientRole("audience");case 36:e.next=43;break;case 38:return e.prev=38,e.t1=e.catch(29),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_TRACK_UNPUBLISH_FAIL,e.t1),this.emit("trackUnpublishErr",e.t1),e.abrupt("break",51);case 43:this.logger.debug("unpublished.");case 44:if(!this.track||this.isTrackPublished(this.track)){e.next=46;break}return e.abrupt("break",51);case 46:return e.next=48,new Promise((function(e){return setTimeout(e,500)}));case 48:++t%10==0&&this.logger.debug("thread running...");case 50:if(this.running){e.next=2;break}case 51:this.logger.debug("thread sleep...");case 52:case"end":return e.stop()}}),e,this,[[5,20],[29,38]])}))),function(){return t.apply(this,arguments)})}]),i}(Ql),du(kd.prototype,"handleTrackStateChanged",[vu],Object.getOwnPropertyDescriptor(kd.prototype,"handleTrackStateChanged"),kd.prototype),Rd=kd))||Rd,Qd=li.attach({proxyMethods:!1})(Od=function(e){w(n,e);var t,r=Dd(n);function n(e,t,i){var o,a=i.channelName,s=i.muteMap,c=i.canvasMap,u=i.mediaType;return y(this,n),(o=r.call(this))._client=void 0,o._user=void 0,o._channelName=void 0,o._muteMap=void 0,o._canvasMap=void 0,o._mediaType=void 0,o._volumePollingTask=void 0,o._client=e,o._user=t,o._muteMap=s,o._mediaType=u,o._canvasMap=c,o._channelName=a,o}return _(n,[{key:"mute",get:function(){return!this._muteMap.has(this.streamUuid)||this._muteMap.get(this.streamUuid)}},{key:"streamUuid",get:function(){return"".concat(this._user.uid)}},{key:"canvas",get:function(){if("audio"!==this._mediaType&&this._canvasMap){var e=nh.key(this.streamUuid,this._channelName);return this._canvasMap.get(e)}}},{key:"isTrackSubscribed",value:function(){return"video"===this._mediaType?!!this._user.videoTrack:!!this._user.audioTrack}},{key:"track",get:function(){return"video"===this._mediaType?this._user.videoTrack:this._user.audioTrack}},{key:"onExecution",value:(t=A(k().mark((function e(){var t,r=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.debug("thread notify start..."),t=0;case 2:if(this.mute){e.next=19;break}if(this.isTrackSubscribed()){e.next=14;break}return this.logger.debug("[".concat(this._user.uid,"] subscribing ").concat(this._mediaType,"...")),e.prev=5,e.next=8,this._client.subscribe(this._user,this._mediaType);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_TRACK_SUBSCRIBE_FAIL,e.t0);case 13:this.logger.debug("[".concat(this._user.uid,"] subscribed."));case 14:if("video"===this._mediaType?this.track&&this.canvas&&this.canvas.view&&this.track.play(this.canvas.view,{fit:this.canvas.renderMode===Zu.fill?"cover":"contain"}):this.track&&(this._volumePollingTask||(this._volumePollingTask=xu.addPollingTask((function(){var e=r.track.getVolumeLevel();e=Math.min(3*e,1),r.emit("audio-volume-indication",e)}),Cu.second(.5))),this.track.play()),!this.isTrackSubscribed()){e.next=17;break}return e.abrupt("break",40);case 17:e.next=35;break;case 19:if(!this.isTrackSubscribed()){e.next=32;break}return this.logger.debug("[".concat(this._user.uid,"] unpublishing...")),e.prev=21,e.next=24,this._client.unsubscribe(this._user,this._mediaType);case 24:e.next=31;break;case 26:return e.prev=26,e.t1=e.catch(21),Xn.shared.handleNonThrowableError(Qn.RTC_ERR_TRACK_UNSUBSCRIBE_FAIL,e.t1),this.emit("trackPublishErr",e.t1),e.abrupt("break",40);case 31:this.logger.debug("[".concat(this._user.uid,"] unpublished."));case 32:if(this.track&&(this.logger.debug("[".concat(this._user.uid,"] stopping track...")),this.track.stop(),this._volumePollingTask&&this._volumePollingTask.stop(),this.logger.debug("[".concat(this._user.uid,"] track stopped"))),this.isTrackSubscribed()){e.next=35;break}return e.abrupt("break",40);case 35:return e.next=37,new Promise((function(e){return setTimeout(e,500)}));case 37:++t%10==0&&this.logger.info("thread running...");case 39:if(this.running){e.next=2;break}case 40:this.logger.info("thread sleep...");case 41:case"end":return e.stop()}}),e,this,[[5,10],[21,26]])}))),function(){return t.apply(this,arguments)})}]),n}(Ql))||Od,qd=(__webpack_require__(2479),__webpack_require__(5306),li.attach({proxyMethods:!1})(Ld=function(){function e(){y(this,e),this.logger=void 0,this.rtt=void 0,this.downlinkNetworkQuality=0,this.uplinkNetworkQuality=0,this.end2EndDelay=0,this.txVideoPacketLoss=0,this.rxVideoPacketLoss=0,this._downlinkNetworkQualityClacInstance=new jl,this._uplinkNetworkQualityClacInstance=new jl}return _(e,[{key:"networkStats",value:function(){var e={packetLoss:Math.max(this.txVideoPacketLoss,this.rxVideoPacketLoss),cpu:-1,delay:this.end2EndDelay,downlinkNetworkQuality:this._downlinkNetworkQualityClacInstance.toAGQuality(this.downlinkNetworkQuality),uplinkNetworkQuality:this._uplinkNetworkQualityClacInstance.toAGQuality(this.downlinkNetworkQuality)};return e}}]),e}())||Ld);function Vd(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Kd=li.attach({proxyMethods:!1})(Pd=function(e){w(i,e);var t,r,n=Vd(i);function i(e,t,r,o){var a;y(this,i),(a=n.call(this)).logger=void 0,a._client=void 0,a._base=void 0,a._videoPublishThread=void 0,a._audioPublishThread=void 0,a._screenPublishThread=void 0,a.configs=void 0,a._connectionState=Yu.Idle,a.channelName=void 0,a.connectionType=void 0,a._networkStats=new qd,a._recentLocalPacketStats=[],a._recentRemotePacketStats=[],a.channelName=e,a.configs=t,a._base=r,a.connectionType=o,eh().setArea({areaCode:[a._rtcRegion()]}),$n.shared.rtcSDKParameters&&$n.shared.rtcSDKParameters.forEach((function(e){a._setPrivateParameter(e)})),a._client=eh().createClient({codec:a.configs.codec,mode:a.configs.mode});var s=$n.shared.rtcConfigs.encryption;s&&a._client.setEncryptionConfig(a._getEncryptionMode(s.mode),s.key);var c="h264"===a.configs.codec;return a._videoPublishThread=new Gd(a._client,{emitTsMetadata:c}),a._audioPublishThread=new Gd(a._client,{emitTsMetadata:c}),a._screenPublishThread=new Gd(a._client,{emitTsMetadata:c}),a._videoPublishThread.runnable=!1,a._audioPublishThread.runnable=!1,a._screenPublishThread.runnable=!1,a._client.on("connection-state-change",(function(e){a.setConnectionState(a._getRtcState(e))})),a._client.on("network-quality",(function(e){a._networkStats.uplinkNetworkQuality=e.uplinkNetworkQuality,a._networkStats.downlinkNetworkQuality=e.downlinkNetworkQuality;var t=a._client.getLocalVideoStats(),r=a._client.getRemoteVideoStats(),n=a._client.getRTCStats();a._networkStats.rtt=n.RTT;var i={lossPackets:t.sendPacketsLost,totalPackets:t.sendPackets};a._recentLocalPacketStats.unshift(i),a._recentLocalPacketStats=a._recentLocalPacketStats.slice(0,10);for(var o=0,s=0,c=0,u=Object.values(r),l=0,h=u;l<h.length;l++){var d=h[l];o+=d.receivePacketsLost,s+=d.receivePackets,c+=d.end2EndDelay}var f={lossPackets:o,totalPackets:s};a._recentRemotePacketStats.unshift(f),a._recentRemotePacketStats=a._recentRemotePacketStats.slice(0,10),u.length>0&&(a._networkStats.end2EndDelay=0===u.length?0:c/u.length);var p=a._getRecentPacketLoss(),g=p.rx,v=p.tx;a._networkStats.rxVideoPacketLoss=g,a._networkStats.txVideoPacketLoss=v,a.emit("network-stats-changed",a._networkStats.networkStats(),a.connectionType)})),a}return _(i,[{key:"base",get:function(){return this._base}},{key:"_setPrivateParameter",value:function(e){Object.keys(e).forEach((function(t){var r=e[t];t=t.replace("rtc.","").toUpperCase(),"string"!=typeof r&&(r=JSON.stringify(r)),eh().setParameter(t,r)}))}},{key:"_getRecentPacketLoss",value:function(){var e=this._recentLocalPacketStats[0],t=this._recentLocalPacketStats[this._recentLocalPacketStats.length-1],r=e.lossPackets-t.lossPackets,n=e.totalPackets-t.totalPackets,i=this._recentRemotePacketStats[0],o=this._recentRemotePacketStats[this._recentRemotePacketStats.length-1],a=i.lossPackets-o.lossPackets,s=i.totalPackets-o.totalPackets;return{rx:Math.abs(n>0?r/n:0),tx:Math.abs(s>0?a/s:0)}}},{key:"ready",get:function(){return this._connectionState===Yu.Connected}},{key:"setConnectionState",value:function(e){this._connectionState=e,e===Yu.Connected&&(this._videoPublishThread.runnable=!0,this._audioPublishThread.runnable=!0,this._screenPublishThread.runnable=!0,this._videoPublishThread.run(),this._audioPublishThread.run(),this._screenPublishThread.run()),e===Yu.Idle&&(this._videoPublishThread.runnable=!1,this._audioPublishThread.runnable=!1,this._screenPublishThread.runnable=!1),this.emit("rtc-connection-state-changed",e,this.connectionType)}},{key:"getClientSessionId",value:function(){return this._client._sessionId}},{key:"join",value:(r=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._client.join(t,this.channelName,r,+n);case 2:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"leave",value:(t=A(k().mark((function e(){var t,r,n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._videoPublishThread.stop(),this._audioPublishThread.stop(),this._screenPublishThread.stop(),e.next=5,gl(this._client.leave());case 5:t=e.sent,r=v(t,1),(n=r[0])&&Xn.shared.handleNonThrowableError(Qn.RTC_ERR_CLIENT_LEAVE_CHANNEL_FAIL,n);case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"muteLocalVideo",value:function(e){return this.logger.info("muteLocalVideo ".concat(e)),this.base.cameraThread?(this._videoPublishThread.mute=e,this._videoPublishThread.setTrackThread(this.base.cameraThread),this._videoPublishThread.run(),0):-1}},{key:"muteLocalAudio",value:function(e){return this.logger.info("muteLocalAudio ".concat(e)),this.base.micThread?(this._audioPublishThread.mute=e,this._audioPublishThread.setTrackThread(this.base.micThread),this._audioPublishThread.run(),0):-1}},{key:"muteLocalScreenShare",value:function(e){return this.logger.info("muteLocalScreenShare ".concat(e)),this.base.screenThread?(this._screenPublishThread.mute=e,this._screenPublishThread.setTrackThread(this.base.screenThread),this._screenPublishThread.run(),0):-1}},{key:"_rtcRegion",value:function(){switch($n.shared.region){case Hn.CN:return"GLOBAL";case Hn.AP:return"ASIA";case Hn.EU:return"EUROPE";case Hn.NA:return"NORTH_AMERICA"}}},{key:"_getRtcState",value:function(e){switch(e){case"CONNECTED":return Yu.Connected;case"CONNECTING":return Yu.Connecting;case"DISCONNECTING":case"DISCONNECTED":return Yu.Idle;case"RECONNECTING":return Yu.Reconnecting}}},{key:"_getEncryptionMode",value:function(e){switch(e){case Xu.AES_128_ECB:return"aes-128-ecb";case Xu.AES_128_GCM:return"aes-128-gcm";case Xu.AES_128_XTS:return"aes-128-xts";case Xu.AES_256_XTS:return"aes-256-xts";case Xu.AES_256_GCM:return"aes-256-gcm";case Xu.AES_256_XTS:return"aes-256-xts"}return"none"}}]),i}(x))||Pd,Hd=(Md=function(e){w(n,e);var t,r=Vd(n);function n(e,t,i,o){var a;y(this,n),(a=r.call(this,e,t,i,o))._remoteRtcUsers=new Map,a._muteRemoteVideo=new Map,a._muteRemoteAudio=new Map,a._audioVolumes=new Map,a._subscribeVideoThreads=new Map,a._subscribeAudioThreads=new Map;var s=(0,U.throttle)(a._notifyStreamVolumes,500);return a._client.on("user-published",(function(e,t){var r="".concat(e.uid);if(a._remoteRtcUsers.set(r,e),"video"===t){var n=new Qd(a._client,e,{channelName:a.channelName,muteMap:a._muteRemoteVideo,mediaType:"video",canvasMap:a.base.remoteCanvas});a._subscribeVideoThreads.set(r,n),n.runnable=a.ready}else{var i=new Qd(a._client,e,{channelName:a.channelName,muteMap:a._muteRemoteAudio,mediaType:"audio"});i.on("audio-volume-indication",(function(e){a._audioVolumes.set(r,e),s()})),a._subscribeAudioThreads.set(r,i),i.runnable=a.ready}a._notifySubscribeThreads(r,t)})),a._client.on("user-unpublished",(function(e){if(!e.hasAudio&&!e.hasVideo){var t="".concat(e.uid);a._remoteRtcUsers.delete(t);var r=a._subscribeVideoThreads.get(t),n=a._subscribeAudioThreads.get(t);r&&(r.stop(),a._subscribeVideoThreads.delete(t)),n&&(n.stop(),a._audioVolumes.delete(t),a._subscribeAudioThreads.delete(t))}})),a._client.on("user-left",(function(e){var t="".concat(e.uid);a._remoteRtcUsers.delete(t);var r=a._subscribeVideoThreads.get(t),n=a._subscribeAudioThreads.get(t);r&&(r.stop(),a._subscribeVideoThreads.delete(t)),n&&(n.stop(),a._audioVolumes.delete(t),a._subscribeAudioThreads.delete(t))})),a}return _(n,[{key:"videoSubscribeThread",value:function(e){return this._subscribeVideoThreads.get(e)}},{key:"_notifyStreamVolumes",value:function(){this.emit("audio-volume-indication",this._audioVolumes)}},{key:"_notifySubscribeThreads",value:function(e,t){var r="video"===t?this._subscribeVideoThreads.get(e):this._subscribeAudioThreads.get(e);r&&r.run()}},{key:"setConnectionState",value:function(e){e===Yu.Connected&&(this._subscribeVideoThreads.forEach((function(e){e.runnable=!0,e.run()})),this._subscribeAudioThreads.forEach((function(e){e.runnable=!0,e.run()}))),e===Yu.Idle&&(this._subscribeVideoThreads.forEach((function(e){e.runnable=!1})),this._subscribeAudioThreads.forEach((function(e){e.runnable=!1,e.run()}))),Au(C(n.prototype),"setConnectionState",this).call(this,e)}},{key:"muteRemoteVideo",value:function(e,t){return this.logger.info("muteRemoteVideo ".concat(e," ").concat(t)),this._muteRemoteVideo.set(e,t),this._notifySubscribeThreads(e,"video"),0}},{key:"muteRemoteAudio",value:function(e,t){return this.logger.info("muteRemoteAudio ".concat(e," ").concat(t)),this._muteRemoteAudio.set(e,t),this._notifySubscribeThreads(e,"audio"),0}},{key:"enableDualStream",value:function(e){return e?this._client.enableDualStream():this._client.disableDualStream()}},{key:"setLowStreamParameter",value:function(e){return this._client.setLowStreamParameter(e),0}},{key:"setRemoteVideoStreamType",value:function(e,t){return this._client.setRemoteVideoStreamType(+e,t)}},{key:"leave",value:(t=A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Au(C(n.prototype),"leave",this).call(this);case 2:this._remoteRtcUsers.clear(),this._subscribeVideoThreads.forEach((function(e){e.stop()})),this._subscribeVideoThreads.clear(),this._subscribeAudioThreads.forEach((function(e){e.stop()})),this._subscribeAudioThreads.clear(),this._remoteRtcUsers.clear();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),n}(Kd),du(Md.prototype,"_notifyStreamVolumes",[vu],Object.getOwnPropertyDescriptor(Md.prototype,"_notifyStreamVolumes"),Md.prototype),Md),Wd=function(e){w(r,e);var t=Vd(r);function r(){return y(this,r),t.apply(this,arguments)}return _(r,[{key:"setLowStreamParameter",value:function(e){return this._client.setLowStreamParameter(e),0}},{key:"setRemoteVideoStreamType",value:function(e,t){return this._client.setRemoteVideoStreamType(+e,t)}},{key:"enableDualStream",value:function(e){return e?this._client.enableDualStream():this._client.disableDualStream()}}]),r}(Kd);function zd(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Yd=function(e){w(n,e);var t,r=zd(n);function n(e,t){var i;return y(this,n),(i=r.call(this)).adapter=e,i._deviceInfo=new Map,i._deviceIds=new Set,i._initializeDeviceList(t),i}return _(n,[{key:"onLocalVideoTrackStateChanged",value:function(e){return this.adapter.onLocalVideoTrackStateChanged(e),0}},{key:"onLocalCameraListChanged",value:function(e){return this.on(Sl.cameraListChanged,e),0}},{key:"getVideoCameraDevices",value:function(){return this.cameraList}},{key:"cameraList",get:function(){var e=this,t=[];return this._deviceIds.forEach((function(r){var n=e._deviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"_emitCameraListChanged",value:function(e,t,r){this.emit(Sl.cameraListChanged,e,t,r)}},{key:"_initializeDeviceList",value:(t=A(k().mark((function e(t){var r,n,i,o,a,s=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gl(eh().getCameras(t));case 2:r=e.sent,n=v(r,2),i=n[0],o=n[1],i&&Xn.shared.handleThrowableError(Qn.RTC_ERR_VDM_GET_DEVICES_FAIL,i),o&&(a=[],o.forEach((function(e){if("default"!==e.deviceId){var t={deviceid:e.deviceId,devicename:e.label};s._deviceInfo.set(e.deviceId,t),s._deviceIds.add(e.deviceId),a.push(t)}})),this._emitCameraListChanged(!0,a,this.cameraList)),eh().onCameraChanged=function(e){var t={deviceid:e.device.deviceId,devicename:e.device.label};"ACTIVE"===e.state?(s._deviceInfo.set(e.device.deviceId,t),s._deviceIds.add(e.device.deviceId),s._emitCameraListChanged(!0,[t],s.cameraList)):"INACTIVE"===e.state&&(s._deviceInfo.delete(e.device.deviceId),s._deviceIds.delete(e.device.deviceId),s._emitCameraListChanged(!1,[t],s.cameraList))};case 9:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),n}(Ol),Xd=function(e){w(i,e);var t,r,n=zd(i);function i(e,t){var r;return y(this,i),(r=n.call(this)).adapter=e,r._recordingDeviceInfo=new Map,r._recordingDeviceIds=new Set,r._playbackDeviceInfo=new Map,r._playbackDeviceIds=new Set,r._initializeDeviceList(t),r._initializePlaybackDeviceList(t),r}return _(i,[{key:"onLocalAudioPlaybackTestVolumeChanged",value:function(e){return this.adapter.onLocalAudioPlaybackTestVolumeChanged(e)}},{key:"onAudioFrame",value:function(e){return this.adapter.onAudioFrame(e)}},{key:"onLocalAudioTrackStateChanged",value:function(e){return this.adapter.onLocalAudioTrackStateChanged(e)}},{key:"onLocalAudioVolume",value:function(e){return this.adapter.onLocalAudioVolume(e)}},{key:"onLocalRecordingDeviceListChanged",value:function(e){return this.on(Sl.recordingDeviceListChanged,e),0}},{key:"onLocalPlaybackDeviceListChanged",value:function(e){return this.on(Sl.playbackDeviceListChanged,e),0}},{key:"microphoneList",get:function(){var e=this,t=[];return this._recordingDeviceIds.forEach((function(r){var n=e._recordingDeviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"speakerList",get:function(){var e=this,t=[];return this._playbackDeviceIds.forEach((function(r){var n=e._playbackDeviceInfo.get(r);n&&t.push({deviceid:n.deviceid,devicename:n.devicename})})),t}},{key:"_emitPlaybackListChanged",value:function(e,t,r){this.emit(Sl.playbackDeviceListChanged,e,t,r)}},{key:"_emitRecordingListChanged",value:function(e,t,r){this.emit(Sl.recordingDeviceListChanged,e,t,r)}},{key:"_initializePlaybackDeviceList",value:(r=A(k().mark((function e(t){var r,n,i,o,a,s=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gl(eh().getPlaybackDevices(t));case 2:r=e.sent,n=v(r,2),i=n[0],o=n[1],i&&Xn.shared.handleThrowableError(Qn.RTC_ERR_ADM_GET_PLAYBACK_DEVICES_FAIL,i),o&&(a=[],o.forEach((function(e){if("default"!==e.deviceId){var t={deviceid:e.deviceId,devicename:e.label};s._playbackDeviceInfo.set(e.deviceId,t),s._playbackDeviceIds.add(e.deviceId),a.push(t)}})),this._emitPlaybackListChanged(!0,a,this.speakerList)),eh().onPlaybackDeviceChanged=function(e){var t={deviceid:e.device.deviceId,devicename:e.device.label};"ACTIVE"===e.state?(s._playbackDeviceInfo.set(e.device.deviceId,t),s._playbackDeviceIds.add(e.device.deviceId),s._emitPlaybackListChanged(!0,[t],s.speakerList)):"INACTIVE"===e.state&&(s._playbackDeviceInfo.delete(e.device.deviceId),s._playbackDeviceIds.delete(e.device.deviceId),s._emitPlaybackListChanged(!1,[t],s.speakerList))};case 9:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_initializeDeviceList",value:(t=A(k().mark((function e(t){var r,n,i,o,a,s=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gl(eh().getMicrophones(t));case 2:r=e.sent,n=v(r,2),i=n[0],o=n[1],i&&Xn.shared.handleThrowableError(Qn.RTC_ERR_ADM_GET_RECORD_DEVICES_FAIL,i),o&&(a=[],o.forEach((function(e){if("default"!==e.deviceId){var t={deviceid:e.deviceId,devicename:e.label};s._recordingDeviceInfo.set(e.deviceId,t),s._recordingDeviceIds.add(e.deviceId),a.push(t)}})),this._emitRecordingListChanged(!0,a,this.microphoneList)),eh().onMicrophoneChanged=function(e){var t={deviceid:e.device.deviceId,devicename:e.device.label};"ACTIVE"===e.state?(s._recordingDeviceInfo.set(e.device.deviceId,t),s._recordingDeviceIds.add(e.device.deviceId),s._emitRecordingListChanged(!0,[t],s.microphoneList)):"INACTIVE"===e.state&&(s._recordingDeviceInfo.delete(e.device.deviceId),s._recordingDeviceIds.delete(e.device.deviceId),s._emitRecordingListChanged(!1,[t],s.microphoneList))};case 9:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getAudioPlaybackDevices",value:function(){return this.speakerList}},{key:"getAudioRecordingDevices",value:function(){return this.microphoneList}}]),i}(Nl);__webpack_require__(4197);function Jd(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Zd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zd(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,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,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Zd(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 $d(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var ef,tf,rf,nf=function(e){w(r,e);var t=$d(r);function r(){var e;y(this,r),(e=t.call(this)).logger=void 0,e._audioContext=void 0,e._audioTagId=Fn(),e._playingSourceNode=void 0,e._analyserNode=void 0,e._volumePollingTask=void 0;try{window.AudioContext=window.AudioContext||window.webkitAudioContext,e._audioContext=new AudioContext,e._analyserNode=e._audioContext.createAnalyser(),e._analyserNode.smoothingTimeConstant=.3,e._analyserNode.fftSize=1024}catch(e){xn.error("[audio player] initialize audio context failed ".concat(e,"."))}return e}return _(r,[{key:"_getAudioVirtualDom",value:function(){if(document){var e=document.getElementById(this._audioTagId);if(!e){var t=document.createElement("audio");t.id=this._audioTagId,t.hidden=!0,document.body.appendChild(t),e=t}return e}xn.error("[audio player] audio element creation failed.")}},{key:"play",value:function(e){var t=this;this.stop();var r=this._audioContext,n=this._getAudioVirtualDom();if(n&&r){var i=r.createMediaElementSource(n);if(i.connect(r.destination),n.src=e,this._analyserNode){var o=this._analyserNode;i.connect(o);var a=new Float32Array(o.fftSize);this._volumePollingTask=xu.addPollingTask((function(){o.getFloatTimeDomainData(a);var e,r=0,n=Jd(a);try{for(n.s();!(e=n.n()).done;){var i=e.value;r+=i*i}}catch(e){n.e(e)}finally{n.f()}var s=Math.sqrt(r/a.length);t.emit(Sl.localAudioPlaybackVolumeIndicator,Math.min(s,1))}),Cu.second(.2))}n.addEventListener("ended",(function(){t.stop()})),this._playingSourceNode=i,n.play()}else xn.error("[audio player] start audio playback test failed.")}},{key:"stop",value:function(){var e=this._audioContext,t=this._getAudioVirtualDom();if(t&&e){var r;if(t.pause(),t.currentTime=0,this._analyserNode)try{var n;null===(n=this._playingSourceNode)||void 0===n||n.disconnect(this._analyserNode)}catch(e){xn.warn("[audio player] failed to detach analyser node")}if(this._audioContext)try{var i;null===(i=this._playingSourceNode)||void 0===i||i.disconnect(e.destination)}catch(e){xn.warn("[audio player] failed to detach audio context")}null===(r=this._volumePollingTask)||void 0===r||r.stop(),this._volumePollingTask=void 0,t.remove(),this.emit(Sl.localAudioPlaybackVolumeIndicator,0)}}}]),r}(x);function of(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function af(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?of(Object(r),!0).forEach((function(t){D(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):of(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function sf(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var cf,uf=li.attach({proxyMethods:!1})((tf=function(e){w(r,e);var t=sf(r);function r(e){var n;return y(this,r),(n=t.call(this)).logger=void 0,n._channels=new Map,n._vdm=new Yd(S(n),$n.shared.rtcConfigs.noDevicePermission),n._adm=new Xd(S(n),$n.shared.rtcConfigs.noDevicePermission),n.cameraThread=new jd,n.micThread=new Ud,n.screenThread=new Fd,n.remoteCanvas=new Map,n._audioPlayer=new nf,n._configs=void 0,n._configs=e,n}return _(r,[{key:"configs",get:function(){var e,t,n=null!==(e=$n.shared.rtcConfigs.channelProfile)&&void 0!==e?e:ml.LiveBroadcasting,i=(t={},D(t,ml.LiveBroadcasting,"live"),D(t,ml.Communication,"rtc"),t)[n]||"live";return af(af(af({},r.defaultConfigs),this._configs),{},{mode:i})}},{key:"createRtcChannel",value:function(e,t){var r=this._channels.get(e);return r||(r=new lf(e,this.configs,t),this._channels.set(e,r)),r}},{key:"getVideoDeviceManager",value:function(){return this._vdm}},{key:"setVideoCameraDevice",value:function(e){return this.cameraThread.setDevice(e),this.cameraThread.run(),0}},{key:"setAudioRecordingDevice",value:function(e){return this.micThread.setRecordingDevice(e),this.micThread.run(),0}},{key:"setAudioPlaybackDevice",value:function(e){throw new Error("Method not implemented.")}},{key:"getAudioDeviceManager",value:function(){return this._adm}},{key:"getWindowDevices",value:function(){throw new Error("Method not supported.")}},{key:"getDiaplayDevices",value:function(){throw new Error("Method not supported.")}},{key:"isScreenDeviceEnumerateSupported",value:function(){return!1}},{key:"enableLocalVideo",value:function(e){return this.cameraThread.cameraEnable=e,this.cameraThread.run(),0}},{key:"enableLocalAudio",value:function(e){return this.micThread.micEnable=e,this.micThread.run(),0}},{key:"setupLocalVideo",value:function(e,t){return t===Lu.Camera?(this.cameraThread.canvas=e,this.cameraThread.run()):(this.screenThread.canvas=e,this.screenThread.run()),0}},{key:"setupRemoteVideo",value:function(e){if(!e.channelName)return Xn.shared.handleThrowableError(Qn.RTC_ERR_NO_CHANNEL_EXISTS,new Error("invalid canvas w/o canvas name")),-1;this.remoteCanvas.set("".concat(e.streamUuid,"-").concat(e.channelName),e);var t=this._channels.get(e.channelName),r=null==t?void 0:t.main.videoSubscribeThread(e.streamUuid);return r&&r.run(),0}},{key:"startAudioRecordingDeviceTest",value:function(e){return this.logger.warn("web platform does not support this, it silence the error as recording device can be started testing w/o this api"),0}},{key:"stopAudioRecordingDeviceTest",value:function(){return this.logger.warn("web platform does not support this, it silence the error as recording device can be started testing w/o this api"),0}},{key:"startAudioPlaybackDeviceTest",value:function(e){return this._audioPlayer.play(e),0}},{key:"stopAudioPlaybackDeviceTest",value:function(){return this._audioPlayer.stop(),0}},{key:"startScreenCapture",value:function(e,t){return this.screenThread.screenEnable=!0,this.screenThread.run(),0}},{key:"stopScreenCapture",value:function(){return this.screenThread.screenEnable=!1,this.screenThread.run(),0}},{key:"onLocalAudioPlaybackTestVolumeChanged",value:function(e){return this._audioPlayer.on(Sl.localAudioPlaybackVolumeIndicator,e),0}},{key:"onLocalVideoTrackStateChanged",value:function(e){return this.cameraThread.on(Sl.trackStateChanged,e),0}},{key:"onLocalAudioTrackStateChanged",value:function(e){return this.micThread.on(Sl.trackStateChanged,e),0}},{key:"onLocalScreenShareTrackStateChanged",value:function(e){return this.screenThread.on(Sl.trackStateChanged,e),0}},{key:"onLocalAudioVolume",value:function(e){return this.micThread.on(Sl.localAudioVolume,e),0}},{key:"onAudioFrame",value:function(e){return this.micThread.on(Sl.localAudioFrame,e),0}},{key:"setBeautyEffectOptions",value:function(e,t){return this.logger.warn("web platform does not support this"),0}},{key:"setAudioFrameCallback",value:function(){return this.micThread.setAudioFrameCallback(),0}},{key:"stopAudioFrameCallback",value:function(){return this.micThread.stopAudioFrameCallback(),0}},{key:"setAudioRawDataConfig",value:function(e){return this.micThread.setAudioRawDataConfig(e),0}},{key:"hasScreenSharePermission",value:function(){return!0}},{key:"takeSnapshot",value:function(e,t,r){return this.logger.warn("web platform does not support this"),Promise.reject()}},{key:"getCurrentFrameData",value:function(e,t,r){if(r)return this.cameraThread.track.getCurrentFrameData();try{return this._channels.get(e).getCurrentFrameData(t)}catch(r){return this.logger.error("getCurrentFrameData from channel: ".concat(e," stream: ").concat(t," failed")),new ImageData(1,1)}}},{key:"destroy",value:function(){return this._channels.forEach((function(e){return e.leave()})),this._channels.clear(),this.enableLocalVideo(!1),this.enableLocalAudio(!1),this.stopScreenCapture(),0}}],[{key:"getRtcVersion",value:function(){return eh().VERSION}}]),r}(Dl),tf.defaultConfigs={codec:"vp8",mode:"live"},ef=tf))||ef,lf=li.attach({proxyMethods:!1})(rf=function(e){w(i,e);var t,r,n=sf(i);function i(e,t,r){var o;return y(this,i),(o=n.call(this)).logger=void 0,o.main=void 0,o.sub=void 0,o.channelName=void 0,o.channelName=e,o.main=new Hd(e,t,r,Fu.main),o.sub=new Wd(e,t,r,Fu.sub),o}return _(i,[{key:"getSessionId",value:function(){return this.main.getClientSessionId()}},{key:"client",value:function(e){return e===Fu.main?this.main:this.sub}},{key:"join",value:(r=A(k().mark((function e(t,r,n){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client(n).join($n.shared.appId,t,r);case 2:n===Fu.sub&&(this.main.muteRemoteVideo(r,!0),this.main.muteRemoteAudio(r,!0));case 3:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"leave",value:(t=A(k().mark((function e(t){var r,n,i,o,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.sub.ready){e.next=7;break}return e.next=3,gl(this.sub.leave());case 3:n=e.sent,i=v(n,1),(r=i[0])&&Xn.shared.handleNonThrowableError(Qn.RTC_ERR_LEAVE_SUB_CHANNEL_FAIL,r);case 7:if(t===Fu.sub){e.next=14;break}return e.next=10,gl(this.main.leave());case 10:o=e.sent,a=v(o,1),(r=a[0])&&Xn.shared.handleNonThrowableError(Qn.RTC_ERR_LEAVE_MAIN_CHANNEL_FAIL,r);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"enableDualStream",value:function(e,t){return this.client(t).enableDualStream(e)}},{key:"setLowStreamParameter",value:function(e,t){return this.client(t).setLowStreamParameter(e),0}},{key:"setRemoteVideoStreamType",value:function(e,t,r){return this.client(r).setRemoteVideoStreamType(e,t)}},{key:"setClientRole",value:function(e){return 0}},{key:"muteLocalVideo",value:function(e,t){return this.logger.info("muteLocalVideo ".concat(e)),this.client(t).muteLocalVideo(e)}},{key:"muteLocalAudio",value:function(e,t){return this.logger.info("muteLocalAudio ".concat(e)),this.client(t).muteLocalAudio(e)}},{key:"muteLocalScreenShare",value:function(e,t){return this.logger.info("muteLocalScreenShare ".concat(e)),this.client(t).muteLocalScreenShare(e)}},{key:"muteRemoteVideo",value:function(e,t){return this.logger.info("muteRemoteVideo ".concat(e," ").concat(t)),this.main.muteRemoteVideo(e,t)}},{key:"muteRemoteAudio",value:function(e,t){return this.logger.info("muteRemoteAudio ".concat(e," ").concat(t)),this.main.muteRemoteAudio(e,t)}},{key:"getCurrentFrameData",value:function(e){try{return this.main.videoSubscribeThread(e).track.getCurrentFrameData()}catch(t){return this.logger.error("getCurrentFrameData from stream: ".concat(e," failed")),new ImageData(1,1)}}},{key:"onNetworkStats",value:function(e){return this.main.on("network-stats-changed",e),0}},{key:"onAudioVolumeIndication",value:function(e){return this.main.on("audio-volume-indication",e),0}},{key:"onConnectionStateChanged",value:function(e){return this.main.on("rtc-connection-state-changed",e),this.sub.on("rtc-connection-state-changed",e),0}}]),i}(xl))||rf,hf=function(){function e(){y(this,e)}return _(e,null,[{key:"getAdapter",value:function(e,t){switch(e){case Vn.Electron:return new Jl;case Vn.Web:return new uf(null==t?void 0:t.web)}}}]),e}(),df=li.attach({level:qn.DEBUG})(cf=function(){function e(t){y(this,e),this._adapter=void 0,this._channels=new Map,this._adapter=hf.getAdapter($n.platform,t)}return _(e,[{key:"getRtcChannel",value:function(e){var t=this._channels.get(e);if(!t){var r=this._adapter.createRtcChannel(e,this._adapter);t=new rl(e,r),this._channels.set(e,t)}return t}},{key:"getVideoDeviceManager",value:function(){return this._adapter.getVideoDeviceManager()}},{key:"getAudioDeviceManager",value:function(){return this._adapter.getAudioDeviceManager()}},{key:"getWindowDevices",value:function(){return this._adapter.getWindowDevices()}},{key:"getDisplayDevices",value:function(){return this._adapter.getDiaplayDevices()}},{key:"isScreenDeviceEnumerateSupported",value:function(){return this._adapter.isScreenDeviceEnumerateSupported()}},{key:"setVideoCameraDevice",value:function(e){return this._adapter.setVideoCameraDevice(e)}},{key:"setAudioRecordingDevice",value:function(e){return this._adapter.setAudioRecordingDevice(e)}},{key:"setAudioPlaybackDevice",value:function(e){return this._adapter.setAudioPlaybackDevice(e)}},{key:"enableLocalVideo",value:function(e){return this._adapter.enableLocalVideo(e)}},{key:"setupLocalVideo",value:function(e,t){return e.view.style.setProperty("transform",e.mirror?"rotateY(180deg)":""),this._adapter.setupLocalVideo(e,t)}},{key:"setupRemoteVideo",value:function(e){return e.view.style.setProperty("transform",e.mirror?"rotateY(180deg)":""),this._adapter.setupRemoteVideo(e)}},{key:"enableLocalAudio",value:function(e){return this._adapter.enableLocalAudio(e)}},{key:"startScreenCapture",value:function(e,t){return this._adapter.startScreenCapture(e,t)}},{key:"stopScreenCapture",value:function(){return this._adapter.stopScreenCapture()}},{key:"onLocalScreenShareTrackStateChanged",value:function(e){return this._adapter.onLocalScreenShareTrackStateChanged(e)}},{key:"startAudioRecordingDeviceTest",value:function(e){return this._adapter.startAudioRecordingDeviceTest(e)}},{key:"stopAudioRecordingDeviceTest",value:function(){return this._adapter.stopAudioRecordingDeviceTest()}},{key:"startAudioPlaybackDeviceTest",value:function(e){return this._adapter.startAudioPlaybackDeviceTest(e)}},{key:"stopAudioPlaybackDeviceTest",value:function(){return this._adapter.stopAudioPlaybackDeviceTest()}},{key:"setAudioFrameCallback",value:function(){return this._adapter.setAudioFrameCallback()}},{key:"stopAudioFrameCallback",value:function(){return this._adapter.stopAudioFrameCallback()}},{key:"onLocalCameraListChanged",value:function(e){return this._adapter.getVideoDeviceManager().onLocalCameraListChanged(e)}},{key:"onLocalRecordingDeviceListChanged",value:function(e){return this._adapter.getAudioDeviceManager().onLocalRecordingDeviceListChanged(e)}},{key:"onLocalPlaybackListChanged",value:function(e){return this._adapter.getAudioDeviceManager().onLocalPlaybackDeviceListChanged(e)}},{key:"onLocalVideoTrackStateChanged",value:function(e){return this._adapter.getVideoDeviceManager().onLocalVideoTrackStateChanged(e)}},{key:"onLocalAudioTrackStateChanged",value:function(e){return this._adapter.getAudioDeviceManager().onLocalAudioTrackStateChanged(e)}},{key:"onLocalAudioVolume",value:function(e){return this._adapter.getAudioDeviceManager().onLocalAudioVolume(e)}},{key:"setBeautyEffectOptions",value:function(e,t){return this._adapter.setBeautyEffectOptions(e,t)}},{key:"setAudioRawDataConfig",value:function(e){return this._adapter.setAudioRawDataConfig(e)}},{key:"hasScreenSharePermission",value:function(){return this._adapter.hasScreenSharePermission()}},{key:"takeSnapshot",value:function(e,t,r){return this._adapter.takeSnapshot(e,t,r)}},{key:"getCurrentFrameData",value:function(e,t,r){return this._adapter.getCurrentFrameData(e,t,r)}},{key:"destroy",value:function(){return this._adapter.destroy()}}]),e}())||cf,ff=__webpack_require__(3977),pf=__webpack_require__.n(ff),gf=__webpack_require__(9644),vf=__webpack_require__.n(gf),mf=(new(__webpack_require__(6353).UAParser)).getResult(),Af=function(){function e(t,r){y(this,e),this._appId=t,this._tagInfo=r,this._adapter=void 0,this._adapter=new yf(this._appId,this._tagInfo)}var t;return _(e,[{key:"upload",value:(t=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._adapter.upload(t,r);case 2:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}(),yf=function(){function e(t,r){y(this,e),this._appId=t,this._tagInfo=r,this._apiService=new ou,this._checkpoints=new Map}var t,r,n,i;return _(e,[{key:"_uploadByAli",value:(i=A(k().mark((function e(t,r,n,i){var o,a,s,c,u,l,h,d,f,p,g,v,m,A,y=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.ossKey,a=n.accessKeyId,s=n.accessKeySecret,c=n.bucketName,u=n.ossEndpoint,l=n.securityToken,h=i.callbackHost,d=i.callbackBody,f=i.callbackContentType,p=new(pf())({accessKeyId:a,accessKeySecret:s,bucket:c,endpoint:u,secure:!0,stsToken:l}),g=this._checkpoints.get(r),v="".concat(h,"/monitor/apps/").concat(this._appId,"/v1/log/oss/callback"),e.next=7,p.multipartUpload(o,t,{progress:function(e,t){y._checkpoints.set(r,t)},callback:{url:v,body:d,contentType:f},checkpoint:g});case 7:if(m=e.sent,200===(A=m.res).status){e.next=11;break}throw new Error("upload to ali oss error, status is ".concat(A.status));case 11:this._checkpoints.delete(r),p.generateObjectUrl(o);case 13:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return i.apply(this,arguments)})},{key:"_uploadByAws",value:(n=A(k().mark((function e(t,r,n,i){var o,a,s,c,u,l;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.preSignedUrl,a=i.callbackHost,s=i.callbackBody,c=i.callbackContentType,u="".concat(a,"/monitor/apps/").concat(this._appId,"/v1/log/oss/callback"),e.next=5,vf().put(o,t,{headers:{"Content-Type":t.type}});case 5:return e.next=7,vf().post(u,JSON.parse(s),{headers:D({},"content-type",c)});case 7:if(200===(l=e.sent).status){e.next=10;break}throw new Error("upload to aws oss error, status is ".concat(l.status));case 10:this._checkpoints.delete(r);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t,r,i){return n.apply(this,arguments)})},{key:"_fetchStsToken",value:(r=A(k().mark((function e(t,r){var n,i,o,a,s,c,u;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(new Date).getTime(),i={appId:$n.shared.appId,appVersion:$n.version,deviceName:mf.os.name,deviceVersion:mf.os.version,fileExt:r,platform:"web",tag:t},o=JSON.stringify(i),a="7AIsPeMJgQAppO0Z"+o+n,s=tu()(a),e.next=8,this._apiService.fetch({host:"https://api.sd-rtn.com",path:"/monitor/v1/log/oss/policy",data:i,method:"POST",headers:{sign:s,timestamp:n}});case 8:return c=e.sent,u=c.data,e.abrupt("return",{bucketName:u.bucketName,callbackBody:u.callbackBody,callbackContentType:u.callbackContentType,accessKeyId:u.accessKeyId,accessKeySecret:u.accessKeySecret,securityToken:u.securityToken,ossKey:u.ossKey,callbackHost:u.callbackHost,preSignedUrl:u.preSignedUrl,vendor:u.vendor,ossEndpoint:u.ossEndpoint});case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"upload",value:(t=A(k().mark((function e(t,r){var n,i,o,a,s,c,u,l,h,d,f,p,g,v,m,A,y;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._fetchStsToken(this._tagInfo,r);case 2:if(n=e.sent,i=n.vendor,1!==(o=void 0===i?-1:i)){e.next=10;break}return a=n.ossKey,s=n.callbackBody,c=n.callbackContentType,u=n.callbackHost,l=n.preSignedUrl,e.next=8,this._uploadByAws(t,a,{preSignedUrl:l},{callbackBody:s,callbackContentType:c,callbackHost:u});case 8:case 14:e.next=17;break;case 10:if(2!==o){e.next=16;break}return h=n.accessKeyId,d=n.accessKeySecret,f=n.bucketName,p=n.ossEndpoint,g=n.securityToken,v=n.ossKey,m=n.callbackBody,A=n.callbackContentType,y=n.callbackHost,e.next=14,this._uploadByAli(t,v,{accessKeyId:h,accessKeySecret:d,bucketName:f,ossEndpoint:p,securityToken:g,ossKey:v},{callbackBody:m,callbackContentType:A,callbackHost:y});case 16:throw new Error("vendor ".concat(o," is not supported"));case 17:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function bf(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var _f,Ef,wf,If,Sf,Tf=function(e){w(a,e);var t,r,n,i,o=bf(a);function a(){return y(this,a),o.apply(this,arguments)}return _(a,[{key:"uploadZipLogFile",value:(i=A(k().mark((function e(t,r){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.uploadToOss(t,r,"zip");case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"uploadLogFile",value:(n=A(k().mark((function e(t,r){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.uploadToOss(t,r,"log");case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"uploadToOss",value:(r=A(k().mark((function e(t,r,n){var i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=new Af($n.shared.appId,t),e.next=4,i.upload(r,n);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),Xn.shared.handleThrowableError(Qn.RTE_ERR_LOG_UPLOAD_FAIL,e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])}))),function(e,t,n){return r.apply(this,arguments)})},{key:"uploadElectronLog",value:(t=A(k().mark((function e(t){var r,n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.doGzip){e.next=8;break}return e.next=3,window.doGzip();case 3:return r=e.sent,e.next=6,this.uploadZipLogFile(t,r);case 6:return n=e.sent,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),a}(ou);function Cf(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}!function(e){e[e.Host=1]="Host",e[e.Controlled=2]="Controlled"}(_f||(_f={})),function(e){e.RequestControl="request-control",e.QuitControl="quit-control",e.RequestAuthorized="request-authorized",e.RequestUnauthorized="request-unauthorized"}(Ef||(Ef={}));try{var Rf=__webpack_require__(1709).AgoraRemoteDesktopControl;Sf=Rf}catch(e){$n.platform===Vn.Electron&&xn.warn("load electron rc sdk failed: ".concat(e))}var kf=li.attach({proxyMethods:!1})((If=function(e){w(l,e);var t,r,n,i,o,a,s,c,u=Cf(l);function l(e,t){var r;return y(this,l),(r=u.call(this))._rtcChannel=e,r._role=t,r.logger=void 0,r._rdcEngine=void 0,r._displays=[],r._streamId=void 0,r.handleRDCStateChange=function(e,t){var n;(n=r.logger).info.apply(n,["RDC state changed to",e].concat(hi(t?["with message",t]:[])))},r.handleRDCRequestControl=function(e){r.logger.info("RequestControl fired with args",e),r.emit(Ef.RequestControl,e)},r.handleRDCQuitControl=function(e){r.logger.info("QuitControl fired with args",e),r.emit(Ef.QuitControl,e)},r.handleRDCRequestControlAuthorized=function(e){r.logger.info("RequestAuthorized fired with args",e),r.emit(Ef.RequestAuthorized,e)},r.handleRDCRequestControlUnauthorized=function(e){r.logger.info("RequestUnauthorized fired with args",e),r.emit(Ef.RequestUnauthorized,e)},r._checkPlatform(),r._initialize(),r._addListeners(),r}return _(l,[{key:"_checkPlatform",value:function(){if(!($n.platform===Vn.Electron))throw new Error("Remote Control currently not supported in web browser")}},{key:"rdcEngine",get:function(){if(!this._rdcEngine)throw new Error("RCEngine not ready");return this._rdcEngine}},{key:"_initialize",value:function(){this._rdcEngine=new Sf(Jl.rtcEngine,{appId:$n.shared.appId,role:this._role})}},{key:"_addListeners",value:function(){this.rdcEngine.on("rdc-state",this.handleRDCStateChange),this.rdcEngine.on("rdc-request-control",this.handleRDCRequestControl),this.rdcEngine.on("rdc-quit-control",this.handleRDCQuitControl),this.rdcEngine.on("rdc-request-control-authorized",this.handleRDCRequestControlAuthorized),this.rdcEngine.on("rdc-request-control-unauthorized",this.handleRDCRequestControlUnauthorized)}},{key:"_removeListeners",value:function(){this.rdcEngine.off("rdc-state",this.handleRDCStateChange),this.rdcEngine.off("rdc-request-control",this.handleRDCRequestControl),this.rdcEngine.off("rdc-quit-control",this.handleRDCQuitControl),this.rdcEngine.off("rdc-request-control-authorized",this.handleRDCRequestControlAuthorized),this.rdcEngine.off("rdc-request-control-unauthorized",this.handleRDCRequestControlUnauthorized)}},{key:"join",value:(c=A(k().mark((function e(t){var r=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A(k().mark((function e(n,i){var o,a,s,c;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.userId,a=t.userToken,s=t.streamId,c=t.streamToken,r.logger.info("join rc channel [".concat(r._rtcChannel.channelName,"] with params"),t),r._streamId=s,r.rdcEngine.once("rdc-join-error",(function(e,t){0===e?(n(null),r.logger.info("rc channel joined")):(i(),r.logger.info("rc channel join failed, message: ".concat(t)))})),e.next=6,r.rdcEngine.join(o,a,r._rtcChannel.channelName,parseInt(s),c);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return c.apply(this,arguments)})},{key:"_waitForUserJoin",value:(s=A(k().mark((function e(t){var r,n,i=this,o=arguments;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=o.length>1&&void 0!==o[1]?o[1]:1e4,(n=function(){return l._channelUsers.has(t)})()){e.next=7;break}return e.next=5,dl(new Promise(function(){var e=A(k().mark((function e(o){var a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Date.now()+r;case 1:if(!(Date.now()<a)){e.next=11;break}if(i.logger.info("wait for user joining rc channel"),!n()){e.next=7;break}return i.logger.info("user [".concat(t,"] joined the rc channel!")),o(),e.abrupt("break",11);case 7:return e.next=9,hl(100);case 9:e.next=1;break;case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),r,!1);case 5:e.next=8;break;case 7:this.logger.info("user [".concat(t,"] has already joined the rc channel!"));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"requestControl",value:(a=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.info("request user ".concat(t," for remote controlling")),e.next=3,this._waitForUserJoin(r.streamId,r.timeout);case 3:this.rdcEngine.requestControl(t);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"takeControl",value:(o=A(k().mark((function e(t,r,n,i){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.info("take control of the remote device of user ".concat(t)),this.rdcEngine.takeControl(t,parseInt(r),n);case 2:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return o.apply(this,arguments)})},{key:"unauthorizeControl",value:(i=A(k().mark((function e(t,r){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.info("unauthorize user ".concat(t," for remote controlling")),this.rdcEngine.unauthorizeControl(t);case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"authorizeControl",value:(n=A(k().mark((function e(t,r,n){var i;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.info("authorize user ".concat(t," for remote controlling")),i=this._displays.find((function(e){return e.id===r.id}))){e.next=4;break}throw new Error("Invalid display obj, display with id ".concat(JSON.stringify(r.id)," not exist"));case 4:this.logger.info("display with id ".concat(r.id," is going to be controled")),this.rdcEngine.authorizeControl(t,i);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"quitControl",value:function(e,t,r){this.logger.info("role ".concat(t," is quit control from ").concat(e," and streamId ").concat(r)),r?this.rdcEngine.quitControl(e,t,r):this.rdcEngine.quitControl(e,t)}},{key:"leave",value:(r=A(k().mark((function e(){var t,r,n=this;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.logger.info("leave rc channel [".concat(this._rtcChannel.channelName,"],streamId is [").concat(this._streamId,"]")),Jl.rtcEngine.stopScreenCapture2(),Jl.rtcEngine.videoSourceLeave(),t=1e4,r=this._streamId){e.next=8;break}return this.logger.info("user not joined yet, no op"),e.abrupt("return");case 8:return e.next=10,dl(new Promise(function(){var e=A(k().mark((function e(i){var o;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=Date.now()+t;case 1:if(!(Date.now()<o)){e.next=10;break}if(l._channelUsers.has(r)){e.next=6;break}return n.logger.info("user not in rc channel, stop loop"),i(),e.abrupt("break",10);case 6:return e.next=8,hl(100);case 8:e.next=1;break;case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t);case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"dispose",value:function(){this.logger.info("RCEngine start disposing"),this.logger.info("remove rc listeners"),this._removeListeners(),this.rdcEngine.dispose(),this.logger.info("RCEngine start disposed")}},{key:"getDisplays",value:(t=A(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.rdcEngine.getDisplays();case 2:return this._displays=e.sent,t=this._displays.map((function(e){return{id:e.id,size:{width:e.width,height:e.height},thumbnail:e.thumbnail}})),this.logger.info("get rc displays",t),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"initialize",value:function(){Jl.rtcEngine.on("userJoined",l.handleRTCUserJoined),Jl.rtcEngine.on("removeStream",l.handleRTCUserLeft)}},{key:"cleanup",value:function(){l._channelUsers.clear(),Jl.rtcEngine.off("userJoined",l.handleRTCUserJoined),Jl.rtcEngine.off("removeStream",l.handleRTCUserLeft)}}]),l}(x),If._channelUsers=new Set,If.handleRTCUserJoined=function(e){xn.info("RC user joined channel",e),If._channelUsers.add("".concat(e))},If.handleRTCUserLeft=function(e){xn.info("RC user left channel",e),If._channelUsers.delete("".concat(e))},wf=If))||wf;function Of(e){var t=function(){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}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T(this,r)}}var Nf=function(e){w(i,e);var t,r,n=Of(i);function i(e){var t;return y(this,i),(t=n.call(this))._mediaControl=void 0,t._logService=void 0,t._rtmManager=void 0,t._rtcManager=void 0,t._apiServicePathPrefix="",$n.setConfig(e),xn.setupConsoleHijack(),t._logService=new Tf,t._rtmManager=new hu,t._rtcManager=new df(e.rtcConfigs),t._mediaControl=new Rl(t._rtcManager),$n.platform===Vn.Electron&&kf.initialize(),t}return _(i,[{key:"apiServicePathPrefix",get:function(){return this._apiServicePathPrefix}},{key:"destroy",value:function(){xn.info("RTE engine destroy"),this.getAgoraMediaControl().createCameraVideoTrack().stop(),this.getAgoraMediaControl().createMicrophoneAudioTrack().stop(),this.getAgoraMediaControl().createScreenShareTrack().stop(),$n.platform===Vn.Electron&&kf.cleanup(),this.logout(),xn.restoreConsoleHijack(),gu.forEach((function(e){delete e.__cacheMap})),gu=new Set,Eu.forEach((function(e){delete e.__cacheMap})),Eu=new Set}},{key:"login",value:(r=A(k().mark((function e(t,r){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return cu.shared.host="https://api.sd-rtn.com",cu.shared.pathPrefix="/cn/v1.0/projects/".concat($n.shared.appId,"/app-dev-report"),n=$n.shared.ignoreUrlRegionPrefix,this._apiServicePathPrefix="".concat(n?"":"/"+$n.shared.region.toLowerCase(),"/scene/apps/").concat($n.shared.appId),$n.shared.token=t,$n.shared.userId=r,$n.shared.service.headers={"Content-Type":"application/json","x-agora-token":t,"x-agora-uid":r,Authorization:'agora token="'.concat(t,'"')},e.next=9,this._rtmManager.login(t,r,{uploadLog:!1});case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"logout",value:function(){this._rtcManager.destroy(),this._rtmManager.destroyRtm()}},{key:"createAgoraRteScene",value:function(e){var t=v(this._rtmManager.createObserverChannel(e),2),r=t[0],n=t[1],i=this._rtcManager.getRtcChannel(e);return new Tl(e,{engine:this,rtc:this._rtcManager,rtcChannel:i,rtm:this._rtmManager,rtmChannel:r,rtmChannelObserver:n})}},{key:"createRemoteControlContext",value:function(e,t){return new kf(e.rtcChannel,t)}},{key:"getAgoraMediaControl",value:function(){return this._mediaControl}},{key:"uploadSDKLogToAgoraService",value:(t=A(k().mark((function e(t){var r,n,i,o,a,s,c,u,l,h,d;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pl(xn.logger.collectConsoleLogs());case 2:if(o=e.sent,a=v(o,2),r=a[0],n=a[1],r){e.next=20;break}return e.next=9,pl(this._logService.uploadLogFile(t,n));case 9:if(s=e.sent,c=v(s,1),!(r=c[0])){e.next=16;break}Xn.shared.handleNonThrowableError(Qn.RTE_ERR_WEB_LOG_UPLOAD_ERR,r),e.next=18;break;case 16:return e.next=18,pl(xn.logger.cleanupConsoleLogs());case 18:e.next=21;break;case 20:Xn.shared.handleNonThrowableError(Qn.RTE_ERR_WEB_LOG_UPLOAD_ERR,r);case 21:if($n.platform!==Vn.Electron){e.next=38;break}return e.next=24,pl(xn.logger.collectElectronLogs(Jl.logBasePath,Jl.logFolderPath));case 24:if(u=e.sent,l=v(u,2),r=l[0],i=l[1],r){e.next=37;break}return e.next=31,pl(this._logService.uploadZipLogFile(t,i));case 31:h=e.sent,d=v(h,1),(r=d[0])&&Xn.shared.handleNonThrowableError(Qn.RTE_ERR_ELECTRON_LOG_UPLOAD_ERR,r),e.next=38;break;case 37:Xn.shared.handleNonThrowableError(Qn.RTE_ERR_ELECTRON_LOG_UPLOAD_ERR,r);case 38:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}],[{key:"createWithConfig",value:function(e){return new i(e)}},{key:"getVersion",value:function(){return $n.version}},{key:"getRtcVersion",value:function(){return $n.platform===Vn.Electron?Jl.getRtcVersion():uf.getRtcVersion()}}]),i}(x)})(),__webpack_exports__})()}));
|