videomail-client 9.2.21 → 9.2.22
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.
|
@@ -20,9 +20,9 @@ t.exports=function(e){var t,n=String.prototype.split,r=/()??/.exec("")[1]===e;re
|
|
|
20
20
|
*
|
|
21
21
|
* @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
|
|
22
22
|
* @license BSD-3-Clause
|
|
23
|
-
* @version 10.1.
|
|
23
|
+
* @version 10.1.6
|
|
24
24
|
*/
|
|
25
|
-
"use strict";const r="array",i="bit",o="bits",a="byte",s="bytes",u="",c="exponent",l="function",f="iec",d="Invalid number",h="Invalid rounding method",p="jedec",m="object",y=".",b="round",g="s",v="si",w="kbit",E="kB",_=" ",R="string",S="0",A={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function O(e,{bits:t=!1,pad:n=!1,base:O=-1,round:k=2,locale:T=u,localeOptions:x={},separator:j=u,spacer:M=_,symbols:C={},standard:D=u,output:N=R,fullform:I=!1,fullforms:L=[],exponent:P=-1,roundingMethod:B=b,precision:U=0}={}){let F=P,q=Number(e),W=[],H=0,V=u;D===v?(O=10,D=p):D===f||D===p?O=2:2===O?D=f:(O=10,D=p);const z=10===O?1e3:1024,G=!0===I,$=q<0,Y=Math[B];if("bigint"!=typeof e&&isNaN(e))throw new TypeError(d);if(typeof Y!==l)throw new TypeError(h);if($&&(q=-q),(-1===F||isNaN(F))&&(F=Math.floor(Math.log(q)/Math.log(z)),F<0&&(F=0)),F>8&&(U>0&&(U+=8-F),F=8),N===c)return F;if(0===q)W[0]=0,V=W[1]=A.symbol[D][t?o:s][F];else{H=q/(2===O?Math.pow(2,10*F):Math.pow(1e3,F)),t&&(H*=8,H>=z&&F<8&&(H/=z,F++));const e=Math.pow(10,F>0?k:0);W[0]=Y(H*e)/e,W[0]===z&&F<8&&-1===P&&(W[0]=1,F++),V=W[1]=10===O&&1===F?t?w:E:A.symbol[D][t?o:s][F]}if($&&(W[0]=-W[0]),U>0&&(W[0]=W[0].toPrecision(U)),W[1]=C[W[1]]||W[1],!0===T?W[0]=W[0].toLocaleString():T.length>0?W[0]=W[0].toLocaleString(T,x):j.length>0&&(W[0]=W[0].toString().replace(y,j)),n&&!1===Number.isInteger(W[0])&&k>0){const e=j||y,t=W[0].toString().split(e),n=t[1]||u,r=n.length,i=k-r;W[0]=`${t[0]}${e}${n.padEnd(r+i,S)}`}return G&&(W[1]=L[F]?L[F]:A.fullform[D][F]+(t?i:a)+(1===W[0]?u:g)),N===r?W:N===m?{value:W[0],symbol:W[1],exponent:F,unit:V}:W.join(M)}n.filesize=O,n.partial=function({bits:e=!1,pad:t=!1,base:n=-1,round:r=2,locale:i=u,localeOptions:o={},separator:a=u,spacer:s=_,symbols:c={},standard:l=u,output:f=R,fullform:d=!1,fullforms:h=[],exponent:p=-1,roundingMethod:m=b,precision:y=0}={}){return u=>O(u,{bits:e,pad:t,base:n,round:r,locale:i,localeOptions:o,separator:a,spacer:s,symbols:c,standard:l,output:f,fullform:d,fullforms:h,exponent:p,roundingMethod:m,precision:y})}},{}],47:[function(e,t,n){t.exports=function(e){var t=Array.prototype.slice.call(arguments,1);return t.length&&(e=e.replace(/(%?)(%([jds]))/g,(function(e,n,r,i){var o=t.shift();switch(i){case"s":o=""+o;break;case"d":o=Number(o);break;case"j":o=JSON.stringify(o)}return n?(t.unshift(o),e):o}))),t.length&&(e+=" "+t.join(" ")),""+(e=e.replace(/%{2,2}/g,"%"))}},{}],48:[function(e,t,n){"use strict";var r=Object.prototype.toString,i=Math.max,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n};t.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==r.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,a=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n}(arguments,1),s=i(0,t.length-a.length),u=[],c=0;c<s;c++)u[c]="$"+c;if(n=Function("binder","return function ("+function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n}(u,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof n){var r=t.apply(this,o(a,arguments));return Object(r)===r?r:this}return t.apply(e,o(a,arguments))})),t.prototype){var l=function(){};l.prototype=t.prototype,n.prototype=new l,l.prototype=null}return n}},{}],49:[function(e,t,n){"use strict";var r=e("./implementation");t.exports=Function.prototype.bind||r},{"./implementation":48}],50:[function(e,t,n){"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.__esModule=!0,n.default=l,n.getFieldData=f;var i={"[object HTMLCollection]":!0,"[object NodeList]":!0,"[object RadioNodeList]":!0},o={button:!0,fieldset:!0,reset:!0,submit:!0},a={checkbox:!0,radio:!0},s=/^\s+|\s+$/g,u=Array.prototype.slice,c=Object.prototype.toString;function l(e,t){if(!e)throw new Error("A form is required by getFormData, was given form="+e);t=r({includeDisabled:!1,trim:!1},t);for(var n,i={},a=[],s={},u=0,c=e.elements.length;u<c;u++){var l=e.elements[u];o[l.type]||l.disabled&&!t.includeDisabled||(n=l.name||l.id)&&!s[n]&&(a.push(n),s[n]=!0)}for(var d=0,h=a.length;d<h;d++){var p=f(e,n=a[d],t);null!=p&&(i[n]=p)}return i}function f(e,t,n){if(!e)throw new Error("A form is required by getFieldData, was given form="+e);if(!t&&"[object String]"!==c.call(t))throw new Error("A field name is required by getFieldData, was given fieldName="+t);n=r({includeDisabled:!1,trim:!1},n);var o=e.elements[t];if(!o||o.disabled&&!n.includeDisabled)return null;if(!i[c.call(o)])return d(o,n.trim);for(var a=[],s=!0,u=0,l=o.length;u<l;u++)if(!o[u].disabled||n.includeDisabled){s&&"radio"!==o[u].type&&(s=!1);var f=d(o[u],n.trim);null!=f&&(a=a.concat(f))}return s&&1===a.length?a[0]:a.length>0?a:null}function d(e,t){var n=null,r=e.type;if("select-one"===r)return e.options.length&&(n=e.options[e.selectedIndex].value),n;if("select-multiple"===r){n=[];for(var i=0,o=e.options.length;i<o;i++)e.options[i].selected&&n.push(e.options[i].value);return 0===n.length&&(n=null),n}return"file"===r&&"files"in e?(e.multiple?0===(n=u.call(e.files)).length&&(n=null):n=e.files[0],n):(a[r]?e.checked&&(n="checkbox"===r&&!e.hasAttribute("value")||e.value):n=t?e.value.replace(s,""):e.value,n)}l.getFieldData=f},{}],51:[function(e,t,n){"use strict";var r,i=e("es-errors"),o=e("es-errors/eval"),a=e("es-errors/range"),s=e("es-errors/ref"),u=e("es-errors/syntax"),c=e("es-errors/type"),l=e("es-errors/uri"),f=Function,d=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var p=function(){throw new c},m=h?function(){try{return p}catch(e){try{return h(arguments,"callee").get}catch(e){return p}}}():p,y=e("has-symbols")(),b=e("has-proto")(),g=Object.getPrototypeOf||(b?function(e){return e.__proto__}:null),v={},w="undefined"!=typeof Uint8Array&&g?g(Uint8Array):r,E={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":y&&g?g([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&g?g(g([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&y&&g?g((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&y&&g?g((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&g?g(""[Symbol.iterator]()):r,"%Symbol%":y?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":m,"%TypedArray%":w,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(g)try{null.error}catch(e){var _=g(g(e));E["%Error.prototype%"]=_}var R=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&g&&(n=g(i.prototype))}return E[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=e("function-bind"),O=e("hasown"),k=A.call(Function.call,Array.prototype.concat),T=A.call(Function.apply,Array.prototype.splice),x=A.call(Function.call,String.prototype.replace),j=A.call(Function.call,String.prototype.slice),M=A.call(Function.call,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(e,t){var n,r=e;if(O(S,r)&&(r="%"+(n=S[r])[0]+"%"),O(E,r)){var i=E[r];if(i===v&&(i=R(r)),void 0===i&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new u("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===M(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=j(e,0,1),n=j(e,-1);if("%"===t&&"%"!==n)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var r=[];return x(e,C,(function(e,t,n,i){r[r.length]=n?x(i,D,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",i=N("%"+r+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(r=l[0],T(n,k([0,1],l)));for(var f=1,d=!0;f<n.length;f+=1){var p=n[f],m=j(p,0,1),y=j(p,-1);if(('"'===m||"'"===m||"`"===m||'"'===y||"'"===y||"`"===y)&&m!==y)throw new u("property names with quotes must have matching quotes");if("constructor"!==p&&d||(s=!0),O(E,o="%"+(r+="."+p)+"%"))a=E[o];else if(null!=a){if(!(p in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&f+1>=n.length){var b=h(a,p);a=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:a[p]}else d=O(a,p),a=a[p];d&&!s&&(E[o]=a)}}return a}},{"es-errors":38,"es-errors/eval":37,"es-errors/range":39,"es-errors/ref":40,"es-errors/syntax":41,"es-errors/type":42,"es-errors/uri":43,"function-bind":49,"has-proto":57,"has-symbols":58,hasown:60}],52:[function(e,t,n){t.exports=function(){var e=[];return{broadcast:function(t){for(var n=0;n<e.length;n++)e[n](t)},listen:function(t){return e.push(t),n;function n(){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}}}}},{}],53:[function(e,t,n){var r=e("./event.js");t.exports=function(e){var t=r();return e(t.broadcast),t.listen}},{"./event.js":52}],54:[function(e,t,n){(function(e){(function(){var n;n="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=n}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],55:[function(e,t,n){"use strict";var r=e("get-intrinsic")("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}t.exports=r},{"get-intrinsic":51}],56:[function(e,t,n){"use strict";var r=e("es-define-property"),i=function(){return!!r};i.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},t.exports=i},{"es-define-property":36}],57:[function(e,t,n){"use strict";var r={__proto__:null,foo:{}},i=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!(r instanceof i)}},{}],58:[function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=e("./shams");t.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},{"./shams":59}],59:[function(e,t,n){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},{}],60:[function(e,t,n){"use strict";var r=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=e("function-bind");t.exports=o.call(r,i)},{"function-bind":49}],61:[function(e,t,n){t.exports=function(e,t){if(void 0===t)return"none"===e.style.display;e.style.display=t?"none":""}},{}],62:[function(e,t,n){!function(){var e=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])d(t,r)&&(e[r]=t[r]);return e},n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=o((function(e){return 1===e?"χρόνος":"χρόνια"}),(function(e){return 1===e?"μήνας":"μήνες"}),(function(e){return 1===e?"εβδομάδα":"εβδομάδες"}),(function(e){return 1===e?"μέρα":"μέρες"}),(function(e){return 1===e?"ώρα":"ώρες"}),(function(e){return 1===e?"λεπτό":"λεπτά"}),(function(e){return 1===e?"δευτερόλεπτο":"δευτερόλεπτα"}),(function(e){return(1===e?"χιλιοστό":"χιλιοστά")+" του δευτερολέπτου"}),","),i={af:o("jaar",(function(e){return"maand"+(1===e?"":"e")}),(function(e){return 1===e?"week":"weke"}),(function(e){return 1===e?"dag":"dae"}),(function(e){return 1===e?"uur":"ure"}),(function(e){return 1===e?"minuut":"minute"}),(function(e){return"sekonde"+(1===e?"":"s")}),(function(e){return"millisekonde"+(1===e?"":"s")}),","),am:o("ዓመት","ወር","ሳምንት","ቀን","ሰዓት","ደቂቃ","ሰከንድ","ሚሊሰከንድ"),ar:e(o((function(e){return["سنة","سنتان","سنوات"][a(e)]}),(function(e){return["شهر","شهران","أشهر"][a(e)]}),(function(e){return["أسبوع","أسبوعين","أسابيع"][a(e)]}),(function(e){return["يوم","يومين","أيام"][a(e)]}),(function(e){return["ساعة","ساعتين","ساعات"][a(e)]}),(function(e){return["دقيقة","دقيقتان","دقائق"][a(e)]}),(function(e){return["ثانية","ثانيتان","ثواني"][a(e)]}),(function(e){return["جزء من الثانية","جزآن من الثانية","أجزاء من الثانية"][a(e)]}),","),{delimiter:" ﻭ ",_hideCountIf2:!0,_digitReplacements:["۰","١","٢","٣","٤","٥","٦","٧","٨","٩"]}),bg:o((function(e){return["години","година","години"][u(e)]}),(function(e){return["месеца","месец","месеца"][u(e)]}),(function(e){return["седмици","седмица","седмици"][u(e)]}),(function(e){return["дни","ден","дни"][u(e)]}),(function(e){return["часа","час","часа"][u(e)]}),(function(e){return["минути","минута","минути"][u(e)]}),(function(e){return["секунди","секунда","секунди"][u(e)]}),(function(e){return["милисекунди","милисекунда","милисекунди"][u(e)]}),","),bn:o("বছর","মাস","সপ্তাহ","দিন","ঘন্টা","মিনিট","সেকেন্ড","মিলিসেকেন্ড"),ca:o((function(e){return"any"+(1===e?"":"s")}),(function(e){return"mes"+(1===e?"":"os")}),(function(e){return"setman"+(1===e?"a":"es")}),(function(e){return"di"+(1===e?"a":"es")}),(function(e){return"hor"+(1===e?"a":"es")}),(function(e){return"minut"+(1===e?"":"s")}),(function(e){return"segon"+(1===e?"":"s")}),(function(e){return"milisegon"+(1===e?"":"s")}),","),ckb:o("ساڵ","مانگ","هەفتە","ڕۆژ","کاژێر","خولەک","چرکە","میلی چرکە","."),cs:o((function(e){return["rok","roku","roky","let"][c(e)]}),(function(e){return["měsíc","měsíce","měsíce","měsíců"][c(e)]}),(function(e){return["týden","týdne","týdny","týdnů"][c(e)]}),(function(e){return["den","dne","dny","dní"][c(e)]}),(function(e){return["hodina","hodiny","hodiny","hodin"][c(e)]}),(function(e){return["minuta","minuty","minuty","minut"][c(e)]}),(function(e){return["sekunda","sekundy","sekundy","sekund"][c(e)]}),(function(e){return["milisekunda","milisekundy","milisekundy","milisekund"][c(e)]}),","),cy:o("flwyddyn","mis","wythnos","diwrnod","awr","munud","eiliad","milieiliad"),da:o("år",(function(e){return"måned"+(1===e?"":"er")}),(function(e){return"uge"+(1===e?"":"r")}),(function(e){return"dag"+(1===e?"":"e")}),(function(e){return"time"+(1===e?"":"r")}),(function(e){return"minut"+(1===e?"":"ter")}),(function(e){return"sekund"+(1===e?"":"er")}),(function(e){return"millisekund"+(1===e?"":"er")}),","),de:o((function(e){return"Jahr"+(1===e?"":"e")}),(function(e){return"Monat"+(1===e?"":"e")}),(function(e){return"Woche"+(1===e?"":"n")}),(function(e){return"Tag"+(1===e?"":"e")}),(function(e){return"Stunde"+(1===e?"":"n")}),(function(e){return"Minute"+(1===e?"":"n")}),(function(e){return"Sekunde"+(1===e?"":"n")}),(function(e){return"Millisekunde"+(1===e?"":"n")}),","),el:r,en:o((function(e){return"year"+(1===e?"":"s")}),(function(e){return"month"+(1===e?"":"s")}),(function(e){return"week"+(1===e?"":"s")}),(function(e){return"day"+(1===e?"":"s")}),(function(e){return"hour"+(1===e?"":"s")}),(function(e){return"minute"+(1===e?"":"s")}),(function(e){return"second"+(1===e?"":"s")}),(function(e){return"millisecond"+(1===e?"":"s")})),eo:o((function(e){return"jaro"+(1===e?"":"j")}),(function(e){return"monato"+(1===e?"":"j")}),(function(e){return"semajno"+(1===e?"":"j")}),(function(e){return"tago"+(1===e?"":"j")}),(function(e){return"horo"+(1===e?"":"j")}),(function(e){return"minuto"+(1===e?"":"j")}),(function(e){return"sekundo"+(1===e?"":"j")}),(function(e){return"milisekundo"+(1===e?"":"j")}),","),es:o((function(e){return"año"+(1===e?"":"s")}),(function(e){return"mes"+(1===e?"":"es")}),(function(e){return"semana"+(1===e?"":"s")}),(function(e){return"día"+(1===e?"":"s")}),(function(e){return"hora"+(1===e?"":"s")}),(function(e){return"minuto"+(1===e?"":"s")}),(function(e){return"segundo"+(1===e?"":"s")}),(function(e){return"milisegundo"+(1===e?"":"s")}),","),et:o((function(e){return"aasta"+(1===e?"":"t")}),(function(e){return"kuu"+(1===e?"":"d")}),(function(e){return"nädal"+(1===e?"":"at")}),(function(e){return"päev"+(1===e?"":"a")}),(function(e){return"tund"+(1===e?"":"i")}),(function(e){return"minut"+(1===e?"":"it")}),(function(e){return"sekund"+(1===e?"":"it")}),(function(e){return"millisekund"+(1===e?"":"it")}),","),eu:o("urte","hilabete","aste","egun","ordu","minutu","segundo","milisegundo",","),fa:o("سال","ماه","هفته","روز","ساعت","دقیقه","ثانیه","میلی ثانیه"),fi:o((function(e){return 1===e?"vuosi":"vuotta"}),(function(e){return 1===e?"kuukausi":"kuukautta"}),(function(e){return"viikko"+(1===e?"":"a")}),(function(e){return"päivä"+(1===e?"":"ä")}),(function(e){return"tunti"+(1===e?"":"a")}),(function(e){return"minuutti"+(1===e?"":"a")}),(function(e){return"sekunti"+(1===e?"":"a")}),(function(e){return"millisekunti"+(1===e?"":"a")}),","),fo:o("ár",(function(e){return 1===e?"mánaður":"mánaðir"}),(function(e){return 1===e?"vika":"vikur"}),(function(e){return 1===e?"dagur":"dagar"}),(function(e){return 1===e?"tími":"tímar"}),(function(e){return 1===e?"minuttur":"minuttir"}),"sekund","millisekund",","),fr:o((function(e){return"an"+(e>=2?"s":"")}),"mois",(function(e){return"semaine"+(e>=2?"s":"")}),(function(e){return"jour"+(e>=2?"s":"")}),(function(e){return"heure"+(e>=2?"s":"")}),(function(e){return"minute"+(e>=2?"s":"")}),(function(e){return"seconde"+(e>=2?"s":"")}),(function(e){return"milliseconde"+(e>=2?"s":"")}),","),gr:r,he:o((function(e){return 1===e?"שנה":"שנים"}),(function(e){return 1===e?"חודש":"חודשים"}),(function(e){return 1===e?"שבוע":"שבועות"}),(function(e){return 1===e?"יום":"ימים"}),(function(e){return 1===e?"שעה":"שעות"}),(function(e){return 1===e?"דקה":"דקות"}),(function(e){return 1===e?"שניה":"שניות"}),(function(e){return 1===e?"מילישנייה":"מילישניות"})),hr:o((function(e){return e%10==2||e%10==3||e%10==4?"godine":"godina"}),(function(e){return 1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci"}),(function(e){return e%10==1&&11!==e?"tjedan":"tjedna"}),(function(e){return 1===e?"dan":"dana"}),(function(e){return 1===e?"sat":2===e||3===e||4===e?"sata":"sati"}),(function(e){var t=e%10;return 2!==t&&3!==t&&4!==t||!(e<10||e>14)?"minuta":"minute"}),(function(e){var t=e%10;return 5===t||Math.floor(e)===e&&e>=10&&e<=19?"sekundi":1===t?"sekunda":2===t||3===t||4===t?"sekunde":"sekundi"}),(function(e){return 1===e?"milisekunda":e%10==2||e%10==3||e%10==4?"milisekunde":"milisekundi"}),","),hi:o("साल",(function(e){return 1===e?"महीना":"महीने"}),(function(e){return 1===e?"हफ़्ता":"हफ्ते"}),"दिन",(function(e){return 1===e?"घंटा":"घंटे"}),"मिनट","सेकंड","मिलीसेकंड"),hu:o("év","hónap","hét","nap","óra","perc","másodperc","ezredmásodperc",","),id:o("tahun","bulan","minggu","hari","jam","menit","detik","milidetik"),is:o("ár",(function(e){return"mánuð"+(1===e?"ur":"ir")}),(function(e){return"vik"+(1===e?"a":"ur")}),(function(e){return"dag"+(1===e?"ur":"ar")}),(function(e){return"klukkutím"+(1===e?"i":"ar")}),(function(e){return"mínút"+(1===e?"a":"ur")}),(function(e){return"sekúnd"+(1===e?"a":"ur")}),(function(e){return"millisekúnd"+(1===e?"a":"ur")})),it:o((function(e){return"ann"+(1===e?"o":"i")}),(function(e){return"mes"+(1===e?"e":"i")}),(function(e){return"settiman"+(1===e?"a":"e")}),(function(e){return"giorn"+(1===e?"o":"i")}),(function(e){return"or"+(1===e?"a":"e")}),(function(e){return"minut"+(1===e?"o":"i")}),(function(e){return"second"+(1===e?"o":"i")}),(function(e){return"millisecond"+(1===e?"o":"i")}),","),ja:o("年","ヶ月","週","日","時間","分","秒","ミリ秒"),km:o("ឆ្នាំ","ខែ","សប្តាហ៍","ថ្ងៃ","ម៉ោង","នាទី","វិនាទី","មិល្លីវិនាទី"),kn:o((function(e){return 1===e?"ವರ್ಷ":"ವರ್ಷಗಳು"}),(function(e){return 1===e?"ತಿಂಗಳು":"ತಿಂಗಳುಗಳು"}),(function(e){return 1===e?"ವಾರ":"ವಾರಗಳು"}),(function(e){return 1===e?"ದಿನ":"ದಿನಗಳು"}),(function(e){return 1===e?"ಗಂಟೆ":"ಗಂಟೆಗಳು"}),(function(e){return 1===e?"ನಿಮಿಷ":"ನಿಮಿಷಗಳು"}),(function(e){return 1===e?"ಸೆಕೆಂಡ್":"ಸೆಕೆಂಡುಗಳು"}),(function(e){return 1===e?"ಮಿಲಿಸೆಕೆಂಡ್":"ಮಿಲಿಸೆಕೆಂಡುಗಳು"})),ko:o("년","개월","주일","일","시간","분","초","밀리 초"),ku:o("sal","meh","hefte","roj","seet","deqe","saniye","mîlîçirk",","),lo:o("ປີ","ເດືອນ","ອາທິດ","ມື້","ຊົ່ວໂມງ","ນາທີ","ວິນາທີ","ມິນລິວິນາທີ",","),lt:o((function(e){return e%10==0||e%100>=10&&e%100<=20?"metų":"metai"}),(function(e){return["mėnuo","mėnesiai","mėnesių"][l(e)]}),(function(e){return["savaitė","savaitės","savaičių"][l(e)]}),(function(e){return["diena","dienos","dienų"][l(e)]}),(function(e){return["valanda","valandos","valandų"][l(e)]}),(function(e){return["minutė","minutės","minučių"][l(e)]}),(function(e){return["sekundė","sekundės","sekundžių"][l(e)]}),(function(e){return["milisekundė","milisekundės","milisekundžių"][l(e)]}),","),lv:o((function(e){return f(e)?"gads":"gadi"}),(function(e){return f(e)?"mēnesis":"mēneši"}),(function(e){return f(e)?"nedēļa":"nedēļas"}),(function(e){return f(e)?"diena":"dienas"}),(function(e){return f(e)?"stunda":"stundas"}),(function(e){return f(e)?"minūte":"minūtes"}),(function(e){return f(e)?"sekunde":"sekundes"}),(function(e){return f(e)?"milisekunde":"milisekundes"}),","),mk:o((function(e){return 1===e?"година":"години"}),(function(e){return 1===e?"месец":"месеци"}),(function(e){return 1===e?"недела":"недели"}),(function(e){return 1===e?"ден":"дена"}),(function(e){return 1===e?"час":"часа"}),(function(e){return 1===e?"минута":"минути"}),(function(e){return 1===e?"секунда":"секунди"}),(function(e){return 1===e?"милисекунда":"милисекунди"}),","),mn:o("жил","сар","долоо хоног","өдөр","цаг","минут","секунд","миллисекунд"),mr:o((function(e){return 1===e?"वर्ष":"वर्षे"}),(function(e){return 1===e?"महिना":"महिने"}),(function(e){return 1===e?"आठवडा":"आठवडे"}),"दिवस","तास",(function(e){return 1===e?"मिनिट":"मिनिटे"}),"सेकंद","मिलिसेकंद"),ms:o("tahun","bulan","minggu","hari","jam","minit","saat","milisaat"),nl:o("jaar",(function(e){return 1===e?"maand":"maanden"}),(function(e){return 1===e?"week":"weken"}),(function(e){return 1===e?"dag":"dagen"}),"uur",(function(e){return 1===e?"minuut":"minuten"}),(function(e){return 1===e?"seconde":"seconden"}),(function(e){return 1===e?"milliseconde":"milliseconden"}),","),no:o("år",(function(e){return"måned"+(1===e?"":"er")}),(function(e){return"uke"+(1===e?"":"r")}),(function(e){return"dag"+(1===e?"":"er")}),(function(e){return"time"+(1===e?"":"r")}),(function(e){return"minutt"+(1===e?"":"er")}),(function(e){return"sekund"+(1===e?"":"er")}),(function(e){return"millisekund"+(1===e?"":"er")}),","),pl:o((function(e){return["rok","roku","lata","lat"][s(e)]}),(function(e){return["miesiąc","miesiąca","miesiące","miesięcy"][s(e)]}),(function(e){return["tydzień","tygodnia","tygodnie","tygodni"][s(e)]}),(function(e){return["dzień","dnia","dni","dni"][s(e)]}),(function(e){return["godzina","godziny","godziny","godzin"][s(e)]}),(function(e){return["minuta","minuty","minuty","minut"][s(e)]}),(function(e){return["sekunda","sekundy","sekundy","sekund"][s(e)]}),(function(e){return["milisekunda","milisekundy","milisekundy","milisekund"][s(e)]}),","),pt:o((function(e){return"ano"+(1===e?"":"s")}),(function(e){return 1===e?"mês":"meses"}),(function(e){return"semana"+(1===e?"":"s")}),(function(e){return"dia"+(1===e?"":"s")}),(function(e){return"hora"+(1===e?"":"s")}),(function(e){return"minuto"+(1===e?"":"s")}),(function(e){return"segundo"+(1===e?"":"s")}),(function(e){return"milissegundo"+(1===e?"":"s")}),","),ro:o((function(e){return 1===e?"an":"ani"}),(function(e){return 1===e?"lună":"luni"}),(function(e){return 1===e?"săptămână":"săptămâni"}),(function(e){return 1===e?"zi":"zile"}),(function(e){return 1===e?"oră":"ore"}),(function(e){return 1===e?"minut":"minute"}),(function(e){return 1===e?"secundă":"secunde"}),(function(e){return 1===e?"milisecundă":"milisecunde"}),","),ru:o((function(e){return["лет","год","года"][u(e)]}),(function(e){return["месяцев","месяц","месяца"][u(e)]}),(function(e){return["недель","неделя","недели"][u(e)]}),(function(e){return["дней","день","дня"][u(e)]}),(function(e){return["часов","час","часа"][u(e)]}),(function(e){return["минут","минута","минуты"][u(e)]}),(function(e){return["секунд","секунда","секунды"][u(e)]}),(function(e){return["миллисекунд","миллисекунда","миллисекунды"][u(e)]}),","),sq:o((function(e){return 1===e?"vit":"vjet"}),"muaj","javë","ditë","orë",(function(e){return"minut"+(1===e?"ë":"a")}),(function(e){return"sekond"+(1===e?"ë":"a")}),(function(e){return"milisekond"+(1===e?"ë":"a")}),","),sr:o((function(e){return["години","година","године"][u(e)]}),(function(e){return["месеци","месец","месеца"][u(e)]}),(function(e){return["недељи","недеља","недеље"][u(e)]}),(function(e){return["дани","дан","дана"][u(e)]}),(function(e){return["сати","сат","сата"][u(e)]}),(function(e){return["минута","минут","минута"][u(e)]}),(function(e){return["секунди","секунда","секунде"][u(e)]}),(function(e){return["милисекунди","милисекунда","милисекунде"][u(e)]}),","),ta:o((function(e){return 1===e?"வருடம்":"ஆண்டுகள்"}),(function(e){return 1===e?"மாதம்":"மாதங்கள்"}),(function(e){return 1===e?"வாரம்":"வாரங்கள்"}),(function(e){return 1===e?"நாள்":"நாட்கள்"}),(function(e){return 1===e?"மணி":"மணிநேரம்"}),(function(e){return"நிமிட"+(1===e?"ம்":"ங்கள்")}),(function(e){return"வினாடி"+(1===e?"":"கள்")}),(function(e){return"மில்லி விநாடி"+(1===e?"":"கள்")})),te:o((function(e){return"సంవత్స"+(1===e?"రం":"రాల")}),(function(e){return"నెల"+(1===e?"":"ల")}),(function(e){return 1===e?"వారం":"వారాలు"}),(function(e){return"రోజు"+(1===e?"":"లు")}),(function(e){return"గంట"+(1===e?"":"లు")}),(function(e){return 1===e?"నిమిషం":"నిమిషాలు"}),(function(e){return 1===e?"సెకను":"సెకన్లు"}),(function(e){return 1===e?"మిల్లీసెకన్":"మిల్లీసెకన్లు"})),uk:o((function(e){return["років","рік","роки"][u(e)]}),(function(e){return["місяців","місяць","місяці"][u(e)]}),(function(e){return["тижнів","тиждень","тижні"][u(e)]}),(function(e){return["днів","день","дні"][u(e)]}),(function(e){return["годин","година","години"][u(e)]}),(function(e){return["хвилин","хвилина","хвилини"][u(e)]}),(function(e){return["секунд","секунда","секунди"][u(e)]}),(function(e){return["мілісекунд","мілісекунда","мілісекунди"][u(e)]}),","),ur:o("سال",(function(e){return 1===e?"مہینہ":"مہینے"}),(function(e){return 1===e?"ہفتہ":"ہفتے"}),"دن",(function(e){return 1===e?"گھنٹہ":"گھنٹے"}),"منٹ","سیکنڈ","ملی سیکنڈ"),sk:o((function(e){return["rok","roky","roky","rokov"][c(e)]}),(function(e){return["mesiac","mesiace","mesiace","mesiacov"][c(e)]}),(function(e){return["týždeň","týždne","týždne","týždňov"][c(e)]}),(function(e){return["deň","dni","dni","dní"][c(e)]}),(function(e){return["hodina","hodiny","hodiny","hodín"][c(e)]}),(function(e){return["minúta","minúty","minúty","minút"][c(e)]}),(function(e){return["sekunda","sekundy","sekundy","sekúnd"][c(e)]}),(function(e){return["milisekunda","milisekundy","milisekundy","milisekúnd"][c(e)]}),","),sl:o((function(e){return e%10==1?"leto":e%100==2?"leti":e%100==3||e%100==4||Math.floor(e)!==e&&e%100<=5?"leta":"let"}),(function(e){return e%10==1?"mesec":e%100==2||Math.floor(e)!==e&&e%100<=5?"meseca":e%10==3||e%10==4?"mesece":"mesecev"}),(function(e){return e%10==1?"teden":e%10==2||Math.floor(e)!==e&&e%100<=4?"tedna":e%10==3||e%10==4?"tedne":"tednov"}),(function(e){return e%100==1?"dan":"dni"}),(function(e){return e%10==1?"ura":e%100==2?"uri":e%10==3||e%10==4||Math.floor(e)!==e?"ure":"ur"}),(function(e){return e%10==1?"minuta":e%10==2?"minuti":e%10==3||e%10==4||Math.floor(e)!==e&&e%100<=4?"minute":"minut"}),(function(e){return e%10==1?"sekunda":e%100==2?"sekundi":e%100==3||e%100==4||Math.floor(e)!==e?"sekunde":"sekund"}),(function(e){return e%10==1?"milisekunda":e%100==2?"milisekundi":e%100==3||e%100==4||Math.floor(e)!==e?"milisekunde":"milisekund"}),","),sv:o("år",(function(e){return"månad"+(1===e?"":"er")}),(function(e){return"veck"+(1===e?"a":"or")}),(function(e){return"dag"+(1===e?"":"ar")}),(function(e){return"timm"+(1===e?"e":"ar")}),(function(e){return"minut"+(1===e?"":"er")}),(function(e){return"sekund"+(1===e?"":"er")}),(function(e){return"millisekund"+(1===e?"":"er")}),","),sw:e(o((function(e){return 1===e?"mwaka":"miaka"}),(function(e){return 1===e?"mwezi":"miezi"}),"wiki",(function(e){return 1===e?"siku":"masiku"}),(function(e){return 1===e?"saa":"masaa"}),"dakika","sekunde","milisekunde"),{_numberFirst:!0}),tr:o("yıl","ay","hafta","gün","saat","dakika","saniye","milisaniye",","),th:o("ปี","เดือน","สัปดาห์","วัน","ชั่วโมง","นาที","วินาที","มิลลิวินาที"),uz:o("yil","oy","hafta","kun","soat","minut","sekund","millisekund"),uz_CYR:o("йил","ой","ҳафта","кун","соат","минут","секунд","миллисекунд"),vi:o("năm","tháng","tuần","ngày","giờ","phút","giây","mili giây",","),zh_CN:o("年","个月","周","天","小时","分钟","秒","毫秒"),zh_TW:o("年","個月","周","天","小時","分鐘","秒","毫秒")};function o(e,t,n,r,i,o,a,s,u){var c={y:e,mo:t,w:n,d:r,h:i,m:o,s:a,ms:s};return void 0!==u&&(c.decimal=u),c}function a(e){return 2===e?1:e>2&&e<11?2:0}function s(e){return 1===e?0:Math.floor(e)!==e?1:e%10>=2&&e%10<=4&&!(e%100>10&&e%100<20)?2:3}function u(e){return Math.floor(e)!==e?2:e%100>=5&&e%100<=20||e%10>=5&&e%10<=9||e%10==0?0:e%10==1?1:e>1?2:0}function c(e){return 1===e?0:Math.floor(e)!==e?1:e%10>=2&&e%10<=4&&e%100<10?2:3}function l(e){return 1===e||e%10==1&&e%100>20?0:Math.floor(e)!==e||e%10>=2&&e%100>20||e%10>=2&&e%100<10?1:2}function f(e){return e%10==1&&e%100!=11}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t,n){var r,i,o,a=e.unitName,s=e.unitCount,u=n.spacer,c=n.maxDecimalPoints;r=d(n,"decimal")?n.decimal:d(t,"decimal")?t.decimal:".","digitReplacements"in n?i=n.digitReplacements:"_digitReplacements"in t&&(i=t._digitReplacements);var l=(void 0===c?s:Math.floor(s*Math.pow(10,c))/Math.pow(10,c)).toString();if(t._hideCountIf2&&2===s)o="",u="";else if(i){o="";for(var f=0;f<l.length;f++){var h=l[f];o+="."===h?r:i[h]}}else o=l.replace(".",r);var p,m=t[a];return p="function"==typeof m?m(s):m,t._numberFirst?p+u+o:o+u+p}function p(e,t){var r=function(e){var t=[e.language];if(d(e,"fallbacks")){if(!n(e.fallbacks)||!e.fallbacks.length)throw new Error("fallbacks must be an array with at least one element");t=t.concat(e.fallbacks)}for(var r=0;r<t.length;r++){var o=t[r];if(d(e.languages,o))return e.languages[o];if(d(i,o))return i[o]}throw new Error("No language found.")}(t);if(!e.length){var o=t.units;return h({unitName:o[o.length-1],unitCount:0},r,t)}var a,s=t.conjunction,u=t.serialComma;a=d(t,"delimiter")?t.delimiter:d(r,"delimiter")?r.delimiter:", ";for(var c=[],l=0;l<e.length;l++)c.push(h(e[l],r,t));return s&&1!==e.length?2===e.length?c.join(s):c.slice(0,-1).join(a)+(u?",":"")+s+c.slice(-1):c.join(a)}function m(t){var n=function(t,r){t=Math.abs(t);var i=e({},n,r||{}),o=function(e,t){var n,r,i,o,a=t.units,s=t.unitMeasures,u="largest"in t?t.largest:1/0;if(!a.length)return[];var c={};for(o=e,r=0;r<a.length;r++){var l=s[n=a[r]];i=r===a.length-1?o/l:Math.floor(o/l),c[n]=i,o-=i*l}if(t.round){var f=u;for(r=0;r<a.length;r++)if(0!==(i=c[n=a[r]])&&0==--f){for(var d=r+1;d<a.length;d++){var h=a[d],p=c[h];c[n]+=p*s[h]/s[n],c[h]=0}break}for(r=a.length-1;r>=0;r--)if(0!==(i=c[n=a[r]])){var m=Math.round(i);if(c[n]=m,0===r)break;var y=a[r-1],b=s[y],g=Math.floor(m*s[n]/b);if(!g)break;c[y]+=g,c[n]=0}}var v=[];for(r=0;r<a.length&&v.length<u;r++)(i=c[n=a[r]])&&v.push({unitName:n,unitCount:i});return v}(t,i);return p(o,i)};return e(n,{language:"en",spacer:" ",conjunction:"",serialComma:!0,units:["y","mo","w","d","h","m","s"],languages:{},round:!1,unitMeasures:{y:315576e5,mo:26298e5,w:6048e5,d:864e5,h:36e5,m:6e4,s:1e3,ms:1}},t)}var y=e(m({}),{getSupportedLanguages:function(){var e=[];for(var t in i)d(i,t)&&"gr"!==t&&e.push(t);return e},humanizer:m});void 0!==t&&t.exports?t.exports=y:this.humanizeDuration=y}()},{}],63:[function(e,t,n){var r=e("browser-split"),i=e("class-list"),o="undefined"==typeof window?e("html-element"):window,a=o.document,s=o.Text;function u(){var e=[];function t(){var t=[].slice.call(arguments),n=null;function o(t){var u,f,d;if(null==t);else if("string"==typeof t)n?n.appendChild(u=a.createTextNode(t)):(d=r(t,/([\.#]?[^\s#.]+)/),/^\.|#/.test(d[1])&&(n=a.createElement("div")),l(d,(function(e){var t=e.substring(1,e.length);e&&(n?"."===e[0]?i(n).add(t):"#"===e[0]&&n.setAttribute("id",t):n=a.createElement(e))})));else if("number"==typeof t||"boolean"==typeof t||t instanceof Date||t instanceof RegExp)n.appendChild(u=a.createTextNode(t.toString()));else if(f=t,"[object Array]"==Object.prototype.toString.call(f))l(t,o);else if(c(t))n.appendChild(u=t);else if(t instanceof s)n.appendChild(u=t);else if("object"==typeof t)for(var h in t)if("function"==typeof t[h])/^on\w+/.test(h)?function(t,r){n.addEventListener?(n.addEventListener(t.substring(2),r[t],!1),e.push((function(){n.removeEventListener(t.substring(2),r[t],!1)}))):(n.attachEvent(t,r[t]),e.push((function(){n.detachEvent(t,r[t])})))}(h,t):(n[h]=t[h](),e.push(t[h]((function(e){n[h]=e}))));else if("style"===h)if("string"==typeof t[h])n.style.cssText=t[h];else for(var p in t[h])!function(r,i){if("function"==typeof i)n.style.setProperty(r,i()),e.push(i((function(e){n.style.setProperty(r,e)})));else var o=t[h][r].match(/(.*)\W+!important\W*$/);o?n.style.setProperty(r,o[1],"important"):n.style.setProperty(r,t[h][r])}(p,t[h][p]);else if("attrs"===h)for(var m in t[h])n.setAttribute(m,t[h][m]);else"data-"===h.substr(0,5)?n.setAttribute(h,t[h]):n[h]=t[h];else if("function"==typeof t){m=t();n.appendChild(u=c(m)?m:a.createTextNode(m)),e.push(t((function(e){c(e)&&u.parentElement?(u.parentElement.replaceChild(e,u),u=e):u.textContent=e})))}return u}for(;t.length;)o(t.shift());return n}return t.cleanup=function(){for(var t=0;t<e.length;t++)e[t]();e.length=0},t}function c(e){return e&&e.nodeName&&e.nodeType}function l(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n)}(t.exports=u()).context=u},{"browser-split":17,"class-list":22,"html-element":16}],64:[function(e,t,n){
|
|
25
|
+
"use strict";const r="array",i="bit",o="bits",a="byte",s="bytes",u="",c="exponent",l="function",f="iec",d="Invalid number",h="Invalid rounding method",p="jedec",m="object",y=".",b="round",g="s",v="si",w="kbit",E="kB",_=" ",R="string",S="0",A={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function O(e,{bits:t=!1,pad:n=!1,base:O=-1,round:k=2,locale:T=u,localeOptions:x={},separator:j=u,spacer:M=_,symbols:C={},standard:D=u,output:N=R,fullform:I=!1,fullforms:L=[],exponent:P=-1,roundingMethod:B=b,precision:U=0}={}){let F=P,q=Number(e),W=[],H=0,V=u;D===v?(O=10,D=p):D===f||D===p?O=2:2===O?D=f:(O=10,D=p);const z=10===O?1e3:1024,G=!0===I,$=q<0,Y=Math[B];if("bigint"!=typeof e&&isNaN(e))throw new TypeError(d);if(typeof Y!==l)throw new TypeError(h);if($&&(q=-q),(-1===F||isNaN(F))&&(F=Math.floor(Math.log(q)/Math.log(z)),F<0&&(F=0)),F>8&&(U>0&&(U+=8-F),F=8),N===c)return F;if(0===q)W[0]=0,V=W[1]=A.symbol[D][t?o:s][F];else{H=q/(2===O?Math.pow(2,10*F):Math.pow(1e3,F)),t&&(H*=8,H>=z&&F<8&&(H/=z,F++));const e=Math.pow(10,F>0?k:0);W[0]=Y(H*e)/e,W[0]===z&&F<8&&-1===P&&(W[0]=1,F++),V=W[1]=10===O&&1===F?t?w:E:A.symbol[D][t?o:s][F]}if($&&(W[0]=-W[0]),U>0&&(W[0]=W[0].toPrecision(U)),W[1]=C[W[1]]||W[1],!0===T?W[0]=W[0].toLocaleString():T.length>0?W[0]=W[0].toLocaleString(T,x):j.length>0&&(W[0]=W[0].toString().replace(y,j)),n&&k>0){const e=W[0].toString(),t=j||(e.match(/(\D)/g)||[]).pop()||y,n=e.toString().split(t),r=n[1]||u,i=r.length,o=k-i;W[0]=`${n[0]}${t}${r.padEnd(i+o,S)}`}return G&&(W[1]=L[F]?L[F]:A.fullform[D][F]+(t?i:a)+(1===W[0]?u:g)),N===r?W:N===m?{value:W[0],symbol:W[1],exponent:F,unit:V}:W.join(M)}n.filesize=O,n.partial=function({bits:e=!1,pad:t=!1,base:n=-1,round:r=2,locale:i=u,localeOptions:o={},separator:a=u,spacer:s=_,symbols:c={},standard:l=u,output:f=R,fullform:d=!1,fullforms:h=[],exponent:p=-1,roundingMethod:m=b,precision:y=0}={}){return u=>O(u,{bits:e,pad:t,base:n,round:r,locale:i,localeOptions:o,separator:a,spacer:s,symbols:c,standard:l,output:f,fullform:d,fullforms:h,exponent:p,roundingMethod:m,precision:y})}},{}],47:[function(e,t,n){t.exports=function(e){var t=Array.prototype.slice.call(arguments,1);return t.length&&(e=e.replace(/(%?)(%([jds]))/g,(function(e,n,r,i){var o=t.shift();switch(i){case"s":o=""+o;break;case"d":o=Number(o);break;case"j":o=JSON.stringify(o)}return n?(t.unshift(o),e):o}))),t.length&&(e+=" "+t.join(" ")),""+(e=e.replace(/%{2,2}/g,"%"))}},{}],48:[function(e,t,n){"use strict";var r=Object.prototype.toString,i=Math.max,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n};t.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==r.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,a=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n}(arguments,1),s=i(0,t.length-a.length),u=[],c=0;c<s;c++)u[c]="$"+c;if(n=Function("binder","return function ("+function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n}(u,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof n){var r=t.apply(this,o(a,arguments));return Object(r)===r?r:this}return t.apply(e,o(a,arguments))})),t.prototype){var l=function(){};l.prototype=t.prototype,n.prototype=new l,l.prototype=null}return n}},{}],49:[function(e,t,n){"use strict";var r=e("./implementation");t.exports=Function.prototype.bind||r},{"./implementation":48}],50:[function(e,t,n){"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.__esModule=!0,n.default=l,n.getFieldData=f;var i={"[object HTMLCollection]":!0,"[object NodeList]":!0,"[object RadioNodeList]":!0},o={button:!0,fieldset:!0,reset:!0,submit:!0},a={checkbox:!0,radio:!0},s=/^\s+|\s+$/g,u=Array.prototype.slice,c=Object.prototype.toString;function l(e,t){if(!e)throw new Error("A form is required by getFormData, was given form="+e);t=r({includeDisabled:!1,trim:!1},t);for(var n,i={},a=[],s={},u=0,c=e.elements.length;u<c;u++){var l=e.elements[u];o[l.type]||l.disabled&&!t.includeDisabled||(n=l.name||l.id)&&!s[n]&&(a.push(n),s[n]=!0)}for(var d=0,h=a.length;d<h;d++){var p=f(e,n=a[d],t);null!=p&&(i[n]=p)}return i}function f(e,t,n){if(!e)throw new Error("A form is required by getFieldData, was given form="+e);if(!t&&"[object String]"!==c.call(t))throw new Error("A field name is required by getFieldData, was given fieldName="+t);n=r({includeDisabled:!1,trim:!1},n);var o=e.elements[t];if(!o||o.disabled&&!n.includeDisabled)return null;if(!i[c.call(o)])return d(o,n.trim);for(var a=[],s=!0,u=0,l=o.length;u<l;u++)if(!o[u].disabled||n.includeDisabled){s&&"radio"!==o[u].type&&(s=!1);var f=d(o[u],n.trim);null!=f&&(a=a.concat(f))}return s&&1===a.length?a[0]:a.length>0?a:null}function d(e,t){var n=null,r=e.type;if("select-one"===r)return e.options.length&&(n=e.options[e.selectedIndex].value),n;if("select-multiple"===r){n=[];for(var i=0,o=e.options.length;i<o;i++)e.options[i].selected&&n.push(e.options[i].value);return 0===n.length&&(n=null),n}return"file"===r&&"files"in e?(e.multiple?0===(n=u.call(e.files)).length&&(n=null):n=e.files[0],n):(a[r]?e.checked&&(n="checkbox"===r&&!e.hasAttribute("value")||e.value):n=t?e.value.replace(s,""):e.value,n)}l.getFieldData=f},{}],51:[function(e,t,n){"use strict";var r,i=e("es-errors"),o=e("es-errors/eval"),a=e("es-errors/range"),s=e("es-errors/ref"),u=e("es-errors/syntax"),c=e("es-errors/type"),l=e("es-errors/uri"),f=Function,d=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var p=function(){throw new c},m=h?function(){try{return p}catch(e){try{return h(arguments,"callee").get}catch(e){return p}}}():p,y=e("has-symbols")(),b=e("has-proto")(),g=Object.getPrototypeOf||(b?function(e){return e.__proto__}:null),v={},w="undefined"!=typeof Uint8Array&&g?g(Uint8Array):r,E={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":y&&g?g([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&g?g(g([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&y&&g?g((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&y&&g?g((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&g?g(""[Symbol.iterator]()):r,"%Symbol%":y?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":m,"%TypedArray%":w,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(g)try{null.error}catch(e){var _=g(g(e));E["%Error.prototype%"]=_}var R=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&g&&(n=g(i.prototype))}return E[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=e("function-bind"),O=e("hasown"),k=A.call(Function.call,Array.prototype.concat),T=A.call(Function.apply,Array.prototype.splice),x=A.call(Function.call,String.prototype.replace),j=A.call(Function.call,String.prototype.slice),M=A.call(Function.call,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(e,t){var n,r=e;if(O(S,r)&&(r="%"+(n=S[r])[0]+"%"),O(E,r)){var i=E[r];if(i===v&&(i=R(r)),void 0===i&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new u("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===M(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=j(e,0,1),n=j(e,-1);if("%"===t&&"%"!==n)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var r=[];return x(e,C,(function(e,t,n,i){r[r.length]=n?x(i,D,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",i=N("%"+r+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(r=l[0],T(n,k([0,1],l)));for(var f=1,d=!0;f<n.length;f+=1){var p=n[f],m=j(p,0,1),y=j(p,-1);if(('"'===m||"'"===m||"`"===m||'"'===y||"'"===y||"`"===y)&&m!==y)throw new u("property names with quotes must have matching quotes");if("constructor"!==p&&d||(s=!0),O(E,o="%"+(r+="."+p)+"%"))a=E[o];else if(null!=a){if(!(p in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&f+1>=n.length){var b=h(a,p);a=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:a[p]}else d=O(a,p),a=a[p];d&&!s&&(E[o]=a)}}return a}},{"es-errors":38,"es-errors/eval":37,"es-errors/range":39,"es-errors/ref":40,"es-errors/syntax":41,"es-errors/type":42,"es-errors/uri":43,"function-bind":49,"has-proto":57,"has-symbols":58,hasown:60}],52:[function(e,t,n){t.exports=function(){var e=[];return{broadcast:function(t){for(var n=0;n<e.length;n++)e[n](t)},listen:function(t){return e.push(t),n;function n(){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}}}}},{}],53:[function(e,t,n){var r=e("./event.js");t.exports=function(e){var t=r();return e(t.broadcast),t.listen}},{"./event.js":52}],54:[function(e,t,n){(function(e){(function(){var n;n="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=n}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],55:[function(e,t,n){"use strict";var r=e("get-intrinsic")("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}t.exports=r},{"get-intrinsic":51}],56:[function(e,t,n){"use strict";var r=e("es-define-property"),i=function(){return!!r};i.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},t.exports=i},{"es-define-property":36}],57:[function(e,t,n){"use strict";var r={__proto__:null,foo:{}},i=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!(r instanceof i)}},{}],58:[function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=e("./shams");t.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},{"./shams":59}],59:[function(e,t,n){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},{}],60:[function(e,t,n){"use strict";var r=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=e("function-bind");t.exports=o.call(r,i)},{"function-bind":49}],61:[function(e,t,n){t.exports=function(e,t){if(void 0===t)return"none"===e.style.display;e.style.display=t?"none":""}},{}],62:[function(e,t,n){!function(){var e=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])d(t,r)&&(e[r]=t[r]);return e},n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=o((function(e){return 1===e?"χρόνος":"χρόνια"}),(function(e){return 1===e?"μήνας":"μήνες"}),(function(e){return 1===e?"εβδομάδα":"εβδομάδες"}),(function(e){return 1===e?"μέρα":"μέρες"}),(function(e){return 1===e?"ώρα":"ώρες"}),(function(e){return 1===e?"λεπτό":"λεπτά"}),(function(e){return 1===e?"δευτερόλεπτο":"δευτερόλεπτα"}),(function(e){return(1===e?"χιλιοστό":"χιλιοστά")+" του δευτερολέπτου"}),","),i={af:o("jaar",(function(e){return"maand"+(1===e?"":"e")}),(function(e){return 1===e?"week":"weke"}),(function(e){return 1===e?"dag":"dae"}),(function(e){return 1===e?"uur":"ure"}),(function(e){return 1===e?"minuut":"minute"}),(function(e){return"sekonde"+(1===e?"":"s")}),(function(e){return"millisekonde"+(1===e?"":"s")}),","),am:o("ዓመት","ወር","ሳምንት","ቀን","ሰዓት","ደቂቃ","ሰከንድ","ሚሊሰከንድ"),ar:e(o((function(e){return["سنة","سنتان","سنوات"][a(e)]}),(function(e){return["شهر","شهران","أشهر"][a(e)]}),(function(e){return["أسبوع","أسبوعين","أسابيع"][a(e)]}),(function(e){return["يوم","يومين","أيام"][a(e)]}),(function(e){return["ساعة","ساعتين","ساعات"][a(e)]}),(function(e){return["دقيقة","دقيقتان","دقائق"][a(e)]}),(function(e){return["ثانية","ثانيتان","ثواني"][a(e)]}),(function(e){return["جزء من الثانية","جزآن من الثانية","أجزاء من الثانية"][a(e)]}),","),{delimiter:" ﻭ ",_hideCountIf2:!0,_digitReplacements:["۰","١","٢","٣","٤","٥","٦","٧","٨","٩"]}),bg:o((function(e){return["години","година","години"][u(e)]}),(function(e){return["месеца","месец","месеца"][u(e)]}),(function(e){return["седмици","седмица","седмици"][u(e)]}),(function(e){return["дни","ден","дни"][u(e)]}),(function(e){return["часа","час","часа"][u(e)]}),(function(e){return["минути","минута","минути"][u(e)]}),(function(e){return["секунди","секунда","секунди"][u(e)]}),(function(e){return["милисекунди","милисекунда","милисекунди"][u(e)]}),","),bn:o("বছর","মাস","সপ্তাহ","দিন","ঘন্টা","মিনিট","সেকেন্ড","মিলিসেকেন্ড"),ca:o((function(e){return"any"+(1===e?"":"s")}),(function(e){return"mes"+(1===e?"":"os")}),(function(e){return"setman"+(1===e?"a":"es")}),(function(e){return"di"+(1===e?"a":"es")}),(function(e){return"hor"+(1===e?"a":"es")}),(function(e){return"minut"+(1===e?"":"s")}),(function(e){return"segon"+(1===e?"":"s")}),(function(e){return"milisegon"+(1===e?"":"s")}),","),ckb:o("ساڵ","مانگ","هەفتە","ڕۆژ","کاژێر","خولەک","چرکە","میلی چرکە","."),cs:o((function(e){return["rok","roku","roky","let"][c(e)]}),(function(e){return["měsíc","měsíce","měsíce","měsíců"][c(e)]}),(function(e){return["týden","týdne","týdny","týdnů"][c(e)]}),(function(e){return["den","dne","dny","dní"][c(e)]}),(function(e){return["hodina","hodiny","hodiny","hodin"][c(e)]}),(function(e){return["minuta","minuty","minuty","minut"][c(e)]}),(function(e){return["sekunda","sekundy","sekundy","sekund"][c(e)]}),(function(e){return["milisekunda","milisekundy","milisekundy","milisekund"][c(e)]}),","),cy:o("flwyddyn","mis","wythnos","diwrnod","awr","munud","eiliad","milieiliad"),da:o("år",(function(e){return"måned"+(1===e?"":"er")}),(function(e){return"uge"+(1===e?"":"r")}),(function(e){return"dag"+(1===e?"":"e")}),(function(e){return"time"+(1===e?"":"r")}),(function(e){return"minut"+(1===e?"":"ter")}),(function(e){return"sekund"+(1===e?"":"er")}),(function(e){return"millisekund"+(1===e?"":"er")}),","),de:o((function(e){return"Jahr"+(1===e?"":"e")}),(function(e){return"Monat"+(1===e?"":"e")}),(function(e){return"Woche"+(1===e?"":"n")}),(function(e){return"Tag"+(1===e?"":"e")}),(function(e){return"Stunde"+(1===e?"":"n")}),(function(e){return"Minute"+(1===e?"":"n")}),(function(e){return"Sekunde"+(1===e?"":"n")}),(function(e){return"Millisekunde"+(1===e?"":"n")}),","),el:r,en:o((function(e){return"year"+(1===e?"":"s")}),(function(e){return"month"+(1===e?"":"s")}),(function(e){return"week"+(1===e?"":"s")}),(function(e){return"day"+(1===e?"":"s")}),(function(e){return"hour"+(1===e?"":"s")}),(function(e){return"minute"+(1===e?"":"s")}),(function(e){return"second"+(1===e?"":"s")}),(function(e){return"millisecond"+(1===e?"":"s")})),eo:o((function(e){return"jaro"+(1===e?"":"j")}),(function(e){return"monato"+(1===e?"":"j")}),(function(e){return"semajno"+(1===e?"":"j")}),(function(e){return"tago"+(1===e?"":"j")}),(function(e){return"horo"+(1===e?"":"j")}),(function(e){return"minuto"+(1===e?"":"j")}),(function(e){return"sekundo"+(1===e?"":"j")}),(function(e){return"milisekundo"+(1===e?"":"j")}),","),es:o((function(e){return"año"+(1===e?"":"s")}),(function(e){return"mes"+(1===e?"":"es")}),(function(e){return"semana"+(1===e?"":"s")}),(function(e){return"día"+(1===e?"":"s")}),(function(e){return"hora"+(1===e?"":"s")}),(function(e){return"minuto"+(1===e?"":"s")}),(function(e){return"segundo"+(1===e?"":"s")}),(function(e){return"milisegundo"+(1===e?"":"s")}),","),et:o((function(e){return"aasta"+(1===e?"":"t")}),(function(e){return"kuu"+(1===e?"":"d")}),(function(e){return"nädal"+(1===e?"":"at")}),(function(e){return"päev"+(1===e?"":"a")}),(function(e){return"tund"+(1===e?"":"i")}),(function(e){return"minut"+(1===e?"":"it")}),(function(e){return"sekund"+(1===e?"":"it")}),(function(e){return"millisekund"+(1===e?"":"it")}),","),eu:o("urte","hilabete","aste","egun","ordu","minutu","segundo","milisegundo",","),fa:o("سال","ماه","هفته","روز","ساعت","دقیقه","ثانیه","میلی ثانیه"),fi:o((function(e){return 1===e?"vuosi":"vuotta"}),(function(e){return 1===e?"kuukausi":"kuukautta"}),(function(e){return"viikko"+(1===e?"":"a")}),(function(e){return"päivä"+(1===e?"":"ä")}),(function(e){return"tunti"+(1===e?"":"a")}),(function(e){return"minuutti"+(1===e?"":"a")}),(function(e){return"sekunti"+(1===e?"":"a")}),(function(e){return"millisekunti"+(1===e?"":"a")}),","),fo:o("ár",(function(e){return 1===e?"mánaður":"mánaðir"}),(function(e){return 1===e?"vika":"vikur"}),(function(e){return 1===e?"dagur":"dagar"}),(function(e){return 1===e?"tími":"tímar"}),(function(e){return 1===e?"minuttur":"minuttir"}),"sekund","millisekund",","),fr:o((function(e){return"an"+(e>=2?"s":"")}),"mois",(function(e){return"semaine"+(e>=2?"s":"")}),(function(e){return"jour"+(e>=2?"s":"")}),(function(e){return"heure"+(e>=2?"s":"")}),(function(e){return"minute"+(e>=2?"s":"")}),(function(e){return"seconde"+(e>=2?"s":"")}),(function(e){return"milliseconde"+(e>=2?"s":"")}),","),gr:r,he:o((function(e){return 1===e?"שנה":"שנים"}),(function(e){return 1===e?"חודש":"חודשים"}),(function(e){return 1===e?"שבוע":"שבועות"}),(function(e){return 1===e?"יום":"ימים"}),(function(e){return 1===e?"שעה":"שעות"}),(function(e){return 1===e?"דקה":"דקות"}),(function(e){return 1===e?"שניה":"שניות"}),(function(e){return 1===e?"מילישנייה":"מילישניות"})),hr:o((function(e){return e%10==2||e%10==3||e%10==4?"godine":"godina"}),(function(e){return 1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci"}),(function(e){return e%10==1&&11!==e?"tjedan":"tjedna"}),(function(e){return 1===e?"dan":"dana"}),(function(e){return 1===e?"sat":2===e||3===e||4===e?"sata":"sati"}),(function(e){var t=e%10;return 2!==t&&3!==t&&4!==t||!(e<10||e>14)?"minuta":"minute"}),(function(e){var t=e%10;return 5===t||Math.floor(e)===e&&e>=10&&e<=19?"sekundi":1===t?"sekunda":2===t||3===t||4===t?"sekunde":"sekundi"}),(function(e){return 1===e?"milisekunda":e%10==2||e%10==3||e%10==4?"milisekunde":"milisekundi"}),","),hi:o("साल",(function(e){return 1===e?"महीना":"महीने"}),(function(e){return 1===e?"हफ़्ता":"हफ्ते"}),"दिन",(function(e){return 1===e?"घंटा":"घंटे"}),"मिनट","सेकंड","मिलीसेकंड"),hu:o("év","hónap","hét","nap","óra","perc","másodperc","ezredmásodperc",","),id:o("tahun","bulan","minggu","hari","jam","menit","detik","milidetik"),is:o("ár",(function(e){return"mánuð"+(1===e?"ur":"ir")}),(function(e){return"vik"+(1===e?"a":"ur")}),(function(e){return"dag"+(1===e?"ur":"ar")}),(function(e){return"klukkutím"+(1===e?"i":"ar")}),(function(e){return"mínút"+(1===e?"a":"ur")}),(function(e){return"sekúnd"+(1===e?"a":"ur")}),(function(e){return"millisekúnd"+(1===e?"a":"ur")})),it:o((function(e){return"ann"+(1===e?"o":"i")}),(function(e){return"mes"+(1===e?"e":"i")}),(function(e){return"settiman"+(1===e?"a":"e")}),(function(e){return"giorn"+(1===e?"o":"i")}),(function(e){return"or"+(1===e?"a":"e")}),(function(e){return"minut"+(1===e?"o":"i")}),(function(e){return"second"+(1===e?"o":"i")}),(function(e){return"millisecond"+(1===e?"o":"i")}),","),ja:o("年","ヶ月","週","日","時間","分","秒","ミリ秒"),km:o("ឆ្នាំ","ខែ","សប្តាហ៍","ថ្ងៃ","ម៉ោង","នាទី","វិនាទី","មិល្លីវិនាទី"),kn:o((function(e){return 1===e?"ವರ್ಷ":"ವರ್ಷಗಳು"}),(function(e){return 1===e?"ತಿಂಗಳು":"ತಿಂಗಳುಗಳು"}),(function(e){return 1===e?"ವಾರ":"ವಾರಗಳು"}),(function(e){return 1===e?"ದಿನ":"ದಿನಗಳು"}),(function(e){return 1===e?"ಗಂಟೆ":"ಗಂಟೆಗಳು"}),(function(e){return 1===e?"ನಿಮಿಷ":"ನಿಮಿಷಗಳು"}),(function(e){return 1===e?"ಸೆಕೆಂಡ್":"ಸೆಕೆಂಡುಗಳು"}),(function(e){return 1===e?"ಮಿಲಿಸೆಕೆಂಡ್":"ಮಿಲಿಸೆಕೆಂಡುಗಳು"})),ko:o("년","개월","주일","일","시간","분","초","밀리 초"),ku:o("sal","meh","hefte","roj","seet","deqe","saniye","mîlîçirk",","),lo:o("ປີ","ເດືອນ","ອາທິດ","ມື້","ຊົ່ວໂມງ","ນາທີ","ວິນາທີ","ມິນລິວິນາທີ",","),lt:o((function(e){return e%10==0||e%100>=10&&e%100<=20?"metų":"metai"}),(function(e){return["mėnuo","mėnesiai","mėnesių"][l(e)]}),(function(e){return["savaitė","savaitės","savaičių"][l(e)]}),(function(e){return["diena","dienos","dienų"][l(e)]}),(function(e){return["valanda","valandos","valandų"][l(e)]}),(function(e){return["minutė","minutės","minučių"][l(e)]}),(function(e){return["sekundė","sekundės","sekundžių"][l(e)]}),(function(e){return["milisekundė","milisekundės","milisekundžių"][l(e)]}),","),lv:o((function(e){return f(e)?"gads":"gadi"}),(function(e){return f(e)?"mēnesis":"mēneši"}),(function(e){return f(e)?"nedēļa":"nedēļas"}),(function(e){return f(e)?"diena":"dienas"}),(function(e){return f(e)?"stunda":"stundas"}),(function(e){return f(e)?"minūte":"minūtes"}),(function(e){return f(e)?"sekunde":"sekundes"}),(function(e){return f(e)?"milisekunde":"milisekundes"}),","),mk:o((function(e){return 1===e?"година":"години"}),(function(e){return 1===e?"месец":"месеци"}),(function(e){return 1===e?"недела":"недели"}),(function(e){return 1===e?"ден":"дена"}),(function(e){return 1===e?"час":"часа"}),(function(e){return 1===e?"минута":"минути"}),(function(e){return 1===e?"секунда":"секунди"}),(function(e){return 1===e?"милисекунда":"милисекунди"}),","),mn:o("жил","сар","долоо хоног","өдөр","цаг","минут","секунд","миллисекунд"),mr:o((function(e){return 1===e?"वर्ष":"वर्षे"}),(function(e){return 1===e?"महिना":"महिने"}),(function(e){return 1===e?"आठवडा":"आठवडे"}),"दिवस","तास",(function(e){return 1===e?"मिनिट":"मिनिटे"}),"सेकंद","मिलिसेकंद"),ms:o("tahun","bulan","minggu","hari","jam","minit","saat","milisaat"),nl:o("jaar",(function(e){return 1===e?"maand":"maanden"}),(function(e){return 1===e?"week":"weken"}),(function(e){return 1===e?"dag":"dagen"}),"uur",(function(e){return 1===e?"minuut":"minuten"}),(function(e){return 1===e?"seconde":"seconden"}),(function(e){return 1===e?"milliseconde":"milliseconden"}),","),no:o("år",(function(e){return"måned"+(1===e?"":"er")}),(function(e){return"uke"+(1===e?"":"r")}),(function(e){return"dag"+(1===e?"":"er")}),(function(e){return"time"+(1===e?"":"r")}),(function(e){return"minutt"+(1===e?"":"er")}),(function(e){return"sekund"+(1===e?"":"er")}),(function(e){return"millisekund"+(1===e?"":"er")}),","),pl:o((function(e){return["rok","roku","lata","lat"][s(e)]}),(function(e){return["miesiąc","miesiąca","miesiące","miesięcy"][s(e)]}),(function(e){return["tydzień","tygodnia","tygodnie","tygodni"][s(e)]}),(function(e){return["dzień","dnia","dni","dni"][s(e)]}),(function(e){return["godzina","godziny","godziny","godzin"][s(e)]}),(function(e){return["minuta","minuty","minuty","minut"][s(e)]}),(function(e){return["sekunda","sekundy","sekundy","sekund"][s(e)]}),(function(e){return["milisekunda","milisekundy","milisekundy","milisekund"][s(e)]}),","),pt:o((function(e){return"ano"+(1===e?"":"s")}),(function(e){return 1===e?"mês":"meses"}),(function(e){return"semana"+(1===e?"":"s")}),(function(e){return"dia"+(1===e?"":"s")}),(function(e){return"hora"+(1===e?"":"s")}),(function(e){return"minuto"+(1===e?"":"s")}),(function(e){return"segundo"+(1===e?"":"s")}),(function(e){return"milissegundo"+(1===e?"":"s")}),","),ro:o((function(e){return 1===e?"an":"ani"}),(function(e){return 1===e?"lună":"luni"}),(function(e){return 1===e?"săptămână":"săptămâni"}),(function(e){return 1===e?"zi":"zile"}),(function(e){return 1===e?"oră":"ore"}),(function(e){return 1===e?"minut":"minute"}),(function(e){return 1===e?"secundă":"secunde"}),(function(e){return 1===e?"milisecundă":"milisecunde"}),","),ru:o((function(e){return["лет","год","года"][u(e)]}),(function(e){return["месяцев","месяц","месяца"][u(e)]}),(function(e){return["недель","неделя","недели"][u(e)]}),(function(e){return["дней","день","дня"][u(e)]}),(function(e){return["часов","час","часа"][u(e)]}),(function(e){return["минут","минута","минуты"][u(e)]}),(function(e){return["секунд","секунда","секунды"][u(e)]}),(function(e){return["миллисекунд","миллисекунда","миллисекунды"][u(e)]}),","),sq:o((function(e){return 1===e?"vit":"vjet"}),"muaj","javë","ditë","orë",(function(e){return"minut"+(1===e?"ë":"a")}),(function(e){return"sekond"+(1===e?"ë":"a")}),(function(e){return"milisekond"+(1===e?"ë":"a")}),","),sr:o((function(e){return["години","година","године"][u(e)]}),(function(e){return["месеци","месец","месеца"][u(e)]}),(function(e){return["недељи","недеља","недеље"][u(e)]}),(function(e){return["дани","дан","дана"][u(e)]}),(function(e){return["сати","сат","сата"][u(e)]}),(function(e){return["минута","минут","минута"][u(e)]}),(function(e){return["секунди","секунда","секунде"][u(e)]}),(function(e){return["милисекунди","милисекунда","милисекунде"][u(e)]}),","),ta:o((function(e){return 1===e?"வருடம்":"ஆண்டுகள்"}),(function(e){return 1===e?"மாதம்":"மாதங்கள்"}),(function(e){return 1===e?"வாரம்":"வாரங்கள்"}),(function(e){return 1===e?"நாள்":"நாட்கள்"}),(function(e){return 1===e?"மணி":"மணிநேரம்"}),(function(e){return"நிமிட"+(1===e?"ம்":"ங்கள்")}),(function(e){return"வினாடி"+(1===e?"":"கள்")}),(function(e){return"மில்லி விநாடி"+(1===e?"":"கள்")})),te:o((function(e){return"సంవత్స"+(1===e?"రం":"రాల")}),(function(e){return"నెల"+(1===e?"":"ల")}),(function(e){return 1===e?"వారం":"వారాలు"}),(function(e){return"రోజు"+(1===e?"":"లు")}),(function(e){return"గంట"+(1===e?"":"లు")}),(function(e){return 1===e?"నిమిషం":"నిమిషాలు"}),(function(e){return 1===e?"సెకను":"సెకన్లు"}),(function(e){return 1===e?"మిల్లీసెకన్":"మిల్లీసెకన్లు"})),uk:o((function(e){return["років","рік","роки"][u(e)]}),(function(e){return["місяців","місяць","місяці"][u(e)]}),(function(e){return["тижнів","тиждень","тижні"][u(e)]}),(function(e){return["днів","день","дні"][u(e)]}),(function(e){return["годин","година","години"][u(e)]}),(function(e){return["хвилин","хвилина","хвилини"][u(e)]}),(function(e){return["секунд","секунда","секунди"][u(e)]}),(function(e){return["мілісекунд","мілісекунда","мілісекунди"][u(e)]}),","),ur:o("سال",(function(e){return 1===e?"مہینہ":"مہینے"}),(function(e){return 1===e?"ہفتہ":"ہفتے"}),"دن",(function(e){return 1===e?"گھنٹہ":"گھنٹے"}),"منٹ","سیکنڈ","ملی سیکنڈ"),sk:o((function(e){return["rok","roky","roky","rokov"][c(e)]}),(function(e){return["mesiac","mesiace","mesiace","mesiacov"][c(e)]}),(function(e){return["týždeň","týždne","týždne","týždňov"][c(e)]}),(function(e){return["deň","dni","dni","dní"][c(e)]}),(function(e){return["hodina","hodiny","hodiny","hodín"][c(e)]}),(function(e){return["minúta","minúty","minúty","minút"][c(e)]}),(function(e){return["sekunda","sekundy","sekundy","sekúnd"][c(e)]}),(function(e){return["milisekunda","milisekundy","milisekundy","milisekúnd"][c(e)]}),","),sl:o((function(e){return e%10==1?"leto":e%100==2?"leti":e%100==3||e%100==4||Math.floor(e)!==e&&e%100<=5?"leta":"let"}),(function(e){return e%10==1?"mesec":e%100==2||Math.floor(e)!==e&&e%100<=5?"meseca":e%10==3||e%10==4?"mesece":"mesecev"}),(function(e){return e%10==1?"teden":e%10==2||Math.floor(e)!==e&&e%100<=4?"tedna":e%10==3||e%10==4?"tedne":"tednov"}),(function(e){return e%100==1?"dan":"dni"}),(function(e){return e%10==1?"ura":e%100==2?"uri":e%10==3||e%10==4||Math.floor(e)!==e?"ure":"ur"}),(function(e){return e%10==1?"minuta":e%10==2?"minuti":e%10==3||e%10==4||Math.floor(e)!==e&&e%100<=4?"minute":"minut"}),(function(e){return e%10==1?"sekunda":e%100==2?"sekundi":e%100==3||e%100==4||Math.floor(e)!==e?"sekunde":"sekund"}),(function(e){return e%10==1?"milisekunda":e%100==2?"milisekundi":e%100==3||e%100==4||Math.floor(e)!==e?"milisekunde":"milisekund"}),","),sv:o("år",(function(e){return"månad"+(1===e?"":"er")}),(function(e){return"veck"+(1===e?"a":"or")}),(function(e){return"dag"+(1===e?"":"ar")}),(function(e){return"timm"+(1===e?"e":"ar")}),(function(e){return"minut"+(1===e?"":"er")}),(function(e){return"sekund"+(1===e?"":"er")}),(function(e){return"millisekund"+(1===e?"":"er")}),","),sw:e(o((function(e){return 1===e?"mwaka":"miaka"}),(function(e){return 1===e?"mwezi":"miezi"}),"wiki",(function(e){return 1===e?"siku":"masiku"}),(function(e){return 1===e?"saa":"masaa"}),"dakika","sekunde","milisekunde"),{_numberFirst:!0}),tr:o("yıl","ay","hafta","gün","saat","dakika","saniye","milisaniye",","),th:o("ปี","เดือน","สัปดาห์","วัน","ชั่วโมง","นาที","วินาที","มิลลิวินาที"),uz:o("yil","oy","hafta","kun","soat","minut","sekund","millisekund"),uz_CYR:o("йил","ой","ҳафта","кун","соат","минут","секунд","миллисекунд"),vi:o("năm","tháng","tuần","ngày","giờ","phút","giây","mili giây",","),zh_CN:o("年","个月","周","天","小时","分钟","秒","毫秒"),zh_TW:o("年","個月","周","天","小時","分鐘","秒","毫秒")};function o(e,t,n,r,i,o,a,s,u){var c={y:e,mo:t,w:n,d:r,h:i,m:o,s:a,ms:s};return void 0!==u&&(c.decimal=u),c}function a(e){return 2===e?1:e>2&&e<11?2:0}function s(e){return 1===e?0:Math.floor(e)!==e?1:e%10>=2&&e%10<=4&&!(e%100>10&&e%100<20)?2:3}function u(e){return Math.floor(e)!==e?2:e%100>=5&&e%100<=20||e%10>=5&&e%10<=9||e%10==0?0:e%10==1?1:e>1?2:0}function c(e){return 1===e?0:Math.floor(e)!==e?1:e%10>=2&&e%10<=4&&e%100<10?2:3}function l(e){return 1===e||e%10==1&&e%100>20?0:Math.floor(e)!==e||e%10>=2&&e%100>20||e%10>=2&&e%100<10?1:2}function f(e){return e%10==1&&e%100!=11}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t,n){var r,i,o,a=e.unitName,s=e.unitCount,u=n.spacer,c=n.maxDecimalPoints;r=d(n,"decimal")?n.decimal:d(t,"decimal")?t.decimal:".","digitReplacements"in n?i=n.digitReplacements:"_digitReplacements"in t&&(i=t._digitReplacements);var l=(void 0===c?s:Math.floor(s*Math.pow(10,c))/Math.pow(10,c)).toString();if(t._hideCountIf2&&2===s)o="",u="";else if(i){o="";for(var f=0;f<l.length;f++){var h=l[f];o+="."===h?r:i[h]}}else o=l.replace(".",r);var p,m=t[a];return p="function"==typeof m?m(s):m,t._numberFirst?p+u+o:o+u+p}function p(e,t){var r=function(e){var t=[e.language];if(d(e,"fallbacks")){if(!n(e.fallbacks)||!e.fallbacks.length)throw new Error("fallbacks must be an array with at least one element");t=t.concat(e.fallbacks)}for(var r=0;r<t.length;r++){var o=t[r];if(d(e.languages,o))return e.languages[o];if(d(i,o))return i[o]}throw new Error("No language found.")}(t);if(!e.length){var o=t.units;return h({unitName:o[o.length-1],unitCount:0},r,t)}var a,s=t.conjunction,u=t.serialComma;a=d(t,"delimiter")?t.delimiter:d(r,"delimiter")?r.delimiter:", ";for(var c=[],l=0;l<e.length;l++)c.push(h(e[l],r,t));return s&&1!==e.length?2===e.length?c.join(s):c.slice(0,-1).join(a)+(u?",":"")+s+c.slice(-1):c.join(a)}function m(t){var n=function(t,r){t=Math.abs(t);var i=e({},n,r||{}),o=function(e,t){var n,r,i,o,a=t.units,s=t.unitMeasures,u="largest"in t?t.largest:1/0;if(!a.length)return[];var c={};for(o=e,r=0;r<a.length;r++){var l=s[n=a[r]];i=r===a.length-1?o/l:Math.floor(o/l),c[n]=i,o-=i*l}if(t.round){var f=u;for(r=0;r<a.length;r++)if(0!==(i=c[n=a[r]])&&0==--f){for(var d=r+1;d<a.length;d++){var h=a[d],p=c[h];c[n]+=p*s[h]/s[n],c[h]=0}break}for(r=a.length-1;r>=0;r--)if(0!==(i=c[n=a[r]])){var m=Math.round(i);if(c[n]=m,0===r)break;var y=a[r-1],b=s[y],g=Math.floor(m*s[n]/b);if(!g)break;c[y]+=g,c[n]=0}}var v=[];for(r=0;r<a.length&&v.length<u;r++)(i=c[n=a[r]])&&v.push({unitName:n,unitCount:i});return v}(t,i);return p(o,i)};return e(n,{language:"en",spacer:" ",conjunction:"",serialComma:!0,units:["y","mo","w","d","h","m","s"],languages:{},round:!1,unitMeasures:{y:315576e5,mo:26298e5,w:6048e5,d:864e5,h:36e5,m:6e4,s:1e3,ms:1}},t)}var y=e(m({}),{getSupportedLanguages:function(){var e=[];for(var t in i)d(i,t)&&"gr"!==t&&e.push(t);return e},humanizer:m});void 0!==t&&t.exports?t.exports=y:this.humanizeDuration=y}()},{}],63:[function(e,t,n){var r=e("browser-split"),i=e("class-list"),o="undefined"==typeof window?e("html-element"):window,a=o.document,s=o.Text;function u(){var e=[];function t(){var t=[].slice.call(arguments),n=null;function o(t){var u,f,d;if(null==t);else if("string"==typeof t)n?n.appendChild(u=a.createTextNode(t)):(d=r(t,/([\.#]?[^\s#.]+)/),/^\.|#/.test(d[1])&&(n=a.createElement("div")),l(d,(function(e){var t=e.substring(1,e.length);e&&(n?"."===e[0]?i(n).add(t):"#"===e[0]&&n.setAttribute("id",t):n=a.createElement(e))})));else if("number"==typeof t||"boolean"==typeof t||t instanceof Date||t instanceof RegExp)n.appendChild(u=a.createTextNode(t.toString()));else if(f=t,"[object Array]"==Object.prototype.toString.call(f))l(t,o);else if(c(t))n.appendChild(u=t);else if(t instanceof s)n.appendChild(u=t);else if("object"==typeof t)for(var h in t)if("function"==typeof t[h])/^on\w+/.test(h)?function(t,r){n.addEventListener?(n.addEventListener(t.substring(2),r[t],!1),e.push((function(){n.removeEventListener(t.substring(2),r[t],!1)}))):(n.attachEvent(t,r[t]),e.push((function(){n.detachEvent(t,r[t])})))}(h,t):(n[h]=t[h](),e.push(t[h]((function(e){n[h]=e}))));else if("style"===h)if("string"==typeof t[h])n.style.cssText=t[h];else for(var p in t[h])!function(r,i){if("function"==typeof i)n.style.setProperty(r,i()),e.push(i((function(e){n.style.setProperty(r,e)})));else var o=t[h][r].match(/(.*)\W+!important\W*$/);o?n.style.setProperty(r,o[1],"important"):n.style.setProperty(r,t[h][r])}(p,t[h][p]);else if("attrs"===h)for(var m in t[h])n.setAttribute(m,t[h][m]);else"data-"===h.substr(0,5)?n.setAttribute(h,t[h]):n[h]=t[h];else if("function"==typeof t){m=t();n.appendChild(u=c(m)?m:a.createTextNode(m)),e.push(t((function(e){c(e)&&u.parentElement?(u.parentElement.replaceChild(e,u),u=e):u.textContent=e})))}return u}for(;t.length;)o(t.shift());return n}return t.cleanup=function(){for(var t=0;t<e.length;t++)e[t]();e.length=0},t}function c(e){return e&&e.nodeName&&e.nodeType}function l(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n)}(t.exports=u()).context=u},{"browser-split":17,"class-list":22,"html-element":16}],64:[function(e,t,n){
|
|
26
26
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
27
27
|
n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+h]=255&a,h+=p,a/=256,c-=8);e[n+h-p]|=128*m}},{}],65:[function(e,t,n){var r=[].indexOf;t.exports=function(e,t){if(r)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}},{}],66:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],67:[function(e,t,n){var r=[],i=[];function o(e,t){if(t=t||{},void 0===e)throw new Error("insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).");var n,o=!0===t.prepend?"prepend":"append",a=void 0!==t.container?t.container:document.querySelector("head"),s=r.indexOf(a);return-1===s&&(s=r.push(a)-1,i[s]={}),void 0!==i[s]&&void 0!==i[s][o]?n=i[s][o]:(n=i[s][o]=function(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}(),"prepend"===o?a.insertBefore(n,a.childNodes[0]):a.appendChild(n)),65279===e.charCodeAt(0)&&(e=e.substr(1,e.length)),n.styleSheet?n.styleSheet.cssText+=e:n.textContent+=e,n}t.exports=o,t.exports.insertCss=o},{}],68:[function(e,t,n){
|
|
28
28
|
/*! npm.im/intervalometer */
|
|
@@ -47,5 +47,5 @@ function f(){var e,t,n,r,i,o=window.webkitRequestAnimationFrame,a=window.request
|
|
|
47
47
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
48
48
|
var r=e("buffer"),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,n),n.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:18}],99:[function(e,t,n){var r=Object.prototype.hasOwnProperty;function i(e){return"[Throws: "+(e?e.message:"?")+"]"}function o(e){var t=[];return function e(n){if(null===n||"object"!=typeof n)return n;if(-1!==t.indexOf(n))return"[Circular]";if(t.push(n),"function"==typeof n.toJSON)try{var o=e(n.toJSON());return t.pop(),o}catch(e){return i(e)}if(Array.isArray(n)){var a=n.map(e);return t.pop(),a}var s=Object.keys(n).reduce((function(t,o){return t[o]=e(function(e,t){if(r.call(e,t))try{return e[t]}catch(e){return i(e)}return e[t]}(n,o)),t}),{});return t.pop(),s}(e)}t.exports=function(e,t,n){return JSON.stringify(o(e),t,n)},t.exports.ensureProperties=o},{}],100:[function(e,t,n){"use strict";var r=e("get-intrinsic"),i=e("define-data-property"),o=e("has-property-descriptors")(),a=e("gopd"),s=e("es-errors/type"),u=r("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(r=!1),l&&!l.writable&&(c=!1)}return(r||c||!n)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},{"define-data-property":29,"es-errors/type":42,"get-intrinsic":51,gopd:55,"has-property-descriptors":56}],101:[function(e,t,n){"use strict";var r=e("get-intrinsic"),i=e("call-bind/callBound"),o=e("object-inspect"),a=e("es-errors/type"),s=r("%WeakMap%",!0),u=r("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),f=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),h=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};t.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+o(e))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return c(e,r)}else if(u){if(t)return d(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return f(e,r)}else if(u){if(t)return p(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,i){s&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new s),l(e,r,i)):u?(t||(t=new u),h(t,r,i)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,i))}};return r}},{"call-bind/callBound":19,"es-errors/type":42,"get-intrinsic":51,"object-inspect":75}],102:[function(e,t,n){t.exports=function(e){var t=e._readableState;return t?t.objectMode||"number"==typeof e._duplexState?e.read():e.read(function(e){if(e.buffer.length){var t=e.bufferIndex||0;if(e.buffer.head)return e.buffer.head.data.length;if(e.buffer.length-t>0&&e.buffer[t])return e.buffer[t].length}return e.length}(t)):null}},{}],103:[function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(){this._defaults=[]}for(var a=0,s=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];a<s.length;a++){const e=s[a];o.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._defaults.push({fn:e,args:n}),this}}o.prototype._setDefaults=function(e){var t,n=r(this._defaults);try{for(n.s();!(t=n.n()).done;){const n=t.value;e[n.fn](...n.args)}}catch(e){n.e(e)}finally{n.f()}},t.exports=o},{}],104:[function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}let o;"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;const a=e("component-emitter"),s=e("fast-safe-stringify"),u=e("qs"),c=e("./request-base"),l=e("./utils"),f=l.isObject,d=l.mixin,h=l.hasOwn,p=e("./response-base"),m=e("./agent-base");function y(){}t.exports=function(e,t){return"function"==typeof t?new n.Request("GET",e).end(t):1===arguments.length?new n.Request("GET",e):new n.Request(e,t)};const b=n=t.exports;n.Request=S,b.getXHR=()=>{if(o.XMLHttpRequest)return new o.XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};const g="".trim?e=>e.trim():e=>e.replace(/(^\s*|\s*$)/g,"");function v(e){if(!f(e))return e;const t=[];for(const n in e)h(e,n)&&w(t,n,e[n]);return t.join("&")}function w(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n)){var i,o=r(n);try{for(o.s();!(i=o.n()).done;){w(e,t,i.value)}}catch(e){o.e(e)}finally{o.f()}}else if(f(n))for(const r in n)h(n,r)&&w(e,`${t}[${r}]`,n[r]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function E(e){const t={},n=e.split("&");let r,i;for(let e=0,o=n.length;e<o;++e)r=n[e],i=r.indexOf("="),-1===i?t[decodeURIComponent(r)]="":t[decodeURIComponent(r.slice(0,i))]=decodeURIComponent(r.slice(i+1));return t}function _(e){return/[/+]json($|[^-\w])/i.test(e)}function R(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;let t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){const t=e.split(/\r?\n/),n={};let r,i,o,a;for(let e=0,s=t.length;e<s;++e)i=t[e],r=i.indexOf(":"),-1!==r&&(o=i.slice(0,r).toLowerCase(),a=g(i.slice(r+1)),n[o]=a);return n}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function S(e,t){const n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(()=>{let e,t=null,r=null;try{r=new R(n)}catch(e){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=e.status||r.status,n.callback(e,r)):n.callback(null,r)}))}b.serializeObject=v,b.parseString=E,b.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},b.serialize={"application/x-www-form-urlencoded":u.stringify,"application/json":s},b.parse={"application/x-www-form-urlencoded":E,"application/json":JSON.parse},d(R.prototype,p.prototype),R.prototype._parseBody=function(e){let t=b.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&_(this.type)&&(t=b.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},R.prototype.toError=function(){const e=this.req,t=e.method,n=e.url,r=`cannot ${t} ${n} (${this.status})`,i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},b.Response=R,a(S.prototype),d(S.prototype,c.prototype),S.prototype.type=function(e){return this.set("Content-Type",b.types[e]||e),this},S.prototype.accept=function(e){return this.set("Accept",b.types[e]||e),this},S.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});const r=n.encoder?n.encoder:e=>{if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,r)},S.prototype.query=function(e){return"string"!=typeof e&&(e=v(e)),e&&this._query.push(e),this},S.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},S.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},S.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();const n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},S.prototype.crossDomainError=function(){const e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},S.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},S.prototype.ca=S.prototype.agent,S.prototype.buffer=S.prototype.ca,S.prototype.write=()=>{throw new Error("Streaming is not supported in browser version of superagent")},S.prototype.pipe=S.prototype.write,S.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},S.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||y,this._finalizeQueryString(),this._end()},S.prototype._setUploadTimeout=function(){const e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((()=>{e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},S.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));const e=this;this.xhr=b.getXHR();const t=this.xhr;let n=this._formData||this._data;this._setTimeouts(),t.addEventListener("readystatechange",(()=>{const n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4!==n)return;let r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}));const r=(t,n)=>{n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){const e=this._header["content-type"];let t=this._serializer||b.serialize[e?e.split(";")[0]:""];!t&&_(e)&&(t=b.serialize["application/json"]),t&&(n=t(n))}for(const e in this.header)null!==this.header[e]&&h(this.header,e)&&t.setRequestHeader(e,this.header[e]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},b.agent=()=>new m;for(var A=0,O=["GET","POST","OPTIONS","PATCH","PUT","DELETE"];A<O.length;A++){const e=O[A];m.prototype[e.toLowerCase()]=function(t,n){const r=new b.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}}function k(e,t,n){const r=b("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}m.prototype.del=m.prototype.delete,b.get=(e,t,n)=>{const r=b("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.head=(e,t,n)=>{const r=b("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.options=(e,t,n)=>{const r=b("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.del=k,b.delete=k,b.patch=(e,t,n)=>{const r=b("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.post=(e,t,n)=>{const r=b("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.put=(e,t,n)=>{const r=b("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},{"./agent-base":103,"./request-base":105,"./response-base":106,"./utils":107,"component-emitter":24,"fast-safe-stringify":45,qs:81}],105:[function(e,t,n){(function(n){(function(){"use strict";const r=e("semver"),i=e("./utils"),o=i.isObject,a=i.hasOwn;function s(){}t.exports=s,s.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},s.prototype.parse=function(e){return this._parser=e,this},s.prototype.responseType=function(e){return this._responseType=e,this},s.prototype.serialize=function(e){return this._serializer=e,this},s.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(const t in e)if(a(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},s.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};const u=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),c=new Set([408,413,429,500,502,503,504,521,522,524]);s.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{const n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&c.has(t.status))return!0;if(e){if(e.code&&u.has(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},s.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},s.prototype.then=function(e,t){if(!this._fullfilledPromise){const e=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(((t,n)=>{e.on("abort",(()=>{if(this._maxRetries&&this._maxRetries>this._retries)return;if(this.timedout&&this.timedoutError)return void n(this.timedoutError);const e=new Error("Aborted");e.code="ABORTED",e.status=this.status,e.method=this.method,e.url=this.url,n(e)})),e.end(((e,r)=>{e?n(e):t(r)}))}))}return this._fullfilledPromise.then(e,t)},s.prototype.catch=function(e){return this.then(void 0,e)},s.prototype.use=function(e){return e(this),this},s.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},s.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},s.prototype.get=function(e){return this._header[e.toLowerCase()]},s.prototype.getHeader=s.prototype.get,s.prototype.set=function(e,t){if(o(e)){for(const t in e)a(e,t)&&this.set(t,e[t]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},s.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},s.prototype.field=function(e,t,n){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(e)){for(const t in e)a(e,t)&&this.field(t,e[t]);return this}if(Array.isArray(t)){for(const n in t)a(t,n)&&this.field(e,t[n]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),n?this._getFormData().append(e,t,n):this._getFormData().append(e,t),this},s.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(r.gte(n.version,"v13.0.0")&&r.lt(n.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");this.req.abort()}return this.clearTimeout(),this.emit("abort"),this},s.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization",`Basic ${r(`${e}:${t}`)}`);break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization",`Bearer ${e}`)}return this},s.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},s.prototype.redirects=function(e){return this._maxRedirects=e,this},s.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},s.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},s.prototype.send=function(e){const t=o(e);let n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&o(this._data))for(const t in e){if("bigint"==typeof e[t]&&!e[t].toJSON)throw new Error("Cannot serialize BigInt value to json");a(e,t)&&(this._data[t]=e[t])}else{if("bigint"==typeof e)throw new Error("Cannot send value of type BigInt");"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],n&&(n=n.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===n?this._data?`${this._data}&${e}`:e:(this._data||"")+e):this._data=e}return!t||this._isHost(e)||n||this.type("json"),this},s.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},s.prototype._finalizeQueryString=function(){const e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){const e=this.url.indexOf("?");if(e>=0){const t=this.url.slice(e+1).split("&");"function"==typeof this._sort?t.sort(this._sort):t.sort(),this.url=this.url.slice(0,e)+"?"+t.join("&")}}},s.prototype._appendQueryString=()=>{console.warn("Unsupported")},s.prototype._timeoutError=function(e,t,n){if(this._aborted)return;const r=new Error(`${e+t}ms exceeded`);r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)},s.prototype._setTimeouts=function(){const e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((()=>{e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((()=>{e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}}).call(this)}).call(this,e("_process"))},{"./utils":107,_process:79,semver:16}],106:[function(e,t,n){"use strict";const r=e("./utils");function i(){}t.exports=i,i.prototype.get=function(e){return this.header[e.toLowerCase()]},i.prototype._setHeaderProperties=function(e){const t=e["content-type"]||"";this.type=r.type(t);const n=r.params(t);for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(this[e]=n[e]);this.links={};try{e.link&&(this.links=r.parseLinks(e.link))}catch(e){}},i.prototype._setStatusProperties=function(e){const t=Math.trunc(e/100);this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e}},{"./utils":107}],107:[function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.type=e=>e.split(/ *; */).shift(),n.params=e=>{const t={};var n,i=r(e.split(/ *; */));try{for(i.s();!(n=i.n()).done;){const e=n.value.split(/ *= */),r=e.shift(),i=e.shift();r&&i&&(t[r]=i)}}catch(e){i.e(e)}finally{i.f()}return t},n.parseLinks=e=>{const t={};var n,i=r(e.split(/ *, */));try{for(i.s();!(n=i.n()).done;){const e=n.value.split(/ *; */),r=e[0].slice(1,-1);t[e[1].split(/ *= */)[1].slice(1,-1)]=r}}catch(e){i.e(e)}finally{i.f()}return t},n.cleanHeader=(e,t)=>(delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e),n.isObject=e=>null!==e&&"object"==typeof e,n.hasOwn=Object.hasOwn||function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(e),t)},n.mixin=(e,t)=>{for(const r in t)n.hasOwn(t,r)&&(e[r]=t[r])}},{}],108:[function(e,t,n){(function(t,r){(function(){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},u=0;function c(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=u++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete s[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":79,timers:108}],109:[function(e,t,n){(function(e){(function(){
|
|
49
49
|
/*! typedarray-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
50
|
-
t.exports=function(t){return ArrayBuffer.isView(t)?e.from(t.buffer,t.byteOffset,t.byteLength):e.from(t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:18}],110:[function(e,t,n){!function(e,r){"use strict";var i="function",o="undefined",a="object",s="string",u="major",c="model",l="name",f="type",d="vendor",h="version",p="architecture",m="console",y="mobile",b="tablet",g="smarttv",v="wearable",w="embedded",E="Amazon",_="Apple",R="ASUS",S="BlackBerry",A="Browser",O="Chrome",k="Firefox",T="Google",x="Huawei",j="LG",M="Microsoft",C="Motorola",D="Opera",N="Samsung",I="Sharp",L="Sony",P="Xiaomi",B="Zebra",U="Facebook",F="Chromium OS",q="Mac OS",W=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},H=function(e,t){return typeof e===s&&-1!==V(t).indexOf(V(e))},V=function(e){return e.toLowerCase()},z=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},G=function(e,t){for(var n,o,s,u,c,l,f=0;f<t.length&&!c;){var d=t[f],h=t[f+1];for(n=o=0;n<d.length&&!c&&d[n];)if(c=d[n++].exec(e))for(s=0;s<h.length;s++)l=c[++o],typeof(u=h[s])===a&&u.length>0?2===u.length?typeof u[1]==i?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==i||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):r:this[u[0]]=l?u[1].call(this,l,u[2]):r:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):r):this[u]=l||r;f+=2}},$=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(H(t[n][i],e))return"?"===n?r:n}else if(H(t[n],e))return"?"===n?r:n;return e},Y={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"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,h],[/opios[\/ ]+([\w\.]+)/i],[h,[l,D+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[l,D+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[l,D]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[l,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,h],[/\bddg\/([\w\.]+)/i],[h,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[l,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[l,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+A],h],[/\bfocus\/([\w\.]+)/i],[h,[l,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[l,D+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[l,D+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[l,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[h,[l,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+A]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+A],h],[/samsungbrowser\/([\w\.]+)/i],[h,[l,N+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],h],[/metasr[\/ ]?([\d\.]+)/i],[h,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,h],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,U],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[l,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,O+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[l,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[h,$,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[l,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[l,h],[/(cobalt)\/([\w\.]+)/i],[l,[h,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,V]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[d,N],[f,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[d,N],[f,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[d,_],[f,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[d,_],[f,b]],[/(macintosh);/i],[c,[d,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[d,I],[f,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[d,x],[f,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[d,x],[f,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[d,P],[f,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[d,P],[f,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[d,"OPPO"],[f,y]],[/\b(opd2\d{3}a?) bui/i],[c,[d,"OPPO"],[f,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[d,"Vivo"],[f,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[d,"Realme"],[f,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[d,C],[f,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[d,C],[f,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[d,j],[f,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[d,j],[f,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[d,"Lenovo"],[f,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[d,"Nokia"],[f,y]],[/(pixel c)\b/i],[c,[d,T],[f,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[d,T],[f,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[d,L],[f,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[d,L],[f,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[d,"OnePlus"],[f,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[d,E],[f,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[d,E],[f,y]],[/(playbook);[-\w\),; ]+(rim)/i],[c,d,[f,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[d,S],[f,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[d,R],[f,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[d,R],[f,y]],[/(nexus 9)/i],[c,[d,"HTC"],[f,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[c,/_/g," "],[f,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[d,"Acer"],[f,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[d,"Meizu"],[f,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[d,"Ulefone"],[f,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,c,[f,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,c,[f,b]],[/(surface duo)/i],[c,[d,M],[f,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[d,"Fairphone"],[f,y]],[/(u304aa)/i],[c,[d,"AT&T"],[f,y]],[/\bsie-(\w*)/i],[c,[d,"Siemens"],[f,y]],[/\b(rct\w+) b/i],[c,[d,"RCA"],[f,b]],[/\b(venue[\d ]{2,7}) b/i],[c,[d,"Dell"],[f,b]],[/\b(q(?:mv|ta)\w+) b/i],[c,[d,"Verizon"],[f,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[d,"Barnes & Noble"],[f,b]],[/\b(tm\d{3}\w+) b/i],[c,[d,"NuVision"],[f,b]],[/\b(k88) b/i],[c,[d,"ZTE"],[f,b]],[/\b(nx\d{3}j) b/i],[c,[d,"ZTE"],[f,y]],[/\b(gen\d{3}) b.+49h/i],[c,[d,"Swiss"],[f,y]],[/\b(zur\d{3}) b/i],[c,[d,"Swiss"],[f,b]],[/\b((zeki)?tb.*\b) b/i],[c,[d,"Zeki"],[f,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],c,[f,b]],[/\b(ns-?\w{0,9}) b/i],[c,[d,"Insignia"],[f,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[d,"NextBook"],[f,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],c,[f,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],c,[f,y]],[/\b(ph-1) /i],[c,[d,"Essential"],[f,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[d,"Envizen"],[f,b]],[/\b(trio[-\w\. ]+) b/i],[c,[d,"MachSpeed"],[f,b]],[/\btu_(1491) b/i],[c,[d,"Rotor"],[f,b]],[/(shield[\w ]+) b/i],[c,[d,"Nvidia"],[f,b]],[/(sprint) (\w+)/i],[d,c,[f,y]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[d,M],[f,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[d,B],[f,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[d,B],[f,y]],[/smart-tv.+(samsung)/i],[d,[f,g]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[d,N],[f,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,j],[f,g]],[/(apple) ?tv/i],[d,[c,_+" TV"],[f,g]],[/crkey/i],[[c,O+"cast"],[d,T],[f,g]],[/droid.+aft(\w+)( bui|\))/i],[c,[d,E],[f,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[d,I],[f,g]],[/(bravia[\w ]+)( bui|\))/i],[c,[d,L],[f,g]],[/(mitv-\w{5}) bui/i],[c,[d,P],[f,g]],[/Hbbtv.*(technisat) (.*);/i],[d,c,[f,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d,z],[c,z],[f,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,c,[f,m]],[/droid.+; (shield) bui/i],[c,[d,"Nvidia"],[f,m]],[/(playstation [345portablevi]+)/i],[c,[d,L],[f,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[d,M],[f,m]],[/((pebble))app/i],[d,c,[f,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[d,_],[f,v]],[/droid.+; (glass) \d/i],[c,[d,T],[f,v]],[/droid.+; (wt63?0{2,3})\)/i],[c,[d,B],[f,v]],[/(quest( \d| pro)?)/i],[c,[d,U],[f,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[f,w]],[/(aeobc)\b/i],[c,[d,E],[f,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[f,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[f,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,y]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,h],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[h,$,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,$,Y],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,q],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,h],[/\(bb(10);/i],[h,[l,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[l,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[l,O+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,F],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,h],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,h]]},J=function(t,n){if(typeof t===a&&(n=t,t=r),!(this instanceof J))return new J(t,n).getResult();var m=typeof e!==o&&e.navigator?e.navigator:r,g=t||(m&&m.userAgent?m.userAgent:""),v=m&&m.userAgentData?m.userAgentData:r,w=n?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(K,n):K,E=m&&m.userAgent==g;return this.getBrowser=function(){var e,t={};return t[l]=r,t[h]=r,G.call(t,g,w.browser),t[u]=typeof(e=t[h])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r,E&&m&&m.brave&&typeof m.brave.isBrave==i&&(t[l]="Brave"),t},this.getCPU=function(){var e={};return e[p]=r,G.call(e,g,w.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[c]=r,e[f]=r,G.call(e,g,w.device),E&&!e[f]&&v&&v.mobile&&(e[f]=y),E&&"Macintosh"==e[c]&&m&&typeof m.standalone!==o&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[c]="iPad",e[f]=b),e},this.getEngine=function(){var e={};return e[l]=r,e[h]=r,G.call(e,g,w.engine),e},this.getOS=function(){var e={};return e[l]=r,e[h]=r,G.call(e,g,w.os),E&&!e[l]&&v&&v.platform&&"Unknown"!=v.platform&&(e[l]=v.platform.replace(/chrome os/i,F).replace(/macos/i,q)),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 g},this.setUA=function(e){return g=typeof e===s&&e.length>500?z(e,500):e,this},this.setUA(g),this};J.VERSION="1.0.38",J.BROWSER=W([l,h,u]),J.CPU=W([p]),J.DEVICE=W([c,d,f,m,y,g,b,v,w]),J.ENGINE=J.OS=W([l,h]),typeof n!==o?(typeof t!==o&&t.exports&&(n=t.exports=J),n.UAParser=J):typeof e!==o&&(e.UAParser=J);var X=typeof e!==o&&(e.jQuery||e.Zepto);if(X&&!X.ua){var Q=new J;X.ua=Q.getResult(),X.ua.get=function(){return Q.getUA()},X.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)X.ua[n]=t[n]}}}("object"==typeof window?window:this)},{}],111:[function(e,t,n){(function(e){(function(){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],112:[function(e,t,n){(function(n,r){(function(){var i=e("readable-stream"),o=e("end-of-stream"),a=e("inherits"),s=e("stream-shift"),u=r.from&&r.from!==Uint8Array.from?r.from([0]):new r([0]),c=function(e,t){e._corked?e.once("uncork",t):t()},l=function(e,t){return function(n){n?function(e,t){e._autoDestroy&&e.destroy(t)}(e,"premature close"===n.message?null:n):t&&!e._ended&&e.end()}},f=function(e,t,n){if(!(this instanceof f))return new f(e,t,n);i.Duplex.call(this,n),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!n||!1!==n.autoDestroy,this._forwardDestroy=!n||!1!==n.destroy,this._forwardEnd=!n||!1!==n.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};a(f,i.Duplex),f.obj=function(e,t,n){return n||(n={}),n.objectMode=!0,n.highWaterMark=16,new f(e,t,n)},f.prototype.cork=function(){1==++this._corked&&this.emit("cork")},f.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},f.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed)e&&e.destroy&&e.destroy();else if(null!==e&&!1!==e){var t=this,r=o(e,{writable:!0,readable:!1},l(this,this._forwardEnd)),i=function(){var e=t._ondrain;t._ondrain=null,e&&e()};this._unwrite&&n.nextTick(i),this._writable=e,this._writable.on("drain",i),this._unwrite=function(){t._writable.removeListener("drain",i),r()},this.uncork()}else this.end()},f.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed)e&&e.destroy&&e.destroy();else{if(null===e||!1===e)return this.push(null),void this.resume();var t,n=this,r=o(e,{writable:!1,readable:!0},l(this)),a=function(){n._forward()},s=function(){n.push(null)};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:(t=e,new i.Readable({objectMode:!0,highWaterMark:16}).wrap(t)),this._readable2.on("readable",a),this._readable2.on("end",s),this._unread=function(){n._readable2.removeListener("readable",a),n._readable2.removeListener("end",s),r()},this._forward()}},f.prototype._read=function(){this._drained=!0,this._forward()},f.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var e;for(this._forwarding=!0;this._drained&&null!==(e=s(this._readable2));)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},f.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;n.nextTick((function(){t._destroy(e)}))}},f.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},f.prototype._write=function(e,t,n){return this.destroyed?n():this._corked?c(this,this._write.bind(this,e,t,n)):e===u?this._finish(n):this._writable?void(!1===this._writable.write(e)?this._ondrain=n:n()):n()},f.prototype._finish=function(e){var t=this;this.emit("preend"),c(this,(function(){var n,r;n=t._forwardEnd&&t._writable,r=function(){!1===t._writableState.prefinished&&(t._writableState.prefinished=!0),t.emit("prefinish"),c(t,e)},n?n._writableState&&n._writableState.finished?r():n._writableState?n.end(r):(n.end(),r()):r()}))},f.prototype.end=function(e,t,n){return"function"==typeof e?this.end(null,null,e):"function"==typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(u),i.Writable.prototype.end.call(this,n))},t.exports=f}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:79,buffer:18,"end-of-stream":35,inherits:66,"readable-stream":96,"stream-shift":102}],113:[function(e,t,n){(function(n,r){(function(){"use strict";var i=e("readable-stream").Transform,o=e("duplexify"),a=e("ws"),s=e("safe-buffer").Buffer;t.exports=function(e,t,u){var c,l,f="browser"===n.title,d=!!r.WebSocket,h=f?function e(t,n,r){if(l.bufferedAmount>m)return void setTimeout(e,y,t,n,r);g&&"string"==typeof t&&(t=s.from(t,"utf8"));try{l.send(t)}catch(e){return r(e)}r()}:function(e,t,n){if(l.readyState!==l.OPEN)return void n();g&&"string"==typeof e&&(e=s.from(e,"utf8"));l.send(e,n)};t&&!Array.isArray(t)&&"object"==typeof t&&(u=t,t=null,("string"==typeof u.protocol||Array.isArray(u.protocol))&&(t=u.protocol));u||(u={});void 0===u.objectMode&&(u.objectMode=!(!0===u.binary||void 0===u.binary));var p=function(e,t,n){var r=new i({objectMode:e.objectMode});return r._write=t,r._flush=n,r}(u,h,(function(e){l.close(),e()}));u.objectMode||(p._writev=R);var m=u.browserBufferSize||524288,y=u.browserBufferTimeout||1e3;"object"==typeof e?l=e:(l=d&&f?new a(e,t):new a(e,t,u)).binaryType="arraybuffer";var b=void 0===l.addEventListener;l.readyState===l.OPEN?c=p:(c=c=o(void 0,void 0,u),u.objectMode||(c._writev=R),b?l.addEventListener("open",v):l.onopen=v);c.socket=l,b?(l.addEventListener("close",w),l.addEventListener("error",E),l.addEventListener("message",_)):(l.onclose=w,l.onerror=E,l.onmessage=_);p.on("close",(function(){l.close()}));var g=!u.objectMode;function v(){c.setReadable(p),c.setWritable(p),c.emit("connect")}function w(){c.end(),c.destroy()}function E(e){c.destroy(e)}function _(e){var t=e.data;t=t instanceof ArrayBuffer?s.from(t):s.from(t,"utf8"),p.push(t)}function R(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)"string"==typeof e[r].chunk?n[r]=s.from(e[r],"utf8"):n[r]=e[r].chunk;this._write(s.concat(n),"binary",t)}return c}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:79,duplexify:112,"readable-stream":96,"safe-buffer":98,ws:114}],114:[function(e,t,n){var r=null;"undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof MozWebSocket?r=MozWebSocket:"undefined"!=typeof window&&(r=window.WebSocket||window.MozWebSocket),t.exports=r},{}],115:[function(e,t,n){t.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},{}],116:[function(e,t,n){t.exports={name:"videomail-client",version:"9.2.21",description:"A wicked npm package to record videos directly in the browser, wohooo!",keywords:["webcam","video","videomail","encoder","getusermedia","audio","recorder"],homepage:"https://videomail.io",repository:{type:"git",url:"git+https://github.com/binarykitchen/videomail-client.git"},license:"CC0-1.0",author:"Michael Heuberger <michael.heuberger@binarykitchen.com>",contributors:[{name:"Michael Heuberger",email:"michael.heuberger@binarykitchen.com"}],main:"prototype/js/videomail-client.js",scripts:{audit:"npx audit-ci --config audit-ci.json",build:"gulp build",clean:"rm -rf node_modules && rm -rf package-lock.json",lint:"eslint --color ./src ./test ./gulpfile.js","lint:fix":"npm --silent run lint -- --fix",major:"./env/dev/release.sh --importance=major",minor:"./env/dev/release.sh --importance=minor",patch:"./env/dev/release.sh --importance=patch",prettier:"prettier --check ./src ./test ./prototype/*.html gulpfile.js","prettier:fix":"prettier --write ./src ./test ./prototype/*.html gulpfile.js",test:"gulp test",watch:"NODE_NO_HTTP2=1 gulp watch"},prettier:"./prettier.config.cjs",dependencies:{"@babel/core":"7.25.2","add-eventlistener-with-options":"1.25.5",animitter:"3.0.0","audio-sample":"4.0.1","canvas-to-buffer":"4.0.1","classlist.js":"1.1.20150312",contains:"0.1.1","core-js":"3.38.1","create-error":"0.3.1",deepmerge:"4.3.1",defined:"1.0.1",despot:"2.0.0","document-visibility":"1.0.1",filesize:"10.1.4","format-util":"1.0.5","get-form-data":"3.0.0",hidden:"1.1.1","humanize-duration":"3.32.1",hyperscript:"2.0.2",inherits:"2.0.4","insert-css":"2.0.0","iphone-inline-video":"2.2.2","is-power-of-two":"1.0.0",keymirror:"0.1.1","number-is-integer":"2.0.0","request-frame":"1.5.3","safe-json-stringify":"1.2.0",superagent:"8.1.2","ua-parser-js":"1.0.38","websocket-stream":"5.5.2"},devDependencies:{"@babel/eslint-parser":"7.25.1","@babel/plugin-transform-runtime":"7.25.4","@babel/preset-env":"7.25.4","audit-ci":"7.1.0",autoprefixer:"10.4.20",babelify:"10.0.0","body-parser":"1.20.2",browserify:"17.0.0","connect-send-json":"1.0.0",cssnano:"6.0.5",del:"6.1.1",eslint:"8.57.0","eslint-config-prettier":"9.1.0","eslint-plugin-import":"2.29.1","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"6.2.0","fancy-log":"2.0.0",glob:"10.4.2",gulp:"4.0.2","gulp-bump":"3.2.0","gulp-bytediff":"1.0.0","gulp-concat":"2.6.1","gulp-connect":"5.7.0","gulp-derequire":"3.0.0","gulp-if":"3.0.0","gulp-inject-string":"1.1.2","gulp-load-plugins":"2.0.8","gulp-plumber":"1.2.1","gulp-postcss":"10.0.0","gulp-rename":"2.0.0","gulp-sourcemaps":"3.0.0","gulp-stylus":"3.0.1","gulp-terser":"2.1.0",minimist:"1.2.8",nib:"1.2.0",postcss:"8.4.43",prettier:"3.3.3","prettier-plugin-curly":"0.2.2","prettier-plugin-organize-imports":"4.0.0","prettier-plugin-packagejson":"2.5.2","prettier-plugin-sh":"0.14.0",router:"1.3.8",tape:"5.8.1","tape-catch":"1.0.6","tape-run":"11.0.0","vinyl-buffer":"1.0.1","vinyl-source-stream":"2.0.0",watchify:"4.0.0"},engines:{node:"^20.16.0",npm:"^10.8.1"},readmeFilename:"README.md"}},{}],117:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i,o,a=r(e("deepmerge")),s=r(e("inherits")),u=r(e("./constants")),c=r(e("./events")),l=r(e("./options")),f=r(e("./resource")),d=r(e("./util/browser")),h=r(e("./util/collectLogger")),p=r(e("./util/eventEmitter")),m=r(e("./wrappers/container")),y=r(e("./util/addOptionsFunctions"));var b=function(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,a.default)(l.default,e,{arrayMerge:function(e,t){return t}});return i||(i=new h.default(t)),t.logger=i,t.debug=t.logger.debug,(0,y.default)(t)}(e),n=new m.default(t),r=t.debug;this.events=c.default,p.default.call(this,t,"VideomailClient"),this.build=function(){var e=!1;e||n.isBuilt()||(r("Client: build()"),e=!0,n.build(),e=!1)},this.show=function(){n.isBuilt()||this.build(),n.show()},this.replay=function(e,t){n.isBuilt()||n.build(!0,t),e&&(e=n.addPlayerDimensions(e)),n.buildForm(),n.loadForm(e),this.once(c.default.REPLAY_SHOWN,(function(){n.showReplayOnly()})),n.getReplay().setVideomail(e)},this.startOver=function(e){var t=n.getReplay();t&&(t.hide(),t.reset()),n.startOver(e)},this.unload=function(e){this.removeAllListeners(),n.unload(e)},this.hide=function(){n.hide()},this.getByAlias=function(e,r){new f.default(t).getByAlias(e,(function(e,t){e?r(e):r(null,n.addPlayerDimensions(t))}))},this.get=this.getByAlias,this.getByKey=function(e,r){new f.default(t).getByKey(e,(function(e,t){e?r(e):r(null,n.addPlayerDimensions(t))}))},this.canRecord=function(){return function(e){return o||(o=new d.default(e)),o}(t).canRecord()},this.isDirty=function(){return n.isDirty()},this.isBuilt=function(){return n.isBuilt()},this.isRecording=function(){return n.isRecording()},this.submit=function(){n.submit()},this.getLogLines=function(){if(t.logger&&t.logger.getLines)return t.logger.getLines()}};(0,s.default)(b,p.default),Object.keys(u.default.public).forEach((function(e){b[e]=u.default.public[e]})),b.Events=c.default;n.default=b},{"./constants":118,"./events":119,"./options":120,"./resource":121,"./util/addOptionsFunctions":122,"./util/browser":124,"./util/collectLogger":125,"./util/eventEmitter":126,"./wrappers/container":133,"@babel/runtime/helpers/interopRequireDefault":4,deepmerge:28,inherits:66}],118:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default={SITE_NAME_LABEL:"x-videomail-site-name",VERSION_LABEL:"videomailClientVersion",public:{ENC_TYPE_APP_JSON:"application/json",ENC_TYPE_FORM:"application/x-www-form-urlencoded"}}},{}],119:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("keymirror"));n.default=(0,i.default)({BUILT:null,FORM_READY:null,LOADING_USER_MEDIA:null,USER_MEDIA_READY:null,CONNECTING:null,CONNECTED:null,DISCONNECTED:null,COUNTDOWN:null,RECORDING:null,STOPPING:null,STOPPED:null,PROGRESS:null,BEGIN_AUDIO_ENCODING:null,BEGIN_VIDEO_ENCODING:null,RESETTING:null,PAUSED:null,RESUMING:null,PREVIEW:null,PREVIEW_SHOWN:null,REPLAY_SHOWN:null,INVALID:null,VALIDATING:null,VALID:null,SUBMITTING:null,SUBMITTED:null,ERROR:null,BLOCKING:null,SENDING_FIRST_FRAME:null,FIRST_FRAME_SENT:null,HIDE:null,NOTIFYING:null,ENABLING_AUDIO:null,DISABLING_AUDIO:null,LOADED_META_DATA:null,EVENT_EMITTED:null,GOING_BACK:null,STARTING_OVER:null,ASKING_WEBCAM_PERMISSION:null,VISIBLE:null,INVISIBLE:null,SWITCH_FACING_MODE:null,SERVER_READY:null,UNLOADING:null})},{"@babel/runtime/helpers/interopRequireDefault":4,keymirror:73}],120:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=e("../../package.json"),o=r(e("./util/addOptionsFunctions")),a={logger:null,logStackSize:30,verbose:!("production"===t.env.NODE_ENV),baseUrl:"https://videomail.io",socketUrl:"wss://videomail.io",siteName:"videomail-client-demo",insertCss:!0,enablePause:!0,enableAutoPause:!0,enableSpace:!0,submitWithVideomail:!1,disableSubmit:!1,enableAutoValidation:!0,enableAutoUnload:!0,enableAutoSubmission:!0,enctype:"application/json",selectors:{containerId:"videomail",containerClass:"videomail",replayClass:"replay",userMediaClass:"userMedia",visualsClass:"visuals",buttonClass:null,buttonsClass:"buttons",recordButtonClass:"record",pauseButtonClass:"pause",resumeButtonClass:"resume",previewButtonClass:"preview",recordAgainButtonClass:"recordAgain",submitButtonClass:"submit",subjectInputName:"subject",fromInputName:"from",toInputName:"to",ccInputName:"cc",bccInputName:"bcc",bodyInputName:"body",sendCopyInputName:"sendCopy",keyInputName:"videomail_key",parentKeyInputName:"videomail_parent_key",formId:null,submitButtonId:null,submitButtonSelector:null},audio:{enabled:!1,switch:!1,volume:.2,bufferSize:"auto"},video:{fps:15,limitSeconds:30,countdown:3,width:"auto",height:"auto",facingMode:"user",facingModeButton:!1,stretch:!1},image:{quality:.42,types:["webp","jpeg"]},text:{pausedHeader:"Paused",pausedHint:null,sending:"Teleporting",encoding:"Encoding",limitReached:"Limit reached",audioOff:"Audio off",audioOn:"Audio on",buttons:{record:"Record video",recordAgain:"Record again",resume:"Resume",pause:"Pause",preview:"Preview"}},notifier:{entertain:!1,entertainClass:"bg",entertainLimit:6,entertainInterval:9e3},timeouts:{userMedia:2e4,connection:1e4,pingInterval:3e4},loadUserMediaOnRecord:!1,callbacks:{adjustFormDataBeforePosting:null},defaults:{from:null,to:null,cc:null,bcc:null,subject:null,body:null},displayErrors:!0,adjustFormOnBrowserError:!1,reportErrors:!1,fakeUaString:null,version:i.version},s=(0,o.default)(a);n.default=s}).call(this)}).call(this,e("_process"))},{"../../package.json":116,"./util/addOptionsFunctions":122,"@babel/runtime/helpers/interopRequireDefault":4,_process:79}],121:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){function t(t,n){return e.defaults[n]&&!t[n]&&(t[n]=e.defaults[n]),t}function n(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0})}function r(e,t){if(t&&t.body&&t.body.error){var r=t.body.error,i=new Error;return n(i,"name",r.name),n(i,"type",r.type),n(i,"message",r.message||t.statusText),n(i,"cause",r.cause),n(i,"status",r.status),n(i,"code",r.code),n(i,"errno",r.errno),n(i,"details",r.details),n(i,"stack",r.stack),i}return e}function s(t,n,s){var u="".concat(e.baseUrl,"/videomail/").concat(t,"/").concat(n,"/snapshot");(0,i.default)("get",u).type("json").set("Accept","application/json").set("Timezone-Id",a).set(o.default.SITE_NAME_LABEL,e.siteName).timeout(e.timeouts.connection).end((function(e,t){if(e){var n=r(e,t);s(n)}else{var i=t.body?t.body:null;s(null,i)}}))}function u(t,n,s,u){u||(u=s,s=null);var c={},l="".concat(e.baseUrl,"/videomail/");s&&(l+=s);var f=(0,i.default)(t,l);c[o.default.SITE_NAME_LABEL]=e.siteName,f.query(c).set("Timezone-Id",a).send(n).timeout(e.timeout).end((function(e,t){if(e){var n=r(e,t);u(n)}else{var i=t.body&&t.body.videomail?t.body.videomail:null;u(null,i,t.body)}}))}this.getByAlias=function(e,t){s("alias",e,t)},this.getByKey=function(e,t){s("key",e,t)},this.reportError=function(t,n){var a={},s="".concat(e.baseUrl,"/client-error/"),u=(0,i.default)("post",s);a[o.default.SITE_NAME_LABEL]=e.siteName,u.query(a).send(t).timeout(e.timeout).end((function(e,t){if(e){var i=r(e,t);n&&n(i)}else n&&n()}))},this.post=function(n,r){(n=function(n){return e.defaults&&(n=t(n,"from"),n=t(n,"to"),n=t(n,"cc"),n=t(n,"bcc"),n=t(n,"subject"),n=t(n,"body")),n}(n))[o.default.VERSION_LABEL]=e.version,e.callbacks.adjustFormDataBeforePosting?e.callbacks.adjustFormDataBeforePosting(n,(function(e,t){e?r(e):u("post",t,r)})):u("post",n,r)},this.put=function(e,t){u("put",e,e.key,t)},this.form=function(t,n,s){var u;switch(e.enctype){case o.default.public.ENC_TYPE_APP_JSON:u="json";break;case o.default.public.ENC_TYPE_FORM:u="form";break;default:setTimeout((function(){s(new Error("Invalid enctype given: ".concat(e.enctype)))}),0)}u&&i.default.post(n).type(u).set("Timezone-Id",a).send(t).timeout(e.timeout).end((function(e,t){if(e){var n=r(e,t);s(n)}else s(null,t)}))}};var i=r(e("superagent")),o=r(e("./constants")),a=Intl.DateTimeFormat().resolvedOptions().timeZone},{"./constants":118,"@babel/runtime/helpers/interopRequireDefault":4,superagent:104}],122:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){var t=e.audio&&e.audio.enabled;return e.hasDefinedWidth=function(){return this.video.width&&"auto"!==this.video.width},e.hasDefinedHeight=function(){return this.video.height&&"auto"!==this.video.height},e.hasDefinedDimension=function(){return this.hasDefinedWidth()||this.hasDefinedHeight()},e.hasDefinedDimensions=function(){return this.hasDefinedWidth()&&this.hasDefinedHeight()},e.getRatio=function(){var e=1,t=this.videoHeight&&this.videoWidth;return this.hasDefinedDimensions()?e=t&&(this.videoHeight<this.video.height||this.videoWidth<this.video.width)?this.videoHeight/this.videoWidth:this.video.height/this.video.width:t&&(e=this.videoHeight/this.videoWidth),e},e.isAudioEnabled=function(){return t},e.setAudioEnabled=function(e){t=e},e.isAutoPauseEnabled=function(){return this.enableAutoPause&&this.enablePause},e}},{}],123:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){var n,r,c,l=new a.default(t);function f(){return window.AudioContext||window.webkitAudioContext}function d(){return Boolean(f())&&Boolean(h())}function h(){if(!c){var e=f();c=new e}return c}this.init=function(e){t.debug("AudioRecorder: init()");var i=h().createGain();try{r=h().createMediaStreamSource(e)}catch(e){throw s.default.create("Webcam has no audio",e.toString(),t)}var a=t.audio.bufferSize;if("auto"===a&&(a=l.isFirefox()?512:2048),!(0,o.default)(a))throw s.default.create("Audio buffer size must be a power of two.",t);if(!t.audio.volume||t.audio.volume>1)throw s.default.create("Audio volume must be between zero and one.",t);i.gain.value=t.audio.volume,n=h().createScriptProcessor(a,u,u),r.connect(n),n.connect(h().destination),r.connect(i),i.connect(n)},this.record=function(r){t.debug("AudioRecorder: record()"),n.onaudioprocess=function(t){!function(t,n){if(e.isRecording()&&!e.isPaused()){var r=t.inputBuffer.getChannelData(0);n(new i.default(r))}}(t,r)}},this.stop=function(){t.debug("AudioRecorder: stop()"),n&&(n.onaudioprocess=void 0),r&&r.disconnect(),d()&&(h().close?h().close().then((function(){t.debug("AudioRecorder: audio context is closed"),c=null})).catch((function(e){throw s.default.create(e,t)})):c=null)},this.getSampleRate=function(){return d()?h().sampleRate:-1}};var i=r(e("audio-sample")),o=r(e("is-power-of-two")),a=r(e("./browser")),s=r(e("./videomailError")),u=1},{"./browser":124,"./videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,"audio-sample":14,"is-power-of-two":71}],124:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("defined")),a=r(e("ua-parser-js")),s=r(e("./videomailError"));n.default=function(e){e||(e={});var t,n="http://www.mozilla.org/firefox/update/",r="https://www.microsoft.com/en-us/download/details.aspx?id=48126",u="http://www.google.com/chrome/",c="http://www.chromium.org/getting-involved/download-chromium",l=(0,o.default)(e.fakeUaString,"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent,""),f=new a.default(l).getResult(),d="iOS"===f.os.name,h=parseFloat(f.browser.version),p="Chrome"===f.browser.name,m="Brave"===f.browser.name,y="Chromium"===f.browser.name,b="Firefox"===f.browser.name,g=parseFloat(f.os.version),v="Windows"===f.os.name,w="Edge"===f.browser.name||v&&g>=10,E=/Safari/.test(f.browser.name),_=/Opera/.test(f.browser.name),R=/Android/.test(f.os.name),S=p||y,A="Facebook"===f.browser.name,O=d||R,k=E&&h>=11,T=d&&g>=11,x=d&&g<11,j=e.fakeHttps||"https:"===window.location.protocol,M=S||b||R||_||w||k||T||m,C=this;function D(){var e;return(e=x?"On iPads or iPhones below iOS v11 this camera feature is missing.<br/><br/>For now, we recommend you to upgrade iOS or to use an Android device.":function(){var e;return b?e=d?"Firefox on iOS is not ready for cameras yet. Hopefully in near future ...":'Probably you need to <a href="'.concat(n,'" target="_blank">')+"upgrade Firefox</a> to fix this.":p?e=d?"Use Safari instead. Apple doesn't give Chrome access to iPhone cameras (booo).":'Probably you need to <a href="'.concat(u,'" target="_blank">')+"upgrade Chrome</a> to fix this.":y?e='Probably you need to <a href="'.concat(c,'" target="_blank">')+"upgrade Chromium</a> to fix this.":k?e="Probably you need to shut down Safari and restart it, this for correct webcam access.":E&&(e="Safari below version 11 has no webcam support.<br/>Better upgrade Safari or pick"+' <a href="'.concat(u,'" target="_blank">Chrome</a>,')+' <a href="'.concat(n,'" target="_blank">Firefox</a> or Android.')),e}())||(e=C.isChromeBased()||C.isFirefox()||E?"For the webcam feature, your browser needs an upgrade.":A?"Hence we recommend you to use a real browser like "+'<a href="'.concat(u,'" target="_blank">Chrome</a>, ')+'<a href="'.concat(n,'" target="_blank">Firefox</a> or ')+'<a href="'.concat(r,'" target="_blank">Edge</a>.'):"Hence we recommend you to use either "+'<a href="'.concat(u,'" target="_blank">Chrome</a>, ')+'<a href="'.concat(n,'" target="_blank">Firefox</a>, ')+'<a href="'.concat(r,'" target="_blank">Edge</a> or Android.')),e}function N(e,t){var n;return e&&e.canPlayType&&(n=e.canPlayType("video/".concat(t))),""!==n&&n}this.canRecord=function(){var e="undefined"!=typeof navigator,t=!1;e&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?t=!0:t="function"===(e&&(0,i.default)(navigator.getUserMedia_));return t},this.checkRecordingCapabilities=function(){var t;if(j){if(!M||!this.canRecord()){var n,r=[];x?r.push(s.default.IOS_PROBLEM):r.push(s.default.BROWSER_PROBLEM),n=M?O?A?"Sorry, the Facebook app cannot record from your mobile camera":"Sorry, your browser cannot record from your mobile camera":"Sorry, your browser cannot record from webcams":O?"Sorry, your browser is unable to use your mobile camera":"Sorry, your browser is unable to use webcams",x&&(e.reportErrors=!1),t=s.default.create(n,D(),e,{classList:r})}}else t=s.default.create("Sorry, your page is insecure","Please switch to HTTPS to ensure all is encrypted.",e,{classList:[s.default.BROWSER_PROBLEM]});return t},this.checkBufferTypes=function(){var t;return"undefined"==typeof window||void 0===window.atob?t=s.default.create("atob is not supported",e):void 0===window.ArrayBuffer?t=s.default.create("ArrayBuffers are not supported",e):void 0===window.Uint8Array&&(t=s.default.create("Uint8Arrays are not supported",e)),t},this.getVideoType=function(e){return!t&&e&&(N(e,"mp4")?t="mp4":N(e,"webm")&&(t="webm")),"webm"!==t&&"mp4"!==t&&(t="mp4"),t&&""!==t||(t="mp4"),t},this.getNoAccessIssue=function(){var t;return t=this.isChromeBased()?"Click on the allow button to grant access to your webcam":this.isFirefox()?"Please grant Firefox access to your webcam":"Your system does not let your browser access your webcam",s.default.create("Unable to access webcam",t,e)},this.isChromeBased=function(){return S},this.isFirefox=function(){return b},this.isEdge=function(){return w},this.isAndroid=function(){return R},this.isMobile=function(){return"mobile"===f.device.type},this.isOkSafari=function(){return k},this.isIOS=function(){return d},this.getUsefulData=function(){return{browser:f.browser,cpu:f.cpu.architecture?f.cpu:void 0,device:f.device.type?f.device:void 0,engine:f.engine,os:f.os.name&&f.os.version?f.os:void 0}}}},{"./videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,"@babel/runtime/helpers/typeof":10,defined:30,"ua-parser-js":110}],125:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new a.default(e),n=e.logger||console,r=e.selectors&&e.selectors.containerId||"undefined container id",s=[];function u(t,n){var r=o.default.apply(void 0,(0,i.default)(n));return s.length>e.logStackSize&&s.pop(),s.push("[".concat(t,"] ").concat(r)),r}function c(e){return"#".concat(r," [").concat((new Date).toLocaleTimeString(),"] > ").concat(e)}this.debug=function(){var r=[].slice.call(arguments,0);r[0]=c(r[0]);var i=u("debug",r);e.verbose&&(t.isFirefox()?n.debug(i):n.groupCollapsed?(n.groupCollapsed(i),n.trace("Trace"),n.groupEnd()):n.debug?n.debug(i):console.log(i))},this.error=function(){var e=[].slice.call(arguments,0);e[0]=c(e[0]),n.error(u("error",e))},this.warn=function(){var e=[].slice.call(arguments,0);e[0]=c(e[0]),n.warn(u("warn",e))},this.getLines=function(){return s}};var i=r(e("@babel/runtime/helpers/toConsumableArray")),o=r(e("format-util")),a=r(e("./browser"))},{"./browser":124,"@babel/runtime/helpers/interopRequireDefault":4,"@babel/runtime/helpers/toConsumableArray":7,"format-util":47}],126:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){this.emit=function(n){var r,u=Array.prototype.slice.call(arguments,0);if(!n)throw s.default.create("You cannot emit without an event.",e);if(n===a.default.ERROR){var c=u[1];c=s.default.create(c,e),u[1]=c}e.debug&&("removeListener"!==n&&"newListener"!==n&&(u[1]&&(r=u.slice(1)),r?e.debug("".concat(t," emits ").concat(n," with ").concat((0,o.default)(r))):e.debug("".concat(t," emits ").concat(n))));return i.default.emit.apply(i.default,u)},this.on=function(e,t){return i.default.on(e,t)},this.once=function(e,t){return i.default.once(e,t)},this.listeners=function(e){return i.default.listeners(e)},this.removeListener=function(e,t){return i.default.removeListener(e,t)},this.removeAllListeners=function(){i.default.removeAllListeners()}};var i=r(e("despot")),o=r(e("safe-json-stringify")),a=r(e("./../events")),s=r(e("./videomailError"))},{"./../events":119,"./videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,despot:31,"safe-json-stringify":99}],127:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=e("filesize"),o=r(e("humanize-duration"));n.default={filesize:function(e,t){return(0,i.filesize)(e,{round:t})},toTime:function(e){return(0,o.default)(e)}}},{"@babel/runtime/helpers/interopRequireDefault":4,filesize:46,"humanize-duration":62}],128:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=["loadstart","suspend","progress","abort","emptied","stalled","pause","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","ended","ratechange","durationchange","volumechange"]},{}],129:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){if(null===e)return"null";if(void 0===e)return"undefined";if("string"==typeof e)return e;if(Array.isArray(e))return function(e){if(e&&e.length>0){var t=[];return e.forEach((function(e){e&&t.push((0,o.default)(e))})),a+t.join(s)}}(e);if("object"===(0,i.default)(e))return function(e,t){var n,r=Object.getOwnPropertyNames(e),i=t&&t.excludes||[],u=[];if(i.push("stack"),r&&r.length>0){var c=!1;r.forEach((function(t){i&&(c=i.indexOf(t)>=0),!c&&e[t]&&u.push((0,o.default)(e[t]))}))}1===u.length?n=u.join():u.length>1&&(n=a+u.join(s));return n}(e,t);return e.toString()};var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("safe-json-stringify")),a="- ",s="<br/>".concat(a)},{"@babel/runtime/helpers/interopRequireDefault":4,"@babel/runtime/helpers/typeof":10,"safe-json-stringify":99}],130:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.screen||(e.screen={});(0,i.default)("native"),t.mediaDevices&&t.mediaDevices.getUserMedia||(t.getUserMedia_=t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia);!e.AudioContext&&e.webkitAudioContext&&(e.AudioContext=e.webkitAudioContext);e.URL||(e.URL=e.webkitURL||e.mozURL||e.msURL);t.connection||(t.connection=t.mozConnection||t.webkitConnection);var n,r=["debug","groupCollapsed","groupEnd","error","exception","info","log","trace","warn"],o={};e.console?o=e.console:e.console=function(){};var a=r.length;for(;a--;)o[n=r[a]]||(o[n]=function(){})},e("classlist.js");var i=r(e("request-frame"))},{"@babel/runtime/helpers/interopRequireDefault":4,"classlist.js":23,"request-frame":97}],131:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("./../resource")),a=r(e("create-error")),s=r(e("safe-json-stringify")),u=r(e("./pretty")),c="Videomail Error",l=(0,a.default)(Error,c,{title:void 0,message:void 0,explanation:void 0,logLines:void 0,siteName:void 0,cookie:void 0,location:void 0,err:void 0,promise:void 0,cause:void 0,reason:void 0,browser:void 0,cpu:void 0,device:void 0,engine:void 0,os:void 0,screen:void 0,orientation:void 0}),f=function(e){return(0,u.default)(e,{excludes:["stack"]})};l.PERMISSION_DENIED="PERMISSION_DENIED",l.NOT_ALLOWED_ERROR="NotAllowedError",l.NOT_CONNECTED="Not connected",l.DOM_EXCEPTION="DOMException",l.STARTING_FAILED="Starting video failed",l.MEDIA_DEVICE_NOT_SUPPORTED="MediaDeviceNotSupported",l.BROWSER_PROBLEM="browser-problem",l.WEBCAM_PROBLEM="webcam-problem",l.IOS_PROBLEM="ios-problem",l.OVERCONSTRAINED="OverconstrainedError",l.NOT_FOUND_ERROR="NotFoundError",l.NOT_READABLE_ERROR="NotReadableError",l.SECURITY_ERROR="SecurityError",l.TRACK_START_ERROR="TrackStartError",l.INVALID_STATE_ERROR="InvalidStateError",l.create=function(n,r,a,u){var d;if(n&&n.name===c)return n;!a&&r&&(a=r,r=void 0),a||(a={}),u||(u={});var h,p,m=a&&a.isAudioEnabled&&a.isAudioEnabled(),y=u.classList||[],b=new(0,e("./browser").default)(a);switch("object"===(0,i.default)(n)?n.name===l.TRACK_START_ERROR?h=l.TRACK_START_ERROR:n.name===l.SECURITY_ERROR?h=l.SECURITY_ERROR:8===n.code&&n.name===l.NotFoundError?h=l.NotFoundError:35===n.code||n.name===l.NOT_ALLOWED_ERROR?h=l.NOT_ALLOWED_ERROR:1===n.code&&1===n.PERMISSION_DENIED?h=l.PERMISSION_DENIED:n.constructor&&n.constructor.name===l.DOM_EXCEPTION?h=n.name===l.NOT_READABLE_ERROR?l.NOT_READABLE_ERROR:l.DOM_EXCEPTION:n.constructor&&n.constructor.name===l.OVERCONSTRAINED?h=l.OVERCONSTRAINED:n.explanation===l.STARTING_FAILED?h=n.explanation:n.name?h=n.name:"error"===n.type&&0===n.target.bufferedAmount&&(h=l.NOT_CONNECTED):h=n===l.NOT_CONNECTED?l.NOT_CONNECTED:n,h){case l.SECURITY_ERROR:p="The operation was insecure",r="Probably you have disallowed Cookies for this page?",y.push(l.BROWSER_PROBLEM);break;case l.OVERCONSTRAINED:p="Invalid webcam constraints",r=n.constraint?"width"===n.constraint?"Your webcam does not meet the width requirement.":"Unmet constraint: ".concat(n.constraint):n.toString();break;case"MediaDeviceFailedDueToShutdown":p="Webcam is shutting down",r="This happens your webcam is already switching off and not giving you permission to use it.";break;case"SourceUnavailableError":p="Source of your webcam cannot be accessed",r="Probably it is locked from another process or has a hardware error.",n.explanation&&(n.explanation+=" Details: ".concat(n.explanation));break;case l.NOT_FOUND_ERROR:case"NO_DEVICES_FOUND":m?(p="No webcam nor microphone found",r="Your browser cannot find a webcam with microphone attached to your machine."):(p="No webcam found",r="Your browser cannot find a webcam attached to your machine."),y.push(l.WEBCAM_PROBLEM);break;case"PermissionDismissedError":p="Ooops, you didn't give me any permissions?",r="Looks like you skipped the webcam permission dialogue.<br/>Please grant access next time the dialogue appears.",y.push(l.WEBCAM_PROBLEM);break;case l.NOT_ALLOWED_ERROR:case l.PERMISSION_DENIED:case"PermissionDeniedError":p="Permission denied",r="Cannot access your webcam. This can have two reasons:<br/>a) you blocked access to webcam; or<br/>b) your webcam is already in use.",y.push(l.WEBCAM_PROBLEM);break;case"HARDWARE_UNAVAILABLE":p="Webcam is unavailable",r="Maybe it is already busy in another window?",(b.isChromeBased()||b.isFirefox())&&(r+=" Or you have to allow access above?"),y.push(l.WEBCAM_PROBLEM);break;case l.NOT_CONNECTED:p="Unable to connect",r="Either the videomail server or your connection is down. Trying to reconnect every few seconds …";break;case"NO_VIDEO_FEED":p="No video feed found!",r="Your webcam is already used in another browser.",y.push(l.WEBCAM_PROBLEM);break;case l.STARTING_FAILED:p="Starting video failed",r="Most likely this happens when the webcam is already active in another browser.",y.push(l.WEBCAM_PROBLEM);break;case"DevicesNotFoundError":p="No available webcam could be found",r="Looks like you do not have any webcam attached to your machine; or the one you plugged in is already used.",y.push(l.WEBCAM_PROBLEM);break;case l.NOT_READABLE_ERROR:case l.TRACK_START_ERROR:p="No access to webcam",r="A hardware error occurred which prevented access to your webcam.",y.push(l.WEBCAM_PROBLEM);break;case l.INVALID_STATE_ERROR:p="Invalid state",r="Video recording stream from your webcam already has finished.",y.push(l.WEBCAM_PROBLEM);break;case l.DOM_EXCEPTION:switch(n.code){case 8:p="Requested webcam not found",r="A webcam is needed but could not be found",y.push(l.WEBCAM_PROBLEM);break;case 9:var g="https:".concat(window.location.href.substring(window.location.protocol.length));p="Security upgrade needed",r='Click <a href="'.concat(g,'">here</a> to switch to HTTPs which is more safe ')+" and enables encrypted videomail transfers.",y.push(l.BROWSER_PROBLEM);break;case 11:p="Invalid State",r="The object is in an invalid, unusable state.",y.push(l.BROWSER_PROBLEM);break;default:p="DOM Exception",r=f(n),y.push(l.BROWSER_PROBLEM)}break;case l.MEDIA_DEVICE_NOT_SUPPORTED:p="Media device not supported",r=f(n);break;default:var v=r;if(r&&"object"===(0,i.default)(r)&&(r=f(r)),!r&&v&&(r=v.explanation?v.explanation:"Inspected: ".concat((0,s.default)(v))),n)if("string"==typeof n)p="".concat(n," (default)");else if(n.message&&(p=f(n.message)+" (pretty)"),n.explanation&&(r?r+=";<br/>".concat(f(n.explanation)):r=f(n.explanation)),n.details){var w=f(n.details);r?w&&(r+=";<br/>".concat(w)):r=w}p||(h&&(p=h+" (weird)"),!r&&n&&(r=f(n)),f(p)===r&&(r=void 0))}var E=null;a.logger&&a.logger.getLines&&(E=a.logger.getLines()),(a&&a.debug||console.log)("VideomailError: create()",p,r||"(no explanation set)");var _,R=b.getUsefulData(),S=t.document.cookie.split("; "),A={title:"videomail-client error",message:p,explanation:r,logLines:E,siteName:a.siteName,browser:R.browser,cpu:R.cpu,device:R.device,engine:R.engine,os:R.os,location:window.location.href,cookie:S.length>0?S.join(",\n"):void 0,screen:[screen.width,screen.height,screen.colorDepth].join("×"),orientation:"string"==typeof screen.orientation?screen.orientation:screen.orientation.type.toString(),errNo:null==n?void 0:n.errno,errCode:null==n?void 0:n.code,errName:null==n?void 0:n.name,errType:null==n?void 0:n.type,errConstraint:null==n?void 0:n.constraint,errConstructorName:null==n||null===(d=n.constructor)||void 0===d?void 0:d.name},O=new l(n instanceof Error?n:p,A),k=!1;function T(e){return y.indexOf(e)>=0}return a.reportErrors&&(k="function"==typeof a.reportErrors?a.reportErrors(O):a.reportErrors),k&&(_=new o.default(a)),_&&_.reportError(O,(function(e){e&&console.error("Unable to report error",e)})),O.getClassList=function(){return y},O.removeDimensions=function(){return T(l.IOS_PROBLEM)||b.isMobile()},O.hideButtons=function(){return T(l.BROWSER_PROBLEM)||u.browserProblem||T(l.IOS_PROBLEM)},O.hideForm=function(){return T(l.IOS_PROBLEM)},O};n.default=l}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./../resource":121,"./browser":124,"./pretty":129,"@babel/runtime/helpers/interopRequireDefault":4,"@babel/runtime/helpers/typeof":10,"create-error":27,"safe-json-stringify":99}],132:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("contains")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("inherits")),u=r(e("../events")),c=r(e("../util/eventEmitter")),l=function(e,t){c.default.call(this,t,"Buttons");var n,r,s,l,f,d,h,p,m,y,b=this,g=t.debug;function v(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){(0,o.default)(e,!0)}))}function w(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){(0,o.default)(e,!1)}))}function E(e){var t=e&&!0;return e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){t&&(t=e&&!(0,o.default)(e))})),t}function _(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){e&&("INPUT"===e.tagName||"BUTTON"===e.tagName?e.disabled=!0:e.classList.add("disabled"))}))}function R(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){e&&("INPUT"===e.tagName||"BUTTON"===e.tagName?e.disabled=!1:e.classList.remove("disabled"))}))}function S(e,t,n,r){return r&&_(e),n?e.type=n:e.type||(e.type="button"),!t&&v(e),e}function A(e,t){e.onclick=function(e){e&&e.preventDefault();try{t({event:e})}catch(e){b.emit(u.default.ERROR,e)}}}function O(e){var t,r;return e.id&&(t=document.getElementById(e.id)),t||(t=(0,a.default)("input#".concat(e.id),{type:"radio",name:e.name,value:e.value,checked:e.checked}),r=(0,a.default)("span.radioGroup",t,(0,a.default)("label",{htmlFor:e.id},e.label)),h&&(0,i.default)(n,h)?n.insertBefore(r,h):n.appendChild(r)),e.changeHandler&&(t.onchange=e.changeHandler),_(t),t}function k(e,r,o,s,u,c,l){var f,d=!(arguments.length>7&&void 0!==arguments[7])||arguments[7];return(f=u?document.getElementById(u):l?document.querySelector(l):n.querySelector(".".concat(e)))?f=S(f,s,c,d):(t.selectors.buttonClass&&(e+=".".concat(t.selectors.buttonClass)),(f=S(f=(0,a.default)("button.".concat(e)),s,c,d)).innerHTML=r,h&&(0,i.default)(n,h)?n.insertBefore(f,h):n.appendChild(f)),o&&A(f,o),f}function T(e){E(d)||e.paused||w(r),e.paused||(_(f),v(f)),t.enableAutoValidation||R(h)}function x(){v(r),v(d),s&&(w(s),R(s)),R(f),w(f)}function j(){_(d),e.beginWaiting(),e.recordAgain()}function M(){e.submit()}function C(t){_(r),e.record(t)}function D(){g("Buttons: initEvents()"),b.on(u.default.USER_MEDIA_READY,(function(e){e.switchingFacingMode||function(e){T(e),E(r)&&!e.recordWhenReady&&R(r),t.enableAutoValidation&&_(h),e.recordWhenReady||(E(p)&&R(p),E(m)&&R(m))}(e)})).on(u.default.PREVIEW,(function(){v(r),v(f),_(p),_(m),w(d),R(d),t.enableAutoValidation||R(h)})).on(u.default.PAUSED,(function(){b.adjustButtonsForPause()})).on(u.default.RECORDING,(function(e){!function(e){e>1?x():(_(m),_(p),_(d),_(r))}(e)})).on(u.default.FIRST_FRAME_SENT,(function(){x()})).on(u.default.RESUMING,(function(){v(l),v(r),s&&(R(s),w(s))})).on(u.default.STOPPING,(function(){_(f),_(r),v(s),v(l)})).on(u.default.COUNTDOWN,(function(){_(r),_(m),_(p)})).on(u.default.SUBMITTING,(function(){g("Buttons: onSubmitting()"),_(h),_(d)})).on(u.default.RESETTING,(function(){_(h),b.reset()})).on(u.default.INVALID,(function(){t.enableAutoValidation&&_(h)})).on(u.default.VALID,(function(){t.enableAutoValidation&&R(h)})).on(u.default.SUBMITTED,(function(){_(f),_(d),_(r),_(h)})).on(u.default.HIDE,(function(){v(r),v(f),v(d),v(l),v(p),v(m)})).on(u.default.FORM_READY,(function(e){T(e)})).on(u.default.REPLAY_SHOWN,(function(){b.hide()})).on(u.default.GOING_BACK,(function(){v(d),w(r),w(h)})).on(u.default.ENABLING_AUDIO,(function(){g("Buttons: onEnablingAudio()"),_(r),_(p),_(m)})).on(u.default.DISABLING_AUDIO,(function(){g("Buttons: onDisablingAudio()"),_(r),_(p),_(m)})).on(u.default.STARTING_OVER,(function(){w(h)})).on(u.default.CONNECTED,(function(){t.loadUserMediaOnRecord&&E(r)&&R(r)})).on(u.default.DISCONNECTED,(function(){_(r),_(p),_(m)})).on(u.default.ERROR,(function(e){e.hideButtons&&e.hideButtons()&&t.adjustFormOnBrowserError&&b.hide()}))}this.enableSubmit=function(){R(h)},this.adjustButtonsForPause=function(){b.isCountingDown()||(s&&v(s),w(l),R(l),v(r),w(f),R(f))},this.reset=function(){t.debug("Buttons: reset()"),_(s),_(l),_(r),_(f),_(d),_(p),_(m)},this.isRecordAgainButtonEnabled=function(){return!d.disabled},this.isReady=function(){return!!r&&this.isRecordButtonEnabled()},this.isRecordButtonEnabled=function(){return!r.disabled},this.setSubmitButton=function(e){h=e},this.getSubmitButton=function(){return h},this.build=function(){(n=e.querySelector(".".concat(t.selectors.buttonsClass)))||(n=(0,a.default)("div.".concat(t.selectors.buttonsClass)),e.appendChild(n)),t.disableSubmit||(h?_(h):h=k(t.selectors.submitButtonClass,"Submit",null,!0,t.selectors.submitButtonId,"submit",t.selectors.submitButtonSelector,t.enableAutoValidation),!e.hasForm()&&h&&A(h,M)),r=k(t.selectors.recordButtonClass,t.text.buttons.record,C,!1),t.enablePause&&(s=k(t.selectors.pauseButtonClass,t.text.buttons.pause,e.pause,!1)),t.enablePause&&(l=k(t.selectors.resumeButtonClass,t.text.buttons.resume,e.resume,!1)),f=k(t.selectors.previewButtonClass,t.text.buttons.preview,e.stop,!1),d=k(t.selectors.recordAgainButtonClass,t.text.buttons.recordAgain,j,!1),t.audio&&t.audio.switch&&(m=O({id:"audioOffOption",name:"audio",value:"off",label:t.text.audioOff,checked:!t.isAudioEnabled(),changeHandler:function(){e.disableAudio()}}),p=O({id:"audioOnOption",name:"audio",value:"on",label:t.text.audioOn,checked:t.isAudioEnabled(),changeHandler:function(){e.enableAudio()}})),!y&&D(),y=!0},this.unload=function(){y&&(b.reset(),g("Buttons: unload()"),b.removeAllListeners(),y=!1)},this.hide=function(e){v(n),e&&e.deep&&(v(r),v(s),v(l),v(f),v(d),v(h),v(p),v(m))},this.show=function(){w(n)},this.isCountingDown=function(){return e.isCountingDown()}};(0,s.default)(l,c.default);n.default=l},{"../events":119,"../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":4,contains:25,hidden:61,hyperscript:63,inherits:66}],133:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("@babel/runtime/helpers/defineProperty")),o=r(e("document-visibility")),a=r(e("hidden")),s=r(e("insert-css")),u=r(e("safe-json-stringify")),c=r(e("inherits")),l=r(e("../../styles/css/main.min.css.js")),f=r(e("../events")),d=r(e("../resource")),h=r(e("../util/eventEmitter")),p=r(e("../util/videomailError")),m=r(e("./buttons")),y=r(e("./dimension")),b=r(e("./form")),g=r(e("./optionsWrapper")),v=r(e("./visuals")),w=function(e){h.default.call(this,e,"Container");var t,n,r,c=this,w=(0,o.default)(),E=new v.default(this,e),_=new m.default(this,e),R=new d.default(e),S=document.querySelector("html"),A=e.debug,O=!1,k=!1,T=!1;function x(){return t&&"FORM"===t.tagName?t:e.selectors.formId?document.getElementById(e.selectors.formId):function(){if(t)return t.closest("form")}()}function j(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];A("Container: initEvents (playerOnly = ".concat(t,")")),e.enableAutoUnload&&window.addEventListener("beforeunload",(function(e){c.unload(e)}),{once:!0}),t||w.onChange((function(t){n&&(t?(e.isAutoPauseEnabled()&&c.isCountingDown()&&c.resume(),c.emit(f.default.VISIBLE)):(e.isAutoPauseEnabled()&&(c.isCountingDown()||c.isRecording())&&c.pause("document invisible"),c.emit(f.default.INVISIBLE)))})),e.enableSpace&&(t||window.addEventListener("keypress",(function(t){var n=t.target.tagName;t.target.isContentEditable||"true"===t.target.contentEditable||!0===t.target.contentEditable||"INPUT"===n||"TEXTAREA"===n||32===t.code&&(t.preventDefault(),e.enablePause?E.pauseOrResume():E.recordOrStop())}))),c.on(f.default.ERROR,(function(t){!function(t){O=!0,t.stack?e.logger.error(t.stack):e.logger.error(t),e.displayErrors?E.error(t):E.reset()}(t),D(t),t.removeDimensions&&t.removeDimensions()&&C()})),t||c.on(f.default.LOADED_META_DATA,(function(){M()}))}function M(){if(e.video.stretch)C();else if(t){var n=E.getRecorderWidth(!0);if(n<1)throw p.default.create("Recorder width cannot be less than 1!",e);t.style.width="".concat(n,"px")}}function C(){t&&(t.style.width="auto")}function D(e){E.unload(e),_.unload(),r&&(r.unload(),r=void 0),c.endWaiting()}function N(t,n,r,i){r&&""!==r||(r=e.baseUrl),n&&e.submitWithVideomail&&(t.videomail=n.videomail),R.form(t,r,i)}function I(e,t,n,r,i){c.endWaiting(),e?c.emit(f.default.ERROR,e):(k=!0,r&&i&&i.body&&Object.keys(i.body).forEach((function(e){r[e]=i.body[e]})),c.emit(f.default.SUBMITTED,n,r||i),i&&"text/html"===i.type&&i.text&&(document.body.innerHTML=i.text))}function L(e){return e&&"POST"===e.toUpperCase()}!function(){if(e.hasDefinedWidth()&&e.video.width%2!=0)throw p.default.create("Width must be divisible by two.",e);if(e.hasDefinedHeight()&&e.video.height%2!=0)throw p.default.create("Height must be divisible by two.",e)}(),this.buildForm=function(){if(!r){var t=x();if(t){var n=(r=new b.default(c,t,e)).findSubmitButton();n&&_.setSubmitButton(n),r.build()}}},this.addPlayerDimensions=function(e){try{if(!e)throw new Error("Videomail data is missing for attaching player dimensions");var t=c.getReplay().getParentElement();return e.playerHeight=c.calculateHeight({responsive:!0,videoWidth:e.width,ratio:e.height/e.width},t),e.playerWidth=c.calculateWidth({responsive:!0,videoHeight:e.playerHeight,ratio:e.height/e.width}),e}catch(e){c.emit(f.default.ERROR,e)}},this.limitWidth=function(n){return y.default.limitWidth(t,n,e)},this.limitHeight=function(t){return y.default.limitHeight(t,e)},this.calculateWidth=function(t){return y.default.calculateWidth(g.default.merge(e,t))},this.calculateHeight=function(n,r){return r||(r=t||document.body),y.default.calculateHeight(r,g.default.merge(e,n))},this.hasElement=function(){return Boolean(t)},this.build=function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0;A("Container: build (playerOnly = ".concat(r).concat(i?', replayParentElement="'.concat(i,'"'):"",")"));try{var o;if(e.insertCss&&(0,s.default)(l.default,{prepend:!0}),!(t=document.getElementById(e.selectors.containerId))&&i)"string"==typeof i&&(i=document.getElementById(i)),null!==(o=i)&&void 0!==o&&o.classList.contains(e.selectors.containerClass)&&(t=i);!n&&j(r),M(),c.buildForm(),function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1?arguments[1]:void 0;A("Container: buildChildren (playerOnly = ".concat(n).concat(r?', replayParentElement="'.concat(r,'"'):"",")")),t&&t.classList.add(e.selectors.containerClass),n||_.build(),E.build(n,r)}(r,t?void 0:i),O?A("Container: building failed due to an error."):(A("Container: built."),n=!0,c.emit(f.default.BUILT))}catch(e){c.emit(f.default.ERROR,e)}},this.getSubmitButton=function(){return _.getSubmitButton()},this.querySelector=function(e){if(t)return t.querySelector(e)},this.beginWaiting=function(){S.classList&&S.classList.add("wait")},this.endWaiting=function(){S.classList&&S.classList.remove("wait")},this.appendChild=function(e){t&&t.appendChild(e)},this.insertBefore=function(e,n){t&&t.insertBefore(e,n)},this.unload=function(e){try{if(!n)return;A("Container: unload(".concat(e?(0,u.default)(e):"",")")),c.emit(f.default.UNLOADING),D(e),c.removeAllListeners(),n=k=!1}catch(e){c.emit(f.default.ERROR,e)}},this.show=function(){if(t&&((0,a.default)(t,!1),E.show(),!O)){var e=c.isPaused();e&&_.adjustButtonsForPause(),_.show(),c.isReplayShown()?c.emit(f.default.PREVIEW):c.emit(f.default.FORM_READY,{paused:e})}},this.hide=function(){A("Container: hide()"),O=!1,c.isRecording()&&c.pause(),E.hide(),k&&(_.hide(),(0,a.default)(t,!0))},this.startOver=function(e){try{c.emit(f.default.STARTING_OVER),k=!1,r.show(),E.back(e,(function(){e&&e.keepHidden?c.enableForm():c.show(e)}))}catch(e){c.emit(f.default.ERROR,e)}},this.showReplayOnly=function(){O=!1,c.isRecording()&&c.pause(),E.showReplayOnly(),k&&_.hide()},this.isNotifying=function(){return E.isNotifying()},this.isPaused=function(){return E.isPaused()},this.pause=function(e){E.pause(e)},this.validate=function(t,n){var o=!0,a=!0;if(e.enableAutoValidation?n?o=n:c.isNotifying()?o=!1:E.isConnected()?o=E.isUserMediaLoaded()||E.isReplayShown():E.isConnecting()&&(o=!1):(o=!1,T=!0),o){var s,u=null==t||null===(s=t.target)||void 0===s?void 0:s.name;u?c.emit(f.default.VALIDATING,{targetName:u}):c.emit(f.default.VALIDATING,t);var l,d,h=E.validate()&&_.isRecordAgainButtonEnabled();if(r){var p=r.getInvalidElement();if(p?(a=!1,l='Input "'.concat(p.name,'" seems wrong 🤔'),d=(0,i.default)({},p.name,p.value)):E.isHidden()||h||(_.isReady()||c.isRecording()||c.isPaused()||c.isCountingDown())&&(a=!1,l="Don't forget to record a video 😉",d={key:void 0}),a){var m,y,b,g=r.getRecipients(),v="to"in g,w="cc"in g,R="bcc"in g,S=(null===(m=g.to)||void 0===m?void 0:m.length)>0,A=(null===(y=g.cc)||void 0===y?void 0:y.length)>0,O=(null===(b=g.bcc)||void 0===b?void 0:b.length)>0;v?S||(w&&R?A||O||(a=!1):w?A||(a=!1):R&&O||(a=!1)):w&&(A||R&&!O&&(a=!1)),a||(l="At least one recipient is required")}}else a=h;a?c.emit(f.default.VALID):d?c.emit(f.default.INVALID,l,d):c.emit(f.default.INVALID,l),T=a}return a},this.disableForm=function(e){r&&r.disable(e)},this.enableForm=function(e){r&&r.enable(e)},this.hasForm=function(){return Boolean(r)},this.submitAll=function(t,n,i){A("Container: submitAll(".concat(n,': "').concat(i,'")'));var o=L(n);function a(){c.beginWaiting(),c.disableForm(!0),c.emit(f.default.SUBMITTING)}Boolean(t[e.selectors.keyInputName])?(a(),function(e,t,n){var i=r.transformFormData(e);L(t)||!t?(i.recordingStats=E.getRecordingStats(),i.width=E.getRecorderWidth(!0),i.height=E.getRecorderHeight(!0),navigator.connection&&(i.connection={downlink:"".concat(navigator.connection.downlink," Mbit/s"),effectiveType:navigator.connection.effectiveType,rtt:navigator.connection.rtt,type:navigator.connection.type}),R.post(i,n)):function(e){return e&&"PUT"===e.toUpperCase()}(t)&&R.put(i,n)}(t,n,(function(e,n,r){e?I(e,0,n,r):o?N(t,r,i,(function(e,t){I(e,0,n,r,t)})):I(null,0,n,r)}))):e.enableAutoSubmission&&(a(),N(t,null,i,(function(e,t){I(e,0,null,null,t)})))},this.isBuilt=function(){return n},this.isReplayShown=function(){return E.isReplayShown()},this.isDirty=function(){var e=!1;return r&&(E.isRecorderUnloaded()||k?e=!1:(c.isReplayShown()||c.isPaused())&&(e=!0)),e},this.getReplay=function(){return E.getReplay()},this.isOutsideElementOf=function(e){return e.parentNode!==t&&e!==t},this.hideForm=function(e){r&&r.hide(),_&&_.hide(e)},this.loadForm=function(e){r&&(r.loadVideomail(e),c.validate())},this.enableAudio=function(){e.setAudioEnabled(!0),c.emit(f.default.ENABLING_AUDIO)},this.disableAudio=function(){e.setAudioEnabled(!1),c.emit(f.default.DISABLING_AUDIO)},this.submit=function(){A("Container: submit()"),T&&r&&r.doTheSubmit()},this.isCountingDown=E.isCountingDown.bind(E),this.isRecording=E.isRecording.bind(E),this.record=E.record.bind(E),this.resume=E.resume.bind(E),this.stop=E.stop.bind(E),this.recordAgain=E.recordAgain.bind(E)};(0,c.default)(w,h.default);n.default=w},{"../../styles/css/main.min.css.js":148,"../events":119,"../resource":121,"../util/eventEmitter":126,"../util/videomailError":131,"./buttons":132,"./dimension":134,"./form":135,"./optionsWrapper":136,"./visuals":137,"@babel/runtime/helpers/defineProperty":3,"@babel/runtime/helpers/interopRequireDefault":4,"document-visibility":32,hidden:61,inherits:66,"insert-css":67,"safe-json-stringify":99}],134:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("number-is-integer")),o=r(e("./../util/videomailError"));function a(e,t){if(t.hasDefinedHeight()&&(e=e?Math.min(t.video.height,e):t.video.height),(0,i.default)(e)&&e<1)throw o.default.create("Got a video height less than 1 (".concat(e,") while figuring out the minimum!"),t);return e}n.default={limitWidth:function(e,t,n){var r,a=function(e){var t=0,n=e.getBoundingClientRect();return n&&(t=n.right-n.left),t<1&&(t=(n=document.body.getBoundingClientRect()).right-n.left),t}(e);if(r=t?a>0&&a<t?a:t:a,(0,i.default)(r)&&r<1)throw o.default.create("Limited width cannot be less than 1!",n);return r},limitHeight:function(e,t){if((0,i.default)(e)&&e<1)throw o.default.create("Passed limit-height argument cannot be less than 1!",t);var n=Math.min(e,document.documentElement.clientHeight);if(n<1)throw o.default.create("Limited height cannot be less than 1!",t);return n},calculateWidth:function(e){var t=e.videoHeight||null,n=e.ratio||e.getRatio();if(t=a(t,e),e.responsive&&(t=this.limitHeight(t,e)),(0,i.default)(t)&&t<1)throw o.default.create("Height cannot be smaller than 1 when calculating width.",e);var r=parseInt(t/n);if(r<1)throw o.default.create("Calculated width cannot be smaller than 1!",e);return r},calculateHeight:function(e,t){var n,r=t.videoWidth||null,s=t.ratio||t.getRatio();if(t.hasDefinedWidth()&&(r=t.video.width),(0,i.default)(r)&&r<1)throw o.default.create("Unable to calculate height when width is less than 1.",t);if(t.responsive&&(r=this.limitWidth(e,r,t)),r&&(n=parseInt(r*s)),(0,i.default)(n)&&n<1)throw o.default.create("Just calculated a height less than 1 which is wrong.",t);return a(n,t)}}},{"./../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,"number-is-integer":74}],135:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("get-form-data")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("inherits")),u=r(e("safe-json-stringify")),c=r(e("../events")),l=r(e("../util/eventEmitter")),f=r(e("../util/videomailError"));function d(e){return e.replace(/(^[,\s]+)|([,\s]+$)/g,"")}var h=function(e,t,n){l.default.call(this,n,"Form");var r,s=n.debug,h=this,p={subject:n.selectors.subjectInputName,from:n.selectors.fromInputName,to:n.selectors.toInputName,cc:n.selectors.ccInputName,bcc:n.selectors.bccInputName,body:n.selectors.bodyInputName,key:n.selectors.keyInputName,parentKey:n.selectors.parentKeyInputName,sendCopy:n.selectors.sendCopyInputName};function m(){return(0,i.default)(t,{includeDisabled:!0})}function y(e,n){for(var r,i=t.elements.length,o=0;o<i;o++)(n||!n&&("BUTTON"!==(r=t.elements[o]).tagName&&"submit"!==r.type))&&(t.elements[o].disabled=e)}function b(e){var t=e.name;return Object.values(p).includes(t)}function g(){for(var e=t.querySelectorAll("input, textarea, select"),n=[],r=0;r<e.length;r++){var i=e[r];b(i)&&n.push(i)}return n}this.transformFormData=function(e){var t={};return Object.keys(p).forEach((function(n){var r=p[n];if(r in e){var i=e[r];void 0===i||(t[n]=i)}})),t.from&&(t.from=d(t.from)),t.to&&(t.to=d(t.to)),t.cc&&(t.cc=d(t.cc)),t.bcc&&(t.bcc=d(t.bcc)),t},this.getRecipients=function(){var e=this.transformFormData(m()),t={};return"to"in e&&(t.to=e.to),"cc"in e&&(t.cc=e.cc),"bcc"in e&&(t.bcc=e.bcc),t},this.loadVideomail=function(e){s("Form: loadVideomail()");for(var r,i,o=t.elements.length,a=0;a<o;a++)e[i=(r=t.elements[a]).name]&&(r.value=e[i]),i!==n.selectors.subjectInputName&&i!==n.selectors.bodyInputName||(r.disabled=!0);t.setAttribute("method","put")},this.disable=function(e){y(!0,e)},this.enable=function(e){y(!1,e)},this.build=function(){if(s("Form: build()"),(r=t.querySelector('input[name="'.concat(n.selectors.keyInputName,'"]')))||(r=(0,a.default)("input",{name:n.selectors.keyInputName,type:"hidden"}),t.appendChild(r)),n.enableAutoValidation)for(var i=g(),u=0,l=i.length;u<l;u++){var d=i[u],p=d.type;"radio"===p||"select"===p?d.addEventListener("change",e.validate):d.addEventListener("input",e.validate)}this.on(c.default.PREVIEW,(function(e){e||r.value?e&&(r.value=e,r.dispatchEvent(new Event("input",{bubbles:!0}))):h.emit(c.default.ERROR,f.default.create("Videomail key for preview is missing!",n))})),this.on(c.default.GOING_BACK,(function(){r.value=null,r.dispatchEvent(new Event("input",{bubbles:!0}))})),this.on(c.default.INVALID,(function(){t.classList.add("invalid")})),this.on(c.default.VALID,(function(){t.classList.remove("invalid")})),this.on(c.default.ERROR,(function(e){var r;e.hideForm&&e.hideForm()&&n.adjustFormOnBrowserError?function(){for(var e=t.elements.length,n=0;n<e;n++)(0,o.default)(t.elements[n],!0);(0,o.default)(t,!0)}():e.hideButtons&&e.hideButtons()&&n.adjustFormOnBrowserError&&(r=h.findSubmitButton(),(0,o.default)(r,!0))})),this.on(c.default.BUILT,(function(){e.getSubmitButton().onclick=h.doTheSubmit.bind(h)}))},this.unload=function(){s("Form: unload()"),function(){for(var t=g(),n=0,r=t.length;n<r;n++){var i=t[n],o=i.type;"radio"===o||"select"===o?i.removeEventListener("change",e.validate):i.removeEventListener("input",e.validate)}}(),this.removeAllListeners(),e.getSubmitButton().onclick=null},this.doTheSubmit=function(n){return n?(s("Form: doTheSubmit(".concat((0,u.default)(n),")")),n.preventDefault()):s("Form: doTheSubmit()"),e.hasElement()&&e.submitAll(m(),t.getAttribute("method"),t.getAttribute("action")),!1},this.getInvalidElement=function(){for(var e=g(),t=0,n=e.length;t<n;t++)if(!e[t].validity.valid)return e[t];return null},this.findSubmitButton=function(){return t.querySelector("[type='submit']")},this.hide=function(){t&&(0,o.default)(t,!0)},this.show=function(){t&&(0,o.default)(t,!1)}};(0,s.default)(h,l.default);n.default=h},{"../events":119,"../util/eventEmitter":126,"../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,"get-form-data":50,hidden:61,hyperscript:63,inherits:66,"safe-json-stringify":99}],136:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("deepmerge"));n.default={merge:function(e,t){return(0,i.default)(e,t,{arrayMerge:function(e,t){return t}})}}},{"@babel/runtime/helpers/interopRequireDefault":4,deepmerge:28}],137:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("inherits")),s=r(e("safe-json-stringify")),u=r(e("../events")),c=r(e("../util/eventEmitter")),l=r(e("./visuals/inside/recorderInsides")),f=r(e("./visuals/notifier")),d=r(e("./visuals/recorder")),h=r(e("./visuals/replay")),p=function(e,t){c.default.call(this,t,"Visuals");var n,r,a=this,p=new h.default(this,t),m=new d.default(this,p,t),y=new l.default(this,t),b=new f.default(this,t),g=t.debug;function v(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0;g("Visuals: buildChildren (playerOnly = ".concat(r).concat(i?', replayParentElement="'.concat(i,'"'):"",")")),(t=e.querySelector("noscript"))&&((t=(0,o.default)("noscript")).innerHTML="Please enable Javascript",n.appendChild(t)),r||(b.build(),y.build()),p.build(i)}function w(){t.video.stretch?E():n&&m&&(n.style.width="".concat(a.getRecorderWidth(!0),"px"),n.style.height="".concat(a.getRecorderHeight(!0),"px"))}function E(){n&&(n.style.width="auto",n.style.height="auto")}function _(){return!a.isNotifying()&&!p.isShown()&&!a.isCountingDown()}this.getRatio=function(){return n.clientWidth?n.clientHeight/n.clientWidth:0},this.isCountingDown=function(){return y.isCountingDown()},this.build=function(){var i=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=arguments.length>1?arguments[1]:void 0;if(e){if(!(n=e.querySelector(".".concat(t.selectors.visualsClass)))){n=(0,o.default)("div.".concat(t.selectors.visualsClass));var c=e.querySelector(".".concat(t.selectors.buttonsClass));c&&!e.isOutsideElementOf(c)?e.insertBefore(n,c):e.appendChild(n)}n.classList.add("visuals")}w(),!r&&function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n||(g("Visuals: initEvents (playerOnly = ".concat(n,")")),a.on(u.default.USER_MEDIA_READY,(function(){r=!0,a.endWaiting(),e.enableForm(!1)})).on(u.default.PREVIEW,(function(){a.endWaiting()})).on(u.default.BLOCKING,(function(n){(n.hideForm||t.adjustFormOnBrowserError)&&e.disableForm(!0)})).on(u.default.PREVIEW_SHOWN,(function(){e.validate(void 0,!0)})).on(u.default.LOADED_META_DATA,(function(){w()})).on(u.default.ERROR,(function(e){e.removeDimensions&&e.removeDimensions()&&E()})))}(i),v(i,s),r=!0},this.querySelector=function(e){return n&&n.querySelector(e)},this.appendChild=function(e){n&&n.appendChild(e)},this.removeChild=function(e){n.removeChild(e)},this.reset=function(){this.endWaiting(),m.reset()},this.beginWaiting=function(){e.beginWaiting()},this.endWaiting=function(){e.endWaiting()},this.stop=function(e){m.stop(e),y.hidePause()},this.back=function(e,t){!t&&e&&(t=e,e={}),p.hide(),b.hide(),e&&e.keepHidden?(m.hide(),t&&t()):m.back(t)},this.recordAgain=function(){this.back((function(){t.loadUserMediaOnRecord?a.once(u.default.SERVER_READY,(function(){a.record()})):a.once(u.default.USER_MEDIA_READY,(function(){a.record()}))}))},this.unload=function(e){try{if(!r)return;g("Visuals: unload(".concat(e?(0,s.default)(e):"",")")),a.removeAllListeners(),m.unload(e),y.unload(e),p.unload(),r=!1}catch(e){this.emit(u.default.ERROR,e)}},this.isNotifying=function(){return b.isVisible()},this.isReplayShown=function(){return p.isShown()},this.pause=function(e){m.pause(e),y.showPause()},this.resume=function(){y.isCountingDown()?y.resumeCountdown():m.resume(),y.hidePause()},this.pauseOrResume=function(){_.call(this)&&(this.isRecording()?this.pause():m.isPaused()?this.resume():m.isReady()&&this.record())},this.recordOrStop=function(){_()&&(this.isRecording()?this.stop():m.isReady()&&this.record())},this.record=function(){t.video.countdown?(this.emit(u.default.COUNTDOWN),y.startCountdown(m.record.bind(m))):m.record()},this.getRecorder=function(){return m},this.getReplay=function(){return p},this.validate=function(){return m.validate()&&this.isReplayShown()},this.getRecordingStats=function(){return m.getRecordingStats()},this.getAudioSampleRate=function(){return m.getAudioSampleRate()},this.isPaused=function(){return m.isPaused()},this.error=function(e){b.error(e)},this.hide=function(){n&&((0,i.default)(n,!0),this.emit(u.default.HIDE))},this.isHidden=function(){return!r||(n?(0,i.default)(n):void 0)},this.showVisuals=function(){n&&(0,i.default)(n,!1)},this.show=function(){!this.isReplayShown()&&n&&m.build(),this.showVisuals()},this.showReplayOnly=function(){p.show(),this.show(),m.hide(),b.hide()},this.isRecorderUnloaded=function(){return m.isUnloaded()},this.isConnecting=function(){return m.isConnecting()},this.getRecorderWidth=function(e){return m.getRecorderWidth(e)},this.getRecorderHeight=function(e,t){return m.getRecorderHeight(e,t)},this.limitWidth=function(n){return e.limitWidth(n,t)},this.limitHeight=function(t){return e.limitHeight(t)},this.calculateWidth=function(t){return e.calculateWidth(t)},this.calculateHeight=function(t){return e.calculateHeight(t)},this.getReplay=function(){return p},this.getBoundingClientRect=function(){return n&&n.getBoundingClientRect()},this.checkTimer=function(e){y.checkTimer(e)},this.isNotifierBuilt=function(){return b&&b.isBuilt()},this.isReplayShown=p.isShown.bind(p),this.hideReplay=p.hide.bind(p),this.hideRecorder=m.hide.bind(m),this.isRecording=m.isRecording.bind(m),this.isUserMediaLoaded=m.isUserMediaLoaded.bind(m),this.isConnected=m.isConnected.bind(m)};(0,a.default)(p,c.default);n.default=p},{"../events":119,"../util/eventEmitter":126,"./visuals/inside/recorderInsides":143,"./visuals/notifier":144,"./visuals/recorder":145,"./visuals/replay":146,"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63,inherits:66,"safe-json-stringify":99}],138:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){var n,r,a,s,u=this;function c(e){s||(t.debug("Countdown",a),--a<1?function(e){u.unload(),u.hide(),setTimeout((function(){e()}),0)}(e):n.innerHTML=a)}this.start=function(e){n.innerHTML=a=t.video.countdown,this.show(),r=setInterval(c.bind(this,e),950)},this.pause=function(){s=!0},this.resume=function(){s=!1},this.build=function(){(n=e.querySelector(".countdown"))?this.hide():(n=(0,o.default)("p.countdown"),this.hide(),e.appendChild(n))},this.show=function(){(0,i.default)(n,!1)},this.isCountingDown=function(){return Boolean(r)},this.unload=function(){clearInterval(r),s=!1,r=null},this.hide=function(){(0,i.default)(n,!0),this.unload()}};var i=r(e("hidden")),o=r(e("hyperscript"))},{"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63}],139:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){s.default.call(this,t,"Facing Mode");var n,r=this;this.build=function(){(n=e.querySelector(".facingMode"))?this.hide():((n=(0,o.default)("button.facingMode")).innerHTML="⤾",n.onclick=function(e){e&&e.preventDefault();try{r.emit(a.default.SWITCH_FACING_MODE)}catch(e){r.emit(a.default.ERROR,e)}},this.hide(),e.appendChild(n)),r.on(a.default.ERROR,(function(){r.hide()}))},this.hide=function(){(0,i.default)(n,!0)},this.show=function(){(0,i.default)(n,!1)}};var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("./../../../../events")),s=r(e("./../../../../util/eventEmitter"))},{"./../../../../events":119,"./../../../../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63}],140:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){if(!t.text.pausedHeader)throw a.default.create("Paused header cannot be empty",t);var n,r,s;function u(){return t.text.pausedHint}this.build=function(){n=e.querySelector(".paused"),(r=e.querySelector(".pausedHeader"))?(this.hide(),r.innerHTML=t.text.pausedHeader,u()&&(s.innerHTML=t.text.pausedHint)):(n=(0,o.default)("div.paused"),r=(0,o.default)("p.pausedHeader"),this.hide(),r.innerHTML=t.text.pausedHeader,n.appendChild(r),u()&&(s=e.querySelector(".pausedHint"),(s=(0,o.default)("p.pausedHint")).innerHTML=t.text.pausedHint,n.appendChild(s)),e.appendChild(n))},this.hide=function(){(0,i.default)(n,!0)},this.show=function(){(0,i.default)(n,!1)}};var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("./../../../../util/videomailError"))},{"./../../../../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63}],141:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t;this.build=function(){(t=e.querySelector(".recordNote"))?this.hide():(t=(0,o.default)("p.recordNote"),this.hide(),e.appendChild(t))},this.stop=function(){this.hide(),t.classList.remove("near"),t.classList.remove("nigh")},this.setNear=function(){t.classList.add("near")},this.setNigh=function(){t.classList.add("nigh")},this.hide=function(){(0,i.default)(t,!0)},this.show=function(){(0,i.default)(t,!1)}};var i=r(e("hidden")),o=r(e("hyperscript"))},{"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63}],142:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t,n){var r,a,s,u=!1,c=!1;function l(e,t){return e>=n.video.limitSeconds*t}function f(){var e,i=parseInt(s/60,10),o=s-60*i;if(!u||!c){var a=n.video.limitSeconds-s;!function(e){return!(u||!l(e,.6)||(u=!0,0))}(a)?function(e){return!(c||!l(e,.8)||(c=!0,0))}(a)&&(t.setNigh(),r.classList.add("nigh"),n.debug("End is nigh, ".concat(s," seconds to go"))):(t.setNear(),r.classList.add("near"),n.debug("End is near, ".concat(s," seconds to go")))}r.innerHTML="".concat(i,":").concat((e=o)<10?"0".concat(e):e)}function d(){(0,i.default)(r,!0)}function h(){return n.video.limitSeconds}this.check=function(t){var n=h()-Math.floor(t.intervalSum/1e3);n!==s&&(s=n,f(),s<1&&e.stop(!0))},this.start=function(){s=h(),u=c=!1,a=!0,f(),r.classList.remove("near"),r.classList.remove("nigh"),(0,i.default)(r,!1)},this.pause=function(){t.hide()},this.resume=function(){t.show()},this.stop=function(){null!==s&&a&&(n.debug("Stopping record timer. Was recording for about ~".concat(h()-s," seconds.")),d(),t.stop(),s=null,a=!1)},this.build=function(){(r=e.querySelector(".recordTimer"))?d():(r=(0,o.default)("p.recordTimer"),d(),e.appendChild(r))}};var i=r(e("hidden")),o=r(e("hyperscript"))},{"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63}],143:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("inherits")),o=r(e("./../../../events")),a=r(e("./../../../util/browser")),s=r(e("./../../../util/eventEmitter")),u=r(e("./recorder/countdown")),c=r(e("./recorder/facingMode")),l=r(e("./recorder/pausedNote")),f=r(e("./recorder/recordNote")),d=r(e("./recorder/recordTimer")),h=function(e,t){s.default.call(this,t,"RecorderInsides");var n,r,i,h,p=this,m=t.debug,y=new f.default(e),b=new d.default(e,y,t),g=new a.default(t);function v(){p.hidePause(),p.hideCountdown(),b.stop(),h&&h.hide()}function w(){m("RecorderInsides: initEvents()"),p.on(o.default.USER_MEDIA_READY,(function(){h&&h.show()})).on(o.default.RECORDING,(function(){b.start()})).on(o.default.RESUMING,(function(){b.resume()})).on(o.default.STOPPING,(function(){b.stop()})).on(o.default.PAUSED,(function(){p.isCountingDown()?n.pause():b.pause()})).on(o.default.ERROR,v).on(o.default.RESETTING,v).on(o.default.HIDE,(function(){p.hideCountdown()}))}t.video.countdown&&(n=new u.default(e,t)),t.video.facingModeButton&&g.isMobile()&&(h=new c.default(e,t)),t.enablePause&&(r=new l.default(e,t)),this.build=function(){m("RecorderInsides: build()"),n&&n.build(),r&&r.build(),h&&h.build(),y.build(),b.build(),!i&&w(),i=!0},this.unload=function(){n&&n.unload(),i=!1},this.showPause=function(){r&&r.show()},this.hidePause=function(){r&&r.hide()},this.hideCountdown=function(){n&&n.hide()},this.startCountdown=function(e){n&&n.start(e)},this.resumeCountdown=function(){n&&n.resume()},this.isCountingDown=function(){return n&&n.isCountingDown()},this.checkTimer=function(e){b.check(e)}};(0,i.default)(h,s.default);n.default=h},{"./../../../events":119,"./../../../util/browser":124,"./../../../util/eventEmitter":126,"./recorder/countdown":138,"./recorder/facingMode":139,"./recorder/pausedNote":140,"./recorder/recordNote":141,"./recorder/recordTimer":142,"@babel/runtime/helpers/interopRequireDefault":4,inherits:66}],144:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("inherits")),s=r(e("../../events")),u=r(e("../../util/eventEmitter")),c="notifierMessage",l=function(e,t){u.default.call(this,t,"Notifier");var n,r,a,l,f,d=this,h=t&&t.debug;function p(){h("Notifier: initEvents()"),d.on(s.default.CONNECTING,(function(){d.notify("Connecting …")})).on(s.default.LOADING_USER_MEDIA,(function(){d.notify("Loading webcam …")})).on(s.default.USER_MEDIA_READY,(function(){t.video.stretch?(n.style.width="auto",n.style.height="".concat(e.getRecorderHeight(!0,!0),"px")):(n.style.width="".concat(e.getRecorderWidth(!0),"px"),n.style.height="".concat(e.getRecorderHeight(!0),"px")),d.hide()})).on(s.default.LOADED_META_DATA,(function(){})).on(s.default.PREVIEW,(function(){d.hide()})).on(s.default.STOPPING,(function(n){!function(n){var r="";e.beginWaiting(),n&&(h("Limit reached"),r+="".concat(t.text.limitReached,".<br/>")),r+="".concat(t.text.sending," …"),d.notify(r,null,{stillWait:!0,entertain:t.notifier.entertain})}(n)})).on(s.default.PROGRESS,(function(e,n){!function(e,n){var r;t.isAudioEnabled()?(r="Video: ".concat(e),n&&(r+=", Audio: ".concat(n))):r=e,d.setExplanation(r)}(e,n)})).on(s.default.BEGIN_VIDEO_ENCODING,(function(){!function(){e.beginWaiting();var n="".concat(t.text.encoding," …");d.notify(n,null,{stillWait:!0,entertain:t.notifier.entertain}),b()}()})).on(s.default.UNLOADING,(function(){d.notify("Unloading …")})).on(s.default.DISCONNECTED,(function(){d.notify("Disconnected")})).on(s.default.CONNECTED,(function(){d.notify("Connected"),t.loadUserMediaOnRecord&&d.hide()}))}function m(){if(t.notifier.entertain){if(!l){var e=Math.floor(Math.random()*t.notifier.entertainLimit+1);n.className="notifier entertain ".concat(t.notifier.entertainClass).concat(e),a=setTimeout(m,t.notifier.entertainInterval),l=!0}}else y()}function y(){n&&n.classList.remove("entertain"),clearTimeout(a),a=null,l=!1}function b(){r&&(0,i.default)(r,!0)}function g(){return document.getElementById(c)}this.error=function(e){var n=e.message?e.message.toString():e.toString(),r=e.explanation?e.explanation.toString():null;n||t.debug("Weird empty error message generated for error",e),d.notify(n,r,{blocking:!0,problem:!0,hideForm:e.hideForm&&e.hideForm(),classList:e.getClassList&&e.getClassList(),removeDimensions:e.removeDimensions&&e.removeDimensions()})},this.setExplanation=function(e){r||(r=(0,o.default)("p",{className:"explanation"}),n?n.appendChild(r):t.logger.warn("Unable to show explanation because notifyElement is empty:",e)),r.innerHTML=e,(0,i.default)(r,!1)},this.build=function(){t.debug("Notifier: build()"),(n=e.querySelector(".notifier"))?this.hide():(n=(0,o.default)(".notifier"),this.hide(),e.appendChild(n)),!f&&p(),f=!0},this.hide=function(){var e;y(),n&&((0,i.default)(n,!0),n.classList.remove("blocking")),(e=g())&&(0,i.default)(e,!0),b()},this.isVisible=function(){return!!f&&(n&&!(0,i.default)(n))},this.isBuilt=function(){return f},this.notify=function(a,u){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},f=[a,u].filter(Boolean);t.debug("Notifier: notify(".concat(f.join(", "),")"));var d=!!l.stillWait&&l.stillWait,h=!!l.entertain&&l.entertain,p=!!l.blocking&&l.blocking,b=!!l.hideForm&&l.hideForm,v=!!l.classList&&l.classList,w=!!l.removeDimensions&&l.removeDimensions,E=g();if(!E&&n){var _=(0,o.default)("h2",{id:c});n.appendChild(_)}E=g(),n&&E&&r&&n.insertBefore(E,r),n&&(h||(n.className="notifier"),v&&v.forEach((function(e){n.classList.add(e)})),w&&(n.style.width="auto",n.style.height="auto")),p?(n&&n.classList.add("blocking"),this.emit(s.default.BLOCKING,{hideForm:b})):this.emit(s.default.NOTIFYING),e.hideReplay(),e.hideRecorder(),function(e,n){var r=g();if(r){if(t.debug("Notifier: setMessage(".concat(e,")")),e.length>0){var o=!!n.problem&&n.problem;r.innerHTML=(o?"☹ ":"")+e}else t.logger.warn("Not going to update notifierMessage element because message is empty",e);(0,i.default)(r,!1)}}(a,l),u&&u.length>0&&this.setExplanation(u),h?m():y(),e.showVisuals(),n&&(0,i.default)(n,!1),!d&&e.endWaiting()}};(0,a.default)(l,u.default);n.default=l},{"../../events":119,"../../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63,inherits:66}],145:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("animitter")),o=r(e("canvas-to-buffer")),a=r(e("deepmerge")),s=r(e("hidden")),u=r(e("hyperscript")),c=r(e("inherits")),l=r(e("safe-json-stringify")),f=r(e("websocket-stream")),d=r(e("../../constants")),h=r(e("../../events")),p=r(e("../../util/browser")),m=r(e("../../util/eventEmitter")),y=r(e("../../util/humanize")),b=r(e("../../util/pretty")),g=r(e("../../util/videomailError")),v=r(e("./userMedia")),w="°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ",E=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};m.default.call(this,r,"Recorder");var c=new p.default(r),E=(0,a.default)(r,{image:{quality:c.isMobile()?r.image.quality-.05:r.image.quality}});if(!E.video||!E.video.fps)throw g.default.create("FPS must be defined",E);var _,R,S,A,O,k,T,x,j,M,C,D,N,I,L,P,B,U,F,q,W,H,V,z,G,$,Y=this,K=E.debug,J=null,X=0,Q=0,Z=E.video.facingMode,ee={},te=0,ne=0;function re(e,t){if(P)if(P.destroyed)ie(),Y.emit(h.default.ERROR,g.default.create("Already disconnected","Sorry, connection to the server has been destroyed. Please reload.",E));else{var n=t&&t.onFlushedCallback;try{P.write(e,(function(){if(n)try{n(t)}catch(e){Y.emit(h.default.ERROR,g.default.create("Failed to write stream buffer","stream.write() failed because of ".concat((0,b.default)(e)),E))}}))}catch(e){Y.emit(h.default.ERROR,g.default.create("Failed writing to server","stream.write() failed because of ".concat((0,b.default)(e)),E))}}}function ie(){clearInterval(V)}function oe(e){X++,re(e.toBuffer())}function ae(){R&&(0,s.default)(R,!1)}function se(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{K("Recorder: onUserMediaReady()",(0,l.default)(t));var n=t.switchingFacingMode;D=F=I=N=!1,C=!0,n||(e=(0,i.default)({fps:E.video.fps},Ae),_=e.getRequestAnimationFrameObject(),J=e),ae(),t.recordWhenReady&&Y.record(),Y.emit(h.default.USER_MEDIA_READY,{switchingFacingMode:t.switchingFacingMode,paused:Y.isPaused(),recordWhenReady:t.recordWhenReady})}catch(e){Y.emit(h.default.ERROR,e)}}function ue(){return"".concat((te/(Q||1)*100).toFixed(2),"%")}function ce(){return"".concat((ne/(X||1)*100).toFixed(2),"%")}function le(){T||(T=ue()),x||(x=ce()),Y.emit(h.default.PROGRESS,T,x)}function fe(e){if(!U){B=!0,K("Recorder: initializing web socket to %s",E.socketUrl),Y.emit(h.default.CONNECTING);var t="".concat(E.socketUrl,"?").concat(encodeURIComponent(d.default.SITE_NAME_LABEL),"=").concat(encodeURIComponent(E.siteName));try{P=(0,f.default)(t,{perMessageDeflate:!1,objectMode:!0})}catch(e){var n;B=U=!1,n=void 0===f.default?g.default.create("There is no websocket","Cause: ".concat((0,b.default)(e)),E):g.default.create("Failed to connect to server","Please upgrade your browser. Your current version does not seem to support websockets.",E,{browserProblem:!0}),Y.emit(h.default.ERROR,n)}P&&(P.on("close",(function(e){K("".concat(w,"Stream has closed")),B=U=!1,e?Y.emit(h.default.ERROR,e||"Unhandled websocket error"):(Y.emit(h.default.DISCONNECTED),we())})),P.on("connect",(function(){K("".concat(w,"Stream *connect* event emitted"));var t=this.socket.readyState===WebSocket.CLOSING;U||t||I||(U=!0,B=I=!1,Y.emit(h.default.CONNECTED),e&&e())})),P.on("data",(function(e){var t;K("".concat(w,"Stream *data* event emitted"));try{t=JSON.parse(e.toString())}catch(t){K("Failed to parse command:",t),Y.emit(h.default.ERROR,g.default.create("Invalid server command","Contact us asap. Bad command was ".concat(e.toString(),". "),E))}finally{ye.call(Y,t)}})),P.on("error",(function(e){var t;K("".concat(w,"Stream *error* event emitted: ").concat(e.message)),B=U=!1,t=c.isIOS()?g.default.create(e,"iPhones cannot maintain a live connection for too long. Original error message is: ".concat(e.toString()),E):g.default.create("Data exchange interrupted","Please check your network connection and reload",E),Y.emit(h.default.ERROR,t)})),P.on("drain",(function(){K("".concat(w,"Stream *drain* event emitted (should not happen!)"))})),P.on("preend",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("end",(function(){K("".concat(w,"Stream *end* event emitted"))})),P.on("drain",(function(){K("".concat(w,"Stream *drain* event emitted"))})),P.on("pipe",(function(){K("".concat(w,"Stream *pipe* event emitted"))})),P.on("unpipe",(function(){K("".concat(w,"Stream *unpipe* event emitted"))})),P.on("resume",(function(){K("".concat(w,"Stream *resume* event emitted"))})),P.on("uncork",(function(){K("".concat(w,"Stream *uncork* event emitted"))})),P.on("readable",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("prefinish",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("finish",(function(){K("".concat(w,"Stream *preend* event emitted"))})))}}function de(e){D=!1,Re(),K("Recorder: userMediaErrorCallback(), name: ".concat(e.name,", message: ").concat(e.message," and Webcam characteristics: ").concat((0,l.default)(S.getCharacteristics())));var t=Y.listeners(h.default.ERROR);if(t&&t.length)e.name!==g.default.MEDIA_DEVICE_NOT_SUPPORTED?Y.emit(h.default.ERROR,g.default.create(e,E)):K("Recorder: ignore user media error",e),O=setTimeout(fe,E.timeouts.userMedia);else{if(!I)throw K("Recorder: no error listeners attached but throwing error",e),g.default.create(e,"Unable to process this error since there are no error listeners anymore.",E);K("Recorder: already unloaded. Not going to throw error",e)}}function he(e,t){if(K("Recorder: getUserMediaCallback()",(0,l.default)(t)),U&&(be()||!ge()||F))try{Re(),S.init(e,(function(){se(t)}),oe.bind(Y),(function(e){Y.emit(h.default.ERROR,e)}),t)}catch(e){Y.emit(h.default.ERROR,e)}}function pe(e){if(!navigator)throw new Error("Navigator is missing!");if(K("Recorder: loadGenuineUserMedia()"),Y.emit(h.default.ASKING_WEBCAM_PERMISSION),navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){var t={video:{facingMode:Z,frameRate:{ideal:E.video.fps}},audio:E.isAudioEnabled()};c.isOkSafari()||(E.hasDefinedWidth()?t.video.width={ideal:E.video.width}:t.video.width={ideal:Y.limitWidth()},E.hasDefinedHeight()&&(t.video.height={ideal:E.video.height})),K("Recorder: navigator.mediaDevices.getUserMedia()",(0,l.default)(t)),navigator.mediaDevices.getSupportedConstraints&&K("Recorder: navigator.mediaDevices.getSupportedConstraints()",(0,l.default)(navigator.mediaDevices.getSupportedConstraints()));var n=navigator.mediaDevices.getUserMedia(t);if(!n)throw g.default.create("Sorry, your browser is unable to use cameras.","Try a different browser with better user media functionalities.",E);n.then((function(t){he(t,e)})).catch(de)}else K("Recorder: navigator.getUserMedia()"),navigator.getUserMedia_({video:!0,audio:E.isAudioEnabled()},he,de)}function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(C)return K("Recorder: skipping loadUserMedia() because it is already loaded"),se(e),!1;if(D)return K("Recorder: skipping loadUserMedia() because it is already asking for permission"),!1;K("Recorder: loadUserMedia(".concat((0,l.default)(e),")")),Y.emit(h.default.LOADING_USER_MEDIA);try{A=setTimeout((function(){Y.isReady()||Y.emit(h.default.ERROR,c.getNoAccessIssue())}),E.timeouts.userMedia),D=!0,pe(e)}catch(e){if(K("Recorder: failed to load genuine user media"),D=!1,!Y.listeners(h.default.ERROR).length)throw K("Recorder: no error listeners attached but throwing exception",e),e;Y.emit(h.default.ERROR,e)}}function ye(e){var t;if(!I)try{switch(e.args?K("Server commanded: ".concat(e.command," with ").concat((0,l.default)(e.args))):K("Server commanded: ".concat(e.command)),e.command){case"ready":this.emit(h.default.SERVER_READY),A||(E.loadUserMediaOnRecord?ae():me());break;case"preview":!function(e){te=ne=X=Q=0,x=T=null,W=e.key,e.mp4&&n.setMp4Source("".concat(e.mp4+d.default.SITE_NAME_LABEL,"/").concat(E.siteName,"/videomail.mp4"),!0),e.webm&&n.setWebMSource("".concat(e.webm+d.default.SITE_NAME_LABEL,"/").concat(E.siteName,"/videomail.webm"),!0),Y.hide();var t=Y.getRecorderWidth(!0),r=Y.getRecorderHeight(!0);Y.emit(h.default.PREVIEW,W,t,r),H=Date.now()-L,ee.waitingTime=H,E.debug&&K("While recording, %s have been transferred and waiting time was %s",y.default.filesize(k,2),y.default.toTime(H))}(e.args);break;case"error":this.emit(h.default.ERROR,g.default.create("Oh no, server error!",e.args.err.toString()||"(No message given)",E));break;case"confirmFrame":t=e.args,te=t.frame?t.frame:te,T=ue(),le();break;case"confirmSample":!function(e){ne=e.sample?e.sample:ne,x=ce(),le()}(e.args);break;case"beginAudioEncoding":this.emit(h.default.BEGIN_AUDIO_ENCODING);break;case"beginVideoEncoding":this.emit(h.default.BEGIN_VIDEO_ENCODING);break;default:this.emit(h.default.ERROR,"Unknown server command: ".concat(e.command))}}catch(e){Y.emit(h.default.ERROR,e)}}function be(){return e.isNotifying()}function ge(){return!R||(0,s.default)(R)}function ve(e,n,r){if(!r&&n&&n.constructor===Function&&(r=n,n=null),U){if(P){K(n?"$ ".concat(e," with ").concat((0,l.default)(n)):"$ ".concat(e));var i={command:e,args:n};re(t.from((0,l.default)(i))),r&&setTimeout((function(){r()}),0)}}else K("Reconnecting for the command",e,"…"),fe((function(){ve(e,n),r&&r()}))}function we(){J&&J.dispose()}function Ee(){return J.getElapsedTime()}function _e(){K("Recorder: reInitializeAudio()"),Re(),S&&S.stop(),C=W=j=M=null,me()}function Re(){A&&(K("Recorder: clearUserMediaTimeout()"),A&&clearTimeout(A),A=null)}function Se(e){1===(e&&e.frameNumber)&&Y.emit(h.default.FIRST_FRAME_SENT)}function Ae(n,r){try{if(!Y.isPaused()&&P&&M){if(0===Q&&Y.emit(h.default.SENDING_FIRST_FRAME),Q++,M.drawImage(S.getRawVisuals(),0,0,j.width,j.height),$=z.toBuffer(),(G=$.length)<1)throw g.default.create("Failed to extract webcam data.",E);k+=G;var i=t.from((0,l.default)({frameNumber:Q}));re(t.concat([$,i]),{frameNumber:Q,onFlushedCallback:Se}),e.checkTimer({intervalSum:r})}}catch(e){Y.emit(h.default.ERROR,e)}}function Oe(e){if(J){var t=Y.isRecording();J.stop(),J.setRequestAnimationFrameObject(e),t&&J.start()}}function ke(){E.hasDefinedWidth()&&(R.width=Y.getRecorderWidth(!0)),E.hasDefinedHeight()&&(R.height=Y.getRecorderHeight(!0))}function Te(){K("Recorder: initEvents()"),Y.on(h.default.SUBMITTING,(function(){N=!0})).on(h.default.SUBMITTED,(function(){N=!1})).on(h.default.BLOCKING,(function(){F=!0,Re()})).on(h.default.HIDE,(function(){Y.hide()})).on(h.default.LOADED_META_DATA,(function(){ke()})).on(h.default.DISABLING_AUDIO,(function(){_e()})).on(h.default.ENABLING_AUDIO,(function(){_e()})).on(h.default.INVISIBLE,(function(){!function(){K("Recorder: loopWithTimeouts()");var e,t=1e3/E.video.fps,n=0;Oe({requestAnimationFrame:function(r){return setTimeout((function(){e=Date.now(),r(),n=Date.now()-e}),t-n)},cancelAnimationFrame:function(e){clearTimeout(e)}})}()})).on(h.default.VISIBLE,(function(){K("Recorder: restoreAnimationFrameObject()"),Oe(_)})).on(h.default.SWITCH_FACING_MODE,(function(){!function(){if(!c.isMobile())return!1;"user"===Z?Z="environment":"environment"===Z?Z="user":K("Recorder: unsupported facing mode",Z),pe({switchingFacingMode:!0})}()}))}function xe(){var t;if(S){var n=S.getVideoWidth();t=n<1?e.getRatio():S.getVideoHeight()/n}else t=E.getRatio();return t}this.getRecordingStats=function(){return ee},this.getAudioSampleRate=function(){return S.getAudioSampleRate()},this.stop=function(e){K("stop(".concat((0,l.default)(e),")"));var t=e.limitReached;this.emit(h.default.STOPPING,t),J.complete();var r=this;setTimeout((function(){L=Date.now(),ee={avgFps:Q/Ee()*1e3,wantedFps:E.video.fps,avgInterval:Ee()/Q,wantedInterval:1e3/E.video.fps,intervalSum:Ee(),framesCount:Q,videoType:n.getVideoType()},E.isAudioEnabled()&&(ee.samplesCount=X,ee.sampleRate=S.getAudioSampleRate()),ve("stop",ee,(function(){r.emit(h.default.STOPPED,{recordingStats:ee})})),r.reset()}),60)},this.back=function(e){this.emit(h.default.GOING_BACK),ae(),this.reset(),ve("back",e)},this.unload=function(e){var t;!I&&q&&(e&&(t=e.name||e.statusText||e.toString()),K("Recorder: unload()".concat(t?", cause: ".concat(t):"")),this.reset(),Re(),S&&S.unloadRemainingEventListeners(),N||P&&(K("Recorder: ending stream ..."),P.destroy(),P=void 0),I=!0,q=B=U=!1)},this.reset=function(){I||(K("Recorder: reset()"),this.emit(h.default.RESETTING),we(),S&&S.stop(),n.reset(),C=W=j=M=$=G=null)},this.validate=function(){return U&&null===j},this.isReady=function(){return S.isReady()},this.pause=function(e){var n=e&&e.event;n instanceof window.Event&&(e.eventType=n.type),K(e?"pause() at frame ".concat(Q," with ").concat((0,l.default)(e)):"pause() at frame ".concat(Q)),S.pause(),J.stop(),this.emit(h.default.PAUSED),V=window.setInterval((function(){K("Recorder: pinging..."),re(t.from(""))}),E.timeouts.pingInterval)},this.isPaused=function(){return S&&S.isPaused()},this.resume=function(){K("Recorder: resume() with frame ".concat(Q)),ie(),this.emit(h.default.RESUMING),S.resume(),J.start()},this.record=function(){if(I)return!1;if(!U)return K("Recorder: reconnecting before recording ..."),fe((function(){Y.once(h.default.USER_MEDIA_READY,Y.record)})),!1;if(!C)return E.loadUserMediaOnRecord?me({recordWhenReady:!0}):Y.emit(h.default.ERROR,g.default.create("Load and enable your camera first",E)),!1;try{j=S.createCanvas()}catch(e){return Y.emit(h.default.ERROR,g.default.create(e,E)),!1}return M=j.getContext("2d"),j.width?j.height?(k=0,z=new o.default(j,E.image.types,E.image.quality),K("Recorder: record()"),S.record(),Y.emit(h.default.RECORDING,Q),J.on("update",(function(e,t){var n=Q/t*1e3;K("Recorder: avgFps = ".concat(Math.round(n),", framesCount = ").concat(Q))})),void J.start()):(Y.emit(h.default.ERROR,g.default.create("Canvas has an invalid height.",E)),!1):(Y.emit(h.default.ERROR,g.default.create("Canvas has an invalid width.",E)),!1)},this.build=function(){var t=c.checkRecordingCapabilities();t||(t=c.checkBufferTypes()),t?this.emit(h.default.ERROR,t):((R=e.querySelector("video.".concat(E.selectors.userMediaClass)))||(R=(0,u.default)("video.".concat(E.selectors.userMediaClass)),e.appendChild(R)),ke(),R.muted=!0,R.setAttribute("playsinline",!0),R.setAttribute("webkit-playsinline","webkit-playsinline"),R.style.transform="rotateY(180deg)",R.style["-webkit-transform"]="rotateY(180deg)",R.style["-moz-transform"]="rotateY(180deg)",E.video.stretch&&(R.style.width="100%"),S||(S=new v.default(this,E)),ae(),q?E.loadUserMediaOnRecord&&me():(Te(),U?E.loadUserMediaOnRecord||me():fe()),q=!0)},this.isPaused=function(){return S&&S.isPaused()&&!J.isRunning()},this.isRecording=function(){return J&&J.isRunning()&&!this.isPaused()&&!be()&&P&&!P.destroyed},this.hide=function(){ge()||(R&&(0,s.default)(R,!0),Re(),O&&(K("Recorder: clearRetryTimeout()"),clearTimeout(O),O=null))},this.isUnloaded=function(){return I},this.getRecorderWidth=function(e){return S&&S.hasVideoWidth()?S.getRawWidth(e):e&&E.hasDefinedWidth()?this.limitWidth(E.video.width):void 0},this.getRecorderHeight=function(e,t){return S&&t?R.getBoundingClientRect().height:S?S.getRawHeight(e):e&&E.hasDefinedHeight()?this.calculateHeight(e):void 0},this.calculateWidth=function(t){var n;return S?n=S.getVideoHeight():R&&(n=R.videoHeight||R.height),e.calculateWidth({responsive:t,ratio:xe(),videoHeight:n})},this.calculateHeight=function(t){var n;return S?n=S.getVideoWidth():R&&(n=R.videoWidth||R.width),e.calculateHeight({responsive:t,ratio:xe(),videoWidth:n})},this.getRawVisualUserMedia=function(){return R},this.isConnected=function(){return U},this.isConnecting=function(){return B},this.limitWidth=function(t){return e.limitWidth(t)},this.limitHeight=function(t){return e.limitHeight(t)},this.isUserMediaLoaded=function(){return C}};(0,c.default)(E,m.default);n.default=E}).call(this)}).call(this,e("buffer").Buffer)},{"../../constants":118,"../../events":119,"../../util/browser":124,"../../util/eventEmitter":126,"../../util/humanize":127,"../../util/pretty":129,"../../util/videomailError":131,"./userMedia":147,"@babel/runtime/helpers/interopRequireDefault":4,animitter:13,buffer:18,"canvas-to-buffer":21,deepmerge:28,hidden:61,hyperscript:63,inherits:66,"safe-json-stringify":99,"websocket-stream":113}],146:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("add-eventlistener-with-options")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("inherits")),u=r(e("iphone-inline-video")),c=r(e("../../events")),l=r(e("../../util/browser")),f=r(e("../../util/eventEmitter")),d=function(e,t){f.default.call(this,t,"Replay");var n,r,s,d=this,h=new l.default(t),p=t.debug;function m(){return"HTMLDivElement"===e.constructor.name}function y(e,n,i){var o=d.getVideoSource(e);if(n&&i&&(n+="?".concat(Date.now())),o)n?o.setAttribute("src",n):r.removeChild(o);else if(n){var s=1/t.video.fps*2;o=(0,a.default)("source",{src:"".concat(n,"#t=").concat(s),type:"video/".concat(e)}),r.appendChild(o)}}function b(e){setTimeout((function(){try{r&&r.pause()}catch(e){t.logger.warn(e)}e&&e()}),15)}function g(){if(r&&r.play){var e;try{e=r.play()}catch(e){t.logger.warn("Caught replay exception:",e)}e&&"undefined"!=typeof Promise&&e instanceof Promise&&e.catch((function(e){t.logger.warn("Caught pending replay promise exception: %s",e)}))}}this.setVideomail=function(t){(s=t)&&(s.mp4&&this.setMp4Source(s.mp4),s.webm&&this.setWebMSource(s.webm),s.poster&&r.setAttribute("poster",s.poster),function(t){var n;Object.keys(t).forEach((function(r){(n=e.querySelector(".".concat(r)))&&(!n.innerHTML||n.innerHTML.length<1)&&(n.innerHTML=t[r])}))}(s));var n=s&&s.recordingStats&&s.recordingStats.sampleRate>0;this.show(s&&s.width,s&&s.height,n)},this.show=function(n,i,a){r&&(d.isShown()||(p("Replay: show()"),s&&function(t){var n,i;s&&s.playerWidth?i=s.playerWidth:e.calculateWidth&&(i=e.calculateWidth(t)),s&&s.playerHeight?n=s.playerHeight:e.calculateHeight&&(n=e.calculateHeight(t)),r.style.width=i>0?"".concat(i,"px"):"auto",r.style.height=n>0?"".concat(n,"px"):"auto"}({responsive:!0,videoWidth:n||r.videoWidth,videoHeight:i||r.videoHeight}),(0,o.default)(r,!1),e&&(e.style?(0,o.default)(e,!1):e.show&&e.show()),a?r.setAttribute("volume",1):t.isAudioEnabled()||r.setAttribute("muted",!0),u.default&&(0,u.default)(r,{iPad:!0}),r.load(),s?r.addEventListener("canplaythrough",(function(){d.emit(c.default.REPLAY_SHOWN)}),{once:!0}):r.addEventListener("canplaythrough",(function(){d.emit(c.default.PREVIEW_SHOWN)}),{once:!0})))},this.build=function(o){p("Replay: build (".concat(o?'replayParentElement="'.concat(o,'"'):"",")")),(r=e.querySelector("video.".concat(t.selectors.replayClass)))||function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;if(r=(0,a.default)("video.".concat(t.selectors.replayClass)),"string"==typeof n&&!(n=document.getElementById(n)))throw new Error("No replay parent element container with ID ".concat(n," found."));n.appendChild(r)}(o),this.hide(),r.setAttribute("autoplay",!0),r.setAttribute("autostart",!0),r.setAttribute("autobuffer",!0),r.setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline","webkit-playsinline"),r.setAttribute("controls","controls"),r.setAttribute("preload","auto"),n||(m()||this.on(c.default.PREVIEW,(function(e,t,n){d.show(t,n)})),(0,i.default)(r,"touchstart",(function(e){try{e&&e.preventDefault()}catch(e){}this.paused?g():b()})),r.onclick=function(e){e&&e.preventDefault(),this.paused?g():b()}),n=!0,p("Replay: built.")},this.unload=function(){p("Replay: unload()"),d.removeAllListeners(),r.remove(),r=void 0,s=void 0,n=!1},this.getVideoSource=function(e){if(r){var t,n,i=r.getElementsByTagName("source"),o=i&&i.length,a="video/".concat(e);if(o)for(n=0;n<o&&!t;n++)i[n].getAttribute("type")===a&&(t=i[n]);return t}},this.setMp4Source=function(e,t){y("mp4",e,t)},this.setWebMSource=function(e,t){y("webm",e,t)},this.getVideoType=function(){return h.getVideoType(r)},this.reset=function(e){b((function(){r&&(d.setMp4Source(null),d.setWebMSource(null)),e&&e()}))},this.hide=function(){m()?(0,o.default)(e,!0):r&&(0,o.default)(r,!0)},this.isShown=function(){return r&&!(0,o.default)(r)},this.getParentElement=function(){return e}};(0,s.default)(d,f.default);n.default=d},{"../../events":119,"../../util/browser":124,"../../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":4,"add-eventlistener-with-options":12,hidden:61,hyperscript:63,inherits:66,"iphone-inline-video":69}],147:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){c.default.call(this,t,"UserMedia");var n,r,p=e&&e.getRawVisualUserMedia(),m=new u.default(t),y=this,b=!1,g=!1;function v(e){e?function(e){if(r=e,void 0!==p.srcObject)p.srcObject=e;else{if(void 0===p.src)throw d.default.create("Error attaching stream to element.","Contact the developer about this",t);var n=window.URL||window.webkitURL;p.src=n.createObjectURL(e)||e}}(e):(p.removeAttribute("srcObject"),p.removeAttribute("src"),r=null)}function w(){return p.mozSrcObject?p.mozSrcObject:p.srcObject?p.srcObject:r}function E(){if(p.ended)return p.ended;var e=w();return e&&e.ended}function _(){if(p.videoWidth&&p.videoWidth<3||p.height&&p.height<3)return!0}function R(e,n){t.debug("UserMedia: ...",h,"event",e,(0,o.default)(n))}function S(e){R(e.type,{readyState:p.readyState}),p.removeEventListener&&p.removeEventListener(e.type,S)}this.unloadRemainingEventListeners=function(){t.debug("UserMedia: unloadRemainingEventListeners()"),l.default.forEach((function(e){p.removeEventListener(e,S)}))},this.init=function(e,r,i,o){var u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};this.stop(e,{aboutToInitialize:!0,switchingFacingMode:u.switchingFacingMode});var c=!1,h=!1,b=!1;function g(){y.removeListener(a.default.SENDING_FIRST_FRAME,g),n&&n.record(i)}function w(){t.debug("UserMedia: unloadAllEventListeners()"),y.unloadRemainingEventListeners(),y.removeListener(a.default.SENDING_FIRST_FRAME,g),p.removeEventListener&&p.removeEventListener("play",k),p.removeEventListener&&p.removeEventListener("loadedmetadata",T)}function A(){try{if(p.load(),p.paused){var e;t.debug("UserMedia: play()","media.readyState=".concat(p.readyState),"media.paused=".concat(p.paused),"media.ended=".concat(p.ended),"media.played=".concat((0,f.default)(p.played)));try{e=p.play()}catch(e){t.logger.warn("Caught raw usermedia play exception:",e)}(n=e)&&"undefined"!=typeof Promise&&n instanceof Promise&&e.then((function(){b||(t.debug("UserMedia: play promise successful. Playing now."),b=!0)})).catch((function(e){t.logger.warn("Caught pending usermedia promise exception: %s",e.toString())}))}}catch(e){w(),o(e)}var n}function O(){var s=p.readyState;if(t.debug("UserMedia: fireCallbacks("+"readyState=".concat(s,", ")+"onPlayReached=".concat(c,", ")+"onLoadedMetaDataReached=".concat(h,")")),c&&h&&(r(),n&&i))try{n.init(e),y.on(a.default.SENDING_FIRST_FRAME,g)}catch(e){w(),o(e)}}function k(){try{R("play",{readyState:p.readyState,audio:t.isAudioEnabled(),width:p.width,height:p.height,videoWidth:p.videoWidth,videoHeight:p.videoHeight}),p.removeEventListener&&p.removeEventListener("play",k),E()||_()?o(d.default.create("Already busy","Probably another browser window is using your webcam?",t)):(c=!0,O())}catch(e){w(),o(e)}}function T(){R("loadedmetadata",{readyState:p.readyState,paused:p.paused,width:p.width,height:p.height,videoWidth:p.videoWidth,videoHeight:p.videoHeight}),p.removeEventListener&&p.removeEventListener("loadedmetadata",T),E()||_()||(y.emit(a.default.LOADED_META_DATA),m.isAndroid()&&A(),h=!0,O())}t&&t.isAudioEnabled()&&(n||(n=new s.default(this,t)));try{var x=function(e){var t,n=function(e){var t;return e&&e.getVideoTracks&&(t=e.getVideoTracks()),t}(e);return n&&n[0]&&(t=n[0]),t}(e);if(x){if(!x.enabled)throw d.default.create("Webcam is disabled","The video track seems to be disabled. Enable it in your system.",t);var j;x.label&&x.label.length>0&&(j=x.label),j+=" with enabled=".concat(x.enabled),j+=", muted=".concat(x.muted),j+=", remote=".concat(x.remote),j+=", readyState=".concat(x.readyState),j+=", error=".concat(x.error),t.debug("UserMedia: ".concat(x.kind," detected."),j||"")}else t.debug("UserMedia: detected (but no video tracks exist");l.default.forEach((function(e){p.addEventListener(e,S,!1)})),p.addEventListener("loadedmetadata",T),p.addEventListener("play",k),p.addEventListener("error",(function(e){t.logger.warn("Caught video element error event: %s",(0,f.default)(e))})),v(e),A()}catch(e){y.emit(a.default.ERROR,e)}},this.isReady=function(){return Boolean(p.src)},this.stop=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var r=t.aboutToInitialize,i=t.switchingFacingMode;if(!r){e||(e=w());var o=function(e){var t;return e&&e.getTracks&&(t=e.getTracks()),t}(e),s=!1;o&&o.forEach((function(e){e.stop&&(s=!0,e.stop())})),!s&&e&&e.stop&&e.stop(),v(null),n&&n.stop(),n=null}i||(b=g=!1)}catch(e){y.emit(a.default.ERROR,e)}},this.createCanvas=function(){return(0,i.default)("canvas",{width:this.getRawWidth(!0),height:this.getRawHeight(!0)})},this.getVideoHeight=function(){return p.videoHeight},this.getVideoWidth=function(){return p.videoWidth},this.hasVideoWidth=function(){return this.getVideoWidth()>0},this.getRawWidth=function(n){var r=this.getVideoWidth(),i=t.hasDefinedWidth();return(i||t.hasDefinedHeight())&&(r=!n&&i?t.video.width:e.calculateWidth(n)),n&&(r=e.limitWidth(r)),r},this.getRawHeight=function(n){var r;if(t.hasDefinedDimension()){if((r=e.calculateHeight(n))<1)throw d.default.create("Bad dimensions","Calculated raw height cannot be less than 1!",t)}else if((r=this.getVideoHeight())<1)throw d.default.create("Bad dimensions","Raw video height from DOM element cannot be less than 1!",t);return n&&(r=e.limitHeight(r)),r},this.getRawVisuals=function(){return p},this.pause=function(){b=!0},this.isPaused=function(){return b},this.resume=function(){b=!1},this.record=function(){g=!0},this.isRecording=function(){return g},this.getAudioSampleRate=function(){return n?n.getSampleRate():-1},this.getCharacteristics=function(){return{audioSampleRate:this.getAudioSampleRate(),muted:p&&p.muted,width:p&&p.width,height:p&&p.height,videoWidth:p&&p.videoWidth,videoHeight:p&&p.videoHeight}}};var i=r(e("hyperscript")),o=r(e("safe-json-stringify")),a=r(e("./../../events")),s=r(e("./../../util/audioRecorder")),u=r(e("./../../util/browser")),c=r(e("./../../util/eventEmitter")),l=r(e("./../../util/mediaEvents")),f=r(e("./../../util/pretty")),d=r(e("./../../util/videomailError")),h="|—O—|"},{"./../../events":119,"./../../util/audioRecorder":123,"./../../util/browser":124,"./../../util/eventEmitter":126,"./../../util/mediaEvents":128,"./../../util/pretty":129,"./../../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,hyperscript:63,"safe-json-stringify":99}],148:[function(e,t,n){"use strict";t.exports='@-webkit-keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}@keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}.IIV::-webkit-media-controls-play-button,.IIV::-webkit-media-controls-start-playback-button{opacity:0;pointer-events:none;width:5px}.videomail .visuals{position:relative}.videomail .visuals video.replay{height:100%;width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer{height:auto;margin:0}.videomail .countdown,.videomail .facingMode,.videomail .paused,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{position:absolute;z-index:100}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{font-weight:700}.videomail .countdown,.videomail .paused,.videomail noscript{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint{letter-spacing:4px;text-align:center;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.videomail .countdown,.videomail .pausedHeader{font-size:460%;opacity:.9}.videomail .pausedHint{font-size:150%}.videomail .facingMode{background:rgba(30,30,30,.5);border:none;bottom:.6em;color:hsla(0,0%,96%,.9);font-family:monospace;font-size:1.2em;outline:none;padding:.1em .3em;right:.7em;-webkit-transition:all .2s ease;transition:all .2s ease;z-index:10}.videomail .facingMode:hover{background:rgba(50,50,50,.7);cursor:pointer}.videomail .recordNote,.videomail .recordTimer{background:hsla(0,0%,4%,.8);color:#00d814;font-family:monospace;opacity:.9;padding:.3em .4em;right:.7em;-webkit-transition:all 1s ease;transition:all 1s ease}.videomail .recordNote.near,.videomail .recordTimer.near{color:#eb9369}.videomail .recordNote.nigh,.videomail .recordTimer.nigh{color:#ea4b2a}.videomail .recordTimer{top:.7em}.videomail .recordNote{top:3.6em}.videomail .recordNote:before{-webkit-animation:blink 1s infinite;animation:blink 1s infinite;content:"REC"}.videomail .notifier{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;overflow:hidden}.videomail .radioGroup{display:block}.videomail video{margin-bottom:0}.videomail video.userMedia{background-color:rgba(50,50,50,.1)}'},{}],"videomail-client":[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("./client"));(0,r(e("./util/standardize")).default)(window,navigator);n.default=i.default},{"./client":117,"./util/standardize":130,"@babel/runtime/helpers/interopRequireDefault":4}]},{},["videomail-client"])("videomail-client")}));
|
|
50
|
+
t.exports=function(t){return ArrayBuffer.isView(t)?e.from(t.buffer,t.byteOffset,t.byteLength):e.from(t)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:18}],110:[function(e,t,n){!function(e,r){"use strict";var i="function",o="undefined",a="object",s="string",u="major",c="model",l="name",f="type",d="vendor",h="version",p="architecture",m="console",y="mobile",b="tablet",g="smarttv",v="wearable",w="embedded",E="Amazon",_="Apple",R="ASUS",S="BlackBerry",A="Browser",O="Chrome",k="Firefox",T="Google",x="Huawei",j="LG",M="Microsoft",C="Motorola",D="Opera",N="Samsung",I="Sharp",L="Sony",P="Xiaomi",B="Zebra",U="Facebook",F="Chromium OS",q="Mac OS",W=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},H=function(e,t){return typeof e===s&&-1!==V(t).indexOf(V(e))},V=function(e){return e.toLowerCase()},z=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},G=function(e,t){for(var n,o,s,u,c,l,f=0;f<t.length&&!c;){var d=t[f],h=t[f+1];for(n=o=0;n<d.length&&!c&&d[n];)if(c=d[n++].exec(e))for(s=0;s<h.length;s++)l=c[++o],typeof(u=h[s])===a&&u.length>0?2===u.length?typeof u[1]==i?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==i||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):r:this[u[0]]=l?u[1].call(this,l,u[2]):r:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):r):this[u]=l||r;f+=2}},$=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(H(t[n][i],e))return"?"===n?r:n}else if(H(t[n],e))return"?"===n?r:n;return e},Y={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"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,h],[/opios[\/ ]+([\w\.]+)/i],[h,[l,D+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[l,D+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[l,D]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[l,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,h],[/\bddg\/([\w\.]+)/i],[h,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[l,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[l,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+A],h],[/\bfocus\/([\w\.]+)/i],[h,[l,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[l,D+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[l,D+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[l,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[h,[l,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+A]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+A],h],[/samsungbrowser\/([\w\.]+)/i],[h,[l,N+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],h],[/metasr[\/ ]?([\d\.]+)/i],[h,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,h],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,U],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[l,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,O+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[l,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[h,$,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[l,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[l,h],[/(cobalt)\/([\w\.]+)/i],[l,[h,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,V]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[d,N],[f,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[d,N],[f,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[d,_],[f,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[d,_],[f,b]],[/(macintosh);/i],[c,[d,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[d,I],[f,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[d,x],[f,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[d,x],[f,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[d,P],[f,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[d,P],[f,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[d,"OPPO"],[f,y]],[/\b(opd2\d{3}a?) bui/i],[c,[d,"OPPO"],[f,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[d,"Vivo"],[f,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[d,"Realme"],[f,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[d,C],[f,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[d,C],[f,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[d,j],[f,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[d,j],[f,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[d,"Lenovo"],[f,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[d,"Nokia"],[f,y]],[/(pixel c)\b/i],[c,[d,T],[f,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[d,T],[f,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[d,L],[f,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[d,L],[f,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[d,"OnePlus"],[f,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[d,E],[f,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[d,E],[f,y]],[/(playbook);[-\w\),; ]+(rim)/i],[c,d,[f,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[d,S],[f,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[d,R],[f,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[d,R],[f,y]],[/(nexus 9)/i],[c,[d,"HTC"],[f,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[c,/_/g," "],[f,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[d,"Acer"],[f,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[d,"Meizu"],[f,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[d,"Ulefone"],[f,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,c,[f,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,c,[f,b]],[/(surface duo)/i],[c,[d,M],[f,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[d,"Fairphone"],[f,y]],[/(u304aa)/i],[c,[d,"AT&T"],[f,y]],[/\bsie-(\w*)/i],[c,[d,"Siemens"],[f,y]],[/\b(rct\w+) b/i],[c,[d,"RCA"],[f,b]],[/\b(venue[\d ]{2,7}) b/i],[c,[d,"Dell"],[f,b]],[/\b(q(?:mv|ta)\w+) b/i],[c,[d,"Verizon"],[f,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[d,"Barnes & Noble"],[f,b]],[/\b(tm\d{3}\w+) b/i],[c,[d,"NuVision"],[f,b]],[/\b(k88) b/i],[c,[d,"ZTE"],[f,b]],[/\b(nx\d{3}j) b/i],[c,[d,"ZTE"],[f,y]],[/\b(gen\d{3}) b.+49h/i],[c,[d,"Swiss"],[f,y]],[/\b(zur\d{3}) b/i],[c,[d,"Swiss"],[f,b]],[/\b((zeki)?tb.*\b) b/i],[c,[d,"Zeki"],[f,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],c,[f,b]],[/\b(ns-?\w{0,9}) b/i],[c,[d,"Insignia"],[f,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[d,"NextBook"],[f,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],c,[f,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],c,[f,y]],[/\b(ph-1) /i],[c,[d,"Essential"],[f,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[d,"Envizen"],[f,b]],[/\b(trio[-\w\. ]+) b/i],[c,[d,"MachSpeed"],[f,b]],[/\btu_(1491) b/i],[c,[d,"Rotor"],[f,b]],[/(shield[\w ]+) b/i],[c,[d,"Nvidia"],[f,b]],[/(sprint) (\w+)/i],[d,c,[f,y]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[d,M],[f,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[d,B],[f,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[d,B],[f,y]],[/smart-tv.+(samsung)/i],[d,[f,g]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[d,N],[f,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,j],[f,g]],[/(apple) ?tv/i],[d,[c,_+" TV"],[f,g]],[/crkey/i],[[c,O+"cast"],[d,T],[f,g]],[/droid.+aft(\w+)( bui|\))/i],[c,[d,E],[f,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[d,I],[f,g]],[/(bravia[\w ]+)( bui|\))/i],[c,[d,L],[f,g]],[/(mitv-\w{5}) bui/i],[c,[d,P],[f,g]],[/Hbbtv.*(technisat) (.*);/i],[d,c,[f,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d,z],[c,z],[f,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,c,[f,m]],[/droid.+; (shield) bui/i],[c,[d,"Nvidia"],[f,m]],[/(playstation [345portablevi]+)/i],[c,[d,L],[f,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[d,M],[f,m]],[/((pebble))app/i],[d,c,[f,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[d,_],[f,v]],[/droid.+; (glass) \d/i],[c,[d,T],[f,v]],[/droid.+; (wt63?0{2,3})\)/i],[c,[d,B],[f,v]],[/(quest( \d| pro)?)/i],[c,[d,U],[f,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[f,w]],[/(aeobc)\b/i],[c,[d,E],[f,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[f,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[f,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,y]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,h],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[h,$,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,$,Y],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,q],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,h],[/\(bb(10);/i],[h,[l,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[l,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[l,O+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,F],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,h],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,h]]},J=function(t,n){if(typeof t===a&&(n=t,t=r),!(this instanceof J))return new J(t,n).getResult();var m=typeof e!==o&&e.navigator?e.navigator:r,g=t||(m&&m.userAgent?m.userAgent:""),v=m&&m.userAgentData?m.userAgentData:r,w=n?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(K,n):K,E=m&&m.userAgent==g;return this.getBrowser=function(){var e,t={};return t[l]=r,t[h]=r,G.call(t,g,w.browser),t[u]=typeof(e=t[h])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r,E&&m&&m.brave&&typeof m.brave.isBrave==i&&(t[l]="Brave"),t},this.getCPU=function(){var e={};return e[p]=r,G.call(e,g,w.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[c]=r,e[f]=r,G.call(e,g,w.device),E&&!e[f]&&v&&v.mobile&&(e[f]=y),E&&"Macintosh"==e[c]&&m&&typeof m.standalone!==o&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[c]="iPad",e[f]=b),e},this.getEngine=function(){var e={};return e[l]=r,e[h]=r,G.call(e,g,w.engine),e},this.getOS=function(){var e={};return e[l]=r,e[h]=r,G.call(e,g,w.os),E&&!e[l]&&v&&v.platform&&"Unknown"!=v.platform&&(e[l]=v.platform.replace(/chrome os/i,F).replace(/macos/i,q)),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 g},this.setUA=function(e){return g=typeof e===s&&e.length>500?z(e,500):e,this},this.setUA(g),this};J.VERSION="1.0.38",J.BROWSER=W([l,h,u]),J.CPU=W([p]),J.DEVICE=W([c,d,f,m,y,g,b,v,w]),J.ENGINE=J.OS=W([l,h]),typeof n!==o?(typeof t!==o&&t.exports&&(n=t.exports=J),n.UAParser=J):typeof e!==o&&(e.UAParser=J);var X=typeof e!==o&&(e.jQuery||e.Zepto);if(X&&!X.ua){var Q=new J;X.ua=Q.getResult(),X.ua.get=function(){return Q.getUA()},X.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)X.ua[n]=t[n]}}}("object"==typeof window?window:this)},{}],111:[function(e,t,n){(function(e){(function(){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],112:[function(e,t,n){(function(n,r){(function(){var i=e("readable-stream"),o=e("end-of-stream"),a=e("inherits"),s=e("stream-shift"),u=r.from&&r.from!==Uint8Array.from?r.from([0]):new r([0]),c=function(e,t){e._corked?e.once("uncork",t):t()},l=function(e,t){return function(n){n?function(e,t){e._autoDestroy&&e.destroy(t)}(e,"premature close"===n.message?null:n):t&&!e._ended&&e.end()}},f=function(e,t,n){if(!(this instanceof f))return new f(e,t,n);i.Duplex.call(this,n),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!n||!1!==n.autoDestroy,this._forwardDestroy=!n||!1!==n.destroy,this._forwardEnd=!n||!1!==n.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};a(f,i.Duplex),f.obj=function(e,t,n){return n||(n={}),n.objectMode=!0,n.highWaterMark=16,new f(e,t,n)},f.prototype.cork=function(){1==++this._corked&&this.emit("cork")},f.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},f.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed)e&&e.destroy&&e.destroy();else if(null!==e&&!1!==e){var t=this,r=o(e,{writable:!0,readable:!1},l(this,this._forwardEnd)),i=function(){var e=t._ondrain;t._ondrain=null,e&&e()};this._unwrite&&n.nextTick(i),this._writable=e,this._writable.on("drain",i),this._unwrite=function(){t._writable.removeListener("drain",i),r()},this.uncork()}else this.end()},f.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed)e&&e.destroy&&e.destroy();else{if(null===e||!1===e)return this.push(null),void this.resume();var t,n=this,r=o(e,{writable:!1,readable:!0},l(this)),a=function(){n._forward()},s=function(){n.push(null)};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:(t=e,new i.Readable({objectMode:!0,highWaterMark:16}).wrap(t)),this._readable2.on("readable",a),this._readable2.on("end",s),this._unread=function(){n._readable2.removeListener("readable",a),n._readable2.removeListener("end",s),r()},this._forward()}},f.prototype._read=function(){this._drained=!0,this._forward()},f.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var e;for(this._forwarding=!0;this._drained&&null!==(e=s(this._readable2));)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},f.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;n.nextTick((function(){t._destroy(e)}))}},f.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},f.prototype._write=function(e,t,n){return this.destroyed?n():this._corked?c(this,this._write.bind(this,e,t,n)):e===u?this._finish(n):this._writable?void(!1===this._writable.write(e)?this._ondrain=n:n()):n()},f.prototype._finish=function(e){var t=this;this.emit("preend"),c(this,(function(){var n,r;n=t._forwardEnd&&t._writable,r=function(){!1===t._writableState.prefinished&&(t._writableState.prefinished=!0),t.emit("prefinish"),c(t,e)},n?n._writableState&&n._writableState.finished?r():n._writableState?n.end(r):(n.end(),r()):r()}))},f.prototype.end=function(e,t,n){return"function"==typeof e?this.end(null,null,e):"function"==typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(u),i.Writable.prototype.end.call(this,n))},t.exports=f}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:79,buffer:18,"end-of-stream":35,inherits:66,"readable-stream":96,"stream-shift":102}],113:[function(e,t,n){(function(n,r){(function(){"use strict";var i=e("readable-stream").Transform,o=e("duplexify"),a=e("ws"),s=e("safe-buffer").Buffer;t.exports=function(e,t,u){var c,l,f="browser"===n.title,d=!!r.WebSocket,h=f?function e(t,n,r){if(l.bufferedAmount>m)return void setTimeout(e,y,t,n,r);g&&"string"==typeof t&&(t=s.from(t,"utf8"));try{l.send(t)}catch(e){return r(e)}r()}:function(e,t,n){if(l.readyState!==l.OPEN)return void n();g&&"string"==typeof e&&(e=s.from(e,"utf8"));l.send(e,n)};t&&!Array.isArray(t)&&"object"==typeof t&&(u=t,t=null,("string"==typeof u.protocol||Array.isArray(u.protocol))&&(t=u.protocol));u||(u={});void 0===u.objectMode&&(u.objectMode=!(!0===u.binary||void 0===u.binary));var p=function(e,t,n){var r=new i({objectMode:e.objectMode});return r._write=t,r._flush=n,r}(u,h,(function(e){l.close(),e()}));u.objectMode||(p._writev=R);var m=u.browserBufferSize||524288,y=u.browserBufferTimeout||1e3;"object"==typeof e?l=e:(l=d&&f?new a(e,t):new a(e,t,u)).binaryType="arraybuffer";var b=void 0===l.addEventListener;l.readyState===l.OPEN?c=p:(c=c=o(void 0,void 0,u),u.objectMode||(c._writev=R),b?l.addEventListener("open",v):l.onopen=v);c.socket=l,b?(l.addEventListener("close",w),l.addEventListener("error",E),l.addEventListener("message",_)):(l.onclose=w,l.onerror=E,l.onmessage=_);p.on("close",(function(){l.close()}));var g=!u.objectMode;function v(){c.setReadable(p),c.setWritable(p),c.emit("connect")}function w(){c.end(),c.destroy()}function E(e){c.destroy(e)}function _(e){var t=e.data;t=t instanceof ArrayBuffer?s.from(t):s.from(t,"utf8"),p.push(t)}function R(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)"string"==typeof e[r].chunk?n[r]=s.from(e[r],"utf8"):n[r]=e[r].chunk;this._write(s.concat(n),"binary",t)}return c}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:79,duplexify:112,"readable-stream":96,"safe-buffer":98,ws:114}],114:[function(e,t,n){var r=null;"undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof MozWebSocket?r=MozWebSocket:"undefined"!=typeof window&&(r=window.WebSocket||window.MozWebSocket),t.exports=r},{}],115:[function(e,t,n){t.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},{}],116:[function(e,t,n){t.exports={name:"videomail-client",version:"9.2.22",description:"A wicked npm package to record videos directly in the browser, wohooo!",keywords:["webcam","video","videomail","encoder","getusermedia","audio","recorder"],homepage:"https://videomail.io",repository:{type:"git",url:"git+https://github.com/binarykitchen/videomail-client.git"},license:"CC0-1.0",author:"Michael Heuberger <michael.heuberger@binarykitchen.com>",contributors:[{name:"Michael Heuberger",email:"michael.heuberger@binarykitchen.com"}],main:"prototype/js/videomail-client.js",scripts:{audit:"npx audit-ci --config audit-ci.json",build:"gulp build",clean:"rm -rf node_modules && rm -rf package-lock.json",lint:"eslint --color ./src ./test ./gulpfile.js","lint:fix":"npm --silent run lint -- --fix",major:"./env/dev/release.sh --importance=major",minor:"./env/dev/release.sh --importance=minor",patch:"./env/dev/release.sh --importance=patch",prettier:"prettier --check ./src ./test ./prototype/*.html gulpfile.js","prettier:fix":"prettier --write ./src ./test ./prototype/*.html gulpfile.js",test:"gulp test",watch:"NODE_NO_HTTP2=1 gulp watch"},prettier:"./prettier.config.cjs",dependencies:{"@babel/core":"7.25.2","add-eventlistener-with-options":"1.25.5",animitter:"3.0.0","audio-sample":"4.0.1","canvas-to-buffer":"4.0.1","classlist.js":"1.1.20150312",contains:"0.1.1","core-js":"3.38.1","create-error":"0.3.1",deepmerge:"4.3.1",defined:"1.0.1",despot:"2.0.0","document-visibility":"1.0.1",filesize:"10.1.6","format-util":"1.0.5","get-form-data":"3.0.0",hidden:"1.1.1","humanize-duration":"3.32.1",hyperscript:"2.0.2",inherits:"2.0.4","insert-css":"2.0.0","iphone-inline-video":"2.2.2","is-power-of-two":"1.0.0",keymirror:"0.1.1","number-is-integer":"2.0.0","request-frame":"1.5.3","safe-json-stringify":"1.2.0",superagent:"8.1.2","ua-parser-js":"1.0.38","websocket-stream":"5.5.2"},devDependencies:{"@babel/eslint-parser":"7.25.1","@babel/plugin-transform-runtime":"7.25.4","@babel/preset-env":"7.25.4","audit-ci":"7.1.0",autoprefixer:"10.4.20",babelify:"10.0.0","body-parser":"1.20.2",browserify:"17.0.0","connect-send-json":"1.0.0",cssnano:"6.0.5",del:"6.1.1",eslint:"8.57.0","eslint-config-prettier":"9.1.0","eslint-plugin-import":"2.30.0","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"6.2.0","fancy-log":"2.0.0",glob:"10.4.2",gulp:"4.0.2","gulp-bump":"3.2.0","gulp-bytediff":"1.0.0","gulp-concat":"2.6.1","gulp-connect":"5.7.0","gulp-derequire":"3.0.0","gulp-if":"3.0.0","gulp-inject-string":"1.1.2","gulp-load-plugins":"2.0.8","gulp-plumber":"1.2.1","gulp-postcss":"10.0.0","gulp-rename":"2.0.0","gulp-sourcemaps":"3.0.0","gulp-stylus":"3.0.1","gulp-terser":"2.1.0",minimist:"1.2.8",nib:"1.2.0",postcss:"8.4.45",prettier:"3.3.3","prettier-plugin-curly":"0.2.2","prettier-plugin-organize-imports":"4.0.0","prettier-plugin-packagejson":"2.5.2","prettier-plugin-sh":"0.14.0",router:"1.3.8",tape:"5.8.1","tape-catch":"1.0.6","tape-run":"11.0.0","vinyl-buffer":"1.0.1","vinyl-source-stream":"2.0.0",watchify:"4.0.0"},engines:{node:"^20.16.0",npm:"^10.8.1"},readmeFilename:"README.md"}},{}],117:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i,o,a=r(e("deepmerge")),s=r(e("inherits")),u=r(e("./constants")),c=r(e("./events")),l=r(e("./options")),f=r(e("./resource")),d=r(e("./util/browser")),h=r(e("./util/collectLogger")),p=r(e("./util/eventEmitter")),m=r(e("./wrappers/container")),y=r(e("./util/addOptionsFunctions"));var b=function(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,a.default)(l.default,e,{arrayMerge:function(e,t){return t}});return i||(i=new h.default(t)),t.logger=i,t.debug=t.logger.debug,(0,y.default)(t)}(e),n=new m.default(t),r=t.debug;this.events=c.default,p.default.call(this,t,"VideomailClient"),this.build=function(){var e=!1;e||n.isBuilt()||(r("Client: build()"),e=!0,n.build(),e=!1)},this.show=function(){n.isBuilt()||this.build(),n.show()},this.replay=function(e,t){n.isBuilt()||n.build(!0,t),e&&(e=n.addPlayerDimensions(e)),n.buildForm(),n.loadForm(e),this.once(c.default.REPLAY_SHOWN,(function(){n.showReplayOnly()})),n.getReplay().setVideomail(e)},this.startOver=function(e){var t=n.getReplay();t&&(t.hide(),t.reset()),n.startOver(e)},this.unload=function(e){this.removeAllListeners(),n.unload(e)},this.hide=function(){n.hide()},this.getByAlias=function(e,r){new f.default(t).getByAlias(e,(function(e,t){e?r(e):r(null,n.addPlayerDimensions(t))}))},this.get=this.getByAlias,this.getByKey=function(e,r){new f.default(t).getByKey(e,(function(e,t){e?r(e):r(null,n.addPlayerDimensions(t))}))},this.canRecord=function(){return function(e){return o||(o=new d.default(e)),o}(t).canRecord()},this.isDirty=function(){return n.isDirty()},this.isBuilt=function(){return n.isBuilt()},this.isRecording=function(){return n.isRecording()},this.submit=function(){n.submit()},this.getLogLines=function(){if(t.logger&&t.logger.getLines)return t.logger.getLines()}};(0,s.default)(b,p.default),Object.keys(u.default.public).forEach((function(e){b[e]=u.default.public[e]})),b.Events=c.default;n.default=b},{"./constants":118,"./events":119,"./options":120,"./resource":121,"./util/addOptionsFunctions":122,"./util/browser":124,"./util/collectLogger":125,"./util/eventEmitter":126,"./wrappers/container":133,"@babel/runtime/helpers/interopRequireDefault":4,deepmerge:28,inherits:66}],118:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default={SITE_NAME_LABEL:"x-videomail-site-name",VERSION_LABEL:"videomailClientVersion",public:{ENC_TYPE_APP_JSON:"application/json",ENC_TYPE_FORM:"application/x-www-form-urlencoded"}}},{}],119:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("keymirror"));n.default=(0,i.default)({BUILT:null,FORM_READY:null,LOADING_USER_MEDIA:null,USER_MEDIA_READY:null,CONNECTING:null,CONNECTED:null,DISCONNECTED:null,COUNTDOWN:null,RECORDING:null,STOPPING:null,STOPPED:null,PROGRESS:null,BEGIN_AUDIO_ENCODING:null,BEGIN_VIDEO_ENCODING:null,RESETTING:null,PAUSED:null,RESUMING:null,PREVIEW:null,PREVIEW_SHOWN:null,REPLAY_SHOWN:null,INVALID:null,VALIDATING:null,VALID:null,SUBMITTING:null,SUBMITTED:null,ERROR:null,BLOCKING:null,SENDING_FIRST_FRAME:null,FIRST_FRAME_SENT:null,HIDE:null,NOTIFYING:null,ENABLING_AUDIO:null,DISABLING_AUDIO:null,LOADED_META_DATA:null,EVENT_EMITTED:null,GOING_BACK:null,STARTING_OVER:null,ASKING_WEBCAM_PERMISSION:null,VISIBLE:null,INVISIBLE:null,SWITCH_FACING_MODE:null,SERVER_READY:null,UNLOADING:null})},{"@babel/runtime/helpers/interopRequireDefault":4,keymirror:73}],120:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=e("../../package.json"),o=r(e("./util/addOptionsFunctions")),a={logger:null,logStackSize:30,verbose:!("production"===t.env.NODE_ENV),baseUrl:"https://videomail.io",socketUrl:"wss://videomail.io",siteName:"videomail-client-demo",insertCss:!0,enablePause:!0,enableAutoPause:!0,enableSpace:!0,submitWithVideomail:!1,disableSubmit:!1,enableAutoValidation:!0,enableAutoUnload:!0,enableAutoSubmission:!0,enctype:"application/json",selectors:{containerId:"videomail",containerClass:"videomail",replayClass:"replay",userMediaClass:"userMedia",visualsClass:"visuals",buttonClass:null,buttonsClass:"buttons",recordButtonClass:"record",pauseButtonClass:"pause",resumeButtonClass:"resume",previewButtonClass:"preview",recordAgainButtonClass:"recordAgain",submitButtonClass:"submit",subjectInputName:"subject",fromInputName:"from",toInputName:"to",ccInputName:"cc",bccInputName:"bcc",bodyInputName:"body",sendCopyInputName:"sendCopy",keyInputName:"videomail_key",parentKeyInputName:"videomail_parent_key",formId:null,submitButtonId:null,submitButtonSelector:null},audio:{enabled:!1,switch:!1,volume:.2,bufferSize:"auto"},video:{fps:15,limitSeconds:30,countdown:3,width:"auto",height:"auto",facingMode:"user",facingModeButton:!1,stretch:!1},image:{quality:.42,types:["webp","jpeg"]},text:{pausedHeader:"Paused",pausedHint:null,sending:"Teleporting",encoding:"Encoding",limitReached:"Limit reached",audioOff:"Audio off",audioOn:"Audio on",buttons:{record:"Record video",recordAgain:"Record again",resume:"Resume",pause:"Pause",preview:"Preview"}},notifier:{entertain:!1,entertainClass:"bg",entertainLimit:6,entertainInterval:9e3},timeouts:{userMedia:2e4,connection:1e4,pingInterval:3e4},loadUserMediaOnRecord:!1,callbacks:{adjustFormDataBeforePosting:null},defaults:{from:null,to:null,cc:null,bcc:null,subject:null,body:null},displayErrors:!0,adjustFormOnBrowserError:!1,reportErrors:!1,fakeUaString:null,version:i.version},s=(0,o.default)(a);n.default=s}).call(this)}).call(this,e("_process"))},{"../../package.json":116,"./util/addOptionsFunctions":122,"@babel/runtime/helpers/interopRequireDefault":4,_process:79}],121:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){function t(t,n){return e.defaults[n]&&!t[n]&&(t[n]=e.defaults[n]),t}function n(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0})}function r(e,t){if(t&&t.body&&t.body.error){var r=t.body.error,i=new Error;return n(i,"name",r.name),n(i,"type",r.type),n(i,"message",r.message||t.statusText),n(i,"cause",r.cause),n(i,"status",r.status),n(i,"code",r.code),n(i,"errno",r.errno),n(i,"details",r.details),n(i,"stack",r.stack),i}return e}function s(t,n,s){var u="".concat(e.baseUrl,"/videomail/").concat(t,"/").concat(n,"/snapshot");(0,i.default)("get",u).type("json").set("Accept","application/json").set("Timezone-Id",a).set(o.default.SITE_NAME_LABEL,e.siteName).timeout(e.timeouts.connection).end((function(e,t){if(e){var n=r(e,t);s(n)}else{var i=t.body?t.body:null;s(null,i)}}))}function u(t,n,s,u){u||(u=s,s=null);var c={},l="".concat(e.baseUrl,"/videomail/");s&&(l+=s);var f=(0,i.default)(t,l);c[o.default.SITE_NAME_LABEL]=e.siteName,f.query(c).set("Timezone-Id",a).send(n).timeout(e.timeout).end((function(e,t){if(e){var n=r(e,t);u(n)}else{var i=t.body&&t.body.videomail?t.body.videomail:null;u(null,i,t.body)}}))}this.getByAlias=function(e,t){s("alias",e,t)},this.getByKey=function(e,t){s("key",e,t)},this.reportError=function(t,n){var a={},s="".concat(e.baseUrl,"/client-error/"),u=(0,i.default)("post",s);a[o.default.SITE_NAME_LABEL]=e.siteName,u.query(a).send(t).timeout(e.timeout).end((function(e,t){if(e){var i=r(e,t);n&&n(i)}else n&&n()}))},this.post=function(n,r){(n=function(n){return e.defaults&&(n=t(n,"from"),n=t(n,"to"),n=t(n,"cc"),n=t(n,"bcc"),n=t(n,"subject"),n=t(n,"body")),n}(n))[o.default.VERSION_LABEL]=e.version,e.callbacks.adjustFormDataBeforePosting?e.callbacks.adjustFormDataBeforePosting(n,(function(e,t){e?r(e):u("post",t,r)})):u("post",n,r)},this.put=function(e,t){u("put",e,e.key,t)},this.form=function(t,n,s){var u;switch(e.enctype){case o.default.public.ENC_TYPE_APP_JSON:u="json";break;case o.default.public.ENC_TYPE_FORM:u="form";break;default:setTimeout((function(){s(new Error("Invalid enctype given: ".concat(e.enctype)))}),0)}u&&i.default.post(n).type(u).set("Timezone-Id",a).send(t).timeout(e.timeout).end((function(e,t){if(e){var n=r(e,t);s(n)}else s(null,t)}))}};var i=r(e("superagent")),o=r(e("./constants")),a=Intl.DateTimeFormat().resolvedOptions().timeZone},{"./constants":118,"@babel/runtime/helpers/interopRequireDefault":4,superagent:104}],122:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){var t=e.audio&&e.audio.enabled;return e.hasDefinedWidth=function(){return this.video.width&&"auto"!==this.video.width},e.hasDefinedHeight=function(){return this.video.height&&"auto"!==this.video.height},e.hasDefinedDimension=function(){return this.hasDefinedWidth()||this.hasDefinedHeight()},e.hasDefinedDimensions=function(){return this.hasDefinedWidth()&&this.hasDefinedHeight()},e.getRatio=function(){var e=1,t=this.videoHeight&&this.videoWidth;return this.hasDefinedDimensions()?e=t&&(this.videoHeight<this.video.height||this.videoWidth<this.video.width)?this.videoHeight/this.videoWidth:this.video.height/this.video.width:t&&(e=this.videoHeight/this.videoWidth),e},e.isAudioEnabled=function(){return t},e.setAudioEnabled=function(e){t=e},e.isAutoPauseEnabled=function(){return this.enableAutoPause&&this.enablePause},e}},{}],123:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){var n,r,c,l=new a.default(t);function f(){return window.AudioContext||window.webkitAudioContext}function d(){return Boolean(f())&&Boolean(h())}function h(){if(!c){var e=f();c=new e}return c}this.init=function(e){t.debug("AudioRecorder: init()");var i=h().createGain();try{r=h().createMediaStreamSource(e)}catch(e){throw s.default.create("Webcam has no audio",e.toString(),t)}var a=t.audio.bufferSize;if("auto"===a&&(a=l.isFirefox()?512:2048),!(0,o.default)(a))throw s.default.create("Audio buffer size must be a power of two.",t);if(!t.audio.volume||t.audio.volume>1)throw s.default.create("Audio volume must be between zero and one.",t);i.gain.value=t.audio.volume,n=h().createScriptProcessor(a,u,u),r.connect(n),n.connect(h().destination),r.connect(i),i.connect(n)},this.record=function(r){t.debug("AudioRecorder: record()"),n.onaudioprocess=function(t){!function(t,n){if(e.isRecording()&&!e.isPaused()){var r=t.inputBuffer.getChannelData(0);n(new i.default(r))}}(t,r)}},this.stop=function(){t.debug("AudioRecorder: stop()"),n&&(n.onaudioprocess=void 0),r&&r.disconnect(),d()&&(h().close?h().close().then((function(){t.debug("AudioRecorder: audio context is closed"),c=null})).catch((function(e){throw s.default.create(e,t)})):c=null)},this.getSampleRate=function(){return d()?h().sampleRate:-1}};var i=r(e("audio-sample")),o=r(e("is-power-of-two")),a=r(e("./browser")),s=r(e("./videomailError")),u=1},{"./browser":124,"./videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,"audio-sample":14,"is-power-of-two":71}],124:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("defined")),a=r(e("ua-parser-js")),s=r(e("./videomailError"));n.default=function(e){e||(e={});var t,n="http://www.mozilla.org/firefox/update/",r="https://www.microsoft.com/en-us/download/details.aspx?id=48126",u="http://www.google.com/chrome/",c="http://www.chromium.org/getting-involved/download-chromium",l=(0,o.default)(e.fakeUaString,"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent,""),f=new a.default(l).getResult(),d="iOS"===f.os.name,h=parseFloat(f.browser.version),p="Chrome"===f.browser.name,m="Brave"===f.browser.name,y="Chromium"===f.browser.name,b="Firefox"===f.browser.name,g=parseFloat(f.os.version),v="Windows"===f.os.name,w="Edge"===f.browser.name||v&&g>=10,E=/Safari/.test(f.browser.name),_=/Opera/.test(f.browser.name),R=/Android/.test(f.os.name),S=p||y,A="Facebook"===f.browser.name,O=d||R,k=E&&h>=11,T=d&&g>=11,x=d&&g<11,j=e.fakeHttps||"https:"===window.location.protocol,M=S||b||R||_||w||k||T||m,C=this;function D(){var e;return(e=x?"On iPads or iPhones below iOS v11 this camera feature is missing.<br/><br/>For now, we recommend you to upgrade iOS or to use an Android device.":function(){var e;return b?e=d?"Firefox on iOS is not ready for cameras yet. Hopefully in near future ...":'Probably you need to <a href="'.concat(n,'" target="_blank">')+"upgrade Firefox</a> to fix this.":p?e=d?"Use Safari instead. Apple doesn't give Chrome access to iPhone cameras (booo).":'Probably you need to <a href="'.concat(u,'" target="_blank">')+"upgrade Chrome</a> to fix this.":y?e='Probably you need to <a href="'.concat(c,'" target="_blank">')+"upgrade Chromium</a> to fix this.":k?e="Probably you need to shut down Safari and restart it, this for correct webcam access.":E&&(e="Safari below version 11 has no webcam support.<br/>Better upgrade Safari or pick"+' <a href="'.concat(u,'" target="_blank">Chrome</a>,')+' <a href="'.concat(n,'" target="_blank">Firefox</a> or Android.')),e}())||(e=C.isChromeBased()||C.isFirefox()||E?"For the webcam feature, your browser needs an upgrade.":A?"Hence we recommend you to use a real browser like "+'<a href="'.concat(u,'" target="_blank">Chrome</a>, ')+'<a href="'.concat(n,'" target="_blank">Firefox</a> or ')+'<a href="'.concat(r,'" target="_blank">Edge</a>.'):"Hence we recommend you to use either "+'<a href="'.concat(u,'" target="_blank">Chrome</a>, ')+'<a href="'.concat(n,'" target="_blank">Firefox</a>, ')+'<a href="'.concat(r,'" target="_blank">Edge</a> or Android.')),e}function N(e,t){var n;return e&&e.canPlayType&&(n=e.canPlayType("video/".concat(t))),""!==n&&n}this.canRecord=function(){var e="undefined"!=typeof navigator,t=!1;e&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?t=!0:t="function"===(e&&(0,i.default)(navigator.getUserMedia_));return t},this.checkRecordingCapabilities=function(){var t;if(j){if(!M||!this.canRecord()){var n,r=[];x?r.push(s.default.IOS_PROBLEM):r.push(s.default.BROWSER_PROBLEM),n=M?O?A?"Sorry, the Facebook app cannot record from your mobile camera":"Sorry, your browser cannot record from your mobile camera":"Sorry, your browser cannot record from webcams":O?"Sorry, your browser is unable to use your mobile camera":"Sorry, your browser is unable to use webcams",x&&(e.reportErrors=!1),t=s.default.create(n,D(),e,{classList:r})}}else t=s.default.create("Sorry, your page is insecure","Please switch to HTTPS to ensure all is encrypted.",e,{classList:[s.default.BROWSER_PROBLEM]});return t},this.checkBufferTypes=function(){var t;return"undefined"==typeof window||void 0===window.atob?t=s.default.create("atob is not supported",e):void 0===window.ArrayBuffer?t=s.default.create("ArrayBuffers are not supported",e):void 0===window.Uint8Array&&(t=s.default.create("Uint8Arrays are not supported",e)),t},this.getVideoType=function(e){return!t&&e&&(N(e,"mp4")?t="mp4":N(e,"webm")&&(t="webm")),"webm"!==t&&"mp4"!==t&&(t="mp4"),t&&""!==t||(t="mp4"),t},this.getNoAccessIssue=function(){var t;return t=this.isChromeBased()?"Click on the allow button to grant access to your webcam":this.isFirefox()?"Please grant Firefox access to your webcam":"Your system does not let your browser access your webcam",s.default.create("Unable to access webcam",t,e)},this.isChromeBased=function(){return S},this.isFirefox=function(){return b},this.isEdge=function(){return w},this.isAndroid=function(){return R},this.isMobile=function(){return"mobile"===f.device.type},this.isOkSafari=function(){return k},this.isIOS=function(){return d},this.getUsefulData=function(){return{browser:f.browser,cpu:f.cpu.architecture?f.cpu:void 0,device:f.device.type?f.device:void 0,engine:f.engine,os:f.os.name&&f.os.version?f.os:void 0}}}},{"./videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,"@babel/runtime/helpers/typeof":10,defined:30,"ua-parser-js":110}],125:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new a.default(e),n=e.logger||console,r=e.selectors&&e.selectors.containerId||"undefined container id",s=[];function u(t,n){var r=o.default.apply(void 0,(0,i.default)(n));return s.length>e.logStackSize&&s.pop(),s.push("[".concat(t,"] ").concat(r)),r}function c(e){return"#".concat(r," [").concat((new Date).toLocaleTimeString(),"] > ").concat(e)}this.debug=function(){var r=[].slice.call(arguments,0);r[0]=c(r[0]);var i=u("debug",r);e.verbose&&(t.isFirefox()?n.debug(i):n.groupCollapsed?(n.groupCollapsed(i),n.trace("Trace"),n.groupEnd()):n.debug?n.debug(i):console.log(i))},this.error=function(){var e=[].slice.call(arguments,0);e[0]=c(e[0]),n.error(u("error",e))},this.warn=function(){var e=[].slice.call(arguments,0);e[0]=c(e[0]),n.warn(u("warn",e))},this.getLines=function(){return s}};var i=r(e("@babel/runtime/helpers/toConsumableArray")),o=r(e("format-util")),a=r(e("./browser"))},{"./browser":124,"@babel/runtime/helpers/interopRequireDefault":4,"@babel/runtime/helpers/toConsumableArray":7,"format-util":47}],126:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){this.emit=function(n){var r,u=Array.prototype.slice.call(arguments,0);if(!n)throw s.default.create("You cannot emit without an event.",e);if(n===a.default.ERROR){var c=u[1];c=s.default.create(c,e),u[1]=c}e.debug&&("removeListener"!==n&&"newListener"!==n&&(u[1]&&(r=u.slice(1)),r?e.debug("".concat(t," emits ").concat(n," with ").concat((0,o.default)(r))):e.debug("".concat(t," emits ").concat(n))));return i.default.emit.apply(i.default,u)},this.on=function(e,t){return i.default.on(e,t)},this.once=function(e,t){return i.default.once(e,t)},this.listeners=function(e){return i.default.listeners(e)},this.removeListener=function(e,t){return i.default.removeListener(e,t)},this.removeAllListeners=function(){i.default.removeAllListeners()}};var i=r(e("despot")),o=r(e("safe-json-stringify")),a=r(e("./../events")),s=r(e("./videomailError"))},{"./../events":119,"./videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,despot:31,"safe-json-stringify":99}],127:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=e("filesize"),o=r(e("humanize-duration"));n.default={filesize:function(e,t){return(0,i.filesize)(e,{round:t})},toTime:function(e){return(0,o.default)(e)}}},{"@babel/runtime/helpers/interopRequireDefault":4,filesize:46,"humanize-duration":62}],128:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=["loadstart","suspend","progress","abort","emptied","stalled","pause","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","ended","ratechange","durationchange","volumechange"]},{}],129:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){if(null===e)return"null";if(void 0===e)return"undefined";if("string"==typeof e)return e;if(Array.isArray(e))return function(e){if(e&&e.length>0){var t=[];return e.forEach((function(e){e&&t.push((0,o.default)(e))})),a+t.join(s)}}(e);if("object"===(0,i.default)(e))return function(e,t){var n,r=Object.getOwnPropertyNames(e),i=t&&t.excludes||[],u=[];if(i.push("stack"),r&&r.length>0){var c=!1;r.forEach((function(t){i&&(c=i.indexOf(t)>=0),!c&&e[t]&&u.push((0,o.default)(e[t]))}))}1===u.length?n=u.join():u.length>1&&(n=a+u.join(s));return n}(e,t);return e.toString()};var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("safe-json-stringify")),a="- ",s="<br/>".concat(a)},{"@babel/runtime/helpers/interopRequireDefault":4,"@babel/runtime/helpers/typeof":10,"safe-json-stringify":99}],130:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.screen||(e.screen={});(0,i.default)("native"),t.mediaDevices&&t.mediaDevices.getUserMedia||(t.getUserMedia_=t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia);!e.AudioContext&&e.webkitAudioContext&&(e.AudioContext=e.webkitAudioContext);e.URL||(e.URL=e.webkitURL||e.mozURL||e.msURL);t.connection||(t.connection=t.mozConnection||t.webkitConnection);var n,r=["debug","groupCollapsed","groupEnd","error","exception","info","log","trace","warn"],o={};e.console?o=e.console:e.console=function(){};var a=r.length;for(;a--;)o[n=r[a]]||(o[n]=function(){})},e("classlist.js");var i=r(e("request-frame"))},{"@babel/runtime/helpers/interopRequireDefault":4,"classlist.js":23,"request-frame":97}],131:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("@babel/runtime/helpers/typeof")),o=r(e("./../resource")),a=r(e("create-error")),s=r(e("safe-json-stringify")),u=r(e("./pretty")),c="Videomail Error",l=(0,a.default)(Error,c,{title:void 0,message:void 0,explanation:void 0,logLines:void 0,siteName:void 0,cookie:void 0,location:void 0,err:void 0,promise:void 0,cause:void 0,reason:void 0,browser:void 0,cpu:void 0,device:void 0,engine:void 0,os:void 0,screen:void 0,orientation:void 0}),f=function(e){return(0,u.default)(e,{excludes:["stack"]})};l.PERMISSION_DENIED="PERMISSION_DENIED",l.NOT_ALLOWED_ERROR="NotAllowedError",l.NOT_CONNECTED="Not connected",l.DOM_EXCEPTION="DOMException",l.STARTING_FAILED="Starting video failed",l.MEDIA_DEVICE_NOT_SUPPORTED="MediaDeviceNotSupported",l.BROWSER_PROBLEM="browser-problem",l.WEBCAM_PROBLEM="webcam-problem",l.IOS_PROBLEM="ios-problem",l.OVERCONSTRAINED="OverconstrainedError",l.NOT_FOUND_ERROR="NotFoundError",l.NOT_READABLE_ERROR="NotReadableError",l.SECURITY_ERROR="SecurityError",l.TRACK_START_ERROR="TrackStartError",l.INVALID_STATE_ERROR="InvalidStateError",l.create=function(n,r,a,u){var d;if(n&&n.name===c)return n;!a&&r&&(a=r,r=void 0),a||(a={}),u||(u={});var h,p,m=a&&a.isAudioEnabled&&a.isAudioEnabled(),y=u.classList||[],b=new(0,e("./browser").default)(a);switch("object"===(0,i.default)(n)?n.name===l.TRACK_START_ERROR?h=l.TRACK_START_ERROR:n.name===l.SECURITY_ERROR?h=l.SECURITY_ERROR:8===n.code&&n.name===l.NotFoundError?h=l.NotFoundError:35===n.code||n.name===l.NOT_ALLOWED_ERROR?h=l.NOT_ALLOWED_ERROR:1===n.code&&1===n.PERMISSION_DENIED?h=l.PERMISSION_DENIED:n.constructor&&n.constructor.name===l.DOM_EXCEPTION?h=n.name===l.NOT_READABLE_ERROR?l.NOT_READABLE_ERROR:l.DOM_EXCEPTION:n.constructor&&n.constructor.name===l.OVERCONSTRAINED?h=l.OVERCONSTRAINED:n.explanation===l.STARTING_FAILED?h=n.explanation:n.name?h=n.name:"error"===n.type&&0===n.target.bufferedAmount&&(h=l.NOT_CONNECTED):h=n===l.NOT_CONNECTED?l.NOT_CONNECTED:n,h){case l.SECURITY_ERROR:p="The operation was insecure",r="Probably you have disallowed Cookies for this page?",y.push(l.BROWSER_PROBLEM);break;case l.OVERCONSTRAINED:p="Invalid webcam constraints",r=n.constraint?"width"===n.constraint?"Your webcam does not meet the width requirement.":"Unmet constraint: ".concat(n.constraint):n.toString();break;case"MediaDeviceFailedDueToShutdown":p="Webcam is shutting down",r="This happens your webcam is already switching off and not giving you permission to use it.";break;case"SourceUnavailableError":p="Source of your webcam cannot be accessed",r="Probably it is locked from another process or has a hardware error.",n.explanation&&(n.explanation+=" Details: ".concat(n.explanation));break;case l.NOT_FOUND_ERROR:case"NO_DEVICES_FOUND":m?(p="No webcam nor microphone found",r="Your browser cannot find a webcam with microphone attached to your machine."):(p="No webcam found",r="Your browser cannot find a webcam attached to your machine."),y.push(l.WEBCAM_PROBLEM);break;case"PermissionDismissedError":p="Ooops, you didn't give me any permissions?",r="Looks like you skipped the webcam permission dialogue.<br/>Please grant access next time the dialogue appears.",y.push(l.WEBCAM_PROBLEM);break;case l.NOT_ALLOWED_ERROR:case l.PERMISSION_DENIED:case"PermissionDeniedError":p="Permission denied",r="Cannot access your webcam. This can have two reasons:<br/>a) you blocked access to webcam; or<br/>b) your webcam is already in use.",y.push(l.WEBCAM_PROBLEM);break;case"HARDWARE_UNAVAILABLE":p="Webcam is unavailable",r="Maybe it is already busy in another window?",(b.isChromeBased()||b.isFirefox())&&(r+=" Or you have to allow access above?"),y.push(l.WEBCAM_PROBLEM);break;case l.NOT_CONNECTED:p="Unable to connect",r="Either the videomail server or your connection is down. Trying to reconnect every few seconds …";break;case"NO_VIDEO_FEED":p="No video feed found!",r="Your webcam is already used in another browser.",y.push(l.WEBCAM_PROBLEM);break;case l.STARTING_FAILED:p="Starting video failed",r="Most likely this happens when the webcam is already active in another browser.",y.push(l.WEBCAM_PROBLEM);break;case"DevicesNotFoundError":p="No available webcam could be found",r="Looks like you do not have any webcam attached to your machine; or the one you plugged in is already used.",y.push(l.WEBCAM_PROBLEM);break;case l.NOT_READABLE_ERROR:case l.TRACK_START_ERROR:p="No access to webcam",r="A hardware error occurred which prevented access to your webcam.",y.push(l.WEBCAM_PROBLEM);break;case l.INVALID_STATE_ERROR:p="Invalid state",r="Video recording stream from your webcam already has finished.",y.push(l.WEBCAM_PROBLEM);break;case l.DOM_EXCEPTION:switch(n.code){case 8:p="Requested webcam not found",r="A webcam is needed but could not be found",y.push(l.WEBCAM_PROBLEM);break;case 9:var g="https:".concat(window.location.href.substring(window.location.protocol.length));p="Security upgrade needed",r='Click <a href="'.concat(g,'">here</a> to switch to HTTPs which is more safe ')+" and enables encrypted videomail transfers.",y.push(l.BROWSER_PROBLEM);break;case 11:p="Invalid State",r="The object is in an invalid, unusable state.",y.push(l.BROWSER_PROBLEM);break;default:p="DOM Exception",r=f(n),y.push(l.BROWSER_PROBLEM)}break;case l.MEDIA_DEVICE_NOT_SUPPORTED:p="Media device not supported",r=f(n);break;default:var v=r;if(r&&"object"===(0,i.default)(r)&&(r=f(r)),!r&&v&&(r=v.explanation?v.explanation:"Inspected: ".concat((0,s.default)(v))),n)if("string"==typeof n)p=n;else if(n.message&&(p=f(n.message)+" (pretty)"),n.explanation&&(r?r+=";<br/>".concat(f(n.explanation)):r=f(n.explanation)),n.details){var w=f(n.details);r?w&&(r+=";<br/>".concat(w)):r=w}p||(h&&(p=h+" (weird)"),!r&&n&&(r=f(n)),f(p)===r&&(r=void 0))}var E=null;a.logger&&a.logger.getLines&&(E=a.logger.getLines()),(a&&a.debug||console.log)("VideomailError: create()",p,r||"(no explanation set)");var _,R=b.getUsefulData(),S=t.document.cookie.split("; "),A={title:"videomail-client error",message:p,explanation:r,logLines:E,siteName:a.siteName,browser:R.browser,cpu:R.cpu,device:R.device,engine:R.engine,os:R.os,location:window.location.href,cookie:S.length>0?S.join(",\n"):void 0,screen:[screen.width,screen.height,screen.colorDepth].join("×"),orientation:"string"==typeof screen.orientation?screen.orientation:screen.orientation.type.toString(),errNo:null==n?void 0:n.errno,errCode:null==n?void 0:n.code,errName:null==n?void 0:n.name,errType:null==n?void 0:n.type,errConstraint:null==n?void 0:n.constraint,errConstructorName:null==n||null===(d=n.constructor)||void 0===d?void 0:d.name},O=new l(n instanceof Error?n:p,A),k=!1;function T(e){return y.indexOf(e)>=0}return a.reportErrors&&(k="function"==typeof a.reportErrors?a.reportErrors(O):a.reportErrors),k&&(_=new o.default(a)),_&&_.reportError(O,(function(e){e&&console.error("Unable to report error",e)})),O.getClassList=function(){return y},O.removeDimensions=function(){return T(l.IOS_PROBLEM)||b.isMobile()},O.hideButtons=function(){return T(l.BROWSER_PROBLEM)||u.browserProblem||T(l.IOS_PROBLEM)},O.hideForm=function(){return T(l.IOS_PROBLEM)},O};n.default=l}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./../resource":121,"./browser":124,"./pretty":129,"@babel/runtime/helpers/interopRequireDefault":4,"@babel/runtime/helpers/typeof":10,"create-error":27,"safe-json-stringify":99}],132:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("contains")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("inherits")),u=r(e("../events")),c=r(e("../util/eventEmitter")),l=function(e,t){c.default.call(this,t,"Buttons");var n,r,s,l,f,d,h,p,m,y,b=this,g=t.debug;function v(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){(0,o.default)(e,!0)}))}function w(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){(0,o.default)(e,!1)}))}function E(e){var t=e&&!0;return e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){t&&(t=e&&!(0,o.default)(e))})),t}function _(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){e&&("INPUT"===e.tagName||"BUTTON"===e.tagName?e.disabled=!0:e.classList.add("disabled"))}))}function R(e){e&&!Array.isArray(e)&&(e=[e]),e&&e.forEach((function(e){e&&("INPUT"===e.tagName||"BUTTON"===e.tagName?e.disabled=!1:e.classList.remove("disabled"))}))}function S(e,t,n,r){return r&&_(e),n?e.type=n:e.type||(e.type="button"),!t&&v(e),e}function A(e,t){e.onclick=function(e){e&&e.preventDefault();try{t({event:e})}catch(e){b.emit(u.default.ERROR,e)}}}function O(e){var t,r;return e.id&&(t=document.getElementById(e.id)),t||(t=(0,a.default)("input#".concat(e.id),{type:"radio",name:e.name,value:e.value,checked:e.checked}),r=(0,a.default)("span.radioGroup",t,(0,a.default)("label",{htmlFor:e.id},e.label)),h&&(0,i.default)(n,h)?n.insertBefore(r,h):n.appendChild(r)),e.changeHandler&&(t.onchange=e.changeHandler),_(t),t}function k(e,r,o,s,u,c,l){var f,d=!(arguments.length>7&&void 0!==arguments[7])||arguments[7];return(f=u?document.getElementById(u):l?document.querySelector(l):n.querySelector(".".concat(e)))?f=S(f,s,c,d):(t.selectors.buttonClass&&(e+=".".concat(t.selectors.buttonClass)),(f=S(f=(0,a.default)("button.".concat(e)),s,c,d)).innerHTML=r,h&&(0,i.default)(n,h)?n.insertBefore(f,h):n.appendChild(f)),o&&A(f,o),f}function T(e){E(d)||e.paused||w(r),e.paused||(_(f),v(f)),t.enableAutoValidation||R(h)}function x(){v(r),v(d),s&&(w(s),R(s)),R(f),w(f)}function j(){_(d),e.beginWaiting(),e.recordAgain()}function M(){e.submit()}function C(t){_(r),e.record(t)}function D(){g("Buttons: initEvents()"),b.on(u.default.USER_MEDIA_READY,(function(e){e.switchingFacingMode||function(e){T(e),E(r)&&!e.recordWhenReady&&R(r),t.enableAutoValidation&&_(h),e.recordWhenReady||(E(p)&&R(p),E(m)&&R(m))}(e)})).on(u.default.PREVIEW,(function(){v(r),v(f),_(p),_(m),w(d),R(d),t.enableAutoValidation||R(h)})).on(u.default.PAUSED,(function(){b.adjustButtonsForPause()})).on(u.default.RECORDING,(function(e){!function(e){e>1?x():(_(m),_(p),_(d),_(r))}(e)})).on(u.default.FIRST_FRAME_SENT,(function(){x()})).on(u.default.RESUMING,(function(){v(l),v(r),s&&(R(s),w(s))})).on(u.default.STOPPING,(function(){_(f),_(r),v(s),v(l)})).on(u.default.COUNTDOWN,(function(){_(r),_(m),_(p)})).on(u.default.SUBMITTING,(function(){g("Buttons: onSubmitting()"),_(h),_(d)})).on(u.default.RESETTING,(function(){_(h),b.reset()})).on(u.default.INVALID,(function(){t.enableAutoValidation&&_(h)})).on(u.default.VALID,(function(){t.enableAutoValidation&&R(h)})).on(u.default.SUBMITTED,(function(){_(f),_(d),_(r),_(h)})).on(u.default.HIDE,(function(){v(r),v(f),v(d),v(l),v(p),v(m)})).on(u.default.FORM_READY,(function(e){T(e)})).on(u.default.REPLAY_SHOWN,(function(){b.hide()})).on(u.default.GOING_BACK,(function(){v(d),w(r),w(h)})).on(u.default.ENABLING_AUDIO,(function(){g("Buttons: onEnablingAudio()"),_(r),_(p),_(m)})).on(u.default.DISABLING_AUDIO,(function(){g("Buttons: onDisablingAudio()"),_(r),_(p),_(m)})).on(u.default.STARTING_OVER,(function(){w(h)})).on(u.default.CONNECTED,(function(){t.loadUserMediaOnRecord&&E(r)&&R(r)})).on(u.default.DISCONNECTED,(function(){_(r),_(p),_(m)})).on(u.default.ERROR,(function(e){e.hideButtons&&e.hideButtons()&&t.adjustFormOnBrowserError&&b.hide()}))}this.enableSubmit=function(){R(h)},this.adjustButtonsForPause=function(){b.isCountingDown()||(s&&v(s),w(l),R(l),v(r),w(f),R(f))},this.reset=function(){t.debug("Buttons: reset()"),_(s),_(l),_(r),_(f),_(d),_(p),_(m)},this.isRecordAgainButtonEnabled=function(){return!d.disabled},this.isReady=function(){return!!r&&this.isRecordButtonEnabled()},this.isRecordButtonEnabled=function(){return!r.disabled},this.setSubmitButton=function(e){h=e},this.getSubmitButton=function(){return h},this.build=function(){(n=e.querySelector(".".concat(t.selectors.buttonsClass)))||(n=(0,a.default)("div.".concat(t.selectors.buttonsClass)),e.appendChild(n)),t.disableSubmit||(h?_(h):h=k(t.selectors.submitButtonClass,"Submit",null,!0,t.selectors.submitButtonId,"submit",t.selectors.submitButtonSelector,t.enableAutoValidation),!e.hasForm()&&h&&A(h,M)),r=k(t.selectors.recordButtonClass,t.text.buttons.record,C,!1),t.enablePause&&(s=k(t.selectors.pauseButtonClass,t.text.buttons.pause,e.pause,!1)),t.enablePause&&(l=k(t.selectors.resumeButtonClass,t.text.buttons.resume,e.resume,!1)),f=k(t.selectors.previewButtonClass,t.text.buttons.preview,e.stop,!1),d=k(t.selectors.recordAgainButtonClass,t.text.buttons.recordAgain,j,!1),t.audio&&t.audio.switch&&(m=O({id:"audioOffOption",name:"audio",value:"off",label:t.text.audioOff,checked:!t.isAudioEnabled(),changeHandler:function(){e.disableAudio()}}),p=O({id:"audioOnOption",name:"audio",value:"on",label:t.text.audioOn,checked:t.isAudioEnabled(),changeHandler:function(){e.enableAudio()}})),!y&&D(),y=!0},this.unload=function(){y&&(b.reset(),g("Buttons: unload()"),b.removeAllListeners(),y=!1)},this.hide=function(e){v(n),e&&e.deep&&(v(r),v(s),v(l),v(f),v(d),v(h),v(p),v(m))},this.show=function(){w(n)},this.isCountingDown=function(){return e.isCountingDown()}};(0,s.default)(l,c.default);n.default=l},{"../events":119,"../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":4,contains:25,hidden:61,hyperscript:63,inherits:66}],133:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("@babel/runtime/helpers/defineProperty")),o=r(e("document-visibility")),a=r(e("hidden")),s=r(e("insert-css")),u=r(e("safe-json-stringify")),c=r(e("inherits")),l=r(e("../../styles/css/main.min.css.js")),f=r(e("../events")),d=r(e("../resource")),h=r(e("../util/eventEmitter")),p=r(e("../util/videomailError")),m=r(e("./buttons")),y=r(e("./dimension")),b=r(e("./form")),g=r(e("./optionsWrapper")),v=r(e("./visuals")),w=function(e){h.default.call(this,e,"Container");var t,n,r,c=this,w=(0,o.default)(),E=new v.default(this,e),_=new m.default(this,e),R=new d.default(e),S=document.querySelector("html"),A=e.debug,O=!1,k=!1,T=!1;function x(){return t&&"FORM"===t.tagName?t:e.selectors.formId?document.getElementById(e.selectors.formId):function(){if(t)return t.closest("form")}()}function j(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];A("Container: initEvents (playerOnly = ".concat(t,")")),e.enableAutoUnload&&window.addEventListener("beforeunload",(function(e){c.unload(e)}),{once:!0}),t||w.onChange((function(t){n&&(t?(e.isAutoPauseEnabled()&&c.isCountingDown()&&c.resume(),c.emit(f.default.VISIBLE)):(e.isAutoPauseEnabled()&&(c.isCountingDown()||c.isRecording())&&c.pause("document invisible"),c.emit(f.default.INVISIBLE)))})),e.enableSpace&&(t||window.addEventListener("keypress",(function(t){var n=t.target.tagName;t.target.isContentEditable||"true"===t.target.contentEditable||!0===t.target.contentEditable||"INPUT"===n||"TEXTAREA"===n||32===t.code&&(t.preventDefault(),e.enablePause?E.pauseOrResume():E.recordOrStop())}))),c.on(f.default.ERROR,(function(t){!function(t){O=!0,t.stack?e.logger.error(t.stack):e.logger.error(t),e.displayErrors?E.error(t):E.reset()}(t),D(t),t.removeDimensions&&t.removeDimensions()&&C()})),t||c.on(f.default.LOADED_META_DATA,(function(){M()}))}function M(){if(e.video.stretch)C();else if(t){var n=E.getRecorderWidth(!0);if(n<1)throw p.default.create("Recorder width cannot be less than 1!",e);t.style.width="".concat(n,"px")}}function C(){t&&(t.style.width="auto")}function D(e){E.unload(e),_.unload(),r&&(r.unload(),r=void 0),c.endWaiting()}function N(t,n,r,i){r&&""!==r||(r=e.baseUrl),n&&e.submitWithVideomail&&(t.videomail=n.videomail),R.form(t,r,i)}function I(e,t,n,r,i){c.endWaiting(),e?c.emit(f.default.ERROR,e):(k=!0,r&&i&&i.body&&Object.keys(i.body).forEach((function(e){r[e]=i.body[e]})),c.emit(f.default.SUBMITTED,n,r||i),i&&"text/html"===i.type&&i.text&&(document.body.innerHTML=i.text))}function L(e){return e&&"POST"===e.toUpperCase()}!function(){if(e.hasDefinedWidth()&&e.video.width%2!=0)throw p.default.create("Width must be divisible by two.",e);if(e.hasDefinedHeight()&&e.video.height%2!=0)throw p.default.create("Height must be divisible by two.",e)}(),this.buildForm=function(){if(!r){var t=x();if(t){var n=(r=new b.default(c,t,e)).findSubmitButton();n&&_.setSubmitButton(n),r.build()}}},this.addPlayerDimensions=function(e){try{if(!e)throw new Error("Videomail data is missing for attaching player dimensions");var t=c.getReplay().getParentElement();return e.playerHeight=c.calculateHeight({responsive:!0,videoWidth:e.width,ratio:e.height/e.width},t),e.playerWidth=c.calculateWidth({responsive:!0,videoHeight:e.playerHeight,ratio:e.height/e.width}),e}catch(e){c.emit(f.default.ERROR,e)}},this.limitWidth=function(n){return y.default.limitWidth(t,n,e)},this.limitHeight=function(t){return y.default.limitHeight(t,e)},this.calculateWidth=function(t){return y.default.calculateWidth(g.default.merge(e,t))},this.calculateHeight=function(n,r){return r||(r=t||document.body),y.default.calculateHeight(r,g.default.merge(e,n))},this.hasElement=function(){return Boolean(t)},this.build=function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0;A("Container: build (playerOnly = ".concat(r).concat(i?', replayParentElement="'.concat(i,'"'):"",")"));try{var o;if(e.insertCss&&(0,s.default)(l.default,{prepend:!0}),!(t=document.getElementById(e.selectors.containerId))&&i)"string"==typeof i&&(i=document.getElementById(i)),null!==(o=i)&&void 0!==o&&o.classList.contains(e.selectors.containerClass)&&(t=i);!n&&j(r),M(),c.buildForm(),function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1?arguments[1]:void 0;A("Container: buildChildren (playerOnly = ".concat(n).concat(r?', replayParentElement="'.concat(r,'"'):"",")")),t&&t.classList.add(e.selectors.containerClass),n||_.build(),E.build(n,r)}(r,t?void 0:i),O?A("Container: building failed due to an error."):(A("Container: built."),n=!0,c.emit(f.default.BUILT))}catch(e){c.emit(f.default.ERROR,e)}},this.getSubmitButton=function(){return _.getSubmitButton()},this.querySelector=function(e){if(t)return t.querySelector(e)},this.beginWaiting=function(){S.classList&&S.classList.add("wait")},this.endWaiting=function(){S.classList&&S.classList.remove("wait")},this.appendChild=function(e){t&&t.appendChild(e)},this.insertBefore=function(e,n){t&&t.insertBefore(e,n)},this.unload=function(e){try{if(!n)return;A("Container: unload(".concat(e?(0,u.default)(e):"",")")),c.emit(f.default.UNLOADING),D(e),c.removeAllListeners(),n=k=!1}catch(e){c.emit(f.default.ERROR,e)}},this.show=function(){if(t&&((0,a.default)(t,!1),E.show(),!O)){var e=c.isPaused();e&&_.adjustButtonsForPause(),_.show(),c.isReplayShown()?c.emit(f.default.PREVIEW):c.emit(f.default.FORM_READY,{paused:e})}},this.hide=function(){A("Container: hide()"),O=!1,c.isRecording()&&c.pause(),E.hide(),k&&(_.hide(),(0,a.default)(t,!0))},this.startOver=function(e){try{c.emit(f.default.STARTING_OVER),k=!1,r.show(),E.back(e,(function(){e&&e.keepHidden?c.enableForm():c.show(e)}))}catch(e){c.emit(f.default.ERROR,e)}},this.showReplayOnly=function(){O=!1,c.isRecording()&&c.pause(),E.showReplayOnly(),k&&_.hide()},this.isNotifying=function(){return E.isNotifying()},this.isPaused=function(){return E.isPaused()},this.pause=function(e){E.pause(e)},this.validate=function(t,n){var o=!0,a=!0;if(e.enableAutoValidation?n?o=n:c.isNotifying()?o=!1:E.isConnected()?o=E.isUserMediaLoaded()||E.isReplayShown():E.isConnecting()&&(o=!1):(o=!1,T=!0),o){var s,u=null==t||null===(s=t.target)||void 0===s?void 0:s.name;u?c.emit(f.default.VALIDATING,{targetName:u}):c.emit(f.default.VALIDATING,t);var l,d,h=E.validate()&&_.isRecordAgainButtonEnabled();if(r){var p=r.getInvalidElement();if(p?(a=!1,l='Input "'.concat(p.name,'" seems wrong 🤔'),d=(0,i.default)({},p.name,p.value)):E.isHidden()||h||(_.isReady()||c.isRecording()||c.isPaused()||c.isCountingDown())&&(a=!1,l="Don't forget to record a video 😉",d={key:void 0}),a){var m,y,b,g=r.getRecipients(),v="to"in g,w="cc"in g,R="bcc"in g,S=(null===(m=g.to)||void 0===m?void 0:m.length)>0,A=(null===(y=g.cc)||void 0===y?void 0:y.length)>0,O=(null===(b=g.bcc)||void 0===b?void 0:b.length)>0;v?S||(w&&R?A||O||(a=!1):w?A||(a=!1):R&&O||(a=!1)):w&&(A||R&&!O&&(a=!1)),a||(l="At least one recipient is required")}}else a=h;a?c.emit(f.default.VALID):d?c.emit(f.default.INVALID,l,d):c.emit(f.default.INVALID,l),T=a}return a},this.disableForm=function(e){r&&r.disable(e)},this.enableForm=function(e){r&&r.enable(e)},this.hasForm=function(){return Boolean(r)},this.submitAll=function(t,n,i){A("Container: submitAll(".concat(n,': "').concat(i,'")'));var o=L(n);function a(){c.beginWaiting(),c.disableForm(!0),c.emit(f.default.SUBMITTING)}Boolean(t[e.selectors.keyInputName])?(a(),function(e,t,n){var i=r.transformFormData(e);L(t)||!t?(i.recordingStats=E.getRecordingStats(),i.width=E.getRecorderWidth(!0),i.height=E.getRecorderHeight(!0),navigator.connection&&(i.connection={downlink:"".concat(navigator.connection.downlink," Mbit/s"),effectiveType:navigator.connection.effectiveType,rtt:navigator.connection.rtt,type:navigator.connection.type}),R.post(i,n)):function(e){return e&&"PUT"===e.toUpperCase()}(t)&&R.put(i,n)}(t,n,(function(e,n,r){e?I(e,0,n,r):o?N(t,r,i,(function(e,t){I(e,0,n,r,t)})):I(null,0,n,r)}))):e.enableAutoSubmission&&(a(),N(t,null,i,(function(e,t){I(e,0,null,null,t)})))},this.isBuilt=function(){return n},this.isReplayShown=function(){return E.isReplayShown()},this.isDirty=function(){var e=!1;return r&&(E.isRecorderUnloaded()||k?e=!1:(c.isReplayShown()||c.isPaused())&&(e=!0)),e},this.getReplay=function(){return E.getReplay()},this.isOutsideElementOf=function(e){return e.parentNode!==t&&e!==t},this.hideForm=function(e){r&&r.hide(),_&&_.hide(e)},this.loadForm=function(e){r&&(r.loadVideomail(e),c.validate())},this.enableAudio=function(){e.setAudioEnabled(!0),c.emit(f.default.ENABLING_AUDIO)},this.disableAudio=function(){e.setAudioEnabled(!1),c.emit(f.default.DISABLING_AUDIO)},this.submit=function(){A("Container: submit()"),T&&r&&r.doTheSubmit()},this.isCountingDown=E.isCountingDown.bind(E),this.isRecording=E.isRecording.bind(E),this.record=E.record.bind(E),this.resume=E.resume.bind(E),this.stop=E.stop.bind(E),this.recordAgain=E.recordAgain.bind(E)};(0,c.default)(w,h.default);n.default=w},{"../../styles/css/main.min.css.js":148,"../events":119,"../resource":121,"../util/eventEmitter":126,"../util/videomailError":131,"./buttons":132,"./dimension":134,"./form":135,"./optionsWrapper":136,"./visuals":137,"@babel/runtime/helpers/defineProperty":3,"@babel/runtime/helpers/interopRequireDefault":4,"document-visibility":32,hidden:61,inherits:66,"insert-css":67,"safe-json-stringify":99}],134:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("number-is-integer")),o=r(e("./../util/videomailError"));function a(e,t){if(t.hasDefinedHeight()&&(e=e?Math.min(t.video.height,e):t.video.height),(0,i.default)(e)&&e<1)throw o.default.create("Got a video height less than 1 (".concat(e,") while figuring out the minimum!"),t);return e}n.default={limitWidth:function(e,t,n){var r,a=function(e){var t=0,n=e.getBoundingClientRect();return n&&(t=n.right-n.left),t<1&&(t=(n=document.body.getBoundingClientRect()).right-n.left),t}(e);if(r=t?a>0&&a<t?a:t:a,(0,i.default)(r)&&r<1)throw o.default.create("Limited width cannot be less than 1!",n);return r},limitHeight:function(e,t){if((0,i.default)(e)&&e<1)throw o.default.create("Passed limit-height argument cannot be less than 1!",t);var n=Math.min(e,document.documentElement.clientHeight);if(n<1)throw o.default.create("Limited height cannot be less than 1!",t);return n},calculateWidth:function(e){var t=e.videoHeight||null,n=e.ratio||e.getRatio();if(t=a(t,e),e.responsive&&(t=this.limitHeight(t,e)),(0,i.default)(t)&&t<1)throw o.default.create("Height cannot be smaller than 1 when calculating width.",e);var r=parseInt(t/n);if(r<1)throw o.default.create("Calculated width cannot be smaller than 1!",e);return r},calculateHeight:function(e,t){var n,r=t.videoWidth||null,s=t.ratio||t.getRatio();if(t.hasDefinedWidth()&&(r=t.video.width),(0,i.default)(r)&&r<1)throw o.default.create("Unable to calculate height when width is less than 1.",t);if(t.responsive&&(r=this.limitWidth(e,r,t)),r&&(n=parseInt(r*s)),(0,i.default)(n)&&n<1)throw o.default.create("Just calculated a height less than 1 which is wrong.",t);return a(n,t)}}},{"./../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,"number-is-integer":74}],135:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("get-form-data")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("inherits")),u=r(e("safe-json-stringify")),c=r(e("../events")),l=r(e("../util/eventEmitter")),f=r(e("../util/videomailError"));function d(e){return e.replace(/(^[,\s]+)|([,\s]+$)/g,"")}var h=function(e,t,n){l.default.call(this,n,"Form");var r,s=n.debug,h=this,p={subject:n.selectors.subjectInputName,from:n.selectors.fromInputName,to:n.selectors.toInputName,cc:n.selectors.ccInputName,bcc:n.selectors.bccInputName,body:n.selectors.bodyInputName,key:n.selectors.keyInputName,parentKey:n.selectors.parentKeyInputName,sendCopy:n.selectors.sendCopyInputName};function m(){return(0,i.default)(t,{includeDisabled:!0})}function y(e,n){for(var r,i=t.elements.length,o=0;o<i;o++)(n||!n&&("BUTTON"!==(r=t.elements[o]).tagName&&"submit"!==r.type))&&(t.elements[o].disabled=e)}function b(e){var t=e.name;return Object.values(p).includes(t)}function g(){for(var e=t.querySelectorAll("input, textarea, select"),n=[],r=0;r<e.length;r++){var i=e[r];b(i)&&n.push(i)}return n}this.transformFormData=function(e){var t={};return Object.keys(p).forEach((function(n){var r=p[n];if(r in e){var i=e[r];void 0===i||(t[n]=i)}})),t.from&&(t.from=d(t.from)),t.to&&(t.to=d(t.to)),t.cc&&(t.cc=d(t.cc)),t.bcc&&(t.bcc=d(t.bcc)),t},this.getRecipients=function(){var e=this.transformFormData(m()),t={};return"to"in e&&(t.to=e.to),"cc"in e&&(t.cc=e.cc),"bcc"in e&&(t.bcc=e.bcc),t},this.loadVideomail=function(e){s("Form: loadVideomail()");for(var r,i,o=t.elements.length,a=0;a<o;a++)e[i=(r=t.elements[a]).name]&&(r.value=e[i]),i!==n.selectors.subjectInputName&&i!==n.selectors.bodyInputName||(r.disabled=!0);t.setAttribute("method","put")},this.disable=function(e){y(!0,e)},this.enable=function(e){y(!1,e)},this.build=function(){if(s("Form: build()"),(r=t.querySelector('input[name="'.concat(n.selectors.keyInputName,'"]')))||(r=(0,a.default)("input",{name:n.selectors.keyInputName,type:"hidden"}),t.appendChild(r)),n.enableAutoValidation)for(var i=g(),u=0,l=i.length;u<l;u++){var d=i[u],p=d.type;"radio"===p||"select"===p?d.addEventListener("change",e.validate):d.addEventListener("input",e.validate)}this.on(c.default.PREVIEW,(function(e){e||r.value?e&&(r.value=e,r.dispatchEvent(new Event("input",{bubbles:!0}))):h.emit(c.default.ERROR,f.default.create("Videomail key for preview is missing!",n))})),this.on(c.default.GOING_BACK,(function(){r.value=null,r.dispatchEvent(new Event("input",{bubbles:!0}))})),this.on(c.default.INVALID,(function(){t.classList.add("invalid")})),this.on(c.default.VALID,(function(){t.classList.remove("invalid")})),this.on(c.default.ERROR,(function(e){var r;e.hideForm&&e.hideForm()&&n.adjustFormOnBrowserError?function(){for(var e=t.elements.length,n=0;n<e;n++)(0,o.default)(t.elements[n],!0);(0,o.default)(t,!0)}():e.hideButtons&&e.hideButtons()&&n.adjustFormOnBrowserError&&(r=h.findSubmitButton(),(0,o.default)(r,!0))})),this.on(c.default.BUILT,(function(){e.getSubmitButton().onclick=h.doTheSubmit.bind(h)}))},this.unload=function(){s("Form: unload()"),function(){for(var t=g(),n=0,r=t.length;n<r;n++){var i=t[n],o=i.type;"radio"===o||"select"===o?i.removeEventListener("change",e.validate):i.removeEventListener("input",e.validate)}}(),this.removeAllListeners(),e.getSubmitButton().onclick=null},this.doTheSubmit=function(n){return n?(s("Form: doTheSubmit(".concat((0,u.default)(n),")")),n.preventDefault()):s("Form: doTheSubmit()"),e.hasElement()&&e.submitAll(m(),t.getAttribute("method"),t.getAttribute("action")),!1},this.getInvalidElement=function(){for(var e=g(),t=0,n=e.length;t<n;t++)if(!e[t].validity.valid)return e[t];return null},this.findSubmitButton=function(){return t.querySelector("[type='submit']")},this.hide=function(){t&&(0,o.default)(t,!0)},this.show=function(){t&&(0,o.default)(t,!1)}};(0,s.default)(h,l.default);n.default=h},{"../events":119,"../util/eventEmitter":126,"../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,"get-form-data":50,hidden:61,hyperscript:63,inherits:66,"safe-json-stringify":99}],136:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("deepmerge"));n.default={merge:function(e,t){return(0,i.default)(e,t,{arrayMerge:function(e,t){return t}})}}},{"@babel/runtime/helpers/interopRequireDefault":4,deepmerge:28}],137:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("inherits")),s=r(e("safe-json-stringify")),u=r(e("../events")),c=r(e("../util/eventEmitter")),l=r(e("./visuals/inside/recorderInsides")),f=r(e("./visuals/notifier")),d=r(e("./visuals/recorder")),h=r(e("./visuals/replay")),p=function(e,t){c.default.call(this,t,"Visuals");var n,r,a=this,p=new h.default(this,t),m=new d.default(this,p,t),y=new l.default(this,t),b=new f.default(this,t),g=t.debug;function v(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0;g("Visuals: buildChildren (playerOnly = ".concat(r).concat(i?', replayParentElement="'.concat(i,'"'):"",")")),(t=e.querySelector("noscript"))&&((t=(0,o.default)("noscript")).innerHTML="Please enable Javascript",n.appendChild(t)),r||(b.build(),y.build()),p.build(i)}function w(){t.video.stretch?E():n&&m&&(n.style.width="".concat(a.getRecorderWidth(!0),"px"),n.style.height="".concat(a.getRecorderHeight(!0),"px"))}function E(){n&&(n.style.width="auto",n.style.height="auto")}function _(){return!a.isNotifying()&&!p.isShown()&&!a.isCountingDown()}this.getRatio=function(){return n.clientWidth?n.clientHeight/n.clientWidth:0},this.isCountingDown=function(){return y.isCountingDown()},this.build=function(){var i=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=arguments.length>1?arguments[1]:void 0;if(e){if(!(n=e.querySelector(".".concat(t.selectors.visualsClass)))){n=(0,o.default)("div.".concat(t.selectors.visualsClass));var c=e.querySelector(".".concat(t.selectors.buttonsClass));c&&!e.isOutsideElementOf(c)?e.insertBefore(n,c):e.appendChild(n)}n.classList.add("visuals")}w(),!r&&function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n||(g("Visuals: initEvents (playerOnly = ".concat(n,")")),a.on(u.default.USER_MEDIA_READY,(function(){r=!0,a.endWaiting(),e.enableForm(!1)})).on(u.default.PREVIEW,(function(){a.endWaiting()})).on(u.default.BLOCKING,(function(n){(n.hideForm||t.adjustFormOnBrowserError)&&e.disableForm(!0)})).on(u.default.PREVIEW_SHOWN,(function(){e.validate(void 0,!0)})).on(u.default.LOADED_META_DATA,(function(){w()})).on(u.default.ERROR,(function(e){e.removeDimensions&&e.removeDimensions()&&E()})))}(i),v(i,s),r=!0},this.querySelector=function(e){return n&&n.querySelector(e)},this.appendChild=function(e){n&&n.appendChild(e)},this.removeChild=function(e){n.removeChild(e)},this.reset=function(){this.endWaiting(),m.reset()},this.beginWaiting=function(){e.beginWaiting()},this.endWaiting=function(){e.endWaiting()},this.stop=function(e){m.stop(e),y.hidePause()},this.back=function(e,t){!t&&e&&(t=e,e={}),p.hide(),b.hide(),e&&e.keepHidden?(m.hide(),t&&t()):m.back(t)},this.recordAgain=function(){this.back((function(){t.loadUserMediaOnRecord?a.once(u.default.SERVER_READY,(function(){a.record()})):a.once(u.default.USER_MEDIA_READY,(function(){a.record()}))}))},this.unload=function(e){try{if(!r)return;g("Visuals: unload(".concat(e?(0,s.default)(e):"",")")),a.removeAllListeners(),m.unload(e),y.unload(e),p.unload(),r=!1}catch(e){this.emit(u.default.ERROR,e)}},this.isNotifying=function(){return b.isVisible()},this.isReplayShown=function(){return p.isShown()},this.pause=function(e){m.pause(e),y.showPause()},this.resume=function(){y.isCountingDown()?y.resumeCountdown():m.resume(),y.hidePause()},this.pauseOrResume=function(){_.call(this)&&(this.isRecording()?this.pause():m.isPaused()?this.resume():m.isReady()&&this.record())},this.recordOrStop=function(){_()&&(this.isRecording()?this.stop():m.isReady()&&this.record())},this.record=function(){t.video.countdown?(this.emit(u.default.COUNTDOWN),y.startCountdown(m.record.bind(m))):m.record()},this.getRecorder=function(){return m},this.getReplay=function(){return p},this.validate=function(){return m.validate()&&this.isReplayShown()},this.getRecordingStats=function(){return m.getRecordingStats()},this.getAudioSampleRate=function(){return m.getAudioSampleRate()},this.isPaused=function(){return m.isPaused()},this.error=function(e){b.error(e)},this.hide=function(){n&&((0,i.default)(n,!0),this.emit(u.default.HIDE))},this.isHidden=function(){return!r||(n?(0,i.default)(n):void 0)},this.showVisuals=function(){n&&(0,i.default)(n,!1)},this.show=function(){!this.isReplayShown()&&n&&m.build(),this.showVisuals()},this.showReplayOnly=function(){p.show(),this.show(),m.hide(),b.hide()},this.isRecorderUnloaded=function(){return m.isUnloaded()},this.isConnecting=function(){return m.isConnecting()},this.getRecorderWidth=function(e){return m.getRecorderWidth(e)},this.getRecorderHeight=function(e,t){return m.getRecorderHeight(e,t)},this.limitWidth=function(n){return e.limitWidth(n,t)},this.limitHeight=function(t){return e.limitHeight(t)},this.calculateWidth=function(t){return e.calculateWidth(t)},this.calculateHeight=function(t){return e.calculateHeight(t)},this.getReplay=function(){return p},this.getBoundingClientRect=function(){return n&&n.getBoundingClientRect()},this.checkTimer=function(e){y.checkTimer(e)},this.isNotifierBuilt=function(){return b&&b.isBuilt()},this.isReplayShown=p.isShown.bind(p),this.hideReplay=p.hide.bind(p),this.hideRecorder=m.hide.bind(m),this.isRecording=m.isRecording.bind(m),this.isUserMediaLoaded=m.isUserMediaLoaded.bind(m),this.isConnected=m.isConnected.bind(m)};(0,a.default)(p,c.default);n.default=p},{"../events":119,"../util/eventEmitter":126,"./visuals/inside/recorderInsides":143,"./visuals/notifier":144,"./visuals/recorder":145,"./visuals/replay":146,"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63,inherits:66,"safe-json-stringify":99}],138:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){var n,r,a,s,u=this;function c(e){s||(t.debug("Countdown",a),--a<1?function(e){u.unload(),u.hide(),setTimeout((function(){e()}),0)}(e):n.innerHTML=a)}this.start=function(e){n.innerHTML=a=t.video.countdown,this.show(),r=setInterval(c.bind(this,e),950)},this.pause=function(){s=!0},this.resume=function(){s=!1},this.build=function(){(n=e.querySelector(".countdown"))?this.hide():(n=(0,o.default)("p.countdown"),this.hide(),e.appendChild(n))},this.show=function(){(0,i.default)(n,!1)},this.isCountingDown=function(){return Boolean(r)},this.unload=function(){clearInterval(r),s=!1,r=null},this.hide=function(){(0,i.default)(n,!0),this.unload()}};var i=r(e("hidden")),o=r(e("hyperscript"))},{"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63}],139:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){s.default.call(this,t,"Facing Mode");var n,r=this;this.build=function(){(n=e.querySelector(".facingMode"))?this.hide():((n=(0,o.default)("button.facingMode")).innerHTML="⤾",n.onclick=function(e){e&&e.preventDefault();try{r.emit(a.default.SWITCH_FACING_MODE)}catch(e){r.emit(a.default.ERROR,e)}},this.hide(),e.appendChild(n)),r.on(a.default.ERROR,(function(){r.hide()}))},this.hide=function(){(0,i.default)(n,!0)},this.show=function(){(0,i.default)(n,!1)}};var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("./../../../../events")),s=r(e("./../../../../util/eventEmitter"))},{"./../../../../events":119,"./../../../../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63}],140:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){if(!t.text.pausedHeader)throw a.default.create("Paused header cannot be empty",t);var n,r,s;function u(){return t.text.pausedHint}this.build=function(){n=e.querySelector(".paused"),(r=e.querySelector(".pausedHeader"))?(this.hide(),r.innerHTML=t.text.pausedHeader,u()&&(s.innerHTML=t.text.pausedHint)):(n=(0,o.default)("div.paused"),r=(0,o.default)("p.pausedHeader"),this.hide(),r.innerHTML=t.text.pausedHeader,n.appendChild(r),u()&&(s=e.querySelector(".pausedHint"),(s=(0,o.default)("p.pausedHint")).innerHTML=t.text.pausedHint,n.appendChild(s)),e.appendChild(n))},this.hide=function(){(0,i.default)(n,!0)},this.show=function(){(0,i.default)(n,!1)}};var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("./../../../../util/videomailError"))},{"./../../../../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63}],141:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t;this.build=function(){(t=e.querySelector(".recordNote"))?this.hide():(t=(0,o.default)("p.recordNote"),this.hide(),e.appendChild(t))},this.stop=function(){this.hide(),t.classList.remove("near"),t.classList.remove("nigh")},this.setNear=function(){t.classList.add("near")},this.setNigh=function(){t.classList.add("nigh")},this.hide=function(){(0,i.default)(t,!0)},this.show=function(){(0,i.default)(t,!1)}};var i=r(e("hidden")),o=r(e("hyperscript"))},{"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63}],142:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t,n){var r,a,s,u=!1,c=!1;function l(e,t){return e>=n.video.limitSeconds*t}function f(){var e,i=parseInt(s/60,10),o=s-60*i;if(!u||!c){var a=n.video.limitSeconds-s;!function(e){return!(u||!l(e,.6)||(u=!0,0))}(a)?function(e){return!(c||!l(e,.8)||(c=!0,0))}(a)&&(t.setNigh(),r.classList.add("nigh"),n.debug("End is nigh, ".concat(s," seconds to go"))):(t.setNear(),r.classList.add("near"),n.debug("End is near, ".concat(s," seconds to go")))}r.innerHTML="".concat(i,":").concat((e=o)<10?"0".concat(e):e)}function d(){(0,i.default)(r,!0)}function h(){return n.video.limitSeconds}this.check=function(t){var n=h()-Math.floor(t.intervalSum/1e3);n!==s&&(s=n,f(),s<1&&e.stop(!0))},this.start=function(){s=h(),u=c=!1,a=!0,f(),r.classList.remove("near"),r.classList.remove("nigh"),(0,i.default)(r,!1)},this.pause=function(){t.hide()},this.resume=function(){t.show()},this.stop=function(){null!==s&&a&&(n.debug("Stopping record timer. Was recording for about ~".concat(h()-s," seconds.")),d(),t.stop(),s=null,a=!1)},this.build=function(){(r=e.querySelector(".recordTimer"))?d():(r=(0,o.default)("p.recordTimer"),d(),e.appendChild(r))}};var i=r(e("hidden")),o=r(e("hyperscript"))},{"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63}],143:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("inherits")),o=r(e("./../../../events")),a=r(e("./../../../util/browser")),s=r(e("./../../../util/eventEmitter")),u=r(e("./recorder/countdown")),c=r(e("./recorder/facingMode")),l=r(e("./recorder/pausedNote")),f=r(e("./recorder/recordNote")),d=r(e("./recorder/recordTimer")),h=function(e,t){s.default.call(this,t,"RecorderInsides");var n,r,i,h,p=this,m=t.debug,y=new f.default(e),b=new d.default(e,y,t),g=new a.default(t);function v(){p.hidePause(),p.hideCountdown(),b.stop(),h&&h.hide()}function w(){m("RecorderInsides: initEvents()"),p.on(o.default.USER_MEDIA_READY,(function(){h&&h.show()})).on(o.default.RECORDING,(function(){b.start()})).on(o.default.RESUMING,(function(){b.resume()})).on(o.default.STOPPING,(function(){b.stop()})).on(o.default.PAUSED,(function(){p.isCountingDown()?n.pause():b.pause()})).on(o.default.ERROR,v).on(o.default.RESETTING,v).on(o.default.HIDE,(function(){p.hideCountdown()}))}t.video.countdown&&(n=new u.default(e,t)),t.video.facingModeButton&&g.isMobile()&&(h=new c.default(e,t)),t.enablePause&&(r=new l.default(e,t)),this.build=function(){m("RecorderInsides: build()"),n&&n.build(),r&&r.build(),h&&h.build(),y.build(),b.build(),!i&&w(),i=!0},this.unload=function(){n&&n.unload(),i=!1},this.showPause=function(){r&&r.show()},this.hidePause=function(){r&&r.hide()},this.hideCountdown=function(){n&&n.hide()},this.startCountdown=function(e){n&&n.start(e)},this.resumeCountdown=function(){n&&n.resume()},this.isCountingDown=function(){return n&&n.isCountingDown()},this.checkTimer=function(e){b.check(e)}};(0,i.default)(h,s.default);n.default=h},{"./../../../events":119,"./../../../util/browser":124,"./../../../util/eventEmitter":126,"./recorder/countdown":138,"./recorder/facingMode":139,"./recorder/pausedNote":140,"./recorder/recordNote":141,"./recorder/recordTimer":142,"@babel/runtime/helpers/interopRequireDefault":4,inherits:66}],144:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("hidden")),o=r(e("hyperscript")),a=r(e("inherits")),s=r(e("../../events")),u=r(e("../../util/eventEmitter")),c="notifierMessage",l=function(e,t){u.default.call(this,t,"Notifier");var n,r,a,l,f,d=this,h=t&&t.debug;function p(){h("Notifier: initEvents()"),d.on(s.default.CONNECTING,(function(){d.notify("Connecting …")})).on(s.default.LOADING_USER_MEDIA,(function(){d.notify("Loading webcam …")})).on(s.default.USER_MEDIA_READY,(function(){t.video.stretch?(n.style.width="auto",n.style.height="".concat(e.getRecorderHeight(!0,!0),"px")):(n.style.width="".concat(e.getRecorderWidth(!0),"px"),n.style.height="".concat(e.getRecorderHeight(!0),"px")),d.hide()})).on(s.default.LOADED_META_DATA,(function(){})).on(s.default.PREVIEW,(function(){d.hide()})).on(s.default.STOPPING,(function(n){!function(n){var r="";e.beginWaiting(),n&&(h("Limit reached"),r+="".concat(t.text.limitReached,".<br/>")),r+="".concat(t.text.sending," …"),d.notify(r,null,{stillWait:!0,entertain:t.notifier.entertain})}(n)})).on(s.default.PROGRESS,(function(e,n){!function(e,n){var r;t.isAudioEnabled()?(r="Video: ".concat(e),n&&(r+=", Audio: ".concat(n))):r=e,d.setExplanation(r)}(e,n)})).on(s.default.BEGIN_VIDEO_ENCODING,(function(){!function(){e.beginWaiting();var n="".concat(t.text.encoding," …");d.notify(n,null,{stillWait:!0,entertain:t.notifier.entertain}),b()}()})).on(s.default.UNLOADING,(function(){d.notify("Unloading …")})).on(s.default.DISCONNECTED,(function(){d.notify("Disconnected")})).on(s.default.CONNECTED,(function(){d.notify("Connected"),t.loadUserMediaOnRecord&&d.hide()}))}function m(){if(t.notifier.entertain){if(!l){var e=Math.floor(Math.random()*t.notifier.entertainLimit+1);n.className="notifier entertain ".concat(t.notifier.entertainClass).concat(e),a=setTimeout(m,t.notifier.entertainInterval),l=!0}}else y()}function y(){n&&n.classList.remove("entertain"),clearTimeout(a),a=null,l=!1}function b(){r&&(0,i.default)(r,!0)}function g(){return document.getElementById(c)}this.error=function(e){var n=e.message?e.message.toString():e.toString(),r=e.explanation?e.explanation.toString():null;n||t.debug("Weird empty error message generated for error",e),d.notify(n,r,{blocking:!0,problem:!0,hideForm:e.hideForm&&e.hideForm(),classList:e.getClassList&&e.getClassList(),removeDimensions:e.removeDimensions&&e.removeDimensions()})},this.setExplanation=function(e){r||(r=(0,o.default)("p",{className:"explanation"}),n?n.appendChild(r):t.logger.warn("Unable to show explanation because notifyElement is empty:",e)),r.innerHTML=e,(0,i.default)(r,!1)},this.build=function(){t.debug("Notifier: build()"),(n=e.querySelector(".notifier"))?this.hide():(n=(0,o.default)(".notifier"),this.hide(),e.appendChild(n)),!f&&p(),f=!0},this.hide=function(){var e;y(),n&&((0,i.default)(n,!0),n.classList.remove("blocking")),(e=g())&&(0,i.default)(e,!0),b()},this.isVisible=function(){return!!f&&(n&&!(0,i.default)(n))},this.isBuilt=function(){return f},this.notify=function(a,u){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},f=[a,u].filter(Boolean);t.debug("Notifier: notify(".concat(f.join(", "),")"));var d=!!l.stillWait&&l.stillWait,h=!!l.entertain&&l.entertain,p=!!l.blocking&&l.blocking,b=!!l.hideForm&&l.hideForm,v=!!l.classList&&l.classList,w=!!l.removeDimensions&&l.removeDimensions,E=g();if(!E&&n){var _=(0,o.default)("h2",{id:c});n.appendChild(_)}E=g(),n&&E&&r&&n.insertBefore(E,r),n&&(h||(n.className="notifier"),v&&v.forEach((function(e){n.classList.add(e)})),w&&(n.style.width="auto",n.style.height="auto")),p?(n&&n.classList.add("blocking"),this.emit(s.default.BLOCKING,{hideForm:b})):this.emit(s.default.NOTIFYING),e.hideReplay(),e.hideRecorder(),function(e,n){var r=g();if(r){if(t.debug("Notifier: setMessage(".concat(e,")")),e.length>0){var o=!!n.problem&&n.problem;r.innerHTML=(o?"☹ ":"")+e}else t.logger.warn("Not going to update notifierMessage element because message is empty",e);(0,i.default)(r,!1)}}(a,l),u&&u.length>0&&this.setExplanation(u),h?m():y(),e.showVisuals(),n&&(0,i.default)(n,!1),!d&&e.endWaiting()}};(0,a.default)(l,u.default);n.default=l},{"../../events":119,"../../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":4,hidden:61,hyperscript:63,inherits:66}],145:[function(e,t,n){(function(t){(function(){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("animitter")),o=r(e("canvas-to-buffer")),a=r(e("deepmerge")),s=r(e("hidden")),u=r(e("hyperscript")),c=r(e("inherits")),l=r(e("safe-json-stringify")),f=r(e("websocket-stream")),d=r(e("../../constants")),h=r(e("../../events")),p=r(e("../../util/browser")),m=r(e("../../util/eventEmitter")),y=r(e("../../util/humanize")),b=r(e("../../util/pretty")),g=r(e("../../util/videomailError")),v=r(e("./userMedia")),w="°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ",E=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};m.default.call(this,r,"Recorder");var c=new p.default(r),E=(0,a.default)(r,{image:{quality:c.isMobile()?r.image.quality-.05:r.image.quality}});if(!E.video||!E.video.fps)throw g.default.create("FPS must be defined",E);var _,R,S,A,O,k,T,x,j,M,C,D,N,I,L,P,B,U,F,q,W,H,V,z,G,$,Y=this,K=E.debug,J=null,X=0,Q=0,Z=E.video.facingMode,ee={},te=0,ne=0;function re(e,t){if(P)if(P.destroyed)ie(),Y.emit(h.default.ERROR,g.default.create("Already disconnected","Sorry, connection to the server has been destroyed. Please reload.",E));else{var n=t&&t.onFlushedCallback;try{P.write(e,(function(){if(n)try{n(t)}catch(e){Y.emit(h.default.ERROR,g.default.create("Failed to write stream buffer","stream.write() failed because of ".concat((0,b.default)(e)),E))}}))}catch(e){Y.emit(h.default.ERROR,g.default.create("Failed writing to server","stream.write() failed because of ".concat((0,b.default)(e)),E))}}}function ie(){clearInterval(V)}function oe(e){X++,re(e.toBuffer())}function ae(){R&&(0,s.default)(R,!1)}function se(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{K("Recorder: onUserMediaReady()",(0,l.default)(t));var n=t.switchingFacingMode;D=F=I=N=!1,C=!0,n||(e=(0,i.default)({fps:E.video.fps},Ae),_=e.getRequestAnimationFrameObject(),J=e),ae(),t.recordWhenReady&&Y.record(),Y.emit(h.default.USER_MEDIA_READY,{switchingFacingMode:t.switchingFacingMode,paused:Y.isPaused(),recordWhenReady:t.recordWhenReady})}catch(e){Y.emit(h.default.ERROR,e)}}function ue(){return"".concat((te/(Q||1)*100).toFixed(2),"%")}function ce(){return"".concat((ne/(X||1)*100).toFixed(2),"%")}function le(){T||(T=ue()),x||(x=ce()),Y.emit(h.default.PROGRESS,T,x)}function fe(e){if(!U){B=!0,K("Recorder: initializing web socket to %s",E.socketUrl),Y.emit(h.default.CONNECTING);var t="".concat(E.socketUrl,"?").concat(encodeURIComponent(d.default.SITE_NAME_LABEL),"=").concat(encodeURIComponent(E.siteName));try{P=(0,f.default)(t,{perMessageDeflate:!1,objectMode:!0})}catch(e){var n;B=U=!1,n=void 0===f.default?g.default.create("There is no websocket","Cause: ".concat((0,b.default)(e)),E):g.default.create("Failed to connect to server","Please upgrade your browser. Your current version does not seem to support websockets.",E,{browserProblem:!0}),Y.emit(h.default.ERROR,n)}P&&(P.on("close",(function(e){K("".concat(w,"Stream has closed")),B=U=!1,e?Y.emit(h.default.ERROR,e||"Unhandled websocket error"):(Y.emit(h.default.DISCONNECTED),we())})),P.on("connect",(function(){K("".concat(w,"Stream *connect* event emitted"));var t=this.socket.readyState===WebSocket.CLOSING;U||t||I||(U=!0,B=I=!1,Y.emit(h.default.CONNECTED),e&&e())})),P.on("data",(function(e){var t;K("".concat(w,"Stream *data* event emitted"));try{t=JSON.parse(e.toString())}catch(t){K("Failed to parse command:",t),Y.emit(h.default.ERROR,g.default.create("Invalid server command","Contact us asap. Bad command was ".concat(e.toString(),". "),E))}finally{ye.call(Y,t)}})),P.on("error",(function(e){K("".concat(w,"Stream *error* event emitted: ").concat(e.message))})),P.on("drain",(function(){K("".concat(w,"Stream *drain* event emitted (should not happen!)"))})),P.on("preend",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("end",(function(){K("".concat(w,"Stream *end* event emitted"))})),P.on("drain",(function(){K("".concat(w,"Stream *drain* event emitted"))})),P.on("pipe",(function(){K("".concat(w,"Stream *pipe* event emitted"))})),P.on("unpipe",(function(){K("".concat(w,"Stream *unpipe* event emitted"))})),P.on("resume",(function(){K("".concat(w,"Stream *resume* event emitted"))})),P.on("uncork",(function(){K("".concat(w,"Stream *uncork* event emitted"))})),P.on("readable",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("prefinish",(function(){K("".concat(w,"Stream *preend* event emitted"))})),P.on("finish",(function(){K("".concat(w,"Stream *preend* event emitted"))})))}}function de(e){D=!1,Re(),K("Recorder: userMediaErrorCallback(), name: ".concat(e.name,", message: ").concat(e.message," and Webcam characteristics: ").concat((0,l.default)(S.getCharacteristics())));var t=Y.listeners(h.default.ERROR);if(t&&t.length)e.name!==g.default.MEDIA_DEVICE_NOT_SUPPORTED?Y.emit(h.default.ERROR,g.default.create(e,E)):K("Recorder: ignore user media error",e),O=setTimeout(fe,E.timeouts.userMedia);else{if(!I)throw K("Recorder: no error listeners attached but throwing error",e),g.default.create(e,"Unable to process this error since there are no error listeners anymore.",E);K("Recorder: already unloaded. Not going to throw error",e)}}function he(e,t){if(K("Recorder: getUserMediaCallback()",(0,l.default)(t)),U&&(be()||!ge()||F))try{Re(),S.init(e,(function(){se(t)}),oe.bind(Y),(function(e){Y.emit(h.default.ERROR,e)}),t)}catch(e){Y.emit(h.default.ERROR,e)}}function pe(e){if(!navigator)throw new Error("Navigator is missing!");if(K("Recorder: loadGenuineUserMedia()"),Y.emit(h.default.ASKING_WEBCAM_PERMISSION),navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){var t={video:{facingMode:Z,frameRate:{ideal:E.video.fps}},audio:E.isAudioEnabled()};c.isOkSafari()||(E.hasDefinedWidth()?t.video.width={ideal:E.video.width}:t.video.width={ideal:Y.limitWidth()},E.hasDefinedHeight()&&(t.video.height={ideal:E.video.height})),K("Recorder: navigator.mediaDevices.getUserMedia()",(0,l.default)(t)),navigator.mediaDevices.getSupportedConstraints&&K("Recorder: navigator.mediaDevices.getSupportedConstraints()",(0,l.default)(navigator.mediaDevices.getSupportedConstraints()));var n=navigator.mediaDevices.getUserMedia(t);if(!n)throw g.default.create("Sorry, your browser is unable to use cameras.","Try a different browser with better user media functionalities.",E);n.then((function(t){he(t,e)})).catch(de)}else K("Recorder: navigator.getUserMedia()"),navigator.getUserMedia_({video:!0,audio:E.isAudioEnabled()},he,de)}function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(C)return K("Recorder: skipping loadUserMedia() because it is already loaded"),se(e),!1;if(D)return K("Recorder: skipping loadUserMedia() because it is already asking for permission"),!1;K("Recorder: loadUserMedia(".concat((0,l.default)(e),")")),Y.emit(h.default.LOADING_USER_MEDIA);try{A=setTimeout((function(){Y.isReady()||Y.emit(h.default.ERROR,c.getNoAccessIssue())}),E.timeouts.userMedia),D=!0,pe(e)}catch(e){if(K("Recorder: failed to load genuine user media"),D=!1,!Y.listeners(h.default.ERROR).length)throw K("Recorder: no error listeners attached but throwing exception",e),e;Y.emit(h.default.ERROR,e)}}function ye(e){var t;if(!I)try{switch(e.args?K("Server commanded: ".concat(e.command," with ").concat((0,l.default)(e.args))):K("Server commanded: ".concat(e.command)),e.command){case"ready":this.emit(h.default.SERVER_READY),A||(E.loadUserMediaOnRecord?ae():me());break;case"preview":!function(e){te=ne=X=Q=0,x=T=null,W=e.key,e.mp4&&n.setMp4Source("".concat(e.mp4+d.default.SITE_NAME_LABEL,"/").concat(E.siteName,"/videomail.mp4"),!0),e.webm&&n.setWebMSource("".concat(e.webm+d.default.SITE_NAME_LABEL,"/").concat(E.siteName,"/videomail.webm"),!0),Y.hide();var t=Y.getRecorderWidth(!0),r=Y.getRecorderHeight(!0);Y.emit(h.default.PREVIEW,W,t,r),H=Date.now()-L,ee.waitingTime=H,E.debug&&K("While recording, %s have been transferred and waiting time was %s",y.default.filesize(k,2),y.default.toTime(H))}(e.args);break;case"error":this.emit(h.default.ERROR,g.default.create("Oh no, server error!",e.args.err.toString()||"(No message given)",E));break;case"confirmFrame":t=e.args,te=t.frame?t.frame:te,T=ue(),le();break;case"confirmSample":!function(e){ne=e.sample?e.sample:ne,x=ce(),le()}(e.args);break;case"beginAudioEncoding":this.emit(h.default.BEGIN_AUDIO_ENCODING);break;case"beginVideoEncoding":this.emit(h.default.BEGIN_VIDEO_ENCODING);break;default:this.emit(h.default.ERROR,"Unknown server command: ".concat(e.command))}}catch(e){Y.emit(h.default.ERROR,e)}}function be(){return e.isNotifying()}function ge(){return!R||(0,s.default)(R)}function ve(e,n,r){if(!r&&n&&n.constructor===Function&&(r=n,n=null),U){if(P){K(n?"$ ".concat(e," with ").concat((0,l.default)(n)):"$ ".concat(e));var i={command:e,args:n};re(t.from((0,l.default)(i))),r&&setTimeout((function(){r()}),0)}}else K("Reconnecting for the command",e,"…"),fe((function(){ve(e,n),r&&r()}))}function we(){J&&J.dispose()}function Ee(){return J.getElapsedTime()}function _e(){K("Recorder: reInitializeAudio()"),Re(),S&&S.stop(),C=W=j=M=null,me()}function Re(){A&&(K("Recorder: clearUserMediaTimeout()"),A&&clearTimeout(A),A=null)}function Se(e){1===(e&&e.frameNumber)&&Y.emit(h.default.FIRST_FRAME_SENT)}function Ae(n,r){try{if(!Y.isPaused()&&P&&M){if(0===Q&&Y.emit(h.default.SENDING_FIRST_FRAME),Q++,M.drawImage(S.getRawVisuals(),0,0,j.width,j.height),$=z.toBuffer(),(G=$.length)<1)throw g.default.create("Failed to extract webcam data.",E);k+=G;var i=t.from((0,l.default)({frameNumber:Q}));re(t.concat([$,i]),{frameNumber:Q,onFlushedCallback:Se}),e.checkTimer({intervalSum:r})}}catch(e){Y.emit(h.default.ERROR,e)}}function Oe(e){if(J){var t=Y.isRecording();J.stop(),J.setRequestAnimationFrameObject(e),t&&J.start()}}function ke(){E.hasDefinedWidth()&&(R.width=Y.getRecorderWidth(!0)),E.hasDefinedHeight()&&(R.height=Y.getRecorderHeight(!0))}function Te(){K("Recorder: initEvents()"),Y.on(h.default.SUBMITTING,(function(){N=!0})).on(h.default.SUBMITTED,(function(){N=!1})).on(h.default.BLOCKING,(function(){F=!0,Re()})).on(h.default.HIDE,(function(){Y.hide()})).on(h.default.LOADED_META_DATA,(function(){ke()})).on(h.default.DISABLING_AUDIO,(function(){_e()})).on(h.default.ENABLING_AUDIO,(function(){_e()})).on(h.default.INVISIBLE,(function(){!function(){K("Recorder: loopWithTimeouts()");var e,t=1e3/E.video.fps,n=0;Oe({requestAnimationFrame:function(r){return setTimeout((function(){e=Date.now(),r(),n=Date.now()-e}),t-n)},cancelAnimationFrame:function(e){clearTimeout(e)}})}()})).on(h.default.VISIBLE,(function(){K("Recorder: restoreAnimationFrameObject()"),Oe(_)})).on(h.default.SWITCH_FACING_MODE,(function(){!function(){if(!c.isMobile())return!1;"user"===Z?Z="environment":"environment"===Z?Z="user":K("Recorder: unsupported facing mode",Z),pe({switchingFacingMode:!0})}()}))}function xe(){var t;if(S){var n=S.getVideoWidth();t=n<1?e.getRatio():S.getVideoHeight()/n}else t=E.getRatio();return t}this.getRecordingStats=function(){return ee},this.getAudioSampleRate=function(){return S.getAudioSampleRate()},this.stop=function(e){K("stop(".concat((0,l.default)(e),")"));var t=e.limitReached;this.emit(h.default.STOPPING,t),J.complete();var r=this;setTimeout((function(){L=Date.now(),ee={avgFps:Q/Ee()*1e3,wantedFps:E.video.fps,avgInterval:Ee()/Q,wantedInterval:1e3/E.video.fps,intervalSum:Ee(),framesCount:Q,videoType:n.getVideoType()},E.isAudioEnabled()&&(ee.samplesCount=X,ee.sampleRate=S.getAudioSampleRate()),ve("stop",ee,(function(){r.emit(h.default.STOPPED,{recordingStats:ee})})),r.reset()}),60)},this.back=function(e){this.emit(h.default.GOING_BACK),ae(),this.reset(),ve("back",e)},this.unload=function(e){var t;!I&&q&&(e&&(t=e.name||e.statusText||e.toString()),K("Recorder: unload()".concat(t?", cause: ".concat(t):"")),this.reset(),Re(),S&&S.unloadRemainingEventListeners(),N||P&&(K("Recorder: ending stream ..."),P.destroy(),P=void 0),I=!0,q=B=U=!1)},this.reset=function(){I||(K("Recorder: reset()"),this.emit(h.default.RESETTING),we(),S&&S.stop(),n.reset(),C=W=j=M=$=G=null)},this.validate=function(){return U&&null===j},this.isReady=function(){return S.isReady()},this.pause=function(e){var n=e&&e.event;n instanceof window.Event&&(e.eventType=n.type),K(e?"pause() at frame ".concat(Q," with ").concat((0,l.default)(e)):"pause() at frame ".concat(Q)),S.pause(),J.stop(),this.emit(h.default.PAUSED),V=window.setInterval((function(){K("Recorder: pinging..."),re(t.from(""))}),E.timeouts.pingInterval)},this.isPaused=function(){return S&&S.isPaused()},this.resume=function(){K("Recorder: resume() with frame ".concat(Q)),ie(),this.emit(h.default.RESUMING),S.resume(),J.start()},this.record=function(){if(I)return!1;if(!U)return K("Recorder: reconnecting before recording ..."),fe((function(){Y.once(h.default.USER_MEDIA_READY,Y.record)})),!1;if(!C)return E.loadUserMediaOnRecord?me({recordWhenReady:!0}):Y.emit(h.default.ERROR,g.default.create("Load and enable your camera first",E)),!1;try{j=S.createCanvas()}catch(e){return Y.emit(h.default.ERROR,g.default.create(e,E)),!1}return M=j.getContext("2d"),j.width?j.height?(k=0,z=new o.default(j,E.image.types,E.image.quality),K("Recorder: record()"),S.record(),Y.emit(h.default.RECORDING,Q),J.on("update",(function(e,t){var n=Q/t*1e3;K("Recorder: avgFps = ".concat(Math.round(n),", framesCount = ").concat(Q))})),void J.start()):(Y.emit(h.default.ERROR,g.default.create("Canvas has an invalid height.",E)),!1):(Y.emit(h.default.ERROR,g.default.create("Canvas has an invalid width.",E)),!1)},this.build=function(){var t=c.checkRecordingCapabilities();t||(t=c.checkBufferTypes()),t?this.emit(h.default.ERROR,t):((R=e.querySelector("video.".concat(E.selectors.userMediaClass)))||(R=(0,u.default)("video.".concat(E.selectors.userMediaClass)),e.appendChild(R)),ke(),R.muted=!0,R.setAttribute("playsinline",!0),R.setAttribute("webkit-playsinline","webkit-playsinline"),R.style.transform="rotateY(180deg)",R.style["-webkit-transform"]="rotateY(180deg)",R.style["-moz-transform"]="rotateY(180deg)",E.video.stretch&&(R.style.width="100%"),S||(S=new v.default(this,E)),ae(),q?E.loadUserMediaOnRecord&&me():(Te(),U?E.loadUserMediaOnRecord||me():fe()),q=!0)},this.isPaused=function(){return S&&S.isPaused()&&!J.isRunning()},this.isRecording=function(){return J&&J.isRunning()&&!this.isPaused()&&!be()&&P&&!P.destroyed},this.hide=function(){ge()||(R&&(0,s.default)(R,!0),Re(),O&&(K("Recorder: clearRetryTimeout()"),clearTimeout(O),O=null))},this.isUnloaded=function(){return I},this.getRecorderWidth=function(e){return S&&S.hasVideoWidth()?S.getRawWidth(e):e&&E.hasDefinedWidth()?this.limitWidth(E.video.width):void 0},this.getRecorderHeight=function(e,t){return S&&t?R.getBoundingClientRect().height:S?S.getRawHeight(e):e&&E.hasDefinedHeight()?this.calculateHeight(e):void 0},this.calculateWidth=function(t){var n;return S?n=S.getVideoHeight():R&&(n=R.videoHeight||R.height),e.calculateWidth({responsive:t,ratio:xe(),videoHeight:n})},this.calculateHeight=function(t){var n;return S?n=S.getVideoWidth():R&&(n=R.videoWidth||R.width),e.calculateHeight({responsive:t,ratio:xe(),videoWidth:n})},this.getRawVisualUserMedia=function(){return R},this.isConnected=function(){return U},this.isConnecting=function(){return B},this.limitWidth=function(t){return e.limitWidth(t)},this.limitHeight=function(t){return e.limitHeight(t)},this.isUserMediaLoaded=function(){return C}};(0,c.default)(E,m.default);n.default=E}).call(this)}).call(this,e("buffer").Buffer)},{"../../constants":118,"../../events":119,"../../util/browser":124,"../../util/eventEmitter":126,"../../util/humanize":127,"../../util/pretty":129,"../../util/videomailError":131,"./userMedia":147,"@babel/runtime/helpers/interopRequireDefault":4,animitter:13,buffer:18,"canvas-to-buffer":21,deepmerge:28,hidden:61,hyperscript:63,inherits:66,"safe-json-stringify":99,"websocket-stream":113}],146:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("add-eventlistener-with-options")),o=r(e("hidden")),a=r(e("hyperscript")),s=r(e("inherits")),u=r(e("iphone-inline-video")),c=r(e("../../events")),l=r(e("../../util/browser")),f=r(e("../../util/eventEmitter")),d=function(e,t){f.default.call(this,t,"Replay");var n,r,s,d=this,h=new l.default(t),p=t.debug;function m(){return"HTMLDivElement"===e.constructor.name}function y(e,n,i){var o=d.getVideoSource(e);if(n&&i&&(n+="?".concat(Date.now())),o)n?o.setAttribute("src",n):r.removeChild(o);else if(n){var s=1/t.video.fps*2;o=(0,a.default)("source",{src:"".concat(n,"#t=").concat(s),type:"video/".concat(e)}),r.appendChild(o)}}function b(e){setTimeout((function(){try{r&&r.pause()}catch(e){t.logger.warn(e)}e&&e()}),15)}function g(){if(r&&r.play){var e;try{e=r.play()}catch(e){t.logger.warn("Caught replay exception:",e)}e&&"undefined"!=typeof Promise&&e instanceof Promise&&e.catch((function(e){t.logger.warn("Caught pending replay promise exception: %s",e)}))}}this.setVideomail=function(t){(s=t)&&(s.mp4&&this.setMp4Source(s.mp4),s.webm&&this.setWebMSource(s.webm),s.poster&&r.setAttribute("poster",s.poster),function(t){var n;Object.keys(t).forEach((function(r){(n=e.querySelector(".".concat(r)))&&(!n.innerHTML||n.innerHTML.length<1)&&(n.innerHTML=t[r])}))}(s));var n=s&&s.recordingStats&&s.recordingStats.sampleRate>0;this.show(s&&s.width,s&&s.height,n)},this.show=function(n,i,a){r&&(d.isShown()||(p("Replay: show()"),s&&function(t){var n,i;s&&s.playerWidth?i=s.playerWidth:e.calculateWidth&&(i=e.calculateWidth(t)),s&&s.playerHeight?n=s.playerHeight:e.calculateHeight&&(n=e.calculateHeight(t)),r.style.width=i>0?"".concat(i,"px"):"auto",r.style.height=n>0?"".concat(n,"px"):"auto"}({responsive:!0,videoWidth:n||r.videoWidth,videoHeight:i||r.videoHeight}),(0,o.default)(r,!1),e&&(e.style?(0,o.default)(e,!1):e.show&&e.show()),a?r.setAttribute("volume",1):t.isAudioEnabled()||r.setAttribute("muted",!0),u.default&&(0,u.default)(r,{iPad:!0}),r.load(),s?r.addEventListener("canplaythrough",(function(){d.emit(c.default.REPLAY_SHOWN)}),{once:!0}):r.addEventListener("canplaythrough",(function(){d.emit(c.default.PREVIEW_SHOWN)}),{once:!0})))},this.build=function(o){p("Replay: build (".concat(o?'replayParentElement="'.concat(o,'"'):"",")")),(r=e.querySelector("video.".concat(t.selectors.replayClass)))||function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;if(r=(0,a.default)("video.".concat(t.selectors.replayClass)),"string"==typeof n&&!(n=document.getElementById(n)))throw new Error("No replay parent element container with ID ".concat(n," found."));n.appendChild(r)}(o),this.hide(),r.setAttribute("autoplay",!0),r.setAttribute("autostart",!0),r.setAttribute("autobuffer",!0),r.setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline","webkit-playsinline"),r.setAttribute("controls","controls"),r.setAttribute("preload","auto"),n||(m()||this.on(c.default.PREVIEW,(function(e,t,n){d.show(t,n)})),(0,i.default)(r,"touchstart",(function(e){try{e&&e.preventDefault()}catch(e){}this.paused?g():b()})),r.onclick=function(e){e&&e.preventDefault(),this.paused?g():b()}),n=!0,p("Replay: built.")},this.unload=function(){p("Replay: unload()"),d.removeAllListeners(),r.remove(),r=void 0,s=void 0,n=!1},this.getVideoSource=function(e){if(r){var t,n,i=r.getElementsByTagName("source"),o=i&&i.length,a="video/".concat(e);if(o)for(n=0;n<o&&!t;n++)i[n].getAttribute("type")===a&&(t=i[n]);return t}},this.setMp4Source=function(e,t){y("mp4",e,t)},this.setWebMSource=function(e,t){y("webm",e,t)},this.getVideoType=function(){return h.getVideoType(r)},this.reset=function(e){b((function(){r&&(d.setMp4Source(null),d.setWebMSource(null)),e&&e()}))},this.hide=function(){m()?(0,o.default)(e,!0):r&&(0,o.default)(r,!0)},this.isShown=function(){return r&&!(0,o.default)(r)},this.getParentElement=function(){return e}};(0,s.default)(d,f.default);n.default=d},{"../../events":119,"../../util/browser":124,"../../util/eventEmitter":126,"@babel/runtime/helpers/interopRequireDefault":4,"add-eventlistener-with-options":12,hidden:61,hyperscript:63,inherits:66,"iphone-inline-video":69}],147:[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){c.default.call(this,t,"UserMedia");var n,r,p=e&&e.getRawVisualUserMedia(),m=new u.default(t),y=this,b=!1,g=!1;function v(e){e?function(e){if(r=e,void 0!==p.srcObject)p.srcObject=e;else{if(void 0===p.src)throw d.default.create("Error attaching stream to element.","Contact the developer about this",t);var n=window.URL||window.webkitURL;p.src=n.createObjectURL(e)||e}}(e):(p.removeAttribute("srcObject"),p.removeAttribute("src"),r=null)}function w(){return p.mozSrcObject?p.mozSrcObject:p.srcObject?p.srcObject:r}function E(){if(p.ended)return p.ended;var e=w();return e&&e.ended}function _(){if(p.videoWidth&&p.videoWidth<3||p.height&&p.height<3)return!0}function R(e,n){t.debug("UserMedia: ...",h,"event",e,(0,o.default)(n))}function S(e){R(e.type,{readyState:p.readyState}),p.removeEventListener&&p.removeEventListener(e.type,S)}this.unloadRemainingEventListeners=function(){t.debug("UserMedia: unloadRemainingEventListeners()"),l.default.forEach((function(e){p.removeEventListener(e,S)}))},this.init=function(e,r,i,o){var u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};this.stop(e,{aboutToInitialize:!0,switchingFacingMode:u.switchingFacingMode});var c=!1,h=!1,b=!1;function g(){y.removeListener(a.default.SENDING_FIRST_FRAME,g),n&&n.record(i)}function w(){t.debug("UserMedia: unloadAllEventListeners()"),y.unloadRemainingEventListeners(),y.removeListener(a.default.SENDING_FIRST_FRAME,g),p.removeEventListener&&p.removeEventListener("play",k),p.removeEventListener&&p.removeEventListener("loadedmetadata",T)}function A(){try{if(p.load(),p.paused){var e;t.debug("UserMedia: play()","media.readyState=".concat(p.readyState),"media.paused=".concat(p.paused),"media.ended=".concat(p.ended),"media.played=".concat((0,f.default)(p.played)));try{e=p.play()}catch(e){t.logger.warn("Caught raw usermedia play exception:",e)}(n=e)&&"undefined"!=typeof Promise&&n instanceof Promise&&e.then((function(){b||(t.debug("UserMedia: play promise successful. Playing now."),b=!0)})).catch((function(e){t.logger.warn("Caught pending usermedia promise exception: %s",e.toString())}))}}catch(e){w(),o(e)}var n}function O(){var s=p.readyState;if(t.debug("UserMedia: fireCallbacks("+"readyState=".concat(s,", ")+"onPlayReached=".concat(c,", ")+"onLoadedMetaDataReached=".concat(h,")")),c&&h&&(r(),n&&i))try{n.init(e),y.on(a.default.SENDING_FIRST_FRAME,g)}catch(e){w(),o(e)}}function k(){try{R("play",{readyState:p.readyState,audio:t.isAudioEnabled(),width:p.width,height:p.height,videoWidth:p.videoWidth,videoHeight:p.videoHeight}),p.removeEventListener&&p.removeEventListener("play",k),E()||_()?o(d.default.create("Already busy","Probably another browser window is using your webcam?",t)):(c=!0,O())}catch(e){w(),o(e)}}function T(){R("loadedmetadata",{readyState:p.readyState,paused:p.paused,width:p.width,height:p.height,videoWidth:p.videoWidth,videoHeight:p.videoHeight}),p.removeEventListener&&p.removeEventListener("loadedmetadata",T),E()||_()||(y.emit(a.default.LOADED_META_DATA),m.isAndroid()&&A(),h=!0,O())}t&&t.isAudioEnabled()&&(n||(n=new s.default(this,t)));try{var x=function(e){var t,n=function(e){var t;return e&&e.getVideoTracks&&(t=e.getVideoTracks()),t}(e);return n&&n[0]&&(t=n[0]),t}(e);if(x){if(!x.enabled)throw d.default.create("Webcam is disabled","The video track seems to be disabled. Enable it in your system.",t);var j;x.label&&x.label.length>0&&(j=x.label),j+=" with enabled=".concat(x.enabled),j+=", muted=".concat(x.muted),j+=", remote=".concat(x.remote),j+=", readyState=".concat(x.readyState),j+=", error=".concat(x.error),t.debug("UserMedia: ".concat(x.kind," detected."),j||"")}else t.debug("UserMedia: detected (but no video tracks exist");l.default.forEach((function(e){p.addEventListener(e,S,!1)})),p.addEventListener("loadedmetadata",T),p.addEventListener("play",k),p.addEventListener("error",(function(e){t.logger.warn("Caught video element error event: %s",(0,f.default)(e))})),v(e),A()}catch(e){y.emit(a.default.ERROR,e)}},this.isReady=function(){return Boolean(p.src)},this.stop=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var r=t.aboutToInitialize,i=t.switchingFacingMode;if(!r){e||(e=w());var o=function(e){var t;return e&&e.getTracks&&(t=e.getTracks()),t}(e),s=!1;o&&o.forEach((function(e){e.stop&&(s=!0,e.stop())})),!s&&e&&e.stop&&e.stop(),v(null),n&&n.stop(),n=null}i||(b=g=!1)}catch(e){y.emit(a.default.ERROR,e)}},this.createCanvas=function(){return(0,i.default)("canvas",{width:this.getRawWidth(!0),height:this.getRawHeight(!0)})},this.getVideoHeight=function(){return p.videoHeight},this.getVideoWidth=function(){return p.videoWidth},this.hasVideoWidth=function(){return this.getVideoWidth()>0},this.getRawWidth=function(n){var r=this.getVideoWidth(),i=t.hasDefinedWidth();return(i||t.hasDefinedHeight())&&(r=!n&&i?t.video.width:e.calculateWidth(n)),n&&(r=e.limitWidth(r)),r},this.getRawHeight=function(n){var r;if(t.hasDefinedDimension()){if((r=e.calculateHeight(n))<1)throw d.default.create("Bad dimensions","Calculated raw height cannot be less than 1!",t)}else if((r=this.getVideoHeight())<1)throw d.default.create("Bad dimensions","Raw video height from DOM element cannot be less than 1!",t);return n&&(r=e.limitHeight(r)),r},this.getRawVisuals=function(){return p},this.pause=function(){b=!0},this.isPaused=function(){return b},this.resume=function(){b=!1},this.record=function(){g=!0},this.isRecording=function(){return g},this.getAudioSampleRate=function(){return n?n.getSampleRate():-1},this.getCharacteristics=function(){return{audioSampleRate:this.getAudioSampleRate(),muted:p&&p.muted,width:p&&p.width,height:p&&p.height,videoWidth:p&&p.videoWidth,videoHeight:p&&p.videoHeight}}};var i=r(e("hyperscript")),o=r(e("safe-json-stringify")),a=r(e("./../../events")),s=r(e("./../../util/audioRecorder")),u=r(e("./../../util/browser")),c=r(e("./../../util/eventEmitter")),l=r(e("./../../util/mediaEvents")),f=r(e("./../../util/pretty")),d=r(e("./../../util/videomailError")),h="|—O—|"},{"./../../events":119,"./../../util/audioRecorder":123,"./../../util/browser":124,"./../../util/eventEmitter":126,"./../../util/mediaEvents":128,"./../../util/pretty":129,"./../../util/videomailError":131,"@babel/runtime/helpers/interopRequireDefault":4,hyperscript:63,"safe-json-stringify":99}],148:[function(e,t,n){"use strict";t.exports='@-webkit-keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}@keyframes blink{0%{opacity:.9}35%{opacity:.9}50%{opacity:.1}85%{opacity:.1}to{opacity:.9}}.IIV::-webkit-media-controls-play-button,.IIV::-webkit-media-controls-start-playback-button{opacity:0;pointer-events:none;width:5px}.videomail .visuals{position:relative}.videomail .visuals video.replay{height:100%;width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer{height:auto;margin:0}.videomail .countdown,.videomail .facingMode,.videomail .paused,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{position:absolute;z-index:100}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint,.videomail .recordNote,.videomail .recordTimer,.videomail noscript{font-weight:700}.videomail .countdown,.videomail .paused,.videomail noscript{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:100%}.videomail .countdown,.videomail .pausedHeader,.videomail .pausedHint{letter-spacing:4px;text-align:center;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.videomail .countdown,.videomail .pausedHeader{font-size:460%;opacity:.9}.videomail .pausedHint{font-size:150%}.videomail .facingMode{background:rgba(30,30,30,.5);border:none;bottom:.6em;color:hsla(0,0%,96%,.9);font-family:monospace;font-size:1.2em;outline:none;padding:.1em .3em;right:.7em;-webkit-transition:all .2s ease;transition:all .2s ease;z-index:10}.videomail .facingMode:hover{background:rgba(50,50,50,.7);cursor:pointer}.videomail .recordNote,.videomail .recordTimer{background:hsla(0,0%,4%,.8);color:#00d814;font-family:monospace;opacity:.9;padding:.3em .4em;right:.7em;-webkit-transition:all 1s ease;transition:all 1s ease}.videomail .recordNote.near,.videomail .recordTimer.near{color:#eb9369}.videomail .recordNote.nigh,.videomail .recordTimer.nigh{color:#ea4b2a}.videomail .recordTimer{top:.7em}.videomail .recordNote{top:3.6em}.videomail .recordNote:before{-webkit-animation:blink 1s infinite;animation:blink 1s infinite;content:"REC"}.videomail .notifier{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;overflow:hidden}.videomail .radioGroup{display:block}.videomail video{margin-bottom:0}.videomail video.userMedia{background-color:rgba(50,50,50,.1)}'},{}],"videomail-client":[function(e,t,n){"use strict";var r=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(e("./client"));(0,r(e("./util/standardize")).default)(window,navigator);n.default=i.default},{"./client":117,"./util/standardize":130,"@babel/runtime/helpers/interopRequireDefault":4}]},{},["videomail-client"])("videomail-client")}));
|
|
51
51
|
//# sourceMappingURL=videomail-client.min.js.map
|