text: var ThreeDSTK=function(n){var t={};function e(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:r})},e.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=6)}([function(n,t){n.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},function(n,t,e){"use strict";(function(n){!function(n){function t(n,t,e){var r=n.split("\r\n"),i=c(r,"m=",e);if(null===i)return h("Failed to add bandwidth line to sdp, as no m-line found"),n;var u=f(r,i+1,-1,"m=");null===u&&(u=r.length);var o=f(r,i+1,u,"c=");if(null===o)return h("Failed to add bandwidth line to sdp, as no c-line found"),n;var a=f(r,o+1,u,"b=AS");a&&r.splice(a,1);var l="b=AS:"+t;return r.splice(o+1,0,l),r.join("\r\n")}function e(n,t,e,r){var i=t+" "+e+" codec";if(!r)return h("No preference on "+i+"."),n;h("Prefer "+i+": "+r);var u=n.split("\r\n"),o=c(u,"m=",t);if(null===o)return n;for(var a=null,p=u.length-1;p>=0;--p){var v=f(u,p,0,"a=rtpmap",r,"desc");if(null===v)break;p=v,(a=l(u[v]))&&(u[o]=s(u[o],a))}return u.join("\r\n")}function r(n,t,e,r){var i=n.split("\r\n"),f=a(i,t),s={};if(null===f){var h=c(i,"a=rtpmap",t);if(null===h)return n;var p=l(i[h]);s.pt=p.toString(),s.params={},s.params[e]=r,i.splice(h+1,0,o(s))}else(s=u(i[f])).params[e]=r,i[f]=o(s);return i.join("\r\n")}function i(n,t,e){var r=n.split("\r\n"),i=a(r,t);if(null===i)return n;var c=u(r[i]);delete c.params[e];var f=o(c);return null===f?r.splice(i,1):r[i]=f,r.join("\r\n")}function u(n){var t={},e=n.indexOf(" "),r=n.substring(e+1).split(";"),i=new RegExp("a=fmtp:(\\d+)"),u=n.match(i);if(!u||2!==u.length)return null;t.pt=u[1];for(var o={},a=0;a<r.length;++a){var c=r[a].split("=");2===c.length&&(o[c[0]]=c[1])}return t.params=o,t}function o(n){if(!n.hasOwnProperty("pt")||!n.hasOwnProperty("params"))return null;var t=n.pt,e=n.params,r=[],i=0;for(var u in e)r[i]=u+"="+e[u],++i;return 0===i?null:"a=fmtp:"+t.toString()+" "+r.join(";")}function a(n,t){var e=function(n,t){var e=c(n,"a=rtpmap",t);return e?l(n[e]):null}(n,t);return e?c(n,"a=fmtp:"+e.toString()):null}function c(n,t,e){return f(n,0,-1,t,e)}function f(n,t,e,r,i,u){if(void 0===u&&(u="asc"),"asc"===(u=u||"asc")){for(var o=-1!==e?e:n.length,a=t;a<o;++a)if(0===n[a].indexOf(r)&&(!i||-1!==n[a].toLowerCase().indexOf(i.toLowerCase())))return a}else for(var c=-1!==t?t:n.length-1;c>=0;--c)if(0===n[c].indexOf(r)&&(!i||-1!==n[c].toLowerCase().indexOf(i.toLowerCase())))return c;return null}function l(n){var t=new RegExp("a=rtpmap:(\\d+) [a-zA-Z0-9-]+\\/\\d+"),e=n.match(t);return e&&2===e.length?e[1]:null}function s(n,t){var e=n.split(" "),r=e.slice(0,3);r.push(t);for(var i=3;i<e.length;i++)e[i]!==t&&r.push(e[i]);return r.join(" ")}function h(n){if("\n"===n[n.length-1]&&(n=n.substring(0,n.length-1)),window.performance){var t=(window.performance.now()/1e3).toFixed(3);console.log(t+": "+n)}else console.log(n)}n.exports.setCodecParam=r,n.exports.iceCandidateType=function(n){return n.split(" ")[7]},n.exports.formatTypePreference=function(n){if("chrome"===adapter.browserDetails.browser)switch(n){case 0:return"TURN/TLS";case 1:return"TURN/TCP";case 2:return"TURN/UDP"}else if("firefox"===adapter.browserDetails.browser)switch(n){case 0:return"TURN/TCP";case 5:return"TURN/UDP"}return""},n.exports.maybeSetOpusOptions=function(n,t){return"true"===t.opusStereo?n=r(n,"opus/48000","stereo","1"):"false"===t.opusStereo&&(n=i(n,"opus/48000","stereo")),"true"===t.opusFec?n=r(n,"opus/48000","useinbandfec","1"):"false"===t.opusFec&&(n=i(n,"opus/48000","useinbandfec")),"true"===t.opusDtx?n=r(n,"opus/48000","usedtx","1"):"false"===t.opusDtx&&(n=i(n,"opus/48000","usedtx")),t.opusMaxPbr&&(n=r(n,"opus/48000","maxplaybackrate",t.opusMaxPbr)),n},n.exports.maybePreferAudioReceiveCodec=function(n,t){return e(n,"audio","receive",t.audioRecvCodec)},n.exports.maybeSetAudioReceiveBitRate=function(n,e){return e.audioRecvBitrate?(h("Prefer audio receive bitrate: "+e.audioRecvBitrate),t(n,e.audioRecvBitrate,"audio")):n},n.exports.maybeSetAudioSendBitRate=function(n,e){return e.audioSendBitrate?(h("Prefer audio send bitrate: "+e.audioSendBitrate),t(n,e.audioSendBitrate,"audio")):n},n.exports.maybePreferVideoReceiveCodec=function(n,t){return e(n,"video","receive",t.videoRecvCodec)},n.exports.maybePreferVideoSendCodec=function(n,t){return e(n,"video","send",t.videoSendCodec)},n.exports.maybeSetVideoReceiveBitRate=function(n,e){return e.videoRecvBitrate?(h("Prefer video receive bitrate: "+e.videoRecvBitrate),t(n,e.videoRecvBitrate,"video")):n},n.exports.maybeSetVideoSendBitRate=function(n,e){return e.videoSendBitrate?(h("Prefer video send bitrate: "+e.videoSendBitrate),t(n,e.videoSendBitrate,"video")):n},n.exports.maybeSetVideoSendInitialBitRate=function(n,t){var e=parseInt(t.videoSendInitialBitrate);if(!e)return n;var i=parseInt(e),u=parseInt(t.videoSendBitrate);u&&(e>u&&(h("Clamping initial bitrate to max bitrate of "+u+" kbps."),e=u,t.videoSendInitialBitrate=e),i=u);var o=n.split("\r\n"),a=c(o,"m=","video");if(null===a)return h("Failed to find video m-line"),n;var f=o[a],l=new RegExp("m=video\\s\\d+\\s[A-Z/]+\\s"),s=f.split(l)[1].split(" ")[0],p=o[c(o,"a=rtpmap",s)].split("a=rtpmap:"+s)[1].split("/")[0],v=t.videoSendCodec||p;return r(n=r(n,v,"x-google-min-bitrate",t.videoSendInitialBitrate.toString()),v,"x-google-max-bitrate",i.toString())},n.exports.maybePreferCodec=e,n.exports.mergeConstraints=function(n,t){if(!n||!t)return n||t;var e=n;for(var r in t)e[r]=t[r];return e},n.exports.removeCodecParam=i}(n)}).call(this,e(0)(n))},function(n,t){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(n){"object"==typeof window&&(e=window)}n.exports=e},function(n,t,e){(function(n,r){var i;
  /**
   * @license
   * Lodash <https://lodash.com/>
   * Copyright JS Foundation and other contributors <https://js.foundation/>
   * Released under MIT license <https://lodash.com/license>
   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   */
  /**
   * @license
   * Lodash <https://lodash.com/>
   * Copyright JS Foundation and other contributors <https://js.foundation/>
   * Released under MIT license <https://lodash.com/license>
   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   */
  (function(){var u,o=200,a="Expected a function",c="__lodash_hash_undefined__",f="__lodash_placeholder__",l=1,s=2,h=4,p=1,v=2,d=1,_=2,g=4,y=8,m=16,b=32,w=64,x=128,C=256,S=512,I=800,A=16,R=1/0,j=9007199254740991,E=1.7976931348623157e308,O=NaN,P=4294967295,k=P-1,T=P>>>1,B=[["ary",x],["bind",d],["bindKey",_],["curry",y],["curryRight",m],["flip",S],["partial",b],["partialRight",w],["rearg",C]],L="[object Arguments]",U="[object Array]",D="[object AsyncFunction]",z="[object Boolean]",F="[object Date]",W="[object DOMException]",M="[object Error]",N="[object Function]",$="[object GeneratorFunction]",G="[object Map]",V="[object Number]",q="[object Null]",H="[object Object]",Z="[object Proxy]",J="[object RegExp]",K="[object Set]",Y="[object String]",Q="[object Symbol]",X="[object Undefined]",nn="[object WeakMap]",tn="[object ArrayBuffer]",en="[object DataView]",rn="[object Float32Array]",un="[object Float64Array]",on="[object Int8Array]",an="[object Int16Array]",cn="[object Int32Array]",fn="[object Uint8Array]",ln="[object Uint8ClampedArray]",sn="[object Uint16Array]",hn="[object Uint32Array]",pn=/\b__p \+= '';/g,vn=/\b(__p \+=) '' \+/g,dn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_n=/&(?:amp|lt|gt|quot|#39);/g,gn=/[&<>"']/g,yn=RegExp(_n.source),mn=RegExp(gn.source),bn=/<%-([\s\S]+?)%>/g,wn=/<%([\s\S]+?)%>/g,xn=/<%=([\s\S]+?)%>/g,Cn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sn=/^\w*$/,In=/^\./,An=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rn=/[\\^$.*+?()[\]{}|]/g,jn=RegExp(Rn.source),En=/^\s+|\s+$/g,On=/^\s+/,Pn=/\s+$/,kn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Tn=/\{\n\/\* \[wrapped with (.+)\] \*/,Bn=/,? & /,Ln=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Un=/\\(\\)?/g,Dn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zn=/\w*$/,Fn=/^[-+]0x[0-9a-f]+$/i,Wn=/^0b[01]+$/i,Mn=/^\[object .+?Constructor\]$/,Nn=/^0o[0-7]+$/i,$n=/^(?:0|[1-9]\d*)$/,Gn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Vn=/($^)/,qn=/['\n\r\u2028\u2029\\]/g,Hn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Zn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Jn="["+Zn+"]",Kn="["+Hn+"]",Yn="\\d+",Qn="[a-z\\xdf-\\xf6\\xf8-\\xff]",Xn="[^\\ud800-\\udfff"+Zn+Yn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",nt="\\ud83c[\\udffb-\\udfff]",tt="[^\\ud800-\\udfff]",et="(?:\\ud83c[\\udde6-\\uddff]){2}",rt="[\\ud800-\\udbff][\\udc00-\\udfff]",it="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ut="(?:"+Qn+"|"+Xn+")",ot="(?:"+it+"|"+Xn+")",at="(?:"+Kn+"|"+nt+")?",ct="[\\ufe0e\\ufe0f]?"+at+"(?:\\u200d(?:"+[tt,et,rt].join("|")+")[\\ufe0e\\ufe0f]?"+at+")*",ft="(?:"+["[\\u2700-\\u27bf]",et,rt].join("|")+")"+ct,lt="(?:"+[tt+Kn+"?",Kn,et,rt,"[\\ud800-\\udfff]"].join("|")+")",st=RegExp("['’]","g"),ht=RegExp(Kn,"g"),pt=RegExp(nt+"(?="+nt+")|"+lt+ct,"g"),vt=RegExp([it+"?"+Qn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Jn,it,"$"].join("|")+")",ot+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Jn,it+ut,"$"].join("|")+")",it+"?"+ut+"+(?:['’](?:d|ll|m|re|s|t|ve))?",it+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",Yn,ft].join("|"),"g"),dt=RegExp("[\\u200d\\ud800-\\udfff"+Hn+"\\ufe0e\\ufe0f]"),_t=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],yt=-1,mt={};mt[rn]=mt[un]=mt[on]=mt[an]=mt[cn]=mt[fn]=mt[ln]=mt[sn]=mt[hn]=!0,mt[L]=mt[U]=mt[tn]=mt[z]=mt[en]=mt[F]=mt[M]=mt[N]=mt[G]=mt[V]=mt[H]=mt[J]=mt[K]=mt[Y]=mt[nn]=!1;var bt={};bt[L]=bt[U]=bt[tn]=bt[en]=bt[z]=bt[F]=bt[rn]=bt[un]=bt[on]=bt[an]=bt[cn]=bt[G]=bt[V]=bt[H]=bt[J]=bt[K]=bt[Y]=bt[Q]=bt[fn]=bt[ln]=bt[sn]=bt[hn]=!0,bt[M]=bt[N]=bt[nn]=!1;var wt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xt=parseFloat,Ct=parseInt,St="object"==typeof n&&n&&n.Object===Object&&n,It="object"==typeof self&&self&&self.Object===Object&&self,At=St||It||Function("return this")(),Rt="object"==typeof t&&t&&!t.nodeType&&t,jt=Rt&&"object"==typeof r&&r&&!r.nodeType&&r,Et=jt&&jt.exports===Rt,Ot=Et&&St.process,Pt=function(){try{return Ot&&Ot.binding&&Ot.binding("util")}catch(n){}}(),kt=Pt&&Pt.isArrayBuffer,Tt=Pt&&Pt.isDate,Bt=Pt&&Pt.isMap,Lt=Pt&&Pt.isRegExp,Ut=Pt&&Pt.isSet,Dt=Pt&&Pt.isTypedArray;function zt(n,t){return n.set(t[0],t[1]),n}function Ft(n,t){return n.add(t),n}function Wt(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function Mt(n,t,e,r){for(var i=-1,u=null==n?0:n.length;++i<u;){var o=n[i];t(r,o,e(o),n)}return r}function Nt(n,t){for(var e=-1,r=null==n?0:n.length;++e<r&&!1!==t(n[e],e,n););return n}function $t(n,t){for(var e=-1,r=null==n?0:n.length;++e<r;)if(!t(n[e],e,n))return!1;return!0}function Gt(n,t){for(var e=-1,r=null==n?0:n.length,i=0,u=[];++e<r;){var o=n[e];t(o,e,n)&&(u[i++]=o)}return u}function Vt(n,t){return!(null==n||!n.length)&&te(n,t,0)>-1}function qt(n,t,e){for(var r=-1,i=null==n?0:n.length;++r<i;)if(e(t,n[r]))return!0;return!1}function Ht(n,t){for(var e=-1,r=null==n?0:n.length,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function Zt(n,t){for(var e=-1,r=t.length,i=n.length;++e<r;)n[i+e]=t[e];return n}function Jt(n,t,e,r){var i=-1,u=null==n?0:n.length;for(r&&u&&(e=n[++i]);++i<u;)e=t(e,n[i],i,n);return e}function Kt(n,t,e,r){var i=null==n?0:n.length;for(r&&i&&(e=n[--i]);i--;)e=t(e,n[i],i,n);return e}function Yt(n,t){for(var e=-1,r=null==n?0:n.length;++e<r;)if(t(n[e],e,n))return!0;return!1}var Qt=ue("length");function Xt(n,t,e){var r;return e(n,function(n,e,i){if(t(n,e,i))return r=e,!1}),r}function ne(n,t,e,r){for(var i=n.length,u=e+(r?1:-1);r?u--:++u<i;)if(t(n[u],u,n))return u;return-1}function te(n,t,e){return t==t?function(n,t,e){for(var r=e-1,i=n.length;++r<i;)if(n[r]===t)return r;return-1}(n,t,e):ne(n,re,e)}function ee(n,t,e,r){for(var i=e-1,u=n.length;++i<u;)if(r(n[i],t))return i;return-1}function re(n){return n!=n}function ie(n,t){var e=null==n?0:n.length;return e?ce(n,t)/e:O}function ue(n){return function(t){return null==t?u:t[n]}}function oe(n){return function(t){return null==n?u:n[t]}}function ae(n,t,e,r,i){return i(n,function(n,i,u){e=r?(r=!1,n):t(e,n,i,u)}),e}function ce(n,t){for(var e,r=-1,i=n.length;++r<i;){var o=t(n[r]);o!==u&&(e=e===u?o:e+o)}return e}function fe(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}function le(n){return function(t){return n(t)}}function se(n,t){return Ht(t,function(t){return n[t]})}function he(n,t){return n.has(t)}function pe(n,t){for(var e=-1,r=n.length;++e<r&&te(t,n[e],0)>-1;);return e}function ve(n,t){for(var e=n.length;e--&&te(t,n[e],0)>-1;);return e}var de=oe({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),_e=oe({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function ge(n){return"\\"+wt[n]}function ye(n){return dt.test(n)}function me(n){var t=-1,e=Array(n.size);return n.forEach(function(n,r){e[++t]=[r,n]}),e}function be(n,t){return function(e){return n(t(e))}}function we(n,t){for(var e=-1,r=n.length,i=0,u=[];++e<r;){var o=n[e];o!==t&&o!==f||(n[e]=f,u[i++]=e)}return u}function xe(n){var t=-1,e=Array(n.size);return n.forEach(function(n){e[++t]=n}),e}function Ce(n){return ye(n)?function(n){for(var t=pt.lastIndex=0;pt.test(n);)++t;return t}(n):Qt(n)}function Se(n){return ye(n)?function(n){return n.match(pt)||[]}(n):function(n){return n.split("")}(n)}var Ie=oe({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Ae=function n(t){var e,r=(t=null==t?At:Ae.defaults(At.Object(),t,Ae.pick(At,gt))).Array,i=t.Date,Hn=t.Error,Zn=t.Function,Jn=t.Math,Kn=t.Object,Yn=t.RegExp,Qn=t.String,Xn=t.TypeError,nt=r.prototype,tt=Zn.prototype,et=Kn.prototype,rt=t["__core-js_shared__"],it=tt.toString,ut=et.hasOwnProperty,ot=0,at=(e=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",ct=et.toString,ft=it.call(Kn),lt=At._,pt=Yn("^"+it.call(ut).replace(Rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dt=Et?t.Buffer:u,wt=t.Symbol,St=t.Uint8Array,It=dt?dt.allocUnsafe:u,Rt=be(Kn.getPrototypeOf,Kn),jt=Kn.create,Ot=et.propertyIsEnumerable,Pt=nt.splice,Qt=wt?wt.isConcatSpreadable:u,oe=wt?wt.iterator:u,Re=wt?wt.toStringTag:u,je=function(){try{var n=Au(Kn,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ee=t.clearTimeout!==At.clearTimeout&&t.clearTimeout,Oe=i&&i.now!==At.Date.now&&i.now,Pe=t.setTimeout!==At.setTimeout&&t.setTimeout,ke=Jn.ceil,Te=Jn.floor,Be=Kn.getOwnPropertySymbols,Le=dt?dt.isBuffer:u,Ue=t.isFinite,De=nt.join,ze=be(Kn.keys,Kn),Fe=Jn.max,We=Jn.min,Me=i.now,Ne=t.parseInt,$e=Jn.random,Ge=nt.reverse,Ve=Au(t,"DataView"),qe=Au(t,"Map"),He=Au(t,"Promise"),Ze=Au(t,"Set"),Je=Au(t,"WeakMap"),Ke=Au(Kn,"create"),Ye=Je&&new Je,Qe={},Xe=Yu(Ve),nr=Yu(qe),tr=Yu(He),er=Yu(Ze),rr=Yu(Je),ir=wt?wt.prototype:u,ur=ir?ir.valueOf:u,or=ir?ir.toString:u;function ar(n){if(da(n)&&!ia(n)&&!(n instanceof sr)){if(n instanceof lr)return n;if(ut.call(n,"__wrapped__"))return Qu(n)}return new lr(n)}var cr=function(){function n(){}return function(t){if(!va(t))return{};if(jt)return jt(t);n.prototype=t;var e=new n;return n.prototype=u,e}}();function fr(){}function lr(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=u}function sr(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=P,this.__views__=[]}function hr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function pr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function vr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function dr(n){var t=-1,e=null==n?0:n.length;for(this.__data__=new vr;++t<e;)this.add(n[t])}function _r(n){var t=this.__data__=new pr(n);this.size=t.size}function gr(n,t){var e=ia(n),r=!e&&ra(n),i=!e&&!r&&ca(n),u=!e&&!r&&!i&&Ca(n),o=e||r||i||u,a=o?fe(n.length,Qn):[],c=a.length;for(var f in n)!t&&!ut.call(n,f)||o&&("length"==f||i&&("offset"==f||"parent"==f)||u&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Tu(f,c))||a.push(f);return a}function yr(n){var t=n.length;return t?n[hi(0,t-1)]:u}function mr(n,t,e){(e===u||na(n[t],e))&&(e!==u||t in n)||Sr(n,t,e)}function br(n,t,e){var r=n[t];ut.call(n,t)&&na(r,e)&&(e!==u||t in n)||Sr(n,t,e)}function wr(n,t){for(var e=n.length;e--;)if(na(n[e][0],t))return e;return-1}function xr(n,t,e,r){return Pr(n,function(n,i,u){t(r,n,e(n),u)}),r}function Cr(n,t){return n&&Vi(t,Va(t),n)}function Sr(n,t,e){"__proto__"==t&&je?je(n,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):n[t]=e}function Ir(n,t){for(var e=-1,i=t.length,o=r(i),a=null==n;++e<i;)o[e]=a?u:Wa(n,t[e]);return o}function Ar(n,t,e){return n==n&&(e!==u&&(n=n<=e?n:e),t!==u&&(n=n>=t?n:t)),n}function Rr(n,t,e,r,i,o){var a,c=t&l,f=t&s,p=t&h;if(e&&(a=i?e(n,r,i,o):e(n)),a!==u)return a;if(!va(n))return n;var v=ia(n);if(v){if(a=function(n){var t=n.length,e=n.constructor(t);return t&&"string"==typeof n[0]&&ut.call(n,"index")&&(e.index=n.index,e.input=n.input),e}(n),!c)return Gi(n,a)}else{var d=Eu(n),_=d==N||d==$;if(ca(n))return zi(n,c);if(d==H||d==L||_&&!i){if(a=f||_?{}:Pu(n),!c)return f?function(n,t){return Vi(n,ju(n),t)}(n,function(n,t){return n&&Vi(t,qa(t),n)}(a,n)):function(n,t){return Vi(n,Ru(n),t)}(n,Cr(a,n))}else{if(!bt[d])return i?n:{};a=function(n,t,e,r){var i,u,o,a=n.constructor;switch(t){case tn:return Fi(n);case z:case F:return new a(+n);case en:return function(n,t){var e=r?Fi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}(n);case rn:case un:case on:case an:case cn:case fn:case ln:case sn:case hn:return Wi(n,r);case G:return function(n,t,e){return Jt(r?e(me(n),l):me(n),zt,new n.constructor)}(n,0,e);case V:case Y:return new a(n);case J:return(o=new(u=n).constructor(u.source,zn.exec(u))).lastIndex=u.lastIndex,o;case K:return function(n,t,e){return Jt(r?e(xe(n),l):xe(n),Ft,new n.constructor)}(n,0,e);case Q:return i=n,ur?Kn(ur.call(i)):{}}}(n,d,Rr,c)}}o||(o=new _r);var g=o.get(n);if(g)return g;o.set(n,a);var y=v?u:(p?f?mu:yu:f?qa:Va)(n);return Nt(y||n,function(r,i){y&&(r=n[i=r]),br(a,i,Rr(r,t,e,i,n,o))}),a}function jr(n,t,e){var r=e.length;if(null==n)return!r;for(n=Kn(n);r--;){var i=e[r],o=t[i],a=n[i];if(a===u&&!(i in n)||!o(a))return!1}return!0}function Er(n,t,e){if("function"!=typeof n)throw new Xn(a);return Gu(function(){n.apply(u,e)},t)}function Or(n,t,e,r){var i=-1,u=Vt,a=!0,c=n.length,f=[],l=t.length;if(!c)return f;e&&(t=Ht(t,le(e))),r?(u=qt,a=!1):t.length>=o&&(u=he,a=!1,t=new dr(t));n:for(;++i<c;){var s=n[i],h=null==e?s:e(s);if(s=r||0!==s?s:0,a&&h==h){for(var p=l;p--;)if(t[p]===h)continue n;f.push(s)}else u(t,h,r)||f.push(s)}return f}ar.templateSettings={escape:bn,evaluate:wn,interpolate:xn,variable:"",imports:{_:ar}},ar.prototype=fr.prototype,ar.prototype.constructor=ar,lr.prototype=cr(fr.prototype),lr.prototype.constructor=lr,sr.prototype=cr(fr.prototype),sr.prototype.constructor=sr,hr.prototype.clear=function(){this.__data__=Ke?Ke(null):{},this.size=0},hr.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},hr.prototype.get=function(n){var t=this.__data__;if(Ke){var e=t[n];return e===c?u:e}return ut.call(t,n)?t[n]:u},hr.prototype.has=function(n){var t=this.__data__;return Ke?t[n]!==u:ut.call(t,n)},hr.prototype.set=function(n,t){var e=this.__data__;return this.size+=this.has(n)?0:1,e[n]=Ke&&t===u?c:t,this},pr.prototype.clear=function(){this.__data__=[],this.size=0},pr.prototype.delete=function(n){var t=this.__data__,e=wr(t,n);return!(e<0||(e==t.length-1?t.pop():Pt.call(t,e,1),--this.size,0))},pr.prototype.get=function(n){var t=this.__data__,e=wr(t,n);return e<0?u:t[e][1]},pr.prototype.has=function(n){return wr(this.__data__,n)>-1},pr.prototype.set=function(n,t){var e=this.__data__,r=wr(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this},vr.prototype.clear=function(){this.size=0,this.__data__={hash:new hr,map:new(qe||pr),string:new hr}},vr.prototype.delete=function(n){var t=Su(this,n).delete(n);return this.size-=t?1:0,t},vr.prototype.get=function(n){return Su(this,n).get(n)},vr.prototype.has=function(n){return Su(this,n).has(n)},vr.prototype.set=function(n,t){var e=Su(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this},dr.prototype.add=dr.prototype.push=function(n){return this.__data__.set(n,c),this},dr.prototype.has=function(n){return this.__data__.has(n)},_r.prototype.clear=function(){this.__data__=new pr,this.size=0},_r.prototype.delete=function(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e},_r.prototype.get=function(n){return this.__data__.get(n)},_r.prototype.has=function(n){return this.__data__.has(n)},_r.prototype.set=function(n,t){var e=this.__data__;if(e instanceof pr){var r=e.__data__;if(!qe||r.length<o-1)return r.push([n,t]),this.size=++e.size,this;e=this.__data__=new vr(r)}return e.set(n,t),this.size=e.size,this};var Pr=Zi(Fr),kr=Zi(Wr,!0);function Tr(n,t){var e=!0;return Pr(n,function(n,r,i){return e=!!t(n,r,i)}),e}function Br(n,t,e){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=t(o);if(null!=a&&(c===u?a==a&&!xa(a):e(a,c)))var c=a,f=o}return f}function Lr(n,t){var e=[];return Pr(n,function(n,r,i){t(n,r,i)&&e.push(n)}),e}function Ur(n,t,e,r,i){var u=-1,o=n.length;for(e||(e=ku),i||(i=[]);++u<o;){var a=n[u];t>0&&e(a)?t>1?Ur(a,t-1,e,r,i):Zt(i,a):r||(i[i.length]=a)}return i}var Dr=Ji(),zr=Ji(!0);function Fr(n,t){return n&&Dr(n,t,Va)}function Wr(n,t){return n&&zr(n,t,Va)}function Mr(n,t){return Gt(t,function(t){return sa(n[t])})}function Nr(n,t){for(var e=0,r=(t=Bi(t,n)).length;null!=n&&e<r;)n=n[Ku(t[e++])];return e&&e==r?n:u}function $r(n,t,e){var r=t(n);return ia(n)?r:Zt(r,e(n))}function Gr(n){return null==n?n===u?X:q:Re&&Re in Kn(n)?function(n){var t=ut.call(n,Re),e=n[Re];try{n[Re]=u;var r=!0}catch(n){}var i=ct.call(n);return r&&(t?n[Re]=e:delete n[Re]),i}(n):function(n){return ct.call(n)}(n)}function Vr(n,t){return n>t}function qr(n,t){return null!=n&&ut.call(n,t)}function Hr(n,t){return null!=n&&t in Kn(n)}function Zr(n,t,e){for(var i=e?qt:Vt,o=n[0].length,a=n.length,c=a,f=r(a),l=1/0,s=[];c--;){var h=n[c];c&&t&&(h=Ht(h,le(t))),l=We(h.length,l),f[c]=!e&&(t||o>=120&&h.length>=120)?new dr(c&&h):u}h=n[0];var p=-1,v=f[0];n:for(;++p<o&&s.length<l;){var d=h[p],_=t?t(d):d;if(d=e||0!==d?d:0,!(v?he(v,_):i(s,_,e))){for(c=a;--c;){var g=f[c];if(!(g?he(g,_):i(n[c],_,e)))continue n}v&&v.push(_),s.push(d)}}return s}function Jr(n,t,e){var r=null==(n=Nu(n,t=Bi(t,n)))?n:n[Ku(fo(t))];return null==r?u:Wt(r,n,e)}function Kr(n){return da(n)&&Gr(n)==L}function Yr(n,t,e,r,i){return n===t||(null==n||null==t||!da(n)&&!da(t)?n!=n&&t!=t:function(n,t,e,r,i,o){var a=ia(n),c=ia(t),f=a?U:Eu(n),l=c?U:Eu(t),s=(f=f==L?H:f)==H,h=(l=l==L?H:l)==H,d=f==l;if(d&&ca(n)){if(!ca(t))return!1;a=!0,s=!1}if(d&&!s)return o||(o=new _r),a||Ca(n)?_u(n,t,e,r,i,o):function(n,t,e,r,i,u,o){switch(e){case en:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case tn:return!(n.byteLength!=t.byteLength||!u(new St(n),new St(t)));case z:case F:case V:return na(+n,+t);case M:return n.name==t.name&&n.message==t.message;case J:case Y:return n==t+"";case G:var a=me;case K:var c=r&p;if(a||(a=xe),n.size!=t.size&&!c)return!1;var f=o.get(n);if(f)return f==t;r|=v,o.set(n,t);var l=_u(a(n),a(t),r,i,u,o);return o.delete(n),l;case Q:if(ur)return ur.call(n)==ur.call(t)}return!1}(n,t,f,e,r,i,o);if(!(e&p)){var _=s&&ut.call(n,"__wrapped__"),g=h&&ut.call(t,"__wrapped__");if(_||g){var y=_?n.value():n,m=g?t.value():t;return o||(o=new _r),i(y,m,e,r,o)}}return!!d&&(o||(o=new _r),function(n,t,e,r,i,o){var a=e&p,c=yu(n),f=c.length;if(f!=yu(t).length&&!a)return!1;for(var l=f;l--;){var s=c[l];if(!(a?s in t:ut.call(t,s)))return!1}var h=o.get(n);if(h&&o.get(t))return h==t;var v=!0;o.set(n,t),o.set(t,n);for(var d=a;++l<f;){var _=n[s=c[l]],g=t[s];if(r)var y=a?r(g,_,s,t,n,o):r(_,g,s,n,t,o);if(!(y===u?_===g||i(_,g,e,r,o):y)){v=!1;break}d||(d="constructor"==s)}if(v&&!d){var m=n.constructor,b=t.constructor;m!=b&&"constructor"in n&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b)&&(v=!1)}return o.delete(n),o.delete(t),v}(n,t,e,r,i,o))}(n,t,e,r,Yr,i))}function Qr(n,t,e,r){var i=e.length,o=i,a=!r;if(null==n)return!o;for(n=Kn(n);i--;){var c=e[i];if(a&&c[2]?c[1]!==n[c[0]]:!(c[0]in n))return!1}for(;++i<o;){var f=(c=e[i])[0],l=n[f],s=c[1];if(a&&c[2]){if(l===u&&!(f in n))return!1}else{var h=new _r;if(r)var d=r(l,s,f,n,t,h);if(!(d===u?Yr(s,l,p|v,r,h):d))return!1}}return!0}function Xr(n){return!(!va(n)||at&&at in n)&&(sa(n)?pt:Mn).test(Yu(n))}function ni(n){return"function"==typeof n?n:null==n?gc:"object"==typeof n?ia(n)?ui(n[0],n[1]):ii(n):Ac(n)}function ti(n){if(!zu(n))return ze(n);var t=[];for(var e in Kn(n))ut.call(n,e)&&"constructor"!=e&&t.push(e);return t}function ei(n,t){return n<t}function ri(n,t){var e=-1,i=oa(n)?r(n.length):[];return Pr(n,function(n,r,u){i[++e]=t(n,r,u)}),i}function ii(n){var t=Iu(n);return 1==t.length&&t[0][2]?Wu(t[0][0],t[0][1]):function(e){return e===n||Qr(e,n,t)}}function ui(n,t){return Lu(n)&&Fu(t)?Wu(Ku(n),t):function(e){var r=Wa(e,n);return r===u&&r===t?Ma(e,n):Yr(t,r,p|v)}}function oi(n,t,e,r,i){n!==t&&Dr(t,function(o,a){if(va(o))i||(i=new _r),function(n,t,e,r,i,o,a){var c=n[e],f=t[e],l=a.get(f);if(l)mr(n,e,l);else{var s=o?o(c,f,e+"",n,t,a):u,h=s===u;if(h){var p=ia(f),v=!p&&ca(f),d=!p&&!v&&Ca(f);s=f,p||v||d?ia(c)?s=c:aa(c)?s=Gi(c):v?(h=!1,s=zi(f,!0)):d?(h=!1,s=Wi(f,!0)):s=[]:ya(f)||ra(f)?(s=c,ra(c)?s=Pa(c):(!va(c)||r&&sa(c))&&(s=Pu(f))):h=!1}h&&(a.set(f,s),i(s,f,r,o,a),a.delete(f)),mr(n,e,s)}}(n,t,a,e,oi,r,i);else{var c=r?r(n[a],o,a+"",n,t,i):u;c===u&&(c=o),mr(n,a,c)}},qa)}function ai(n,t){var e=n.length;if(e)return Tu(t+=t<0?e:0,e)?n[t]:u}function ci(n,t,e){var r=-1;return t=Ht(t.length?t:[gc],le(Cu())),function(n,t){var e=n.length;for(n.sort(t);e--;)n[e]=n[e].value;return n}(ri(n,function(n,e,i){return{criteria:Ht(t,function(t){return t(n)}),index:++r,value:n}}),function(n,t){return function(n,t,e){for(var r=-1,i=n.criteria,u=t.criteria,o=i.length,a=e.length;++r<o;){var c=Mi(i[r],u[r]);if(c)return r>=a?c:c*("desc"==e[r]?-1:1)}return n.index-t.index}(n,t,e)})}function fi(n,t,e){for(var r=-1,i=t.length,u={};++r<i;){var o=t[r],a=Nr(n,o);e(a,o)&&di(u,Bi(o,n),a)}return u}function li(n,t,e,r){var i=r?ee:te,u=-1,o=t.length,a=n;for(n===t&&(t=Gi(t)),e&&(a=Ht(n,le(e)));++u<o;)for(var c=0,f=t[u],l=e?e(f):f;(c=i(a,l,c,r))>-1;)a!==n&&Pt.call(a,c,1),Pt.call(n,c,1);return n}function si(n,t){for(var e=n?t.length:0,r=e-1;e--;){var i=t[e];if(e==r||i!==u){var u=i;Tu(i)?Pt.call(n,i,1):Ai(n,i)}}return n}function hi(n,t){return n+Te($e()*(t-n+1))}function pi(n,t){var e="";if(!n||t<1||t>j)return e;do{t%2&&(e+=n),(t=Te(t/2))&&(n+=n)}while(t);return e}function vi(n,t){return Vu(Mu(n,t,gc),n+"")}function di(n,t,e,r){if(!va(n))return n;for(var i=-1,o=(t=Bi(t,n)).length,a=o-1,c=n;null!=c&&++i<o;){var f=Ku(t[i]),l=e;if(i!=a){var s=c[f];(l=r?r(s,f,c):u)===u&&(l=va(s)?s:Tu(t[i+1])?[]:{})}br(c,f,l),c=c[f]}return n}var _i=Ye?function(n,t){return Ye.set(n,t),n}:gc,gi=je?function(n,t){return je(n,"toString",{configurable:!0,enumerable:!1,value:vc(t),writable:!0})}:gc;function yi(n,t,e){var i=-1,u=n.length;t<0&&(t=-t>u?0:u+t),(e=e>u?u:e)<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var o=r(u);++i<u;)o[i]=n[i+t];return o}function mi(n,t){var e;return Pr(n,function(n,r,i){return!(e=t(n,r,i))}),!!e}function bi(n,t,e){var r=0,i=null==n?r:n.length;if("number"==typeof t&&t==t&&i<=T){for(;r<i;){var u=r+i>>>1,o=n[u];null!==o&&!xa(o)&&(e?o<=t:o<t)?r=u+1:i=u}return i}return wi(n,t,gc,e)}function wi(n,t,e,r){t=e(t);for(var i=0,o=null==n?0:n.length,a=t!=t,c=null===t,f=xa(t),l=t===u;i<o;){var s=Te((i+o)/2),h=e(n[s]),p=h!==u,v=null===h,d=h==h,_=xa(h);if(a)var g=r||d;else g=l?d&&(r||p):c?d&&p&&(r||!v):f?d&&p&&!v&&(r||!_):!v&&!_&&(r?h<=t:h<t);g?i=s+1:o=s}return We(o,k)}function xi(n,t){for(var e=-1,r=n.length,i=0,u=[];++e<r;){var o=n[e],a=t?t(o):o;if(!e||!na(a,c)){var c=a;u[i++]=0===o?0:o}}return u}function Ci(n){return"number"==typeof n?n:xa(n)?O:+n}function Si(n){if("string"==typeof n)return n;if(ia(n))return Ht(n,Si)+"";if(xa(n))return or?or.call(n):"";var t=n+"";return"0"==t&&1/n==-R?"-0":t}function Ii(n,t,e){var r=-1,i=Vt,u=n.length,a=!0,c=[],f=c;if(e)a=!1,i=qt;else if(u>=o){var l=t?null:lu(n);if(l)return xe(l);a=!1,i=he,f=new dr}else f=t?[]:c;n:for(;++r<u;){var s=n[r],h=t?t(s):s;if(s=e||0!==s?s:0,a&&h==h){for(var p=f.length;p--;)if(f[p]===h)continue n;t&&f.push(h),c.push(s)}else i(f,h,e)||(f!==c&&f.push(h),c.push(s))}return c}function Ai(n,t){return null==(n=Nu(n,t=Bi(t,n)))||delete n[Ku(fo(t))]}function Ri(n,t,e,r){return di(n,t,e(Nr(n,t)),r)}function ji(n,t,e,r){for(var i=n.length,u=r?i:-1;(r?u--:++u<i)&&t(n[u],u,n););return e?yi(n,r?0:u,r?u+1:i):yi(n,r?u+1:0,r?i:u)}function Ei(n,t){var e=n;return e instanceof sr&&(e=e.value()),Jt(t,function(n,t){return t.func.apply(t.thisArg,Zt([n],t.args))},e)}function Oi(n,t,e){var i=n.length;if(i<2)return i?Ii(n[0]):[];for(var u=-1,o=r(i);++u<i;)for(var a=n[u],c=-1;++c<i;)c!=u&&(o[u]=Or(o[u]||a,n[c],t,e));return Ii(Ur(o,1),t,e)}function Pi(n,t,e){for(var r=-1,i=n.length,o=t.length,a={};++r<i;){var c=r<o?t[r]:u;e(a,n[r],c)}return a}function ki(n){return aa(n)?n:[]}function Ti(n){return"function"==typeof n?n:gc}function Bi(n,t){return ia(n)?n:Lu(n,t)?[n]:Ju(ka(n))}var Li=vi;function Ui(n,t,e){var r=n.length;return e=e===u?r:e,!t&&e>=r?n:yi(n,t,e)}var Di=Ee||function(n){return At.clearTimeout(n)};function zi(n,t){if(t)return n.slice();var e=n.length,r=It?It(e):new n.constructor(e);return n.copy(r),r}function Fi(n){var t=new n.constructor(n.byteLength);return new St(t).set(new St(n)),t}function Wi(n,t){var e=t?Fi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function Mi(n,t){if(n!==t){var e=n!==u,r=null===n,i=n==n,o=xa(n),a=t!==u,c=null===t,f=t==t,l=xa(t);if(!c&&!l&&!o&&n>t||o&&a&&f&&!c&&!l||r&&a&&f||!e&&f||!i)return 1;if(!r&&!o&&!l&&n<t||l&&e&&i&&!r&&!o||c&&e&&i||!a&&i||!f)return-1}return 0}function Ni(n,t,e,i){for(var u=-1,o=n.length,a=e.length,c=-1,f=t.length,l=Fe(o-a,0),s=r(f+l),h=!i;++c<f;)s[c]=t[c];for(;++u<a;)(h||u<o)&&(s[e[u]]=n[u]);for(;l--;)s[c++]=n[u++];return s}function $i(n,t,e,i){for(var u=-1,o=n.length,a=-1,c=e.length,f=-1,l=t.length,s=Fe(o-c,0),h=r(s+l),p=!i;++u<s;)h[u]=n[u];for(var v=u;++f<l;)h[v+f]=t[f];for(;++a<c;)(p||u<o)&&(h[v+e[a]]=n[u++]);return h}function Gi(n,t){var e=-1,i=n.length;for(t||(t=r(i));++e<i;)t[e]=n[e];return t}function Vi(n,t,e,r){var i=!e;e||(e={});for(var o=-1,a=t.length;++o<a;){var c=t[o],f=r?r(e[c],n[c],c,e,n):u;f===u&&(f=n[c]),i?Sr(e,c,f):br(e,c,f)}return e}function qi(n,t){return function(e,r){var i=ia(e)?Mt:xr,u=t?t():{};return i(e,n,Cu(r,2),u)}}function Hi(n){return vi(function(t,e){var r=-1,i=e.length,o=i>1?e[i-1]:u,a=i>2?e[2]:u;for(o=n.length>3&&"function"==typeof o?(i--,o):u,a&&Bu(e[0],e[1],a)&&(o=i<3?u:o,i=1),t=Kn(t);++r<i;){var c=e[r];c&&n(t,c,r,o)}return t})}function Zi(n,t){return function(e,r){if(null==e)return e;if(!oa(e))return n(e,r);for(var i=e.length,u=t?i:-1,o=Kn(e);(t?u--:++u<i)&&!1!==r(o[u],u,o););return e}}function Ji(n){return function(t,e,r){for(var i=-1,u=Kn(t),o=r(t),a=o.length;a--;){var c=o[n?a:++i];if(!1===e(u[c],c,u))break}return t}}function Ki(n){return function(t){var e=ye(t=ka(t))?Se(t):u,r=e?e[0]:t.charAt(0),i=e?Ui(e,1).join(""):t.slice(1);return r[n]()+i}}function Yi(n){return function(t){return Jt(sc(rc(t).replace(st,"")),n,"")}}function Qi(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var e=cr(n.prototype),r=n.apply(e,t);return va(r)?r:e}}function Xi(n){return function(t,e,r){var i=Kn(t);if(!oa(t)){var o=Cu(e,3);t=Va(t),e=function(n){return o(i[n],n,i)}}var a=n(t,e,r);return a>-1?i[o?t[a]:a]:u}}function nu(n){return gu(function(t){var e=t.length,r=e,i=lr.prototype.thru;for(n&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new Xn(a);if(i&&!c&&"wrapper"==wu(o))var c=new lr([],!0)}for(r=c?r:e;++r<e;){var f=wu(o=t[r]),l="wrapper"==f?bu(o):u;c=l&&Uu(l[0])&&l[1]==(x|y|b|C)&&!l[4].length&&1==l[9]?c[wu(l[0])].apply(c,l[3]):1==o.length&&Uu(o)?c[f]():c.thru(o)}return function(){var n=arguments,r=n[0];if(c&&1==n.length&&ia(r))return c.plant(r).value();for(var i=0,u=e?t[i].apply(this,n):r;++i<e;)u=t[i].call(this,u);return u}})}function tu(n,t,e,i,o,a,c,f,l,s){var h=t&x,p=t&d,v=t&_,g=t&(y|m),b=t&S,w=v?u:Qi(n);return function d(){for(var _=arguments.length,y=r(_),m=_;m--;)y[m]=arguments[m];if(g)var x=xu(d),C=function(n,t){for(var e=n.length,r=0;e--;)n[e]===t&&++r;return r}(y,x);if(i&&(y=Ni(y,i,o,g)),a&&(y=$i(y,a,c,g)),_-=C,g&&_<s){var S=we(y,x);return cu(n,t,tu,d.placeholder,e,y,S,f,l,s-_)}var I=p?e:this,A=v?I[n]:n;return _=y.length,f?y=function(n,t){for(var e=n.length,r=We(t.length,e),i=Gi(n);r--;){var o=t[r];n[r]=Tu(o,e)?i[o]:u}return n}(y,f):b&&_>1&&y.reverse(),h&&l<_&&(y.length=l),this&&this!==At&&this instanceof d&&(A=w||Qi(A)),A.apply(I,y)}}function eu(n,t){return function(e,r){return function(n,t,e,r){return Fr(n,function(n,i,u){t(r,e(n),i,u)}),r}(e,n,t(r),{})}}function ru(n,t){return function(e,r){var i;if(e===u&&r===u)return t;if(e!==u&&(i=e),r!==u){if(i===u)return r;"string"==typeof e||"string"==typeof r?(e=Si(e),r=Si(r)):(e=Ci(e),r=Ci(r)),i=n(e,r)}return i}}function iu(n){return gu(function(t){return t=Ht(t,le(Cu())),vi(function(e){var r=this;return n(t,function(n){return Wt(n,r,e)})})})}function uu(n,t){var e=(t=t===u?" ":Si(t)).length;if(e<2)return e?pi(t,n):t;var r=pi(t,ke(n/Ce(t)));return ye(t)?Ui(Se(r),0,n).join(""):r.slice(0,n)}function ou(n){return function(t,e,i){return i&&"number"!=typeof i&&Bu(t,e,i)&&(e=i=u),t=Ra(t),e===u?(e=t,t=0):e=Ra(e),function(n,t,e,i){for(var u=-1,o=Fe(ke((t-n)/(e||1)),0),a=r(o);o--;)a[i?o:++u]=n,n+=e;return a}(t,e,i=i===u?t<e?1:-1:Ra(i),n)}}function au(n){return function(t,e){return"string"==typeof t&&"string"==typeof e||(t=Oa(t),e=Oa(e)),n(t,e)}}function cu(n,t,e,r,i,o,a,c,f,l){var s=t&y;t|=s?b:w,(t&=~(s?w:b))&g||(t&=~(d|_));var h=[n,t,i,s?o:u,s?a:u,s?u:o,s?u:a,c,f,l],p=e.apply(u,h);return Uu(n)&&$u(p,h),p.placeholder=r,qu(p,n,t)}function fu(n){var t=Jn[n];return function(n,e){if(n=Oa(n),e=null==e?0:We(ja(e),292)){var r=(ka(n)+"e").split("e");return+((r=(ka(t(r[0]+"e"+(+r[1]+e)))+"e").split("e"))[0]+"e"+(+r[1]-e))}return t(n)}}var lu=Ze&&1/xe(new Ze([,-0]))[1]==R?function(n){return new Ze(n)}:xc;function su(n){return function(t){var e=Eu(t);return e==G?me(t):e==K?function(n){var t=-1,e=Array(n.size);return n.forEach(function(n){e[++t]=[n,n]}),e}(t):function(n,t){return Ht(t,function(t){return[t,n[t]]})}(t,n(t))}}function hu(n,t,e,i,o,c,l,s){var h=t&_;if(!h&&"function"!=typeof n)throw new Xn(a);var p=i?i.length:0;if(p||(t&=~(b|w),i=o=u),l=l===u?l:Fe(ja(l),0),s=s===u?s:ja(s),p-=o?o.length:0,t&w){var v=i,S=o;i=o=u}var I=h?u:bu(n),A=[n,t,e,i,o,v,S,c,l,s];if(I&&function(n,t){var e=n[1],r=t[1],i=e|r,u=i<(d|_|x),o=r==x&&e==y||r==x&&e==C&&n[7].length<=t[8]||r==(x|C)&&t[7].length<=t[8]&&e==y;if(!u&&!o)return n;r&d&&(n[2]=t[2],i|=e&d?0:g);var a=t[3];if(a){var c=n[3];n[3]=c?Ni(c,a,t[4]):a,n[4]=c?we(n[3],f):t[4]}(a=t[5])&&(c=n[5],n[5]=c?$i(c,a,t[6]):a,n[6]=c?we(n[5],f):t[6]),(a=t[7])&&(n[7]=a),r&x&&(n[8]=null==n[8]?t[8]:We(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=i}(A,I),n=A[0],t=A[1],e=A[2],i=A[3],o=A[4],!(s=A[9]=A[9]===u?h?0:n.length:Fe(A[9]-p,0))&&t&(y|m)&&(t&=~(y|m)),t&&t!=d)R=t==y||t==m?function(n,t,e){var i=Qi(n);return function o(){for(var a=arguments.length,c=r(a),f=a,l=xu(o);f--;)c[f]=arguments[f];var s=a<3&&c[0]!==l&&c[a-1]!==l?[]:we(c,l);return(a-=s.length)<e?cu(n,t,tu,o.placeholder,u,c,s,u,u,e-a):Wt(this&&this!==At&&this instanceof o?i:n,this,c)}}(n,t,s):t!=b&&t!=(d|b)||o.length?tu.apply(u,A):function(n,t,e,i){var u=t&d,o=Qi(n);return function t(){for(var a=-1,c=arguments.length,f=-1,l=i.length,s=r(l+c),h=this&&this!==At&&this instanceof t?o:n;++f<l;)s[f]=i[f];for(;c--;)s[f++]=arguments[++a];return Wt(h,u?e:this,s)}}(n,t,e,i);else var R=function(n,t,e){var r=t&d,i=Qi(n);return function t(){return(this&&this!==At&&this instanceof t?i:n).apply(r?e:this,arguments)}}(n,t,e);return qu((I?_i:$u)(R,A),n,t)}function pu(n,t,e,r){return n===u||na(n,et[e])&&!ut.call(r,e)?t:n}function vu(n,t,e,r,i,o){return va(n)&&va(t)&&(o.set(t,n),oi(n,t,u,vu,o),o.delete(t)),n}function du(n){return ya(n)?u:n}function _u(n,t,e,r,i,o){var a=e&p,c=n.length,f=t.length;if(c!=f&&!(a&&f>c))return!1;var l=o.get(n);if(l&&o.get(t))return l==t;var s=-1,h=!0,d=e&v?new dr:u;for(o.set(n,t),o.set(t,n);++s<c;){var _=n[s],g=t[s];if(r)var y=a?r(g,_,s,t,n,o):r(_,g,s,n,t,o);if(y!==u){if(y)continue;h=!1;break}if(d){if(!Yt(t,function(n,t){if(!he(d,t)&&(_===n||i(_,n,e,r,o)))return d.push(t)})){h=!1;break}}else if(_!==g&&!i(_,g,e,r,o)){h=!1;break}}return o.delete(n),o.delete(t),h}function gu(n){return Vu(Mu(n,u,io),n+"")}function yu(n){return $r(n,Va,Ru)}function mu(n){return $r(n,qa,ju)}var bu=Ye?function(n){return Ye.get(n)}:xc;function wu(n){for(var t=n.name+"",e=Qe[t],r=ut.call(Qe,t)?e.length:0;r--;){var i=e[r],u=i.func;if(null==u||u==n)return i.name}return t}function xu(n){return(ut.call(ar,"placeholder")?ar:n).placeholder}function Cu(){var n=ar.iteratee||yc;return n=n===yc?ni:n,arguments.length?n(arguments[0],arguments[1]):n}function Su(n,t){var e,r,i=n.__data__;return("string"==(r=typeof(e=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?i["string"==typeof t?"string":"hash"]:i.map}function Iu(n){for(var t=Va(n),e=t.length;e--;){var r=t[e],i=n[r];t[e]=[r,i,Fu(i)]}return t}function Au(n,t){var e=function(n,t){return null==n?u:n[t]}(n,t);return Xr(e)?e:u}var Ru=Be?function(n){return null==n?[]:(n=Kn(n),Gt(Be(n),function(t){return Ot.call(n,t)}))}:Ec,ju=Be?function(n){for(var t=[];n;)Zt(t,Ru(n)),n=Rt(n);return t}:Ec,Eu=Gr;function Ou(n,t,e){for(var r=-1,i=(t=Bi(t,n)).length,u=!1;++r<i;){var o=Ku(t[r]);if(!(u=null!=n&&e(n,o)))break;n=n[o]}return u||++r!=i?u:!!(i=null==n?0:n.length)&&pa(i)&&Tu(o,i)&&(ia(n)||ra(n))}function Pu(n){return"function"!=typeof n.constructor||zu(n)?{}:cr(Rt(n))}function ku(n){return ia(n)||ra(n)||!!(Qt&&n&&n[Qt])}function Tu(n,t){return!!(t=null==t?j:t)&&("number"==typeof n||$n.test(n))&&n>-1&&n%1==0&&n<t}function Bu(n,t,e){if(!va(e))return!1;var r=typeof t;return!!("number"==r?oa(e)&&Tu(t,e.length):"string"==r&&t in e)&&na(e[t],n)}function Lu(n,t){if(ia(n))return!1;var e=typeof n;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=n&&!xa(n))||Sn.test(n)||!Cn.test(n)||null!=t&&n in Kn(t)}function Uu(n){var t=wu(n),e=ar[t];if("function"!=typeof e||!(t in sr.prototype))return!1;if(n===e)return!0;var r=bu(e);return!!r&&n===r[0]}(Ve&&Eu(new Ve(new ArrayBuffer(1)))!=en||qe&&Eu(new qe)!=G||He&&"[object Promise]"!=Eu(He.resolve())||Ze&&Eu(new Ze)!=K||Je&&Eu(new Je)!=nn)&&(Eu=function(n){var t=Gr(n),e=t==H?n.constructor:u,r=e?Yu(e):"";if(r)switch(r){case Xe:return en;case nr:return G;case tr:return"[object Promise]";case er:return K;case rr:return nn}return t});var Du=rt?sa:Oc;function zu(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||et)}function Fu(n){return n==n&&!va(n)}function Wu(n,t){return function(e){return null!=e&&e[n]===t&&(t!==u||n in Kn(e))}}function Mu(n,t,e){return t=Fe(t===u?n.length-1:t,0),function(){for(var i=arguments,u=-1,o=Fe(i.length-t,0),a=r(o);++u<o;)a[u]=i[t+u];u=-1;for(var c=r(t+1);++u<t;)c[u]=i[u];return c[t]=e(a),Wt(n,this,c)}}function Nu(n,t){return t.length<2?n:Nr(n,yi(t,0,-1))}var $u=Hu(_i),Gu=Pe||function(n,t){return At.setTimeout(n,t)},Vu=Hu(gi);function qu(n,t,e){var r=t+"";return Vu(n,function(n,t){var e=t.length;if(!e)return n;var r=e-1;return t[r]=(e>1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(kn,"{\n/* [wrapped with "+t+"] */\n")}(r,function(n,t){return Nt(B,function(e){var r="_."+e[0];t&e[1]&&!Vt(n,r)&&n.push(r)}),n.sort()}(function(n){var t=r.match(Tn);return t?t[1].split(Bn):[]}(),e)))}function Hu(n){var t=0,e=0;return function(){var r=Me(),i=A-(r-e);if(e=r,i>0){if(++t>=I)return arguments[0]}else t=0;return n.apply(u,arguments)}}function Zu(n,t){var e=-1,r=n.length,i=r-1;for(t=t===u?r:t;++e<t;){var o=hi(e,i),a=n[o];n[o]=n[e],n[e]=a}return n.length=t,n}var Ju=function(n){var t=Zo(function(n){var t=[];return In.test(n)&&t.push(""),n.replace(An,function(n,e,r,i){t.push(r?i.replace(Un,"$1"):e||n)}),t},function(n){return 500===e.size&&e.clear(),n}),e=t.cache;return t}();function Ku(n){if("string"==typeof n||xa(n))return n;var t=n+"";return"0"==t&&1/n==-R?"-0":t}function Yu(n){if(null!=n){try{return it.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function Qu(n){if(n instanceof sr)return n.clone();var t=new lr(n.__wrapped__,n.__chain__);return t.__actions__=Gi(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}var Xu=vi(function(n,t){return aa(n)?Or(n,Ur(t,1,aa,!0)):[]}),no=vi(function(n,t){var e=fo(t);return aa(e)&&(e=u),aa(n)?Or(n,Ur(t,1,aa,!0),Cu(e,2)):[]}),to=vi(function(n,t){var e=fo(t);return aa(e)&&(e=u),aa(n)?Or(n,Ur(t,1,aa,!0),u,e):[]});function eo(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=null==e?0:ja(e);return i<0&&(i=Fe(r+i,0)),ne(n,Cu(t,3),i)}function ro(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=r-1;return e!==u&&(i=ja(e),i=e<0?Fe(r+i,0):We(i,r-1)),ne(n,Cu(t,3),i,!0)}function io(n){return null!=n&&n.length?Ur(n,1):[]}function uo(n){return n&&n.length?n[0]:u}var oo=vi(function(n){var t=Ht(n,ki);return t.length&&t[0]===n[0]?Zr(t):[]}),ao=vi(function(n){var t=fo(n),e=Ht(n,ki);return t===fo(e)?t=u:e.pop(),e.length&&e[0]===n[0]?Zr(e,Cu(t,2)):[]}),co=vi(function(n){var t=fo(n),e=Ht(n,ki);return(t="function"==typeof t?t:u)&&e.pop(),e.length&&e[0]===n[0]?Zr(e,u,t):[]});function fo(n){var t=null==n?0:n.length;return t?n[t-1]:u}var lo=vi(so);function so(n,t){return n&&n.length&&t&&t.length?li(n,t):n}var ho=gu(function(n,t){var e=null==n?0:n.length,r=Ir(n,t);return si(n,Ht(t,function(n){return Tu(n,e)?+n:n}).sort(Mi)),r});function po(n){return null==n?n:Ge.call(n)}var vo=vi(function(n){return Ii(Ur(n,1,aa,!0))}),_o=vi(function(n){var t=fo(n);return aa(t)&&(t=u),Ii(Ur(n,1,aa,!0),Cu(t,2))}),go=vi(function(n){var t=fo(n);return t="function"==typeof t?t:u,Ii(Ur(n,1,aa,!0),u,t)});function yo(n){if(!n||!n.length)return[];var t=0;return n=Gt(n,function(n){if(aa(n))return t=Fe(n.length,t),!0}),fe(t,function(t){return Ht(n,ue(t))})}function mo(n,t){if(!n||!n.length)return[];var e=yo(n);return null==t?e:Ht(e,function(n){return Wt(t,u,n)})}var bo=vi(function(n,t){return aa(n)?Or(n,t):[]}),wo=vi(function(n){return Oi(Gt(n,aa))}),xo=vi(function(n){var t=fo(n);return aa(t)&&(t=u),Oi(Gt(n,aa),Cu(t,2))}),Co=vi(function(n){var t=fo(n);return t="function"==typeof t?t:u,Oi(Gt(n,aa),u,t)}),So=vi(yo),Io=vi(function(n){var t=n.length,e=t>1?n[t-1]:u;return mo(n,e="function"==typeof e?(n.pop(),e):u)});function Ao(n){var t=ar(n);return t.__chain__=!0,t}function Ro(n,t){return t(n)}var jo=gu(function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,i=function(t){return Ir(t,n)};return!(t>1||this.__actions__.length)&&r instanceof sr&&Tu(e)?((r=r.slice(e,+e+(t?1:0))).__actions__.push({func:Ro,args:[i],thisArg:u}),new lr(r,this.__chain__).thru(function(n){return t&&!n.length&&n.push(u),n})):this.thru(i)}),Eo=qi(function(n,t,e){ut.call(n,e)?++n[e]:Sr(n,e,1)}),Oo=Xi(eo),Po=Xi(ro);function ko(n,t){return(ia(n)?Nt:Pr)(n,Cu(t,3))}function To(n,t){return(ia(n)?function(n,t){for(var e=null==n?0:n.length;e--&&!1!==t(n[e],e,n););return n}:kr)(n,Cu(t,3))}var Bo=qi(function(n,t,e){ut.call(n,e)?n[e].push(t):Sr(n,e,[t])}),Lo=vi(function(n,t,e){var i=-1,u="function"==typeof t,o=oa(n)?r(n.length):[];return Pr(n,function(n){o[++i]=u?Wt(t,n,e):Jr(n,t,e)}),o}),Uo=qi(function(n,t,e){Sr(n,e,t)});function Do(n,t){return(ia(n)?Ht:ri)(n,Cu(t,3))}var zo=qi(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]}),Fo=vi(function(n,t){if(null==n)return[];var e=t.length;return e>1&&Bu(n,t[0],t[1])?t=[]:e>2&&Bu(t[0],t[1],t[2])&&(t=[t[0]]),ci(n,Ur(t,1),[])}),Wo=Oe||function(){return At.Date.now()};function Mo(n,t,e){return t=e?u:t,t=n&&null==t?n.length:t,hu(n,x,u,u,u,u,t)}function No(n,t){var e;if("function"!=typeof t)throw new Xn(a);return n=ja(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=u),e}}var $o=vi(function(n,t,e){var r=d;if(e.length){var i=we(e,xu($o));r|=b}return hu(n,r,t,e,i)}),Go=vi(function(n,t,e){var r=d|_;if(e.length){var i=we(e,xu(Go));r|=b}return hu(t,r,n,e,i)});function Vo(n,t,e){var r,i,o,c,f,l,s=0,h=!1,p=!1,v=!0;if("function"!=typeof n)throw new Xn(a);function d(t){var e=r,o=i;return r=i=u,s=t,c=n.apply(o,e)}function _(n){var e=n-l;return l===u||e>=t||e<0||p&&n-s>=o}function g(){var n=Wo();if(_(n))return y(n);f=Gu(g,function(n){var e=t-(n-l);return p?We(e,o-(n-s)):e}(n))}function y(n){return f=u,v&&r?d(n):(r=i=u,c)}function m(){var n=Wo(),e=_(n);if(r=arguments,i=this,l=n,e){if(f===u)return function(n){return s=n,f=Gu(g,t),h?d(n):c}(l);if(p)return f=Gu(g,t),d(l)}return f===u&&(f=Gu(g,t)),c}return t=Oa(t)||0,va(e)&&(h=!!e.leading,o=(p="maxWait"in e)?Fe(Oa(e.maxWait)||0,t):o,v="trailing"in e?!!e.trailing:v),m.cancel=function(){f!==u&&Di(f),s=0,r=l=i=f=u},m.flush=function(){return f===u?c:y(Wo())},m}var qo=vi(function(n,t){return Er(n,1,t)}),Ho=vi(function(n,t,e){return Er(n,Oa(t)||0,e)});function Zo(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new Xn(a);var e=function(){var r=arguments,i=t?t.apply(this,r):r[0],u=e.cache;if(u.has(i))return u.get(i);var o=n.apply(this,r);return e.cache=u.set(i,o)||u,o};return e.cache=new(Zo.Cache||vr),e}function Jo(n){if("function"!=typeof n)throw new Xn(a);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}Zo.Cache=vr;var Ko=Li(function(n,t){var e=(t=1==t.length&&ia(t[0])?Ht(t[0],le(Cu())):Ht(Ur(t,1),le(Cu()))).length;return vi(function(r){for(var i=-1,u=We(r.length,e);++i<u;)r[i]=t[i].call(this,r[i]);return Wt(n,this,r)})}),Yo=vi(function(n,t){var e=we(t,xu(Yo));return hu(n,b,u,t,e)}),Qo=vi(function(n,t){var e=we(t,xu(Qo));return hu(n,w,u,t,e)}),Xo=gu(function(n,t){return hu(n,C,u,u,u,t)});function na(n,t){return n===t||n!=n&&t!=t}var ta=au(Vr),ea=au(function(n,t){return n>=t}),ra=Kr(function(){return arguments}())?Kr:function(n){return da(n)&&ut.call(n,"callee")&&!Ot.call(n,"callee")},ia=r.isArray,ua=kt?le(kt):function(n){return da(n)&&Gr(n)==tn};function oa(n){return null!=n&&pa(n.length)&&!sa(n)}function aa(n){return da(n)&&oa(n)}var ca=Le||Oc,fa=Tt?le(Tt):function(n){return da(n)&&Gr(n)==F};function la(n){if(!da(n))return!1;var t=Gr(n);return t==M||t==W||"string"==typeof n.message&&"string"==typeof n.name&&!ya(n)}function sa(n){if(!va(n))return!1;var t=Gr(n);return t==N||t==$||t==D||t==Z}function ha(n){return"number"==typeof n&&n==ja(n)}function pa(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=j}function va(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function da(n){return null!=n&&"object"==typeof n}var _a=Bt?le(Bt):function(n){return da(n)&&Eu(n)==G};function ga(n){return"number"==typeof n||da(n)&&Gr(n)==V}function ya(n){if(!da(n)||Gr(n)!=H)return!1;var t=Rt(n);if(null===t)return!0;var e=ut.call(t,"constructor")&&t.constructor;return"function"==typeof e&&e instanceof e&&it.call(e)==ft}var ma=Lt?le(Lt):function(n){return da(n)&&Gr(n)==J},ba=Ut?le(Ut):function(n){return da(n)&&Eu(n)==K};function wa(n){return"string"==typeof n||!ia(n)&&da(n)&&Gr(n)==Y}function xa(n){return"symbol"==typeof n||da(n)&&Gr(n)==Q}var Ca=Dt?le(Dt):function(n){return da(n)&&pa(n.length)&&!!mt[Gr(n)]},Sa=au(ei),Ia=au(function(n,t){return n<=t});function Aa(n){if(!n)return[];if(oa(n))return wa(n)?Se(n):Gi(n);if(oe&&n[oe])return function(n){for(var t,e=[];!(t=n.next()).done;)e.push(t.value);return e}(n[oe]());var t=Eu(n);return(t==G?me:t==K?xe:nc)(n)}function Ra(n){return n?(n=Oa(n))===R||n===-R?(n<0?-1:1)*E:n==n?n:0:0===n?n:0}function ja(n){var t=Ra(n),e=t%1;return t==t?e?t-e:t:0}function Ea(n){return n?Ar(ja(n),0,P):0}function Oa(n){if("number"==typeof n)return n;if(xa(n))return O;if(va(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=va(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(En,"");var e=Wn.test(n);return e||Nn.test(n)?Ct(n.slice(2),e?2:8):Fn.test(n)?O:+n}function Pa(n){return Vi(n,qa(n))}function ka(n){return null==n?"":Si(n)}var Ta=Hi(function(n,t){if(zu(t)||oa(t))Vi(t,Va(t),n);else for(var e in t)ut.call(t,e)&&br(n,e,t[e])}),Ba=Hi(function(n,t){Vi(t,qa(t),n)}),La=Hi(function(n,t,e,r){Vi(t,qa(t),n,r)}),Ua=Hi(function(n,t,e,r){Vi(t,Va(t),n,r)}),Da=gu(Ir),za=vi(function(n){return n.push(u,pu),Wt(La,u,n)}),Fa=vi(function(n){return n.push(u,vu),Wt(Za,u,n)});function Wa(n,t,e){var r=null==n?u:Nr(n,t);return r===u?e:r}function Ma(n,t){return null!=n&&Ou(n,t,Hr)}var Na=eu(function(n,t,e){n[t]=e},vc(gc)),$a=eu(function(n,t,e){ut.call(n,t)?n[t].push(e):n[t]=[e]},Cu),Ga=vi(Jr);function Va(n){return oa(n)?gr(n):ti(n)}function qa(n){return oa(n)?gr(n,!0):function(n){if(!va(n))return function(n){var t=[];if(null!=n)for(var e in Kn(n))t.push(e);return t}(n);var t=zu(n),e=[];for(var r in n)("constructor"!=r||!t&&ut.call(n,r))&&e.push(r);return e}(n)}var Ha=Hi(function(n,t,e){oi(n,t,e)}),Za=Hi(function(n,t,e,r){oi(n,t,e,r)}),Ja=gu(function(n,t){var e={};if(null==n)return e;var r=!1;t=Ht(t,function(t){return t=Bi(t,n),r||(r=t.length>1),t}),Vi(n,mu(n),e),r&&(e=Rr(e,l|s|h,du));for(var i=t.length;i--;)Ai(e,t[i]);return e}),Ka=gu(function(n,t){return null==n?{}:function(n,t){return fi(n,t,function(t,e){return Ma(n,e)})}(n,t)});function Ya(n,t){if(null==n)return{};var e=Ht(mu(n),function(n){return[n]});return t=Cu(t),fi(n,e,function(n,e){return t(n,e[0])})}var Qa=su(Va),Xa=su(qa);function nc(n){return null==n?[]:se(n,Va(n))}var tc=Yi(function(n,t,e){return t=t.toLowerCase(),n+(e?ec(t):t)});function ec(n){return lc(ka(n).toLowerCase())}function rc(n){return(n=ka(n))&&n.replace(Gn,de).replace(ht,"")}var ic=Yi(function(n,t,e){return n+(e?"-":"")+t.toLowerCase()}),uc=Yi(function(n,t,e){return n+(e?" ":"")+t.toLowerCase()}),oc=Ki("toLowerCase"),ac=Yi(function(n,t,e){return n+(e?"_":"")+t.toLowerCase()}),cc=Yi(function(n,t,e){return n+(e?" ":"")+lc(t)}),fc=Yi(function(n,t,e){return n+(e?" ":"")+t.toUpperCase()}),lc=Ki("toUpperCase");function sc(n,t,e){return n=ka(n),(t=e?u:t)===u?function(n){return _t.test(n)}(n)?function(n){return n.match(vt)||[]}(n):function(n){return n.match(Ln)||[]}(n):n.match(t)||[]}var hc=vi(function(n,t){try{return Wt(n,u,t)}catch(n){return la(n)?n:new Hn(n)}}),pc=gu(function(n,t){return Nt(t,function(t){t=Ku(t),Sr(n,t,$o(n[t],n))}),n});function vc(n){return function(){return n}}var dc=nu(),_c=nu(!0);function gc(n){return n}function yc(n){return ni("function"==typeof n?n:Rr(n,l))}var mc=vi(function(n,t){return function(e){return Jr(e,n,t)}}),bc=vi(function(n,t){return function(e){return Jr(n,e,t)}});function wc(n,t,e){var r=Va(t),i=Mr(t,r);null!=e||va(t)&&(i.length||!r.length)||(e=t,t=n,n=this,i=Mr(t,Va(t)));var u=!(va(e)&&"chain"in e&&!e.chain),o=sa(n);return Nt(i,function(e){var r=t[e];n[e]=r,o&&(n.prototype[e]=function(){var t=this.__chain__;if(u||t){var e=n(this.__wrapped__);return(e.__actions__=Gi(this.__actions__)).push({func:r,args:arguments,thisArg:n}),e.__chain__=t,e}return r.apply(n,Zt([this.value()],arguments))})}),n}function xc(){}var Cc=iu(Ht),Sc=iu($t),Ic=iu(Yt);function Ac(n){return Lu(n)?ue(Ku(n)):function(n){return function(t){return Nr(t,n)}}(n)}var Rc=ou(),jc=ou(!0);function Ec(){return[]}function Oc(){return!1}var Pc,kc=ru(function(n,t){return n+t},0),Tc=fu("ceil"),Bc=ru(function(n,t){return n/t},1),Lc=fu("floor"),Uc=ru(function(n,t){return n*t},1),Dc=fu("round"),zc=ru(function(n,t){return n-t},0);return ar.after=function(n,t){if("function"!=typeof t)throw new Xn(a);return n=ja(n),function(){if(--n<1)return t.apply(this,arguments)}},ar.ary=Mo,ar.assign=Ta,ar.assignIn=Ba,ar.assignInWith=La,ar.assignWith=Ua,ar.at=Da,ar.before=No,ar.bind=$o,ar.bindAll=pc,ar.bindKey=Go,ar.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ia(n)?n:[n]},ar.chain=Ao,ar.chunk=function(n,t,e){t=(e?Bu(n,t,e):t===u)?1:Fe(ja(t),0);var i=null==n?0:n.length;if(!i||t<1)return[];for(var o=0,a=0,c=r(ke(i/t));o<i;)c[a++]=yi(n,o,o+=t);return c},ar.compact=function(n){for(var t=-1,e=null==n?0:n.length,r=0,i=[];++t<e;){var u=n[t];u&&(i[r++]=u)}return i},ar.concat=function(){var n=arguments.length;if(!n)return[];for(var t=r(n-1),e=arguments[0],i=n;i--;)t[i-1]=arguments[i];return Zt(ia(e)?Gi(e):[e],Ur(t,1))},ar.cond=function(n){var t=null==n?0:n.length,e=Cu();return n=t?Ht(n,function(n){if("function"!=typeof n[1])throw new Xn(a);return[e(n[0]),n[1]]}):[],vi(function(e){for(var r=-1;++r<t;){var i=n[r];if(Wt(i[0],this,e))return Wt(i[1],this,e)}})},ar.conforms=function(n){return function(n){var t=Va(n);return function(e){return jr(e,n,t)}}(Rr(n,l))},ar.constant=vc,ar.countBy=Eo,ar.create=function(n,t){var e=cr(n);return null==t?e:Cr(e,t)},ar.curry=function n(t,e,r){var i=hu(t,y,u,u,u,u,u,e=r?u:e);return i.placeholder=n.placeholder,i},ar.curryRight=function n(t,e,r){var i=hu(t,m,u,u,u,u,u,e=r?u:e);return i.placeholder=n.placeholder,i},ar.debounce=Vo,ar.defaults=za,ar.defaultsDeep=Fa,ar.defer=qo,ar.delay=Ho,ar.difference=Xu,ar.differenceBy=no,ar.differenceWith=to,ar.drop=function(n,t,e){var r=null==n?0:n.length;return r?yi(n,(t=e||t===u?1:ja(t))<0?0:t,r):[]},ar.dropRight=function(n,t,e){var r=null==n?0:n.length;return r?yi(n,0,(t=r-(t=e||t===u?1:ja(t)))<0?0:t):[]},ar.dropRightWhile=function(n,t){return n&&n.length?ji(n,Cu(t,3),!0,!0):[]},ar.dropWhile=function(n,t){return n&&n.length?ji(n,Cu(t,3),!0):[]},ar.fill=function(n,t,e,r){var i=null==n?0:n.length;return i?(e&&"number"!=typeof e&&Bu(n,t,e)&&(e=0,r=i),function(n,t,e,r){var i=n.length;for((e=ja(e))<0&&(e=-e>i?0:i+e),(r=r===u||r>i?i:ja(r))<0&&(r+=i),r=e>r?0:Ea(r);e<r;)n[e++]=t;return n}(n,t,e,r)):[]},ar.filter=function(n,t){return(ia(n)?Gt:Lr)(n,Cu(t,3))},ar.flatMap=function(n,t){return Ur(Do(n,t),1)},ar.flatMapDeep=function(n,t){return Ur(Do(n,t),R)},ar.flatMapDepth=function(n,t,e){return e=e===u?1:ja(e),Ur(Do(n,t),e)},ar.flatten=io,ar.flattenDeep=function(n){return null!=n&&n.length?Ur(n,R):[]},ar.flattenDepth=function(n,t){return null!=n&&n.length?Ur(n,t=t===u?1:ja(t)):[]},ar.flip=function(n){return hu(n,S)},ar.flow=dc,ar.flowRight=_c,ar.fromPairs=function(n){for(var t=-1,e=null==n?0:n.length,r={};++t<e;){var i=n[t];r[i[0]]=i[1]}return r},ar.functions=function(n){return null==n?[]:Mr(n,Va(n))},ar.functionsIn=function(n){return null==n?[]:Mr(n,qa(n))},ar.groupBy=Bo,ar.initial=function(n){return null!=n&&n.length?yi(n,0,-1):[]},ar.intersection=oo,ar.intersectionBy=ao,ar.intersectionWith=co,ar.invert=Na,ar.invertBy=$a,ar.invokeMap=Lo,ar.iteratee=yc,ar.keyBy=Uo,ar.keys=Va,ar.keysIn=qa,ar.map=Do,ar.mapKeys=function(n,t){var e={};return t=Cu(t,3),Fr(n,function(n,r,i){Sr(e,t(n,r,i),n)}),e},ar.mapValues=function(n,t){var e={};return t=Cu(t,3),Fr(n,function(n,r,i){Sr(e,r,t(n,r,i))}),e},ar.matches=function(n){return ii(Rr(n,l))},ar.matchesProperty=function(n,t){return ui(n,Rr(t,l))},ar.memoize=Zo,ar.merge=Ha,ar.mergeWith=Za,ar.method=mc,ar.methodOf=bc,ar.mixin=wc,ar.negate=Jo,ar.nthArg=function(n){return n=ja(n),vi(function(t){return ai(t,n)})},ar.omit=Ja,ar.omitBy=function(n,t){return Ya(n,Jo(Cu(t)))},ar.once=function(n){return No(2,n)},ar.orderBy=function(n,t,e,r){return null==n?[]:(ia(t)||(t=null==t?[]:[t]),ia(e=r?u:e)||(e=null==e?[]:[e]),ci(n,t,e))},ar.over=Cc,ar.overArgs=Ko,ar.overEvery=Sc,ar.overSome=Ic,ar.partial=Yo,ar.partialRight=Qo,ar.partition=zo,ar.pick=Ka,ar.pickBy=Ya,ar.property=Ac,ar.propertyOf=function(n){return function(t){return null==n?u:Nr(n,t)}},ar.pull=lo,ar.pullAll=so,ar.pullAllBy=function(n,t,e){return n&&n.length&&t&&t.length?li(n,t,Cu(e,2)):n},ar.pullAllWith=function(n,t,e){return n&&n.length&&t&&t.length?li(n,t,u,e):n},ar.pullAt=ho,ar.range=Rc,ar.rangeRight=jc,ar.rearg=Xo,ar.reject=function(n,t){return(ia(n)?Gt:Lr)(n,Jo(Cu(t,3)))},ar.remove=function(n,t){var e=[];if(!n||!n.length)return e;var r=-1,i=[],u=n.length;for(t=Cu(t,3);++r<u;){var o=n[r];t(o,r,n)&&(e.push(o),i.push(r))}return si(n,i),e},ar.rest=function(n,t){if("function"!=typeof n)throw new Xn(a);return vi(n,t=t===u?t:ja(t))},ar.reverse=po,ar.sampleSize=function(n,t,e){return t=(e?Bu(n,t,e):t===u)?1:ja(t),(ia(n)?function(n,t){return Zu(Gi(n),Ar(t,0,n.length))}:function(n,t){var e=nc(n);return Zu(e,Ar(t,0,e.length))})(n,t)},ar.set=function(n,t,e){return null==n?n:di(n,t,e)},ar.setWith=function(n,t,e,r){return r="function"==typeof r?r:u,null==n?n:di(n,t,e,r)},ar.shuffle=function(n){return(ia(n)?function(n){return Zu(Gi(n))}:function(n){return Zu(nc(n))})(n)},ar.slice=function(n,t,e){var r=null==n?0:n.length;return r?(e&&"number"!=typeof e&&Bu(n,t,e)?(t=0,e=r):(t=null==t?0:ja(t),e=e===u?r:ja(e)),yi(n,t,e)):[]},ar.sortBy=Fo,ar.sortedUniq=function(n){return n&&n.length?xi(n):[]},ar.sortedUniqBy=function(n,t){return n&&n.length?xi(n,Cu(t,2)):[]},ar.split=function(n,t,e){return e&&"number"!=typeof e&&Bu(n,t,e)&&(t=e=u),(e=e===u?P:e>>>0)?(n=ka(n))&&("string"==typeof t||null!=t&&!ma(t))&&!(t=Si(t))&&ye(n)?Ui(Se(n),0,e):n.split(t,e):[]},ar.spread=function(n,t){if("function"!=typeof n)throw new Xn(a);return t=null==t?0:Fe(ja(t),0),vi(function(e){var r=e[t],i=Ui(e,0,t);return r&&Zt(i,r),Wt(n,this,i)})},ar.tail=function(n){var t=null==n?0:n.length;return t?yi(n,1,t):[]},ar.take=function(n,t,e){return n&&n.length?yi(n,0,(t=e||t===u?1:ja(t))<0?0:t):[]},ar.takeRight=function(n,t,e){var r=null==n?0:n.length;return r?yi(n,(t=r-(t=e||t===u?1:ja(t)))<0?0:t,r):[]},ar.takeRightWhile=function(n,t){return n&&n.length?ji(n,Cu(t,3),!1,!0):[]},ar.takeWhile=function(n,t){return n&&n.length?ji(n,Cu(t,3)):[]},ar.tap=function(n,t){return t(n),n},ar.throttle=function(n,t,e){var r=!0,i=!0;if("function"!=typeof n)throw new Xn(a);return va(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),Vo(n,t,{leading:r,maxWait:t,trailing:i})},ar.thru=Ro,ar.toArray=Aa,ar.toPairs=Qa,ar.toPairsIn=Xa,ar.toPath=function(n){return ia(n)?Ht(n,Ku):xa(n)?[n]:Gi(Ju(ka(n)))},ar.toPlainObject=Pa,ar.transform=function(n,t,e){var r=ia(n),i=r||ca(n)||Ca(n);if(t=Cu(t,4),null==e){var u=n&&n.constructor;e=i?r?new u:[]:va(n)&&sa(u)?cr(Rt(n)):{}}return(i?Nt:Fr)(n,function(n,r,i){return t(e,n,r,i)}),e},ar.unary=function(n){return Mo(n,1)},ar.union=vo,ar.unionBy=_o,ar.unionWith=go,ar.uniq=function(n){return n&&n.length?Ii(n):[]},ar.uniqBy=function(n,t){return n&&n.length?Ii(n,Cu(t,2)):[]},ar.uniqWith=function(n,t){return t="function"==typeof t?t:u,n&&n.length?Ii(n,u,t):[]},ar.unset=function(n,t){return null==n||Ai(n,t)},ar.unzip=yo,ar.unzipWith=mo,ar.update=function(n,t,e){return null==n?n:Ri(n,t,Ti(e))},ar.updateWith=function(n,t,e,r){return r="function"==typeof r?r:u,null==n?n:Ri(n,t,Ti(e),r)},ar.values=nc,ar.valuesIn=function(n){return null==n?[]:se(n,qa(n))},ar.without=bo,ar.words=sc,ar.wrap=function(n,t){return Yo(Ti(t),n)},ar.xor=wo,ar.xorBy=xo,ar.xorWith=Co,ar.zip=So,ar.zipObject=function(n,t){return Pi(n||[],t||[],br)},ar.zipObjectDeep=function(n,t){return Pi(n||[],t||[],di)},ar.zipWith=Io,ar.entries=Qa,ar.entriesIn=Xa,ar.extend=Ba,ar.extendWith=La,wc(ar,ar),ar.add=kc,ar.attempt=hc,ar.camelCase=tc,ar.capitalize=ec,ar.ceil=Tc,ar.clamp=function(n,t,e){return e===u&&(e=t,t=u),e!==u&&(e=(e=Oa(e))==e?e:0),t!==u&&(t=(t=Oa(t))==t?t:0),Ar(Oa(n),t,e)},ar.clone=function(n){return Rr(n,h)},ar.cloneDeep=function(n){return Rr(n,l|h)},ar.cloneDeepWith=function(n,t){return Rr(n,l|h,t="function"==typeof t?t:u)},ar.cloneWith=function(n,t){return Rr(n,h,t="function"==typeof t?t:u)},ar.conformsTo=function(n,t){return null==t||jr(n,t,Va(t))},ar.deburr=rc,ar.defaultTo=function(n,t){return null==n||n!=n?t:n},ar.divide=Bc,ar.endsWith=function(n,t,e){n=ka(n),t=Si(t);var r=n.length,i=e=e===u?r:Ar(ja(e),0,r);return(e-=t.length)>=0&&n.slice(e,i)==t},ar.eq=na,ar.escape=function(n){return(n=ka(n))&&mn.test(n)?n.replace(gn,_e):n},ar.escapeRegExp=function(n){return(n=ka(n))&&jn.test(n)?n.replace(Rn,"\\$&"):n},ar.every=function(n,t,e){var r=ia(n)?$t:Tr;return e&&Bu(n,t,e)&&(t=u),r(n,Cu(t,3))},ar.find=Oo,ar.findIndex=eo,ar.findKey=function(n,t){return Xt(n,Cu(t,3),Fr)},ar.findLast=Po,ar.findLastIndex=ro,ar.findLastKey=function(n,t){return Xt(n,Cu(t,3),Wr)},ar.floor=Lc,ar.forEach=ko,ar.forEachRight=To,ar.forIn=function(n,t){return null==n?n:Dr(n,Cu(t,3),qa)},ar.forInRight=function(n,t){return null==n?n:zr(n,Cu(t,3),qa)},ar.forOwn=function(n,t){return n&&Fr(n,Cu(t,3))},ar.forOwnRight=function(n,t){return n&&Wr(n,Cu(t,3))},ar.get=Wa,ar.gt=ta,ar.gte=ea,ar.has=function(n,t){return null!=n&&Ou(n,t,qr)},ar.hasIn=Ma,ar.head=uo,ar.identity=gc,ar.includes=function(n,t,e,r){n=oa(n)?n:nc(n),e=e&&!r?ja(e):0;var i=n.length;return e<0&&(e=Fe(i+e,0)),wa(n)?e<=i&&n.indexOf(t,e)>-1:!!i&&te(n,t,e)>-1},ar.indexOf=function(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=null==e?0:ja(e);return i<0&&(i=Fe(r+i,0)),te(n,t,i)},ar.inRange=function(n,t,e){return t=Ra(t),e===u?(e=t,t=0):e=Ra(e),function(n,t,e){return n>=We(t,e)&&n<Fe(t,e)}(n=Oa(n),t,e)},ar.invoke=Ga,ar.isArguments=ra,ar.isArray=ia,ar.isArrayBuffer=ua,ar.isArrayLike=oa,ar.isArrayLikeObject=aa,ar.isBoolean=function(n){return!0===n||!1===n||da(n)&&Gr(n)==z},ar.isBuffer=ca,ar.isDate=fa,ar.isElement=function(n){return da(n)&&1===n.nodeType&&!ya(n)},ar.isEmpty=function(n){if(null==n)return!0;if(oa(n)&&(ia(n)||"string"==typeof n||"function"==typeof n.splice||ca(n)||Ca(n)||ra(n)))return!n.length;var t=Eu(n);if(t==G||t==K)return!n.size;if(zu(n))return!ti(n).length;for(var e in n)if(ut.call(n,e))return!1;return!0},ar.isEqual=function(n,t){return Yr(n,t)},ar.isEqualWith=function(n,t,e){var r=(e="function"==typeof e?e:u)?e(n,t):u;return r===u?Yr(n,t,u,e):!!r},ar.isError=la,ar.isFinite=function(n){return"number"==typeof n&&Ue(n)},ar.isFunction=sa,ar.isInteger=ha,ar.isLength=pa,ar.isMap=_a,ar.isMatch=function(n,t){return n===t||Qr(n,t,Iu(t))},ar.isMatchWith=function(n,t,e){return e="function"==typeof e?e:u,Qr(n,t,Iu(t),e)},ar.isNaN=function(n){return ga(n)&&n!=+n},ar.isNative=function(n){if(Du(n))throw new Hn("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Xr(n)},ar.isNil=function(n){return null==n},ar.isNull=function(n){return null===n},ar.isNumber=ga,ar.isObject=va,ar.isObjectLike=da,ar.isPlainObject=ya,ar.isRegExp=ma,ar.isSafeInteger=function(n){return ha(n)&&n>=-j&&n<=j},ar.isSet=ba,ar.isString=wa,ar.isSymbol=xa,ar.isTypedArray=Ca,ar.isUndefined=function(n){return n===u},ar.isWeakMap=function(n){return da(n)&&Eu(n)==nn},ar.isWeakSet=function(n){return da(n)&&"[object WeakSet]"==Gr(n)},ar.join=function(n,t){return null==n?"":De.call(n,t)},ar.kebabCase=ic,ar.last=fo,ar.lastIndexOf=function(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=r;return e!==u&&(i=(i=ja(e))<0?Fe(r+i,0):We(i,r-1)),t==t?function(n,t,e){for(var r=i+1;r--;)if(n[r]===t)return r;return r}(n,t):ne(n,re,i,!0)},ar.lowerCase=uc,ar.lowerFirst=oc,ar.lt=Sa,ar.lte=Ia,ar.max=function(n){return n&&n.length?Br(n,gc,Vr):u},ar.maxBy=function(n,t){return n&&n.length?Br(n,Cu(t,2),Vr):u},ar.mean=function(n){return ie(n,gc)},ar.meanBy=function(n,t){return ie(n,Cu(t,2))},ar.min=function(n){return n&&n.length?Br(n,gc,ei):u},ar.minBy=function(n,t){return n&&n.length?Br(n,Cu(t,2),ei):u},ar.stubArray=Ec,ar.stubFalse=Oc,ar.stubObject=function(){return{}},ar.stubString=function(){return""},ar.stubTrue=function(){return!0},ar.multiply=Uc,ar.nth=function(n,t){return n&&n.length?ai(n,ja(t)):u},ar.noConflict=function(){return At._===this&&(At._=lt),this},ar.noop=xc,ar.now=Wo,ar.pad=function(n,t,e){n=ka(n);var r=(t=ja(t))?Ce(n):0;if(!t||r>=t)return n;var i=(t-r)/2;return uu(Te(i),e)+n+uu(ke(i),e)},ar.padEnd=function(n,t,e){n=ka(n);var r=(t=ja(t))?Ce(n):0;return t&&r<t?n+uu(t-r,e):n},ar.padStart=function(n,t,e){n=ka(n);var r=(t=ja(t))?Ce(n):0;return t&&r<t?uu(t-r,e)+n:n},ar.parseInt=function(n,t,e){return e||null==t?t=0:t&&(t=+t),Ne(ka(n).replace(On,""),t||0)},ar.random=function(n,t,e){if(e&&"boolean"!=typeof e&&Bu(n,t,e)&&(t=e=u),e===u&&("boolean"==typeof t?(e=t,t=u):"boolean"==typeof n&&(e=n,n=u)),n===u&&t===u?(n=0,t=1):(n=Ra(n),t===u?(t=n,n=0):t=Ra(t)),n>t){var r=n;n=t,t=r}if(e||n%1||t%1){var i=$e();return We(n+i*(t-n+xt("1e-"+((i+"").length-1))),t)}return hi(n,t)},ar.reduce=function(n,t,e){var r=ia(n)?Jt:ae,i=arguments.length<3;return r(n,Cu(t,4),e,i,Pr)},ar.reduceRight=function(n,t,e){var r=ia(n)?Kt:ae,i=arguments.length<3;return r(n,Cu(t,4),e,i,kr)},ar.repeat=function(n,t,e){return t=(e?Bu(n,t,e):t===u)?1:ja(t),pi(ka(n),t)},ar.replace=function(){var n=arguments,t=ka(n[0]);return n.length<3?t:t.replace(n[1],n[2])},ar.result=function(n,t,e){var r=-1,i=(t=Bi(t,n)).length;for(i||(i=1,n=u);++r<i;){var o=null==n?u:n[Ku(t[r])];o===u&&(r=i,o=e),n=sa(o)?o.call(n):o}return n},ar.round=Dc,ar.runInContext=n,ar.sample=function(n){return(ia(n)?yr:function(n){return yr(nc(n))})(n)},ar.size=function(n){if(null==n)return 0;if(oa(n))return wa(n)?Ce(n):n.length;var t=Eu(n);return t==G||t==K?n.size:ti(n).length},ar.snakeCase=ac,ar.some=function(n,t,e){var r=ia(n)?Yt:mi;return e&&Bu(n,t,e)&&(t=u),r(n,Cu(t,3))},ar.sortedIndex=function(n,t){return bi(n,t)},ar.sortedIndexBy=function(n,t,e){return wi(n,t,Cu(e,2))},ar.sortedIndexOf=function(n,t){var e=null==n?0:n.length;if(e){var r=bi(n,t);if(r<e&&na(n[r],t))return r}return-1},ar.sortedLastIndex=function(n,t){return bi(n,t,!0)},ar.sortedLastIndexBy=function(n,t,e){return wi(n,t,Cu(e,2),!0)},ar.sortedLastIndexOf=function(n,t){if(null!=n&&n.length){var e=bi(n,t,!0)-1;if(na(n[e],t))return e}return-1},ar.startCase=cc,ar.startsWith=function(n,t,e){return n=ka(n),e=null==e?0:Ar(ja(e),0,n.length),t=Si(t),n.slice(e,e+t.length)==t},ar.subtract=zc,ar.sum=function(n){return n&&n.length?ce(n,gc):0},ar.sumBy=function(n,t){return n&&n.length?ce(n,Cu(t,2)):0},ar.template=function(n,t,e){var r=ar.templateSettings;e&&Bu(n,t,e)&&(t=u),n=ka(n),t=La({},t,r,pu);var i,o,a=La({},t.imports,r.imports,pu),c=Va(a),f=se(a,c),l=0,s=t.interpolate||Vn,h="__p += '",p=Yn((t.escape||Vn).source+"|"+s.source+"|"+(s===xn?Dn:Vn).source+"|"+(t.evaluate||Vn).source+"|$","g"),v="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++yt+"]")+"\n";n.replace(p,function(t,e,r,u,a,c){return r||(r=u),h+=n.slice(l,c).replace(qn,ge),e&&(i=!0,h+="' +\n__e("+e+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t}),h+="';\n";var d=t.variable;d||(h="with (obj) {\n"+h+"\n}\n"),h=(o?h.replace(pn,""):h).replace(vn,"$1").replace(dn,"$1;"),h="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var _=hc(function(){return Zn(c,v+"return "+h).apply(u,f)});if(_.source=h,la(_))throw _;return _},ar.times=function(n,t){if((n=ja(n))<1||n>j)return[];var e=P,r=We(n,P);t=Cu(t),n-=P;for(var i=fe(r,t);++e<n;)t(e);return i},ar.toFinite=Ra,ar.toInteger=ja,ar.toLength=Ea,ar.toLower=function(n){return ka(n).toLowerCase()},ar.toNumber=Oa,ar.toSafeInteger=function(n){return n?Ar(ja(n),-j,j):0===n?n:0},ar.toString=ka,ar.toUpper=function(n){return ka(n).toUpperCase()},ar.trim=function(n,t,e){if((n=ka(n))&&(e||t===u))return n.replace(En,"");if(!n||!(t=Si(t)))return n;var r=Se(n),i=Se(t);return Ui(r,pe(r,i),ve(r,i)+1).join("")},ar.trimEnd=function(n,t,e){if((n=ka(n))&&(e||t===u))return n.replace(Pn,"");if(!n||!(t=Si(t)))return n;var r=Se(n);return Ui(r,0,ve(r,Se(t))+1).join("")},ar.trimStart=function(n,t,e){if((n=ka(n))&&(e||t===u))return n.replace(On,"");if(!n||!(t=Si(t)))return n;var r=Se(n);return Ui(r,pe(r,Se(t))).join("")},ar.truncate=function(n,t){var e=30,r="...";if(va(t)){var i="separator"in t?t.separator:i;e="length"in t?ja(t.length):e,r="omission"in t?Si(t.omission):r}var o=(n=ka(n)).length;if(ye(n)){var a=Se(n);o=a.length}if(e>=o)return n;var c=e-Ce(r);if(c<1)return r;var f=a?Ui(a,0,c).join(""):n.slice(0,c);if(i===u)return f+r;if(a&&(c+=f.length-c),ma(i)){if(n.slice(c).search(i)){var l,s=f;for(i.global||(i=Yn(i.source,ka(zn.exec(i))+"g")),i.lastIndex=0;l=i.exec(s);)var h=l.index;f=f.slice(0,h===u?c:h)}}else if(n.indexOf(Si(i),c)!=c){var p=f.lastIndexOf(i);p>-1&&(f=f.slice(0,p))}return f+r},ar.unescape=function(n){return(n=ka(n))&&yn.test(n)?n.replace(_n,Ie):n},ar.uniqueId=function(n){var t=++ot;return ka(n)+t},ar.upperCase=fc,ar.upperFirst=lc,ar.each=ko,ar.eachRight=To,ar.first=uo,wc(ar,(Pc={},Fr(ar,function(n,t){ut.call(ar.prototype,t)||(Pc[t]=n)}),Pc),{chain:!1}),ar.VERSION="4.17.4",Nt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){ar[n].placeholder=ar}),Nt(["drop","take"],function(n,t){sr.prototype[n]=function(e){e=e===u?1:Fe(ja(e),0);var r=this.__filtered__&&!t?new sr(this):this.clone();return r.__filtered__?r.__takeCount__=We(e,r.__takeCount__):r.__views__.push({size:We(e,P),type:n+(r.__dir__<0?"Right":"")}),r},sr.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Nt(["filter","map","takeWhile"],function(n,t){var e=t+1,r=1==e||3==e;sr.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:Cu(n,3),type:e}),t.__filtered__=t.__filtered__||r,t}}),Nt(["head","last"],function(n,t){var e="take"+(t?"Right":"");sr.prototype[n]=function(){return this[e](1).value()[0]}}),Nt(["initial","tail"],function(n,t){var e="drop"+(t?"":"Right");sr.prototype[n]=function(){return this.__filtered__?new sr(this):this[e](1)}}),sr.prototype.compact=function(){return this.filter(gc)},sr.prototype.find=function(n){return this.filter(n).head()},sr.prototype.findLast=function(n){return this.reverse().find(n)},sr.prototype.invokeMap=vi(function(n,t){return"function"==typeof n?new sr(this):this.map(function(e){return Jr(e,n,t)})}),sr.prototype.reject=function(n){return this.filter(Jo(Cu(n)))},sr.prototype.slice=function(n,t){n=ja(n);var e=this;return e.__filtered__&&(n>0||t<0)?new sr(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==u&&(e=(t=ja(t))<0?e.dropRight(-t):e.take(t-n)),e)},sr.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},sr.prototype.toArray=function(){return this.take(P)},Fr(sr.prototype,function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=ar[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(ar.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,c=t instanceof sr,f=a[0],l=c||ia(t),s=function(n){var t=i.apply(ar,Zt([n],a));return r&&h?t[0]:t};l&&e&&"function"==typeof f&&1!=f.length&&(c=l=!1);var h=this.__chain__,p=!!this.__actions__.length,v=o&&!h,d=c&&!p;if(!o&&l){t=d?t:new sr(this);var _=n.apply(t,a);return _.__actions__.push({func:Ro,args:[s],thisArg:u}),new lr(_,h)}return v&&d?n.apply(this,a):(_=this.thru(s),v?r?_.value()[0]:_.value():_)})}),Nt(["pop","push","shift","sort","splice","unshift"],function(n){var t=nt[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);ar.prototype[n]=function(){var n=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ia(i)?i:[],n)}return this[e](function(e){return t.apply(ia(e)?e:[],n)})}}),Fr(sr.prototype,function(n,t){var e=ar[t];if(e){var r=e.name+"";(Qe[r]||(Qe[r]=[])).push({name:t,func:e})}}),Qe[tu(u,_).name]=[{name:"wrapper",func:u}],sr.prototype.clone=function(){var n=new sr(this.__wrapped__);return n.__actions__=Gi(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Gi(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Gi(this.__views__),n},sr.prototype.reverse=function(){if(this.__filtered__){var n=new sr(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},sr.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,e=ia(n),r=t<0,i=e?n.length:0,u=function(n,t,e){for(var r=-1,i=e.length;++r<i;){var u=e[r],o=u.size;switch(u.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=We(t,n+o);break;case"takeRight":n=Fe(n,t-o)}}return{start:n,end:t}}(0,i,this.__views__),o=u.start,a=u.end,c=a-o,f=r?a:o-1,l=this.__iteratees__,s=l.length,h=0,p=We(c,this.__takeCount__);if(!e||!r&&i==c&&p==c)return Ei(n,this.__actions__);var v=[];n:for(;c--&&h<p;){for(var d=-1,_=n[f+=t];++d<s;){var g=l[d],y=g.iteratee,m=g.type,b=y(_);if(2==m)_=b;else if(!b){if(1==m)continue n;break n}}v[h++]=_}return v},ar.prototype.at=jo,ar.prototype.chain=function(){return Ao(this)},ar.prototype.commit=function(){return new lr(this.value(),this.__chain__)},ar.prototype.next=function(){this.__values__===u&&(this.__values__=Aa(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?u:this.__values__[this.__index__++]}},ar.prototype.plant=function(n){for(var t,e=this;e instanceof fr;){var r=Qu(e);r.__index__=0,r.__values__=u,t?i.__wrapped__=r:t=r;var i=r;e=e.__wrapped__}return i.__wrapped__=n,t},ar.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof sr){var t=n;return this.__actions__.length&&(t=new sr(this)),(t=t.reverse()).__actions__.push({func:Ro,args:[po],thisArg:u}),new lr(t,this.__chain__)}return this.thru(po)},ar.prototype.toJSON=ar.prototype.valueOf=ar.prototype.value=function(){return Ei(this.__wrapped__,this.__actions__)},ar.prototype.first=ar.prototype.head,oe&&(ar.prototype[oe]=function(){return this}),ar}();At._=Ae,(i=function(){return Ae}.call(t,e,t,r))===u||(r.exports=i)}).call(this)}).call(this,e(2),e(0)(n))},function(n,t,e){(function(n){!function(n){"use strict";n.exports.is_uri=e,n.exports.is_http_uri=r,n.exports.is_https_uri=i,n.exports.is_web_uri=u,n.exports.isUri=e,n.exports.isHttpUri=r,n.exports.isHttpsUri=i,n.exports.isWebUri=u;var t=function(n){return n.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function e(n){if(n&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(n)&&!/%[^0-9a-f]/i.test(n)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(n)){var e,r,i,u,o,a="",c="";if(a=(e=t(n))[1],r=e[2],i=e[3],u=e[4],o=e[5],a&&a.length&&i.length>=0){if(r&&r.length){if(0!==i.length&&!/^\//.test(i))return}else if(/^\/\//.test(i))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(a.toLowerCase()))return c+=a+":",r&&r.length&&(c+="//"+r),c+=i,u&&u.length&&(c+="?"+u),o&&o.length&&(c+="#"+o),c}}}function r(n,r){if(e(n)){var i,u,o,a,c="",f="",l="",s="";if(c=(i=t(n))[1],f=i[2],u=i[3],o=i[4],a=i[5],c){if(r){if("https"!=c.toLowerCase())return}else if("http"!=c.toLowerCase())return;if(f)return/:(\d+)$/.test(f)&&(l=f.match(/:(\d+)$/)[0],f=f.replace(/:\d+$/,"")),s+=c+":",s+="//"+f,l&&(s+=l),s+=u,o&&o.length&&(s+="?"+o),a&&a.length&&(s+="#"+a),s}}}function i(n){return r(n,!0)}function u(n){return r(n)||i(n)}}(n)}).call(this,e(0)(n))},function(n,t,e){"use strict";var r=function(){function n(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}return function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),i=e(4),u=e(3),o=e(1),a=function(){function n(t,e){var r=t.serverUrl,o=t.peerConnectionConfig,a=t.platform;if(function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),!i.isUri(r))throw new Error("Invalid url");if(u.isUndefined(e)||!u.isObject(e))throw new Error("Invalid WebRTC object");!u.isUndefined(a)&&u.isString(a)&&u.includes(["browser","node","react-native"],a)?this.platform=a:this.platform="browser",this.serverUrl=r,this.pcConfig=o,this.WebRTC=e,this.myId=-1,this.activePeerId=null,this.signalingConnected=!1,this.otherPeers={},this.heartBeatIntervalId=null,this.peerConnection=null,this.inputChannel=null,this.repeatLongPoll=!1,this.onconnecting=null,this.onopen=null,this.onclose=null,this.onaddstream=null,this.onremovestream=null,this.onupdatepeers=null}return r(n,[{key:"signIn",value:function(n,t){var e=this,r=t.onconnecting,i=void 0===r?null:r,o=t.onopen,a=void 0===o?null:o,c=t.onclose,f=void 0===c?null:c,l=t.onaddstream,s=void 0===l?null:l,h=t.onremovestream,p=void 0===h?null:h,v=t.onupdatepeers,d=void 0===v?null:v;return this.onconnecting=i,this.onopen=a,this.onclose=f,this.onaddstream=s,this.onremovestream=p,this.onupdatepeers=d,fetch(this.serverUrl+"/sign_in?peer_name="+n,{method:"GET",headers:{"Peer-Type":"Client"}}).then(function(n){return n.text()}).then(function(n){var t=n.split("\n");e.myId=parseInt(t[0].split(",")[1],10);for(var r=1;r<t.length;++r)if(t[r].length>0){var i=t[r].split(",");e.otherPeers[parseInt(i[1],10)]=i[0]}u.isFunction(e.onupdatepeers)&&e.onupdatepeers(),e.signalingConnected=!0})}},{key:"disconnect",value:function(){this.stopHeartBeat(),this.repeatLongPoll=!1,-1!==this.myId&&(null!==this.peerConnection&&"connected"==this.peerConnection.iceConnectionState?this.disconnectFromCurrentPeer():this.disconnectFromServer())}},{key:"disconnectFromCurrentPeer",value:function(){return null!==this.peerConnection&&"connected"==this.peerConnection.iceConnectionState&&null!==this.activePeerId&&this.sendToPeer(this.activePeerId,"BYE"),!0}},{key:"disconnectFromServer",value:function(){1==this.signalingConnected&&(fetch(this.serverUrl+"/sign_out?peer_id="+this.myId,{method:"GET",headers:{"Peer-Type":"Client"}}),this.signalingConnected=!1)}},{key:"_heartbeatFunc",value:function(){fetch(this.serverUrl+"/heartbeat?peer_id="+this.myId,{method:"GET",headers:{}})}},{key:"startHeartbeat",value:function(){this.heartBeatIntervalId=setInterval(this._heartbeatFunc.bind(this),5e3)}},{key:"stopHeartBeat",value:function(){this.heartBeatIntervalId&&(clearInterval(this.heartBeatIntervalId),this.heartBeatIntervalId=null)}},{key:"getPeerById",value:function(n){if(!u.isNumber(n))throw new Error("Invalid Id parameter.");return n in this.otherPeers?this.otherPeers[n]:null}},{key:"getPeerIdByName",value:function(n){if(!u.isString(n))throw new Error("Invalid paramter, not a string.");return u.findKey(this.otherPeers,function(t){return t===n})}},{key:"stopPollingSignalingServer",value:function(){this.repeatLongPoll=!1}},{key:"pollSignalingServer",value:function(n){var t=this;if(!u.isUndefined(n)&&u.isBoolean(n)&&(this.repeatLongPoll=n),!1!==this.repeatLongPoll)return fetch(this.serverUrl+"/wait?peer_id="+this.myId,{method:"GET",headers:{"Peer-Type":"Client"}}).then(function(n){if(!n.ok){if(500===n.status)return;t.pollSignalingServer()}var e=n.headers.get("pragma"),r=null!=e&&e.length?parseInt(e,10):null;n.text().then(function(n){return t._handleMessage(r,n)}).then(function(){t.pollSignalingServer()})}).catch(function(n){console.error(n),-1!==t.myId&&t.pollSignalingServer()})}},{key:"_handlePeerListUpdate",value:function(n,t){console.log("Handling PEERLIST_UPDATE message");var e=t.split(",");0!==parseInt(e[2],10)&&(console.log("New peer added."),this.otherPeers[parseInt(e[1],10)]=e[0]),u.isFunction(this.onupdatepeers)&&this.onupdatepeers()}},{key:"_handleOfferMessage",value:function(n,t){var e=this;console.log("Handling OFFER_MESSAGE message");var r=JSON.parse(t);if(r.uri&&r.username&&r.password){console.log("Parsing Turn Credentials from OFFER:",r);var i=[].concat(this.pcConfig.iceServers);i.push({urls:r.uri,username:r.username,credential:r.password,credentialType:"password"}),this.pcConfig.iceServers=i}this._createPeerConnection(n),this.peerConnection.setRemoteDescription(new this.WebRTC.RTCSessionDescription(r),function(){console.log("Successfully set remote description")},function(n){console.log("Failed to set remote description on "+n.name+": "+n.message)}),this.peerConnection.createAnswer(function(t){console.log("Create answer:",t),e.peerConnection.setLocalDescription(t);var r=JSON.stringify(t);e.sendToPeer(n,r)},function(n){console.log("Create answer error:",n)},{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!0}})}},{key:"_handleAnswerMessage",value:function(n,t){console.log("Handling ANSWER_MESSAGE message");var e=JSON.parse(t);console.log("Got answer ",e),this.peerConnection.setRemoteDescription(new this.WebRTC.RTCSessionDescription(e),function(){console.log("Successfully set remote description")},function(n){console.log("Failed to set remote description on "+n.name+": "+n.message)})}},{key:"_handleAddIceCandidate",value:function(n,t){console.log("BODDY OF ICE CANDIATE: "+t);var e=JSON.parse(t);console.log("Adding ICE candiate ",e);var r=new this.WebRTC.RTCIceCandidate({sdpMLineIndex:e.sdpMLineIndex,candidate:e.candidate,sdpMid:e.sdpMid});null!=r.sdpMid&&this.peerConnection.addIceCandidate(r)}},{key:"_handleMessage",value:function(n,t){if(u.isString(t)&&!u.isEmpty(t.trim())){var e=n===this.myId?"PEERLIST_UPDATE":null;switch(e=null===(e=null===(e=null===e&&u.isString(t)&&-1!==t.search("offer")?"OFFER_MESSAGE":e)&&u.isString(t)&&-1!==t.search("answer")?"ANSWER_MESSAGE":e)?"ADD_ICE_CANDIDATE":e){case"PEERLIST_UPDATE":this._handlePeerListUpdate(n,t);break;case"OFFER_MESSAGE":this._handleOfferMessage(n,t);break;case"ANSWER_MESSAGE":this._handleAnswerMessage(n,t);break;case"ADD_ICE_CANDIDATE":this._handleAddIceCandidate(n,t)}}else console.log("Received an invalid message")}},{key:"_createPeerConnection",value:function(n){var t=this;try{return null!==this.peerConnection&&(this.peerConnection.close(),this.peerConnection=null),this.peerConnection=new this.WebRTC.RTCPeerConnection(this.pcConfig),this.peerConnection.onicecandidate=function(e){if(e.candidate){var r={sdpMLineIndex:e.candidate.sdpMLineIndex,sdpMid:e.candidate.sdpMid,candidate:e.candidate.candidate};t.sendToPeer(n,JSON.stringify(r))}else console.log("End of candidates.")},u.isFunction(this.onconnecting)&&(this.peerConnection.onconnecting=this.onconnecting),u.isFunction(this.onopen)&&(this.peerConnection.onopen=this.onopen),u.isFunction(this.onaddstream)&&(this.peerConnection.onaddstream=this.onaddstream),u.isFunction(this.onremovestream)&&(this.peerConnection.onremovestream=this.onremovestream),u.isFunction(this.onclose)&&(this.peerConnection.onclose=this.onclose),this.peerConnection.ondatachannel=function(n){t.inputChannel=n.channel,t.inputChannel.onopen=t._handleSendChannelOpen,t.inputChannel.onclose=t._handleSendChannelClose},console.log("Created RTCPeerConnnection with config: "+JSON.stringify(this.pcConfig)),this.activePeerId=n,this.peerConnection}catch(n){console.log("Failed to create PeerConnection, exception: "+n.message)}return this.peerConnection=null,null}},{key:"sendToPeer",value:function(n,t){if(-1===this.myId)return null;if(n===this.myId)return null;var e={method:"POST",headers:{"Peer-Type":"Client","Content-Type":"text/plain"},body:t};return fetch(this.serverUrl+"/message?peer_id="+this.myId+"&to="+n,e).catch(function(n){console.error("Testing"+n)})}},{key:"_handleSendChannelOpen",value:function(){console.log("sendChannel opened")}},{key:"_handleSendChannelClose",value:function(){console.log("sendChannel closed")}},{key:"joinPeer",value:function(n,t){var e=this;if(!(n in this.otherPeers))throw new Error("Peer Id is not registered");this._createPeerConnection(n,t),this.inputChannel=this.peerConnection.createDataChannel("inputDataChannel"),this.inputChannel.onopen=this._handleSendChannelOpen,this.inputChannel.onclose=this._handleSendChannelClose;var r="";return this.peerConnection.createOffer({offerToReceiveAudio:0,offerToReceiveVideo:1}).then(function(n){n.sdp=o.maybePreferCodec(n.sdp,"video","receive","H264"),e.peerConnection.setLocalDescription(n),r=n}).then(function(){e.sendToPeer(n,JSON.stringify(r))}),this.peerConnection}},{key:"sendInputChannelData",value:function(n){this.inputChannel&&"open"===this.inputChannel.readyState&&this.inputChannel.send(JSON.stringify(n))}}]),n}();n.exports=a},function(n,t,e){"use strict";n.exports={ThreeDStreamingClient:e(5)}}]);