@bringg/dashboard-sdk 0.5.13 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnalyticsReports/Entity/AnalyticsReportsEntity.js.map +1 -1
- package/dist/BringgDashboardSDK.d.ts +2 -0
- package/dist/BringgDashboardSDK.js +2 -0
- package/dist/BringgDashboardSDK.js.map +1 -1
- package/dist/DeliveryCatalog/DeliveryCatalog.consts.d.ts +93 -0
- package/dist/DeliveryCatalog/DeliveryCatalogApi.d.ts +11 -1
- package/dist/DeliveryCatalog/DeliveryCatalogApi.js +60 -0
- package/dist/DeliveryCatalog/DeliveryCatalogApi.js.map +1 -1
- package/dist/DeliveryCatalog/Entity/DeliveryCatalogEntity.d.ts +11 -1
- package/dist/DeliveryCatalog/Entity/DeliveryCatalogEntity.js +70 -1
- package/dist/DeliveryCatalog/Entity/DeliveryCatalogEntity.js.map +1 -1
- package/dist/Rates/Entity/RatesEntity.d.ts +9 -0
- package/dist/Rates/Entity/RatesEntity.js +97 -0
- package/dist/Rates/Entity/RatesEntity.js.map +1 -0
- package/dist/Rates/Rates.consts.d.ts +3 -0
- package/dist/Rates/Rates.consts.js +8 -0
- package/dist/Rates/Rates.consts.js.map +1 -0
- package/dist/Rates/RatesApi.d.ts +9 -0
- package/dist/Rates/RatesApi.js +17 -0
- package/dist/Rates/RatesApi.js.map +1 -0
- package/dist/Rates/types.d.ts +5 -0
- package/dist/Rates/types.js +3 -0
- package/dist/Rates/types.js.map +1 -0
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/User/Store/UsersStore.js +24 -12
- package/dist/User/Store/UsersStore.js.map +1 -1
- package/dist/User/User.consts.d.ts +1 -1
- package/dist/User/User.consts.js +6 -4
- package/dist/User/User.consts.js.map +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +905 -471
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +138 -21
- package/dist/bringg-dashboard-sdk.min.js +2 -2
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -21,12 +21,12 @@ var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
|
|
|
21
21
|
* Released under MIT license <https://lodash.com/license>
|
|
22
22
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
23
23
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
24
|
-
*/(function(){var i="Expected a function",s="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],a="[object Arguments]",c="[object Array]",l="[object Boolean]",f="[object Date]",p="[object Error]",h="[object Function]",d="[object GeneratorFunction]",y="[object Map]",v="[object Number]",_="[object Object]",b="[object RegExp]",g="[object Set]",E="[object String]",w="[object Symbol]",T="[object WeakMap]",m="[object ArrayBuffer]",O="[object DataView]",S="[object Float32Array]",R="[object Float64Array]",A="[object Int8Array]",x="[object Int16Array]",P="[object Int32Array]",C="[object Uint8Array]",I="[object Uint16Array]",k="[object Uint32Array]",N=/\b__p \+= '';/g,D=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,M=/&(?:amp|lt|gt|quot|#39);/g,L=/[&<>"']/g,j=RegExp(M.source),G=RegExp(L.source),B=/<%-([\s\S]+?)%>/g,F=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K=/[\\^$.*+?()[\]{}|]/g,q=RegExp(K.source),z=/^\s+/,Q=/\s/,$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,J=/\{\n\/\* \[wrapped with (.+)\] \*/,X=/,? & /,Z=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,ot=/^[-+]0x[0-9a-f]+$/i,it=/^0b[01]+$/i,st=/^\[object .+?Constructor\]$/,ut=/^0o[0-7]+$/i,at=/^(?:0|[1-9]\d*)$/,ct=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,lt=/($^)/,ft=/['\n\r\u2028\u2029\\]/g,pt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ht="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dt="[\\ud800-\\udfff]",yt="["+ht+"]",vt="["+pt+"]",_t="\\d+",bt="[\\u2700-\\u27bf]",gt="[a-z\\xdf-\\xf6\\xf8-\\xff]",Et="[^\\ud800-\\udfff"+ht+_t+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",wt="\\ud83c[\\udffb-\\udfff]",Tt="[^\\ud800-\\udfff]",mt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ot="[\\ud800-\\udbff][\\udc00-\\udfff]",St="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Rt="(?:"+gt+"|"+Et+")",At="(?:"+St+"|"+Et+")",xt="(?:"+vt+"|"+wt+")"+"?",Pt="[\\ufe0e\\ufe0f]?"+xt+("(?:\\u200d(?:"+[Tt,mt,Ot].join("|")+")[\\ufe0e\\ufe0f]?"+xt+")*"),Ct="(?:"+[bt,mt,Ot].join("|")+")"+Pt,It="(?:"+[Tt+vt+"?",vt,mt,Ot,dt].join("|")+")",kt=RegExp("['’]","g"),Nt=RegExp(vt,"g"),Dt=RegExp(wt+"(?="+wt+")|"+It+Pt,"g"),Ut=RegExp([St+"?"+gt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[yt,St,"$"].join("|")+")",At+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[yt,St+Rt,"$"].join("|")+")",St+"?"+Rt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",St+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_t,Ct].join("|"),"g"),Mt=RegExp("[\\u200d\\ud800-\\udfff"+pt+"\\ufe0e\\ufe0f]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Gt=-1,Bt={};Bt[S]=Bt[R]=Bt[A]=Bt[x]=Bt[P]=Bt[C]=Bt["[object Uint8ClampedArray]"]=Bt[I]=Bt[k]=!0,Bt[a]=Bt[c]=Bt[m]=Bt[l]=Bt[O]=Bt[f]=Bt[p]=Bt[h]=Bt[y]=Bt[v]=Bt[_]=Bt[b]=Bt[g]=Bt[E]=Bt[T]=!1;var Ft={};Ft[a]=Ft[c]=Ft[m]=Ft[O]=Ft[l]=Ft[f]=Ft[S]=Ft[R]=Ft[A]=Ft[x]=Ft[P]=Ft[y]=Ft[v]=Ft[_]=Ft[b]=Ft[g]=Ft[E]=Ft[w]=Ft[C]=Ft["[object Uint8ClampedArray]"]=Ft[I]=Ft[k]=!0,Ft[p]=Ft[h]=Ft[T]=!1;var Ht={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,Yt=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Kt="object"==typeof self&&self&&self.Object===Object&&self,qt=Wt||Kt||Function("return this")(),zt=e&&!e.nodeType&&e,Qt=zt&&"object"==typeof r&&r&&!r.nodeType&&r,$t=Qt&&Qt.exports===zt,Jt=$t&&Wt.process,Xt=function(){try{var t=Qt&&Qt.require&&Qt.require("util").types;return t||Jt&&Jt.binding&&Jt.binding("util")}catch(t){}}(),Zt=Xt&&Xt.isArrayBuffer,te=Xt&&Xt.isDate,ee=Xt&&Xt.isMap,ne=Xt&&Xt.isRegExp,re=Xt&&Xt.isSet,oe=Xt&&Xt.isTypedArray;function ie(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function se(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var s=t[o];e(r,s,n(s),t)}return r}function ue(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function ae(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ce(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function le(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}function fe(t,e){return!!(null==t?0:t.length)&&we(t,e,0)>-1}function pe(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function he(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function de(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function ye(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function ve(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function _e(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var be=Se("length");function ge(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function Ee(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function we(t,e,n){return e==e?function(t,e,n){var r=n-1,o=t.length;for(;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Ee(t,me,n)}function Te(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function me(t){return t!=t}function Oe(t,e){var n=null==t?0:t.length;return n?xe(t,e)/n:NaN}function Se(t){return function(e){return null==e?void 0:e[t]}}function Re(t){return function(e){return null==t?void 0:t[e]}}function Ae(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function xe(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}function Pe(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ce(t){return t?t.slice(0,ze(t)+1).replace(z,""):t}function Ie(t){return function(e){return t(e)}}function ke(t,e){return he(e,(function(e){return t[e]}))}function Ne(t,e){return t.has(e)}function De(t,e){for(var n=-1,r=t.length;++n<r&&we(e,t[n],0)>-1;);return n}function Ue(t,e){for(var n=t.length;n--&&we(e,t[n],0)>-1;);return n}function Me(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Le=Re({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),je=Re({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ge(t){return"\\"+Ht[t]}function Be(t){return Mt.test(t)}function Fe(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function He(t,e){return function(n){return t(e(n))}}function Ve(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==s||(t[n]=s,i[o++]=n)}return i}function Ye(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function We(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function Ke(t){return Be(t)?function(t){var e=Dt.lastIndex=0;for(;Dt.test(t);)++e;return e}(t):be(t)}function qe(t){return Be(t)?function(t){return t.match(Dt)||[]}(t):function(t){return t.split("")}(t)}function ze(t){for(var e=t.length;e--&&Q.test(t.charAt(e)););return e}var Qe=Re({"&":"&","<":"<",">":">",""":'"',"'":"'"});var $e=function t(e){var n,r=(e=null==e?qt:$e.defaults(qt.Object(),e,$e.pick(qt,jt))).Array,o=e.Date,Q=e.Error,pt=e.Function,ht=e.Math,dt=e.Object,yt=e.RegExp,vt=e.String,_t=e.TypeError,bt=r.prototype,gt=pt.prototype,Et=dt.prototype,wt=e["__core-js_shared__"],Tt=gt.toString,mt=Et.hasOwnProperty,Ot=0,St=(n=/[^.]+$/.exec(wt&&wt.keys&&wt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Rt=Et.toString,At=Tt.call(dt),xt=qt._,Pt=yt("^"+Tt.call(mt).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ct=$t?e.Buffer:void 0,It=e.Symbol,Dt=e.Uint8Array,Mt=Ct?Ct.allocUnsafe:void 0,Ht=He(dt.getPrototypeOf,dt),Wt=dt.create,Kt=Et.propertyIsEnumerable,zt=bt.splice,Qt=It?It.isConcatSpreadable:void 0,Jt=It?It.iterator:void 0,Xt=It?It.toStringTag:void 0,be=function(){try{var t=ei(dt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Re=e.clearTimeout!==qt.clearTimeout&&e.clearTimeout,Je=o&&o.now!==qt.Date.now&&o.now,Xe=e.setTimeout!==qt.setTimeout&&e.setTimeout,Ze=ht.ceil,tn=ht.floor,en=dt.getOwnPropertySymbols,nn=Ct?Ct.isBuffer:void 0,rn=e.isFinite,on=bt.join,sn=He(dt.keys,dt),un=ht.max,an=ht.min,cn=o.now,ln=e.parseInt,fn=ht.random,pn=bt.reverse,hn=ei(e,"DataView"),dn=ei(e,"Map"),yn=ei(e,"Promise"),vn=ei(e,"Set"),_n=ei(e,"WeakMap"),bn=ei(dt,"create"),gn=_n&&new _n,En={},wn=xi(hn),Tn=xi(dn),mn=xi(yn),On=xi(vn),Sn=xi(_n),Rn=It?It.prototype:void 0,An=Rn?Rn.valueOf:void 0,xn=Rn?Rn.toString:void 0;function Pn(t){if(Ws(t)&&!Ds(t)&&!(t instanceof Nn)){if(t instanceof kn)return t;if(mt.call(t,"__wrapped__"))return Pi(t)}return new kn(t)}var Cn=function(){function t(){}return function(e){if(!Ys(e))return{};if(Wt)return Wt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function In(){}function kn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Nn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Mn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ln(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Mn;++e<n;)this.add(t[e])}function jn(t){var e=this.__data__=new Un(t);this.size=e.size}function Gn(t,e){var n=Ds(t),r=!n&&Ns(t),o=!n&&!r&&js(t),i=!n&&!r&&!o&&Zs(t),s=n||r||o||i,u=s?Pe(t.length,vt):[],a=u.length;for(var c in t)!e&&!mt.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ai(c,a))||u.push(c);return u}function Bn(t){var e=t.length;return e?t[Lr(0,e-1)]:void 0}function Fn(t,e){return Si(go(t),$n(e,0,t.length))}function Hn(t){return Si(go(t))}function Vn(t,e,n){(void 0!==n&&!Cs(t[e],n)||void 0===n&&!(e in t))&&zn(t,e,n)}function Yn(t,e,n){var r=t[e];mt.call(t,e)&&Cs(r,n)&&(void 0!==n||e in t)||zn(t,e,n)}function Wn(t,e){for(var n=t.length;n--;)if(Cs(t[n][0],e))return n;return-1}function Kn(t,e,n,r){return er(t,(function(t,o,i){e(r,t,n(t),i)})),r}function qn(t,e){return t&&Eo(e,wu(e),t)}function zn(t,e,n){"__proto__"==e&&be?be(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Qn(t,e){for(var n=-1,o=e.length,i=r(o),s=null==t;++n<o;)i[n]=s?void 0:vu(t,e[n]);return i}function $n(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function Jn(t,e,n,r,o,i){var s,u=1&e,c=2&e,p=4&e;if(n&&(s=o?n(t,r,o,i):n(t)),void 0!==s)return s;if(!Ys(t))return t;var T=Ds(t);if(T){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&mt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return go(t,s)}else{var N=oi(t),D=N==h||N==d;if(js(t))return po(t,u);if(N==_||N==a||D&&!o){if(s=c||D?{}:si(t),!u)return c?function(t,e){return Eo(t,ri(t),e)}(t,function(t,e){return t&&Eo(e,Tu(e),t)}(s,t)):function(t,e){return Eo(t,ni(t),e)}(t,qn(s,t))}else{if(!Ft[N])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case m:return ho(t);case l:case f:return new r(+t);case O:return function(t,e){var n=e?ho(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case S:case R:case A:case x:case P:case C:case"[object Uint8ClampedArray]":case I:case k:return yo(t,n);case y:return new r;case v:case E:return new r(t);case b:return function(t){var e=new t.constructor(t.source,rt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case g:return new r;case w:return o=t,An?dt(An.call(o)):{}}var o}(t,N,u)}}i||(i=new jn);var U=i.get(t);if(U)return U;i.set(t,s),$s(t)?t.forEach((function(r){s.add(Jn(r,e,n,r,t,i))})):Ks(t)&&t.forEach((function(r,o){s.set(o,Jn(r,e,n,o,t,i))}));var M=T?void 0:(p?c?zo:qo:c?Tu:wu)(t);return ue(M||t,(function(r,o){M&&(r=t[o=r]),Yn(s,o,Jn(r,e,n,o,t,i))})),s}function Xn(t,e,n){var r=n.length;if(null==t)return!r;for(t=dt(t);r--;){var o=n[r],i=e[o],s=t[o];if(void 0===s&&!(o in t)||!i(s))return!1}return!0}function Zn(t,e,n){if("function"!=typeof t)throw new _t(i);return wi((function(){t.apply(void 0,n)}),e)}function tr(t,e,n,r){var o=-1,i=fe,s=!0,u=t.length,a=[],c=e.length;if(!u)return a;n&&(e=he(e,Ie(n))),r?(i=pe,s=!1):e.length>=200&&(i=Ne,s=!1,e=new Ln(e));t:for(;++o<u;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,s&&f==f){for(var p=c;p--;)if(e[p]===f)continue t;a.push(l)}else i(e,f,r)||a.push(l)}return a}Pn.templateSettings={escape:B,evaluate:F,interpolate:H,variable:"",imports:{_:Pn}},Pn.prototype=In.prototype,Pn.prototype.constructor=Pn,kn.prototype=Cn(In.prototype),kn.prototype.constructor=kn,Nn.prototype=Cn(In.prototype),Nn.prototype.constructor=Nn,Dn.prototype.clear=function(){this.__data__=bn?bn(null):{},this.size=0},Dn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Dn.prototype.get=function(t){var e=this.__data__;if(bn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return mt.call(e,t)?e[t]:void 0},Dn.prototype.has=function(t){var e=this.__data__;return bn?void 0!==e[t]:mt.call(e,t)},Dn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=bn&&void 0===e?"__lodash_hash_undefined__":e,this},Un.prototype.clear=function(){this.__data__=[],this.size=0},Un.prototype.delete=function(t){var e=this.__data__,n=Wn(e,t);return!(n<0)&&(n==e.length-1?e.pop():zt.call(e,n,1),--this.size,!0)},Un.prototype.get=function(t){var e=this.__data__,n=Wn(e,t);return n<0?void 0:e[n][1]},Un.prototype.has=function(t){return Wn(this.__data__,t)>-1},Un.prototype.set=function(t,e){var n=this.__data__,r=Wn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new Dn,map:new(dn||Un),string:new Dn}},Mn.prototype.delete=function(t){var e=Zo(this,t).delete(t);return this.size-=e?1:0,e},Mn.prototype.get=function(t){return Zo(this,t).get(t)},Mn.prototype.has=function(t){return Zo(this,t).has(t)},Mn.prototype.set=function(t,e){var n=Zo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Ln.prototype.add=Ln.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ln.prototype.has=function(t){return this.__data__.has(t)},jn.prototype.clear=function(){this.__data__=new Un,this.size=0},jn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},jn.prototype.get=function(t){return this.__data__.get(t)},jn.prototype.has=function(t){return this.__data__.has(t)},jn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Un){var r=n.__data__;if(!dn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Mn(r)}return n.set(t,e),this.size=n.size,this};var er=mo(cr),nr=mo(lr,!0);function rr(t,e){var n=!0;return er(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function or(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],s=e(i);if(null!=s&&(void 0===u?s==s&&!Xs(s):n(s,u)))var u=s,a=i}return a}function ir(t,e){var n=[];return er(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function sr(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=ui),o||(o=[]);++i<s;){var u=t[i];e>0&&n(u)?e>1?sr(u,e-1,n,r,o):de(o,u):r||(o[o.length]=u)}return o}var ur=Oo(),ar=Oo(!0);function cr(t,e){return t&&ur(t,e,wu)}function lr(t,e){return t&&ar(t,e,wu)}function fr(t,e){return le(e,(function(e){return Fs(t[e])}))}function pr(t,e){for(var n=0,r=(e=ao(e,t)).length;null!=t&&n<r;)t=t[Ai(e[n++])];return n&&n==r?t:void 0}function hr(t,e,n){var r=e(t);return Ds(t)?r:de(r,n(t))}function dr(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Xt&&Xt in dt(t)?function(t){var e=mt.call(t,Xt),n=t[Xt];try{t[Xt]=void 0;var r=!0}catch(t){}var o=Rt.call(t);r&&(e?t[Xt]=n:delete t[Xt]);return o}(t):function(t){return Rt.call(t)}(t)}function yr(t,e){return t>e}function vr(t,e){return null!=t&&mt.call(t,e)}function _r(t,e){return null!=t&&e in dt(t)}function br(t,e,n){for(var o=n?pe:fe,i=t[0].length,s=t.length,u=s,a=r(s),c=1/0,l=[];u--;){var f=t[u];u&&e&&(f=he(f,Ie(e))),c=an(f.length,c),a[u]=!n&&(e||i>=120&&f.length>=120)?new Ln(u&&f):void 0}f=t[0];var p=-1,h=a[0];t:for(;++p<i&&l.length<c;){var d=f[p],y=e?e(d):d;if(d=n||0!==d?d:0,!(h?Ne(h,y):o(l,y,n))){for(u=s;--u;){var v=a[u];if(!(v?Ne(v,y):o(t[u],y,n)))continue t}h&&h.push(y),l.push(d)}}return l}function gr(t,e,n){var r=null==(t=_i(t,e=ao(e,t)))?t:t[Ai(Bi(e))];return null==r?void 0:ie(r,t,n)}function Er(t){return Ws(t)&&dr(t)==a}function wr(t,e,n,r,o){return t===e||(null==t||null==e||!Ws(t)&&!Ws(e)?t!=t&&e!=e:function(t,e,n,r,o,i){var s=Ds(t),u=Ds(e),h=s?c:oi(t),d=u?c:oi(e),T=(h=h==a?_:h)==_,S=(d=d==a?_:d)==_,R=h==d;if(R&&js(t)){if(!js(e))return!1;s=!0,T=!1}if(R&&!T)return i||(i=new jn),s||Zs(t)?Wo(t,e,n,r,o,i):function(t,e,n,r,o,i,s){switch(n){case O:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case m:return!(t.byteLength!=e.byteLength||!i(new Dt(t),new Dt(e)));case l:case f:case v:return Cs(+t,+e);case p:return t.name==e.name&&t.message==e.message;case b:case E:return t==e+"";case y:var u=Fe;case g:var a=1&r;if(u||(u=Ye),t.size!=e.size&&!a)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var h=Wo(u(t),u(e),r,o,i,s);return s.delete(t),h;case w:if(An)return An.call(t)==An.call(e)}return!1}(t,e,h,n,r,o,i);if(!(1&n)){var A=T&&mt.call(t,"__wrapped__"),x=S&&mt.call(e,"__wrapped__");if(A||x){var P=A?t.value():t,C=x?e.value():e;return i||(i=new jn),o(P,C,n,r,i)}}if(!R)return!1;return i||(i=new jn),function(t,e,n,r,o,i){var s=1&n,u=qo(t),a=u.length,c=qo(e).length;if(a!=c&&!s)return!1;var l=a;for(;l--;){var f=u[l];if(!(s?f in e:mt.call(e,f)))return!1}var p=i.get(t),h=i.get(e);if(p&&h)return p==e&&h==t;var d=!0;i.set(t,e),i.set(e,t);var y=s;for(;++l<a;){f=u[l];var v=t[f],_=e[f];if(r)var b=s?r(_,v,f,e,t,i):r(v,_,f,t,e,i);if(!(void 0===b?v===_||o(v,_,n,r,i):b)){d=!1;break}y||(y="constructor"==f)}if(d&&!y){var g=t.constructor,E=e.constructor;g==E||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof E&&E instanceof E||(d=!1)}return i.delete(t),i.delete(e),d}(t,e,n,r,o,i)}(t,e,n,r,wr,o))}function Tr(t,e,n,r){var o=n.length,i=o,s=!r;if(null==t)return!i;for(t=dt(t);o--;){var u=n[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var a=(u=n[o])[0],c=t[a],l=u[1];if(s&&u[2]){if(void 0===c&&!(a in t))return!1}else{var f=new jn;if(r)var p=r(c,l,a,t,e,f);if(!(void 0===p?wr(l,c,3,r,f):p))return!1}}return!0}function mr(t){return!(!Ys(t)||(e=t,St&&St in e))&&(Fs(t)?Pt:st).test(xi(t));var e}function Or(t){return"function"==typeof t?t:null==t?qu:"object"==typeof t?Ds(t)?Cr(t[0],t[1]):Pr(t):na(t)}function Sr(t){if(!hi(t))return sn(t);var e=[];for(var n in dt(t))mt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Rr(t){if(!Ys(t))return function(t){var e=[];if(null!=t)for(var n in dt(t))e.push(n);return e}(t);var e=hi(t),n=[];for(var r in t)("constructor"!=r||!e&&mt.call(t,r))&&n.push(r);return n}function Ar(t,e){return t<e}function xr(t,e){var n=-1,o=Ms(t)?r(t.length):[];return er(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}function Pr(t){var e=ti(t);return 1==e.length&&e[0][2]?yi(e[0][0],e[0][1]):function(n){return n===t||Tr(n,t,e)}}function Cr(t,e){return li(t)&&di(e)?yi(Ai(t),e):function(n){var r=vu(n,t);return void 0===r&&r===e?_u(n,t):wr(e,r,3)}}function Ir(t,e,n,r,o){t!==e&&ur(e,(function(i,s){if(o||(o=new jn),Ys(i))!function(t,e,n,r,o,i,s){var u=gi(t,n),a=gi(e,n),c=s.get(a);if(c)return void Vn(t,n,c);var l=i?i(u,a,n+"",t,e,s):void 0,f=void 0===l;if(f){var p=Ds(a),h=!p&&js(a),d=!p&&!h&&Zs(a);l=a,p||h||d?Ds(u)?l=u:Ls(u)?l=go(u):h?(f=!1,l=po(a,!0)):d?(f=!1,l=yo(a,!0)):l=[]:zs(a)||Ns(a)?(l=u,Ns(u)?l=uu(u):Ys(u)&&!Fs(u)||(l=si(a))):f=!1}f&&(s.set(a,l),o(l,a,r,i,s),s.delete(a));Vn(t,n,l)}(t,e,s,n,Ir,r,o);else{var u=r?r(gi(t,s),i,s+"",t,e,o):void 0;void 0===u&&(u=i),Vn(t,s,u)}}),Tu)}function kr(t,e){var n=t.length;if(n)return ai(e+=e<0?n:0,n)?t[e]:void 0}function Nr(t,e,n){e=e.length?he(e,(function(t){return Ds(t)?function(e){return pr(e,1===t.length?t[0]:t)}:t})):[qu];var r=-1;return e=he(e,Ie(Xo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(xr(t,(function(t,n,o){return{criteria:he(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){var r=-1,o=t.criteria,i=e.criteria,s=o.length,u=n.length;for(;++r<s;){var a=vo(o[r],i[r]);if(a){if(r>=u)return a;var c=n[r];return a*("desc"==c?-1:1)}}return t.index-e.index}(t,e,n)}))}function Dr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var s=e[r],u=pr(t,s);n(u,s)&&Hr(i,ao(s,t),u)}return i}function Ur(t,e,n,r){var o=r?Te:we,i=-1,s=e.length,u=t;for(t===e&&(e=go(e)),n&&(u=he(t,Ie(n)));++i<s;)for(var a=0,c=e[i],l=n?n(c):c;(a=o(u,l,a,r))>-1;)u!==t&&zt.call(u,a,1),zt.call(t,a,1);return t}function Mr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;ai(o)?zt.call(t,o,1):to(t,o)}}return t}function Lr(t,e){return t+tn(fn()*(e-t+1))}function jr(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=tn(e/2))&&(t+=t)}while(e);return n}function Gr(t,e){return Ti(vi(t,e,qu),t+"")}function Br(t){return Bn(Cu(t))}function Fr(t,e){var n=Cu(t);return Si(n,$n(e,0,n.length))}function Hr(t,e,n,r){if(!Ys(t))return t;for(var o=-1,i=(e=ao(e,t)).length,s=i-1,u=t;null!=u&&++o<i;){var a=Ai(e[o]),c=n;if("__proto__"===a||"constructor"===a||"prototype"===a)return t;if(o!=s){var l=u[a];void 0===(c=r?r(l,a,u):void 0)&&(c=Ys(l)?l:ai(e[o+1])?[]:{})}Yn(u,a,c),u=u[a]}return t}var Vr=gn?function(t,e){return gn.set(t,e),t}:qu,Yr=be?function(t,e){return be(t,"toString",{configurable:!0,enumerable:!1,value:Yu(e),writable:!0})}:qu;function Wr(t){return Si(Cu(t))}function Kr(t,e,n){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=r(i);++o<i;)s[o]=t[o+e];return s}function qr(t,e){var n;return er(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function zr(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=t[i];null!==s&&!Xs(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return Qr(t,e,qu,n)}function Qr(t,e,n,r){var o=0,i=null==t?0:t.length;if(0===i)return 0;for(var s=(e=n(e))!=e,u=null===e,a=Xs(e),c=void 0===e;o<i;){var l=tn((o+i)/2),f=n(t[l]),p=void 0!==f,h=null===f,d=f==f,y=Xs(f);if(s)var v=r||d;else v=c?d&&(r||p):u?d&&p&&(r||!h):a?d&&p&&!h&&(r||!y):!h&&!y&&(r?f<=e:f<e);v?o=l+1:i=l}return an(i,4294967294)}function $r(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n],u=e?e(s):s;if(!n||!Cs(u,a)){var a=u;i[o++]=0===s?0:s}}return i}function Jr(t){return"number"==typeof t?t:Xs(t)?NaN:+t}function Xr(t){if("string"==typeof t)return t;if(Ds(t))return he(t,Xr)+"";if(Xs(t))return xn?xn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Zr(t,e,n){var r=-1,o=fe,i=t.length,s=!0,u=[],a=u;if(n)s=!1,o=pe;else if(i>=200){var c=e?null:Go(t);if(c)return Ye(c);s=!1,o=Ne,a=new Ln}else a=e?[]:u;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,s&&f==f){for(var p=a.length;p--;)if(a[p]===f)continue t;e&&a.push(f),u.push(l)}else o(a,f,n)||(a!==u&&a.push(f),u.push(l))}return u}function to(t,e){return null==(t=_i(t,e=ao(e,t)))||delete t[Ai(Bi(e))]}function eo(t,e,n,r){return Hr(t,e,n(pr(t,e)),r)}function no(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Kr(t,r?0:i,r?i+1:o):Kr(t,r?i+1:0,r?o:i)}function ro(t,e){var n=t;return n instanceof Nn&&(n=n.value()),ye(e,(function(t,e){return e.func.apply(e.thisArg,de([t],e.args))}),n)}function oo(t,e,n){var o=t.length;if(o<2)return o?Zr(t[0]):[];for(var i=-1,s=r(o);++i<o;)for(var u=t[i],a=-1;++a<o;)a!=i&&(s[i]=tr(s[i]||u,t[a],e,n));return Zr(sr(s,1),e,n)}function io(t,e,n){for(var r=-1,o=t.length,i=e.length,s={};++r<o;){var u=r<i?e[r]:void 0;n(s,t[r],u)}return s}function so(t){return Ls(t)?t:[]}function uo(t){return"function"==typeof t?t:qu}function ao(t,e){return Ds(t)?t:li(t,e)?[t]:Ri(au(t))}var co=Gr;function lo(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:Kr(t,e,n)}var fo=Re||function(t){return qt.clearTimeout(t)};function po(t,e){if(e)return t.slice();var n=t.length,r=Mt?Mt(n):new t.constructor(n);return t.copy(r),r}function ho(t){var e=new t.constructor(t.byteLength);return new Dt(e).set(new Dt(t)),e}function yo(t,e){var n=e?ho(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function vo(t,e){if(t!==e){var n=void 0!==t,r=null===t,o=t==t,i=Xs(t),s=void 0!==e,u=null===e,a=e==e,c=Xs(e);if(!u&&!c&&!i&&t>e||i&&s&&a&&!u&&!c||r&&s&&a||!n&&a||!o)return 1;if(!r&&!i&&!c&&t<e||c&&n&&o&&!r&&!i||u&&n&&o||!s&&o||!a)return-1}return 0}function _o(t,e,n,o){for(var i=-1,s=t.length,u=n.length,a=-1,c=e.length,l=un(s-u,0),f=r(c+l),p=!o;++a<c;)f[a]=e[a];for(;++i<u;)(p||i<s)&&(f[n[i]]=t[i]);for(;l--;)f[a++]=t[i++];return f}function bo(t,e,n,o){for(var i=-1,s=t.length,u=-1,a=n.length,c=-1,l=e.length,f=un(s-a,0),p=r(f+l),h=!o;++i<f;)p[i]=t[i];for(var d=i;++c<l;)p[d+c]=e[c];for(;++u<a;)(h||i<s)&&(p[d+n[u]]=t[i++]);return p}function go(t,e){var n=-1,o=t.length;for(e||(e=r(o));++n<o;)e[n]=t[n];return e}function Eo(t,e,n,r){var o=!n;n||(n={});for(var i=-1,s=e.length;++i<s;){var u=e[i],a=r?r(n[u],t[u],u,n,t):void 0;void 0===a&&(a=t[u]),o?zn(n,u,a):Yn(n,u,a)}return n}function wo(t,e){return function(n,r){var o=Ds(n)?se:Kn,i=e?e():{};return o(n,t,Xo(r,2),i)}}function To(t){return Gr((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,s&&ci(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),e=dt(e);++r<o;){var u=n[r];u&&t(e,u,r,i)}return e}))}function mo(t,e){return function(n,r){if(null==n)return n;if(!Ms(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=dt(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function Oo(t){return function(e,n,r){for(var o=-1,i=dt(e),s=r(e),u=s.length;u--;){var a=s[t?u:++o];if(!1===n(i[a],a,i))break}return e}}function So(t){return function(e){var n=Be(e=au(e))?qe(e):void 0,r=n?n[0]:e.charAt(0),o=n?lo(n,1).join(""):e.slice(1);return r[t]()+o}}function Ro(t){return function(e){return ye(Fu(Nu(e).replace(kt,"")),t,"")}}function Ao(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Cn(t.prototype),r=t.apply(n,e);return Ys(r)?r:n}}function xo(t){return function(e,n,r){var o=dt(e);if(!Ms(e)){var i=Xo(n,3);e=wu(e),n=function(t){return i(o[t],t,o)}}var s=t(e,n,r);return s>-1?o[i?e[s]:s]:void 0}}function Po(t){return Ko((function(e){var n=e.length,r=n,o=kn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new _t(i);if(o&&!u&&"wrapper"==$o(s))var u=new kn([],!0)}for(r=u?r:n;++r<n;){var a=$o(s=e[r]),c="wrapper"==a?Qo(s):void 0;u=c&&fi(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[$o(c[0])].apply(u,c[3]):1==s.length&&fi(s)?u[a]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ds(r))return u.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))}function Co(t,e,n,o,i,s,u,a,c,l){var f=128&e,p=1&e,h=2&e,d=24&e,y=512&e,v=h?void 0:Ao(t);return function _(){for(var b=arguments.length,g=r(b),E=b;E--;)g[E]=arguments[E];if(d)var w=Jo(_),T=Me(g,w);if(o&&(g=_o(g,o,i,d)),s&&(g=bo(g,s,u,d)),b-=T,d&&b<l){var m=Ve(g,w);return Lo(t,e,Co,_.placeholder,n,g,m,a,c,l-b)}var O=p?n:this,S=h?O[t]:t;return b=g.length,a?g=bi(g,a):y&&b>1&&g.reverse(),f&&c<b&&(g.length=c),this&&this!==qt&&this instanceof _&&(S=v||Ao(S)),S.apply(O,g)}}function Io(t,e){return function(n,r){return function(t,e,n,r){return cr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function ko(t,e){return function(n,r){var o;if(void 0===n&&void 0===r)return e;if(void 0!==n&&(o=n),void 0!==r){if(void 0===o)return r;"string"==typeof n||"string"==typeof r?(n=Xr(n),r=Xr(r)):(n=Jr(n),r=Jr(r)),o=t(n,r)}return o}}function No(t){return Ko((function(e){return e=he(e,Ie(Xo())),Gr((function(n){var r=this;return t(e,(function(t){return ie(t,r,n)}))}))}))}function Do(t,e){var n=(e=void 0===e?" ":Xr(e)).length;if(n<2)return n?jr(e,t):e;var r=jr(e,Ze(t/Ke(e)));return Be(e)?lo(qe(r),0,t).join(""):r.slice(0,t)}function Uo(t){return function(e,n,o){return o&&"number"!=typeof o&&ci(e,n,o)&&(n=o=void 0),e=ru(e),void 0===n?(n=e,e=0):n=ru(n),function(t,e,n,o){for(var i=-1,s=un(Ze((e-t)/(n||1)),0),u=r(s);s--;)u[o?s:++i]=t,t+=n;return u}(e,n,o=void 0===o?e<n?1:-1:ru(o),t)}}function Mo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=su(e),n=su(n)),t(e,n)}}function Lo(t,e,n,r,o,i,s,u,a,c){var l=8&e;e|=l?32:64,4&(e&=~(l?64:32))||(e&=-4);var f=[t,e,o,l?i:void 0,l?s:void 0,l?void 0:i,l?void 0:s,u,a,c],p=n.apply(void 0,f);return fi(t)&&Ei(p,f),p.placeholder=r,mi(p,t,e)}function jo(t){var e=ht[t];return function(t,n){if(t=su(t),(n=null==n?0:an(ou(n),292))&&rn(t)){var r=(au(t)+"e").split("e");return+((r=(au(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Go=vn&&1/Ye(new vn([,-0]))[1]==1/0?function(t){return new vn(t)}:Xu;function Bo(t){return function(e){var n=oi(e);return n==y?Fe(e):n==g?We(e):function(t,e){return he(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Fo(t,e,n,o,u,a,c,l){var f=2&e;if(!f&&"function"!=typeof t)throw new _t(i);var p=o?o.length:0;if(p||(e&=-97,o=u=void 0),c=void 0===c?c:un(ou(c),0),l=void 0===l?l:ou(l),p-=u?u.length:0,64&e){var h=o,d=u;o=u=void 0}var y=f?void 0:Qo(t),v=[t,e,n,o,u,h,d,a,c,l];if(y&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=128==r&&8==n||128==r&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var a=e[3];if(a){var c=t[3];t[3]=c?_o(c,a,e[4]):a,t[4]=c?Ve(t[3],s):e[4]}(a=e[5])&&(c=t[5],t[5]=c?bo(c,a,e[6]):a,t[6]=c?Ve(t[5],s):e[6]);(a=e[7])&&(t[7]=a);128&r&&(t[8]=null==t[8]?e[8]:an(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=o}(v,y),t=v[0],e=v[1],n=v[2],o=v[3],u=v[4],!(l=v[9]=void 0===v[9]?f?0:t.length:un(v[9]-p,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||16==e?function(t,e,n){var o=Ao(t);return function i(){for(var s=arguments.length,u=r(s),a=s,c=Jo(i);a--;)u[a]=arguments[a];var l=s<3&&u[0]!==c&&u[s-1]!==c?[]:Ve(u,c);if((s-=l.length)<n)return Lo(t,e,Co,i.placeholder,void 0,u,l,void 0,void 0,n-s);var f=this&&this!==qt&&this instanceof i?o:t;return ie(f,this,u)}}(t,e,l):32!=e&&33!=e||u.length?Co.apply(void 0,v):function(t,e,n,o){var i=1&e,s=Ao(t);return function e(){for(var u=-1,a=arguments.length,c=-1,l=o.length,f=r(l+a),p=this&&this!==qt&&this instanceof e?s:t;++c<l;)f[c]=o[c];for(;a--;)f[c++]=arguments[++u];return ie(p,i?n:this,f)}}(t,e,n,o);else var _=function(t,e,n){var r=1&e,o=Ao(t);return function e(){var i=this&&this!==qt&&this instanceof e?o:t;return i.apply(r?n:this,arguments)}}(t,e,n);return mi((y?Vr:Ei)(_,v),t,e)}function Ho(t,e,n,r){return void 0===t||Cs(t,Et[n])&&!mt.call(r,n)?e:t}function Vo(t,e,n,r,o,i){return Ys(t)&&Ys(e)&&(i.set(e,t),Ir(t,e,void 0,Vo,i),i.delete(e)),t}function Yo(t){return zs(t)?void 0:t}function Wo(t,e,n,r,o,i){var s=1&n,u=t.length,a=e.length;if(u!=a&&!(s&&a>u))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var f=-1,p=!0,h=2&n?new Ln:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var d=t[f],y=e[f];if(r)var v=s?r(y,d,f,e,t,i):r(d,y,f,t,e,i);if(void 0!==v){if(v)continue;p=!1;break}if(h){if(!_e(e,(function(t,e){if(!Ne(h,e)&&(d===t||o(d,t,n,r,i)))return h.push(e)}))){p=!1;break}}else if(d!==y&&!o(d,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p}function Ko(t){return Ti(vi(t,void 0,Ui),t+"")}function qo(t){return hr(t,wu,ni)}function zo(t){return hr(t,Tu,ri)}var Qo=gn?function(t){return gn.get(t)}:Xu;function $o(t){for(var e=t.name+"",n=En[e],r=mt.call(En,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function Jo(t){return(mt.call(Pn,"placeholder")?Pn:t).placeholder}function Xo(){var t=Pn.iteratee||zu;return t=t===zu?Or:t,arguments.length?t(arguments[0],arguments[1]):t}function Zo(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function ti(t){for(var e=wu(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,di(o)]}return e}function ei(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return mr(n)?n:void 0}var ni=en?function(t){return null==t?[]:(t=dt(t),le(en(t),(function(e){return Kt.call(t,e)})))}:ia,ri=en?function(t){for(var e=[];t;)de(e,ni(t)),t=Ht(t);return e}:ia,oi=dr;function ii(t,e,n){for(var r=-1,o=(e=ao(e,t)).length,i=!1;++r<o;){var s=Ai(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Vs(o)&&ai(s,o)&&(Ds(t)||Ns(t))}function si(t){return"function"!=typeof t.constructor||hi(t)?{}:Cn(Ht(t))}function ui(t){return Ds(t)||Ns(t)||!!(Qt&&t&&t[Qt])}function ai(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&at.test(t))&&t>-1&&t%1==0&&t<e}function ci(t,e,n){if(!Ys(n))return!1;var r=typeof e;return!!("number"==r?Ms(n)&&ai(e,n.length):"string"==r&&e in n)&&Cs(n[e],t)}function li(t,e){if(Ds(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Xs(t))||(Y.test(t)||!V.test(t)||null!=e&&t in dt(e))}function fi(t){var e=$o(t),n=Pn[e];if("function"!=typeof n||!(e in Nn.prototype))return!1;if(t===n)return!0;var r=Qo(n);return!!r&&t===r[0]}(hn&&oi(new hn(new ArrayBuffer(1)))!=O||dn&&oi(new dn)!=y||yn&&"[object Promise]"!=oi(yn.resolve())||vn&&oi(new vn)!=g||_n&&oi(new _n)!=T)&&(oi=function(t){var e=dr(t),n=e==_?t.constructor:void 0,r=n?xi(n):"";if(r)switch(r){case wn:return O;case Tn:return y;case mn:return"[object Promise]";case On:return g;case Sn:return T}return e});var pi=wt?Fs:sa;function hi(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Et)}function di(t){return t==t&&!Ys(t)}function yi(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in dt(n)))}}function vi(t,e,n){return e=un(void 0===e?t.length-1:e,0),function(){for(var o=arguments,i=-1,s=un(o.length-e,0),u=r(s);++i<s;)u[i]=o[e+i];i=-1;for(var a=r(e+1);++i<e;)a[i]=o[i];return a[e]=n(u),ie(t,this,a)}}function _i(t,e){return e.length<2?t:pr(t,Kr(e,0,-1))}function bi(t,e){for(var n=t.length,r=an(e.length,n),o=go(t);r--;){var i=e[r];t[r]=ai(i,n)?o[i]:void 0}return t}function gi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ei=Oi(Vr),wi=Xe||function(t,e){return qt.setTimeout(t,e)},Ti=Oi(Yr);function mi(t,e,n){var r=e+"";return Ti(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace($,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return ue(u,(function(n){var r="_."+n[0];e&n[1]&&!fe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(J);return e?e[1].split(X):[]}(r),n)))}function Oi(t){var e=0,n=0;return function(){var r=cn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Si(t,e){var n=-1,r=t.length,o=r-1;for(e=void 0===e?r:e;++n<e;){var i=Lr(n,o),s=t[i];t[i]=t[n],t[n]=s}return t.length=e,t}var Ri=function(t){var e=Os(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(W,(function(t,n,r,o){e.push(r?o.replace(et,"$1"):n||t)})),e}));function Ai(t){if("string"==typeof t||Xs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function xi(t){if(null!=t){try{return Tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Pi(t){if(t instanceof Nn)return t.clone();var e=new kn(t.__wrapped__,t.__chain__);return e.__actions__=go(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Ci=Gr((function(t,e){return Ls(t)?tr(t,sr(e,1,Ls,!0)):[]})),Ii=Gr((function(t,e){var n=Bi(e);return Ls(n)&&(n=void 0),Ls(t)?tr(t,sr(e,1,Ls,!0),Xo(n,2)):[]})),ki=Gr((function(t,e){var n=Bi(e);return Ls(n)&&(n=void 0),Ls(t)?tr(t,sr(e,1,Ls,!0),void 0,n):[]}));function Ni(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ou(n);return o<0&&(o=un(r+o,0)),Ee(t,Xo(e,3),o)}function Di(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=ou(n),o=n<0?un(r+o,0):an(o,r-1)),Ee(t,Xo(e,3),o,!0)}function Ui(t){return(null==t?0:t.length)?sr(t,1):[]}function Mi(t){return t&&t.length?t[0]:void 0}var Li=Gr((function(t){var e=he(t,so);return e.length&&e[0]===t[0]?br(e):[]})),ji=Gr((function(t){var e=Bi(t),n=he(t,so);return e===Bi(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?br(n,Xo(e,2)):[]})),Gi=Gr((function(t){var e=Bi(t),n=he(t,so);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?br(n,void 0,e):[]}));function Bi(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Fi=Gr(Hi);function Hi(t,e){return t&&t.length&&e&&e.length?Ur(t,e):t}var Vi=Ko((function(t,e){var n=null==t?0:t.length,r=Qn(t,e);return Mr(t,he(e,(function(t){return ai(t,n)?+t:t})).sort(vo)),r}));function Yi(t){return null==t?t:pn.call(t)}var Wi=Gr((function(t){return Zr(sr(t,1,Ls,!0))})),Ki=Gr((function(t){var e=Bi(t);return Ls(e)&&(e=void 0),Zr(sr(t,1,Ls,!0),Xo(e,2))})),qi=Gr((function(t){var e=Bi(t);return e="function"==typeof e?e:void 0,Zr(sr(t,1,Ls,!0),void 0,e)}));function zi(t){if(!t||!t.length)return[];var e=0;return t=le(t,(function(t){if(Ls(t))return e=un(t.length,e),!0})),Pe(e,(function(e){return he(t,Se(e))}))}function Qi(t,e){if(!t||!t.length)return[];var n=zi(t);return null==e?n:he(n,(function(t){return ie(e,void 0,t)}))}var $i=Gr((function(t,e){return Ls(t)?tr(t,e):[]})),Ji=Gr((function(t){return oo(le(t,Ls))})),Xi=Gr((function(t){var e=Bi(t);return Ls(e)&&(e=void 0),oo(le(t,Ls),Xo(e,2))})),Zi=Gr((function(t){var e=Bi(t);return e="function"==typeof e?e:void 0,oo(le(t,Ls),void 0,e)})),ts=Gr(zi);var es=Gr((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,Qi(t,n)}));function ns(t){var e=Pn(t);return e.__chain__=!0,e}function rs(t,e){return e(t)}var os=Ko((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return Qn(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Nn&&ai(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:rs,args:[o],thisArg:void 0}),new kn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(o)}));var is=wo((function(t,e,n){mt.call(t,n)?++t[n]:zn(t,n,1)}));var ss=xo(Ni),us=xo(Di);function as(t,e){return(Ds(t)?ue:er)(t,Xo(e,3))}function cs(t,e){return(Ds(t)?ae:nr)(t,Xo(e,3))}var ls=wo((function(t,e,n){mt.call(t,n)?t[n].push(e):zn(t,n,[e])}));var fs=Gr((function(t,e,n){var o=-1,i="function"==typeof e,s=Ms(t)?r(t.length):[];return er(t,(function(t){s[++o]=i?ie(e,t,n):gr(t,e,n)})),s})),ps=wo((function(t,e,n){zn(t,n,e)}));function hs(t,e){return(Ds(t)?he:xr)(t,Xo(e,3))}var ds=wo((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var ys=Gr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ci(t,e[0],e[1])?e=[]:n>2&&ci(e[0],e[1],e[2])&&(e=[e[0]]),Nr(t,sr(e,1),[])})),vs=Je||function(){return qt.Date.now()};function _s(t,e,n){return e=n?void 0:e,Fo(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function bs(t,e){var n;if("function"!=typeof e)throw new _t(i);return t=ou(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var gs=Gr((function(t,e,n){var r=1;if(n.length){var o=Ve(n,Jo(gs));r|=32}return Fo(t,r,e,n,o)})),Es=Gr((function(t,e,n){var r=3;if(n.length){var o=Ve(n,Jo(Es));r|=32}return Fo(e,r,t,n,o)}));function ws(t,e,n){var r,o,s,u,a,c,l=0,f=!1,p=!1,h=!0;if("function"!=typeof t)throw new _t(i);function d(e){var n=r,i=o;return r=o=void 0,l=e,u=t.apply(i,n)}function y(t){return l=t,a=wi(_,e),f?d(t):u}function v(t){var n=t-c;return void 0===c||n>=e||n<0||p&&t-l>=s}function _(){var t=vs();if(v(t))return b(t);a=wi(_,function(t){var n=e-(t-c);return p?an(n,s-(t-l)):n}(t))}function b(t){return a=void 0,h&&r?d(t):(r=o=void 0,u)}function g(){var t=vs(),n=v(t);if(r=arguments,o=this,c=t,n){if(void 0===a)return y(c);if(p)return fo(a),a=wi(_,e),d(c)}return void 0===a&&(a=wi(_,e)),u}return e=su(e)||0,Ys(n)&&(f=!!n.leading,s=(p="maxWait"in n)?un(su(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h),g.cancel=function(){void 0!==a&&fo(a),l=0,r=c=o=a=void 0},g.flush=function(){return void 0===a?u:b(vs())},g}var Ts=Gr((function(t,e){return Zn(t,1,e)})),ms=Gr((function(t,e,n){return Zn(t,su(e)||0,n)}));function Os(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new _t(i);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Os.Cache||Mn),n}function Ss(t){if("function"!=typeof t)throw new _t(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Os.Cache=Mn;var Rs=co((function(t,e){var n=(e=1==e.length&&Ds(e[0])?he(e[0],Ie(Xo())):he(sr(e,1),Ie(Xo()))).length;return Gr((function(r){for(var o=-1,i=an(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return ie(t,this,r)}))})),As=Gr((function(t,e){return Fo(t,32,void 0,e,Ve(e,Jo(As)))})),xs=Gr((function(t,e){return Fo(t,64,void 0,e,Ve(e,Jo(xs)))})),Ps=Ko((function(t,e){return Fo(t,256,void 0,void 0,void 0,e)}));function Cs(t,e){return t===e||t!=t&&e!=e}var Is=Mo(yr),ks=Mo((function(t,e){return t>=e})),Ns=Er(function(){return arguments}())?Er:function(t){return Ws(t)&&mt.call(t,"callee")&&!Kt.call(t,"callee")},Ds=r.isArray,Us=Zt?Ie(Zt):function(t){return Ws(t)&&dr(t)==m};function Ms(t){return null!=t&&Vs(t.length)&&!Fs(t)}function Ls(t){return Ws(t)&&Ms(t)}var js=nn||sa,Gs=te?Ie(te):function(t){return Ws(t)&&dr(t)==f};function Bs(t){if(!Ws(t))return!1;var e=dr(t);return e==p||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!zs(t)}function Fs(t){if(!Ys(t))return!1;var e=dr(t);return e==h||e==d||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Hs(t){return"number"==typeof t&&t==ou(t)}function Vs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Ys(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ws(t){return null!=t&&"object"==typeof t}var Ks=ee?Ie(ee):function(t){return Ws(t)&&oi(t)==y};function qs(t){return"number"==typeof t||Ws(t)&&dr(t)==v}function zs(t){if(!Ws(t)||dr(t)!=_)return!1;var e=Ht(t);if(null===e)return!0;var n=mt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Tt.call(n)==At}var Qs=ne?Ie(ne):function(t){return Ws(t)&&dr(t)==b};var $s=re?Ie(re):function(t){return Ws(t)&&oi(t)==g};function Js(t){return"string"==typeof t||!Ds(t)&&Ws(t)&&dr(t)==E}function Xs(t){return"symbol"==typeof t||Ws(t)&&dr(t)==w}var Zs=oe?Ie(oe):function(t){return Ws(t)&&Vs(t.length)&&!!Bt[dr(t)]};var tu=Mo(Ar),eu=Mo((function(t,e){return t<=e}));function nu(t){if(!t)return[];if(Ms(t))return Js(t)?qe(t):go(t);if(Jt&&t[Jt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Jt]());var e=oi(t);return(e==y?Fe:e==g?Ye:Cu)(t)}function ru(t){return t?(t=su(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ou(t){var e=ru(t),n=e%1;return e==e?n?e-n:e:0}function iu(t){return t?$n(ou(t),0,4294967295):0}function su(t){if("number"==typeof t)return t;if(Xs(t))return NaN;if(Ys(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ys(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ce(t);var n=it.test(t);return n||ut.test(t)?Yt(t.slice(2),n?2:8):ot.test(t)?NaN:+t}function uu(t){return Eo(t,Tu(t))}function au(t){return null==t?"":Xr(t)}var cu=To((function(t,e){if(hi(e)||Ms(e))Eo(e,wu(e),t);else for(var n in e)mt.call(e,n)&&Yn(t,n,e[n])})),lu=To((function(t,e){Eo(e,Tu(e),t)})),fu=To((function(t,e,n,r){Eo(e,Tu(e),t,r)})),pu=To((function(t,e,n,r){Eo(e,wu(e),t,r)})),hu=Ko(Qn);var du=Gr((function(t,e){t=dt(t);var n=-1,r=e.length,o=r>2?e[2]:void 0;for(o&&ci(e[0],e[1],o)&&(r=1);++n<r;)for(var i=e[n],s=Tu(i),u=-1,a=s.length;++u<a;){var c=s[u],l=t[c];(void 0===l||Cs(l,Et[c])&&!mt.call(t,c))&&(t[c]=i[c])}return t})),yu=Gr((function(t){return t.push(void 0,Vo),ie(Ou,void 0,t)}));function vu(t,e,n){var r=null==t?void 0:pr(t,e);return void 0===r?n:r}function _u(t,e){return null!=t&&ii(t,e,_r)}var bu=Io((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Rt.call(e)),t[e]=n}),Yu(qu)),gu=Io((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Rt.call(e)),mt.call(t,e)?t[e].push(n):t[e]=[n]}),Xo),Eu=Gr(gr);function wu(t){return Ms(t)?Gn(t):Sr(t)}function Tu(t){return Ms(t)?Gn(t,!0):Rr(t)}var mu=To((function(t,e,n){Ir(t,e,n)})),Ou=To((function(t,e,n,r){Ir(t,e,n,r)})),Su=Ko((function(t,e){var n={};if(null==t)return n;var r=!1;e=he(e,(function(e){return e=ao(e,t),r||(r=e.length>1),e})),Eo(t,zo(t),n),r&&(n=Jn(n,7,Yo));for(var o=e.length;o--;)to(n,e[o]);return n}));var Ru=Ko((function(t,e){return null==t?{}:function(t,e){return Dr(t,e,(function(e,n){return _u(t,n)}))}(t,e)}));function Au(t,e){if(null==t)return{};var n=he(zo(t),(function(t){return[t]}));return e=Xo(e),Dr(t,n,(function(t,n){return e(t,n[0])}))}var xu=Bo(wu),Pu=Bo(Tu);function Cu(t){return null==t?[]:ke(t,wu(t))}var Iu=Ro((function(t,e,n){return e=e.toLowerCase(),t+(n?ku(e):e)}));function ku(t){return Bu(au(t).toLowerCase())}function Nu(t){return(t=au(t))&&t.replace(ct,Le).replace(Nt,"")}var Du=Ro((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Uu=Ro((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Mu=So("toLowerCase");var Lu=Ro((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var ju=Ro((function(t,e,n){return t+(n?" ":"")+Bu(e)}));var Gu=Ro((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Bu=So("toUpperCase");function Fu(t,e,n){return t=au(t),void 0===(e=n?void 0:e)?function(t){return Lt.test(t)}(t)?function(t){return t.match(Ut)||[]}(t):function(t){return t.match(Z)||[]}(t):t.match(e)||[]}var Hu=Gr((function(t,e){try{return ie(t,void 0,e)}catch(t){return Bs(t)?t:new Q(t)}})),Vu=Ko((function(t,e){return ue(e,(function(e){e=Ai(e),zn(t,e,gs(t[e],t))})),t}));function Yu(t){return function(){return t}}var Wu=Po(),Ku=Po(!0);function qu(t){return t}function zu(t){return Or("function"==typeof t?t:Jn(t,1))}var Qu=Gr((function(t,e){return function(n){return gr(n,t,e)}})),$u=Gr((function(t,e){return function(n){return gr(t,n,e)}}));function Ju(t,e,n){var r=wu(e),o=fr(e,r);null!=n||Ys(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=fr(e,wu(e)));var i=!(Ys(n)&&"chain"in n&&!n.chain),s=Fs(t);return ue(o,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=go(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,de([this.value()],arguments))})})),t}function Xu(){}var Zu=No(he),ta=No(ce),ea=No(_e);function na(t){return li(t)?Se(Ai(t)):function(t){return function(e){return pr(e,t)}}(t)}var ra=Uo(),oa=Uo(!0);function ia(){return[]}function sa(){return!1}var ua=ko((function(t,e){return t+e}),0),aa=jo("ceil"),ca=ko((function(t,e){return t/e}),1),la=jo("floor");var fa,pa=ko((function(t,e){return t*e}),1),ha=jo("round"),da=ko((function(t,e){return t-e}),0);return Pn.after=function(t,e){if("function"!=typeof e)throw new _t(i);return t=ou(t),function(){if(--t<1)return e.apply(this,arguments)}},Pn.ary=_s,Pn.assign=cu,Pn.assignIn=lu,Pn.assignInWith=fu,Pn.assignWith=pu,Pn.at=hu,Pn.before=bs,Pn.bind=gs,Pn.bindAll=Vu,Pn.bindKey=Es,Pn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ds(t)?t:[t]},Pn.chain=ns,Pn.chunk=function(t,e,n){e=(n?ci(t,e,n):void 0===e)?1:un(ou(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var i=0,s=0,u=r(Ze(o/e));i<o;)u[s++]=Kr(t,i,i+=e);return u},Pn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},Pn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],o=t;o--;)e[o-1]=arguments[o];return de(Ds(n)?go(n):[n],sr(e,1))},Pn.cond=function(t){var e=null==t?0:t.length,n=Xo();return t=e?he(t,(function(t){if("function"!=typeof t[1])throw new _t(i);return[n(t[0]),t[1]]})):[],Gr((function(n){for(var r=-1;++r<e;){var o=t[r];if(ie(o[0],this,n))return ie(o[1],this,n)}}))},Pn.conforms=function(t){return function(t){var e=wu(t);return function(n){return Xn(n,t,e)}}(Jn(t,1))},Pn.constant=Yu,Pn.countBy=is,Pn.create=function(t,e){var n=Cn(t);return null==e?n:qn(n,e)},Pn.curry=function t(e,n,r){var o=Fo(e,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=t.placeholder,o},Pn.curryRight=function t(e,n,r){var o=Fo(e,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=t.placeholder,o},Pn.debounce=ws,Pn.defaults=du,Pn.defaultsDeep=yu,Pn.defer=Ts,Pn.delay=ms,Pn.difference=Ci,Pn.differenceBy=Ii,Pn.differenceWith=ki,Pn.drop=function(t,e,n){var r=null==t?0:t.length;return r?Kr(t,(e=n||void 0===e?1:ou(e))<0?0:e,r):[]},Pn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Kr(t,0,(e=r-(e=n||void 0===e?1:ou(e)))<0?0:e):[]},Pn.dropRightWhile=function(t,e){return t&&t.length?no(t,Xo(e,3),!0,!0):[]},Pn.dropWhile=function(t,e){return t&&t.length?no(t,Xo(e,3),!0):[]},Pn.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&ci(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=ou(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:ou(r))<0&&(r+=o),r=n>r?0:iu(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Pn.filter=function(t,e){return(Ds(t)?le:ir)(t,Xo(e,3))},Pn.flatMap=function(t,e){return sr(hs(t,e),1)},Pn.flatMapDeep=function(t,e){return sr(hs(t,e),1/0)},Pn.flatMapDepth=function(t,e,n){return n=void 0===n?1:ou(n),sr(hs(t,e),n)},Pn.flatten=Ui,Pn.flattenDeep=function(t){return(null==t?0:t.length)?sr(t,1/0):[]},Pn.flattenDepth=function(t,e){return(null==t?0:t.length)?sr(t,e=void 0===e?1:ou(e)):[]},Pn.flip=function(t){return Fo(t,512)},Pn.flow=Wu,Pn.flowRight=Ku,Pn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},Pn.functions=function(t){return null==t?[]:fr(t,wu(t))},Pn.functionsIn=function(t){return null==t?[]:fr(t,Tu(t))},Pn.groupBy=ls,Pn.initial=function(t){return(null==t?0:t.length)?Kr(t,0,-1):[]},Pn.intersection=Li,Pn.intersectionBy=ji,Pn.intersectionWith=Gi,Pn.invert=bu,Pn.invertBy=gu,Pn.invokeMap=fs,Pn.iteratee=zu,Pn.keyBy=ps,Pn.keys=wu,Pn.keysIn=Tu,Pn.map=hs,Pn.mapKeys=function(t,e){var n={};return e=Xo(e,3),cr(t,(function(t,r,o){zn(n,e(t,r,o),t)})),n},Pn.mapValues=function(t,e){var n={};return e=Xo(e,3),cr(t,(function(t,r,o){zn(n,r,e(t,r,o))})),n},Pn.matches=function(t){return Pr(Jn(t,1))},Pn.matchesProperty=function(t,e){return Cr(t,Jn(e,1))},Pn.memoize=Os,Pn.merge=mu,Pn.mergeWith=Ou,Pn.method=Qu,Pn.methodOf=$u,Pn.mixin=Ju,Pn.negate=Ss,Pn.nthArg=function(t){return t=ou(t),Gr((function(e){return kr(e,t)}))},Pn.omit=Su,Pn.omitBy=function(t,e){return Au(t,Ss(Xo(e)))},Pn.once=function(t){return bs(2,t)},Pn.orderBy=function(t,e,n,r){return null==t?[]:(Ds(e)||(e=null==e?[]:[e]),Ds(n=r?void 0:n)||(n=null==n?[]:[n]),Nr(t,e,n))},Pn.over=Zu,Pn.overArgs=Rs,Pn.overEvery=ta,Pn.overSome=ea,Pn.partial=As,Pn.partialRight=xs,Pn.partition=ds,Pn.pick=Ru,Pn.pickBy=Au,Pn.property=na,Pn.propertyOf=function(t){return function(e){return null==t?void 0:pr(t,e)}},Pn.pull=Fi,Pn.pullAll=Hi,Pn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,Xo(n,2)):t},Pn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,void 0,n):t},Pn.pullAt=Vi,Pn.range=ra,Pn.rangeRight=oa,Pn.rearg=Ps,Pn.reject=function(t,e){return(Ds(t)?le:ir)(t,Ss(Xo(e,3)))},Pn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=Xo(e,3);++r<i;){var s=t[r];e(s,r,t)&&(n.push(s),o.push(r))}return Mr(t,o),n},Pn.rest=function(t,e){if("function"!=typeof t)throw new _t(i);return Gr(t,e=void 0===e?e:ou(e))},Pn.reverse=Yi,Pn.sampleSize=function(t,e,n){return e=(n?ci(t,e,n):void 0===e)?1:ou(e),(Ds(t)?Fn:Fr)(t,e)},Pn.set=function(t,e,n){return null==t?t:Hr(t,e,n)},Pn.setWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:Hr(t,e,n,r)},Pn.shuffle=function(t){return(Ds(t)?Hn:Wr)(t)},Pn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&ci(t,e,n)?(e=0,n=r):(e=null==e?0:ou(e),n=void 0===n?r:ou(n)),Kr(t,e,n)):[]},Pn.sortBy=ys,Pn.sortedUniq=function(t){return t&&t.length?$r(t):[]},Pn.sortedUniqBy=function(t,e){return t&&t.length?$r(t,Xo(e,2)):[]},Pn.split=function(t,e,n){return n&&"number"!=typeof n&&ci(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=au(t))&&("string"==typeof e||null!=e&&!Qs(e))&&!(e=Xr(e))&&Be(t)?lo(qe(t),0,n):t.split(e,n):[]},Pn.spread=function(t,e){if("function"!=typeof t)throw new _t(i);return e=null==e?0:un(ou(e),0),Gr((function(n){var r=n[e],o=lo(n,0,e);return r&&de(o,r),ie(t,this,o)}))},Pn.tail=function(t){var e=null==t?0:t.length;return e?Kr(t,1,e):[]},Pn.take=function(t,e,n){return t&&t.length?Kr(t,0,(e=n||void 0===e?1:ou(e))<0?0:e):[]},Pn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Kr(t,(e=r-(e=n||void 0===e?1:ou(e)))<0?0:e,r):[]},Pn.takeRightWhile=function(t,e){return t&&t.length?no(t,Xo(e,3),!1,!0):[]},Pn.takeWhile=function(t,e){return t&&t.length?no(t,Xo(e,3)):[]},Pn.tap=function(t,e){return e(t),t},Pn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new _t(i);return Ys(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ws(t,e,{leading:r,maxWait:e,trailing:o})},Pn.thru=rs,Pn.toArray=nu,Pn.toPairs=xu,Pn.toPairsIn=Pu,Pn.toPath=function(t){return Ds(t)?he(t,Ai):Xs(t)?[t]:go(Ri(au(t)))},Pn.toPlainObject=uu,Pn.transform=function(t,e,n){var r=Ds(t),o=r||js(t)||Zs(t);if(e=Xo(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Ys(t)&&Fs(i)?Cn(Ht(t)):{}}return(o?ue:cr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Pn.unary=function(t){return _s(t,1)},Pn.union=Wi,Pn.unionBy=Ki,Pn.unionWith=qi,Pn.uniq=function(t){return t&&t.length?Zr(t):[]},Pn.uniqBy=function(t,e){return t&&t.length?Zr(t,Xo(e,2)):[]},Pn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Zr(t,void 0,e):[]},Pn.unset=function(t,e){return null==t||to(t,e)},Pn.unzip=zi,Pn.unzipWith=Qi,Pn.update=function(t,e,n){return null==t?t:eo(t,e,uo(n))},Pn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:eo(t,e,uo(n),r)},Pn.values=Cu,Pn.valuesIn=function(t){return null==t?[]:ke(t,Tu(t))},Pn.without=$i,Pn.words=Fu,Pn.wrap=function(t,e){return As(uo(e),t)},Pn.xor=Ji,Pn.xorBy=Xi,Pn.xorWith=Zi,Pn.zip=ts,Pn.zipObject=function(t,e){return io(t||[],e||[],Yn)},Pn.zipObjectDeep=function(t,e){return io(t||[],e||[],Hr)},Pn.zipWith=es,Pn.entries=xu,Pn.entriesIn=Pu,Pn.extend=lu,Pn.extendWith=fu,Ju(Pn,Pn),Pn.add=ua,Pn.attempt=Hu,Pn.camelCase=Iu,Pn.capitalize=ku,Pn.ceil=aa,Pn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=su(n))==n?n:0),void 0!==e&&(e=(e=su(e))==e?e:0),$n(su(t),e,n)},Pn.clone=function(t){return Jn(t,4)},Pn.cloneDeep=function(t){return Jn(t,5)},Pn.cloneDeepWith=function(t,e){return Jn(t,5,e="function"==typeof e?e:void 0)},Pn.cloneWith=function(t,e){return Jn(t,4,e="function"==typeof e?e:void 0)},Pn.conformsTo=function(t,e){return null==e||Xn(t,e,wu(e))},Pn.deburr=Nu,Pn.defaultTo=function(t,e){return null==t||t!=t?e:t},Pn.divide=ca,Pn.endsWith=function(t,e,n){t=au(t),e=Xr(e);var r=t.length,o=n=void 0===n?r:$n(ou(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Pn.eq=Cs,Pn.escape=function(t){return(t=au(t))&&G.test(t)?t.replace(L,je):t},Pn.escapeRegExp=function(t){return(t=au(t))&&q.test(t)?t.replace(K,"\\$&"):t},Pn.every=function(t,e,n){var r=Ds(t)?ce:rr;return n&&ci(t,e,n)&&(e=void 0),r(t,Xo(e,3))},Pn.find=ss,Pn.findIndex=Ni,Pn.findKey=function(t,e){return ge(t,Xo(e,3),cr)},Pn.findLast=us,Pn.findLastIndex=Di,Pn.findLastKey=function(t,e){return ge(t,Xo(e,3),lr)},Pn.floor=la,Pn.forEach=as,Pn.forEachRight=cs,Pn.forIn=function(t,e){return null==t?t:ur(t,Xo(e,3),Tu)},Pn.forInRight=function(t,e){return null==t?t:ar(t,Xo(e,3),Tu)},Pn.forOwn=function(t,e){return t&&cr(t,Xo(e,3))},Pn.forOwnRight=function(t,e){return t&&lr(t,Xo(e,3))},Pn.get=vu,Pn.gt=Is,Pn.gte=ks,Pn.has=function(t,e){return null!=t&&ii(t,e,vr)},Pn.hasIn=_u,Pn.head=Mi,Pn.identity=qu,Pn.includes=function(t,e,n,r){t=Ms(t)?t:Cu(t),n=n&&!r?ou(n):0;var o=t.length;return n<0&&(n=un(o+n,0)),Js(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&we(t,e,n)>-1},Pn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ou(n);return o<0&&(o=un(r+o,0)),we(t,e,o)},Pn.inRange=function(t,e,n){return e=ru(e),void 0===n?(n=e,e=0):n=ru(n),function(t,e,n){return t>=an(e,n)&&t<un(e,n)}(t=su(t),e,n)},Pn.invoke=Eu,Pn.isArguments=Ns,Pn.isArray=Ds,Pn.isArrayBuffer=Us,Pn.isArrayLike=Ms,Pn.isArrayLikeObject=Ls,Pn.isBoolean=function(t){return!0===t||!1===t||Ws(t)&&dr(t)==l},Pn.isBuffer=js,Pn.isDate=Gs,Pn.isElement=function(t){return Ws(t)&&1===t.nodeType&&!zs(t)},Pn.isEmpty=function(t){if(null==t)return!0;if(Ms(t)&&(Ds(t)||"string"==typeof t||"function"==typeof t.splice||js(t)||Zs(t)||Ns(t)))return!t.length;var e=oi(t);if(e==y||e==g)return!t.size;if(hi(t))return!Sr(t).length;for(var n in t)if(mt.call(t,n))return!1;return!0},Pn.isEqual=function(t,e){return wr(t,e)},Pn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===r?wr(t,e,void 0,n):!!r},Pn.isError=Bs,Pn.isFinite=function(t){return"number"==typeof t&&rn(t)},Pn.isFunction=Fs,Pn.isInteger=Hs,Pn.isLength=Vs,Pn.isMap=Ks,Pn.isMatch=function(t,e){return t===e||Tr(t,e,ti(e))},Pn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,Tr(t,e,ti(e),n)},Pn.isNaN=function(t){return qs(t)&&t!=+t},Pn.isNative=function(t){if(pi(t))throw new Q("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return mr(t)},Pn.isNil=function(t){return null==t},Pn.isNull=function(t){return null===t},Pn.isNumber=qs,Pn.isObject=Ys,Pn.isObjectLike=Ws,Pn.isPlainObject=zs,Pn.isRegExp=Qs,Pn.isSafeInteger=function(t){return Hs(t)&&t>=-9007199254740991&&t<=9007199254740991},Pn.isSet=$s,Pn.isString=Js,Pn.isSymbol=Xs,Pn.isTypedArray=Zs,Pn.isUndefined=function(t){return void 0===t},Pn.isWeakMap=function(t){return Ws(t)&&oi(t)==T},Pn.isWeakSet=function(t){return Ws(t)&&"[object WeakSet]"==dr(t)},Pn.join=function(t,e){return null==t?"":on.call(t,e)},Pn.kebabCase=Du,Pn.last=Bi,Pn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=ou(n))<0?un(r+o,0):an(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Ee(t,me,o,!0)},Pn.lowerCase=Uu,Pn.lowerFirst=Mu,Pn.lt=tu,Pn.lte=eu,Pn.max=function(t){return t&&t.length?or(t,qu,yr):void 0},Pn.maxBy=function(t,e){return t&&t.length?or(t,Xo(e,2),yr):void 0},Pn.mean=function(t){return Oe(t,qu)},Pn.meanBy=function(t,e){return Oe(t,Xo(e,2))},Pn.min=function(t){return t&&t.length?or(t,qu,Ar):void 0},Pn.minBy=function(t,e){return t&&t.length?or(t,Xo(e,2),Ar):void 0},Pn.stubArray=ia,Pn.stubFalse=sa,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=pa,Pn.nth=function(t,e){return t&&t.length?kr(t,ou(e)):void 0},Pn.noConflict=function(){return qt._===this&&(qt._=xt),this},Pn.noop=Xu,Pn.now=vs,Pn.pad=function(t,e,n){t=au(t);var r=(e=ou(e))?Ke(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Do(tn(o),n)+t+Do(Ze(o),n)},Pn.padEnd=function(t,e,n){t=au(t);var r=(e=ou(e))?Ke(t):0;return e&&r<e?t+Do(e-r,n):t},Pn.padStart=function(t,e,n){t=au(t);var r=(e=ou(e))?Ke(t):0;return e&&r<e?Do(e-r,n)+t:t},Pn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),ln(au(t).replace(z,""),e||0)},Pn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&ci(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=ru(t),void 0===e?(e=t,t=0):e=ru(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=fn();return an(t+o*(e-t+Vt("1e-"+((o+"").length-1))),e)}return Lr(t,e)},Pn.reduce=function(t,e,n){var r=Ds(t)?ye:Ae,o=arguments.length<3;return r(t,Xo(e,4),n,o,er)},Pn.reduceRight=function(t,e,n){var r=Ds(t)?ve:Ae,o=arguments.length<3;return r(t,Xo(e,4),n,o,nr)},Pn.repeat=function(t,e,n){return e=(n?ci(t,e,n):void 0===e)?1:ou(e),jr(au(t),e)},Pn.replace=function(){var t=arguments,e=au(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Pn.result=function(t,e,n){var r=-1,o=(e=ao(e,t)).length;for(o||(o=1,t=void 0);++r<o;){var i=null==t?void 0:t[Ai(e[r])];void 0===i&&(r=o,i=n),t=Fs(i)?i.call(t):i}return t},Pn.round=ha,Pn.runInContext=t,Pn.sample=function(t){return(Ds(t)?Bn:Br)(t)},Pn.size=function(t){if(null==t)return 0;if(Ms(t))return Js(t)?Ke(t):t.length;var e=oi(t);return e==y||e==g?t.size:Sr(t).length},Pn.snakeCase=Lu,Pn.some=function(t,e,n){var r=Ds(t)?_e:qr;return n&&ci(t,e,n)&&(e=void 0),r(t,Xo(e,3))},Pn.sortedIndex=function(t,e){return zr(t,e)},Pn.sortedIndexBy=function(t,e,n){return Qr(t,e,Xo(n,2))},Pn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=zr(t,e);if(r<n&&Cs(t[r],e))return r}return-1},Pn.sortedLastIndex=function(t,e){return zr(t,e,!0)},Pn.sortedLastIndexBy=function(t,e,n){return Qr(t,e,Xo(n,2),!0)},Pn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=zr(t,e,!0)-1;if(Cs(t[n],e))return n}return-1},Pn.startCase=ju,Pn.startsWith=function(t,e,n){return t=au(t),n=null==n?0:$n(ou(n),0,t.length),e=Xr(e),t.slice(n,n+e.length)==e},Pn.subtract=da,Pn.sum=function(t){return t&&t.length?xe(t,qu):0},Pn.sumBy=function(t,e){return t&&t.length?xe(t,Xo(e,2)):0},Pn.template=function(t,e,n){var r=Pn.templateSettings;n&&ci(t,e,n)&&(e=void 0),t=au(t),e=fu({},e,r,Ho);var o,i,s=fu({},e.imports,r.imports,Ho),u=wu(s),a=ke(s,u),c=0,l=e.interpolate||lt,f="__p += '",p=yt((e.escape||lt).source+"|"+l.source+"|"+(l===H?nt:lt).source+"|"+(e.evaluate||lt).source+"|$","g"),h="//# sourceURL="+(mt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Gt+"]")+"\n";t.replace(p,(function(e,n,r,s,u,a){return r||(r=s),f+=t.slice(c,a).replace(ft,Ge),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),u&&(i=!0,f+="';\n"+u+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=a+e.length,e})),f+="';\n";var d=mt.call(e,"variable")&&e.variable;if(d){if(tt.test(d))throw new Q("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(i?f.replace(N,""):f).replace(D,"$1").replace(U,"$1;"),f="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var y=Hu((function(){return pt(u,h+"return "+f).apply(void 0,a)}));if(y.source=f,Bs(y))throw y;return y},Pn.times=function(t,e){if((t=ou(t))<1||t>9007199254740991)return[];var n=4294967295,r=an(t,4294967295);t-=4294967295;for(var o=Pe(r,e=Xo(e));++n<t;)e(n);return o},Pn.toFinite=ru,Pn.toInteger=ou,Pn.toLength=iu,Pn.toLower=function(t){return au(t).toLowerCase()},Pn.toNumber=su,Pn.toSafeInteger=function(t){return t?$n(ou(t),-9007199254740991,9007199254740991):0===t?t:0},Pn.toString=au,Pn.toUpper=function(t){return au(t).toUpperCase()},Pn.trim=function(t,e,n){if((t=au(t))&&(n||void 0===e))return Ce(t);if(!t||!(e=Xr(e)))return t;var r=qe(t),o=qe(e);return lo(r,De(r,o),Ue(r,o)+1).join("")},Pn.trimEnd=function(t,e,n){if((t=au(t))&&(n||void 0===e))return t.slice(0,ze(t)+1);if(!t||!(e=Xr(e)))return t;var r=qe(t);return lo(r,0,Ue(r,qe(e))+1).join("")},Pn.trimStart=function(t,e,n){if((t=au(t))&&(n||void 0===e))return t.replace(z,"");if(!t||!(e=Xr(e)))return t;var r=qe(t);return lo(r,De(r,qe(e))).join("")},Pn.truncate=function(t,e){var n=30,r="...";if(Ys(e)){var o="separator"in e?e.separator:o;n="length"in e?ou(e.length):n,r="omission"in e?Xr(e.omission):r}var i=(t=au(t)).length;if(Be(t)){var s=qe(t);i=s.length}if(n>=i)return t;var u=n-Ke(r);if(u<1)return r;var a=s?lo(s,0,u).join(""):t.slice(0,u);if(void 0===o)return a+r;if(s&&(u+=a.length-u),Qs(o)){if(t.slice(u).search(o)){var c,l=a;for(o.global||(o=yt(o.source,au(rt.exec(o))+"g")),o.lastIndex=0;c=o.exec(l);)var f=c.index;a=a.slice(0,void 0===f?u:f)}}else if(t.indexOf(Xr(o),u)!=u){var p=a.lastIndexOf(o);p>-1&&(a=a.slice(0,p))}return a+r},Pn.unescape=function(t){return(t=au(t))&&j.test(t)?t.replace(M,Qe):t},Pn.uniqueId=function(t){var e=++Ot;return au(t)+e},Pn.upperCase=Gu,Pn.upperFirst=Bu,Pn.each=as,Pn.eachRight=cs,Pn.first=Mi,Ju(Pn,(fa={},cr(Pn,(function(t,e){mt.call(Pn.prototype,e)||(fa[e]=t)})),fa),{chain:!1}),Pn.VERSION="4.17.21",ue(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Pn[t].placeholder=Pn})),ue(["drop","take"],(function(t,e){Nn.prototype[t]=function(n){n=void 0===n?1:un(ou(n),0);var r=this.__filtered__&&!e?new Nn(this):this.clone();return r.__filtered__?r.__takeCount__=an(n,r.__takeCount__):r.__views__.push({size:an(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Nn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ue(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Nn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Xo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),ue(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Nn.prototype[t]=function(){return this[n](1).value()[0]}})),ue(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Nn.prototype[t]=function(){return this.__filtered__?new Nn(this):this[n](1)}})),Nn.prototype.compact=function(){return this.filter(qu)},Nn.prototype.find=function(t){return this.filter(t).head()},Nn.prototype.findLast=function(t){return this.reverse().find(t)},Nn.prototype.invokeMap=Gr((function(t,e){return"function"==typeof t?new Nn(this):this.map((function(n){return gr(n,t,e)}))})),Nn.prototype.reject=function(t){return this.filter(Ss(Xo(t)))},Nn.prototype.slice=function(t,e){t=ou(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Nn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=ou(e))<0?n.dropRight(-e):n.take(e-t)),n)},Nn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Nn.prototype.toArray=function(){return this.take(4294967295)},cr(Nn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Pn[r?"take"+("last"==e?"Right":""):e],i=r||/^find/.test(e);o&&(Pn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof Nn,a=s[0],c=u||Ds(e),l=function(t){var e=o.apply(Pn,de([t],s));return r&&f?e[0]:e};c&&n&&"function"==typeof a&&1!=a.length&&(u=c=!1);var f=this.__chain__,p=!!this.__actions__.length,h=i&&!f,d=u&&!p;if(!i&&c){e=d?e:new Nn(this);var y=t.apply(e,s);return y.__actions__.push({func:rs,args:[l],thisArg:void 0}),new kn(y,f)}return h&&d?t.apply(this,s):(y=this.thru(l),h?r?y.value()[0]:y.value():y)})})),ue(["pop","push","shift","sort","splice","unshift"],(function(t){var e=bt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Pn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Ds(o)?o:[],t)}return this[n]((function(n){return e.apply(Ds(n)?n:[],t)}))}})),cr(Nn.prototype,(function(t,e){var n=Pn[e];if(n){var r=n.name+"";mt.call(En,r)||(En[r]=[]),En[r].push({name:e,func:n})}})),En[Co(void 0,2).name]=[{name:"wrapper",func:void 0}],Nn.prototype.clone=function(){var t=new Nn(this.__wrapped__);return t.__actions__=go(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=go(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=go(this.__views__),t},Nn.prototype.reverse=function(){if(this.__filtered__){var t=new Nn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Nn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ds(t),r=e<0,o=n?t.length:0,i=function(t,e,n){var r=-1,o=n.length;for(;++r<o;){var i=n[r],s=i.size;switch(i.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=an(e,t+s);break;case"takeRight":t=un(t,e-s)}}return{start:t,end:e}}(0,o,this.__views__),s=i.start,u=i.end,a=u-s,c=r?u:s-1,l=this.__iteratees__,f=l.length,p=0,h=an(a,this.__takeCount__);if(!n||!r&&o==a&&h==a)return ro(t,this.__actions__);var d=[];t:for(;a--&&p<h;){for(var y=-1,v=t[c+=e];++y<f;){var _=l[y],b=_.iteratee,g=_.type,E=b(v);if(2==g)v=E;else if(!E){if(1==g)continue t;break t}}d[p++]=v}return d},Pn.prototype.at=os,Pn.prototype.chain=function(){return ns(this)},Pn.prototype.commit=function(){return new kn(this.value(),this.__chain__)},Pn.prototype.next=function(){void 0===this.__values__&&(this.__values__=nu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Pn.prototype.plant=function(t){for(var e,n=this;n instanceof In;){var r=Pi(n);r.__index__=0,r.__values__=void 0,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Pn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Nn){var e=t;return this.__actions__.length&&(e=new Nn(this)),(e=e.reverse()).__actions__.push({func:rs,args:[Yi],thisArg:void 0}),new kn(e,this.__chain__)}return this.thru(Yi)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return ro(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Jt&&(Pn.prototype[Jt]=function(){return this}),Pn}();qt._=$e,void 0===(o=function(){return $e}.call(e,n,e,r))||(r.exports=o)}).call(this)}).call(this,n(104),n(144)(t))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),o=n(1);function i(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.project,this.thisArg))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(o.a)},function(t,e,n){"use strict";function r(t){return t&&"function"==typeof t.schedule}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));var r=n(2),o=new r.a((function(t){return t.complete()}));function i(t){return t?function(t){return new r.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):o}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.BringgException=e.logOnException=void 0;var u=n(11),a=n(39),c=n(47),l=n(164);e.logOnException=function(t,e,n){var r=n.value;return n.value=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r.apply(this,t)];case 1:return[2,n.sent()];case 2:e=n.sent();try{a.default.error(e)}catch(t){}return e instanceof p?[2,Promise.reject(e)]:[2,Promise.reject(new p(c.ExceptionReason.UNCAUGHT,e.message,e))];case 3:return[2]}}))}))},n};var f=function(t){return u.isUndefined(t)?null:u.isFunction(t)?t:function(){return t.toString()}},p=function(t){function e(e,n,r,o){var i=t.call(this)||this;return i.data=o,i.reason=e,i.error=r,i.messageProducer=f(n)||function(){return e.name},i._details=function(){},i}return o(e,t),Object.defineProperty(e.prototype,"message",{get:function(){try{return this.messageProducer()}catch(t){a.default.error("caught exception while trying to produce error message...")}},set:function(t){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"details",{get:function(){try{return this._details()}catch(t){a.default.error("caught exception while trying to produce error details...")}},set:function(t){var e=this;this._details=f(t)||function(){return e.message}},enumerable:!1,configurable:!0}),e.serviceException=function(t){return function(){return new e(c.ExceptionReason.UNSUCCESSFUL_RESULT,t)}},e}(l.ExtendableError);e.BringgException=p},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(2),o=n(46),i=n(84);function s(t,e){return e?Object(i.a)(t,e):t instanceof r.a?t:new r.a(Object(o.a)(t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(0),o=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parent=e,o.outerValue=n,o.outerIndex=r,o.index=0,o}return r.a(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(1).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Route=void 0;var r=n(15),o=n(47),i=n(11),s=function(){function t(t,e){if("/"!=t.charAt(0))throw new r.BringgException(o.ExceptionReason.INTERNAL_ROUTING_ERROR,"uri must start with a leading slash!");this.uri=t,this.httpMethod=e}return t.prototype.applyParams=function(t){return this.uri.replace(/{:([^}]+)}/gi,(function(e,n){if(i.isUndefined(t[n]))throw new r.BringgException(o.ExceptionReason.INTERNAL_ROUTING_ERROR,(function(){return"couldn't find matching parameter to macro: {:"+n+"}"}));return t[n]}))},t}();e.Route=s},function(t,e,n){"use strict";function r(){}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),o=n(1);function i(t,e){return function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.predicate,this.thisArg))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.count=0,o}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return u}));var r,o=n(14),i=n(42),s=n(51);r||(r={});var u=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return Object(i.a)(this.value);case"E":return Object(s.a)(this.error);case"C":return Object(o.b)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},function(t,e,n){"use strict";var r=n(107),o=Object.prototype.toString;function i(t){return"[object Array]"===o.call(t)}function s(t){return void 0===t}function u(t){return null!==t&&"object"==typeof t}function a(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===o.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),i(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:i,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:u,isPlainObject:a,isUndefined:s,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:c,isStream:function(t){return u(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function t(){var e={};function n(n,r){a(e[r])&&a(n)?e[r]=t(e[r],n):a(n)?e[r]=t({},n):i(n)?e[r]=n.slice():e[r]=n}for(var r=0,o=arguments.length;r<o;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.SessionBasedService=e.HTTP_EVENTS=void 0;var i=n(91),s=n(67),u=n(15),a=n(11),c=n(47);e.HTTP_EVENTS={HTTP_REQUEST_FAILURE:"http failure"};var l=function(){function t(t,e){this._endpoint=t,this._session=e}return Object.defineProperty(t.prototype,"sendDataEvent",{get:function(){return this.session.sendDataEvent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endpoint",{get:function(){return this._endpoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"session",{get:function(){return this._session},enumerable:!1,configurable:!0}),t.prototype.handleAuthorizedRequest=function(t,e,n,l,f,p,h){return void 0===l&&(l={}),void 0===f&&(f={}),void 0===p&&(p={}),void 0===h&&(h={}),r(this,void 0,void 0,(function(){var r,d,y,v,_=this;return o(this,(function(o){switch(o.label){case 0:return[4,new i.AuthorizedServiceRequest(this.session.clientId,this.session.user.authentication_token).invoke(this.endpoint,t,f,p,l,h).handle((function(e){var o=e.data,d=e.status;if(r=d,d!=s.HttpStatusCode.OK&&d!=s.HttpStatusCode.CREATED&&d!=s.HttpStatusCode.NO_CONTENT)throw _.notifyHttpError(new u.BringgException(c.ExceptionReason.fromHttpStatusCode(d),s.HttpStatusCode.getStatusText(d),null,{request:{route:t,payload:l,routeParams:f,queryString:p,headers:h,clientId:_.session.clientId,authenticationToken:_.session.user.authentication_token},response:e})),i.logErrorResponse(e),a.isFunction(n)?n():e;return o}))];case 1:if(d=o.sent(),!1===(y=d).success)throw(v=n()).details=y.message,v.rc=y.rc,v.statusCode=r,v;return[2,e(d)]}}))}))},t.prototype.notifyHttpError=function(t){this.sendDataEvent(e.HTTP_EVENTS.HTTP_REQUEST_FAILURE,t)},t}();e.SessionBasedService=l},function(t,e,n){"use strict";function r(t){return t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",(function(){return o}));var o=r()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(0),o=n(3),i=n(4),s=n(17),u=n(12),a=n(16);function c(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(c((function(n,r){return Object(a.a)(t(n,r)).pipe(Object(u.a)((function(t,o){return e(n,t,r,o)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new l(t,n))})}var l=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.project,this.concurrent))},t}(),f=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return r.a(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=new s.a(this,e,n),i=this.destination;i.add(r);var u=Object(o.a)(this,t,void 0,void 0,r);u!==r&&i.add(u)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){"use strict";function r(t){return"function"==typeof t}n.d(e,"a",(function(){return r}))},function(t,e,n){(function(r){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(r++,"%c"===t&&(o=r))}),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(176)(e);const{formatters:o}=t.exports;o.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,n(111))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),o=n(66),i=function(t){function e(n,r){void 0===r&&(r=o.a.now);var i=t.call(this,n,(function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()}))||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.a(e,t),e.prototype.schedule=function(n,r,o){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,o):t.prototype.schedule.call(this,n,r,o)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(2),o=n(87),i=n(58);function s(t,e){return e?Object(i.a)(t,e):new r.a(Object(o.a)(t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(0),o=n(7),i=n(6),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return r.a(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),i.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),i.a.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(o.a)},function(t,e,n){"use strict";var r=n(0),o=function(t){function e(e,n){return t.call(this)||this}return r.a(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(6).a);n.d(e,"a",(function(){return i}));var i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.a(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(o)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(8);function o(t){return!Object(r.a)(t)&&t-parseFloat(t)+1>=0}},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.LoggerUtil=e.DEFAULT_LOG_LEVEL=e.LOG_ALL=e.LOG_DEBUG=e.LOG_INFO=e.LOG_WARN=e.LOG_ERROR=e.LOG_FATAL=e.LOG_NONE=e.LOG_LEVEL=void 0,function(t){t[t.TRACE=2]="TRACE",t[t.DEBUG=4]="DEBUG",t[t.INFO=8]="INFO",t[t.WARN=16]="WARN",t[t.ERROR=32]="ERROR",t[t.FATAL=64]="FATAL"}(r=e.LOG_LEVEL||(e.LOG_LEVEL={})),e.LOG_NONE=0,e.LOG_FATAL=r.FATAL,e.LOG_ERROR=r.ERROR|r.FATAL,e.LOG_WARN=r.WARN|r.ERROR|r.FATAL,e.LOG_INFO=r.INFO|r.WARN|r.ERROR|r.FATAL,e.LOG_DEBUG=r.DEBUG|r.INFO|r.WARN|r.ERROR|r.FATAL,e.LOG_ALL=r.TRACE|r.DEBUG|r.INFO|r.WARN|r.ERROR|r.FATAL,e.DEFAULT_LOG_LEVEL=e.LOG_WARN;var o=e.DEFAULT_LOG_LEVEL,i=console;function s(t,n,r){(o&t)>e.LOG_NONE&&n.apply(null,r)}var u=function(){function t(){}return t.delegateLogger=function(t){i=t},t.setLogLevel=function(t){o=t},t}();e.LoggerUtil=u,e.default={trace:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.TRACE,i.debug,arguments)},debug:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.DEBUG,i.debug,arguments)},info:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.INFO,i.info,arguments)},warn:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.WARN,i.warn,arguments)},error:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.ERROR,i.error,arguments)},fatal:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.FATAL,i.error,arguments)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(42),o=n(77);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object(o.a)()(r.a.apply(void 0,t))}},function(t,e,n){"use strict";function r(t){setTimeout((function(){throw t}),0)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(13),o=n(35),i=n(58);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(r.a)(n)?(t.pop(),Object(i.a)(t,n)):Object(o.a)(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));var r=n(20);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(t)}function i(t){return t?1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}:r.a}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){"use strict";var r=n(87),o=n(41),i=n(26),s=n(27),u=n(86),a=n(88),c=n(56);n.d(e,"a",(function(){return l}));var l=function(t){if(t&&"function"==typeof t[s.a])return l=t,function(t){var e=l[s.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(u.a)(t))return Object(r.a)(t);if(Object(a.a)(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,o.a),t};if(t&&"function"==typeof t[i.a])return e=t,function(t){for(var n=e[i.a]();;){var r=n.next();if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add((function(){n.return&&n.return()})),t};var e,n,l,f=Object(c.a)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+f+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExceptionReason=void 0;var r=n(106),o=function(t){return 1e5+t},i=new Map,s=function(){function t(t,e){this.name=t,this.code=e,i.set(e,this)}return t.fromHttpStatusCode=function(e){return i.get(o(e))||new t("HTTP_"+e,o(e))},t.UNCAUGHT=new t("UNCAUGHT",0),t.UNSUCCESSFUL_RESULT=new t("UNSUCCESSFUL_RESULT",1),t.INTERNAL_ROUTING_ERROR=new t("INTERNAL_ROUTING_ERROR",2),t.INCOMPATIBLE_SERVICE_RESPONSE=new t("INCOMPATIBLE_SERVICE_RESPONSE",3),t.ENTITY_NOT_FOUND=new t("ENTITY_NOT_FOUND",4),t.ILLEGAL_STATE=new t("ILLEGAL_STATE",5),t.INVALID_ARGUMENTS=new t("INVALID_ARGUMENTS",6),t.CAPTCHA_VERIFICATION_REQUIRED=new t("CAPTCHA_VERIFICATION_REQUIRED",7),t.HTTP_ACCEPTED=new t("HTTP_ACCEPTED",o(r.ACCEPTED)),t.HTTP_BAD_GATEWAY=new t("HTTP_BAD_GATEWAY",o(r.BAD_GATEWAY)),t.HTTP_BAD_REQUEST=new t("HTTP_BAD_REQUEST",o(r.BAD_REQUEST)),t.HTTP_CONFLICT=new t("HTTP_CONFLICT",o(r.CONFLICT)),t.HTTP_CONTINUE=new t("HTTP_CONTINUE",o(r.CONTINUE)),t.HTTP_CREATED=new t("HTTP_CREATED",o(r.CREATED)),t.HTTP_EXPECTATION_FAILED=new t("HTTP_EXPECTATION_FAILED",o(r.EXPECTATION_FAILED)),t.HTTP_FAILED_DEPENDENCY=new t("HTTP_FAILED_DEPENDENCY",o(r.FAILED_DEPENDENCY)),t.HTTP_FORBIDDEN=new t("HTTP_FORBIDDEN",o(r.FORBIDDEN)),t.HTTP_GATEWAY_TIMEOUT=new t("HTTP_GATEWAY_TIMEOUT",o(r.GATEWAY_TIMEOUT)),t.HTTP_GONE=new t("HTTP_GONE",o(r.GONE)),t.HTTP_HTTP_VERSION_NOT_SUPPORTED=new t("HTTP_HTTP_VERSION_NOT_SUPPORTED",o(r.HTTP_VERSION_NOT_SUPPORTED)),t.HTTP_IM_A_TEAPOT=new t("HTTP_IM_A_TEAPOT",o(r.IM_A_TEAPOT)),t.HTTP_INSUFFICIENT_SPACE_ON_RESOURCE=new t("HTTP_INSUFFICIENT_SPACE_ON_RESOURCE",o(r.INSUFFICIENT_SPACE_ON_RESOURCE)),t.HTTP_INSUFFICIENT_STORAGE=new t("HTTP_INSUFFICIENT_STORAGE",o(r.INSUFFICIENT_STORAGE)),t.HTTP_INTERNAL_SERVER_ERROR=new t("HTTP_INTERNAL_SERVER_ERROR",o(r.INTERNAL_SERVER_ERROR)),t.HTTP_LENGTH_REQUIRED=new t("HTTP_LENGTH_REQUIRED",o(r.LENGTH_REQUIRED)),t.HTTP_LOCKED=new t("HTTP_LOCKED",o(r.LOCKED)),t.HTTP_METHOD_FAILURE=new t("HTTP_METHOD_FAILURE",o(r.METHOD_FAILURE)),t.HTTP_METHOD_NOT_ALLOWED=new t("HTTP_METHOD_NOT_ALLOWED",o(r.METHOD_NOT_ALLOWED)),t.HTTP_MOVED_PERMANENTLY=new t("HTTP_MOVED_PERMANENTLY",o(r.MOVED_PERMANENTLY)),t.HTTP_MOVED_TEMPORARILY=new t("HTTP_MOVED_TEMPORARILY",o(r.MOVED_TEMPORARILY)),t.HTTP_MULTI_STATUS=new t("HTTP_MULTI_STATUS",o(r.MULTI_STATUS)),t.HTTP_MULTIPLE_CHOICES=new t("HTTP_MULTIPLE_CHOICES",o(r.MULTIPLE_CHOICES)),t.HTTP_NETWORK_AUTHENTICATION_REQUIRED=new t("HTTP_NETWORK_AUTHENTICATION_REQUIRED",o(r.NETWORK_AUTHENTICATION_REQUIRED)),t.HTTP_NO_CONTENT=new t("HTTP_NO_CONTENT",o(r.NO_CONTENT)),t.HTTP_NON_AUTHORITATIVE_INFORMATION=new t("HTTP_NON_AUTHORITATIVE_INFORMATION",o(r.NON_AUTHORITATIVE_INFORMATION)),t.HTTP_NOT_ACCEPTABLE=new t("HTTP_NOT_ACCEPTABLE",o(r.NOT_ACCEPTABLE)),t.HTTP_NOT_FOUND=new t("HTTP_NOT_FOUND",o(r.NOT_FOUND)),t.HTTP_NOT_IMPLEMENTED=new t("HTTP_NOT_IMPLEMENTED",o(r.NOT_IMPLEMENTED)),t.HTTP_NOT_MODIFIED=new t("HTTP_NOT_MODIFIED",o(r.NOT_MODIFIED)),t.HTTP_OK=new t("HTTP_OK",o(r.OK)),t.HTTP_PARTIAL_CONTENT=new t("HTTP_PARTIAL_CONTENT",o(r.PARTIAL_CONTENT)),t.HTTP_PAYMENT_REQUIRED=new t("HTTP_PAYMENT_REQUIRED",o(r.PAYMENT_REQUIRED)),t.HTTP_PERMANENT_REDIRECT=new t("HTTP_PERMANENT_REDIRECT",o(r.PERMANENT_REDIRECT)),t.HTTP_PRECONDITION_FAILED=new t("HTTP_PRECONDITION_FAILED",o(r.PRECONDITION_FAILED)),t.HTTP_PRECONDITION_REQUIRED=new t("HTTP_PRECONDITION_REQUIRED",o(r.PRECONDITION_REQUIRED)),t.HTTP_PROCESSING=new t("HTTP_PROCESSING",o(r.PROCESSING)),t.HTTP_PROXY_AUTHENTICATION_REQUIRED=new t("HTTP_PROXY_AUTHENTICATION_REQUIRED",o(r.PROXY_AUTHENTICATION_REQUIRED)),t.HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE=new t("HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE",o(r.REQUEST_HEADER_FIELDS_TOO_LARGE)),t.HTTP_REQUEST_TIMEOUT=new t("HTTP_REQUEST_TIMEOUT",o(r.REQUEST_TIMEOUT)),t.HTTP_REQUEST_TOO_LONG=new t("HTTP_REQUEST_TOO_LONG",o(r.REQUEST_TOO_LONG)),t.HTTP_REQUEST_URI_TOO_LONG=new t("HTTP_REQUEST_URI_TOO_LONG",o(r.REQUEST_URI_TOO_LONG)),t.HTTP_REQUESTED_RANGE_NOT_SATISFIABLE=new t("HTTP_REQUESTED_RANGE_NOT_SATISFIABLE",o(r.REQUESTED_RANGE_NOT_SATISFIABLE)),t.HTTP_RESET_CONTENT=new t("HTTP_RESET_CONTENT",o(r.RESET_CONTENT)),t.HTTP_SEE_OTHER=new t("HTTP_SEE_OTHER",o(r.SEE_OTHER)),t.HTTP_SERVICE_UNAVAILABLE=new t("HTTP_SERVICE_UNAVAILABLE",o(r.SERVICE_UNAVAILABLE)),t.HTTP_SWITCHING_PROTOCOLS=new t("HTTP_SWITCHING_PROTOCOLS",o(r.SWITCHING_PROTOCOLS)),t.HTTP_TEMPORARY_REDIRECT=new t("HTTP_TEMPORARY_REDIRECT",o(r.TEMPORARY_REDIRECT)),t.HTTP_TOO_MANY_REQUESTS=new t("HTTP_TOO_MANY_REQUESTS",o(r.TOO_MANY_REQUESTS)),t.HTTP_UNAUTHORIZED=new t("HTTP_UNAUTHORIZED",o(r.UNAUTHORIZED)),t.HTTP_UNPROCESSABLE_ENTITY=new t("HTTP_UNPROCESSABLE_ENTITY",o(r.UNPROCESSABLE_ENTITY)),t.HTTP_UNSUPPORTED_MEDIA_TYPE=new t("HTTP_UNSUPPORTED_MEDIA_TYPE",o(r.UNSUPPORTED_MEDIA_TYPE)),t.HTTP_USE_PROXY=new t("HTTP_USE_PROXY",o(r.USE_PROXY)),t}();e.ExceptionReason=s},function(t,e,n){"use strict";var r,o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.THROTTLE_TIME=e.ActionToFunction=e.Actions=void 0;var s,u=n(65),a=n(198),c=n(11),l=n(39);!function(t){t.CREATE="CREATE",t.UPDATE="UPDATE",t.REMOVE="REMOVE",t.CLEAR="CLEAR"}(s=e.Actions||(e.Actions={})),e.ActionToFunction=((r={})[s.CREATE]="onCreate",r[s.REMOVE]="onDelete",r[s.UPDATE]="onUpdate",r),e.THROTTLE_TIME=1e3;var f=function(){function t(){var t=this;this.onItemUpdateEvents=[],this.onItemCreatedEvents=[],this.onItemRemovedEvents=[],this.onListUpdateEvents=[],this.calculations=new Map,this._items=new Map,this.addCalculation=function(e){var n=c.uniqueId()+Date.now();return e.errors=[],e.uuid=n,t.calculations.set(n,e),n},this.removeCalculation=function(e){t.calculations.delete(e)},this.getCalculationValue=function(e){var n=t.calculations.get(e);if(!n)throw new Error("No Calculation with this uuid!");return n.value},this.handleCalculations=function(n,r){return o(t,void 0,void 0,(function(){return i(this,(function(t){return Array.from(this.calculations.values()).forEach((function(t){try{var o=c.get(t,e.ActionToFunction[r],c.noop);t.value=o(t.value,n)}catch(e){t.errors.push({type:r,error:e}),l.default.error("BaseStore Failed calculation - for calc: "+t.uuid,t.errors)}})),[2]}))}))},this.onItemCreated=function(e){return t.onItemCreatedEvents.push(e),function(){return t.onItemCreatedEvents.splice(t.onItemCreatedEvents.indexOf(e),1)}},this.onItemUpdate=function(e){return t.onItemUpdateEvents.push(e),function(){return t.onItemUpdateEvents.splice(t.onItemUpdateEvents.indexOf(e),1)}},this.onItemRemoved=function(e){return t.onItemRemovedEvents.push(e),function(){return t.onItemRemovedEvents.splice(t.onItemRemovedEvents.indexOf(e),1)}},this.onListUpdate=function(e){return t.onListUpdateEvents.push(e),function(){return t.onListUpdateEvents.splice(t.onListUpdateEvents.indexOf(e),1)}},this.unsubscribe=function(){t.onItemRemovedEvents=[],t.onItemUpdateEvents=[],t.onItemCreatedEvents=[],t.onListUpdateEvents=[]},this.handleStateUpdate=function(e,n){switch(n.type){case s.CREATE:return t._addToStore(e,n.payload);case s.UPDATE:return t._updateInStore(e,n.payload);case s.REMOVE:return t._removeFromStore(e,n.payload);case s.CLEAR:return t._clearStore(e);default:return e}},this.getItem=function(e){return t._items.get(c.toNumber(e))},this.getItems=function(){return Array.from(t._items.values())},this.getItemsByIds=function(e){var n=new Set(e);return t.getItems().filter((function(t){return n.has(t.id)}))},this.getItemsMap=function(){return t._items},this.items$=new a.Subject,this.state$=this.items$.pipe(u.scan((function(e,n){return t.handleStateUpdate(e,n)}),new Map)),this.state$.pipe(u.throttleTime(e.THROTTLE_TIME)).subscribe((function(e){t._items=e,t.onListUpdateEvents.forEach((function(e){return e(Array.from(t._items.values()))}))}))}return t.prototype.addToStore=function(t){this.items$.next({type:s.CREATE,payload:t})},t.prototype.updateInStore=function(t){this.items$.next({type:s.UPDATE,payload:t})},t.prototype.removeFromStore=function(t){this.items$.next({type:s.REMOVE,payload:t})},t.prototype.clearStore=function(){this.items$.next({type:s.CLEAR,payload:void 0})},t.prototype.addItems=function(t){var e=this;t.forEach((function(t){return e.addToStore(t)}))},t.prototype._addToStore=function(t,e){return t.get(e.id)||(t.set(e.id,e),this.onItemCreatedEvents.forEach((function(t){return t(e)})),this.handleCalculations(e,s.CREATE)),t},t.prototype._updateInStore=function(t,e){var n=t.get(e.id);return n?(n=Object.assign(n,e),t.set(e.id,n),this.onItemUpdateEvents.forEach((function(t){return t(n)})),this.handleCalculations(e,s.UPDATE)):this._addToStore(t,e),t},t.prototype._removeFromStore=function(t,e){var n=t.get(e);return t.delete(e),this.onItemRemovedEvents.forEach((function(t){return t(e,n)})),this.handleCalculations(n,s.REMOVE),t},t.prototype._clearStore=function(t){return t.clear(),t},t}();e.default=f},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return f}));var r=n(0),o=n(13),i=n(8),s=n(4),u=n(3),a=n(35),c={};function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null,r=null;return Object(o.a)(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(i.a)(t[0])&&(t=t[0]),Object(a.a)(t,r).lift(new f(n))}var f=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.resultSelector))},t}(),p=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.a(e,t),e.prototype._next=function(t){this.values.push(c),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Object(u.a)(this,r,r,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,o){var i=this.values,s=i[n],u=this.toRespond?s===c?--this.toRespond:this.toRespond:0;i[n]=e,0===u&&(this.resultSelector?this._tryResultSelector(i):this.destination.next(i.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(s.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(29),o=n(25);function i(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(r.a)(o.a,t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(2);function o(t,e){return e?new r.a((function(n){return e.schedule(i,0,{error:t,subscriber:n})})):new r.a((function(e){return e.error(t)}))}function i(t){var e=t.error;t.subscriber.error(e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),o=n(1);function i(){return function(t){return t.lift(new s(t))}}var s=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new u(t,n),o=e.subscribe(r);return r.closed||(r.connection=n.connect()),o},t}(),u=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(0),o=n(7),i=n(85),s=n(6),u=n(80),a=n(28),c=n(89),l=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var o=t.call(this)||this;return o.scheduler=r,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=e<1?1:e,o._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return r.a(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new f(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=r.length;if(this.closed)throw new a.a;if(this.isStopped||this.hasError?e=s.a.EMPTY:(this.observers.push(t),e=new c.a(this,t)),o&&t.add(t=new u.a(t,o)),n)for(var l=0;l<i&&!t.closed;l++)t.next(r[l]);else for(l=0;l<i&&!t.closed;l++)t.next(r[l].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||i.a).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,o=r.length,i=0;i<o&&!(t-r[i].time<n);)i++;return o>e&&(i=Math.max(i,o-e)),i>0&&r.splice(0,i),r},e}(o.a),f=function(){return function(t,e){this.time=t,this.value=e}}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(2),o=n(16),i=n(14);function s(t){return new r.a((function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?Object(o.a)(n):Object(i.b)()).subscribe(e)}))}},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return f}));var r=n(0),o=n(35),i=n(8),s=n(1),u=n(4),a=n(3),c=n(26);function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),Object(o.a)(t,void 0).lift(new f(n))}var f=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.resultSelector))},t}(),p=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var o=t.call(this,e)||this;return o.iterators=[],o.active=0,o.resultSelector="function"==typeof n?n:null,o.values=r,o}return r.a(e,t),e.prototype._next=function(t){var e=this.iterators;Object(i.a)(t)?e.push(new d(t)):"function"==typeof t[c.a]?e.push(new h(t[c.a]())):e.push(new y(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];if(r.stillUnsubscribed)this.destination.add(r.subscribe(r,n));else this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++){if("function"==typeof(s=t[r]).hasValue&&!s.hasValue())return}var o=!1,i=[];for(r=0;r<e;r++){var s,u=(s=t[r]).next();if(s.hasCompleted()&&(o=!0),u.done)return void n.complete();i.push(u.value)}this.resultSelector?this._tryresultSelector(i):n.next(i),o&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(s.a),h=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),d=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[c.a]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),y=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.parent=n,o.observable=r,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return r.a(e,t),e.prototype[c.a]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,o){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return Object(a.a)(this,this.observable,this,e)},e}(u.a)},function(t,e,n){"use strict";function r(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1);function o(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&o instanceof r.a?o:null}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(2),o=n(6);function i(t,e){return new r.a((function(n){var r=new o.a,i=0;return r.add(e.schedule((function(){i!==t.length?(n.next(t[i++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},function(t,e,n){"use strict";var r=n(0),o=1,i=function(){return Promise.resolve()}(),s={};function u(t){return t in s&&(delete s[t],!0)}var a=function(t){var e=o++;return s[e]=!0,i.then((function(){return u(e)&&t()})),e},c=function(t){u(t)},l=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=a(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(c(n),e.scheduled=void 0)},e}(n(37).a),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,o=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<o&&(t=n.shift()));if(this.active=!1,e){for(;++r<o&&(t=n.shift());)t.unsubscribe();throw e}},e}(n(34).a);n.d(e,"a",(function(){return p}));var p=new f(l)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(18),o=n(41),i={closed:!0,next:function(t){},error:function(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(o.a)(t)},complete:function(){}}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.BringgDashboardSDK=void 0;var i=n(145),s=n(195),u=n(211),a=n(214),c=n(323),l=n(325),f=n(327),p=n(329),h=n(331),d=n(335),y=n(338),v=n(130),_=n(340),b=n(343),g=n(346),E=n(351),w=n(354),T=n(356),m=n(357),O=n(359),S=n(361),R=n(363),A=n(366),x=n(368),P=n(370),C=n(372),I=n(374),k=n(376),N=n(379),D=n(381),U=n(383),M=n(385),L=n(386),j=n(388),G=n(390),B=n(392),F=n(394),H=n(397),V=n(399),Y=n(401),W=n(404),K=n(406),q=n(408),z=n(410),Q=n(412),$=n(414),J=n(416),X=n(418),Z=n(420),tt=n(422),et=n(424),nt=n(426),rt=n(105),ot=n(430),it=n(432),st=n(434),ut=n(436),at=n(438),ct=n(440),lt=n(442),ft=n(444),pt=n(446),ht=n(447),dt=n(449),yt=n(451),vt=n(453),_t=n(455),bt=n(457),gt=n(460),Et=n(462),wt=n(464),Tt=n(467),mt=n(472),Ot=n(474),St=n(477),Rt=n(480),At=n(482),xt=function(){function t(t){this.applicationMerchantConfiguration=null,this.applicationTeamConfiguration=null,this.chat=null,this.companies=null,this.credentials={},this.crews=null,this.crossAppTransport=null,this.customerConfiguration=null,this.customers=null,this.dashboard=null,this.deliveryBlocks=null,this.fleets=null,this.rules=null,this.floatingInventory=null,this.inventoryActionsConfigurations=null,this.languages=null,this.merchant=null,this.merchantConfiguration=null,this.notificationTemplates=null,this.notificationTypes=null,this.oauthApplication=null,this.plannedRoutes=null,this.reasonToChangeInventory=null,this.reasonToReassignTasks=null,this.reasonToCancelTasks=null,this.reportPreferences=null,this.reports=null,this.runs=null,this.rollouts=null,this.skills=null,this.taskConfigurations=null,this.taskInventory=null,this.inventory=null,this.tasks=null,this.teamConfiguration=null,this.teams=null,this.resourceUploads=null,this.userConfigurations=null,this.users=null,this.vehicleTypes=null,this.vehicles=null,this.session=t}return t.init=function(e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return(n=new t(e)).application=new at.default(e),n.chat=new h.default(e),n.companies=new m.default(e),n.crossAppTransport=new T.default,n.customerConfiguration=new w.default(e),n.customers=new c.default(e),n.dashboard=new l.default(e),n.deliveryBlocks=new N.DeliveryBlocksApi(e),n.fleets=new q.default(e),n.rules=new z.default(e),n.fleetRouterApi=new et.default(e),n.alertConfiguration=new nt.default(e),n.floatingInventory=new bt.default(e),n.geocoding=new ut.default(e),n.googleMapsHelper=new Z.default(e),n.inventoryActionsConfigurations=new P.default(e),n.languages=new _.Language(e),n.merchant=new s.default(e),n.merchantConfiguration=new F.MerchantConfigurationApi(e),n.notificationTemplates=new E.NotificationTemplate(e),n.notificationTypes=new b.NotificationType(e),n.oauthApplication=new ht.default(e),n.onboardings=new tt.default(e),n.photos=new B.default(e),n.plannedRoutes=new y.default(e),n.pushTokenSubscription=new Q.default(e),n.pushNotificationRegistration=new yt.default(e),n.reasonToChangeInventory=new f.default(e),n.reasonToReassignTasks=new V.default(e),n.reasonToCancelTasks=new vt.default(e),n.reportPreferences=new D.default(e),n.reports=new S.default(e),n.runs=new a.default(e),n.scans=new j.default(e),n.rollouts=new u.default(e),n.service=new ot.default(e),n.signatures=new G.default(e),n.skills=new Y.default(e),n.tagCustomerConfigurations=new A.default(e),n.tagMerchantConfigurations=new x.default(e),n.tags=new O.default(e),n.taskConfigurations=new C.default(e),n.taskInventory=new p.default(e),n.inventory=new dt.default(e),n.tasks=new $.default(e),n.teamConfiguration=new L.default(e),n.teams=new U.default(e),n.resourceUploads=new M.default(e),n.userConfigurations=new I.default(e),n.userTypes=new k.default(e),n.users=new g.default(e),n.vehicleTypes=new H.default(e),n.vehicles=new W.default(e),n.vrpAutoDispatchAnalytic=new R.default(e),n.webApplicationConfiguration=new K.default(e),n.fleetTemplates=new it.default(e),n.openFleets=new st.default(e),n.customerAvailabilityHours=new ct.default(e),n.exclusionWindows=new ft.default(e),n.shifts=new lt.default(e),n.customFilters=new _t.default(e),n.serviceAreas=new gt.default(e),n.billing=new Et.default(e),n.userAnalytics=new Tt.default(e),n.analyticsReports=new mt.default(e),n.servicePlans=new Ot.default(e),n.alertsApi=new St.default(e),n.deliveryCatalog=new Rt.default(e),n.packageApi=new wt.default(e),n.routeOptimizationApi=new At.default(e),n.crews=new d.default(e,n.users),n.applicationMerchantConfiguration=new J.default(e,n.merchantConfiguration),n.applicationTeamConfiguration=new X.default(e),[4,t.initSessionConfiguration(n)];case 1:return r.sent(),[2,Object.freeze(n)]}}))}))},t.initSessionConfiguration=function(e){var n,i;return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,Promise.all([e.merchantConfiguration.get(),e.webApplicationConfiguration.get()])];case 1:return r.sent(),(null===(i=null===(n=this._configurationProvider)||void 0===n?void 0:n.isUserAnalyticsEnabled)||void 0===i?void 0:i.call(n))?[4,e.userAnalytics.addSnippet({apiKey:this._configurationProvider.getUserAnalyticsApiKey()})]:[3,5];case 2:return r.sent(),[4,e.merchant.get()];case 3:return r.sent(),[4,e.userAnalytics.run({environment:t._environment})];case 4:r.sent(),r.label=5;case 5:return[2]}}))}))},t.setConfigurations=function(t,e){this._configurationProvider.getApiEndpoint=function(){return t},this._configurationProvider.getAuthenticationEndpoint=function(){return t},this._configurationProvider.getRegionDiscoveryEndpoint=function(){return t},this._configurationProvider.getMonitoringEndpoint=function(){return e}},Object.defineProperty(t,"configurationProvider",{get:function(){return t._configurationProvider},enumerable:!1,configurable:!0}),Object.defineProperty(t,"environment",{get:function(){return this._environment},enumerable:!1,configurable:!0}),t.initWithSessionCode=function(e,n,i){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,t.login({code:e,session:n,region:i})];case 1:return[2,r.sent()]}}))}))},t.initWithEmail=function(e,n,i,s,u,a){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,t.login({email:e,password:n,merchant_uuid:i,recaptchaToken:s,recaptcha_qa_token:u,region:a})];case 1:return[2,r.sent()]}}))}))},t.initWithAuthToken=function(e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,t.login({region:e,authenticationToken:n})];case 1:return[2,r.sent()]}}))}))},t.loginInternal=function(t,e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return[4,i.default.init(e)];case 1:return n=r.sent(),[2,t(n)]}}))}))},t.login=function(e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return null!==t.configurationProvider?[3,2]:[4,v.ConfigurationProvider.fromUrl(v.ConfigurationProvider.getConfigUrl(this._environment))];case 1:n=r.sent(),t.setConfigurationProvider(n),r.label=2;case 2:return[4,this.loginInternal((function(e){return t.init(e)}),e)];case 3:return[2,r.sent()]}}))}))},t.prototype.logout=function(t){return void 0===t&&(t=!1),r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.session.logout(t)];case 1:return[2,e.sent()]}}))}))},t.resendConfirmationEmail=function(t){return r(this,void 0,void 0,(function(){var e,n,r,i,s,u;return o(this,(function(o){switch(o.label){case 0:return e=rt.default.init(t.region),n=t.email,r=t.password,i=t.merchant_uuid,s=t.recaptchaToken,u=t.recaptcha_qa_token,[4,e.resendConfirmationEmail(n,r,i,s,u)];case 1:return[2,o.sent()]}}))}))},t.getCountriesList=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,pt.default.getCountries()]}))}))},t.prototype.switchAccounts=function(){return r(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return n=(e=t).init,[4,this.session.switchAccounts()];case 1:return[2,n.apply(e,[r.sent()])]}}))}))},t.prototype.impersonate=function(e){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return r=(n=t).init,[4,this.session.impersonate(e)];case 1:return[2,r.apply(n,[o.sent()])]}}))}))},t.prototype.impersonateByTeam=function(e){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return r=(n=t).init,[4,this.session.impersonateByTeam(e)];case 1:return[2,r.apply(n,[o.sent()])]}}))}))},t.prototype.unwindImpersonation=function(){return r(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return n=(e=t).init,[4,this.session.unwindImpersonation()];case 1:return[2,n.apply(e,[r.sent()])]}}))}))},t._environment="production",t._configurationProvider=null,t.setConfigurationProvider=function(e){t._configurationProvider=e},t.setEnvironment=function(e){t._environment=e},t}();e.BringgDashboardSDK=xt},function(t,e,n){const r=n(182),o=n(183),i=String.fromCharCode(30);t.exports={protocol:4,encodePacket:r,encodePayload:(t,e)=>{const n=t.length,o=new Array(n);let s=0;t.forEach((t,u)=>{r(t,!1,t=>{o[u]=t,++s===n&&e(o.join(i))})})},decodePacket:o,decodePayload:(t,e)=>{const n=t.split(i),r=[];for(let t=0;t<n.length;t++){const i=o(n[t],e);if(r.push(i),"error"===i.type)break}return r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZIP_CODES_UPLOAD_DONE=e.NEW_EMPLOYEE=e.DELETE_EMPLOYEE=e.NEW_TASK=e.TASK_DELETED=e.NEW_NOTE=e.NEW_SCAN=e.WAYPOINT_UPDATED=e.WAYPOINT_DELETED=e.WAYPOINT_ADDED=e.TASK_UPDATE=e.MERCHANT_SUBSCRIPTION_UPDATE=e.MERCHANT_UPDATE=e.BRINGG_ALIVE_EVENT=e.USER_CONNECT_SUCCESS_EVENT=e.SUBSCRIBE_AS_ADMIN_EVENT=e.EMPLOYEE_UPDATE_EVENT=e.USER_CONNECT_EVENT=e.PubSubEvent=void 0;var r=function(t){this.name=t};e.PubSubEvent=r,e.USER_CONNECT_EVENT=new r("user connect"),e.EMPLOYEE_UPDATE_EVENT=new r("employee update"),e.SUBSCRIBE_AS_ADMIN_EVENT=new r("subscribe as admin"),e.USER_CONNECT_SUCCESS_EVENT=new r("connect success"),e.BRINGG_ALIVE_EVENT=new r("b"),e.MERCHANT_UPDATE=new r("merchant update"),e.MERCHANT_SUBSCRIPTION_UPDATE=new r("merchant subscription updated"),e.TASK_UPDATE=new r("task update"),e.WAYPOINT_ADDED=new r("waypoint added"),e.WAYPOINT_DELETED=new r("waypoint deleted"),e.WAYPOINT_UPDATED=new r("waypoint updated"),e.NEW_SCAN=new r("new scan"),e.NEW_NOTE=new r("new note"),e.TASK_DELETED=new r("task deleted"),e.NEW_TASK=new r("new task"),e.DELETE_EMPLOYEE=new r("delete employee"),e.NEW_EMPLOYEE=new r("new employee"),e.ZIP_CODES_UPLOAD_DONE=new r("team zip codes import done")},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};e.__esModule=!0,o(n(217),e),o(n(218),e),o(n(219),e),o(n(220),e),o(n(221),e),o(n(222),e),o(n(223),e),o(n(224),e),o(n(225),e),o(n(226),e),o(n(227),e),o(n(228),e),o(n(229),e),o(n(230),e),o(n(231),e),o(n(232),e),o(n(233),e),o(n(234),e),o(n(235),e),o(n(236),e),o(n(237),e),o(n(238),e),o(n(239),e),o(n(240),e),o(n(241),e),o(n(242),e),o(n(243),e),o(n(244),e),o(n(245),e),o(n(246),e),o(n(247),e),o(n(248),e),o(n(249),e),o(n(250),e),o(n(251),e),o(n(252),e),o(n(253),e),o(n(254),e),o(n(255),e),o(n(256),e),o(n(257),e),o(n(258),e),o(n(259),e),o(n(260),e),o(n(261),e),o(n(262),e),o(n(263),e),o(n(264),e),o(n(265),e),o(n(266),e),o(n(267),e),o(n(268),e),o(n(269),e),o(n(270),e),o(n(271),e),o(n(272),e),o(n(273),e),o(n(274),e),o(n(275),e),o(n(276),e),o(n(277),e),o(n(278),e),o(n(282),e),o(n(283),e),o(n(284),e),o(n(285),e),o(n(286),e),o(n(287),e),o(n(288),e),o(n(289),e),o(n(290),e),o(n(291),e),o(n(292),e),o(n(293),e),o(n(294),e),o(n(295),e),o(n(296),e),o(n(297),e),o(n(298),e),o(n(299),e),o(n(300),e),o(n(301),e),o(n(302),e),o(n(303),e),o(n(304),e),o(n(305),e),o(n(306),e),o(n(307),e),o(n(308),e),o(n(309),e),o(n(310),e),o(n(311),e),o(n(312),e),o(n(313),e),o(n(314),e),o(n(315),e),o(n(316),e),o(n(317),e),o(n(318),e),o(n(319),e),o(n(320),e),o(n(321),e),o(n(322),e)},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n(4),i=n(3);function s(t){return function(e){return e.lift(new u(t))}}var u=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=Object(i.a)(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,r){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(o.a),c=n(10),l=n(76);function f(t,e){return void 0===e&&(e=c.a),s((function(){return Object(l.a)(t,e)}))}function p(t){return function(e){return e.lift(new h(t))}}var h=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new d(t,this.closingNotifier))},t}(),d=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(Object(i.a)(r,n)),r}return r.a(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,n,r,o){var i=this.buffer;this.buffer=[],this.destination.next(i)},e}(o.a),y=n(1);function v(t,e){return void 0===e&&(e=null),function(n){return n.lift(new _(t,e))}}var _=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?g:b}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),b=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.a(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(y.a),g=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.bufferSize=n,o.startBufferEvery=r,o.buffers=[],o.count=0,o}return r.a(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,o=this.count;this.count++,o%n==0&&r.push([]);for(var i=r.length;i--;){var s=r[i];s.push(t),s.length===e&&(r.splice(i,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(y.a),E=n(13);function w(t){var e=arguments.length,n=c.a;Object(E.a)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var o=Number.POSITIVE_INFINITY;return e>=3&&(o=arguments[2]),function(e){return e.lift(new T(t,r,o,n))}}var T=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new O(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),m=function(){return function(){this.buffer=[]}}(),O=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=o,s.scheduler=i,s.contexts=[];var u=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var a={subscriber:s,context:u,bufferTimeSpan:n};s.add(u.closeAction=i.schedule(S,n,a))}else{var c={subscriber:s,context:u},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:i};s.add(u.closeAction=i.schedule(A,n,c)),s.add(i.schedule(R,r,l))}return s}return r.a(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,o=0;o<r;o++){var i=n[o],s=i.buffer;s.push(t),s.length==this.maxBufferSize&&(e=i)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(S,n,r))}},e.prototype.openContext=function(){var t=new m;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(y.a);function S(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function R(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,o=t.scheduler,i=r.openContext();r.closed||(r.add(i.closeAction=o.schedule(A,n,{subscriber:r,context:i})),this.schedule(t,e))}function A(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var x=n(6);function P(t,e){return function(n){return n.lift(new C(t,e))}}var C=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new I(t,this.openings,this.closingSelector))},t}(),I=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.openings=n,o.closingSelector=r,o.contexts=[],o.add(Object(i.a)(o,n)),o}return r.a(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,o){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new x.a,r={buffer:[],subscription:n};e.push(r);var o=Object(i.a)(this,t,r);!o||o.closed?this.closeBuffer(r):(o.context=r,this.add(o),n.add(o))},e}(o.a);function k(t){return function(e){return e.lift(new N(t))}}var N=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new D(t,this.closingSelector))},t}(),D=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.a(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,n,r,o){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new x.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(i.a)(this,e)),this.subscribing=!1},e}(o.a),U=n(17);function M(t){return function(e){var n=new L(t),r=e.lift(n);return n.caught=r}}var L=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new j(t,this.selector,this.caught))},t}(),j=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.selector=n,o.caught=r,o}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new U.a(this,void 0,void 0);this.add(r);var o=Object(i.a)(this,n,void 0,void 0,r);o!==r&&this.add(o)}},e}(o.a),G=n(49);function B(t){return function(e){return e.lift(new G.a(t))}}var F=n(8),H=n(16);function V(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(F.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(Object(H.a)([e].concat(t)),new G.a(n))}}var Y=n(40);function W(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Y.a.apply(void 0,[e].concat(t)))}}var K=n(77),q=n(29);function z(t,e){return Object(q.a)(t,e,1)}function Q(t,e){return z((function(){return t}),e)}function $(t){return function(e){return e.lift(new J(t,e))}}var J=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new X(t,this.predicate,this.source))},t}(),X=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.source=r,o.count=0,o.index=0,o}return r.a(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(y.a);function Z(t){return function(e){return e.lift(new tt(t))}}var tt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new et(t,this.durationSelector))},t}(),et=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r.durationSubscription=null,r}return r.a(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(i.a)(this,e))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,e,n,r,o){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=null,n.unsubscribe(),this.remove(n)),this.value=null,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(o.a);function nt(t,e){return void 0===e&&(e=c.a),function(n){return n.lift(new rt(t,e))}}var rt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new ot(t,this.dueTime,this.scheduler))},t}(),ot=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.dueTime=n,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return r.a(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(it,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(y.a);function it(t){t.debouncedNext()}function st(t){return void 0===t&&(t=null),function(e){return e.lift(new ut(t))}}var ut=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new at(t,this.defaultValue))},t}(),at=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.a(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(y.a);function ct(t){return t instanceof Date&&!isNaN(+t)}var lt=n(22);function ft(t,e){void 0===e&&(e=c.a);var n=ct(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new pt(n,e))}}var pt=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new ht(t,this.delay,this.scheduler))},t}(),ht=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.delay=n,o.scheduler=r,o.queue=[],o.active=!1,o.errored=!1,o}return r.a(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,o=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var i=Math.max(0,n[0].time-r.now());this.schedule(t,i)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new dt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(lt.a.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(lt.a.createComplete()),this.unsubscribe()},e}(y.a),dt=function(){return function(t,e){this.time=t,this.notification=e}}(),yt=n(2);function vt(t,e){return e?function(n){return new gt(n,e).lift(new _t(t))}:function(e){return e.lift(new _t(t))}}var _t=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new bt(t,this.delayDurationSelector))},t}(),bt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(t),this.removeSubscription(o),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=Object(i.a)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(o.a),gt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.a(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new Et(t,this.source))},e}(yt.a),Et=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.a(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(y.a);function wt(){return function(t){return t.lift(new Tt)}}var Tt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new mt(t))},t}(),mt=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(y.a);function Ot(t,e){return function(n){return n.lift(new St(t,e))}}var St=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Rt(t,this.keySelector,this.flushes))},t}(),Rt=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add(Object(i.a)(o,r)),o}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(o.a);function At(t,e){return function(n){return n.lift(new xt(t,e))}}var xt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Pt(t,this.compare,this.keySelector))},t}(),Pt=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=r,o.hasKey=!1,"function"==typeof n&&(o.compare=n),o}return r.a(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(y.a);function Ct(t,e){return At((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var It=n(30),kt=n(21),Nt=n(33);function Dt(t){return void 0===t&&(t=Lt),function(e){return e.lift(new Ut(t))}}var Ut=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new Mt(t,this.errorFactory))},t}(),Mt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)},e}(y.a);function Lt(){return new Nt.a}var jt=n(14);function Gt(t){return function(e){return 0===t?Object(jt.b)():e.lift(new Bt(t))}}var Bt=function(){function t(t){if(this.total=t,this.total<0)throw new It.a}return t.prototype.call=function(t,e){return e.subscribe(new Ft(t,this.total))},t}(),Ft=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(y.a);function Ht(t,e){if(t<0)throw new It.a;var n=arguments.length>=2;return function(r){return r.pipe(Object(kt.a)((function(e,n){return n===t})),Gt(1),n?st(e):Dt((function(){return new It.a})))}}var Vt=n(42);function Yt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Object(Y.a)(e,Vt.a.apply(void 0,t))}}function Wt(t,e){return function(n){return n.lift(new Kt(t,e,n))}}var Kt=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new qt(t,this.predicate,this.thisArg,this.source))},t}(),qt=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.source=o,i.index=0,i.thisArg=r||i,i}return r.a(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(y.a);function zt(){return function(t){return t.lift(new Qt)}}var Qt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new $t(t))},t}(),$t=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.a(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(i.a)(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(o.a),Jt=n(12);function Xt(t,e){return e?function(n){return n.pipe(Xt((function(n,r){return Object(H.a)(t(n,r)).pipe(Object(Jt.a)((function(t,o){return e(n,t,r,o)})))})))}:function(e){return e.lift(new Zt(t))}}var Zt=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.project))},t}(),te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=new U.a(this,e,n),o=this.destination;o.add(r);var s=Object(i.a)(this,t,void 0,void 0,r);s!==r&&o.add(s)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(o.a);function ee(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new ne(t,e,n))}}var ne=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new re(t,this.project,this.concurrent,this.scheduler))},t}(),re=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(i.buffer=[]),i}return r.a(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,r=t.value,o=t.index;e.subscribeToProjection(n,r,o)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);try{var o=(0,this.project)(t,r);if(this.scheduler){var i={subscriber:this,result:o,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,i))}else this.subscribeToProjection(o,t,r)}catch(t){n.error(t)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(Object(i.a)(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,o){this._next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(o.a);function oe(t){return function(e){return e.lift(new ie(t))}}var ie=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new se(t,this.callback))},t}(),se=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new x.a(n)),r}return r.a(e,t),e}(y.a);function ue(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ae(t,n,!1,e))}}var ae=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ce=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.predicate=n,s.source=r,s.yieldIndex=o,s.thisArg=i,s.index=0,s}return r.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(y.a);function le(t,e){return function(n){return n.lift(new ae(t,n,!0,e))}}var fe=n(25);function pe(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(kt.a)((function(e,n){return t(e,n,r)})):fe.a,Gt(1),n?st(e):Dt((function(){return new Nt.a})))}}var he=n(71);function de(){return function(t){return t.lift(new ye)}}var ye=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype._next=function(t){},e}(y.a);function _e(){return function(t){return t.lift(new be)}}var be=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ge(t))},t}(),ge=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(y.a);function Ee(t){return function(e){return 0===t?Object(jt.b)():e.lift(new we(t))}}var we=function(){function t(t){if(this.total=t,this.total<0)throw new It.a}return t.prototype.call=function(t,e){return e.subscribe(new Te(t,this.total))},t}(),Te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,o=0;o<n;o++){var i=e++%n;t.next(r[i])}t.complete()},e}(y.a);function me(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(kt.a)((function(e,n){return t(e,n,r)})):fe.a,Ee(1),n?st(e):Dt((function(){return new Nt.a})))}}function Oe(t){return function(e){return e.lift(new Se(t))}}var Se=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Re(t,this.value))},t}(),Re=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.a(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(y.a);function Ae(){return function(t){return t.lift(new xe)}}var xe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Pe(t))},t}(),Pe=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype._next=function(t){this.destination.next(lt.a.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(lt.a.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(lt.a.createComplete()),t.complete()},e}(y.a);function Ce(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Ie(t,e,n))}}var Ie=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new ke(t,this.accumulator,this.seed,this.hasSeed))},t}(),ke=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.accumulator=n,i._seed=r,i.hasSeed=o,i.index=0,i}return r.a(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(y.a),Ne=n(43);function De(t,e){return arguments.length>=2?function(n){return Object(Ne.a)(Ce(t,e),Ee(1),st(e))(n)}:function(e){return Object(Ne.a)(Ce((function(e,n,r){return t(e,n,r+1)})),Ee(1))(e)}}function Ue(t){return De("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var Me=n(78);function Le(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Me.a.apply(void 0,[e].concat(t)))}}var je=n(50);function Ge(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Object(q.a)((function(){return t}),e,n):("number"==typeof e&&(n=e),Object(q.a)((function(){return t}),n))}function Be(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Fe(t,e,n))}}var Fe=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new He(t,this.accumulator,this.seed,this.concurrent))},t}(),He=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.accumulator=n,i.acc=r,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,t,e)}catch(t){return n.error(t)}this.active++,this._innerSub(r,t,e)}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,n){var r=new U.a(this,e,n),o=this.destination;o.add(r);var s=Object(i.a)(this,t,void 0,void 0,r);s!==r&&o.add(s)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,o){var i=this.destination;this.acc=e,this.hasValue=!0,i.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(o.a);function Ve(t){return De("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}var Ye=n(79);function We(t,e){return function(n){var r;if(r="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new Ke(r,e));var o=Object.create(n,Ye.b);return o.source=n,o.subjectFactory=r,o}}var Ke=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),o=n(r).subscribe(t);return o.add(e.subscribe(r)),o},t}(),qe=n(80);function ze(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Object(F.a)(t[0])&&(t=t[0]),function(e){return e.lift(new Qe(t))}}var Qe=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new $e(t,this.nextSources))},t}(),$e=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return r.a(e,t),e.prototype.notifyError=function(t,e){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new U.a(this,void 0,void 0),n=this.destination;n.add(e);var r=Object(i.a)(this,t,void 0,void 0,e);r!==e&&n.add(r)}else this.destination.complete()},e}(o.a);function Je(){return function(t){return t.lift(new Xe)}}var Xe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t))},t}(),Ze=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return r.a(e,t),e.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)},e}(y.a),tn=n(90);function en(t,e){return function(n){return[Object(kt.a)(t,e)(n),Object(kt.a)(Object(tn.a)(t,e))(n)]}}function nn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(Jt.a)(rn(t,n))(e)}}function rn(t,e){return function(n){for(var r=n,o=0;o<e;o++){var i=r[t[o]];if(void 0===i)return;r=i}return r}}var on=n(7);function sn(t){return t?We((function(){return new on.a}),t):We(new on.a)}var un=n(81);function an(t){return function(e){return We(new un.a(t))(e)}}var cn=n(36);function ln(){return function(t){return We(new cn.a)(t)}}var fn=n(53);function pn(t,e,n,r){n&&"function"!=typeof n&&(r=n);var o="function"==typeof n?n:void 0,i=new fn.a(t,e,r);return function(t){return We((function(){return i}),o)(t)}}var hn=n(82);function dn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&Object(F.a)(t[0])&&(t=t[0]),e.lift.call(hn.a.apply(void 0,[e].concat(t)))}}function yn(t){return void 0===t&&(t=-1),function(e){return 0===t?Object(jt.b)():t<0?e.lift(new vn(-1,e)):e.lift(new vn(t-1,e))}}var vn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new _n(t,this.count,this.source))},t}(),_n=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.count=n,o.source=r,o}return r.a(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(y.a);function bn(t){return function(e){return e.lift(new gn(t))}}var gn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new En(t,this.notifier,e))},t}(),En=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.notifier=n,o.source=r,o.sourceIsBeingSubscribedTo=!0,o}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new on.a;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(i.a)(this,e)},e}(o.a);function wn(t){return void 0===t&&(t=-1),function(e){return e.lift(new Tn(t,e))}}var Tn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new mn(t,this.count,this.source))},t}(),mn=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.count=n,o.source=r,o}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(y.a);function On(t){return function(e){return e.lift(new Sn(t,e))}}var Sn=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Rn(t,this.notifier,this.source))},t}(),Rn=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.notifier=n,o.source=r,o}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=null,this.retriesSubscription=null;else{n=new on.a;try{r=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}o=Object(i.a)(this,r)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,n,r,o){var i=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=i,this.source.subscribe(this)},e}(o.a),An=n(52);function xn(t){return function(e){return e.lift(new Pn(t))}}var Pn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Cn(t),r=e.subscribe(n);return r.add(Object(i.a)(n,this.notifier)),r},t}(),Cn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.a(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,n,r,o){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(o.a);function In(t,e){return void 0===e&&(e=c.a),function(n){return n.lift(new kn(t,e))}}var kn=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Nn(t,this.period,this.scheduler))},t}(),Nn=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.period=n,o.scheduler=r,o.hasValue=!1,o.add(r.schedule(Dn,n,{subscriber:o,period:n})),o}return r.a(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(y.a);function Dn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Un(t,e){return function(n){return n.lift(new Mn(t,e))}}var Mn=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Ln(t,this.compareTo,this.comparator))},t}(),Ln=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.compareTo=n,o.comparator=r,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(n.subscribe(new jn(e,o))),o}return r.a(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var r=t.shift(),o=e.shift(),i=!1;try{i=n?n(r,o):r===o}catch(t){this.destination.error(t)}i||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(y.a),jn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.a(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(y.a);function Gn(){return new on.a}function Bn(){return function(t){return Object(An.a)()(We(Gn)(t))}}function Fn(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,o=void 0===r?Number.POSITIVE_INFINITY:r,i=t.windowTime,s=void 0===i?Number.POSITIVE_INFINITY:i,u=t.refCount,a=t.scheduler,c=0,l=!1,f=!1;return function(t){c++,e&&!l||(l=!1,e=new fn.a(o,s,a),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){f=!0,n=void 0,e.complete()}}));var r=e.subscribe(this);this.add((function(){c--,r.unsubscribe(),n&&!f&&u&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function Hn(t){return function(e){return e.lift(new Vn(t,e))}}var Vn=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Yn(t,this.predicate,this.source))},t}(),Yn=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.source=r,o.seenValue=!1,o.index=0,o}return r.a(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Nt.a)},e}(y.a);function Wn(t){return function(e){return e.lift(new Kn(t))}}var Kn=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new qn(t,this.total))},t}(),qn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(y.a);function zn(t){return function(e){return e.lift(new Qn(t))}}var Qn=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new It.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new y.a(t)):e.subscribe(new $n(t,this._skipCount))},t}(),$n=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.a(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,o=this._ring,i=o[r];o[r]=t,this.destination.next(i)}},e}(y.a);function Jn(t){return function(e){return e.lift(new Xn(t))}}var Xn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Zn(t,this.notifier))},t}(),Zn=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var o=new U.a(r,void 0,void 0);r.add(o),r.innerSubscription=o;var s=Object(i.a)(r,n,void 0,void 0,o);return s!==o&&(r.add(s),r.innerSubscription=s),r}return r.a(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(t,e,n,r,o){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(o.a);function tr(t){return function(e){return e.lift(new er(t))}}var er=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new nr(t,this.predicate))},t}(),nr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},e}(y.a);function rr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(E.a)(n)?(t.pop(),function(e){return Object(Y.a)(t,e,n)}):function(e){return Object(Y.a)(t,e)}}var or=n(59),ir=n(38),sr=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=or.a);var o=t.call(this)||this;return o.source=e,o.delayTime=n,o.scheduler=r,(!Object(ir.a)(n)||n<0)&&(o.delayTime=0),r&&"function"==typeof r.schedule||(o.scheduler=or.a),o}return r.a(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=or.a),new e(t,n,r)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,r=this.source;return this.scheduler.schedule(e.dispatch,n,{source:r,subscriber:t})},e}(yt.a);function ur(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ar(t,e))}}var ar=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new sr(e,this.delay,this.scheduler).subscribe(t)},t}();function cr(t,e){return"function"==typeof e?function(n){return n.pipe(cr((function(n,r){return Object(H.a)(t(n,r)).pipe(Object(Jt.a)((function(t,o){return e(n,t,r,o)})))})))}:function(e){return e.lift(new lr(t))}}var lr=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new fr(t,this.project))},t}(),fr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe();var o=new U.a(this,e,n),s=this.destination;s.add(o),this.innerSubscription=Object(i.a)(this,t,void 0,void 0,o),this.innerSubscription!==o&&s.add(this.innerSubscription)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},e}(o.a);function pr(){return cr(fe.a)}function hr(t,e){return e?cr((function(){return t}),e):cr((function(){return t}))}function dr(t){return function(e){return e.lift(new yr(t))}}var yr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new vr(t),r=Object(i.a)(n,this.notifier);return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),vr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(o.a);function _r(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new br(t,e))}}var br=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new gr(t,this.predicate,this.inclusive))},t}(),gr=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.inclusive=r,o.index=0,o}return r.a(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(y.a),Er=n(20),wr=n(31);function Tr(t,e,n){return function(r){return r.lift(new mr(t,e,n))}}var mr=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new Or(t,this.nextOrObserver,this.error,this.complete))},t}(),Or=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i._tapNext=Er.a,i._tapError=Er.a,i._tapComplete=Er.a,i._tapError=r||Er.a,i._tapComplete=o||Er.a,Object(wr.a)(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||Er.a,i._tapError=n.error||Er.a,i._tapComplete=n.complete||Er.a),i}return r.a(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(y.a),Sr={leading:!0,trailing:!1};function Rr(t,e){return void 0===e&&(e=Sr),function(n){return n.lift(new Ar(t,e.leading,e.trailing))}}var Ar=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new xr(t,this.durationSelector,this.leading,this.trailing))},t}(),xr=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.destination=e,i.durationSelector=n,i._leading=r,i._trailing=o,i._hasValue=!1,i}return r.a(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=null},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=Object(i.a)(this,e))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=null,e&&this.send()},e.prototype.notifyNext=function(t,e,n,r,o){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(o.a);function Pr(t,e,n){return void 0===e&&(e=c.a),void 0===n&&(n=Sr),function(r){return r.lift(new Cr(t,e,n.leading,n.trailing))}}var Cr=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new Ir(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Ir=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=r,s.leading=o,s.trailing=i,s._hasTrailingValue=!1,s._trailingValue=null,s}return r.a(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(kr,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(y.a);function kr(t){t.subscriber.clearThrottle()}var Nr=n(54);function Dr(t){return void 0===t&&(t=c.a),function(e){return Object(Nr.a)((function(){return e.pipe(Ce((function(e,n){var r=e.current;return{value:n,current:t.now(),last:r}}),{current:t.now(),value:void 0,last:void 0}),Object(Jt.a)((function(t){var e=t.current,n=t.last,r=t.value;return new Ur(r,e-n)})))}))}}var Ur=function(){return function(t,e){this.value=t,this.interval=e}}(),Mr=n(83);function Lr(t,e,n){return void 0===n&&(n=c.a),function(r){var o=ct(t),i=o?+t-n.now():Math.abs(t);return r.lift(new jr(i,o,e,n))}}var jr=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new Gr(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Gr=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=o,s.scheduler=i,s.action=null,s.scheduleTimeout(),s}return r.a(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(i.a)(t,e))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},e}(o.a),Br=n(51);function Fr(t,e){return void 0===e&&(e=c.a),Lr(t,Object(Br.a)(new Mr.a),e)}function Hr(t){return void 0===t&&(t=c.a),Object(Jt.a)((function(e){return new Vr(e,t.now())}))}var Vr=function(){return function(t,e){this.value=t,this.timestamp=e}}();function Yr(t,e,n){return 0===n?[e]:(t.push(e),t)}function Wr(){return De(Yr,[])}function Kr(t){return function(e){return e.lift(new qr(t))}}var qr=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new zr(t),r=e.subscribe(n);return r.closed||n.add(Object(i.a)(n,this.windowBoundaries)),r},t}(),zr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new on.a,e.next(n.window),n}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.openWindow()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new on.a;e.next(n)},e}(o.a);function Qr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new $r(t,e))}}var $r=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new Jr(t,this.windowSize,this.startWindowEvery))},t}(),Jr=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.destination=e,o.windowSize=n,o.startWindowEvery=r,o.windows=[new on.a],o.count=0,e.next(o.windows[0]),o}return r.a(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(t);var u=this.count-r+1;if(u>=0&&u%e==0&&!this.closed&&o.shift().complete(),++this.count%e==0&&!this.closed){var a=new on.a;o.push(a),n.next(a)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(y.a);function Xr(t){var e=c.a,n=null,r=Number.POSITIVE_INFINITY;return Object(E.a)(arguments[3])&&(e=arguments[3]),Object(E.a)(arguments[2])?e=arguments[2]:Object(ir.a)(arguments[2])&&(r=arguments[2]),Object(E.a)(arguments[1])?e=arguments[1]:Object(ir.a)(arguments[1])&&(n=arguments[1]),function(o){return o.lift(new Zr(t,n,r,e))}}var Zr=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new eo(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),to=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.a(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(on.a),eo=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=o,s.scheduler=i,s.windows=[];var u=s.openWindow();if(null!==r&&r>=0){var a={subscriber:s,window:u,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:i};s.add(i.schedule(oo,n,a)),s.add(i.schedule(ro,r,c))}else{var l={subscriber:s,window:u,windowTimeSpan:n};s.add(i.schedule(no,n,l))}return s}return r.a(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var o=e[r];o.closed||(o.next(t),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new to;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(y.a);function no(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function ro(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,o=t.windowCreationInterval,i=n.openWindow(),s={action:this,subscription:null},u={subscriber:n,window:i,context:s};s.subscription=r.schedule(oo,e,u),this.add(s.subscription),this.schedule(t,o)}function oo(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function io(t,e){return function(n){return n.lift(new so(t,e))}}var so=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new uo(t,this.openings,this.closingSelector))},t}(),uo=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.openings=n,o.closingSelector=r,o.contexts=[],o.add(o.openSubscription=Object(i.a)(o,n,n)),o}return r.a(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,o=-1;++o<r;){var i=n[o];i.window.error(e),i.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var o=e[r];o.window.complete(),o.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,o){if(t===this.openings){var s=void 0;try{s=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var u=new on.a,a=new x.a,c={window:u,subscription:a};this.contexts.push(c);var l=Object(i.a)(this,s,c);l.closed?this.closeWindow(this.contexts.length-1):(l.context=c,a.add(l)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,o=n.subscription;e.splice(t,1),r.complete(),o.unsubscribe()}},e}(o.a);function ao(t){return function(e){return e.lift(new co(t))}}var co=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new lo(t,this.closingSelector))},t}(),lo=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.openWindow(o)},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,r=this.window=new on.a;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=Object(i.a)(this,n))},e}(o.a);function fo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new po(r,n))}}var po=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new ho(t,this.observables,this.project))},t}(),ho=function(t){function e(e,n,r){var o=t.call(this,e)||this;o.observables=n,o.project=r,o.toRespond=[];var s=n.length;o.values=new Array(s);for(var u=0;u<s;u++)o.toRespond.push(u);for(u=0;u<s;u++){var a=n[u];o.add(Object(i.a)(o,a,a,u))}return o}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.values[n]=e;var i=this.toRespond;if(i.length>0){var s=i.indexOf(n);-1!==s&&i.splice(s,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(o.a),yo=n(55);function vo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(yo.b.apply(void 0,[e].concat(t)))}}function _o(t){return function(e){return e.lift(new yo.a(t))}}n.d(e,"audit",(function(){return s})),n.d(e,"auditTime",(function(){return f})),n.d(e,"buffer",(function(){return p})),n.d(e,"bufferCount",(function(){return v})),n.d(e,"bufferTime",(function(){return w})),n.d(e,"bufferToggle",(function(){return P})),n.d(e,"bufferWhen",(function(){return k})),n.d(e,"catchError",(function(){return M})),n.d(e,"combineAll",(function(){return B})),n.d(e,"combineLatest",(function(){return V})),n.d(e,"concat",(function(){return W})),n.d(e,"concatAll",(function(){return K.a})),n.d(e,"concatMap",(function(){return z})),n.d(e,"concatMapTo",(function(){return Q})),n.d(e,"count",(function(){return $})),n.d(e,"debounce",(function(){return Z})),n.d(e,"debounceTime",(function(){return nt})),n.d(e,"defaultIfEmpty",(function(){return st})),n.d(e,"delay",(function(){return ft})),n.d(e,"delayWhen",(function(){return vt})),n.d(e,"dematerialize",(function(){return wt})),n.d(e,"distinct",(function(){return Ot})),n.d(e,"distinctUntilChanged",(function(){return At})),n.d(e,"distinctUntilKeyChanged",(function(){return Ct})),n.d(e,"elementAt",(function(){return Ht})),n.d(e,"endWith",(function(){return Yt})),n.d(e,"every",(function(){return Wt})),n.d(e,"exhaust",(function(){return zt})),n.d(e,"exhaustMap",(function(){return Xt})),n.d(e,"expand",(function(){return ee})),n.d(e,"filter",(function(){return kt.a})),n.d(e,"finalize",(function(){return oe})),n.d(e,"find",(function(){return ue})),n.d(e,"findIndex",(function(){return le})),n.d(e,"first",(function(){return pe})),n.d(e,"groupBy",(function(){return he.b})),n.d(e,"ignoreElements",(function(){return de})),n.d(e,"isEmpty",(function(){return _e})),n.d(e,"last",(function(){return me})),n.d(e,"map",(function(){return Jt.a})),n.d(e,"mapTo",(function(){return Oe})),n.d(e,"materialize",(function(){return Ae})),n.d(e,"max",(function(){return Ue})),n.d(e,"merge",(function(){return Le})),n.d(e,"mergeAll",(function(){return je.a})),n.d(e,"mergeMap",(function(){return q.a})),n.d(e,"flatMap",(function(){return q.a})),n.d(e,"mergeMapTo",(function(){return Ge})),n.d(e,"mergeScan",(function(){return Be})),n.d(e,"min",(function(){return Ve})),n.d(e,"multicast",(function(){return We})),n.d(e,"observeOn",(function(){return qe.b})),n.d(e,"onErrorResumeNext",(function(){return ze})),n.d(e,"pairwise",(function(){return Je})),n.d(e,"partition",(function(){return en})),n.d(e,"pluck",(function(){return nn})),n.d(e,"publish",(function(){return sn})),n.d(e,"publishBehavior",(function(){return an})),n.d(e,"publishLast",(function(){return ln})),n.d(e,"publishReplay",(function(){return pn})),n.d(e,"race",(function(){return dn})),n.d(e,"reduce",(function(){return De})),n.d(e,"repeat",(function(){return yn})),n.d(e,"repeatWhen",(function(){return bn})),n.d(e,"retry",(function(){return wn})),n.d(e,"retryWhen",(function(){return On})),n.d(e,"refCount",(function(){return An.a})),n.d(e,"sample",(function(){return xn})),n.d(e,"sampleTime",(function(){return In})),n.d(e,"scan",(function(){return Ce})),n.d(e,"sequenceEqual",(function(){return Un})),n.d(e,"share",(function(){return Bn})),n.d(e,"shareReplay",(function(){return Fn})),n.d(e,"single",(function(){return Hn})),n.d(e,"skip",(function(){return Wn})),n.d(e,"skipLast",(function(){return zn})),n.d(e,"skipUntil",(function(){return Jn})),n.d(e,"skipWhile",(function(){return tr})),n.d(e,"startWith",(function(){return rr})),n.d(e,"subscribeOn",(function(){return ur})),n.d(e,"switchAll",(function(){return pr})),n.d(e,"switchMap",(function(){return cr})),n.d(e,"switchMapTo",(function(){return hr})),n.d(e,"take",(function(){return Gt})),n.d(e,"takeLast",(function(){return Ee})),n.d(e,"takeUntil",(function(){return dr})),n.d(e,"takeWhile",(function(){return _r})),n.d(e,"tap",(function(){return Tr})),n.d(e,"throttle",(function(){return Rr})),n.d(e,"throttleTime",(function(){return Pr})),n.d(e,"throwIfEmpty",(function(){return Dt})),n.d(e,"timeInterval",(function(){return Dr})),n.d(e,"timeout",(function(){return Fr})),n.d(e,"timeoutWith",(function(){return Lr})),n.d(e,"timestamp",(function(){return Hr})),n.d(e,"toArray",(function(){return Wr})),n.d(e,"window",(function(){return Kr})),n.d(e,"windowCount",(function(){return Qr})),n.d(e,"windowTime",(function(){return Xr})),n.d(e,"windowToggle",(function(){return io})),n.d(e,"windowWhen",(function(){return ao})),n.d(e,"withLatestFrom",(function(){return fo})),n.d(e,"zip",(function(){return vo})),n.d(e,"zipAll",(function(){return _o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.REGION_NOT_WORKING=e.HttpStatusCode=void 0;var r=n(106);e.HttpStatusCode=r,e.REGION_NOT_WORKING="Region is not working"},function(t,e,n){"use strict";var r,o=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(e,"__esModule",{value:!0});var i=((r={})["http:"]=80,r["https:"]=443,r["ws:"]=80,r["wss:"]=443,r),s={80:"http:",443:"https:"},u=function(){function t(t,e,n){this.protocol=t,this.host=e,this.port=n||i[t]}return t.prototype.encode=function(){return this.protocol.valueOf()+"//"+this.host+":"+this.port},t.fromProtocolString=function(t,e){switch(t){case"http:":return"http:";case"https:":return"https:";case"ws:":return"ws:";case"wss:":return"wss:"}return e&&s[e]?s[e]:"https:"},t.parseHostAndPort=function(t){var e=o(t.split("/"),1)[0],n=o(e.split(":"),2);return{host:n[0],port:n[1]}},t.parse=function(e){var n=o(e.split("//"),2),r=n[0],i=n[1];i||(i=r,r=null);var s=this.parseHostAndPort(i),u=s.host,a=s.port,c=a&&parseInt(a);return new t(this.fromProtocolString(r,c),u,c)},t}();e.default=u},function(t,e){t.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Request=e.defaultExtractor=void 0;var r=n(15),o=n(19);e.defaultExtractor=function(t){return t};var i=function(){function t(t,n){this.service=t,this.route=n,this.extractor=e.defaultExtractor}return t.prototype.withRouteParams=function(t){return this.routeParams=t,this},t.prototype.withQueryString=function(t){return this.queryString=t,this},t.prototype.withExtractor=function(t){return this.extractor=t,this},t.prototype.withPayload=function(t){return this.payload=t,this},t.prototype.withHeaders=function(t){return this.headers=t,this},t.prototype.setException=function(t){var e=r.BringgException.serviceException(t)();if(Error.captureStackTrace)Error.captureStackTrace(e,this.setException);else try{throw new Error}catch(t){e.stack=t.stack}return this.exception=function(){return e},this},t.prototype.invoke=function(){return this.service.handleAuthorizedRequest(this.route,this.extractor,this.exception,this.payload,this.routeParams,this.queryString,this.headers)},t}();e.Request=i;var s=function(){function t(t){this.service=t}return t.prototype.get=function(t){var e=new o.Route(t,0);return new i(this.service,e)},t.prototype.post=function(t){var e=new o.Route(t,1);return new i(this.service,e)},t.prototype.put=function(t){var e=new o.Route(t,2);return new i(this.service,e)},t.prototype.patch=function(t){var e=new o.Route(t,3);return new i(this.service,e)},t.prototype.delete=function(t){var e=new o.Route(t,4);return new i(this.service,e)},t}();e.default=s},function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return p}));var r=n(0),o=n(1),i=n(6),s=n(2),u=n(7);function a(t,e,n,r){return function(o){return o.lift(new c(t,e,n,r))}}var c=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),l=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=o,s.subjectSelector=i,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,o=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!o){o=this.subjectSelector?this.subjectSelector():new u.a,n.set(e,o);var i=new p(e,o,this);if(this.destination.next(i),this.durationSelector){var s=void 0;try{s=this.durationSelector(new p(e,o))}catch(t){return void this.error(t)}this.add(s.subscribe(new f(e,o,this)))}}o.closed||o.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(o.a),f=function(t){function e(e,n,r){var o=t.call(this,n)||this;return o.key=e,o.group=n,o.parent=r,o}return r.a(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(o.a),p=function(t){function e(e,n,r){var o=t.call(this)||this;return o.key=e,o.groupSubject=n,o.refCountSubscription=r,o}return r.a(e,t),e.prototype._subscribe=function(t){var e=new i.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new h(n)),e.add(r.subscribe(t)),e},e}(s.a),h=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.a(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(i.a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){var r={},o=n.value;return n.value=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=JSON.stringify(t);return r.hasOwnProperty(n)||(r[n]=o.apply(this,t).then((function(t){return delete r[n],t})).catch((function(t){throw delete r[n],t}))),r[n]},n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GetAllChunkSize=e.defaultExtractor=e.runCashoutExtractor=e.runsLocationsExtractor=e.runsHistoryExtractor=e.runExtractor=e.RunEvents=e.RunStatus=void 0,function(t){t.ALL="all",t.CLOSED="closed",t.OPEN="open"}(e.RunStatus||(e.RunStatus={})),function(t){t.UPDATED="run updated",t.DELETED="run deleted",t.CREATED="run created"}(e.RunEvents||(e.RunEvents={}));e.runExtractor=function(t){return t.run};e.runsHistoryExtractor=function(t){return t};e.runsLocationsExtractor=function(t){return t};e.runCashoutExtractor=function(t){return t};e.defaultExtractor=function(t){return t},e.GetAllChunkSize=450},function(t,e,n){"use strict";var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=e.baseRoute=e.TaskRealTimeEvents=e.formExtractor=e.taskIdsExtractor=e.scanCodeExtractor=e.locationExtractor=e.childTasksExtractor=e.tasksExtractor=e.successExtractor=e.taskExtractor=e.defaultExtractor=e.noteTypes=e.taskToGroupMapper=e.groupFilter=e.GROUP_VALUES=e.DONE_TASK_STATUES=e.OPEN_TASK_STATUES=void 0;var o,i=n(64),s=n(101);e.OPEN_TASK_STATUES=[i.TaskStatus.Created,i.TaskStatus.Assigned,i.TaskStatus.OnTheWay,i.TaskStatus.CheckedIn,i.TaskStatus.Accepted],e.DONE_TASK_STATUES=[i.TaskStatus.Cancelled,i.TaskStatus.Done,i.TaskStatus.Rejected],function(t){t[t.General=0]="General",t[t.Open=1]="Open",t[t.Planning=2]="Planning",t[t.Closed=3]="Closed",t[t.Invalid=4]="Invalid"}(o=e.GROUP_VALUES||(e.GROUP_VALUES={})),e.groupFilter=new Map([[o.Open,s.TaskHelpers.isInOpenState],[o.Planning,s.TaskHelpers.isInPlanningState],[o.Closed,s.TaskHelpers.isInClosedState],[o.Invalid,s.TaskHelpers.isInvalid]]);var u=Array.from(e.groupFilter.keys());e.taskToGroupMapper=function(t){var n,i,s=o.General;try{for(var a=r(u),c=a.next();!c.done;c=a.next()){var l=c.value;if(!0===e.groupFilter.get(l)(t)){s=l;break}}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return s},function(t){t.TASK_NOTE="TaskNote"}(e.noteTypes||(e.noteTypes={}));e.defaultExtractor=function(t){return t};e.taskExtractor=function(t){return t.task};e.successExtractor=function(t){return t.success};e.tasksExtractor=function(t){return t.tasks};e.childTasksExtractor=function(t){return t.child_tasks};e.locationExtractor=function(t){return t.data};e.scanCodeExtractor=function(t){return t.scan_string};e.taskIdsExtractor=function(t){return t.task_ids};e.formExtractor=function(t){return t.form},function(t){t.TASK_UPDATE="task update",t.WAYPOINT_ADDED="waypoint added",t.WAYPOINT_DELETED="waypoint deleted",t.WAYPOINT_UPDATED="waypoint updated",t.NEW_SCAN="new scan",t.NEW_NOTE="new note",t.TASK_DELETED="task deleted",t.NEW_TASK="new task"}(e.TaskRealTimeEvents||(e.TaskRealTimeEvents={})),e.baseRoute="/tasks",e.Routes={GET_OPEN_TASKS:e.baseRoute+"/open",GET_PLANNING_TASKS:e.baseRoute+"/planning",GET_INVALID_TASKS:e.baseRoute+"/invalids",GET_TASK:e.baseRoute+"/{:id}",GET_CHILD_TASKS:e.baseRoute+"/{:id}/child_tasks",BATCH_GET_TASK:e.baseRoute+"/batch_get",GET_CLOSED_TASKS_WITH_QUERY:e.baseRoute+"/closed_with_query",UPDATE_TASK:e.baseRoute+"/{:id}",CREATE_TASK:""+e.baseRoute,FINISH_TASK:e.baseRoute+"/{:id}/finish",CANCEL_TASK:e.baseRoute+"/{:id}/cancel",ACKNOWLEDGE_TASK:e.baseRoute+"/acknowledge_task",MASS_TASK_ASSIGN:e.baseRoute+"/mass_assign",MASS_TASK_UNASSIGN:e.baseRoute+"/mass_unassign",MASS_TASK_CANCEL:e.baseRoute+"/mass_cancel",MOVE_TASKS_TO_PLANNING:e.baseRoute+"/mark_not_ready_to_execute",RELEASE_TASKS_TO_DRIVERS:e.baseRoute+"/release",UPDATE_TASK_PREPARATION_STATUS:e.baseRoute+"/update_preparation_status",GET_TASK_LOCATIONS:e.baseRoute+"/{:id}/locations",CANCEL_ALL_OPEN_TASKS:e.baseRoute+"/cancel_all",GET_TASK_ACTIVITY_LOG:e.baseRoute+"/{:id}/history",CHANGE_TASK_TEAM:e.baseRoute+"/{:id}/change_team",UPDATE_TASKS_PRIORITIES:e.baseRoute+"/update_priorities",LOCK_TASK:e.baseRoute+"/lock",UNLOCK_TASK:e.baseRoute+"/unlock",DUPLICATE_TASK:e.baseRoute+"/{:id}/duplicate",RESCHEDULE_CANCELED:e.baseRoute+"/reschedule_cancelled",GET_CLOSED_TASKS_SINCE_TIMESTAMP:e.baseRoute+"/closed_since",GET_PICKUP_QR_CODE:e.baseRoute+"/{:id}/generate_pickup_qr_code",RESCHEDULE_VIRTUAL_TASKS:e.baseRoute+"/reschedule_virtual_tasks",FORM_SUBMIT:e.baseRoute+"/{:id}/way_points/{:way_point_id}/forms",IMPORT_TASKS_CSV:e.baseRoute+"/import_from_csv",BROADCAST_TO_DRIVERS:e.baseRoute+"/broadcast_to_drivers",CREATE_TASK_NOTE:e.baseRoute+"/{:id}/way_points/{:way_point_id}/task_notes",DELETE_WAYPOINT:e.baseRoute+"/{:id}/way_points/{:way_point_id}"}},function(t,e,n){"use strict";n.r(e);var r=n(2),o=n(79),i=n(71),s=n(27),u=n(7),a=n(81),c=n(53),l=n(36),f=n(59),p=n(10),h=n(85),d=n(0),y=n(37),v=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return d.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(y.a),_=n(34),b=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,o=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<o&&(t=n.shift()));if(this.active=!1,e){for(;++r<o&&(t=n.shift());)t.unsubscribe();throw e}},e}(_.a))(v),g=function(t){function e(e,n){void 0===e&&(e=E),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return d.a(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(_.a),E=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var o=t.call(this,e,n)||this;return o.scheduler=e,o.work=n,o.index=r,o.active=!0,o.index=e.index=r,o}return d.a(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var o=new e(this.scheduler,this.work);return this.add(o),o.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var o=t.actions;return o.push(this),o.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0)},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(y.a),w=n(66),T=n(6),m=n(1),O=n(22),S=n(43),R=n(20),A=n(25);function x(t){return!!t&&(t instanceof r.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var P=n(30),C=n(33),I=n(28),k=n(45),N=n(83),D=n(12),U=n(57),M=n(8),L=n(13);function j(t,e,n){if(e){if(!Object(L.a)(e))return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return j(t,n).apply(void 0,r).pipe(Object(D.a)((function(t){return Object(M.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i,s=this,u={context:s,subject:i,callbackFunc:t,scheduler:n};return new r.a((function(r){if(n){var o={args:e,subscriber:r,params:u};return n.schedule(G,0,o)}if(!i){i=new l.a;try{t.apply(s,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.next(t.length<=1?t[0]:t),i.complete()}]))}catch(t){Object(U.a)(i)?i.error(t):console.warn(t)}}return i.subscribe(r)}))}}function G(t){var e=this,n=t.args,r=t.subscriber,o=t.params,i=o.callbackFunc,s=o.context,u=o.scheduler,a=o.subject;if(!a){a=o.subject=new l.a;try{i.apply(s,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length<=1?t[0]:t;e.add(u.schedule(B,0,{value:r,subject:a}))}]))}catch(t){a.error(t)}}this.add(a.subscribe(r))}function B(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function F(t,e,n){if(e){if(!Object(L.a)(e))return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return F(t,n).apply(void 0,r).pipe(Object(D.a)((function(t){return Object(M.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new r.a((function(r){var o=i.context,s=i.subject;if(n)return n.schedule(H,0,{params:i,subscriber:r,context:o});if(!s){s=i.subject=new l.a;try{t.apply(o,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?s.error(n):(s.next(t.length<=1?t[0]:t),s.complete())}]))}catch(t){Object(U.a)(s)?s.error(t):console.warn(t)}}return s.subscribe(r)}))}}function H(t){var e=this,n=t.params,r=t.subscriber,o=t.context,i=n.callbackFunc,s=n.args,u=n.scheduler,a=n.subject;if(!a){a=n.subject=new l.a;try{i.apply(o,s.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(u.schedule(Y,0,{err:r,subject:a}));else{var o=t.length<=1?t[0]:t;e.add(u.schedule(V,0,{value:o,subject:a}))}}]))}catch(t){this.add(u.schedule(Y,0,{err:t,subject:a}))}}this.add(a.subscribe(r))}function V(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function Y(t){var e=t.err;t.subject.error(e)}var W=n(49),K=n(40),q=n(54),z=n(14),Q=n(56),$=n(16);function J(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var n=t[0];if(Object(M.a)(n))return X(n,null);if(Object(Q.a)(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return X(r.map((function(t){return n[t]})),r)}}if("function"==typeof t[t.length-1]){var o=t.pop();return X(t=1===t.length&&Object(M.a)(t[0])?t[0]:t,null).pipe(Object(D.a)((function(t){return o.apply(void 0,t)})))}return X(t,null)}function X(t,e){return new r.a((function(n){var r=t.length;if(0!==r)for(var o=new Array(r),i=0,s=0,u=function(u){var a=Object($.a)(t[u]),c=!1;n.add(a.subscribe({next:function(t){c||(c=!0,s++),o[u]=t},error:function(t){return n.error(t)},complete:function(){++i!==r&&c||(s===r&&n.next(e?e.reduce((function(t,e,n){return t[e]=o[n],t}),{}):o),n.complete())}}))},a=0;a<r;a++)u(a);else n.complete()}))}var Z=n(31);function tt(t,e,n,o){return Object(Z.a)(n)&&(o=n,n=void 0),o?tt(t,e,n).pipe(Object(D.a)((function(t){return Object(M.a)(t)?o.apply(void 0,t):o(t)}))):new r.a((function(r){!function t(e,n,r,o,i){var s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var u=e;e.addEventListener(n,r,i),s=function(){return u.removeEventListener(n,r,i)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var a=e;e.on(n,r),s=function(){return a.off(n,r)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var c=e;e.addListener(n,r),s=function(){return c.removeListener(n,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,f=e.length;l<f;l++)t(e[l],n,r,o,i)}o.add(s)}(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function et(t,e,n){return n?et(t,e).pipe(Object(D.a)((function(t){return Object(M.a)(t)?n.apply(void 0,t):n(t)}))):new r.a((function(n){var r,o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{r=t(o)}catch(t){return void n.error(t)}if(Object(Z.a)(e))return function(){return e(o,r)}}))}function nt(t,e,n,o,i){var s,u;if(1==arguments.length){var a=t;u=a.initialState,e=a.condition,n=a.iterate,s=a.resultSelector||A.a,i=a.scheduler}else void 0===o||Object(L.a)(o)?(u=t,s=A.a,i=o):(u=t,s=o);return new r.a((function(t){var r=u;if(i)return i.schedule(rt,0,{subscriber:t,iterate:n,condition:e,resultSelector:s,state:r});for(;;){if(e){var o=void 0;try{o=e(r)}catch(e){return void t.error(e)}if(!o){t.complete();break}}var a=void 0;try{a=s(r)}catch(e){return void t.error(e)}if(t.next(a),t.closed)break;try{r=n(r)}catch(e){return void t.error(e)}}}))}function rt(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void e.error(t)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state)}catch(t){return void e.error(t)}if(!r)return void e.complete();if(e.closed)return}var o;try{o=t.resultSelector(t.state)}catch(t){return void e.error(t)}if(!e.closed&&(e.next(o),!e.closed))return this.schedule(t)}}function ot(t,e,n){return void 0===e&&(e=z.a),void 0===n&&(n=z.a),Object(q.a)((function(){return t()?e:n}))}var it=n(38);function st(t,e){return void 0===t&&(t=0),void 0===e&&(e=p.a),(!Object(it.a)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=p.a),new r.a((function(n){return n.add(e.schedule(ut,t,{subscriber:n,counter:0,period:t})),n}))}function ut(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}var at=n(78),ct=new r.a(R.a);function lt(){return ct}var ft=n(42);function pt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return z.a;var n=t[0],o=t.slice(1);return 1===t.length&&Object(M.a)(n)?pt.apply(void 0,n):new r.a((function(t){var e=function(){return t.add(pt.apply(void 0,o).subscribe(t))};return Object($.a)(n).subscribe({next:function(e){t.next(e)},error:e,complete:e})}))}function ht(t,e){return e?new r.a((function(n){var r=Object.keys(t),o=new T.a;return o.add(e.schedule(dt,0,{keys:r,index:0,subscriber:n,subscription:o,obj:t})),o})):new r.a((function(e){for(var n=Object.keys(t),r=0;r<n.length&&!e.closed;r++){var o=n[r];t.hasOwnProperty(o)&&e.next([o,t[o]])}e.complete()}))}function dt(t){var e=t.keys,n=t.index,r=t.subscriber,o=t.subscription,i=t.obj;if(!r.closed)if(n<e.length){var s=e[n];r.next([s,i[s]]),o.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:o,obj:i}))}else r.complete()}var yt=n(90),vt=n(46),_t=n(21);function bt(t,e,n){return[Object(_t.a)(e,n)(new r.a(Object(vt.a)(t))),Object(_t.a)(Object(yt.a)(e,n))(new r.a(Object(vt.a)(t)))]}var gt=n(82);function Et(t,e,n){return void 0===t&&(t=0),new r.a((function(r){void 0===e&&(e=t,t=0);var o=0,i=t;if(n)return n.schedule(wt,0,{index:o,count:e,start:t,subscriber:r});for(;;){if(o++>=e){r.complete();break}if(r.next(i++),r.closed)break}}))}function wt(t){var e=t.start,n=t.index,r=t.count,o=t.subscriber;n>=r?o.complete():(o.next(e),o.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var Tt=n(51),mt=n(76);function Ot(t,e){return new r.a((function(n){var r,o;try{r=t()}catch(t){return void n.error(t)}try{o=e(r)}catch(t){return void n.error(t)}var i=(o?Object($.a)(o):z.a).subscribe(n);return function(){i.unsubscribe(),r&&r.unsubscribe()}}))}var St=n(55),Rt=n(84),At=n(18);n.d(e,"Observable",(function(){return r.a})),n.d(e,"ConnectableObservable",(function(){return o.a})),n.d(e,"GroupedObservable",(function(){return i.a})),n.d(e,"observable",(function(){return s.a})),n.d(e,"Subject",(function(){return u.a})),n.d(e,"BehaviorSubject",(function(){return a.a})),n.d(e,"ReplaySubject",(function(){return c.a})),n.d(e,"AsyncSubject",(function(){return l.a})),n.d(e,"asapScheduler",(function(){return f.a})),n.d(e,"asyncScheduler",(function(){return p.a})),n.d(e,"queueScheduler",(function(){return h.a})),n.d(e,"animationFrameScheduler",(function(){return b})),n.d(e,"VirtualTimeScheduler",(function(){return g})),n.d(e,"VirtualAction",(function(){return E})),n.d(e,"Scheduler",(function(){return w.a})),n.d(e,"Subscription",(function(){return T.a})),n.d(e,"Subscriber",(function(){return m.a})),n.d(e,"Notification",(function(){return O.a})),n.d(e,"NotificationKind",(function(){return O.b})),n.d(e,"pipe",(function(){return S.a})),n.d(e,"noop",(function(){return R.a})),n.d(e,"identity",(function(){return A.a})),n.d(e,"isObservable",(function(){return x})),n.d(e,"ArgumentOutOfRangeError",(function(){return P.a})),n.d(e,"EmptyError",(function(){return C.a})),n.d(e,"ObjectUnsubscribedError",(function(){return I.a})),n.d(e,"UnsubscriptionError",(function(){return k.a})),n.d(e,"TimeoutError",(function(){return N.a})),n.d(e,"bindCallback",(function(){return j})),n.d(e,"bindNodeCallback",(function(){return F})),n.d(e,"combineLatest",(function(){return W.b})),n.d(e,"concat",(function(){return K.a})),n.d(e,"defer",(function(){return q.a})),n.d(e,"empty",(function(){return z.b})),n.d(e,"forkJoin",(function(){return J})),n.d(e,"from",(function(){return $.a})),n.d(e,"fromEvent",(function(){return tt})),n.d(e,"fromEventPattern",(function(){return et})),n.d(e,"generate",(function(){return nt})),n.d(e,"iif",(function(){return ot})),n.d(e,"interval",(function(){return st})),n.d(e,"merge",(function(){return at.a})),n.d(e,"never",(function(){return lt})),n.d(e,"of",(function(){return ft.a})),n.d(e,"onErrorResumeNext",(function(){return pt})),n.d(e,"pairs",(function(){return ht})),n.d(e,"partition",(function(){return bt})),n.d(e,"race",(function(){return gt.a})),n.d(e,"range",(function(){return Et})),n.d(e,"throwError",(function(){return Tt.a})),n.d(e,"timer",(function(){return mt.a})),n.d(e,"using",(function(){return Ot})),n.d(e,"zip",(function(){return St.b})),n.d(e,"scheduled",(function(){return Rt.a})),n.d(e,"EMPTY",(function(){return z.a})),n.d(e,"NEVER",(function(){return ct})),n.d(e,"config",(function(){return At.a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(2),o=n(10),i=n(38),s=n(13);function u(t,e,n){void 0===t&&(t=0);var u=-1;return Object(i.a)(e)?u=Number(e)<1?1:Number(e):Object(s.a)(e)&&(n=e),Object(s.a)(n)||(n=o.a),new r.a((function(e){var r=Object(i.a)(t)?t:+t-n.now();return n.schedule(a,r,{index:0,period:u,subscriber:e})}))}function a(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(50);function o(){return Object(r.a)(1)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(2),o=n(13),i=n(50),s=n(35);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,u=null,a=t[t.length-1];return Object(o.a)(a)?(u=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof a&&(n=t.pop()),null===u&&1===t.length&&t[0]instanceof r.a?t[0]:Object(i.a)(n)(Object(s.a)(t,u))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l}));var r=n(0),o=n(7),i=n(2),s=n(1),u=n(6),a=n(52),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.a(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new u.a).add(this.source.subscribe(new f(this.getSubject(),this))),t.closed&&(this._connection=null,t=u.a.EMPTY)),t},e.prototype.refCount=function(){return Object(a.a)()(this)},e}(i.a),l=function(){var t=c.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(o.b);s.a},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return a}));var r=n(0),o=n(1),i=n(22);function s(t,e){return void 0===e&&(e=0),function(n){return n.lift(new u(t,e))}}var u=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.scheduler,this.delay))},t}(),a=function(t){function e(e,n,r){void 0===r&&(r=0);var o=t.call(this,e)||this;return o.scheduler=n,o.delay=r,o}return r.a(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(i.a.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(i.a.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(i.a.createComplete()),this.unsubscribe()},e}(o.a),c=function(){return function(t,e){this.notification=t,this.destination=e}}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(0),o=n(7),i=n(28),s=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.a(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new i.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(0),o=n(8),i=n(35),s=n(4),u=n(3);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!Object(o.a)(t[0]))return t[0];t=t[0]}return Object(i.a)(t,void 0).lift(new c)}var c=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new l(t))},t}(),l=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.a(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],o=Object(u.a)(this,r,r,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,r,o){if(!this.hasFirst){this.hasFirst=!0;for(var i=0;i<this.subscriptions.length;i++)if(i!==n){var s=this.subscriptions[i];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)},e}(s.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){"use strict";var r=n(2),o=n(6),i=n(27);var s=n(58),u=n(26);var a=n(88),c=n(86);function l(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[i.a]}(t))return function(t,e){return new r.a((function(n){var r=new o.a;return r.add(e.schedule((function(){var o=t[i.a]();r.add(o.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r}))}(t,e);if(Object(a.a)(t))return function(t,e){return new r.a((function(n){var r=new o.a;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r}))}(t,e);if(Object(c.a)(t))return Object(s.a)(t,e);if(function(t){return t&&"function"==typeof t[u.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.a((function(n){var r,i=new o.a;return i.add((function(){r&&"function"==typeof r.return&&r.return()})),i.add(e.schedule((function(){r=t[u.a](),i.add(e.schedule((function(){if(!n.closed){var t,e;try{var o=r.next();t=o.value,e=o.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),i}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}n.d(e,"a",(function(){return l}))},function(t,e,n){"use strict";var r=n(0),o=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.a(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(37).a),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e}(n(34).a);n.d(e,"a",(function(){return s}));var s=new i(o)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()}}},function(t,e,n){"use strict";function r(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(0),o=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.a(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(6).a)},function(t,e,n){"use strict";function r(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.AnonymousServiceRequest=e.AuthorizedServiceRequest=e.ResponseHandler=e.RequestOptions=e.logErrorResponse=void 0;var s=n(146),u=n(39),a=n(11),c=n(15);e.logErrorResponse=function(t){var e=t.data,n=t.status;try{u.default.error(t.config.method.toUpperCase(),t.config.url,n)}catch(t){}try{u.default.info(t.config.method.toUpperCase(),t.config.url,n,e)}catch(t){}try{u.default.debug(t)}catch(t){}};var l=function(){function t(t,e,n,o,i){this.headers=r(r({"Content-Type":"application/json"},i),{"sdk-version":"0.5.13",Client:t}),this.timeout=e,this.validateStatus=a.stubTrue,n&&(this.params=n),o&&(this.headers.Authorization="Token token="+o)}return t.new=function(e){var n=void 0===e?{}:e,r=n.clientId,o=void 0===r?"Bringg Dashboard":r,i=n.timeout,s=void 0===i?12e4:i,u=n.queryString,a=void 0===u?void 0:u,c=n.authenticationToken,l=void 0===c?void 0:c,f=n.headers;return new t(o,s,a,l,void 0===f?void 0:f)},t}();e.RequestOptions=l;var f=function(){function t(t){this.axiosPromise=t}return t.prototype.handle=function(t){return o(this,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:if(a.isUndefined(t))throw new Error("consumer must be defined");r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.axiosPromise];case 2:return e=r.sent(),[2,t(e)];case 3:if((n=r.sent())instanceof c.BringgException)throw n;return[2,t(n)];case 4:return[2]}}))}))},t}();function p(t,e,n,r,o,i){switch(n.httpMethod){case 0:return function(t,e,n,r){return new f(t.get(""+e+n,{params:r}))}(t,e.encode(),n.applyParams(r),o);case 1:return function(t,e,n,r,o){return new f(t.post(""+e+n,o,{params:r}))}(t,e.encode(),n.applyParams(r),o,i);case 2:return function(t,e,n,r,o){return new f(t.put(""+e+n,o,{params:r}))}(t,e.encode(),n.applyParams(r),o,i);case 3:return function(t,e,n,r,o){return new f(t.patch(""+e+n,o,{params:r}))}(t,e.encode(),n.applyParams(r),o,i);case 4:return function(t,e,n,r,o){return new f(t.delete(""+e+n,{params:r,data:o}))}(t,e.encode(),n.applyParams(r),o,i)}}function h(t){return t.interceptors.request.use((function(t){var e=t.method,n=t.url,r=t.params,o=t.headers,i=t.data;try{u.default.debug("REQUEST:",e.toUpperCase(),n)}catch(t){}try{u.default.trace("REQUEST-query-string:",r),u.default.trace("REQUEST-headers:",o),u.default.trace("REQUEST-data:",i)}catch(t){}return t})),t.interceptors.response.use((function(t){var e=t.statusText,n=t.status,r=t.headers,o=t.data;try{u.default.debug("RESPONSE:",t.config.url,n,e)}catch(t){}try{u.default.trace("RESPONSE-headers:",r),u.default.trace("RESPONSE-data:",o)}catch(t){}return t})),t}e.ResponseHandler=f;var d=function(){function t(t,e){this.authToken=e,this.clientId=t}return t.prototype.invoke=function(t,e,n,r,o,i){return p(function(t,e,n){return h(s.default.create(l.new({clientId:t,authenticationToken:e,headers:n})))}(this.clientId,this.authToken,i),t,e,n,r,o)},t}();e.AuthorizedServiceRequest=d;var y=function(){function t(t){this.clientId=t}return t.prototype.invoke=function(t,e,n,r,o){return p((i=this.clientId,h(s.default.create(l.new({clientId:i,headers:u})))),t,e,n,r,o);var i,u},t}();e.AnonymousServiceRequest=y},function(t,e,n){const r=n(62),o=n(93),i=n(32)("engine.io-client:transport");t.exports=class extends o{constructor(t){super(),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,e){const n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this}open(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState?this.write(t):i("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,this.emit("open")}onData(t){const e=r.decodePacket(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){this.emit("packet",t)}onClose(){this.readyState="closed",this.emit("close")}}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=n(188),o=n(189),i=n(127),s=n(32)("socket.io-parser");var u;e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(u=e.PacketType||(e.PacketType={}));e.Encoder=class{encode(t){return s("encoding packet %j",t),t.type!==u.EVENT&&t.type!==u.ACK||!i.hasBinary(t)?[this.encodeAsString(t)]:(t.type=t.type===u.EVENT?u.BINARY_EVENT:u.BINARY_ACK,this.encodeAsBinary(t))}encodeAsString(t){let e=""+t.type;return t.type!==u.BINARY_EVENT&&t.type!==u.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data)),s("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=o.deconstructPacket(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}};class a extends r{constructor(){super()}add(t){let e;if("string"==typeof t)e=this.decodeString(t),e.type===u.BINARY_EVENT||e.type===u.BINARY_ACK?(this.reconstructor=new c(e),0===e.attachments&&super.emit("decoded",e)):super.emit("decoded",e);else{if(!i.isBinary(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emit("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===u[n.type])throw new Error("unknown packet type "+n.type);if(n.type===u.BINARY_EVENT||n.type===u.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const o=t.substring(r,e);if(o!=Number(o)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(o)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(e));if(!a.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return s("decoded %s as %j",t,n),n}static isPayloadValid(t,e){switch(t){case u.CONNECT:return"object"==typeof e;case u.DISCONNECT:return void 0===e;case u.CONNECT_ERROR:return"string"==typeof e||"object"==typeof e;case u.EVENT:case u.BINARY_EVENT:return Array.isArray(e)&&e.length>0;case u.ACK:case u.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}e.Decoder=a;class c{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=o.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(24),s=n(70),u=function(t){function e(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.entityName=n,r.routeGenerator=new s.default(r),r}return o(e,t),e}(i.SessionBasedService);e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(131),s=n(132),u=n(99),a=n(100),c=n(98),l=n(133),f=function(t){function e(n,r,o){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=s.empty;break;case 1:if(!n){i.destination=s.empty;break}if("object"==typeof n){n instanceof e?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new p(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new p(i,n,r,o)}return i}return o(e,t),e.prototype[a.rxSubscriber]=function(){return this},e.create=function(t,n,r){var o=new e(t,n,r);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(u.Subscription);e.Subscriber=f;var p=function(t){function e(e,n,r,o){var u,a=t.call(this)||this;a._parentSubscriber=e;var c=a;return i.isFunction(n)?u=n:n&&(u=n.next,r=n.error,o=n.complete,n!==s.empty&&(c=Object.create(n),i.isFunction(c.unsubscribe)&&a.add(c.unsubscribe.bind(c)),c.unsubscribe=a.unsubscribe.bind(a))),a._context=c,a._next=u,a._error=r,a._complete=o,a}return o(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;c.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=c.config.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):l.hostReportError(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;l.hostReportError(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};c.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),c.config.useDeprecatedSynchronousErrorHandling)throw t;l.hostReportError(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!c.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return c.config.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(l.hostReportError(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(f);e.SafeSubscriber=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=!1;e.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else r&&console.log("RxJS: Back to a better error behavior. Thank you. <3");r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(201),o=n(202),i=n(131),s=n(203),u=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n=this._parentOrParents,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(var l=0;l<n.length;++l){n[l].remove(this)}if(i.isFunction(u))try{u.call(this)}catch(t){e=t instanceof s.UnsubscriptionError?a(t.errors):[t]}if(r.isArray(c)){l=-1;for(var f=c.length;++l<f;){var p=c[l];if(o.isObject(p))try{p.unsubscribe()}catch(t){e=e||[],t instanceof s.UnsubscriptionError?e=e.concat(a(t.errors)):e.push(t)}}}if(e)throw new s.UnsubscriptionError(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof t){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=((e=new t).closed=!0,e),t}();function a(t){return t.reduce((function(t,e){return t.concat(e instanceof s.UnsubscriptionError?e.errors:e)}),[])}e.Subscription=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),e.$$rxSubscriber=e.rxSubscriber},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskHelpers=void 0;var r=n(11),o=n(64),i=n(74),s=function(){function t(){}return t.isReadyToExecute=function(t){return t.ready_to_execute},t.isTaskInOpenState=function(t){return r.includes(i.OPEN_TASK_STATUES,t.status)},t.isDone=function(t){return r.includes(i.DONE_TASK_STATUES,t.status)},t.isGroupFollower=function(t){return Boolean(t.group_leader_id)},t.isUnacknowledged=function(t){return t.status===o.TaskStatus.Unacknowledged},t.isLate=function(t){return t.late},t.isInOpenState=function(e){return t.isTaskInOpenState(e)&&t.isReadyToExecute(e)},t.isInPlanningState=function(e){return t.isTaskInOpenState(e)&&!t.isReadyToExecute(e)},t.isInClosedState=function(e){return t.isDone(e)},t.isInvalid=function(t){return!0===t.invalidated},t}();e.TaskHelpers=s},function(t,e,n){"use strict";var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.userToGroupMapper=e.groupFilter=e.GROUP_VALUES=e.UserEvents=e.successExtractor=e.countExtractor=e.usersExtractor=e.userExtractor=e.defaultExtractor=e.UsersScopes=void 0;var o=n(350);!function(t){t.DRIVERS="drivers",t.DISPATCHERS="dispatchers",t.ADMINS="admins",t.CUSTOMERS="customers",t.MARKED_AS_ONLINE="marked_as_online"}(e.UsersScopes||(e.UsersScopes={}));e.defaultExtractor=function(t){return t};e.userExtractor=function(t){return t.user};e.usersExtractor=function(t){return t.users};e.countExtractor=function(t){return t.count};var i;e.successExtractor=function(t){return t.success},function(t){t.CURRENT_USER_UPDATED="currentUserUpdated"}(e.UserEvents||(e.UserEvents={})),function(t){t.OfflineDrivers="OfflineDrivers",t.OnlineDrivers="OnlineDrivers",t.OnShiftDrivers="OnShiftDrivers",t.Customers="Customers",t.Admins="Admins",t.Dispatchers="Dispatchers"}(i=e.GROUP_VALUES||(e.GROUP_VALUES={})),e.groupFilter=new Map([[i.OfflineDrivers,o.UserHelpers.isOfflineDriver],[i.OnlineDrivers,o.UserHelpers.isOnlineDriver],[i.OnShiftDrivers,o.UserHelpers.isOnShiftDriver],[i.Customers,o.UserHelpers.isCustomer],[i.Admins,o.UserHelpers.isAdmin],[i.Dispatchers,o.UserHelpers.isDispatcher]]);var s=Array.from(e.groupFilter.keys());e.userToGroupMapper=function(t){var n,o;try{for(var i=r(s),u=i.next();!u.done;u=i.next()){var a=u.value;if(!0===e.groupFilter.get(a)(t))return a}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KEYSET_PAGINATION_VER=e.KeysetPaginationPageAction=void 0,function(t){t.NEXT="next",t.PREVIOUS="previous"}(e.KeysetPaginationPageAction||(e.KeysetPaginationPageAction={})),e.KEYSET_PAGINATION_VER=2},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.RESEND_CONFIRMATION_EMAIL_ROUTE=e.UNWIND_ROUTE=e.IMPERSONATE_BY_TEAM_ROUTE=e.IMPERSONATE_ROUTE=e.SWITCH_ROUTE=e.LOGOUT_ROUTE=e.GET_USER_ROUTE=e.CREATE_TOKEN_ROUTE=void 0;var i=n(67),s=n(68),u=n(91),a=n(166),c=n(19),l=n(15),f=n(47),p=n(167),h=n(11),d=n(61);e.CREATE_TOKEN_ROUTE=new c.Route("/tokens",1),e.GET_USER_ROUTE=new c.Route("/tokens",0),e.LOGOUT_ROUTE=new c.Route("/tokens",4),e.SWITCH_ROUTE=new c.Route("/tokens/switch_accounts",1),e.IMPERSONATE_ROUTE=new c.Route("/tokens/impersonate",1),e.IMPERSONATE_BY_TEAM_ROUTE=new c.Route("/support/impersonate",1),e.UNWIND_ROUTE=new c.Route("/tokens/unwind_impersonate",1),e.RESEND_CONFIRMATION_EMAIL_ROUTE=new c.Route("/tokens/resend_confirmation_email",1);var y=function(){function t(t,e){this.clientId=t,this.endpoint=e}return t.init=function(e){return new t(d.BringgDashboardSDK.configurationProvider.getClientId(),e?s.default.parse(d.BringgDashboardSDK.configurationProvider.getAuthenticationEndpoint(e)):s.default.parse(d.BringgDashboardSDK.configurationProvider.getRegionDiscoveryEndpoint()))},t.isRecaptchaNeeded=function(t){return"recaptcha_stoken"in t},t.isRegionInformationNeeded=function(t){return"merchants_data"in t},t.prototype.loginWithSessionCode=function(t,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.CREATE_TOKEN_ROUTE,{},void 0,{code:t,session:n}).handle((function(t){var e=t.data,n=t.status;if(n===i.HttpStatusCode.UNAUTHORIZED)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(n),"Invalid session or code");if(n===i.HttpStatusCode.OK)return new a.default(e);throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(n),t.statusText)}))];case 1:return[2,r.sent()]}}))}))},t.prototype.loginWithEmail=function(n,s,c,d,y){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.CREATE_TOKEN_ROUTE,{},void 0,{email:p(h.toLower(n)).toString(),password:s,merchant_uuid:c,remember_me:!0,recaptcha:d,recaptcha_qa_token:y}).handle((function(e){var n=e.message,r=e,o=r.data,s=r.status;if(h.isUndefined(s)||s===i.HttpStatusCode.NOT_FOUND||s===i.HttpStatusCode.INTERNAL_SERVER_ERROR)throw new l.BringgException(f.ExceptionReason.fromHttpStatusCode(s),i.REGION_NOT_WORKING,new Error(n));if(s===i.HttpStatusCode.UNAUTHORIZED){if(u.logErrorResponse(e),o.resend_confirmation_available)throw new l.BringgException(f.ExceptionReason.fromHttpStatusCode(s),"User is blocked",null,o);throw new l.BringgException(f.ExceptionReason.fromHttpStatusCode(s),"Invalid user name or password")}if(s===i.HttpStatusCode.LOCKED||t.isRecaptchaNeeded(o))throw u.logErrorResponse(e),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.LOCKED),"Recaptcha validation needed",null,o.recaptcha_stoken);if(s===i.HttpStatusCode.FAILED_DEPENDENCY||t.isRegionInformationNeeded(o))throw new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.FAILED_DEPENDENCY),"Merchant and region information needed",null,o.merchants_data);if(s===i.HttpStatusCode.OK)return new a.default(o);throw u.logErrorResponse(e),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(s),e.statusText)}))];case 1:return[2,r.sent()]}}))}))},t.prototype.loginWithToken=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.GET_USER_ROUTE,null,{auth_token:t}).handle((function(t){var e=t.data,n=t.status;if(n!==i.HttpStatusCode.OK)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(n),n===i.HttpStatusCode.FORBIDDEN||n===i.HttpStatusCode.UNAUTHORIZED?"Unauthorized":"Temporary unavailable");return new a.default(e)}))];case 1:return[2,n.sent()]}}))}))},t.prototype.logout=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.LOGOUT_ROUTE,null,{auth_token:t}).handle((function(t){var e=t.data;if(t.status!==i.HttpStatusCode.OK||!e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),"Unable to logout");return e.success}))];case 1:return[2,n.sent()]}}))}))},t.prototype.switchAccounts=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.SWITCH_ROUTE,null,{auth_token:t}).handle((function(t){var e=t.data;if(t.status!==i.HttpStatusCode.OK||!e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),"Unable to switch accounts");return new a.default(e.user)}))];case 1:return[2,n.sent()]}}))}))},t.prototype.unwind=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.UNWIND_ROUTE,null,{auth_token:t}).handle((function(t){var e=t.data,n=t.status;if(n!==i.HttpStatusCode.OK||!1===e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),n!==i.HttpStatusCode.OK?"Unable to return to original user":"Not in impersonation mode");return new a.default(e)}))];case 1:return[2,n.sent()]}}))}))},t.prototype.impersonate=function(t,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.IMPERSONATE_ROUTE,null,{auth_token:t,user_id:n}).handle((function(t){var e=t.data;if(t.status!==i.HttpStatusCode.OK||!1===e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),"Unable to impersonate requested account");return e.enable_logs=!0,e.beta=!0,e.debug=!0,new a.default(e)}))];case 1:return[2,r.sent()]}}))}))},t.prototype.impersonateByTeam=function(t,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.IMPERSONATE_BY_TEAM_ROUTE,null,{team_id:n},{auth_token:t}).handle((function(t){var e=t.data;if(t.status!==i.HttpStatusCode.OK||!e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),"Unable to impersonate requested team");return new a.default(e.user)}))];case 1:return[2,r.sent()]}}))}))},t.prototype.resendConfirmationEmail=function(t,n,s,a,c){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.RESEND_CONFIRMATION_EMAIL_ROUTE,null,null,{email:p(h.toLower(t)).toString(),password:n,merchant_uuid:s,recaptcha:a,recaptcha_qa_token:c}).handle((function(t){var e=t.data;if(t.status!==i.HttpStatusCode.OK||!e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),"Unable to resend confirmation email");return!0}))];case 1:return[2,r.sent()]}}))}))},t}();e.default=y},function(t,e){var n={};n[e.ACCEPTED=202]="Accepted",n[e.BAD_GATEWAY=502]="Bad Gateway",n[e.BAD_REQUEST=400]="Bad Request",n[e.CONFLICT=409]="Conflict",n[e.CONTINUE=100]="Continue",n[e.CREATED=201]="Created",n[e.EXPECTATION_FAILED=417]="Expectation Failed",n[e.FAILED_DEPENDENCY=424]="Failed Dependency",n[e.FORBIDDEN=403]="Forbidden",n[e.GATEWAY_TIMEOUT=504]="Gateway Timeout",n[e.GONE=410]="Gone",n[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP Version Not Supported",n[e.IM_A_TEAPOT=418]="I'm a teapot",n[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="Insufficient Space on Resource",n[e.INSUFFICIENT_STORAGE=507]="Insufficient Storage",n[e.INTERNAL_SERVER_ERROR=500]="Server Error",n[e.LENGTH_REQUIRED=411]="Length Required",n[e.LOCKED=423]="Locked",n[e.METHOD_FAILURE=420]="Method Failure",n[e.METHOD_NOT_ALLOWED=405]="Method Not Allowed",n[e.MOVED_PERMANENTLY=301]="Moved Permanently",n[e.MOVED_TEMPORARILY=302]="Moved Temporarily",n[e.MULTI_STATUS=207]="Multi-Status",n[e.MULTIPLE_CHOICES=300]="Multiple Choices",n[e.NETWORK_AUTHENTICATION_REQUIRED=511]="Network Authentication Required",n[e.NO_CONTENT=204]="No Content",n[e.NON_AUTHORITATIVE_INFORMATION=203]="Non Authoritative Information",n[e.NOT_ACCEPTABLE=406]="Not Acceptable",n[e.NOT_FOUND=404]="Not Found",n[e.NOT_IMPLEMENTED=501]="Not Implemented",n[e.NOT_MODIFIED=304]="Not Modified",n[e.OK=200]="OK",n[e.PARTIAL_CONTENT=206]="Partial Content",n[e.PAYMENT_REQUIRED=402]="Payment Required",n[e.PERMANENT_REDIRECT=308]="Permanent Redirect",n[e.PRECONDITION_FAILED=412]="Precondition Failed",n[e.PRECONDITION_REQUIRED=428]="Precondition Required",n[e.PROCESSING=102]="Processing",n[e.PROXY_AUTHENTICATION_REQUIRED=407]="Proxy Authentication Required",n[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="Request Header Fields Too Large",n[e.REQUEST_TIMEOUT=408]="Request Timeout",n[e.REQUEST_TOO_LONG=413]="Request Entity Too Large",n[e.REQUEST_URI_TOO_LONG=414]="Request-URI Too Long",n[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="Requested Range Not Satisfiable",n[e.RESET_CONTENT=205]="Reset Content",n[e.SEE_OTHER=303]="See Other",n[e.SERVICE_UNAVAILABLE=503]="Service Unavailable",n[e.SWITCHING_PROTOCOLS=101]="Switching Protocols",n[e.TEMPORARY_REDIRECT=307]="Temporary Redirect",n[e.TOO_MANY_REQUESTS=429]="Too Many Requests",n[e.UNAUTHORIZED=401]="Unauthorized",n[e.UNPROCESSABLE_ENTITY=422]="Unprocessable Entity",n[e.UNSUPPORTED_MEDIA_TYPE=415]="Unsupported Media Type",n[e.USE_PROXY=305]="Use Proxy",e.getStatusText=function(t){if(n.hasOwnProperty(t))return n[t];throw new Error("Status code does not exist: "+t)}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(23);function o(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var s=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(o(e)+"="+o(t))})))})),i=s.join("&")}if(i){var u=t.indexOf("#");-1!==u&&(t=t.slice(0,u)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";(function(e){var r=n(23),o=n(152),i={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,a={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==e&&"[object process]"===Object.prototype.toString.call(e))&&(u=n(112)),u),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(t){a.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){a.headers[t]=r.merge(i)})),t.exports=a}).call(this,n(111))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var a,c=[],l=!1,f=-1;function p(){l&&a&&(l=!1,a.length?c=a.concat(c):f=-1,c.length&&h())}function h(){if(!l){var t=u(p);l=!0;for(var e=c.length;e;){for(a=c,c=[];++f<e;)a&&a[f].run();f=-1,e=c.length}a=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||u(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(23),o=n(153),i=n(155),s=n(108),u=n(156),a=n(159),c=n(160),l=n(113);t.exports=function(t){return new Promise((function(e,n){var f=t.data,p=t.headers;r.isFormData(f)&&delete p["Content-Type"];var h=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",y=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";p.Authorization="Basic "+btoa(d+":"+y)}var v=u(t.baseURL,t.url);if(h.open(t.method.toUpperCase(),s(v,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,i={data:t.responseType&&"text"!==t.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:t,request:h};o(e,n,i),h=null}},h.onabort=function(){h&&(n(l("Request aborted",t,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(l("Network Error",t,null,h)),h=null},h.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var _=(t.withCredentials||c(v))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;_&&(p[t.xsrfHeaderName]=_)}if("setRequestHeader"in h&&r.forEach(p,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete p[e]:h.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(h.withCredentials=!!t.withCredentials),t.responseType)try{h.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){h&&(h.abort(),n(t),h=null)})),f||(f=null),h.send(f)}))}},function(t,e,n){"use strict";var r=n(154);t.exports=function(t,e,n,o,i){var s=new Error(t);return r(s,e,n,o,i)}},function(t,e,n){"use strict";var r=n(23);t.exports=function(t,e){e=e||{};var n={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],u=["validateStatus"];function a(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function c(o){r.isUndefined(e[o])?r.isUndefined(t[o])||(n[o]=a(void 0,t[o])):n[o]=a(t[o],e[o])}r.forEach(o,(function(t){r.isUndefined(e[t])||(n[t]=a(void 0,e[t]))})),r.forEach(i,c),r.forEach(s,(function(o){r.isUndefined(e[o])?r.isUndefined(t[o])||(n[o]=a(void 0,t[o])):n[o]=a(void 0,e[o])})),r.forEach(u,(function(r){r in e?n[r]=a(t[r],e[r]):r in t&&(n[r]=a(void 0,t[r]))}));var l=o.concat(i).concat(s).concat(u),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===l.indexOf(t)}));return r.forEach(f,c),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";(function(t){
|
|
24
|
+
*/(function(){var i="Expected a function",s="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],a="[object Arguments]",c="[object Array]",l="[object Boolean]",f="[object Date]",p="[object Error]",h="[object Function]",d="[object GeneratorFunction]",y="[object Map]",v="[object Number]",_="[object Object]",b="[object RegExp]",E="[object Set]",g="[object String]",w="[object Symbol]",T="[object WeakMap]",m="[object ArrayBuffer]",O="[object DataView]",S="[object Float32Array]",R="[object Float64Array]",A="[object Int8Array]",x="[object Int16Array]",P="[object Int32Array]",C="[object Uint8Array]",I="[object Uint16Array]",k="[object Uint32Array]",N=/\b__p \+= '';/g,D=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,M=/&(?:amp|lt|gt|quot|#39);/g,L=/[&<>"']/g,j=RegExp(M.source),G=RegExp(L.source),B=/<%-([\s\S]+?)%>/g,F=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K=/[\\^$.*+?()[\]{}|]/g,q=RegExp(K.source),z=/^\s+/,Q=/\s/,$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,J=/\{\n\/\* \[wrapped with (.+)\] \*/,X=/,? & /,Z=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,ot=/^[-+]0x[0-9a-f]+$/i,it=/^0b[01]+$/i,st=/^\[object .+?Constructor\]$/,ut=/^0o[0-7]+$/i,at=/^(?:0|[1-9]\d*)$/,ct=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,lt=/($^)/,ft=/['\n\r\u2028\u2029\\]/g,pt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ht="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dt="[\\ud800-\\udfff]",yt="["+ht+"]",vt="["+pt+"]",_t="\\d+",bt="[\\u2700-\\u27bf]",Et="[a-z\\xdf-\\xf6\\xf8-\\xff]",gt="[^\\ud800-\\udfff"+ht+_t+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",wt="\\ud83c[\\udffb-\\udfff]",Tt="[^\\ud800-\\udfff]",mt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ot="[\\ud800-\\udbff][\\udc00-\\udfff]",St="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Rt="(?:"+Et+"|"+gt+")",At="(?:"+St+"|"+gt+")",xt="(?:"+vt+"|"+wt+")"+"?",Pt="[\\ufe0e\\ufe0f]?"+xt+("(?:\\u200d(?:"+[Tt,mt,Ot].join("|")+")[\\ufe0e\\ufe0f]?"+xt+")*"),Ct="(?:"+[bt,mt,Ot].join("|")+")"+Pt,It="(?:"+[Tt+vt+"?",vt,mt,Ot,dt].join("|")+")",kt=RegExp("['’]","g"),Nt=RegExp(vt,"g"),Dt=RegExp(wt+"(?="+wt+")|"+It+Pt,"g"),Ut=RegExp([St+"?"+Et+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[yt,St,"$"].join("|")+")",At+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[yt,St+Rt,"$"].join("|")+")",St+"?"+Rt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",St+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_t,Ct].join("|"),"g"),Mt=RegExp("[\\u200d\\ud800-\\udfff"+pt+"\\ufe0e\\ufe0f]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Gt=-1,Bt={};Bt[S]=Bt[R]=Bt[A]=Bt[x]=Bt[P]=Bt[C]=Bt["[object Uint8ClampedArray]"]=Bt[I]=Bt[k]=!0,Bt[a]=Bt[c]=Bt[m]=Bt[l]=Bt[O]=Bt[f]=Bt[p]=Bt[h]=Bt[y]=Bt[v]=Bt[_]=Bt[b]=Bt[E]=Bt[g]=Bt[T]=!1;var Ft={};Ft[a]=Ft[c]=Ft[m]=Ft[O]=Ft[l]=Ft[f]=Ft[S]=Ft[R]=Ft[A]=Ft[x]=Ft[P]=Ft[y]=Ft[v]=Ft[_]=Ft[b]=Ft[E]=Ft[g]=Ft[w]=Ft[C]=Ft["[object Uint8ClampedArray]"]=Ft[I]=Ft[k]=!0,Ft[p]=Ft[h]=Ft[T]=!1;var Ht={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,Yt=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Kt="object"==typeof self&&self&&self.Object===Object&&self,qt=Wt||Kt||Function("return this")(),zt=e&&!e.nodeType&&e,Qt=zt&&"object"==typeof r&&r&&!r.nodeType&&r,$t=Qt&&Qt.exports===zt,Jt=$t&&Wt.process,Xt=function(){try{var t=Qt&&Qt.require&&Qt.require("util").types;return t||Jt&&Jt.binding&&Jt.binding("util")}catch(t){}}(),Zt=Xt&&Xt.isArrayBuffer,te=Xt&&Xt.isDate,ee=Xt&&Xt.isMap,ne=Xt&&Xt.isRegExp,re=Xt&&Xt.isSet,oe=Xt&&Xt.isTypedArray;function ie(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function se(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var s=t[o];e(r,s,n(s),t)}return r}function ue(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function ae(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ce(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function le(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}function fe(t,e){return!!(null==t?0:t.length)&&we(t,e,0)>-1}function pe(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function he(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function de(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function ye(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function ve(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function _e(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var be=Se("length");function Ee(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function ge(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function we(t,e,n){return e==e?function(t,e,n){var r=n-1,o=t.length;for(;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):ge(t,me,n)}function Te(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function me(t){return t!=t}function Oe(t,e){var n=null==t?0:t.length;return n?xe(t,e)/n:NaN}function Se(t){return function(e){return null==e?void 0:e[t]}}function Re(t){return function(e){return null==t?void 0:t[e]}}function Ae(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function xe(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}function Pe(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ce(t){return t?t.slice(0,ze(t)+1).replace(z,""):t}function Ie(t){return function(e){return t(e)}}function ke(t,e){return he(e,(function(e){return t[e]}))}function Ne(t,e){return t.has(e)}function De(t,e){for(var n=-1,r=t.length;++n<r&&we(e,t[n],0)>-1;);return n}function Ue(t,e){for(var n=t.length;n--&&we(e,t[n],0)>-1;);return n}function Me(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Le=Re({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),je=Re({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ge(t){return"\\"+Ht[t]}function Be(t){return Mt.test(t)}function Fe(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function He(t,e){return function(n){return t(e(n))}}function Ve(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==s||(t[n]=s,i[o++]=n)}return i}function Ye(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function We(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function Ke(t){return Be(t)?function(t){var e=Dt.lastIndex=0;for(;Dt.test(t);)++e;return e}(t):be(t)}function qe(t){return Be(t)?function(t){return t.match(Dt)||[]}(t):function(t){return t.split("")}(t)}function ze(t){for(var e=t.length;e--&&Q.test(t.charAt(e)););return e}var Qe=Re({"&":"&","<":"<",">":">",""":'"',"'":"'"});var $e=function t(e){var n,r=(e=null==e?qt:$e.defaults(qt.Object(),e,$e.pick(qt,jt))).Array,o=e.Date,Q=e.Error,pt=e.Function,ht=e.Math,dt=e.Object,yt=e.RegExp,vt=e.String,_t=e.TypeError,bt=r.prototype,Et=pt.prototype,gt=dt.prototype,wt=e["__core-js_shared__"],Tt=Et.toString,mt=gt.hasOwnProperty,Ot=0,St=(n=/[^.]+$/.exec(wt&&wt.keys&&wt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Rt=gt.toString,At=Tt.call(dt),xt=qt._,Pt=yt("^"+Tt.call(mt).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ct=$t?e.Buffer:void 0,It=e.Symbol,Dt=e.Uint8Array,Mt=Ct?Ct.allocUnsafe:void 0,Ht=He(dt.getPrototypeOf,dt),Wt=dt.create,Kt=gt.propertyIsEnumerable,zt=bt.splice,Qt=It?It.isConcatSpreadable:void 0,Jt=It?It.iterator:void 0,Xt=It?It.toStringTag:void 0,be=function(){try{var t=ei(dt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Re=e.clearTimeout!==qt.clearTimeout&&e.clearTimeout,Je=o&&o.now!==qt.Date.now&&o.now,Xe=e.setTimeout!==qt.setTimeout&&e.setTimeout,Ze=ht.ceil,tn=ht.floor,en=dt.getOwnPropertySymbols,nn=Ct?Ct.isBuffer:void 0,rn=e.isFinite,on=bt.join,sn=He(dt.keys,dt),un=ht.max,an=ht.min,cn=o.now,ln=e.parseInt,fn=ht.random,pn=bt.reverse,hn=ei(e,"DataView"),dn=ei(e,"Map"),yn=ei(e,"Promise"),vn=ei(e,"Set"),_n=ei(e,"WeakMap"),bn=ei(dt,"create"),En=_n&&new _n,gn={},wn=xi(hn),Tn=xi(dn),mn=xi(yn),On=xi(vn),Sn=xi(_n),Rn=It?It.prototype:void 0,An=Rn?Rn.valueOf:void 0,xn=Rn?Rn.toString:void 0;function Pn(t){if(Ws(t)&&!Ds(t)&&!(t instanceof Nn)){if(t instanceof kn)return t;if(mt.call(t,"__wrapped__"))return Pi(t)}return new kn(t)}var Cn=function(){function t(){}return function(e){if(!Ys(e))return{};if(Wt)return Wt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function In(){}function kn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Nn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Mn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ln(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Mn;++e<n;)this.add(t[e])}function jn(t){var e=this.__data__=new Un(t);this.size=e.size}function Gn(t,e){var n=Ds(t),r=!n&&Ns(t),o=!n&&!r&&js(t),i=!n&&!r&&!o&&Zs(t),s=n||r||o||i,u=s?Pe(t.length,vt):[],a=u.length;for(var c in t)!e&&!mt.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ai(c,a))||u.push(c);return u}function Bn(t){var e=t.length;return e?t[Lr(0,e-1)]:void 0}function Fn(t,e){return Si(Eo(t),$n(e,0,t.length))}function Hn(t){return Si(Eo(t))}function Vn(t,e,n){(void 0!==n&&!Cs(t[e],n)||void 0===n&&!(e in t))&&zn(t,e,n)}function Yn(t,e,n){var r=t[e];mt.call(t,e)&&Cs(r,n)&&(void 0!==n||e in t)||zn(t,e,n)}function Wn(t,e){for(var n=t.length;n--;)if(Cs(t[n][0],e))return n;return-1}function Kn(t,e,n,r){return er(t,(function(t,o,i){e(r,t,n(t),i)})),r}function qn(t,e){return t&&go(e,wu(e),t)}function zn(t,e,n){"__proto__"==e&&be?be(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Qn(t,e){for(var n=-1,o=e.length,i=r(o),s=null==t;++n<o;)i[n]=s?void 0:vu(t,e[n]);return i}function $n(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function Jn(t,e,n,r,o,i){var s,u=1&e,c=2&e,p=4&e;if(n&&(s=o?n(t,r,o,i):n(t)),void 0!==s)return s;if(!Ys(t))return t;var T=Ds(t);if(T){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&mt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return Eo(t,s)}else{var N=oi(t),D=N==h||N==d;if(js(t))return po(t,u);if(N==_||N==a||D&&!o){if(s=c||D?{}:si(t),!u)return c?function(t,e){return go(t,ri(t),e)}(t,function(t,e){return t&&go(e,Tu(e),t)}(s,t)):function(t,e){return go(t,ni(t),e)}(t,qn(s,t))}else{if(!Ft[N])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case m:return ho(t);case l:case f:return new r(+t);case O:return function(t,e){var n=e?ho(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case S:case R:case A:case x:case P:case C:case"[object Uint8ClampedArray]":case I:case k:return yo(t,n);case y:return new r;case v:case g:return new r(t);case b:return function(t){var e=new t.constructor(t.source,rt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case E:return new r;case w:return o=t,An?dt(An.call(o)):{}}var o}(t,N,u)}}i||(i=new jn);var U=i.get(t);if(U)return U;i.set(t,s),$s(t)?t.forEach((function(r){s.add(Jn(r,e,n,r,t,i))})):Ks(t)&&t.forEach((function(r,o){s.set(o,Jn(r,e,n,o,t,i))}));var M=T?void 0:(p?c?zo:qo:c?Tu:wu)(t);return ue(M||t,(function(r,o){M&&(r=t[o=r]),Yn(s,o,Jn(r,e,n,o,t,i))})),s}function Xn(t,e,n){var r=n.length;if(null==t)return!r;for(t=dt(t);r--;){var o=n[r],i=e[o],s=t[o];if(void 0===s&&!(o in t)||!i(s))return!1}return!0}function Zn(t,e,n){if("function"!=typeof t)throw new _t(i);return wi((function(){t.apply(void 0,n)}),e)}function tr(t,e,n,r){var o=-1,i=fe,s=!0,u=t.length,a=[],c=e.length;if(!u)return a;n&&(e=he(e,Ie(n))),r?(i=pe,s=!1):e.length>=200&&(i=Ne,s=!1,e=new Ln(e));t:for(;++o<u;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,s&&f==f){for(var p=c;p--;)if(e[p]===f)continue t;a.push(l)}else i(e,f,r)||a.push(l)}return a}Pn.templateSettings={escape:B,evaluate:F,interpolate:H,variable:"",imports:{_:Pn}},Pn.prototype=In.prototype,Pn.prototype.constructor=Pn,kn.prototype=Cn(In.prototype),kn.prototype.constructor=kn,Nn.prototype=Cn(In.prototype),Nn.prototype.constructor=Nn,Dn.prototype.clear=function(){this.__data__=bn?bn(null):{},this.size=0},Dn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Dn.prototype.get=function(t){var e=this.__data__;if(bn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return mt.call(e,t)?e[t]:void 0},Dn.prototype.has=function(t){var e=this.__data__;return bn?void 0!==e[t]:mt.call(e,t)},Dn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=bn&&void 0===e?"__lodash_hash_undefined__":e,this},Un.prototype.clear=function(){this.__data__=[],this.size=0},Un.prototype.delete=function(t){var e=this.__data__,n=Wn(e,t);return!(n<0)&&(n==e.length-1?e.pop():zt.call(e,n,1),--this.size,!0)},Un.prototype.get=function(t){var e=this.__data__,n=Wn(e,t);return n<0?void 0:e[n][1]},Un.prototype.has=function(t){return Wn(this.__data__,t)>-1},Un.prototype.set=function(t,e){var n=this.__data__,r=Wn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new Dn,map:new(dn||Un),string:new Dn}},Mn.prototype.delete=function(t){var e=Zo(this,t).delete(t);return this.size-=e?1:0,e},Mn.prototype.get=function(t){return Zo(this,t).get(t)},Mn.prototype.has=function(t){return Zo(this,t).has(t)},Mn.prototype.set=function(t,e){var n=Zo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Ln.prototype.add=Ln.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ln.prototype.has=function(t){return this.__data__.has(t)},jn.prototype.clear=function(){this.__data__=new Un,this.size=0},jn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},jn.prototype.get=function(t){return this.__data__.get(t)},jn.prototype.has=function(t){return this.__data__.has(t)},jn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Un){var r=n.__data__;if(!dn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Mn(r)}return n.set(t,e),this.size=n.size,this};var er=mo(cr),nr=mo(lr,!0);function rr(t,e){var n=!0;return er(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function or(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],s=e(i);if(null!=s&&(void 0===u?s==s&&!Xs(s):n(s,u)))var u=s,a=i}return a}function ir(t,e){var n=[];return er(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function sr(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=ui),o||(o=[]);++i<s;){var u=t[i];e>0&&n(u)?e>1?sr(u,e-1,n,r,o):de(o,u):r||(o[o.length]=u)}return o}var ur=Oo(),ar=Oo(!0);function cr(t,e){return t&&ur(t,e,wu)}function lr(t,e){return t&&ar(t,e,wu)}function fr(t,e){return le(e,(function(e){return Fs(t[e])}))}function pr(t,e){for(var n=0,r=(e=ao(e,t)).length;null!=t&&n<r;)t=t[Ai(e[n++])];return n&&n==r?t:void 0}function hr(t,e,n){var r=e(t);return Ds(t)?r:de(r,n(t))}function dr(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Xt&&Xt in dt(t)?function(t){var e=mt.call(t,Xt),n=t[Xt];try{t[Xt]=void 0;var r=!0}catch(t){}var o=Rt.call(t);r&&(e?t[Xt]=n:delete t[Xt]);return o}(t):function(t){return Rt.call(t)}(t)}function yr(t,e){return t>e}function vr(t,e){return null!=t&&mt.call(t,e)}function _r(t,e){return null!=t&&e in dt(t)}function br(t,e,n){for(var o=n?pe:fe,i=t[0].length,s=t.length,u=s,a=r(s),c=1/0,l=[];u--;){var f=t[u];u&&e&&(f=he(f,Ie(e))),c=an(f.length,c),a[u]=!n&&(e||i>=120&&f.length>=120)?new Ln(u&&f):void 0}f=t[0];var p=-1,h=a[0];t:for(;++p<i&&l.length<c;){var d=f[p],y=e?e(d):d;if(d=n||0!==d?d:0,!(h?Ne(h,y):o(l,y,n))){for(u=s;--u;){var v=a[u];if(!(v?Ne(v,y):o(t[u],y,n)))continue t}h&&h.push(y),l.push(d)}}return l}function Er(t,e,n){var r=null==(t=_i(t,e=ao(e,t)))?t:t[Ai(Bi(e))];return null==r?void 0:ie(r,t,n)}function gr(t){return Ws(t)&&dr(t)==a}function wr(t,e,n,r,o){return t===e||(null==t||null==e||!Ws(t)&&!Ws(e)?t!=t&&e!=e:function(t,e,n,r,o,i){var s=Ds(t),u=Ds(e),h=s?c:oi(t),d=u?c:oi(e),T=(h=h==a?_:h)==_,S=(d=d==a?_:d)==_,R=h==d;if(R&&js(t)){if(!js(e))return!1;s=!0,T=!1}if(R&&!T)return i||(i=new jn),s||Zs(t)?Wo(t,e,n,r,o,i):function(t,e,n,r,o,i,s){switch(n){case O:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case m:return!(t.byteLength!=e.byteLength||!i(new Dt(t),new Dt(e)));case l:case f:case v:return Cs(+t,+e);case p:return t.name==e.name&&t.message==e.message;case b:case g:return t==e+"";case y:var u=Fe;case E:var a=1&r;if(u||(u=Ye),t.size!=e.size&&!a)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var h=Wo(u(t),u(e),r,o,i,s);return s.delete(t),h;case w:if(An)return An.call(t)==An.call(e)}return!1}(t,e,h,n,r,o,i);if(!(1&n)){var A=T&&mt.call(t,"__wrapped__"),x=S&&mt.call(e,"__wrapped__");if(A||x){var P=A?t.value():t,C=x?e.value():e;return i||(i=new jn),o(P,C,n,r,i)}}if(!R)return!1;return i||(i=new jn),function(t,e,n,r,o,i){var s=1&n,u=qo(t),a=u.length,c=qo(e).length;if(a!=c&&!s)return!1;var l=a;for(;l--;){var f=u[l];if(!(s?f in e:mt.call(e,f)))return!1}var p=i.get(t),h=i.get(e);if(p&&h)return p==e&&h==t;var d=!0;i.set(t,e),i.set(e,t);var y=s;for(;++l<a;){f=u[l];var v=t[f],_=e[f];if(r)var b=s?r(_,v,f,e,t,i):r(v,_,f,t,e,i);if(!(void 0===b?v===_||o(v,_,n,r,i):b)){d=!1;break}y||(y="constructor"==f)}if(d&&!y){var E=t.constructor,g=e.constructor;E==g||!("constructor"in t)||!("constructor"in e)||"function"==typeof E&&E instanceof E&&"function"==typeof g&&g instanceof g||(d=!1)}return i.delete(t),i.delete(e),d}(t,e,n,r,o,i)}(t,e,n,r,wr,o))}function Tr(t,e,n,r){var o=n.length,i=o,s=!r;if(null==t)return!i;for(t=dt(t);o--;){var u=n[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var a=(u=n[o])[0],c=t[a],l=u[1];if(s&&u[2]){if(void 0===c&&!(a in t))return!1}else{var f=new jn;if(r)var p=r(c,l,a,t,e,f);if(!(void 0===p?wr(l,c,3,r,f):p))return!1}}return!0}function mr(t){return!(!Ys(t)||(e=t,St&&St in e))&&(Fs(t)?Pt:st).test(xi(t));var e}function Or(t){return"function"==typeof t?t:null==t?qu:"object"==typeof t?Ds(t)?Cr(t[0],t[1]):Pr(t):na(t)}function Sr(t){if(!hi(t))return sn(t);var e=[];for(var n in dt(t))mt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Rr(t){if(!Ys(t))return function(t){var e=[];if(null!=t)for(var n in dt(t))e.push(n);return e}(t);var e=hi(t),n=[];for(var r in t)("constructor"!=r||!e&&mt.call(t,r))&&n.push(r);return n}function Ar(t,e){return t<e}function xr(t,e){var n=-1,o=Ms(t)?r(t.length):[];return er(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}function Pr(t){var e=ti(t);return 1==e.length&&e[0][2]?yi(e[0][0],e[0][1]):function(n){return n===t||Tr(n,t,e)}}function Cr(t,e){return li(t)&&di(e)?yi(Ai(t),e):function(n){var r=vu(n,t);return void 0===r&&r===e?_u(n,t):wr(e,r,3)}}function Ir(t,e,n,r,o){t!==e&&ur(e,(function(i,s){if(o||(o=new jn),Ys(i))!function(t,e,n,r,o,i,s){var u=Ei(t,n),a=Ei(e,n),c=s.get(a);if(c)return void Vn(t,n,c);var l=i?i(u,a,n+"",t,e,s):void 0,f=void 0===l;if(f){var p=Ds(a),h=!p&&js(a),d=!p&&!h&&Zs(a);l=a,p||h||d?Ds(u)?l=u:Ls(u)?l=Eo(u):h?(f=!1,l=po(a,!0)):d?(f=!1,l=yo(a,!0)):l=[]:zs(a)||Ns(a)?(l=u,Ns(u)?l=uu(u):Ys(u)&&!Fs(u)||(l=si(a))):f=!1}f&&(s.set(a,l),o(l,a,r,i,s),s.delete(a));Vn(t,n,l)}(t,e,s,n,Ir,r,o);else{var u=r?r(Ei(t,s),i,s+"",t,e,o):void 0;void 0===u&&(u=i),Vn(t,s,u)}}),Tu)}function kr(t,e){var n=t.length;if(n)return ai(e+=e<0?n:0,n)?t[e]:void 0}function Nr(t,e,n){e=e.length?he(e,(function(t){return Ds(t)?function(e){return pr(e,1===t.length?t[0]:t)}:t})):[qu];var r=-1;return e=he(e,Ie(Xo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(xr(t,(function(t,n,o){return{criteria:he(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){var r=-1,o=t.criteria,i=e.criteria,s=o.length,u=n.length;for(;++r<s;){var a=vo(o[r],i[r]);if(a){if(r>=u)return a;var c=n[r];return a*("desc"==c?-1:1)}}return t.index-e.index}(t,e,n)}))}function Dr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var s=e[r],u=pr(t,s);n(u,s)&&Hr(i,ao(s,t),u)}return i}function Ur(t,e,n,r){var o=r?Te:we,i=-1,s=e.length,u=t;for(t===e&&(e=Eo(e)),n&&(u=he(t,Ie(n)));++i<s;)for(var a=0,c=e[i],l=n?n(c):c;(a=o(u,l,a,r))>-1;)u!==t&&zt.call(u,a,1),zt.call(t,a,1);return t}function Mr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;ai(o)?zt.call(t,o,1):to(t,o)}}return t}function Lr(t,e){return t+tn(fn()*(e-t+1))}function jr(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=tn(e/2))&&(t+=t)}while(e);return n}function Gr(t,e){return Ti(vi(t,e,qu),t+"")}function Br(t){return Bn(Cu(t))}function Fr(t,e){var n=Cu(t);return Si(n,$n(e,0,n.length))}function Hr(t,e,n,r){if(!Ys(t))return t;for(var o=-1,i=(e=ao(e,t)).length,s=i-1,u=t;null!=u&&++o<i;){var a=Ai(e[o]),c=n;if("__proto__"===a||"constructor"===a||"prototype"===a)return t;if(o!=s){var l=u[a];void 0===(c=r?r(l,a,u):void 0)&&(c=Ys(l)?l:ai(e[o+1])?[]:{})}Yn(u,a,c),u=u[a]}return t}var Vr=En?function(t,e){return En.set(t,e),t}:qu,Yr=be?function(t,e){return be(t,"toString",{configurable:!0,enumerable:!1,value:Yu(e),writable:!0})}:qu;function Wr(t){return Si(Cu(t))}function Kr(t,e,n){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=r(i);++o<i;)s[o]=t[o+e];return s}function qr(t,e){var n;return er(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function zr(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=t[i];null!==s&&!Xs(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return Qr(t,e,qu,n)}function Qr(t,e,n,r){var o=0,i=null==t?0:t.length;if(0===i)return 0;for(var s=(e=n(e))!=e,u=null===e,a=Xs(e),c=void 0===e;o<i;){var l=tn((o+i)/2),f=n(t[l]),p=void 0!==f,h=null===f,d=f==f,y=Xs(f);if(s)var v=r||d;else v=c?d&&(r||p):u?d&&p&&(r||!h):a?d&&p&&!h&&(r||!y):!h&&!y&&(r?f<=e:f<e);v?o=l+1:i=l}return an(i,4294967294)}function $r(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n],u=e?e(s):s;if(!n||!Cs(u,a)){var a=u;i[o++]=0===s?0:s}}return i}function Jr(t){return"number"==typeof t?t:Xs(t)?NaN:+t}function Xr(t){if("string"==typeof t)return t;if(Ds(t))return he(t,Xr)+"";if(Xs(t))return xn?xn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Zr(t,e,n){var r=-1,o=fe,i=t.length,s=!0,u=[],a=u;if(n)s=!1,o=pe;else if(i>=200){var c=e?null:Go(t);if(c)return Ye(c);s=!1,o=Ne,a=new Ln}else a=e?[]:u;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,s&&f==f){for(var p=a.length;p--;)if(a[p]===f)continue t;e&&a.push(f),u.push(l)}else o(a,f,n)||(a!==u&&a.push(f),u.push(l))}return u}function to(t,e){return null==(t=_i(t,e=ao(e,t)))||delete t[Ai(Bi(e))]}function eo(t,e,n,r){return Hr(t,e,n(pr(t,e)),r)}function no(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Kr(t,r?0:i,r?i+1:o):Kr(t,r?i+1:0,r?o:i)}function ro(t,e){var n=t;return n instanceof Nn&&(n=n.value()),ye(e,(function(t,e){return e.func.apply(e.thisArg,de([t],e.args))}),n)}function oo(t,e,n){var o=t.length;if(o<2)return o?Zr(t[0]):[];for(var i=-1,s=r(o);++i<o;)for(var u=t[i],a=-1;++a<o;)a!=i&&(s[i]=tr(s[i]||u,t[a],e,n));return Zr(sr(s,1),e,n)}function io(t,e,n){for(var r=-1,o=t.length,i=e.length,s={};++r<o;){var u=r<i?e[r]:void 0;n(s,t[r],u)}return s}function so(t){return Ls(t)?t:[]}function uo(t){return"function"==typeof t?t:qu}function ao(t,e){return Ds(t)?t:li(t,e)?[t]:Ri(au(t))}var co=Gr;function lo(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:Kr(t,e,n)}var fo=Re||function(t){return qt.clearTimeout(t)};function po(t,e){if(e)return t.slice();var n=t.length,r=Mt?Mt(n):new t.constructor(n);return t.copy(r),r}function ho(t){var e=new t.constructor(t.byteLength);return new Dt(e).set(new Dt(t)),e}function yo(t,e){var n=e?ho(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function vo(t,e){if(t!==e){var n=void 0!==t,r=null===t,o=t==t,i=Xs(t),s=void 0!==e,u=null===e,a=e==e,c=Xs(e);if(!u&&!c&&!i&&t>e||i&&s&&a&&!u&&!c||r&&s&&a||!n&&a||!o)return 1;if(!r&&!i&&!c&&t<e||c&&n&&o&&!r&&!i||u&&n&&o||!s&&o||!a)return-1}return 0}function _o(t,e,n,o){for(var i=-1,s=t.length,u=n.length,a=-1,c=e.length,l=un(s-u,0),f=r(c+l),p=!o;++a<c;)f[a]=e[a];for(;++i<u;)(p||i<s)&&(f[n[i]]=t[i]);for(;l--;)f[a++]=t[i++];return f}function bo(t,e,n,o){for(var i=-1,s=t.length,u=-1,a=n.length,c=-1,l=e.length,f=un(s-a,0),p=r(f+l),h=!o;++i<f;)p[i]=t[i];for(var d=i;++c<l;)p[d+c]=e[c];for(;++u<a;)(h||i<s)&&(p[d+n[u]]=t[i++]);return p}function Eo(t,e){var n=-1,o=t.length;for(e||(e=r(o));++n<o;)e[n]=t[n];return e}function go(t,e,n,r){var o=!n;n||(n={});for(var i=-1,s=e.length;++i<s;){var u=e[i],a=r?r(n[u],t[u],u,n,t):void 0;void 0===a&&(a=t[u]),o?zn(n,u,a):Yn(n,u,a)}return n}function wo(t,e){return function(n,r){var o=Ds(n)?se:Kn,i=e?e():{};return o(n,t,Xo(r,2),i)}}function To(t){return Gr((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,s&&ci(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),e=dt(e);++r<o;){var u=n[r];u&&t(e,u,r,i)}return e}))}function mo(t,e){return function(n,r){if(null==n)return n;if(!Ms(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=dt(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function Oo(t){return function(e,n,r){for(var o=-1,i=dt(e),s=r(e),u=s.length;u--;){var a=s[t?u:++o];if(!1===n(i[a],a,i))break}return e}}function So(t){return function(e){var n=Be(e=au(e))?qe(e):void 0,r=n?n[0]:e.charAt(0),o=n?lo(n,1).join(""):e.slice(1);return r[t]()+o}}function Ro(t){return function(e){return ye(Fu(Nu(e).replace(kt,"")),t,"")}}function Ao(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Cn(t.prototype),r=t.apply(n,e);return Ys(r)?r:n}}function xo(t){return function(e,n,r){var o=dt(e);if(!Ms(e)){var i=Xo(n,3);e=wu(e),n=function(t){return i(o[t],t,o)}}var s=t(e,n,r);return s>-1?o[i?e[s]:s]:void 0}}function Po(t){return Ko((function(e){var n=e.length,r=n,o=kn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new _t(i);if(o&&!u&&"wrapper"==$o(s))var u=new kn([],!0)}for(r=u?r:n;++r<n;){var a=$o(s=e[r]),c="wrapper"==a?Qo(s):void 0;u=c&&fi(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[$o(c[0])].apply(u,c[3]):1==s.length&&fi(s)?u[a]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ds(r))return u.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))}function Co(t,e,n,o,i,s,u,a,c,l){var f=128&e,p=1&e,h=2&e,d=24&e,y=512&e,v=h?void 0:Ao(t);return function _(){for(var b=arguments.length,E=r(b),g=b;g--;)E[g]=arguments[g];if(d)var w=Jo(_),T=Me(E,w);if(o&&(E=_o(E,o,i,d)),s&&(E=bo(E,s,u,d)),b-=T,d&&b<l){var m=Ve(E,w);return Lo(t,e,Co,_.placeholder,n,E,m,a,c,l-b)}var O=p?n:this,S=h?O[t]:t;return b=E.length,a?E=bi(E,a):y&&b>1&&E.reverse(),f&&c<b&&(E.length=c),this&&this!==qt&&this instanceof _&&(S=v||Ao(S)),S.apply(O,E)}}function Io(t,e){return function(n,r){return function(t,e,n,r){return cr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function ko(t,e){return function(n,r){var o;if(void 0===n&&void 0===r)return e;if(void 0!==n&&(o=n),void 0!==r){if(void 0===o)return r;"string"==typeof n||"string"==typeof r?(n=Xr(n),r=Xr(r)):(n=Jr(n),r=Jr(r)),o=t(n,r)}return o}}function No(t){return Ko((function(e){return e=he(e,Ie(Xo())),Gr((function(n){var r=this;return t(e,(function(t){return ie(t,r,n)}))}))}))}function Do(t,e){var n=(e=void 0===e?" ":Xr(e)).length;if(n<2)return n?jr(e,t):e;var r=jr(e,Ze(t/Ke(e)));return Be(e)?lo(qe(r),0,t).join(""):r.slice(0,t)}function Uo(t){return function(e,n,o){return o&&"number"!=typeof o&&ci(e,n,o)&&(n=o=void 0),e=ru(e),void 0===n?(n=e,e=0):n=ru(n),function(t,e,n,o){for(var i=-1,s=un(Ze((e-t)/(n||1)),0),u=r(s);s--;)u[o?s:++i]=t,t+=n;return u}(e,n,o=void 0===o?e<n?1:-1:ru(o),t)}}function Mo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=su(e),n=su(n)),t(e,n)}}function Lo(t,e,n,r,o,i,s,u,a,c){var l=8&e;e|=l?32:64,4&(e&=~(l?64:32))||(e&=-4);var f=[t,e,o,l?i:void 0,l?s:void 0,l?void 0:i,l?void 0:s,u,a,c],p=n.apply(void 0,f);return fi(t)&&gi(p,f),p.placeholder=r,mi(p,t,e)}function jo(t){var e=ht[t];return function(t,n){if(t=su(t),(n=null==n?0:an(ou(n),292))&&rn(t)){var r=(au(t)+"e").split("e");return+((r=(au(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Go=vn&&1/Ye(new vn([,-0]))[1]==1/0?function(t){return new vn(t)}:Xu;function Bo(t){return function(e){var n=oi(e);return n==y?Fe(e):n==E?We(e):function(t,e){return he(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Fo(t,e,n,o,u,a,c,l){var f=2&e;if(!f&&"function"!=typeof t)throw new _t(i);var p=o?o.length:0;if(p||(e&=-97,o=u=void 0),c=void 0===c?c:un(ou(c),0),l=void 0===l?l:ou(l),p-=u?u.length:0,64&e){var h=o,d=u;o=u=void 0}var y=f?void 0:Qo(t),v=[t,e,n,o,u,h,d,a,c,l];if(y&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=128==r&&8==n||128==r&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var a=e[3];if(a){var c=t[3];t[3]=c?_o(c,a,e[4]):a,t[4]=c?Ve(t[3],s):e[4]}(a=e[5])&&(c=t[5],t[5]=c?bo(c,a,e[6]):a,t[6]=c?Ve(t[5],s):e[6]);(a=e[7])&&(t[7]=a);128&r&&(t[8]=null==t[8]?e[8]:an(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=o}(v,y),t=v[0],e=v[1],n=v[2],o=v[3],u=v[4],!(l=v[9]=void 0===v[9]?f?0:t.length:un(v[9]-p,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||16==e?function(t,e,n){var o=Ao(t);return function i(){for(var s=arguments.length,u=r(s),a=s,c=Jo(i);a--;)u[a]=arguments[a];var l=s<3&&u[0]!==c&&u[s-1]!==c?[]:Ve(u,c);if((s-=l.length)<n)return Lo(t,e,Co,i.placeholder,void 0,u,l,void 0,void 0,n-s);var f=this&&this!==qt&&this instanceof i?o:t;return ie(f,this,u)}}(t,e,l):32!=e&&33!=e||u.length?Co.apply(void 0,v):function(t,e,n,o){var i=1&e,s=Ao(t);return function e(){for(var u=-1,a=arguments.length,c=-1,l=o.length,f=r(l+a),p=this&&this!==qt&&this instanceof e?s:t;++c<l;)f[c]=o[c];for(;a--;)f[c++]=arguments[++u];return ie(p,i?n:this,f)}}(t,e,n,o);else var _=function(t,e,n){var r=1&e,o=Ao(t);return function e(){var i=this&&this!==qt&&this instanceof e?o:t;return i.apply(r?n:this,arguments)}}(t,e,n);return mi((y?Vr:gi)(_,v),t,e)}function Ho(t,e,n,r){return void 0===t||Cs(t,gt[n])&&!mt.call(r,n)?e:t}function Vo(t,e,n,r,o,i){return Ys(t)&&Ys(e)&&(i.set(e,t),Ir(t,e,void 0,Vo,i),i.delete(e)),t}function Yo(t){return zs(t)?void 0:t}function Wo(t,e,n,r,o,i){var s=1&n,u=t.length,a=e.length;if(u!=a&&!(s&&a>u))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var f=-1,p=!0,h=2&n?new Ln:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var d=t[f],y=e[f];if(r)var v=s?r(y,d,f,e,t,i):r(d,y,f,t,e,i);if(void 0!==v){if(v)continue;p=!1;break}if(h){if(!_e(e,(function(t,e){if(!Ne(h,e)&&(d===t||o(d,t,n,r,i)))return h.push(e)}))){p=!1;break}}else if(d!==y&&!o(d,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p}function Ko(t){return Ti(vi(t,void 0,Ui),t+"")}function qo(t){return hr(t,wu,ni)}function zo(t){return hr(t,Tu,ri)}var Qo=En?function(t){return En.get(t)}:Xu;function $o(t){for(var e=t.name+"",n=gn[e],r=mt.call(gn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function Jo(t){return(mt.call(Pn,"placeholder")?Pn:t).placeholder}function Xo(){var t=Pn.iteratee||zu;return t=t===zu?Or:t,arguments.length?t(arguments[0],arguments[1]):t}function Zo(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function ti(t){for(var e=wu(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,di(o)]}return e}function ei(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return mr(n)?n:void 0}var ni=en?function(t){return null==t?[]:(t=dt(t),le(en(t),(function(e){return Kt.call(t,e)})))}:ia,ri=en?function(t){for(var e=[];t;)de(e,ni(t)),t=Ht(t);return e}:ia,oi=dr;function ii(t,e,n){for(var r=-1,o=(e=ao(e,t)).length,i=!1;++r<o;){var s=Ai(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Vs(o)&&ai(s,o)&&(Ds(t)||Ns(t))}function si(t){return"function"!=typeof t.constructor||hi(t)?{}:Cn(Ht(t))}function ui(t){return Ds(t)||Ns(t)||!!(Qt&&t&&t[Qt])}function ai(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&at.test(t))&&t>-1&&t%1==0&&t<e}function ci(t,e,n){if(!Ys(n))return!1;var r=typeof e;return!!("number"==r?Ms(n)&&ai(e,n.length):"string"==r&&e in n)&&Cs(n[e],t)}function li(t,e){if(Ds(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Xs(t))||(Y.test(t)||!V.test(t)||null!=e&&t in dt(e))}function fi(t){var e=$o(t),n=Pn[e];if("function"!=typeof n||!(e in Nn.prototype))return!1;if(t===n)return!0;var r=Qo(n);return!!r&&t===r[0]}(hn&&oi(new hn(new ArrayBuffer(1)))!=O||dn&&oi(new dn)!=y||yn&&"[object Promise]"!=oi(yn.resolve())||vn&&oi(new vn)!=E||_n&&oi(new _n)!=T)&&(oi=function(t){var e=dr(t),n=e==_?t.constructor:void 0,r=n?xi(n):"";if(r)switch(r){case wn:return O;case Tn:return y;case mn:return"[object Promise]";case On:return E;case Sn:return T}return e});var pi=wt?Fs:sa;function hi(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||gt)}function di(t){return t==t&&!Ys(t)}function yi(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in dt(n)))}}function vi(t,e,n){return e=un(void 0===e?t.length-1:e,0),function(){for(var o=arguments,i=-1,s=un(o.length-e,0),u=r(s);++i<s;)u[i]=o[e+i];i=-1;for(var a=r(e+1);++i<e;)a[i]=o[i];return a[e]=n(u),ie(t,this,a)}}function _i(t,e){return e.length<2?t:pr(t,Kr(e,0,-1))}function bi(t,e){for(var n=t.length,r=an(e.length,n),o=Eo(t);r--;){var i=e[r];t[r]=ai(i,n)?o[i]:void 0}return t}function Ei(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var gi=Oi(Vr),wi=Xe||function(t,e){return qt.setTimeout(t,e)},Ti=Oi(Yr);function mi(t,e,n){var r=e+"";return Ti(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace($,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return ue(u,(function(n){var r="_."+n[0];e&n[1]&&!fe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(J);return e?e[1].split(X):[]}(r),n)))}function Oi(t){var e=0,n=0;return function(){var r=cn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Si(t,e){var n=-1,r=t.length,o=r-1;for(e=void 0===e?r:e;++n<e;){var i=Lr(n,o),s=t[i];t[i]=t[n],t[n]=s}return t.length=e,t}var Ri=function(t){var e=Os(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(W,(function(t,n,r,o){e.push(r?o.replace(et,"$1"):n||t)})),e}));function Ai(t){if("string"==typeof t||Xs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function xi(t){if(null!=t){try{return Tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Pi(t){if(t instanceof Nn)return t.clone();var e=new kn(t.__wrapped__,t.__chain__);return e.__actions__=Eo(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Ci=Gr((function(t,e){return Ls(t)?tr(t,sr(e,1,Ls,!0)):[]})),Ii=Gr((function(t,e){var n=Bi(e);return Ls(n)&&(n=void 0),Ls(t)?tr(t,sr(e,1,Ls,!0),Xo(n,2)):[]})),ki=Gr((function(t,e){var n=Bi(e);return Ls(n)&&(n=void 0),Ls(t)?tr(t,sr(e,1,Ls,!0),void 0,n):[]}));function Ni(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ou(n);return o<0&&(o=un(r+o,0)),ge(t,Xo(e,3),o)}function Di(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=ou(n),o=n<0?un(r+o,0):an(o,r-1)),ge(t,Xo(e,3),o,!0)}function Ui(t){return(null==t?0:t.length)?sr(t,1):[]}function Mi(t){return t&&t.length?t[0]:void 0}var Li=Gr((function(t){var e=he(t,so);return e.length&&e[0]===t[0]?br(e):[]})),ji=Gr((function(t){var e=Bi(t),n=he(t,so);return e===Bi(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?br(n,Xo(e,2)):[]})),Gi=Gr((function(t){var e=Bi(t),n=he(t,so);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?br(n,void 0,e):[]}));function Bi(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Fi=Gr(Hi);function Hi(t,e){return t&&t.length&&e&&e.length?Ur(t,e):t}var Vi=Ko((function(t,e){var n=null==t?0:t.length,r=Qn(t,e);return Mr(t,he(e,(function(t){return ai(t,n)?+t:t})).sort(vo)),r}));function Yi(t){return null==t?t:pn.call(t)}var Wi=Gr((function(t){return Zr(sr(t,1,Ls,!0))})),Ki=Gr((function(t){var e=Bi(t);return Ls(e)&&(e=void 0),Zr(sr(t,1,Ls,!0),Xo(e,2))})),qi=Gr((function(t){var e=Bi(t);return e="function"==typeof e?e:void 0,Zr(sr(t,1,Ls,!0),void 0,e)}));function zi(t){if(!t||!t.length)return[];var e=0;return t=le(t,(function(t){if(Ls(t))return e=un(t.length,e),!0})),Pe(e,(function(e){return he(t,Se(e))}))}function Qi(t,e){if(!t||!t.length)return[];var n=zi(t);return null==e?n:he(n,(function(t){return ie(e,void 0,t)}))}var $i=Gr((function(t,e){return Ls(t)?tr(t,e):[]})),Ji=Gr((function(t){return oo(le(t,Ls))})),Xi=Gr((function(t){var e=Bi(t);return Ls(e)&&(e=void 0),oo(le(t,Ls),Xo(e,2))})),Zi=Gr((function(t){var e=Bi(t);return e="function"==typeof e?e:void 0,oo(le(t,Ls),void 0,e)})),ts=Gr(zi);var es=Gr((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,Qi(t,n)}));function ns(t){var e=Pn(t);return e.__chain__=!0,e}function rs(t,e){return e(t)}var os=Ko((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return Qn(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Nn&&ai(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:rs,args:[o],thisArg:void 0}),new kn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(o)}));var is=wo((function(t,e,n){mt.call(t,n)?++t[n]:zn(t,n,1)}));var ss=xo(Ni),us=xo(Di);function as(t,e){return(Ds(t)?ue:er)(t,Xo(e,3))}function cs(t,e){return(Ds(t)?ae:nr)(t,Xo(e,3))}var ls=wo((function(t,e,n){mt.call(t,n)?t[n].push(e):zn(t,n,[e])}));var fs=Gr((function(t,e,n){var o=-1,i="function"==typeof e,s=Ms(t)?r(t.length):[];return er(t,(function(t){s[++o]=i?ie(e,t,n):Er(t,e,n)})),s})),ps=wo((function(t,e,n){zn(t,n,e)}));function hs(t,e){return(Ds(t)?he:xr)(t,Xo(e,3))}var ds=wo((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var ys=Gr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ci(t,e[0],e[1])?e=[]:n>2&&ci(e[0],e[1],e[2])&&(e=[e[0]]),Nr(t,sr(e,1),[])})),vs=Je||function(){return qt.Date.now()};function _s(t,e,n){return e=n?void 0:e,Fo(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function bs(t,e){var n;if("function"!=typeof e)throw new _t(i);return t=ou(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var Es=Gr((function(t,e,n){var r=1;if(n.length){var o=Ve(n,Jo(Es));r|=32}return Fo(t,r,e,n,o)})),gs=Gr((function(t,e,n){var r=3;if(n.length){var o=Ve(n,Jo(gs));r|=32}return Fo(e,r,t,n,o)}));function ws(t,e,n){var r,o,s,u,a,c,l=0,f=!1,p=!1,h=!0;if("function"!=typeof t)throw new _t(i);function d(e){var n=r,i=o;return r=o=void 0,l=e,u=t.apply(i,n)}function y(t){return l=t,a=wi(_,e),f?d(t):u}function v(t){var n=t-c;return void 0===c||n>=e||n<0||p&&t-l>=s}function _(){var t=vs();if(v(t))return b(t);a=wi(_,function(t){var n=e-(t-c);return p?an(n,s-(t-l)):n}(t))}function b(t){return a=void 0,h&&r?d(t):(r=o=void 0,u)}function E(){var t=vs(),n=v(t);if(r=arguments,o=this,c=t,n){if(void 0===a)return y(c);if(p)return fo(a),a=wi(_,e),d(c)}return void 0===a&&(a=wi(_,e)),u}return e=su(e)||0,Ys(n)&&(f=!!n.leading,s=(p="maxWait"in n)?un(su(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h),E.cancel=function(){void 0!==a&&fo(a),l=0,r=c=o=a=void 0},E.flush=function(){return void 0===a?u:b(vs())},E}var Ts=Gr((function(t,e){return Zn(t,1,e)})),ms=Gr((function(t,e,n){return Zn(t,su(e)||0,n)}));function Os(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new _t(i);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Os.Cache||Mn),n}function Ss(t){if("function"!=typeof t)throw new _t(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Os.Cache=Mn;var Rs=co((function(t,e){var n=(e=1==e.length&&Ds(e[0])?he(e[0],Ie(Xo())):he(sr(e,1),Ie(Xo()))).length;return Gr((function(r){for(var o=-1,i=an(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return ie(t,this,r)}))})),As=Gr((function(t,e){return Fo(t,32,void 0,e,Ve(e,Jo(As)))})),xs=Gr((function(t,e){return Fo(t,64,void 0,e,Ve(e,Jo(xs)))})),Ps=Ko((function(t,e){return Fo(t,256,void 0,void 0,void 0,e)}));function Cs(t,e){return t===e||t!=t&&e!=e}var Is=Mo(yr),ks=Mo((function(t,e){return t>=e})),Ns=gr(function(){return arguments}())?gr:function(t){return Ws(t)&&mt.call(t,"callee")&&!Kt.call(t,"callee")},Ds=r.isArray,Us=Zt?Ie(Zt):function(t){return Ws(t)&&dr(t)==m};function Ms(t){return null!=t&&Vs(t.length)&&!Fs(t)}function Ls(t){return Ws(t)&&Ms(t)}var js=nn||sa,Gs=te?Ie(te):function(t){return Ws(t)&&dr(t)==f};function Bs(t){if(!Ws(t))return!1;var e=dr(t);return e==p||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!zs(t)}function Fs(t){if(!Ys(t))return!1;var e=dr(t);return e==h||e==d||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Hs(t){return"number"==typeof t&&t==ou(t)}function Vs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Ys(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ws(t){return null!=t&&"object"==typeof t}var Ks=ee?Ie(ee):function(t){return Ws(t)&&oi(t)==y};function qs(t){return"number"==typeof t||Ws(t)&&dr(t)==v}function zs(t){if(!Ws(t)||dr(t)!=_)return!1;var e=Ht(t);if(null===e)return!0;var n=mt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Tt.call(n)==At}var Qs=ne?Ie(ne):function(t){return Ws(t)&&dr(t)==b};var $s=re?Ie(re):function(t){return Ws(t)&&oi(t)==E};function Js(t){return"string"==typeof t||!Ds(t)&&Ws(t)&&dr(t)==g}function Xs(t){return"symbol"==typeof t||Ws(t)&&dr(t)==w}var Zs=oe?Ie(oe):function(t){return Ws(t)&&Vs(t.length)&&!!Bt[dr(t)]};var tu=Mo(Ar),eu=Mo((function(t,e){return t<=e}));function nu(t){if(!t)return[];if(Ms(t))return Js(t)?qe(t):Eo(t);if(Jt&&t[Jt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Jt]());var e=oi(t);return(e==y?Fe:e==E?Ye:Cu)(t)}function ru(t){return t?(t=su(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ou(t){var e=ru(t),n=e%1;return e==e?n?e-n:e:0}function iu(t){return t?$n(ou(t),0,4294967295):0}function su(t){if("number"==typeof t)return t;if(Xs(t))return NaN;if(Ys(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ys(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ce(t);var n=it.test(t);return n||ut.test(t)?Yt(t.slice(2),n?2:8):ot.test(t)?NaN:+t}function uu(t){return go(t,Tu(t))}function au(t){return null==t?"":Xr(t)}var cu=To((function(t,e){if(hi(e)||Ms(e))go(e,wu(e),t);else for(var n in e)mt.call(e,n)&&Yn(t,n,e[n])})),lu=To((function(t,e){go(e,Tu(e),t)})),fu=To((function(t,e,n,r){go(e,Tu(e),t,r)})),pu=To((function(t,e,n,r){go(e,wu(e),t,r)})),hu=Ko(Qn);var du=Gr((function(t,e){t=dt(t);var n=-1,r=e.length,o=r>2?e[2]:void 0;for(o&&ci(e[0],e[1],o)&&(r=1);++n<r;)for(var i=e[n],s=Tu(i),u=-1,a=s.length;++u<a;){var c=s[u],l=t[c];(void 0===l||Cs(l,gt[c])&&!mt.call(t,c))&&(t[c]=i[c])}return t})),yu=Gr((function(t){return t.push(void 0,Vo),ie(Ou,void 0,t)}));function vu(t,e,n){var r=null==t?void 0:pr(t,e);return void 0===r?n:r}function _u(t,e){return null!=t&&ii(t,e,_r)}var bu=Io((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Rt.call(e)),t[e]=n}),Yu(qu)),Eu=Io((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Rt.call(e)),mt.call(t,e)?t[e].push(n):t[e]=[n]}),Xo),gu=Gr(Er);function wu(t){return Ms(t)?Gn(t):Sr(t)}function Tu(t){return Ms(t)?Gn(t,!0):Rr(t)}var mu=To((function(t,e,n){Ir(t,e,n)})),Ou=To((function(t,e,n,r){Ir(t,e,n,r)})),Su=Ko((function(t,e){var n={};if(null==t)return n;var r=!1;e=he(e,(function(e){return e=ao(e,t),r||(r=e.length>1),e})),go(t,zo(t),n),r&&(n=Jn(n,7,Yo));for(var o=e.length;o--;)to(n,e[o]);return n}));var Ru=Ko((function(t,e){return null==t?{}:function(t,e){return Dr(t,e,(function(e,n){return _u(t,n)}))}(t,e)}));function Au(t,e){if(null==t)return{};var n=he(zo(t),(function(t){return[t]}));return e=Xo(e),Dr(t,n,(function(t,n){return e(t,n[0])}))}var xu=Bo(wu),Pu=Bo(Tu);function Cu(t){return null==t?[]:ke(t,wu(t))}var Iu=Ro((function(t,e,n){return e=e.toLowerCase(),t+(n?ku(e):e)}));function ku(t){return Bu(au(t).toLowerCase())}function Nu(t){return(t=au(t))&&t.replace(ct,Le).replace(Nt,"")}var Du=Ro((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Uu=Ro((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Mu=So("toLowerCase");var Lu=Ro((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var ju=Ro((function(t,e,n){return t+(n?" ":"")+Bu(e)}));var Gu=Ro((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Bu=So("toUpperCase");function Fu(t,e,n){return t=au(t),void 0===(e=n?void 0:e)?function(t){return Lt.test(t)}(t)?function(t){return t.match(Ut)||[]}(t):function(t){return t.match(Z)||[]}(t):t.match(e)||[]}var Hu=Gr((function(t,e){try{return ie(t,void 0,e)}catch(t){return Bs(t)?t:new Q(t)}})),Vu=Ko((function(t,e){return ue(e,(function(e){e=Ai(e),zn(t,e,Es(t[e],t))})),t}));function Yu(t){return function(){return t}}var Wu=Po(),Ku=Po(!0);function qu(t){return t}function zu(t){return Or("function"==typeof t?t:Jn(t,1))}var Qu=Gr((function(t,e){return function(n){return Er(n,t,e)}})),$u=Gr((function(t,e){return function(n){return Er(t,n,e)}}));function Ju(t,e,n){var r=wu(e),o=fr(e,r);null!=n||Ys(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=fr(e,wu(e)));var i=!(Ys(n)&&"chain"in n&&!n.chain),s=Fs(t);return ue(o,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=Eo(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,de([this.value()],arguments))})})),t}function Xu(){}var Zu=No(he),ta=No(ce),ea=No(_e);function na(t){return li(t)?Se(Ai(t)):function(t){return function(e){return pr(e,t)}}(t)}var ra=Uo(),oa=Uo(!0);function ia(){return[]}function sa(){return!1}var ua=ko((function(t,e){return t+e}),0),aa=jo("ceil"),ca=ko((function(t,e){return t/e}),1),la=jo("floor");var fa,pa=ko((function(t,e){return t*e}),1),ha=jo("round"),da=ko((function(t,e){return t-e}),0);return Pn.after=function(t,e){if("function"!=typeof e)throw new _t(i);return t=ou(t),function(){if(--t<1)return e.apply(this,arguments)}},Pn.ary=_s,Pn.assign=cu,Pn.assignIn=lu,Pn.assignInWith=fu,Pn.assignWith=pu,Pn.at=hu,Pn.before=bs,Pn.bind=Es,Pn.bindAll=Vu,Pn.bindKey=gs,Pn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ds(t)?t:[t]},Pn.chain=ns,Pn.chunk=function(t,e,n){e=(n?ci(t,e,n):void 0===e)?1:un(ou(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var i=0,s=0,u=r(Ze(o/e));i<o;)u[s++]=Kr(t,i,i+=e);return u},Pn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},Pn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],o=t;o--;)e[o-1]=arguments[o];return de(Ds(n)?Eo(n):[n],sr(e,1))},Pn.cond=function(t){var e=null==t?0:t.length,n=Xo();return t=e?he(t,(function(t){if("function"!=typeof t[1])throw new _t(i);return[n(t[0]),t[1]]})):[],Gr((function(n){for(var r=-1;++r<e;){var o=t[r];if(ie(o[0],this,n))return ie(o[1],this,n)}}))},Pn.conforms=function(t){return function(t){var e=wu(t);return function(n){return Xn(n,t,e)}}(Jn(t,1))},Pn.constant=Yu,Pn.countBy=is,Pn.create=function(t,e){var n=Cn(t);return null==e?n:qn(n,e)},Pn.curry=function t(e,n,r){var o=Fo(e,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=t.placeholder,o},Pn.curryRight=function t(e,n,r){var o=Fo(e,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=t.placeholder,o},Pn.debounce=ws,Pn.defaults=du,Pn.defaultsDeep=yu,Pn.defer=Ts,Pn.delay=ms,Pn.difference=Ci,Pn.differenceBy=Ii,Pn.differenceWith=ki,Pn.drop=function(t,e,n){var r=null==t?0:t.length;return r?Kr(t,(e=n||void 0===e?1:ou(e))<0?0:e,r):[]},Pn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Kr(t,0,(e=r-(e=n||void 0===e?1:ou(e)))<0?0:e):[]},Pn.dropRightWhile=function(t,e){return t&&t.length?no(t,Xo(e,3),!0,!0):[]},Pn.dropWhile=function(t,e){return t&&t.length?no(t,Xo(e,3),!0):[]},Pn.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&ci(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=ou(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:ou(r))<0&&(r+=o),r=n>r?0:iu(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Pn.filter=function(t,e){return(Ds(t)?le:ir)(t,Xo(e,3))},Pn.flatMap=function(t,e){return sr(hs(t,e),1)},Pn.flatMapDeep=function(t,e){return sr(hs(t,e),1/0)},Pn.flatMapDepth=function(t,e,n){return n=void 0===n?1:ou(n),sr(hs(t,e),n)},Pn.flatten=Ui,Pn.flattenDeep=function(t){return(null==t?0:t.length)?sr(t,1/0):[]},Pn.flattenDepth=function(t,e){return(null==t?0:t.length)?sr(t,e=void 0===e?1:ou(e)):[]},Pn.flip=function(t){return Fo(t,512)},Pn.flow=Wu,Pn.flowRight=Ku,Pn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},Pn.functions=function(t){return null==t?[]:fr(t,wu(t))},Pn.functionsIn=function(t){return null==t?[]:fr(t,Tu(t))},Pn.groupBy=ls,Pn.initial=function(t){return(null==t?0:t.length)?Kr(t,0,-1):[]},Pn.intersection=Li,Pn.intersectionBy=ji,Pn.intersectionWith=Gi,Pn.invert=bu,Pn.invertBy=Eu,Pn.invokeMap=fs,Pn.iteratee=zu,Pn.keyBy=ps,Pn.keys=wu,Pn.keysIn=Tu,Pn.map=hs,Pn.mapKeys=function(t,e){var n={};return e=Xo(e,3),cr(t,(function(t,r,o){zn(n,e(t,r,o),t)})),n},Pn.mapValues=function(t,e){var n={};return e=Xo(e,3),cr(t,(function(t,r,o){zn(n,r,e(t,r,o))})),n},Pn.matches=function(t){return Pr(Jn(t,1))},Pn.matchesProperty=function(t,e){return Cr(t,Jn(e,1))},Pn.memoize=Os,Pn.merge=mu,Pn.mergeWith=Ou,Pn.method=Qu,Pn.methodOf=$u,Pn.mixin=Ju,Pn.negate=Ss,Pn.nthArg=function(t){return t=ou(t),Gr((function(e){return kr(e,t)}))},Pn.omit=Su,Pn.omitBy=function(t,e){return Au(t,Ss(Xo(e)))},Pn.once=function(t){return bs(2,t)},Pn.orderBy=function(t,e,n,r){return null==t?[]:(Ds(e)||(e=null==e?[]:[e]),Ds(n=r?void 0:n)||(n=null==n?[]:[n]),Nr(t,e,n))},Pn.over=Zu,Pn.overArgs=Rs,Pn.overEvery=ta,Pn.overSome=ea,Pn.partial=As,Pn.partialRight=xs,Pn.partition=ds,Pn.pick=Ru,Pn.pickBy=Au,Pn.property=na,Pn.propertyOf=function(t){return function(e){return null==t?void 0:pr(t,e)}},Pn.pull=Fi,Pn.pullAll=Hi,Pn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,Xo(n,2)):t},Pn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,void 0,n):t},Pn.pullAt=Vi,Pn.range=ra,Pn.rangeRight=oa,Pn.rearg=Ps,Pn.reject=function(t,e){return(Ds(t)?le:ir)(t,Ss(Xo(e,3)))},Pn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=Xo(e,3);++r<i;){var s=t[r];e(s,r,t)&&(n.push(s),o.push(r))}return Mr(t,o),n},Pn.rest=function(t,e){if("function"!=typeof t)throw new _t(i);return Gr(t,e=void 0===e?e:ou(e))},Pn.reverse=Yi,Pn.sampleSize=function(t,e,n){return e=(n?ci(t,e,n):void 0===e)?1:ou(e),(Ds(t)?Fn:Fr)(t,e)},Pn.set=function(t,e,n){return null==t?t:Hr(t,e,n)},Pn.setWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:Hr(t,e,n,r)},Pn.shuffle=function(t){return(Ds(t)?Hn:Wr)(t)},Pn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&ci(t,e,n)?(e=0,n=r):(e=null==e?0:ou(e),n=void 0===n?r:ou(n)),Kr(t,e,n)):[]},Pn.sortBy=ys,Pn.sortedUniq=function(t){return t&&t.length?$r(t):[]},Pn.sortedUniqBy=function(t,e){return t&&t.length?$r(t,Xo(e,2)):[]},Pn.split=function(t,e,n){return n&&"number"!=typeof n&&ci(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=au(t))&&("string"==typeof e||null!=e&&!Qs(e))&&!(e=Xr(e))&&Be(t)?lo(qe(t),0,n):t.split(e,n):[]},Pn.spread=function(t,e){if("function"!=typeof t)throw new _t(i);return e=null==e?0:un(ou(e),0),Gr((function(n){var r=n[e],o=lo(n,0,e);return r&&de(o,r),ie(t,this,o)}))},Pn.tail=function(t){var e=null==t?0:t.length;return e?Kr(t,1,e):[]},Pn.take=function(t,e,n){return t&&t.length?Kr(t,0,(e=n||void 0===e?1:ou(e))<0?0:e):[]},Pn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Kr(t,(e=r-(e=n||void 0===e?1:ou(e)))<0?0:e,r):[]},Pn.takeRightWhile=function(t,e){return t&&t.length?no(t,Xo(e,3),!1,!0):[]},Pn.takeWhile=function(t,e){return t&&t.length?no(t,Xo(e,3)):[]},Pn.tap=function(t,e){return e(t),t},Pn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new _t(i);return Ys(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ws(t,e,{leading:r,maxWait:e,trailing:o})},Pn.thru=rs,Pn.toArray=nu,Pn.toPairs=xu,Pn.toPairsIn=Pu,Pn.toPath=function(t){return Ds(t)?he(t,Ai):Xs(t)?[t]:Eo(Ri(au(t)))},Pn.toPlainObject=uu,Pn.transform=function(t,e,n){var r=Ds(t),o=r||js(t)||Zs(t);if(e=Xo(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Ys(t)&&Fs(i)?Cn(Ht(t)):{}}return(o?ue:cr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Pn.unary=function(t){return _s(t,1)},Pn.union=Wi,Pn.unionBy=Ki,Pn.unionWith=qi,Pn.uniq=function(t){return t&&t.length?Zr(t):[]},Pn.uniqBy=function(t,e){return t&&t.length?Zr(t,Xo(e,2)):[]},Pn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Zr(t,void 0,e):[]},Pn.unset=function(t,e){return null==t||to(t,e)},Pn.unzip=zi,Pn.unzipWith=Qi,Pn.update=function(t,e,n){return null==t?t:eo(t,e,uo(n))},Pn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:eo(t,e,uo(n),r)},Pn.values=Cu,Pn.valuesIn=function(t){return null==t?[]:ke(t,Tu(t))},Pn.without=$i,Pn.words=Fu,Pn.wrap=function(t,e){return As(uo(e),t)},Pn.xor=Ji,Pn.xorBy=Xi,Pn.xorWith=Zi,Pn.zip=ts,Pn.zipObject=function(t,e){return io(t||[],e||[],Yn)},Pn.zipObjectDeep=function(t,e){return io(t||[],e||[],Hr)},Pn.zipWith=es,Pn.entries=xu,Pn.entriesIn=Pu,Pn.extend=lu,Pn.extendWith=fu,Ju(Pn,Pn),Pn.add=ua,Pn.attempt=Hu,Pn.camelCase=Iu,Pn.capitalize=ku,Pn.ceil=aa,Pn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=su(n))==n?n:0),void 0!==e&&(e=(e=su(e))==e?e:0),$n(su(t),e,n)},Pn.clone=function(t){return Jn(t,4)},Pn.cloneDeep=function(t){return Jn(t,5)},Pn.cloneDeepWith=function(t,e){return Jn(t,5,e="function"==typeof e?e:void 0)},Pn.cloneWith=function(t,e){return Jn(t,4,e="function"==typeof e?e:void 0)},Pn.conformsTo=function(t,e){return null==e||Xn(t,e,wu(e))},Pn.deburr=Nu,Pn.defaultTo=function(t,e){return null==t||t!=t?e:t},Pn.divide=ca,Pn.endsWith=function(t,e,n){t=au(t),e=Xr(e);var r=t.length,o=n=void 0===n?r:$n(ou(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Pn.eq=Cs,Pn.escape=function(t){return(t=au(t))&&G.test(t)?t.replace(L,je):t},Pn.escapeRegExp=function(t){return(t=au(t))&&q.test(t)?t.replace(K,"\\$&"):t},Pn.every=function(t,e,n){var r=Ds(t)?ce:rr;return n&&ci(t,e,n)&&(e=void 0),r(t,Xo(e,3))},Pn.find=ss,Pn.findIndex=Ni,Pn.findKey=function(t,e){return Ee(t,Xo(e,3),cr)},Pn.findLast=us,Pn.findLastIndex=Di,Pn.findLastKey=function(t,e){return Ee(t,Xo(e,3),lr)},Pn.floor=la,Pn.forEach=as,Pn.forEachRight=cs,Pn.forIn=function(t,e){return null==t?t:ur(t,Xo(e,3),Tu)},Pn.forInRight=function(t,e){return null==t?t:ar(t,Xo(e,3),Tu)},Pn.forOwn=function(t,e){return t&&cr(t,Xo(e,3))},Pn.forOwnRight=function(t,e){return t&&lr(t,Xo(e,3))},Pn.get=vu,Pn.gt=Is,Pn.gte=ks,Pn.has=function(t,e){return null!=t&&ii(t,e,vr)},Pn.hasIn=_u,Pn.head=Mi,Pn.identity=qu,Pn.includes=function(t,e,n,r){t=Ms(t)?t:Cu(t),n=n&&!r?ou(n):0;var o=t.length;return n<0&&(n=un(o+n,0)),Js(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&we(t,e,n)>-1},Pn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ou(n);return o<0&&(o=un(r+o,0)),we(t,e,o)},Pn.inRange=function(t,e,n){return e=ru(e),void 0===n?(n=e,e=0):n=ru(n),function(t,e,n){return t>=an(e,n)&&t<un(e,n)}(t=su(t),e,n)},Pn.invoke=gu,Pn.isArguments=Ns,Pn.isArray=Ds,Pn.isArrayBuffer=Us,Pn.isArrayLike=Ms,Pn.isArrayLikeObject=Ls,Pn.isBoolean=function(t){return!0===t||!1===t||Ws(t)&&dr(t)==l},Pn.isBuffer=js,Pn.isDate=Gs,Pn.isElement=function(t){return Ws(t)&&1===t.nodeType&&!zs(t)},Pn.isEmpty=function(t){if(null==t)return!0;if(Ms(t)&&(Ds(t)||"string"==typeof t||"function"==typeof t.splice||js(t)||Zs(t)||Ns(t)))return!t.length;var e=oi(t);if(e==y||e==E)return!t.size;if(hi(t))return!Sr(t).length;for(var n in t)if(mt.call(t,n))return!1;return!0},Pn.isEqual=function(t,e){return wr(t,e)},Pn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===r?wr(t,e,void 0,n):!!r},Pn.isError=Bs,Pn.isFinite=function(t){return"number"==typeof t&&rn(t)},Pn.isFunction=Fs,Pn.isInteger=Hs,Pn.isLength=Vs,Pn.isMap=Ks,Pn.isMatch=function(t,e){return t===e||Tr(t,e,ti(e))},Pn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,Tr(t,e,ti(e),n)},Pn.isNaN=function(t){return qs(t)&&t!=+t},Pn.isNative=function(t){if(pi(t))throw new Q("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return mr(t)},Pn.isNil=function(t){return null==t},Pn.isNull=function(t){return null===t},Pn.isNumber=qs,Pn.isObject=Ys,Pn.isObjectLike=Ws,Pn.isPlainObject=zs,Pn.isRegExp=Qs,Pn.isSafeInteger=function(t){return Hs(t)&&t>=-9007199254740991&&t<=9007199254740991},Pn.isSet=$s,Pn.isString=Js,Pn.isSymbol=Xs,Pn.isTypedArray=Zs,Pn.isUndefined=function(t){return void 0===t},Pn.isWeakMap=function(t){return Ws(t)&&oi(t)==T},Pn.isWeakSet=function(t){return Ws(t)&&"[object WeakSet]"==dr(t)},Pn.join=function(t,e){return null==t?"":on.call(t,e)},Pn.kebabCase=Du,Pn.last=Bi,Pn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=ou(n))<0?un(r+o,0):an(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):ge(t,me,o,!0)},Pn.lowerCase=Uu,Pn.lowerFirst=Mu,Pn.lt=tu,Pn.lte=eu,Pn.max=function(t){return t&&t.length?or(t,qu,yr):void 0},Pn.maxBy=function(t,e){return t&&t.length?or(t,Xo(e,2),yr):void 0},Pn.mean=function(t){return Oe(t,qu)},Pn.meanBy=function(t,e){return Oe(t,Xo(e,2))},Pn.min=function(t){return t&&t.length?or(t,qu,Ar):void 0},Pn.minBy=function(t,e){return t&&t.length?or(t,Xo(e,2),Ar):void 0},Pn.stubArray=ia,Pn.stubFalse=sa,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=pa,Pn.nth=function(t,e){return t&&t.length?kr(t,ou(e)):void 0},Pn.noConflict=function(){return qt._===this&&(qt._=xt),this},Pn.noop=Xu,Pn.now=vs,Pn.pad=function(t,e,n){t=au(t);var r=(e=ou(e))?Ke(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Do(tn(o),n)+t+Do(Ze(o),n)},Pn.padEnd=function(t,e,n){t=au(t);var r=(e=ou(e))?Ke(t):0;return e&&r<e?t+Do(e-r,n):t},Pn.padStart=function(t,e,n){t=au(t);var r=(e=ou(e))?Ke(t):0;return e&&r<e?Do(e-r,n)+t:t},Pn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),ln(au(t).replace(z,""),e||0)},Pn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&ci(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=ru(t),void 0===e?(e=t,t=0):e=ru(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=fn();return an(t+o*(e-t+Vt("1e-"+((o+"").length-1))),e)}return Lr(t,e)},Pn.reduce=function(t,e,n){var r=Ds(t)?ye:Ae,o=arguments.length<3;return r(t,Xo(e,4),n,o,er)},Pn.reduceRight=function(t,e,n){var r=Ds(t)?ve:Ae,o=arguments.length<3;return r(t,Xo(e,4),n,o,nr)},Pn.repeat=function(t,e,n){return e=(n?ci(t,e,n):void 0===e)?1:ou(e),jr(au(t),e)},Pn.replace=function(){var t=arguments,e=au(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Pn.result=function(t,e,n){var r=-1,o=(e=ao(e,t)).length;for(o||(o=1,t=void 0);++r<o;){var i=null==t?void 0:t[Ai(e[r])];void 0===i&&(r=o,i=n),t=Fs(i)?i.call(t):i}return t},Pn.round=ha,Pn.runInContext=t,Pn.sample=function(t){return(Ds(t)?Bn:Br)(t)},Pn.size=function(t){if(null==t)return 0;if(Ms(t))return Js(t)?Ke(t):t.length;var e=oi(t);return e==y||e==E?t.size:Sr(t).length},Pn.snakeCase=Lu,Pn.some=function(t,e,n){var r=Ds(t)?_e:qr;return n&&ci(t,e,n)&&(e=void 0),r(t,Xo(e,3))},Pn.sortedIndex=function(t,e){return zr(t,e)},Pn.sortedIndexBy=function(t,e,n){return Qr(t,e,Xo(n,2))},Pn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=zr(t,e);if(r<n&&Cs(t[r],e))return r}return-1},Pn.sortedLastIndex=function(t,e){return zr(t,e,!0)},Pn.sortedLastIndexBy=function(t,e,n){return Qr(t,e,Xo(n,2),!0)},Pn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=zr(t,e,!0)-1;if(Cs(t[n],e))return n}return-1},Pn.startCase=ju,Pn.startsWith=function(t,e,n){return t=au(t),n=null==n?0:$n(ou(n),0,t.length),e=Xr(e),t.slice(n,n+e.length)==e},Pn.subtract=da,Pn.sum=function(t){return t&&t.length?xe(t,qu):0},Pn.sumBy=function(t,e){return t&&t.length?xe(t,Xo(e,2)):0},Pn.template=function(t,e,n){var r=Pn.templateSettings;n&&ci(t,e,n)&&(e=void 0),t=au(t),e=fu({},e,r,Ho);var o,i,s=fu({},e.imports,r.imports,Ho),u=wu(s),a=ke(s,u),c=0,l=e.interpolate||lt,f="__p += '",p=yt((e.escape||lt).source+"|"+l.source+"|"+(l===H?nt:lt).source+"|"+(e.evaluate||lt).source+"|$","g"),h="//# sourceURL="+(mt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Gt+"]")+"\n";t.replace(p,(function(e,n,r,s,u,a){return r||(r=s),f+=t.slice(c,a).replace(ft,Ge),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),u&&(i=!0,f+="';\n"+u+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=a+e.length,e})),f+="';\n";var d=mt.call(e,"variable")&&e.variable;if(d){if(tt.test(d))throw new Q("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(i?f.replace(N,""):f).replace(D,"$1").replace(U,"$1;"),f="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var y=Hu((function(){return pt(u,h+"return "+f).apply(void 0,a)}));if(y.source=f,Bs(y))throw y;return y},Pn.times=function(t,e){if((t=ou(t))<1||t>9007199254740991)return[];var n=4294967295,r=an(t,4294967295);t-=4294967295;for(var o=Pe(r,e=Xo(e));++n<t;)e(n);return o},Pn.toFinite=ru,Pn.toInteger=ou,Pn.toLength=iu,Pn.toLower=function(t){return au(t).toLowerCase()},Pn.toNumber=su,Pn.toSafeInteger=function(t){return t?$n(ou(t),-9007199254740991,9007199254740991):0===t?t:0},Pn.toString=au,Pn.toUpper=function(t){return au(t).toUpperCase()},Pn.trim=function(t,e,n){if((t=au(t))&&(n||void 0===e))return Ce(t);if(!t||!(e=Xr(e)))return t;var r=qe(t),o=qe(e);return lo(r,De(r,o),Ue(r,o)+1).join("")},Pn.trimEnd=function(t,e,n){if((t=au(t))&&(n||void 0===e))return t.slice(0,ze(t)+1);if(!t||!(e=Xr(e)))return t;var r=qe(t);return lo(r,0,Ue(r,qe(e))+1).join("")},Pn.trimStart=function(t,e,n){if((t=au(t))&&(n||void 0===e))return t.replace(z,"");if(!t||!(e=Xr(e)))return t;var r=qe(t);return lo(r,De(r,qe(e))).join("")},Pn.truncate=function(t,e){var n=30,r="...";if(Ys(e)){var o="separator"in e?e.separator:o;n="length"in e?ou(e.length):n,r="omission"in e?Xr(e.omission):r}var i=(t=au(t)).length;if(Be(t)){var s=qe(t);i=s.length}if(n>=i)return t;var u=n-Ke(r);if(u<1)return r;var a=s?lo(s,0,u).join(""):t.slice(0,u);if(void 0===o)return a+r;if(s&&(u+=a.length-u),Qs(o)){if(t.slice(u).search(o)){var c,l=a;for(o.global||(o=yt(o.source,au(rt.exec(o))+"g")),o.lastIndex=0;c=o.exec(l);)var f=c.index;a=a.slice(0,void 0===f?u:f)}}else if(t.indexOf(Xr(o),u)!=u){var p=a.lastIndexOf(o);p>-1&&(a=a.slice(0,p))}return a+r},Pn.unescape=function(t){return(t=au(t))&&j.test(t)?t.replace(M,Qe):t},Pn.uniqueId=function(t){var e=++Ot;return au(t)+e},Pn.upperCase=Gu,Pn.upperFirst=Bu,Pn.each=as,Pn.eachRight=cs,Pn.first=Mi,Ju(Pn,(fa={},cr(Pn,(function(t,e){mt.call(Pn.prototype,e)||(fa[e]=t)})),fa),{chain:!1}),Pn.VERSION="4.17.21",ue(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Pn[t].placeholder=Pn})),ue(["drop","take"],(function(t,e){Nn.prototype[t]=function(n){n=void 0===n?1:un(ou(n),0);var r=this.__filtered__&&!e?new Nn(this):this.clone();return r.__filtered__?r.__takeCount__=an(n,r.__takeCount__):r.__views__.push({size:an(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Nn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ue(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Nn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Xo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),ue(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Nn.prototype[t]=function(){return this[n](1).value()[0]}})),ue(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Nn.prototype[t]=function(){return this.__filtered__?new Nn(this):this[n](1)}})),Nn.prototype.compact=function(){return this.filter(qu)},Nn.prototype.find=function(t){return this.filter(t).head()},Nn.prototype.findLast=function(t){return this.reverse().find(t)},Nn.prototype.invokeMap=Gr((function(t,e){return"function"==typeof t?new Nn(this):this.map((function(n){return Er(n,t,e)}))})),Nn.prototype.reject=function(t){return this.filter(Ss(Xo(t)))},Nn.prototype.slice=function(t,e){t=ou(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Nn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=ou(e))<0?n.dropRight(-e):n.take(e-t)),n)},Nn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Nn.prototype.toArray=function(){return this.take(4294967295)},cr(Nn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Pn[r?"take"+("last"==e?"Right":""):e],i=r||/^find/.test(e);o&&(Pn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof Nn,a=s[0],c=u||Ds(e),l=function(t){var e=o.apply(Pn,de([t],s));return r&&f?e[0]:e};c&&n&&"function"==typeof a&&1!=a.length&&(u=c=!1);var f=this.__chain__,p=!!this.__actions__.length,h=i&&!f,d=u&&!p;if(!i&&c){e=d?e:new Nn(this);var y=t.apply(e,s);return y.__actions__.push({func:rs,args:[l],thisArg:void 0}),new kn(y,f)}return h&&d?t.apply(this,s):(y=this.thru(l),h?r?y.value()[0]:y.value():y)})})),ue(["pop","push","shift","sort","splice","unshift"],(function(t){var e=bt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Pn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Ds(o)?o:[],t)}return this[n]((function(n){return e.apply(Ds(n)?n:[],t)}))}})),cr(Nn.prototype,(function(t,e){var n=Pn[e];if(n){var r=n.name+"";mt.call(gn,r)||(gn[r]=[]),gn[r].push({name:e,func:n})}})),gn[Co(void 0,2).name]=[{name:"wrapper",func:void 0}],Nn.prototype.clone=function(){var t=new Nn(this.__wrapped__);return t.__actions__=Eo(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Eo(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Eo(this.__views__),t},Nn.prototype.reverse=function(){if(this.__filtered__){var t=new Nn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Nn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ds(t),r=e<0,o=n?t.length:0,i=function(t,e,n){var r=-1,o=n.length;for(;++r<o;){var i=n[r],s=i.size;switch(i.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=an(e,t+s);break;case"takeRight":t=un(t,e-s)}}return{start:t,end:e}}(0,o,this.__views__),s=i.start,u=i.end,a=u-s,c=r?u:s-1,l=this.__iteratees__,f=l.length,p=0,h=an(a,this.__takeCount__);if(!n||!r&&o==a&&h==a)return ro(t,this.__actions__);var d=[];t:for(;a--&&p<h;){for(var y=-1,v=t[c+=e];++y<f;){var _=l[y],b=_.iteratee,E=_.type,g=b(v);if(2==E)v=g;else if(!g){if(1==E)continue t;break t}}d[p++]=v}return d},Pn.prototype.at=os,Pn.prototype.chain=function(){return ns(this)},Pn.prototype.commit=function(){return new kn(this.value(),this.__chain__)},Pn.prototype.next=function(){void 0===this.__values__&&(this.__values__=nu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Pn.prototype.plant=function(t){for(var e,n=this;n instanceof In;){var r=Pi(n);r.__index__=0,r.__values__=void 0,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Pn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Nn){var e=t;return this.__actions__.length&&(e=new Nn(this)),(e=e.reverse()).__actions__.push({func:rs,args:[Yi],thisArg:void 0}),new kn(e,this.__chain__)}return this.thru(Yi)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return ro(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Jt&&(Pn.prototype[Jt]=function(){return this}),Pn}();qt._=$e,void 0===(o=function(){return $e}.call(e,n,e,r))||(r.exports=o)}).call(this)}).call(this,n(104),n(144)(t))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),o=n(1);function i(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.project,this.thisArg))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(o.a)},function(t,e,n){"use strict";function r(t){return t&&"function"==typeof t.schedule}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));var r=n(2),o=new r.a((function(t){return t.complete()}));function i(t){return t?function(t){return new r.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):o}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.BringgException=e.logOnException=void 0;var u=n(11),a=n(39),c=n(47),l=n(164);e.logOnException=function(t,e,n){var r=n.value;return n.value=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r.apply(this,t)];case 1:return[2,n.sent()];case 2:e=n.sent();try{a.default.error(e)}catch(t){}return e instanceof p?[2,Promise.reject(e)]:[2,Promise.reject(new p(c.ExceptionReason.UNCAUGHT,e.message,e))];case 3:return[2]}}))}))},n};var f=function(t){return u.isUndefined(t)?null:u.isFunction(t)?t:function(){return t.toString()}},p=function(t){function e(e,n,r,o){var i=t.call(this)||this;return i.data=o,i.reason=e,i.error=r,i.messageProducer=f(n)||function(){return e.name},i._details=function(){},i}return o(e,t),Object.defineProperty(e.prototype,"message",{get:function(){try{return this.messageProducer()}catch(t){a.default.error("caught exception while trying to produce error message...")}},set:function(t){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"details",{get:function(){try{return this._details()}catch(t){a.default.error("caught exception while trying to produce error details...")}},set:function(t){var e=this;this._details=f(t)||function(){return e.message}},enumerable:!1,configurable:!0}),e.serviceException=function(t){return function(){return new e(c.ExceptionReason.UNSUCCESSFUL_RESULT,t)}},e}(l.ExtendableError);e.BringgException=p},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(2),o=n(46),i=n(84);function s(t,e){return e?Object(i.a)(t,e):t instanceof r.a?t:new r.a(Object(o.a)(t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(0),o=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parent=e,o.outerValue=n,o.outerIndex=r,o.index=0,o}return r.a(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(1).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Route=void 0;var r=n(15),o=n(47),i=n(11),s=function(){function t(t,e){if("/"!=t.charAt(0))throw new r.BringgException(o.ExceptionReason.INTERNAL_ROUTING_ERROR,"uri must start with a leading slash!");this.uri=t,this.httpMethod=e}return t.prototype.applyParams=function(t){return this.uri.replace(/{:([^}]+)}/gi,(function(e,n){if(i.isUndefined(t[n]))throw new r.BringgException(o.ExceptionReason.INTERNAL_ROUTING_ERROR,(function(){return"couldn't find matching parameter to macro: {:"+n+"}"}));return t[n]}))},t}();e.Route=s},function(t,e,n){"use strict";function r(){}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),o=n(1);function i(t,e){return function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.predicate,this.thisArg))},t}(),u=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.count=0,o}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return u}));var r,o=n(14),i=n(42),s=n(51);r||(r={});var u=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return Object(i.a)(this.value);case"E":return Object(s.a)(this.error);case"C":return Object(o.b)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},function(t,e,n){"use strict";var r=n(107),o=Object.prototype.toString;function i(t){return"[object Array]"===o.call(t)}function s(t){return void 0===t}function u(t){return null!==t&&"object"==typeof t}function a(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===o.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),i(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:i,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:u,isPlainObject:a,isUndefined:s,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:c,isStream:function(t){return u(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function t(){var e={};function n(n,r){a(e[r])&&a(n)?e[r]=t(e[r],n):a(n)?e[r]=t({},n):i(n)?e[r]=n.slice():e[r]=n}for(var r=0,o=arguments.length;r<o;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.SessionBasedService=e.HTTP_EVENTS=void 0;var i=n(91),s=n(67),u=n(15),a=n(11),c=n(47);e.HTTP_EVENTS={HTTP_REQUEST_FAILURE:"http failure"};var l=function(){function t(t,e){this._endpoint=t,this._session=e}return Object.defineProperty(t.prototype,"sendDataEvent",{get:function(){return this.session.sendDataEvent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endpoint",{get:function(){return this._endpoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"session",{get:function(){return this._session},enumerable:!1,configurable:!0}),t.prototype.handleAuthorizedRequest=function(t,e,n,l,f,p,h){return void 0===l&&(l={}),void 0===f&&(f={}),void 0===p&&(p={}),void 0===h&&(h={}),r(this,void 0,void 0,(function(){var r,d,y,v,_=this;return o(this,(function(o){switch(o.label){case 0:return[4,new i.AuthorizedServiceRequest(this.session.clientId,this.session.user.authentication_token).invoke(this.endpoint,t,f,p,l,h).handle((function(e){var o=e.data,d=e.status;if(r=d,d!=s.HttpStatusCode.OK&&d!=s.HttpStatusCode.CREATED&&d!=s.HttpStatusCode.NO_CONTENT)throw _.notifyHttpError(new u.BringgException(c.ExceptionReason.fromHttpStatusCode(d),s.HttpStatusCode.getStatusText(d),null,{request:{route:t,payload:l,routeParams:f,queryString:p,headers:h,clientId:_.session.clientId,authenticationToken:_.session.user.authentication_token},response:e})),i.logErrorResponse(e),a.isFunction(n)?n():e;return o}))];case 1:if(d=o.sent(),!1===(y=d).success)throw(v=n()).details=y.message,v.rc=y.rc,v.statusCode=r,v;return[2,e(d)]}}))}))},t.prototype.notifyHttpError=function(t){this.sendDataEvent(e.HTTP_EVENTS.HTTP_REQUEST_FAILURE,t)},t}();e.SessionBasedService=l},function(t,e,n){"use strict";function r(t){return t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",(function(){return o}));var o=r()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(0),o=n(3),i=n(4),s=n(17),u=n(12),a=n(16);function c(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(c((function(n,r){return Object(a.a)(t(n,r)).pipe(Object(u.a)((function(t,o){return e(n,t,r,o)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new l(t,n))})}var l=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.project,this.concurrent))},t}(),f=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return r.a(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=new s.a(this,e,n),i=this.destination;i.add(r);var u=Object(o.a)(this,t,void 0,void 0,r);u!==r&&i.add(u)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){"use strict";function r(t){return"function"==typeof t}n.d(e,"a",(function(){return r}))},function(t,e,n){(function(r){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(r++,"%c"===t&&(o=r))}),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(176)(e);const{formatters:o}=t.exports;o.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,n(111))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),o=n(66),i=function(t){function e(n,r){void 0===r&&(r=o.a.now);var i=t.call(this,n,(function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()}))||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.a(e,t),e.prototype.schedule=function(n,r,o){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,o):t.prototype.schedule.call(this,n,r,o)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(2),o=n(87),i=n(58);function s(t,e){return e?Object(i.a)(t,e):new r.a(Object(o.a)(t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(0),o=n(7),i=n(6),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return r.a(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),i.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),i.a.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(o.a)},function(t,e,n){"use strict";var r=n(0),o=function(t){function e(e,n){return t.call(this)||this}return r.a(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(6).a);n.d(e,"a",(function(){return i}));var i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.a(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(o)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(8);function o(t){return!Object(r.a)(t)&&t-parseFloat(t)+1>=0}},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.LoggerUtil=e.DEFAULT_LOG_LEVEL=e.LOG_ALL=e.LOG_DEBUG=e.LOG_INFO=e.LOG_WARN=e.LOG_ERROR=e.LOG_FATAL=e.LOG_NONE=e.LOG_LEVEL=void 0,function(t){t[t.TRACE=2]="TRACE",t[t.DEBUG=4]="DEBUG",t[t.INFO=8]="INFO",t[t.WARN=16]="WARN",t[t.ERROR=32]="ERROR",t[t.FATAL=64]="FATAL"}(r=e.LOG_LEVEL||(e.LOG_LEVEL={})),e.LOG_NONE=0,e.LOG_FATAL=r.FATAL,e.LOG_ERROR=r.ERROR|r.FATAL,e.LOG_WARN=r.WARN|r.ERROR|r.FATAL,e.LOG_INFO=r.INFO|r.WARN|r.ERROR|r.FATAL,e.LOG_DEBUG=r.DEBUG|r.INFO|r.WARN|r.ERROR|r.FATAL,e.LOG_ALL=r.TRACE|r.DEBUG|r.INFO|r.WARN|r.ERROR|r.FATAL,e.DEFAULT_LOG_LEVEL=e.LOG_WARN;var o=e.DEFAULT_LOG_LEVEL,i=console;function s(t,n,r){(o&t)>e.LOG_NONE&&n.apply(null,r)}var u=function(){function t(){}return t.delegateLogger=function(t){i=t},t.setLogLevel=function(t){o=t},t}();e.LoggerUtil=u,e.default={trace:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.TRACE,i.debug,arguments)},debug:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.DEBUG,i.debug,arguments)},info:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.INFO,i.info,arguments)},warn:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.WARN,i.warn,arguments)},error:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.ERROR,i.error,arguments)},fatal:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];s(r.FATAL,i.error,arguments)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(42),o=n(77);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object(o.a)()(r.a.apply(void 0,t))}},function(t,e,n){"use strict";function r(t){setTimeout((function(){throw t}),0)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(13),o=n(35),i=n(58);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(r.a)(n)?(t.pop(),Object(i.a)(t,n)):Object(o.a)(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}));var r=n(20);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(t)}function i(t){return t?1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}:r.a}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){"use strict";var r=n(87),o=n(41),i=n(26),s=n(27),u=n(86),a=n(88),c=n(56);n.d(e,"a",(function(){return l}));var l=function(t){if(t&&"function"==typeof t[s.a])return l=t,function(t){var e=l[s.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(u.a)(t))return Object(r.a)(t);if(Object(a.a)(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,o.a),t};if(t&&"function"==typeof t[i.a])return e=t,function(t){for(var n=e[i.a]();;){var r=n.next();if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add((function(){n.return&&n.return()})),t};var e,n,l,f=Object(c.a)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+f+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExceptionReason=void 0;var r=n(106),o=function(t){return 1e5+t},i=new Map,s=function(){function t(t,e){this.name=t,this.code=e,i.set(e,this)}return t.fromHttpStatusCode=function(e){return i.get(o(e))||new t("HTTP_"+e,o(e))},t.UNCAUGHT=new t("UNCAUGHT",0),t.UNSUCCESSFUL_RESULT=new t("UNSUCCESSFUL_RESULT",1),t.INTERNAL_ROUTING_ERROR=new t("INTERNAL_ROUTING_ERROR",2),t.INCOMPATIBLE_SERVICE_RESPONSE=new t("INCOMPATIBLE_SERVICE_RESPONSE",3),t.ENTITY_NOT_FOUND=new t("ENTITY_NOT_FOUND",4),t.ILLEGAL_STATE=new t("ILLEGAL_STATE",5),t.INVALID_ARGUMENTS=new t("INVALID_ARGUMENTS",6),t.CAPTCHA_VERIFICATION_REQUIRED=new t("CAPTCHA_VERIFICATION_REQUIRED",7),t.HTTP_ACCEPTED=new t("HTTP_ACCEPTED",o(r.ACCEPTED)),t.HTTP_BAD_GATEWAY=new t("HTTP_BAD_GATEWAY",o(r.BAD_GATEWAY)),t.HTTP_BAD_REQUEST=new t("HTTP_BAD_REQUEST",o(r.BAD_REQUEST)),t.HTTP_CONFLICT=new t("HTTP_CONFLICT",o(r.CONFLICT)),t.HTTP_CONTINUE=new t("HTTP_CONTINUE",o(r.CONTINUE)),t.HTTP_CREATED=new t("HTTP_CREATED",o(r.CREATED)),t.HTTP_EXPECTATION_FAILED=new t("HTTP_EXPECTATION_FAILED",o(r.EXPECTATION_FAILED)),t.HTTP_FAILED_DEPENDENCY=new t("HTTP_FAILED_DEPENDENCY",o(r.FAILED_DEPENDENCY)),t.HTTP_FORBIDDEN=new t("HTTP_FORBIDDEN",o(r.FORBIDDEN)),t.HTTP_GATEWAY_TIMEOUT=new t("HTTP_GATEWAY_TIMEOUT",o(r.GATEWAY_TIMEOUT)),t.HTTP_GONE=new t("HTTP_GONE",o(r.GONE)),t.HTTP_HTTP_VERSION_NOT_SUPPORTED=new t("HTTP_HTTP_VERSION_NOT_SUPPORTED",o(r.HTTP_VERSION_NOT_SUPPORTED)),t.HTTP_IM_A_TEAPOT=new t("HTTP_IM_A_TEAPOT",o(r.IM_A_TEAPOT)),t.HTTP_INSUFFICIENT_SPACE_ON_RESOURCE=new t("HTTP_INSUFFICIENT_SPACE_ON_RESOURCE",o(r.INSUFFICIENT_SPACE_ON_RESOURCE)),t.HTTP_INSUFFICIENT_STORAGE=new t("HTTP_INSUFFICIENT_STORAGE",o(r.INSUFFICIENT_STORAGE)),t.HTTP_INTERNAL_SERVER_ERROR=new t("HTTP_INTERNAL_SERVER_ERROR",o(r.INTERNAL_SERVER_ERROR)),t.HTTP_LENGTH_REQUIRED=new t("HTTP_LENGTH_REQUIRED",o(r.LENGTH_REQUIRED)),t.HTTP_LOCKED=new t("HTTP_LOCKED",o(r.LOCKED)),t.HTTP_METHOD_FAILURE=new t("HTTP_METHOD_FAILURE",o(r.METHOD_FAILURE)),t.HTTP_METHOD_NOT_ALLOWED=new t("HTTP_METHOD_NOT_ALLOWED",o(r.METHOD_NOT_ALLOWED)),t.HTTP_MOVED_PERMANENTLY=new t("HTTP_MOVED_PERMANENTLY",o(r.MOVED_PERMANENTLY)),t.HTTP_MOVED_TEMPORARILY=new t("HTTP_MOVED_TEMPORARILY",o(r.MOVED_TEMPORARILY)),t.HTTP_MULTI_STATUS=new t("HTTP_MULTI_STATUS",o(r.MULTI_STATUS)),t.HTTP_MULTIPLE_CHOICES=new t("HTTP_MULTIPLE_CHOICES",o(r.MULTIPLE_CHOICES)),t.HTTP_NETWORK_AUTHENTICATION_REQUIRED=new t("HTTP_NETWORK_AUTHENTICATION_REQUIRED",o(r.NETWORK_AUTHENTICATION_REQUIRED)),t.HTTP_NO_CONTENT=new t("HTTP_NO_CONTENT",o(r.NO_CONTENT)),t.HTTP_NON_AUTHORITATIVE_INFORMATION=new t("HTTP_NON_AUTHORITATIVE_INFORMATION",o(r.NON_AUTHORITATIVE_INFORMATION)),t.HTTP_NOT_ACCEPTABLE=new t("HTTP_NOT_ACCEPTABLE",o(r.NOT_ACCEPTABLE)),t.HTTP_NOT_FOUND=new t("HTTP_NOT_FOUND",o(r.NOT_FOUND)),t.HTTP_NOT_IMPLEMENTED=new t("HTTP_NOT_IMPLEMENTED",o(r.NOT_IMPLEMENTED)),t.HTTP_NOT_MODIFIED=new t("HTTP_NOT_MODIFIED",o(r.NOT_MODIFIED)),t.HTTP_OK=new t("HTTP_OK",o(r.OK)),t.HTTP_PARTIAL_CONTENT=new t("HTTP_PARTIAL_CONTENT",o(r.PARTIAL_CONTENT)),t.HTTP_PAYMENT_REQUIRED=new t("HTTP_PAYMENT_REQUIRED",o(r.PAYMENT_REQUIRED)),t.HTTP_PERMANENT_REDIRECT=new t("HTTP_PERMANENT_REDIRECT",o(r.PERMANENT_REDIRECT)),t.HTTP_PRECONDITION_FAILED=new t("HTTP_PRECONDITION_FAILED",o(r.PRECONDITION_FAILED)),t.HTTP_PRECONDITION_REQUIRED=new t("HTTP_PRECONDITION_REQUIRED",o(r.PRECONDITION_REQUIRED)),t.HTTP_PROCESSING=new t("HTTP_PROCESSING",o(r.PROCESSING)),t.HTTP_PROXY_AUTHENTICATION_REQUIRED=new t("HTTP_PROXY_AUTHENTICATION_REQUIRED",o(r.PROXY_AUTHENTICATION_REQUIRED)),t.HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE=new t("HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE",o(r.REQUEST_HEADER_FIELDS_TOO_LARGE)),t.HTTP_REQUEST_TIMEOUT=new t("HTTP_REQUEST_TIMEOUT",o(r.REQUEST_TIMEOUT)),t.HTTP_REQUEST_TOO_LONG=new t("HTTP_REQUEST_TOO_LONG",o(r.REQUEST_TOO_LONG)),t.HTTP_REQUEST_URI_TOO_LONG=new t("HTTP_REQUEST_URI_TOO_LONG",o(r.REQUEST_URI_TOO_LONG)),t.HTTP_REQUESTED_RANGE_NOT_SATISFIABLE=new t("HTTP_REQUESTED_RANGE_NOT_SATISFIABLE",o(r.REQUESTED_RANGE_NOT_SATISFIABLE)),t.HTTP_RESET_CONTENT=new t("HTTP_RESET_CONTENT",o(r.RESET_CONTENT)),t.HTTP_SEE_OTHER=new t("HTTP_SEE_OTHER",o(r.SEE_OTHER)),t.HTTP_SERVICE_UNAVAILABLE=new t("HTTP_SERVICE_UNAVAILABLE",o(r.SERVICE_UNAVAILABLE)),t.HTTP_SWITCHING_PROTOCOLS=new t("HTTP_SWITCHING_PROTOCOLS",o(r.SWITCHING_PROTOCOLS)),t.HTTP_TEMPORARY_REDIRECT=new t("HTTP_TEMPORARY_REDIRECT",o(r.TEMPORARY_REDIRECT)),t.HTTP_TOO_MANY_REQUESTS=new t("HTTP_TOO_MANY_REQUESTS",o(r.TOO_MANY_REQUESTS)),t.HTTP_UNAUTHORIZED=new t("HTTP_UNAUTHORIZED",o(r.UNAUTHORIZED)),t.HTTP_UNPROCESSABLE_ENTITY=new t("HTTP_UNPROCESSABLE_ENTITY",o(r.UNPROCESSABLE_ENTITY)),t.HTTP_UNSUPPORTED_MEDIA_TYPE=new t("HTTP_UNSUPPORTED_MEDIA_TYPE",o(r.UNSUPPORTED_MEDIA_TYPE)),t.HTTP_USE_PROXY=new t("HTTP_USE_PROXY",o(r.USE_PROXY)),t}();e.ExceptionReason=s},function(t,e,n){"use strict";var r,o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.THROTTLE_TIME=e.ActionToFunction=e.Actions=void 0;var s,u=n(65),a=n(198),c=n(11),l=n(39);!function(t){t.CREATE="CREATE",t.UPDATE="UPDATE",t.REMOVE="REMOVE",t.CLEAR="CLEAR"}(s=e.Actions||(e.Actions={})),e.ActionToFunction=((r={})[s.CREATE]="onCreate",r[s.REMOVE]="onDelete",r[s.UPDATE]="onUpdate",r),e.THROTTLE_TIME=1e3;var f=function(){function t(){var t=this;this.onItemUpdateEvents=[],this.onItemCreatedEvents=[],this.onItemRemovedEvents=[],this.onListUpdateEvents=[],this.calculations=new Map,this._items=new Map,this.addCalculation=function(e){var n=c.uniqueId()+Date.now();return e.errors=[],e.uuid=n,t.calculations.set(n,e),n},this.removeCalculation=function(e){t.calculations.delete(e)},this.getCalculationValue=function(e){var n=t.calculations.get(e);if(!n)throw new Error("No Calculation with this uuid!");return n.value},this.handleCalculations=function(n,r){return o(t,void 0,void 0,(function(){return i(this,(function(t){return Array.from(this.calculations.values()).forEach((function(t){try{var o=c.get(t,e.ActionToFunction[r],c.noop);t.value=o(t.value,n)}catch(e){t.errors.push({type:r,error:e}),l.default.error("BaseStore Failed calculation - for calc: "+t.uuid,t.errors)}})),[2]}))}))},this.onItemCreated=function(e){return t.onItemCreatedEvents.push(e),function(){return t.onItemCreatedEvents.splice(t.onItemCreatedEvents.indexOf(e),1)}},this.onItemUpdate=function(e){return t.onItemUpdateEvents.push(e),function(){return t.onItemUpdateEvents.splice(t.onItemUpdateEvents.indexOf(e),1)}},this.onItemRemoved=function(e){return t.onItemRemovedEvents.push(e),function(){return t.onItemRemovedEvents.splice(t.onItemRemovedEvents.indexOf(e),1)}},this.onListUpdate=function(e){return t.onListUpdateEvents.push(e),function(){return t.onListUpdateEvents.splice(t.onListUpdateEvents.indexOf(e),1)}},this.unsubscribe=function(){t.onItemRemovedEvents=[],t.onItemUpdateEvents=[],t.onItemCreatedEvents=[],t.onListUpdateEvents=[]},this.handleStateUpdate=function(e,n){switch(n.type){case s.CREATE:return t._addToStore(e,n.payload);case s.UPDATE:return t._updateInStore(e,n.payload);case s.REMOVE:return t._removeFromStore(e,n.payload);case s.CLEAR:return t._clearStore(e);default:return e}},this.getItem=function(e){return t._items.get(c.toNumber(e))},this.getItems=function(){return Array.from(t._items.values())},this.getItemsByIds=function(e){var n=new Set(e);return t.getItems().filter((function(t){return n.has(t.id)}))},this.getItemsMap=function(){return t._items},this.items$=new a.Subject,this.state$=this.items$.pipe(u.scan((function(e,n){return t.handleStateUpdate(e,n)}),new Map)),this.state$.pipe(u.throttleTime(e.THROTTLE_TIME)).subscribe((function(e){t._items=e,t.onListUpdateEvents.forEach((function(e){return e(Array.from(t._items.values()))}))}))}return t.prototype.addToStore=function(t){this.items$.next({type:s.CREATE,payload:t})},t.prototype.updateInStore=function(t){this.items$.next({type:s.UPDATE,payload:t})},t.prototype.removeFromStore=function(t){this.items$.next({type:s.REMOVE,payload:t})},t.prototype.clearStore=function(){this.items$.next({type:s.CLEAR,payload:void 0})},t.prototype.addItems=function(t){var e=this;t.forEach((function(t){return e.addToStore(t)}))},t.prototype._addToStore=function(t,e){return t.get(e.id)||(t.set(e.id,e),this.onItemCreatedEvents.forEach((function(t){return t(e)})),this.handleCalculations(e,s.CREATE)),t},t.prototype._updateInStore=function(t,e){var n=t.get(e.id);return n?(n=Object.assign(n,e),t.set(e.id,n),this.onItemUpdateEvents.forEach((function(t){return t(n)})),this.handleCalculations(e,s.UPDATE)):this._addToStore(t,e),t},t.prototype._removeFromStore=function(t,e){var n=t.get(e);return t.delete(e),this.onItemRemovedEvents.forEach((function(t){return t(e,n)})),this.handleCalculations(n,s.REMOVE),t},t.prototype._clearStore=function(t){return t.clear(),t},t}();e.default=f},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return f}));var r=n(0),o=n(13),i=n(8),s=n(4),u=n(3),a=n(35),c={};function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null,r=null;return Object(o.a)(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(i.a)(t[0])&&(t=t[0]),Object(a.a)(t,r).lift(new f(n))}var f=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.resultSelector))},t}(),p=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.a(e,t),e.prototype._next=function(t){this.values.push(c),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Object(u.a)(this,r,r,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,o){var i=this.values,s=i[n],u=this.toRespond?s===c?--this.toRespond:this.toRespond:0;i[n]=e,0===u&&(this.resultSelector?this._tryResultSelector(i):this.destination.next(i.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(s.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(29),o=n(25);function i(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(r.a)(o.a,t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(2);function o(t,e){return e?new r.a((function(n){return e.schedule(i,0,{error:t,subscriber:n})})):new r.a((function(e){return e.error(t)}))}function i(t){var e=t.error;t.subscriber.error(e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(0),o=n(1);function i(){return function(t){return t.lift(new s(t))}}var s=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new u(t,n),o=e.subscribe(r);return r.closed||(r.connection=n.connect()),o},t}(),u=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(0),o=n(7),i=n(85),s=n(6),u=n(80),a=n(28),c=n(89),l=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var o=t.call(this)||this;return o.scheduler=r,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=e<1?1:e,o._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return r.a(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new f(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=r.length;if(this.closed)throw new a.a;if(this.isStopped||this.hasError?e=s.a.EMPTY:(this.observers.push(t),e=new c.a(this,t)),o&&t.add(t=new u.a(t,o)),n)for(var l=0;l<i&&!t.closed;l++)t.next(r[l]);else for(l=0;l<i&&!t.closed;l++)t.next(r[l].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||i.a).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,o=r.length,i=0;i<o&&!(t-r[i].time<n);)i++;return o>e&&(i=Math.max(i,o-e)),i>0&&r.splice(0,i),r},e}(o.a),f=function(){return function(t,e){this.time=t,this.value=e}}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(2),o=n(16),i=n(14);function s(t){return new r.a((function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?Object(o.a)(n):Object(i.b)()).subscribe(e)}))}},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return f}));var r=n(0),o=n(35),i=n(8),s=n(1),u=n(4),a=n(3),c=n(26);function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),Object(o.a)(t,void 0).lift(new f(n))}var f=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.resultSelector))},t}(),p=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var o=t.call(this,e)||this;return o.iterators=[],o.active=0,o.resultSelector="function"==typeof n?n:null,o.values=r,o}return r.a(e,t),e.prototype._next=function(t){var e=this.iterators;Object(i.a)(t)?e.push(new d(t)):"function"==typeof t[c.a]?e.push(new h(t[c.a]())):e.push(new y(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];if(r.stillUnsubscribed)this.destination.add(r.subscribe(r,n));else this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++){if("function"==typeof(s=t[r]).hasValue&&!s.hasValue())return}var o=!1,i=[];for(r=0;r<e;r++){var s,u=(s=t[r]).next();if(s.hasCompleted()&&(o=!0),u.done)return void n.complete();i.push(u.value)}this.resultSelector?this._tryresultSelector(i):n.next(i),o&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(s.a),h=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),d=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[c.a]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),y=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.parent=n,o.observable=r,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return r.a(e,t),e.prototype[c.a]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,o){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return Object(a.a)(this,this.observable,this,e)},e}(u.a)},function(t,e,n){"use strict";function r(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1);function o(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&o instanceof r.a?o:null}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(2),o=n(6);function i(t,e){return new r.a((function(n){var r=new o.a,i=0;return r.add(e.schedule((function(){i!==t.length?(n.next(t[i++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},function(t,e,n){"use strict";var r=n(0),o=1,i=function(){return Promise.resolve()}(),s={};function u(t){return t in s&&(delete s[t],!0)}var a=function(t){var e=o++;return s[e]=!0,i.then((function(){return u(e)&&t()})),e},c=function(t){u(t)},l=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=a(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(c(n),e.scheduled=void 0)},e}(n(37).a),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,o=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<o&&(t=n.shift()));if(this.active=!1,e){for(;++r<o&&(t=n.shift());)t.unsubscribe();throw e}},e}(n(34).a);n.d(e,"a",(function(){return p}));var p=new f(l)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(18),o=n(41),i={closed:!0,next:function(t){},error:function(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(o.a)(t)},complete:function(){}}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.BringgDashboardSDK=void 0;var i=n(145),s=n(195),u=n(211),a=n(214),c=n(329),l=n(331),f=n(333),p=n(335),h=n(337),d=n(341),y=n(344),v=n(130),_=n(346),b=n(349),E=n(352),g=n(357),w=n(360),T=n(362),m=n(363),O=n(365),S=n(367),R=n(369),A=n(372),x=n(374),P=n(376),C=n(378),I=n(380),k=n(382),N=n(385),D=n(387),U=n(389),M=n(391),L=n(392),j=n(394),G=n(396),B=n(398),F=n(400),H=n(403),V=n(405),Y=n(407),W=n(410),K=n(412),q=n(414),z=n(416),Q=n(418),$=n(420),J=n(422),X=n(424),Z=n(426),tt=n(428),et=n(430),nt=n(432),rt=n(105),ot=n(436),it=n(438),st=n(440),ut=n(442),at=n(444),ct=n(446),lt=n(448),ft=n(450),pt=n(452),ht=n(453),dt=n(455),yt=n(457),vt=n(459),_t=n(461),bt=n(463),Et=n(466),gt=n(468),wt=n(470),Tt=n(473),mt=n(478),Ot=n(480),St=n(483),Rt=n(486),At=n(488),xt=n(489),Pt=function(){function t(t){this.applicationMerchantConfiguration=null,this.applicationTeamConfiguration=null,this.chat=null,this.companies=null,this.credentials={},this.crews=null,this.crossAppTransport=null,this.customerConfiguration=null,this.customers=null,this.dashboard=null,this.deliveryBlocks=null,this.fleets=null,this.rules=null,this.floatingInventory=null,this.inventoryActionsConfigurations=null,this.languages=null,this.merchant=null,this.merchantConfiguration=null,this.notificationTemplates=null,this.notificationTypes=null,this.oauthApplication=null,this.plannedRoutes=null,this.reasonToChangeInventory=null,this.reasonToReassignTasks=null,this.reasonToCancelTasks=null,this.reportPreferences=null,this.reports=null,this.runs=null,this.rollouts=null,this.skills=null,this.taskConfigurations=null,this.taskInventory=null,this.inventory=null,this.tasks=null,this.teamConfiguration=null,this.teams=null,this.resourceUploads=null,this.userConfigurations=null,this.users=null,this.vehicleTypes=null,this.vehicles=null,this.session=t}return t.init=function(e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return(n=new t(e)).application=new at.default(e),n.chat=new h.default(e),n.companies=new m.default(e),n.crossAppTransport=new T.default,n.customerConfiguration=new w.default(e),n.customers=new c.default(e),n.dashboard=new l.default(e),n.deliveryBlocks=new N.DeliveryBlocksApi(e),n.fleets=new q.default(e),n.rules=new z.default(e),n.fleetRouterApi=new et.default(e),n.alertConfiguration=new nt.default(e),n.floatingInventory=new bt.default(e),n.geocoding=new ut.default(e),n.googleMapsHelper=new Z.default(e),n.inventoryActionsConfigurations=new P.default(e),n.languages=new _.Language(e),n.merchant=new s.default(e),n.merchantConfiguration=new F.MerchantConfigurationApi(e),n.notificationTemplates=new g.NotificationTemplate(e),n.notificationTypes=new b.NotificationType(e),n.oauthApplication=new ht.default(e),n.onboardings=new tt.default(e),n.photos=new B.default(e),n.plannedRoutes=new y.default(e),n.pushTokenSubscription=new Q.default(e),n.pushNotificationRegistration=new yt.default(e),n.reasonToChangeInventory=new f.default(e),n.reasonToReassignTasks=new V.default(e),n.reasonToCancelTasks=new vt.default(e),n.reportPreferences=new D.default(e),n.reports=new S.default(e),n.runs=new a.default(e),n.scans=new j.default(e),n.rollouts=new u.default(e),n.service=new ot.default(e),n.signatures=new G.default(e),n.skills=new Y.default(e),n.tagCustomerConfigurations=new A.default(e),n.tagMerchantConfigurations=new x.default(e),n.tags=new O.default(e),n.taskConfigurations=new C.default(e),n.taskInventory=new p.default(e),n.inventory=new dt.default(e),n.tasks=new $.default(e),n.teamConfiguration=new L.default(e),n.teams=new U.default(e),n.resourceUploads=new M.default(e),n.userConfigurations=new I.default(e),n.userTypes=new k.default(e),n.users=new E.default(e),n.vehicleTypes=new H.default(e),n.vehicles=new W.default(e),n.vrpAutoDispatchAnalytic=new R.default(e),n.webApplicationConfiguration=new K.default(e),n.fleetTemplates=new it.default(e),n.openFleets=new st.default(e),n.customerAvailabilityHours=new ct.default(e),n.exclusionWindows=new ft.default(e),n.shifts=new lt.default(e),n.customFilters=new _t.default(e),n.serviceAreas=new Et.default(e),n.billing=new gt.default(e),n.userAnalytics=new Tt.default(e),n.analyticsReports=new mt.default(e),n.servicePlans=new Ot.default(e),n.alertsApi=new St.default(e),n.deliveryCatalog=new Rt.default(e),n.packageApi=new wt.default(e),n.routeOptimizationApi=new At.default(e),n.ratesApi=new xt.default(e),n.crews=new d.default(e,n.users),n.applicationMerchantConfiguration=new J.default(e,n.merchantConfiguration),n.applicationTeamConfiguration=new X.default(e),[4,t.initSessionConfiguration(n)];case 1:return r.sent(),[2,Object.freeze(n)]}}))}))},t.initSessionConfiguration=function(e){var n,i;return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,Promise.all([e.merchantConfiguration.get(),e.webApplicationConfiguration.get()])];case 1:return r.sent(),(null===(i=null===(n=this._configurationProvider)||void 0===n?void 0:n.isUserAnalyticsEnabled)||void 0===i?void 0:i.call(n))?[4,e.userAnalytics.addSnippet({apiKey:this._configurationProvider.getUserAnalyticsApiKey()})]:[3,5];case 2:return r.sent(),[4,e.merchant.get()];case 3:return r.sent(),[4,e.userAnalytics.run({environment:t._environment})];case 4:r.sent(),r.label=5;case 5:return[2]}}))}))},t.setConfigurations=function(t,e){this._configurationProvider.getApiEndpoint=function(){return t},this._configurationProvider.getAuthenticationEndpoint=function(){return t},this._configurationProvider.getRegionDiscoveryEndpoint=function(){return t},this._configurationProvider.getMonitoringEndpoint=function(){return e}},Object.defineProperty(t,"configurationProvider",{get:function(){return t._configurationProvider},enumerable:!1,configurable:!0}),Object.defineProperty(t,"environment",{get:function(){return this._environment},enumerable:!1,configurable:!0}),t.initWithSessionCode=function(e,n,i){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,t.login({code:e,session:n,region:i})];case 1:return[2,r.sent()]}}))}))},t.initWithEmail=function(e,n,i,s,u,a){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,t.login({email:e,password:n,merchant_uuid:i,recaptchaToken:s,recaptcha_qa_token:u,region:a})];case 1:return[2,r.sent()]}}))}))},t.initWithAuthToken=function(e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,t.login({region:e,authenticationToken:n})];case 1:return[2,r.sent()]}}))}))},t.loginInternal=function(t,e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return[4,i.default.init(e)];case 1:return n=r.sent(),[2,t(n)]}}))}))},t.login=function(e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return null!==t.configurationProvider?[3,2]:[4,v.ConfigurationProvider.fromUrl(v.ConfigurationProvider.getConfigUrl(this._environment))];case 1:n=r.sent(),t.setConfigurationProvider(n),r.label=2;case 2:return[4,this.loginInternal((function(e){return t.init(e)}),e)];case 3:return[2,r.sent()]}}))}))},t.prototype.logout=function(t){return void 0===t&&(t=!1),r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.session.logout(t)];case 1:return[2,e.sent()]}}))}))},t.resendConfirmationEmail=function(t){return r(this,void 0,void 0,(function(){var e,n,r,i,s,u;return o(this,(function(o){switch(o.label){case 0:return e=rt.default.init(t.region),n=t.email,r=t.password,i=t.merchant_uuid,s=t.recaptchaToken,u=t.recaptcha_qa_token,[4,e.resendConfirmationEmail(n,r,i,s,u)];case 1:return[2,o.sent()]}}))}))},t.getCountriesList=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,pt.default.getCountries()]}))}))},t.prototype.switchAccounts=function(){return r(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return n=(e=t).init,[4,this.session.switchAccounts()];case 1:return[2,n.apply(e,[r.sent()])]}}))}))},t.prototype.impersonate=function(e){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return r=(n=t).init,[4,this.session.impersonate(e)];case 1:return[2,r.apply(n,[o.sent()])]}}))}))},t.prototype.impersonateByTeam=function(e){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return r=(n=t).init,[4,this.session.impersonateByTeam(e)];case 1:return[2,r.apply(n,[o.sent()])]}}))}))},t.prototype.unwindImpersonation=function(){return r(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return n=(e=t).init,[4,this.session.unwindImpersonation()];case 1:return[2,n.apply(e,[r.sent()])]}}))}))},t._environment="production",t._configurationProvider=null,t.setConfigurationProvider=function(e){t._configurationProvider=e},t.setEnvironment=function(e){t._environment=e},t}();e.BringgDashboardSDK=Pt},function(t,e,n){const r=n(182),o=n(183),i=String.fromCharCode(30);t.exports={protocol:4,encodePacket:r,encodePayload:(t,e)=>{const n=t.length,o=new Array(n);let s=0;t.forEach((t,u)=>{r(t,!1,t=>{o[u]=t,++s===n&&e(o.join(i))})})},decodePacket:o,decodePayload:(t,e)=>{const n=t.split(i),r=[];for(let t=0;t<n.length;t++){const i=o(n[t],e);if(r.push(i),"error"===i.type)break}return r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZIP_CODES_UPLOAD_DONE=e.NEW_EMPLOYEE=e.DELETE_EMPLOYEE=e.NEW_TASK=e.TASK_DELETED=e.NEW_NOTE=e.NEW_SCAN=e.WAYPOINT_UPDATED=e.WAYPOINT_DELETED=e.WAYPOINT_ADDED=e.TASK_UPDATE=e.MERCHANT_SUBSCRIPTION_UPDATE=e.MERCHANT_UPDATE=e.BRINGG_ALIVE_EVENT=e.USER_CONNECT_SUCCESS_EVENT=e.SUBSCRIBE_AS_ADMIN_EVENT=e.EMPLOYEE_UPDATE_EVENT=e.USER_CONNECT_EVENT=e.PubSubEvent=void 0;var r=function(t){this.name=t};e.PubSubEvent=r,e.USER_CONNECT_EVENT=new r("user connect"),e.EMPLOYEE_UPDATE_EVENT=new r("employee update"),e.SUBSCRIBE_AS_ADMIN_EVENT=new r("subscribe as admin"),e.USER_CONNECT_SUCCESS_EVENT=new r("connect success"),e.BRINGG_ALIVE_EVENT=new r("b"),e.MERCHANT_UPDATE=new r("merchant update"),e.MERCHANT_SUBSCRIPTION_UPDATE=new r("merchant subscription updated"),e.TASK_UPDATE=new r("task update"),e.WAYPOINT_ADDED=new r("waypoint added"),e.WAYPOINT_DELETED=new r("waypoint deleted"),e.WAYPOINT_UPDATED=new r("waypoint updated"),e.NEW_SCAN=new r("new scan"),e.NEW_NOTE=new r("new note"),e.TASK_DELETED=new r("task deleted"),e.NEW_TASK=new r("new task"),e.DELETE_EMPLOYEE=new r("delete employee"),e.NEW_EMPLOYEE=new r("new employee"),e.ZIP_CODES_UPLOAD_DONE=new r("team zip codes import done")},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};e.__esModule=!0,o(n(217),e),o(n(218),e),o(n(219),e),o(n(220),e),o(n(221),e),o(n(222),e),o(n(223),e),o(n(224),e),o(n(225),e),o(n(226),e),o(n(227),e),o(n(228),e),o(n(229),e),o(n(230),e),o(n(231),e),o(n(232),e),o(n(233),e),o(n(234),e),o(n(235),e),o(n(236),e),o(n(237),e),o(n(238),e),o(n(239),e),o(n(240),e),o(n(241),e),o(n(242),e),o(n(243),e),o(n(244),e),o(n(245),e),o(n(246),e),o(n(247),e),o(n(248),e),o(n(249),e),o(n(250),e),o(n(251),e),o(n(252),e),o(n(253),e),o(n(254),e),o(n(255),e),o(n(256),e),o(n(257),e),o(n(258),e),o(n(259),e),o(n(260),e),o(n(261),e),o(n(262),e),o(n(263),e),o(n(264),e),o(n(265),e),o(n(266),e),o(n(267),e),o(n(268),e),o(n(269),e),o(n(270),e),o(n(271),e),o(n(272),e),o(n(273),e),o(n(274),e),o(n(275),e),o(n(276),e),o(n(277),e),o(n(278),e),o(n(279),e),o(n(280),e),o(n(281),e),o(n(282),e),o(n(287),e),o(n(288),e),o(n(289),e),o(n(290),e),o(n(291),e),o(n(292),e),o(n(293),e),o(n(294),e),o(n(295),e),o(n(296),e),o(n(297),e),o(n(298),e),o(n(299),e),o(n(300),e),o(n(301),e),o(n(302),e),o(n(303),e),o(n(304),e),o(n(305),e),o(n(306),e),o(n(307),e),o(n(308),e),o(n(309),e),o(n(310),e),o(n(311),e),o(n(312),e),o(n(313),e),o(n(314),e),o(n(315),e),o(n(316),e),o(n(317),e),o(n(318),e),o(n(319),e),o(n(320),e),o(n(321),e),o(n(322),e),o(n(323),e),o(n(324),e),o(n(325),e),o(n(326),e),o(n(327),e),o(n(328),e)},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n(4),i=n(3);function s(t){return function(e){return e.lift(new u(t))}}var u=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=Object(i.a)(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,r){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(o.a),c=n(10),l=n(76);function f(t,e){return void 0===e&&(e=c.a),s((function(){return Object(l.a)(t,e)}))}function p(t){return function(e){return e.lift(new h(t))}}var h=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new d(t,this.closingNotifier))},t}(),d=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(Object(i.a)(r,n)),r}return r.a(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,n,r,o){var i=this.buffer;this.buffer=[],this.destination.next(i)},e}(o.a),y=n(1);function v(t,e){return void 0===e&&(e=null),function(n){return n.lift(new _(t,e))}}var _=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?E:b}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),b=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.a(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(y.a),E=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.bufferSize=n,o.startBufferEvery=r,o.buffers=[],o.count=0,o}return r.a(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,o=this.count;this.count++,o%n==0&&r.push([]);for(var i=r.length;i--;){var s=r[i];s.push(t),s.length===e&&(r.splice(i,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(y.a),g=n(13);function w(t){var e=arguments.length,n=c.a;Object(g.a)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var o=Number.POSITIVE_INFINITY;return e>=3&&(o=arguments[2]),function(e){return e.lift(new T(t,r,o,n))}}var T=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new O(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),m=function(){return function(){this.buffer=[]}}(),O=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=o,s.scheduler=i,s.contexts=[];var u=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var a={subscriber:s,context:u,bufferTimeSpan:n};s.add(u.closeAction=i.schedule(S,n,a))}else{var c={subscriber:s,context:u},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:i};s.add(u.closeAction=i.schedule(A,n,c)),s.add(i.schedule(R,r,l))}return s}return r.a(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,o=0;o<r;o++){var i=n[o],s=i.buffer;s.push(t),s.length==this.maxBufferSize&&(e=i)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(S,n,r))}},e.prototype.openContext=function(){var t=new m;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(y.a);function S(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function R(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,o=t.scheduler,i=r.openContext();r.closed||(r.add(i.closeAction=o.schedule(A,n,{subscriber:r,context:i})),this.schedule(t,e))}function A(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var x=n(6);function P(t,e){return function(n){return n.lift(new C(t,e))}}var C=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new I(t,this.openings,this.closingSelector))},t}(),I=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.openings=n,o.closingSelector=r,o.contexts=[],o.add(Object(i.a)(o,n)),o}return r.a(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,o){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new x.a,r={buffer:[],subscription:n};e.push(r);var o=Object(i.a)(this,t,r);!o||o.closed?this.closeBuffer(r):(o.context=r,this.add(o),n.add(o))},e}(o.a);function k(t){return function(e){return e.lift(new N(t))}}var N=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new D(t,this.closingSelector))},t}(),D=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.a(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,n,r,o){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new x.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(i.a)(this,e)),this.subscribing=!1},e}(o.a),U=n(17);function M(t){return function(e){var n=new L(t),r=e.lift(n);return n.caught=r}}var L=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new j(t,this.selector,this.caught))},t}(),j=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.selector=n,o.caught=r,o}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new U.a(this,void 0,void 0);this.add(r);var o=Object(i.a)(this,n,void 0,void 0,r);o!==r&&this.add(o)}},e}(o.a),G=n(49);function B(t){return function(e){return e.lift(new G.a(t))}}var F=n(8),H=n(16);function V(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(F.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(Object(H.a)([e].concat(t)),new G.a(n))}}var Y=n(40);function W(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Y.a.apply(void 0,[e].concat(t)))}}var K=n(77),q=n(29);function z(t,e){return Object(q.a)(t,e,1)}function Q(t,e){return z((function(){return t}),e)}function $(t){return function(e){return e.lift(new J(t,e))}}var J=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new X(t,this.predicate,this.source))},t}(),X=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.source=r,o.count=0,o.index=0,o}return r.a(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(y.a);function Z(t){return function(e){return e.lift(new tt(t))}}var tt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new et(t,this.durationSelector))},t}(),et=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r.durationSubscription=null,r}return r.a(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(i.a)(this,e))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,e,n,r,o){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=null,n.unsubscribe(),this.remove(n)),this.value=null,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(o.a);function nt(t,e){return void 0===e&&(e=c.a),function(n){return n.lift(new rt(t,e))}}var rt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new ot(t,this.dueTime,this.scheduler))},t}(),ot=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.dueTime=n,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return r.a(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(it,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(y.a);function it(t){t.debouncedNext()}function st(t){return void 0===t&&(t=null),function(e){return e.lift(new ut(t))}}var ut=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new at(t,this.defaultValue))},t}(),at=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.a(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(y.a);function ct(t){return t instanceof Date&&!isNaN(+t)}var lt=n(22);function ft(t,e){void 0===e&&(e=c.a);var n=ct(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new pt(n,e))}}var pt=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new ht(t,this.delay,this.scheduler))},t}(),ht=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.delay=n,o.scheduler=r,o.queue=[],o.active=!1,o.errored=!1,o}return r.a(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,o=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var i=Math.max(0,n[0].time-r.now());this.schedule(t,i)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new dt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(lt.a.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(lt.a.createComplete()),this.unsubscribe()},e}(y.a),dt=function(){return function(t,e){this.time=t,this.notification=e}}(),yt=n(2);function vt(t,e){return e?function(n){return new Et(n,e).lift(new _t(t))}:function(e){return e.lift(new _t(t))}}var _t=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new bt(t,this.delayDurationSelector))},t}(),bt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(t),this.removeSubscription(o),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=Object(i.a)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(o.a),Et=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.a(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new gt(t,this.source))},e}(yt.a),gt=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.a(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(y.a);function wt(){return function(t){return t.lift(new Tt)}}var Tt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new mt(t))},t}(),mt=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(y.a);function Ot(t,e){return function(n){return n.lift(new St(t,e))}}var St=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Rt(t,this.keySelector,this.flushes))},t}(),Rt=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add(Object(i.a)(o,r)),o}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(o.a);function At(t,e){return function(n){return n.lift(new xt(t,e))}}var xt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Pt(t,this.compare,this.keySelector))},t}(),Pt=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=r,o.hasKey=!1,"function"==typeof n&&(o.compare=n),o}return r.a(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(y.a);function Ct(t,e){return At((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var It=n(30),kt=n(21),Nt=n(33);function Dt(t){return void 0===t&&(t=Lt),function(e){return e.lift(new Ut(t))}}var Ut=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new Mt(t,this.errorFactory))},t}(),Mt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)},e}(y.a);function Lt(){return new Nt.a}var jt=n(14);function Gt(t){return function(e){return 0===t?Object(jt.b)():e.lift(new Bt(t))}}var Bt=function(){function t(t){if(this.total=t,this.total<0)throw new It.a}return t.prototype.call=function(t,e){return e.subscribe(new Ft(t,this.total))},t}(),Ft=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(y.a);function Ht(t,e){if(t<0)throw new It.a;var n=arguments.length>=2;return function(r){return r.pipe(Object(kt.a)((function(e,n){return n===t})),Gt(1),n?st(e):Dt((function(){return new It.a})))}}var Vt=n(42);function Yt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Object(Y.a)(e,Vt.a.apply(void 0,t))}}function Wt(t,e){return function(n){return n.lift(new Kt(t,e,n))}}var Kt=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new qt(t,this.predicate,this.thisArg,this.source))},t}(),qt=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.source=o,i.index=0,i.thisArg=r||i,i}return r.a(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(y.a);function zt(){return function(t){return t.lift(new Qt)}}var Qt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new $t(t))},t}(),$t=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.a(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(i.a)(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(o.a),Jt=n(12);function Xt(t,e){return e?function(n){return n.pipe(Xt((function(n,r){return Object(H.a)(t(n,r)).pipe(Object(Jt.a)((function(t,o){return e(n,t,r,o)})))})))}:function(e){return e.lift(new Zt(t))}}var Zt=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.project))},t}(),te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=new U.a(this,e,n),o=this.destination;o.add(r);var s=Object(i.a)(this,t,void 0,void 0,r);s!==r&&o.add(s)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(o.a);function ee(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new ne(t,e,n))}}var ne=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new re(t,this.project,this.concurrent,this.scheduler))},t}(),re=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(i.buffer=[]),i}return r.a(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,r=t.value,o=t.index;e.subscribeToProjection(n,r,o)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);try{var o=(0,this.project)(t,r);if(this.scheduler){var i={subscriber:this,result:o,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,i))}else this.subscribeToProjection(o,t,r)}catch(t){n.error(t)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(Object(i.a)(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,o){this._next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(o.a);function oe(t){return function(e){return e.lift(new ie(t))}}var ie=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new se(t,this.callback))},t}(),se=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new x.a(n)),r}return r.a(e,t),e}(y.a);function ue(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ae(t,n,!1,e))}}var ae=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ce=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.predicate=n,s.source=r,s.yieldIndex=o,s.thisArg=i,s.index=0,s}return r.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(y.a);function le(t,e){return function(n){return n.lift(new ae(t,n,!0,e))}}var fe=n(25);function pe(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(kt.a)((function(e,n){return t(e,n,r)})):fe.a,Gt(1),n?st(e):Dt((function(){return new Nt.a})))}}var he=n(71);function de(){return function(t){return t.lift(new ye)}}var ye=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype._next=function(t){},e}(y.a);function _e(){return function(t){return t.lift(new be)}}var be=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ee(t))},t}(),Ee=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(y.a);function ge(t){return function(e){return 0===t?Object(jt.b)():e.lift(new we(t))}}var we=function(){function t(t){if(this.total=t,this.total<0)throw new It.a}return t.prototype.call=function(t,e){return e.subscribe(new Te(t,this.total))},t}(),Te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,o=0;o<n;o++){var i=e++%n;t.next(r[i])}t.complete()},e}(y.a);function me(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(kt.a)((function(e,n){return t(e,n,r)})):fe.a,ge(1),n?st(e):Dt((function(){return new Nt.a})))}}function Oe(t){return function(e){return e.lift(new Se(t))}}var Se=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Re(t,this.value))},t}(),Re=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.a(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(y.a);function Ae(){return function(t){return t.lift(new xe)}}var xe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Pe(t))},t}(),Pe=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype._next=function(t){this.destination.next(lt.a.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(lt.a.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(lt.a.createComplete()),t.complete()},e}(y.a);function Ce(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Ie(t,e,n))}}var Ie=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new ke(t,this.accumulator,this.seed,this.hasSeed))},t}(),ke=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.accumulator=n,i._seed=r,i.hasSeed=o,i.index=0,i}return r.a(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(y.a),Ne=n(43);function De(t,e){return arguments.length>=2?function(n){return Object(Ne.a)(Ce(t,e),ge(1),st(e))(n)}:function(e){return Object(Ne.a)(Ce((function(e,n,r){return t(e,n,r+1)})),ge(1))(e)}}function Ue(t){return De("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var Me=n(78);function Le(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Me.a.apply(void 0,[e].concat(t)))}}var je=n(50);function Ge(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Object(q.a)((function(){return t}),e,n):("number"==typeof e&&(n=e),Object(q.a)((function(){return t}),n))}function Be(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Fe(t,e,n))}}var Fe=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new He(t,this.accumulator,this.seed,this.concurrent))},t}(),He=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.accumulator=n,i.acc=r,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,t,e)}catch(t){return n.error(t)}this.active++,this._innerSub(r,t,e)}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,n){var r=new U.a(this,e,n),o=this.destination;o.add(r);var s=Object(i.a)(this,t,void 0,void 0,r);s!==r&&o.add(s)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,o){var i=this.destination;this.acc=e,this.hasValue=!0,i.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(o.a);function Ve(t){return De("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}var Ye=n(79);function We(t,e){return function(n){var r;if(r="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new Ke(r,e));var o=Object.create(n,Ye.b);return o.source=n,o.subjectFactory=r,o}}var Ke=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),o=n(r).subscribe(t);return o.add(e.subscribe(r)),o},t}(),qe=n(80);function ze(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Object(F.a)(t[0])&&(t=t[0]),function(e){return e.lift(new Qe(t))}}var Qe=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new $e(t,this.nextSources))},t}(),$e=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return r.a(e,t),e.prototype.notifyError=function(t,e){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new U.a(this,void 0,void 0),n=this.destination;n.add(e);var r=Object(i.a)(this,t,void 0,void 0,e);r!==e&&n.add(r)}else this.destination.complete()},e}(o.a);function Je(){return function(t){return t.lift(new Xe)}}var Xe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t))},t}(),Ze=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return r.a(e,t),e.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)},e}(y.a),tn=n(90);function en(t,e){return function(n){return[Object(kt.a)(t,e)(n),Object(kt.a)(Object(tn.a)(t,e))(n)]}}function nn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(Jt.a)(rn(t,n))(e)}}function rn(t,e){return function(n){for(var r=n,o=0;o<e;o++){var i=r[t[o]];if(void 0===i)return;r=i}return r}}var on=n(7);function sn(t){return t?We((function(){return new on.a}),t):We(new on.a)}var un=n(81);function an(t){return function(e){return We(new un.a(t))(e)}}var cn=n(36);function ln(){return function(t){return We(new cn.a)(t)}}var fn=n(53);function pn(t,e,n,r){n&&"function"!=typeof n&&(r=n);var o="function"==typeof n?n:void 0,i=new fn.a(t,e,r);return function(t){return We((function(){return i}),o)(t)}}var hn=n(82);function dn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&Object(F.a)(t[0])&&(t=t[0]),e.lift.call(hn.a.apply(void 0,[e].concat(t)))}}function yn(t){return void 0===t&&(t=-1),function(e){return 0===t?Object(jt.b)():t<0?e.lift(new vn(-1,e)):e.lift(new vn(t-1,e))}}var vn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new _n(t,this.count,this.source))},t}(),_n=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.count=n,o.source=r,o}return r.a(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(y.a);function bn(t){return function(e){return e.lift(new En(t))}}var En=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new gn(t,this.notifier,e))},t}(),gn=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.notifier=n,o.source=r,o.sourceIsBeingSubscribedTo=!0,o}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new on.a;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(i.a)(this,e)},e}(o.a);function wn(t){return void 0===t&&(t=-1),function(e){return e.lift(new Tn(t,e))}}var Tn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new mn(t,this.count,this.source))},t}(),mn=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.count=n,o.source=r,o}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(y.a);function On(t){return function(e){return e.lift(new Sn(t,e))}}var Sn=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Rn(t,this.notifier,this.source))},t}(),Rn=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.notifier=n,o.source=r,o}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=null,this.retriesSubscription=null;else{n=new on.a;try{r=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}o=Object(i.a)(this,r)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,n,r,o){var i=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=i,this.source.subscribe(this)},e}(o.a),An=n(52);function xn(t){return function(e){return e.lift(new Pn(t))}}var Pn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Cn(t),r=e.subscribe(n);return r.add(Object(i.a)(n,this.notifier)),r},t}(),Cn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.a(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,n,r,o){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(o.a);function In(t,e){return void 0===e&&(e=c.a),function(n){return n.lift(new kn(t,e))}}var kn=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Nn(t,this.period,this.scheduler))},t}(),Nn=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.period=n,o.scheduler=r,o.hasValue=!1,o.add(r.schedule(Dn,n,{subscriber:o,period:n})),o}return r.a(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(y.a);function Dn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Un(t,e){return function(n){return n.lift(new Mn(t,e))}}var Mn=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Ln(t,this.compareTo,this.comparator))},t}(),Ln=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.compareTo=n,o.comparator=r,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(n.subscribe(new jn(e,o))),o}return r.a(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var r=t.shift(),o=e.shift(),i=!1;try{i=n?n(r,o):r===o}catch(t){this.destination.error(t)}i||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(y.a),jn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.a(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(y.a);function Gn(){return new on.a}function Bn(){return function(t){return Object(An.a)()(We(Gn)(t))}}function Fn(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,o=void 0===r?Number.POSITIVE_INFINITY:r,i=t.windowTime,s=void 0===i?Number.POSITIVE_INFINITY:i,u=t.refCount,a=t.scheduler,c=0,l=!1,f=!1;return function(t){c++,e&&!l||(l=!1,e=new fn.a(o,s,a),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){f=!0,n=void 0,e.complete()}}));var r=e.subscribe(this);this.add((function(){c--,r.unsubscribe(),n&&!f&&u&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function Hn(t){return function(e){return e.lift(new Vn(t,e))}}var Vn=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Yn(t,this.predicate,this.source))},t}(),Yn=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.source=r,o.seenValue=!1,o.index=0,o}return r.a(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Nt.a)},e}(y.a);function Wn(t){return function(e){return e.lift(new Kn(t))}}var Kn=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new qn(t,this.total))},t}(),qn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(y.a);function zn(t){return function(e){return e.lift(new Qn(t))}}var Qn=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new It.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new y.a(t)):e.subscribe(new $n(t,this._skipCount))},t}(),$n=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.a(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,o=this._ring,i=o[r];o[r]=t,this.destination.next(i)}},e}(y.a);function Jn(t){return function(e){return e.lift(new Xn(t))}}var Xn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Zn(t,this.notifier))},t}(),Zn=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var o=new U.a(r,void 0,void 0);r.add(o),r.innerSubscription=o;var s=Object(i.a)(r,n,void 0,void 0,o);return s!==o&&(r.add(s),r.innerSubscription=s),r}return r.a(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(t,e,n,r,o){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(o.a);function tr(t){return function(e){return e.lift(new er(t))}}var er=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new nr(t,this.predicate))},t}(),nr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},e}(y.a);function rr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(g.a)(n)?(t.pop(),function(e){return Object(Y.a)(t,e,n)}):function(e){return Object(Y.a)(t,e)}}var or=n(59),ir=n(38),sr=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=or.a);var o=t.call(this)||this;return o.source=e,o.delayTime=n,o.scheduler=r,(!Object(ir.a)(n)||n<0)&&(o.delayTime=0),r&&"function"==typeof r.schedule||(o.scheduler=or.a),o}return r.a(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=or.a),new e(t,n,r)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,r=this.source;return this.scheduler.schedule(e.dispatch,n,{source:r,subscriber:t})},e}(yt.a);function ur(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ar(t,e))}}var ar=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new sr(e,this.delay,this.scheduler).subscribe(t)},t}();function cr(t,e){return"function"==typeof e?function(n){return n.pipe(cr((function(n,r){return Object(H.a)(t(n,r)).pipe(Object(Jt.a)((function(t,o){return e(n,t,r,o)})))})))}:function(e){return e.lift(new lr(t))}}var lr=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new fr(t,this.project))},t}(),fr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe();var o=new U.a(this,e,n),s=this.destination;s.add(o),this.innerSubscription=Object(i.a)(this,t,void 0,void 0,o),this.innerSubscription!==o&&s.add(this.innerSubscription)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,o){this.destination.next(e)},e}(o.a);function pr(){return cr(fe.a)}function hr(t,e){return e?cr((function(){return t}),e):cr((function(){return t}))}function dr(t){return function(e){return e.lift(new yr(t))}}var yr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new vr(t),r=Object(i.a)(n,this.notifier);return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),vr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(o.a);function _r(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new br(t,e))}}var br=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new Er(t,this.predicate,this.inclusive))},t}(),Er=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.inclusive=r,o.index=0,o}return r.a(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(y.a),gr=n(20),wr=n(31);function Tr(t,e,n){return function(r){return r.lift(new mr(t,e,n))}}var mr=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new Or(t,this.nextOrObserver,this.error,this.complete))},t}(),Or=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i._tapNext=gr.a,i._tapError=gr.a,i._tapComplete=gr.a,i._tapError=r||gr.a,i._tapComplete=o||gr.a,Object(wr.a)(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||gr.a,i._tapError=n.error||gr.a,i._tapComplete=n.complete||gr.a),i}return r.a(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(y.a),Sr={leading:!0,trailing:!1};function Rr(t,e){return void 0===e&&(e=Sr),function(n){return n.lift(new Ar(t,e.leading,e.trailing))}}var Ar=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new xr(t,this.durationSelector,this.leading,this.trailing))},t}(),xr=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;return i.destination=e,i.durationSelector=n,i._leading=r,i._trailing=o,i._hasValue=!1,i}return r.a(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=null},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=Object(i.a)(this,e))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=null,e&&this.send()},e.prototype.notifyNext=function(t,e,n,r,o){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(o.a);function Pr(t,e,n){return void 0===e&&(e=c.a),void 0===n&&(n=Sr),function(r){return r.lift(new Cr(t,e,n.leading,n.trailing))}}var Cr=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new Ir(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Ir=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=r,s.leading=o,s.trailing=i,s._hasTrailingValue=!1,s._trailingValue=null,s}return r.a(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(kr,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(y.a);function kr(t){t.subscriber.clearThrottle()}var Nr=n(54);function Dr(t){return void 0===t&&(t=c.a),function(e){return Object(Nr.a)((function(){return e.pipe(Ce((function(e,n){var r=e.current;return{value:n,current:t.now(),last:r}}),{current:t.now(),value:void 0,last:void 0}),Object(Jt.a)((function(t){var e=t.current,n=t.last,r=t.value;return new Ur(r,e-n)})))}))}}var Ur=function(){return function(t,e){this.value=t,this.interval=e}}(),Mr=n(83);function Lr(t,e,n){return void 0===n&&(n=c.a),function(r){var o=ct(t),i=o?+t-n.now():Math.abs(t);return r.lift(new jr(i,o,e,n))}}var jr=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new Gr(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Gr=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=o,s.scheduler=i,s.action=null,s.scheduleTimeout(),s}return r.a(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(i.a)(t,e))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},e}(o.a),Br=n(51);function Fr(t,e){return void 0===e&&(e=c.a),Lr(t,Object(Br.a)(new Mr.a),e)}function Hr(t){return void 0===t&&(t=c.a),Object(Jt.a)((function(e){return new Vr(e,t.now())}))}var Vr=function(){return function(t,e){this.value=t,this.timestamp=e}}();function Yr(t,e,n){return 0===n?[e]:(t.push(e),t)}function Wr(){return De(Yr,[])}function Kr(t){return function(e){return e.lift(new qr(t))}}var qr=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new zr(t),r=e.subscribe(n);return r.closed||n.add(Object(i.a)(n,this.windowBoundaries)),r},t}(),zr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new on.a,e.next(n.window),n}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.openWindow()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new on.a;e.next(n)},e}(o.a);function Qr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new $r(t,e))}}var $r=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new Jr(t,this.windowSize,this.startWindowEvery))},t}(),Jr=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.destination=e,o.windowSize=n,o.startWindowEvery=r,o.windows=[new on.a],o.count=0,e.next(o.windows[0]),o}return r.a(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(t);var u=this.count-r+1;if(u>=0&&u%e==0&&!this.closed&&o.shift().complete(),++this.count%e==0&&!this.closed){var a=new on.a;o.push(a),n.next(a)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(y.a);function Xr(t){var e=c.a,n=null,r=Number.POSITIVE_INFINITY;return Object(g.a)(arguments[3])&&(e=arguments[3]),Object(g.a)(arguments[2])?e=arguments[2]:Object(ir.a)(arguments[2])&&(r=arguments[2]),Object(g.a)(arguments[1])?e=arguments[1]:Object(ir.a)(arguments[1])&&(n=arguments[1]),function(o){return o.lift(new Zr(t,n,r,e))}}var Zr=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new eo(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),to=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.a(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(on.a),eo=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=o,s.scheduler=i,s.windows=[];var u=s.openWindow();if(null!==r&&r>=0){var a={subscriber:s,window:u,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:i};s.add(i.schedule(oo,n,a)),s.add(i.schedule(ro,r,c))}else{var l={subscriber:s,window:u,windowTimeSpan:n};s.add(i.schedule(no,n,l))}return s}return r.a(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var o=e[r];o.closed||(o.next(t),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new to;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(y.a);function no(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function ro(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,o=t.windowCreationInterval,i=n.openWindow(),s={action:this,subscription:null},u={subscriber:n,window:i,context:s};s.subscription=r.schedule(oo,e,u),this.add(s.subscription),this.schedule(t,o)}function oo(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function io(t,e){return function(n){return n.lift(new so(t,e))}}var so=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new uo(t,this.openings,this.closingSelector))},t}(),uo=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.openings=n,o.closingSelector=r,o.contexts=[],o.add(o.openSubscription=Object(i.a)(o,n,n)),o}return r.a(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,o=-1;++o<r;){var i=n[o];i.window.error(e),i.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var o=e[r];o.window.complete(),o.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,o){if(t===this.openings){var s=void 0;try{s=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var u=new on.a,a=new x.a,c={window:u,subscription:a};this.contexts.push(c);var l=Object(i.a)(this,s,c);l.closed?this.closeWindow(this.contexts.length-1):(l.context=c,a.add(l)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,o=n.subscription;e.splice(t,1),r.complete(),o.unsubscribe()}},e}(o.a);function ao(t){return function(e){return e.lift(new co(t))}}var co=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new lo(t,this.closingSelector))},t}(),lo=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.openWindow(o)},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,r=this.window=new on.a;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=Object(i.a)(this,n))},e}(o.a);function fo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new po(r,n))}}var po=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new ho(t,this.observables,this.project))},t}(),ho=function(t){function e(e,n,r){var o=t.call(this,e)||this;o.observables=n,o.project=r,o.toRespond=[];var s=n.length;o.values=new Array(s);for(var u=0;u<s;u++)o.toRespond.push(u);for(u=0;u<s;u++){var a=n[u];o.add(Object(i.a)(o,a,a,u))}return o}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.values[n]=e;var i=this.toRespond;if(i.length>0){var s=i.indexOf(n);-1!==s&&i.splice(s,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(o.a),yo=n(55);function vo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(yo.b.apply(void 0,[e].concat(t)))}}function _o(t){return function(e){return e.lift(new yo.a(t))}}n.d(e,"audit",(function(){return s})),n.d(e,"auditTime",(function(){return f})),n.d(e,"buffer",(function(){return p})),n.d(e,"bufferCount",(function(){return v})),n.d(e,"bufferTime",(function(){return w})),n.d(e,"bufferToggle",(function(){return P})),n.d(e,"bufferWhen",(function(){return k})),n.d(e,"catchError",(function(){return M})),n.d(e,"combineAll",(function(){return B})),n.d(e,"combineLatest",(function(){return V})),n.d(e,"concat",(function(){return W})),n.d(e,"concatAll",(function(){return K.a})),n.d(e,"concatMap",(function(){return z})),n.d(e,"concatMapTo",(function(){return Q})),n.d(e,"count",(function(){return $})),n.d(e,"debounce",(function(){return Z})),n.d(e,"debounceTime",(function(){return nt})),n.d(e,"defaultIfEmpty",(function(){return st})),n.d(e,"delay",(function(){return ft})),n.d(e,"delayWhen",(function(){return vt})),n.d(e,"dematerialize",(function(){return wt})),n.d(e,"distinct",(function(){return Ot})),n.d(e,"distinctUntilChanged",(function(){return At})),n.d(e,"distinctUntilKeyChanged",(function(){return Ct})),n.d(e,"elementAt",(function(){return Ht})),n.d(e,"endWith",(function(){return Yt})),n.d(e,"every",(function(){return Wt})),n.d(e,"exhaust",(function(){return zt})),n.d(e,"exhaustMap",(function(){return Xt})),n.d(e,"expand",(function(){return ee})),n.d(e,"filter",(function(){return kt.a})),n.d(e,"finalize",(function(){return oe})),n.d(e,"find",(function(){return ue})),n.d(e,"findIndex",(function(){return le})),n.d(e,"first",(function(){return pe})),n.d(e,"groupBy",(function(){return he.b})),n.d(e,"ignoreElements",(function(){return de})),n.d(e,"isEmpty",(function(){return _e})),n.d(e,"last",(function(){return me})),n.d(e,"map",(function(){return Jt.a})),n.d(e,"mapTo",(function(){return Oe})),n.d(e,"materialize",(function(){return Ae})),n.d(e,"max",(function(){return Ue})),n.d(e,"merge",(function(){return Le})),n.d(e,"mergeAll",(function(){return je.a})),n.d(e,"mergeMap",(function(){return q.a})),n.d(e,"flatMap",(function(){return q.a})),n.d(e,"mergeMapTo",(function(){return Ge})),n.d(e,"mergeScan",(function(){return Be})),n.d(e,"min",(function(){return Ve})),n.d(e,"multicast",(function(){return We})),n.d(e,"observeOn",(function(){return qe.b})),n.d(e,"onErrorResumeNext",(function(){return ze})),n.d(e,"pairwise",(function(){return Je})),n.d(e,"partition",(function(){return en})),n.d(e,"pluck",(function(){return nn})),n.d(e,"publish",(function(){return sn})),n.d(e,"publishBehavior",(function(){return an})),n.d(e,"publishLast",(function(){return ln})),n.d(e,"publishReplay",(function(){return pn})),n.d(e,"race",(function(){return dn})),n.d(e,"reduce",(function(){return De})),n.d(e,"repeat",(function(){return yn})),n.d(e,"repeatWhen",(function(){return bn})),n.d(e,"retry",(function(){return wn})),n.d(e,"retryWhen",(function(){return On})),n.d(e,"refCount",(function(){return An.a})),n.d(e,"sample",(function(){return xn})),n.d(e,"sampleTime",(function(){return In})),n.d(e,"scan",(function(){return Ce})),n.d(e,"sequenceEqual",(function(){return Un})),n.d(e,"share",(function(){return Bn})),n.d(e,"shareReplay",(function(){return Fn})),n.d(e,"single",(function(){return Hn})),n.d(e,"skip",(function(){return Wn})),n.d(e,"skipLast",(function(){return zn})),n.d(e,"skipUntil",(function(){return Jn})),n.d(e,"skipWhile",(function(){return tr})),n.d(e,"startWith",(function(){return rr})),n.d(e,"subscribeOn",(function(){return ur})),n.d(e,"switchAll",(function(){return pr})),n.d(e,"switchMap",(function(){return cr})),n.d(e,"switchMapTo",(function(){return hr})),n.d(e,"take",(function(){return Gt})),n.d(e,"takeLast",(function(){return ge})),n.d(e,"takeUntil",(function(){return dr})),n.d(e,"takeWhile",(function(){return _r})),n.d(e,"tap",(function(){return Tr})),n.d(e,"throttle",(function(){return Rr})),n.d(e,"throttleTime",(function(){return Pr})),n.d(e,"throwIfEmpty",(function(){return Dt})),n.d(e,"timeInterval",(function(){return Dr})),n.d(e,"timeout",(function(){return Fr})),n.d(e,"timeoutWith",(function(){return Lr})),n.d(e,"timestamp",(function(){return Hr})),n.d(e,"toArray",(function(){return Wr})),n.d(e,"window",(function(){return Kr})),n.d(e,"windowCount",(function(){return Qr})),n.d(e,"windowTime",(function(){return Xr})),n.d(e,"windowToggle",(function(){return io})),n.d(e,"windowWhen",(function(){return ao})),n.d(e,"withLatestFrom",(function(){return fo})),n.d(e,"zip",(function(){return vo})),n.d(e,"zipAll",(function(){return _o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.REGION_NOT_WORKING=e.HttpStatusCode=void 0;var r=n(106);e.HttpStatusCode=r,e.REGION_NOT_WORKING="Region is not working"},function(t,e,n){"use strict";var r,o=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(e,"__esModule",{value:!0});var i=((r={})["http:"]=80,r["https:"]=443,r["ws:"]=80,r["wss:"]=443,r),s={80:"http:",443:"https:"},u=function(){function t(t,e,n){this.protocol=t,this.host=e,this.port=n||i[t]}return t.prototype.encode=function(){return this.protocol.valueOf()+"//"+this.host+":"+this.port},t.fromProtocolString=function(t,e){switch(t){case"http:":return"http:";case"https:":return"https:";case"ws:":return"ws:";case"wss:":return"wss:"}return e&&s[e]?s[e]:"https:"},t.parseHostAndPort=function(t){var e=o(t.split("/"),1)[0],n=o(e.split(":"),2);return{host:n[0],port:n[1]}},t.parse=function(e){var n=o(e.split("//"),2),r=n[0],i=n[1];i||(i=r,r=null);var s=this.parseHostAndPort(i),u=s.host,a=s.port,c=a&&parseInt(a);return new t(this.fromProtocolString(r,c),u,c)},t}();e.default=u},function(t,e){t.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Request=e.defaultExtractor=void 0;var r=n(15),o=n(19);e.defaultExtractor=function(t){return t};var i=function(){function t(t,n){this.service=t,this.route=n,this.extractor=e.defaultExtractor}return t.prototype.withRouteParams=function(t){return this.routeParams=t,this},t.prototype.withQueryString=function(t){return this.queryString=t,this},t.prototype.withExtractor=function(t){return this.extractor=t,this},t.prototype.withPayload=function(t){return this.payload=t,this},t.prototype.withHeaders=function(t){return this.headers=t,this},t.prototype.setException=function(t){var e=r.BringgException.serviceException(t)();if(Error.captureStackTrace)Error.captureStackTrace(e,this.setException);else try{throw new Error}catch(t){e.stack=t.stack}return this.exception=function(){return e},this},t.prototype.invoke=function(){return this.service.handleAuthorizedRequest(this.route,this.extractor,this.exception,this.payload,this.routeParams,this.queryString,this.headers)},t}();e.Request=i;var s=function(){function t(t){this.service=t}return t.prototype.get=function(t){var e=new o.Route(t,0);return new i(this.service,e)},t.prototype.post=function(t){var e=new o.Route(t,1);return new i(this.service,e)},t.prototype.put=function(t){var e=new o.Route(t,2);return new i(this.service,e)},t.prototype.patch=function(t){var e=new o.Route(t,3);return new i(this.service,e)},t.prototype.delete=function(t){var e=new o.Route(t,4);return new i(this.service,e)},t}();e.default=s},function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return p}));var r=n(0),o=n(1),i=n(6),s=n(2),u=n(7);function a(t,e,n,r){return function(o){return o.lift(new c(t,e,n,r))}}var c=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),l=function(t){function e(e,n,r,o,i){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=o,s.subjectSelector=i,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,o=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!o){o=this.subjectSelector?this.subjectSelector():new u.a,n.set(e,o);var i=new p(e,o,this);if(this.destination.next(i),this.durationSelector){var s=void 0;try{s=this.durationSelector(new p(e,o))}catch(t){return void this.error(t)}this.add(s.subscribe(new f(e,o,this)))}}o.closed||o.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(o.a),f=function(t){function e(e,n,r){var o=t.call(this,n)||this;return o.key=e,o.group=n,o.parent=r,o}return r.a(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(o.a),p=function(t){function e(e,n,r){var o=t.call(this)||this;return o.key=e,o.groupSubject=n,o.refCountSubscription=r,o}return r.a(e,t),e.prototype._subscribe=function(t){var e=new i.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new h(n)),e.add(r.subscribe(t)),e},e}(s.a),h=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.a(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(i.a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){var r={},o=n.value;return n.value=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=JSON.stringify(t);return r.hasOwnProperty(n)||(r[n]=o.apply(this,t).then((function(t){return delete r[n],t})).catch((function(t){throw delete r[n],t}))),r[n]},n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GetAllChunkSize=e.defaultExtractor=e.runCashoutExtractor=e.runsLocationsExtractor=e.runsHistoryExtractor=e.runExtractor=e.RunEvents=e.RunStatus=void 0,function(t){t.ALL="all",t.CLOSED="closed",t.OPEN="open"}(e.RunStatus||(e.RunStatus={})),function(t){t.UPDATED="run updated",t.DELETED="run deleted",t.CREATED="run created"}(e.RunEvents||(e.RunEvents={}));e.runExtractor=function(t){return t.run};e.runsHistoryExtractor=function(t){return t};e.runsLocationsExtractor=function(t){return t};e.runCashoutExtractor=function(t){return t};e.defaultExtractor=function(t){return t},e.GetAllChunkSize=450},function(t,e,n){"use strict";var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=e.baseRoute=e.TaskRealTimeEvents=e.formExtractor=e.taskIdsExtractor=e.scanCodeExtractor=e.locationExtractor=e.childTasksExtractor=e.tasksExtractor=e.successExtractor=e.taskExtractor=e.defaultExtractor=e.noteTypes=e.taskToGroupMapper=e.groupFilter=e.GROUP_VALUES=e.DONE_TASK_STATUES=e.OPEN_TASK_STATUES=void 0;var o,i=n(64),s=n(101);e.OPEN_TASK_STATUES=[i.TaskStatus.Created,i.TaskStatus.Assigned,i.TaskStatus.OnTheWay,i.TaskStatus.CheckedIn,i.TaskStatus.Accepted],e.DONE_TASK_STATUES=[i.TaskStatus.Cancelled,i.TaskStatus.Done,i.TaskStatus.Rejected],function(t){t[t.General=0]="General",t[t.Open=1]="Open",t[t.Planning=2]="Planning",t[t.Closed=3]="Closed",t[t.Invalid=4]="Invalid"}(o=e.GROUP_VALUES||(e.GROUP_VALUES={})),e.groupFilter=new Map([[o.Open,s.TaskHelpers.isInOpenState],[o.Planning,s.TaskHelpers.isInPlanningState],[o.Closed,s.TaskHelpers.isInClosedState],[o.Invalid,s.TaskHelpers.isInvalid]]);var u=Array.from(e.groupFilter.keys());e.taskToGroupMapper=function(t){var n,i,s=o.General;try{for(var a=r(u),c=a.next();!c.done;c=a.next()){var l=c.value;if(!0===e.groupFilter.get(l)(t)){s=l;break}}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return s},function(t){t.TASK_NOTE="TaskNote"}(e.noteTypes||(e.noteTypes={}));e.defaultExtractor=function(t){return t};e.taskExtractor=function(t){return t.task};e.successExtractor=function(t){return t.success};e.tasksExtractor=function(t){return t.tasks};e.childTasksExtractor=function(t){return t.child_tasks};e.locationExtractor=function(t){return t.data};e.scanCodeExtractor=function(t){return t.scan_string};e.taskIdsExtractor=function(t){return t.task_ids};e.formExtractor=function(t){return t.form},function(t){t.TASK_UPDATE="task update",t.WAYPOINT_ADDED="waypoint added",t.WAYPOINT_DELETED="waypoint deleted",t.WAYPOINT_UPDATED="waypoint updated",t.NEW_SCAN="new scan",t.NEW_NOTE="new note",t.TASK_DELETED="task deleted",t.NEW_TASK="new task"}(e.TaskRealTimeEvents||(e.TaskRealTimeEvents={})),e.baseRoute="/tasks",e.Routes={GET_OPEN_TASKS:e.baseRoute+"/open",GET_PLANNING_TASKS:e.baseRoute+"/planning",GET_INVALID_TASKS:e.baseRoute+"/invalids",GET_TASK:e.baseRoute+"/{:id}",GET_CHILD_TASKS:e.baseRoute+"/{:id}/child_tasks",BATCH_GET_TASK:e.baseRoute+"/batch_get",GET_CLOSED_TASKS_WITH_QUERY:e.baseRoute+"/closed_with_query",UPDATE_TASK:e.baseRoute+"/{:id}",CREATE_TASK:""+e.baseRoute,FINISH_TASK:e.baseRoute+"/{:id}/finish",CANCEL_TASK:e.baseRoute+"/{:id}/cancel",ACKNOWLEDGE_TASK:e.baseRoute+"/acknowledge_task",MASS_TASK_ASSIGN:e.baseRoute+"/mass_assign",MASS_TASK_UNASSIGN:e.baseRoute+"/mass_unassign",MASS_TASK_CANCEL:e.baseRoute+"/mass_cancel",MOVE_TASKS_TO_PLANNING:e.baseRoute+"/mark_not_ready_to_execute",RELEASE_TASKS_TO_DRIVERS:e.baseRoute+"/release",UPDATE_TASK_PREPARATION_STATUS:e.baseRoute+"/update_preparation_status",GET_TASK_LOCATIONS:e.baseRoute+"/{:id}/locations",CANCEL_ALL_OPEN_TASKS:e.baseRoute+"/cancel_all",GET_TASK_ACTIVITY_LOG:e.baseRoute+"/{:id}/history",CHANGE_TASK_TEAM:e.baseRoute+"/{:id}/change_team",UPDATE_TASKS_PRIORITIES:e.baseRoute+"/update_priorities",LOCK_TASK:e.baseRoute+"/lock",UNLOCK_TASK:e.baseRoute+"/unlock",DUPLICATE_TASK:e.baseRoute+"/{:id}/duplicate",RESCHEDULE_CANCELED:e.baseRoute+"/reschedule_cancelled",GET_CLOSED_TASKS_SINCE_TIMESTAMP:e.baseRoute+"/closed_since",GET_PICKUP_QR_CODE:e.baseRoute+"/{:id}/generate_pickup_qr_code",RESCHEDULE_VIRTUAL_TASKS:e.baseRoute+"/reschedule_virtual_tasks",FORM_SUBMIT:e.baseRoute+"/{:id}/way_points/{:way_point_id}/forms",IMPORT_TASKS_CSV:e.baseRoute+"/import_from_csv",BROADCAST_TO_DRIVERS:e.baseRoute+"/broadcast_to_drivers",CREATE_TASK_NOTE:e.baseRoute+"/{:id}/way_points/{:way_point_id}/task_notes",DELETE_WAYPOINT:e.baseRoute+"/{:id}/way_points/{:way_point_id}"}},function(t,e,n){"use strict";n.r(e);var r=n(2),o=n(79),i=n(71),s=n(27),u=n(7),a=n(81),c=n(53),l=n(36),f=n(59),p=n(10),h=n(85),d=n(0),y=n(37),v=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return d.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(y.a),_=n(34),b=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,o=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<o&&(t=n.shift()));if(this.active=!1,e){for(;++r<o&&(t=n.shift());)t.unsubscribe();throw e}},e}(_.a))(v),E=function(t){function e(e,n){void 0===e&&(e=g),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return d.a(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(_.a),g=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var o=t.call(this,e,n)||this;return o.scheduler=e,o.work=n,o.index=r,o.active=!0,o.index=e.index=r,o}return d.a(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var o=new e(this.scheduler,this.work);return this.add(o),o.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var o=t.actions;return o.push(this),o.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0)},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(y.a),w=n(66),T=n(6),m=n(1),O=n(22),S=n(43),R=n(20),A=n(25);function x(t){return!!t&&(t instanceof r.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var P=n(30),C=n(33),I=n(28),k=n(45),N=n(83),D=n(12),U=n(57),M=n(8),L=n(13);function j(t,e,n){if(e){if(!Object(L.a)(e))return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return j(t,n).apply(void 0,r).pipe(Object(D.a)((function(t){return Object(M.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i,s=this,u={context:s,subject:i,callbackFunc:t,scheduler:n};return new r.a((function(r){if(n){var o={args:e,subscriber:r,params:u};return n.schedule(G,0,o)}if(!i){i=new l.a;try{t.apply(s,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.next(t.length<=1?t[0]:t),i.complete()}]))}catch(t){Object(U.a)(i)?i.error(t):console.warn(t)}}return i.subscribe(r)}))}}function G(t){var e=this,n=t.args,r=t.subscriber,o=t.params,i=o.callbackFunc,s=o.context,u=o.scheduler,a=o.subject;if(!a){a=o.subject=new l.a;try{i.apply(s,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length<=1?t[0]:t;e.add(u.schedule(B,0,{value:r,subject:a}))}]))}catch(t){a.error(t)}}this.add(a.subscribe(r))}function B(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function F(t,e,n){if(e){if(!Object(L.a)(e))return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return F(t,n).apply(void 0,r).pipe(Object(D.a)((function(t){return Object(M.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new r.a((function(r){var o=i.context,s=i.subject;if(n)return n.schedule(H,0,{params:i,subscriber:r,context:o});if(!s){s=i.subject=new l.a;try{t.apply(o,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?s.error(n):(s.next(t.length<=1?t[0]:t),s.complete())}]))}catch(t){Object(U.a)(s)?s.error(t):console.warn(t)}}return s.subscribe(r)}))}}function H(t){var e=this,n=t.params,r=t.subscriber,o=t.context,i=n.callbackFunc,s=n.args,u=n.scheduler,a=n.subject;if(!a){a=n.subject=new l.a;try{i.apply(o,s.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(u.schedule(Y,0,{err:r,subject:a}));else{var o=t.length<=1?t[0]:t;e.add(u.schedule(V,0,{value:o,subject:a}))}}]))}catch(t){this.add(u.schedule(Y,0,{err:t,subject:a}))}}this.add(a.subscribe(r))}function V(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function Y(t){var e=t.err;t.subject.error(e)}var W=n(49),K=n(40),q=n(54),z=n(14),Q=n(56),$=n(16);function J(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var n=t[0];if(Object(M.a)(n))return X(n,null);if(Object(Q.a)(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return X(r.map((function(t){return n[t]})),r)}}if("function"==typeof t[t.length-1]){var o=t.pop();return X(t=1===t.length&&Object(M.a)(t[0])?t[0]:t,null).pipe(Object(D.a)((function(t){return o.apply(void 0,t)})))}return X(t,null)}function X(t,e){return new r.a((function(n){var r=t.length;if(0!==r)for(var o=new Array(r),i=0,s=0,u=function(u){var a=Object($.a)(t[u]),c=!1;n.add(a.subscribe({next:function(t){c||(c=!0,s++),o[u]=t},error:function(t){return n.error(t)},complete:function(){++i!==r&&c||(s===r&&n.next(e?e.reduce((function(t,e,n){return t[e]=o[n],t}),{}):o),n.complete())}}))},a=0;a<r;a++)u(a);else n.complete()}))}var Z=n(31);function tt(t,e,n,o){return Object(Z.a)(n)&&(o=n,n=void 0),o?tt(t,e,n).pipe(Object(D.a)((function(t){return Object(M.a)(t)?o.apply(void 0,t):o(t)}))):new r.a((function(r){!function t(e,n,r,o,i){var s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var u=e;e.addEventListener(n,r,i),s=function(){return u.removeEventListener(n,r,i)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var a=e;e.on(n,r),s=function(){return a.off(n,r)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var c=e;e.addListener(n,r),s=function(){return c.removeListener(n,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,f=e.length;l<f;l++)t(e[l],n,r,o,i)}o.add(s)}(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function et(t,e,n){return n?et(t,e).pipe(Object(D.a)((function(t){return Object(M.a)(t)?n.apply(void 0,t):n(t)}))):new r.a((function(n){var r,o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{r=t(o)}catch(t){return void n.error(t)}if(Object(Z.a)(e))return function(){return e(o,r)}}))}function nt(t,e,n,o,i){var s,u;if(1==arguments.length){var a=t;u=a.initialState,e=a.condition,n=a.iterate,s=a.resultSelector||A.a,i=a.scheduler}else void 0===o||Object(L.a)(o)?(u=t,s=A.a,i=o):(u=t,s=o);return new r.a((function(t){var r=u;if(i)return i.schedule(rt,0,{subscriber:t,iterate:n,condition:e,resultSelector:s,state:r});for(;;){if(e){var o=void 0;try{o=e(r)}catch(e){return void t.error(e)}if(!o){t.complete();break}}var a=void 0;try{a=s(r)}catch(e){return void t.error(e)}if(t.next(a),t.closed)break;try{r=n(r)}catch(e){return void t.error(e)}}}))}function rt(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void e.error(t)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state)}catch(t){return void e.error(t)}if(!r)return void e.complete();if(e.closed)return}var o;try{o=t.resultSelector(t.state)}catch(t){return void e.error(t)}if(!e.closed&&(e.next(o),!e.closed))return this.schedule(t)}}function ot(t,e,n){return void 0===e&&(e=z.a),void 0===n&&(n=z.a),Object(q.a)((function(){return t()?e:n}))}var it=n(38);function st(t,e){return void 0===t&&(t=0),void 0===e&&(e=p.a),(!Object(it.a)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=p.a),new r.a((function(n){return n.add(e.schedule(ut,t,{subscriber:n,counter:0,period:t})),n}))}function ut(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}var at=n(78),ct=new r.a(R.a);function lt(){return ct}var ft=n(42);function pt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return z.a;var n=t[0],o=t.slice(1);return 1===t.length&&Object(M.a)(n)?pt.apply(void 0,n):new r.a((function(t){var e=function(){return t.add(pt.apply(void 0,o).subscribe(t))};return Object($.a)(n).subscribe({next:function(e){t.next(e)},error:e,complete:e})}))}function ht(t,e){return e?new r.a((function(n){var r=Object.keys(t),o=new T.a;return o.add(e.schedule(dt,0,{keys:r,index:0,subscriber:n,subscription:o,obj:t})),o})):new r.a((function(e){for(var n=Object.keys(t),r=0;r<n.length&&!e.closed;r++){var o=n[r];t.hasOwnProperty(o)&&e.next([o,t[o]])}e.complete()}))}function dt(t){var e=t.keys,n=t.index,r=t.subscriber,o=t.subscription,i=t.obj;if(!r.closed)if(n<e.length){var s=e[n];r.next([s,i[s]]),o.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:o,obj:i}))}else r.complete()}var yt=n(90),vt=n(46),_t=n(21);function bt(t,e,n){return[Object(_t.a)(e,n)(new r.a(Object(vt.a)(t))),Object(_t.a)(Object(yt.a)(e,n))(new r.a(Object(vt.a)(t)))]}var Et=n(82);function gt(t,e,n){return void 0===t&&(t=0),new r.a((function(r){void 0===e&&(e=t,t=0);var o=0,i=t;if(n)return n.schedule(wt,0,{index:o,count:e,start:t,subscriber:r});for(;;){if(o++>=e){r.complete();break}if(r.next(i++),r.closed)break}}))}function wt(t){var e=t.start,n=t.index,r=t.count,o=t.subscriber;n>=r?o.complete():(o.next(e),o.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var Tt=n(51),mt=n(76);function Ot(t,e){return new r.a((function(n){var r,o;try{r=t()}catch(t){return void n.error(t)}try{o=e(r)}catch(t){return void n.error(t)}var i=(o?Object($.a)(o):z.a).subscribe(n);return function(){i.unsubscribe(),r&&r.unsubscribe()}}))}var St=n(55),Rt=n(84),At=n(18);n.d(e,"Observable",(function(){return r.a})),n.d(e,"ConnectableObservable",(function(){return o.a})),n.d(e,"GroupedObservable",(function(){return i.a})),n.d(e,"observable",(function(){return s.a})),n.d(e,"Subject",(function(){return u.a})),n.d(e,"BehaviorSubject",(function(){return a.a})),n.d(e,"ReplaySubject",(function(){return c.a})),n.d(e,"AsyncSubject",(function(){return l.a})),n.d(e,"asapScheduler",(function(){return f.a})),n.d(e,"asyncScheduler",(function(){return p.a})),n.d(e,"queueScheduler",(function(){return h.a})),n.d(e,"animationFrameScheduler",(function(){return b})),n.d(e,"VirtualTimeScheduler",(function(){return E})),n.d(e,"VirtualAction",(function(){return g})),n.d(e,"Scheduler",(function(){return w.a})),n.d(e,"Subscription",(function(){return T.a})),n.d(e,"Subscriber",(function(){return m.a})),n.d(e,"Notification",(function(){return O.a})),n.d(e,"NotificationKind",(function(){return O.b})),n.d(e,"pipe",(function(){return S.a})),n.d(e,"noop",(function(){return R.a})),n.d(e,"identity",(function(){return A.a})),n.d(e,"isObservable",(function(){return x})),n.d(e,"ArgumentOutOfRangeError",(function(){return P.a})),n.d(e,"EmptyError",(function(){return C.a})),n.d(e,"ObjectUnsubscribedError",(function(){return I.a})),n.d(e,"UnsubscriptionError",(function(){return k.a})),n.d(e,"TimeoutError",(function(){return N.a})),n.d(e,"bindCallback",(function(){return j})),n.d(e,"bindNodeCallback",(function(){return F})),n.d(e,"combineLatest",(function(){return W.b})),n.d(e,"concat",(function(){return K.a})),n.d(e,"defer",(function(){return q.a})),n.d(e,"empty",(function(){return z.b})),n.d(e,"forkJoin",(function(){return J})),n.d(e,"from",(function(){return $.a})),n.d(e,"fromEvent",(function(){return tt})),n.d(e,"fromEventPattern",(function(){return et})),n.d(e,"generate",(function(){return nt})),n.d(e,"iif",(function(){return ot})),n.d(e,"interval",(function(){return st})),n.d(e,"merge",(function(){return at.a})),n.d(e,"never",(function(){return lt})),n.d(e,"of",(function(){return ft.a})),n.d(e,"onErrorResumeNext",(function(){return pt})),n.d(e,"pairs",(function(){return ht})),n.d(e,"partition",(function(){return bt})),n.d(e,"race",(function(){return Et.a})),n.d(e,"range",(function(){return gt})),n.d(e,"throwError",(function(){return Tt.a})),n.d(e,"timer",(function(){return mt.a})),n.d(e,"using",(function(){return Ot})),n.d(e,"zip",(function(){return St.b})),n.d(e,"scheduled",(function(){return Rt.a})),n.d(e,"EMPTY",(function(){return z.a})),n.d(e,"NEVER",(function(){return ct})),n.d(e,"config",(function(){return At.a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(2),o=n(10),i=n(38),s=n(13);function u(t,e,n){void 0===t&&(t=0);var u=-1;return Object(i.a)(e)?u=Number(e)<1?1:Number(e):Object(s.a)(e)&&(n=e),Object(s.a)(n)||(n=o.a),new r.a((function(e){var r=Object(i.a)(t)?t:+t-n.now();return n.schedule(a,r,{index:0,period:u,subscriber:e})}))}function a(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(50);function o(){return Object(r.a)(1)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(2),o=n(13),i=n(50),s=n(35);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,u=null,a=t[t.length-1];return Object(o.a)(a)?(u=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof a&&(n=t.pop()),null===u&&1===t.length&&t[0]instanceof r.a?t[0]:Object(i.a)(n)(Object(s.a)(t,u))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l}));var r=n(0),o=n(7),i=n(2),s=n(1),u=n(6),a=n(52),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.a(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new u.a).add(this.source.subscribe(new f(this.getSubject(),this))),t.closed&&(this._connection=null,t=u.a.EMPTY)),t},e.prototype.refCount=function(){return Object(a.a)()(this)},e}(i.a),l=function(){var t=c.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(o.b);s.a},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return a}));var r=n(0),o=n(1),i=n(22);function s(t,e){return void 0===e&&(e=0),function(n){return n.lift(new u(t,e))}}var u=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.scheduler,this.delay))},t}(),a=function(t){function e(e,n,r){void 0===r&&(r=0);var o=t.call(this,e)||this;return o.scheduler=n,o.delay=r,o}return r.a(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(i.a.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(i.a.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(i.a.createComplete()),this.unsubscribe()},e}(o.a),c=function(){return function(t,e){this.notification=t,this.destination=e}}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(0),o=n(7),i=n(28),s=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.a(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new i.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(0),o=n(8),i=n(35),s=n(4),u=n(3);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!Object(o.a)(t[0]))return t[0];t=t[0]}return Object(i.a)(t,void 0).lift(new c)}var c=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new l(t))},t}(),l=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.a(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],o=Object(u.a)(this,r,r,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,r,o){if(!this.hasFirst){this.hasFirst=!0;for(var i=0;i<this.subscriptions.length;i++)if(i!==n){var s=this.subscriptions[i];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)},e}(s.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}()},function(t,e,n){"use strict";var r=n(2),o=n(6),i=n(27);var s=n(58),u=n(26);var a=n(88),c=n(86);function l(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[i.a]}(t))return function(t,e){return new r.a((function(n){var r=new o.a;return r.add(e.schedule((function(){var o=t[i.a]();r.add(o.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r}))}(t,e);if(Object(a.a)(t))return function(t,e){return new r.a((function(n){var r=new o.a;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r}))}(t,e);if(Object(c.a)(t))return Object(s.a)(t,e);if(function(t){return t&&"function"==typeof t[u.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.a((function(n){var r,i=new o.a;return i.add((function(){r&&"function"==typeof r.return&&r.return()})),i.add(e.schedule((function(){r=t[u.a](),i.add(e.schedule((function(){if(!n.closed){var t,e;try{var o=r.next();t=o.value,e=o.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),i}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}n.d(e,"a",(function(){return l}))},function(t,e,n){"use strict";var r=n(0),o=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.a(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(37).a),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e}(n(34).a);n.d(e,"a",(function(){return s}));var s=new i(o)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()}}},function(t,e,n){"use strict";function r(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(0),o=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.a(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(6).a)},function(t,e,n){"use strict";function r(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.AnonymousServiceRequest=e.AuthorizedServiceRequest=e.ResponseHandler=e.RequestOptions=e.logErrorResponse=void 0;var s=n(146),u=n(39),a=n(11),c=n(15);e.logErrorResponse=function(t){var e=t.data,n=t.status;try{u.default.error(t.config.method.toUpperCase(),t.config.url,n)}catch(t){}try{u.default.info(t.config.method.toUpperCase(),t.config.url,n,e)}catch(t){}try{u.default.debug(t)}catch(t){}};var l=function(){function t(t,e,n,o,i){this.headers=r(r({"Content-Type":"application/json"},i),{"sdk-version":"0.6.0",Client:t}),this.timeout=e,this.validateStatus=a.stubTrue,n&&(this.params=n),o&&(this.headers.Authorization="Token token="+o)}return t.new=function(e){var n=void 0===e?{}:e,r=n.clientId,o=void 0===r?"Bringg Dashboard":r,i=n.timeout,s=void 0===i?12e4:i,u=n.queryString,a=void 0===u?void 0:u,c=n.authenticationToken,l=void 0===c?void 0:c,f=n.headers;return new t(o,s,a,l,void 0===f?void 0:f)},t}();e.RequestOptions=l;var f=function(){function t(t){this.axiosPromise=t}return t.prototype.handle=function(t){return o(this,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:if(a.isUndefined(t))throw new Error("consumer must be defined");r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.axiosPromise];case 2:return e=r.sent(),[2,t(e)];case 3:if((n=r.sent())instanceof c.BringgException)throw n;return[2,t(n)];case 4:return[2]}}))}))},t}();function p(t,e,n,r,o,i){switch(n.httpMethod){case 0:return function(t,e,n,r){return new f(t.get(""+e+n,{params:r}))}(t,e.encode(),n.applyParams(r),o);case 1:return function(t,e,n,r,o){return new f(t.post(""+e+n,o,{params:r}))}(t,e.encode(),n.applyParams(r),o,i);case 2:return function(t,e,n,r,o){return new f(t.put(""+e+n,o,{params:r}))}(t,e.encode(),n.applyParams(r),o,i);case 3:return function(t,e,n,r,o){return new f(t.patch(""+e+n,o,{params:r}))}(t,e.encode(),n.applyParams(r),o,i);case 4:return function(t,e,n,r,o){return new f(t.delete(""+e+n,{params:r,data:o}))}(t,e.encode(),n.applyParams(r),o,i)}}function h(t){return t.interceptors.request.use((function(t){var e=t.method,n=t.url,r=t.params,o=t.headers,i=t.data;try{u.default.debug("REQUEST:",e.toUpperCase(),n)}catch(t){}try{u.default.trace("REQUEST-query-string:",r),u.default.trace("REQUEST-headers:",o),u.default.trace("REQUEST-data:",i)}catch(t){}return t})),t.interceptors.response.use((function(t){var e=t.statusText,n=t.status,r=t.headers,o=t.data;try{u.default.debug("RESPONSE:",t.config.url,n,e)}catch(t){}try{u.default.trace("RESPONSE-headers:",r),u.default.trace("RESPONSE-data:",o)}catch(t){}return t})),t}e.ResponseHandler=f;var d=function(){function t(t,e){this.authToken=e,this.clientId=t}return t.prototype.invoke=function(t,e,n,r,o,i){return p(function(t,e,n){return h(s.default.create(l.new({clientId:t,authenticationToken:e,headers:n})))}(this.clientId,this.authToken,i),t,e,n,r,o)},t}();e.AuthorizedServiceRequest=d;var y=function(){function t(t){this.clientId=t}return t.prototype.invoke=function(t,e,n,r,o){return p((i=this.clientId,h(s.default.create(l.new({clientId:i,headers:u})))),t,e,n,r,o);var i,u},t}();e.AnonymousServiceRequest=y},function(t,e,n){const r=n(62),o=n(93),i=n(32)("engine.io-client:transport");t.exports=class extends o{constructor(t){super(),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,e){const n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this}open(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState?this.write(t):i("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,this.emit("open")}onData(t){const e=r.decodePacket(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){this.emit("packet",t)}onClose(){this.readyState="closed",this.emit("close")}}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=n(188),o=n(189),i=n(127),s=n(32)("socket.io-parser");var u;e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(u=e.PacketType||(e.PacketType={}));e.Encoder=class{encode(t){return s("encoding packet %j",t),t.type!==u.EVENT&&t.type!==u.ACK||!i.hasBinary(t)?[this.encodeAsString(t)]:(t.type=t.type===u.EVENT?u.BINARY_EVENT:u.BINARY_ACK,this.encodeAsBinary(t))}encodeAsString(t){let e=""+t.type;return t.type!==u.BINARY_EVENT&&t.type!==u.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data)),s("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=o.deconstructPacket(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}};class a extends r{constructor(){super()}add(t){let e;if("string"==typeof t)e=this.decodeString(t),e.type===u.BINARY_EVENT||e.type===u.BINARY_ACK?(this.reconstructor=new c(e),0===e.attachments&&super.emit("decoded",e)):super.emit("decoded",e);else{if(!i.isBinary(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emit("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===u[n.type])throw new Error("unknown packet type "+n.type);if(n.type===u.BINARY_EVENT||n.type===u.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const o=t.substring(r,e);if(o!=Number(o)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(o)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(e));if(!a.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return s("decoded %s as %j",t,n),n}static isPayloadValid(t,e){switch(t){case u.CONNECT:return"object"==typeof e;case u.DISCONNECT:return void 0===e;case u.CONNECT_ERROR:return"string"==typeof e||"object"==typeof e;case u.EVENT:case u.BINARY_EVENT:return Array.isArray(e)&&e.length>0;case u.ACK:case u.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}e.Decoder=a;class c{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=o.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(24),s=n(70),u=function(t){function e(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.entityName=n,r.routeGenerator=new s.default(r),r}return o(e,t),e}(i.SessionBasedService);e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(131),s=n(132),u=n(99),a=n(100),c=n(98),l=n(133),f=function(t){function e(n,r,o){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=s.empty;break;case 1:if(!n){i.destination=s.empty;break}if("object"==typeof n){n instanceof e?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new p(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new p(i,n,r,o)}return i}return o(e,t),e.prototype[a.rxSubscriber]=function(){return this},e.create=function(t,n,r){var o=new e(t,n,r);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(u.Subscription);e.Subscriber=f;var p=function(t){function e(e,n,r,o){var u,a=t.call(this)||this;a._parentSubscriber=e;var c=a;return i.isFunction(n)?u=n:n&&(u=n.next,r=n.error,o=n.complete,n!==s.empty&&(c=Object.create(n),i.isFunction(c.unsubscribe)&&a.add(c.unsubscribe.bind(c)),c.unsubscribe=a.unsubscribe.bind(a))),a._context=c,a._next=u,a._error=r,a._complete=o,a}return o(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;c.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=c.config.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):l.hostReportError(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;l.hostReportError(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};c.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),c.config.useDeprecatedSynchronousErrorHandling)throw t;l.hostReportError(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!c.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return c.config.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(l.hostReportError(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(f);e.SafeSubscriber=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=!1;e.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else r&&console.log("RxJS: Back to a better error behavior. Thank you. <3");r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(201),o=n(202),i=n(131),s=n(203),u=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n=this._parentOrParents,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(var l=0;l<n.length;++l){n[l].remove(this)}if(i.isFunction(u))try{u.call(this)}catch(t){e=t instanceof s.UnsubscriptionError?a(t.errors):[t]}if(r.isArray(c)){l=-1;for(var f=c.length;++l<f;){var p=c[l];if(o.isObject(p))try{p.unsubscribe()}catch(t){e=e||[],t instanceof s.UnsubscriptionError?e=e.concat(a(t.errors)):e.push(t)}}}if(e)throw new s.UnsubscriptionError(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof t){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=((e=new t).closed=!0,e),t}();function a(t){return t.reduce((function(t,e){return t.concat(e instanceof s.UnsubscriptionError?e.errors:e)}),[])}e.Subscription=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),e.$$rxSubscriber=e.rxSubscriber},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskHelpers=void 0;var r=n(11),o=n(64),i=n(74),s=function(){function t(){}return t.isReadyToExecute=function(t){return t.ready_to_execute},t.isTaskInOpenState=function(t){return r.includes(i.OPEN_TASK_STATUES,t.status)},t.isDone=function(t){return r.includes(i.DONE_TASK_STATUES,t.status)},t.isGroupFollower=function(t){return Boolean(t.group_leader_id)},t.isUnacknowledged=function(t){return t.status===o.TaskStatus.Unacknowledged},t.isLate=function(t){return t.late},t.isInOpenState=function(e){return t.isTaskInOpenState(e)&&t.isReadyToExecute(e)},t.isInPlanningState=function(e){return t.isTaskInOpenState(e)&&!t.isReadyToExecute(e)},t.isInClosedState=function(e){return t.isDone(e)},t.isInvalid=function(t){return!0===t.invalidated},t}();e.TaskHelpers=s},function(t,e,n){"use strict";var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.userToGroupsMapper=e.groupFilter=e.GROUP_VALUES=e.UserEvents=e.successExtractor=e.countExtractor=e.usersExtractor=e.userExtractor=e.defaultExtractor=e.UsersScopes=void 0;var o=n(356);!function(t){t.DRIVERS="drivers",t.DISPATCHERS="dispatchers",t.ADMINS="admins",t.CUSTOMERS="customers",t.MARKED_AS_ONLINE="marked_as_online"}(e.UsersScopes||(e.UsersScopes={}));e.defaultExtractor=function(t){return t};e.userExtractor=function(t){return t.user};e.usersExtractor=function(t){return t.users};e.countExtractor=function(t){return t.count};var i;e.successExtractor=function(t){return t.success},function(t){t.CURRENT_USER_UPDATED="currentUserUpdated"}(e.UserEvents||(e.UserEvents={})),function(t){t.OfflineDrivers="OfflineDrivers",t.OnlineDrivers="OnlineDrivers",t.OnShiftDrivers="OnShiftDrivers",t.Customers="Customers",t.Admins="Admins",t.Dispatchers="Dispatchers"}(i=e.GROUP_VALUES||(e.GROUP_VALUES={})),e.groupFilter=new Map([[i.OfflineDrivers,o.UserHelpers.isOfflineDriver],[i.OnlineDrivers,o.UserHelpers.isOnlineDriver],[i.OnShiftDrivers,o.UserHelpers.isOnShiftDriver],[i.Customers,o.UserHelpers.isCustomer],[i.Admins,o.UserHelpers.isAdmin],[i.Dispatchers,o.UserHelpers.isDispatcher]]);var s=Array.from(e.groupFilter.keys());e.userToGroupsMapper=function(t){var n,o,i=[];try{for(var u=r(s),a=u.next();!a.done;a=u.next()){var c=a.value;!0===e.groupFilter.get(c)(t)&&i.push(c)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KEYSET_PAGINATION_VER=e.KeysetPaginationPageAction=void 0,function(t){t.NEXT="next",t.PREVIOUS="previous"}(e.KeysetPaginationPageAction||(e.KeysetPaginationPageAction={})),e.KEYSET_PAGINATION_VER=2},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.RESEND_CONFIRMATION_EMAIL_ROUTE=e.UNWIND_ROUTE=e.IMPERSONATE_BY_TEAM_ROUTE=e.IMPERSONATE_ROUTE=e.SWITCH_ROUTE=e.LOGOUT_ROUTE=e.GET_USER_ROUTE=e.CREATE_TOKEN_ROUTE=void 0;var i=n(67),s=n(68),u=n(91),a=n(166),c=n(19),l=n(15),f=n(47),p=n(167),h=n(11),d=n(61);e.CREATE_TOKEN_ROUTE=new c.Route("/tokens",1),e.GET_USER_ROUTE=new c.Route("/tokens",0),e.LOGOUT_ROUTE=new c.Route("/tokens",4),e.SWITCH_ROUTE=new c.Route("/tokens/switch_accounts",1),e.IMPERSONATE_ROUTE=new c.Route("/tokens/impersonate",1),e.IMPERSONATE_BY_TEAM_ROUTE=new c.Route("/support/impersonate",1),e.UNWIND_ROUTE=new c.Route("/tokens/unwind_impersonate",1),e.RESEND_CONFIRMATION_EMAIL_ROUTE=new c.Route("/tokens/resend_confirmation_email",1);var y=function(){function t(t,e){this.clientId=t,this.endpoint=e}return t.init=function(e){return new t(d.BringgDashboardSDK.configurationProvider.getClientId(),e?s.default.parse(d.BringgDashboardSDK.configurationProvider.getAuthenticationEndpoint(e)):s.default.parse(d.BringgDashboardSDK.configurationProvider.getRegionDiscoveryEndpoint()))},t.isRecaptchaNeeded=function(t){return"recaptcha_stoken"in t},t.isRegionInformationNeeded=function(t){return"merchants_data"in t},t.prototype.loginWithSessionCode=function(t,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.CREATE_TOKEN_ROUTE,{},void 0,{code:t,session:n}).handle((function(t){var e=t.data,n=t.status;if(n===i.HttpStatusCode.UNAUTHORIZED)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(n),"Invalid session or code");if(n===i.HttpStatusCode.OK)return new a.default(e);throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(n),t.statusText)}))];case 1:return[2,r.sent()]}}))}))},t.prototype.loginWithEmail=function(n,s,c,d,y){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.CREATE_TOKEN_ROUTE,{},void 0,{email:p(h.toLower(n)).toString(),password:s,merchant_uuid:c,remember_me:!0,recaptcha:d,recaptcha_qa_token:y}).handle((function(e){var n=e.message,r=e,o=r.data,s=r.status;if(h.isUndefined(s)||s===i.HttpStatusCode.NOT_FOUND||s===i.HttpStatusCode.INTERNAL_SERVER_ERROR)throw new l.BringgException(f.ExceptionReason.fromHttpStatusCode(s),i.REGION_NOT_WORKING,new Error(n));if(s===i.HttpStatusCode.UNAUTHORIZED){if(u.logErrorResponse(e),o.resend_confirmation_available)throw new l.BringgException(f.ExceptionReason.fromHttpStatusCode(s),"User is blocked",null,o);throw new l.BringgException(f.ExceptionReason.fromHttpStatusCode(s),"Invalid user name or password")}if(s===i.HttpStatusCode.LOCKED||t.isRecaptchaNeeded(o))throw u.logErrorResponse(e),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.LOCKED),"Recaptcha validation needed",null,o.recaptcha_stoken);if(s===i.HttpStatusCode.FAILED_DEPENDENCY||t.isRegionInformationNeeded(o))throw new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.FAILED_DEPENDENCY),"Merchant and region information needed",null,o.merchants_data);if(s===i.HttpStatusCode.OK)return new a.default(o);throw u.logErrorResponse(e),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(s),e.statusText)}))];case 1:return[2,r.sent()]}}))}))},t.prototype.loginWithToken=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.GET_USER_ROUTE,null,{auth_token:t}).handle((function(t){var e=t.data,n=t.status;if(n!==i.HttpStatusCode.OK)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(n),n===i.HttpStatusCode.FORBIDDEN||n===i.HttpStatusCode.UNAUTHORIZED?"Unauthorized":"Temporary unavailable");return new a.default(e)}))];case 1:return[2,n.sent()]}}))}))},t.prototype.logout=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.LOGOUT_ROUTE,null,{auth_token:t}).handle((function(t){var e=t.data;if(t.status!==i.HttpStatusCode.OK||!e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),"Unable to logout");return e.success}))];case 1:return[2,n.sent()]}}))}))},t.prototype.switchAccounts=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.SWITCH_ROUTE,null,{auth_token:t}).handle((function(t){var e=t.data;if(t.status!==i.HttpStatusCode.OK||!e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),"Unable to switch accounts");return new a.default(e.user)}))];case 1:return[2,n.sent()]}}))}))},t.prototype.unwind=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.UNWIND_ROUTE,null,{auth_token:t}).handle((function(t){var e=t.data,n=t.status;if(n!==i.HttpStatusCode.OK||!1===e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),n!==i.HttpStatusCode.OK?"Unable to return to original user":"Not in impersonation mode");return new a.default(e)}))];case 1:return[2,n.sent()]}}))}))},t.prototype.impersonate=function(t,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.IMPERSONATE_ROUTE,null,{auth_token:t,user_id:n}).handle((function(t){var e=t.data;if(t.status!==i.HttpStatusCode.OK||!1===e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),"Unable to impersonate requested account");return e.enable_logs=!0,e.beta=!0,e.debug=!0,new a.default(e)}))];case 1:return[2,r.sent()]}}))}))},t.prototype.impersonateByTeam=function(t,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.IMPERSONATE_BY_TEAM_ROUTE,null,{team_id:n},{auth_token:t}).handle((function(t){var e=t.data;if(t.status!==i.HttpStatusCode.OK||!e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),"Unable to impersonate requested team");return new a.default(e.user)}))];case 1:return[2,r.sent()]}}))}))},t.prototype.resendConfirmationEmail=function(t,n,s,a,c){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new u.AnonymousServiceRequest(this.clientId).invoke(this.endpoint,e.RESEND_CONFIRMATION_EMAIL_ROUTE,null,null,{email:p(h.toLower(t)).toString(),password:n,merchant_uuid:s,recaptcha:a,recaptcha_qa_token:c}).handle((function(t){var e=t.data;if(t.status!==i.HttpStatusCode.OK||!e.success)throw u.logErrorResponse(t),new l.BringgException(f.ExceptionReason.fromHttpStatusCode(i.HttpStatusCode.BAD_REQUEST),"Unable to resend confirmation email");return!0}))];case 1:return[2,r.sent()]}}))}))},t}();e.default=y},function(t,e){var n={};n[e.ACCEPTED=202]="Accepted",n[e.BAD_GATEWAY=502]="Bad Gateway",n[e.BAD_REQUEST=400]="Bad Request",n[e.CONFLICT=409]="Conflict",n[e.CONTINUE=100]="Continue",n[e.CREATED=201]="Created",n[e.EXPECTATION_FAILED=417]="Expectation Failed",n[e.FAILED_DEPENDENCY=424]="Failed Dependency",n[e.FORBIDDEN=403]="Forbidden",n[e.GATEWAY_TIMEOUT=504]="Gateway Timeout",n[e.GONE=410]="Gone",n[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP Version Not Supported",n[e.IM_A_TEAPOT=418]="I'm a teapot",n[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="Insufficient Space on Resource",n[e.INSUFFICIENT_STORAGE=507]="Insufficient Storage",n[e.INTERNAL_SERVER_ERROR=500]="Server Error",n[e.LENGTH_REQUIRED=411]="Length Required",n[e.LOCKED=423]="Locked",n[e.METHOD_FAILURE=420]="Method Failure",n[e.METHOD_NOT_ALLOWED=405]="Method Not Allowed",n[e.MOVED_PERMANENTLY=301]="Moved Permanently",n[e.MOVED_TEMPORARILY=302]="Moved Temporarily",n[e.MULTI_STATUS=207]="Multi-Status",n[e.MULTIPLE_CHOICES=300]="Multiple Choices",n[e.NETWORK_AUTHENTICATION_REQUIRED=511]="Network Authentication Required",n[e.NO_CONTENT=204]="No Content",n[e.NON_AUTHORITATIVE_INFORMATION=203]="Non Authoritative Information",n[e.NOT_ACCEPTABLE=406]="Not Acceptable",n[e.NOT_FOUND=404]="Not Found",n[e.NOT_IMPLEMENTED=501]="Not Implemented",n[e.NOT_MODIFIED=304]="Not Modified",n[e.OK=200]="OK",n[e.PARTIAL_CONTENT=206]="Partial Content",n[e.PAYMENT_REQUIRED=402]="Payment Required",n[e.PERMANENT_REDIRECT=308]="Permanent Redirect",n[e.PRECONDITION_FAILED=412]="Precondition Failed",n[e.PRECONDITION_REQUIRED=428]="Precondition Required",n[e.PROCESSING=102]="Processing",n[e.PROXY_AUTHENTICATION_REQUIRED=407]="Proxy Authentication Required",n[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="Request Header Fields Too Large",n[e.REQUEST_TIMEOUT=408]="Request Timeout",n[e.REQUEST_TOO_LONG=413]="Request Entity Too Large",n[e.REQUEST_URI_TOO_LONG=414]="Request-URI Too Long",n[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="Requested Range Not Satisfiable",n[e.RESET_CONTENT=205]="Reset Content",n[e.SEE_OTHER=303]="See Other",n[e.SERVICE_UNAVAILABLE=503]="Service Unavailable",n[e.SWITCHING_PROTOCOLS=101]="Switching Protocols",n[e.TEMPORARY_REDIRECT=307]="Temporary Redirect",n[e.TOO_MANY_REQUESTS=429]="Too Many Requests",n[e.UNAUTHORIZED=401]="Unauthorized",n[e.UNPROCESSABLE_ENTITY=422]="Unprocessable Entity",n[e.UNSUPPORTED_MEDIA_TYPE=415]="Unsupported Media Type",n[e.USE_PROXY=305]="Use Proxy",e.getStatusText=function(t){if(n.hasOwnProperty(t))return n[t];throw new Error("Status code does not exist: "+t)}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(23);function o(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var s=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(o(e)+"="+o(t))})))})),i=s.join("&")}if(i){var u=t.indexOf("#");-1!==u&&(t=t.slice(0,u)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";(function(e){var r=n(23),o=n(152),i={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,a={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==e&&"[object process]"===Object.prototype.toString.call(e))&&(u=n(112)),u),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(t){a.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){a.headers[t]=r.merge(i)})),t.exports=a}).call(this,n(111))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var a,c=[],l=!1,f=-1;function p(){l&&a&&(l=!1,a.length?c=a.concat(c):f=-1,c.length&&h())}function h(){if(!l){var t=u(p);l=!0;for(var e=c.length;e;){for(a=c,c=[];++f<e;)a&&a[f].run();f=-1,e=c.length}a=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||u(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(23),o=n(153),i=n(155),s=n(108),u=n(156),a=n(159),c=n(160),l=n(113);t.exports=function(t){return new Promise((function(e,n){var f=t.data,p=t.headers;r.isFormData(f)&&delete p["Content-Type"];var h=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",y=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";p.Authorization="Basic "+btoa(d+":"+y)}var v=u(t.baseURL,t.url);if(h.open(t.method.toUpperCase(),s(v,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,i={data:t.responseType&&"text"!==t.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:t,request:h};o(e,n,i),h=null}},h.onabort=function(){h&&(n(l("Request aborted",t,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(l("Network Error",t,null,h)),h=null},h.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var _=(t.withCredentials||c(v))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;_&&(p[t.xsrfHeaderName]=_)}if("setRequestHeader"in h&&r.forEach(p,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete p[e]:h.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(h.withCredentials=!!t.withCredentials),t.responseType)try{h.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){h&&(h.abort(),n(t),h=null)})),f||(f=null),h.send(f)}))}},function(t,e,n){"use strict";var r=n(154);t.exports=function(t,e,n,o,i){var s=new Error(t);return r(s,e,n,o,i)}},function(t,e,n){"use strict";var r=n(23);t.exports=function(t,e){e=e||{};var n={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],u=["validateStatus"];function a(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function c(o){r.isUndefined(e[o])?r.isUndefined(t[o])||(n[o]=a(void 0,t[o])):n[o]=a(t[o],e[o])}r.forEach(o,(function(t){r.isUndefined(e[t])||(n[t]=a(void 0,e[t]))})),r.forEach(i,c),r.forEach(s,(function(o){r.isUndefined(e[o])?r.isUndefined(t[o])||(n[o]=a(void 0,t[o])):n[o]=a(void 0,e[o])})),r.forEach(u,(function(r){r in e?n[r]=a(t[r],e[r]):r in t&&(n[r]=a(void 0,t[r]))}));var l=o.concat(i).concat(s).concat(u),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===l.indexOf(t)}));return r.forEach(f,c),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";(function(t){
|
|
25
25
|
/*!
|
|
26
26
|
* The buffer module from node.js, for the browser.
|
|
27
27
|
*
|
|
28
28
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
29
29
|
* @license MIT
|
|
30
30
|
*/
|
|
31
|
-
var r=n(168),o=n(169),i=n(170);function s(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=a.prototype:(null===t&&(t=new a(e)),t.length=e),t}function a(t,e,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);a.TYPED_ARRAY_SUPPORT?(t=e).__proto__=a.prototype:t=p(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),o=(t=u(t,r)).write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(a.isBuffer(e)){var n=0|h(e.length);return 0===(t=u(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?u(t,0):p(t,e);if("Buffer"===e.type&&i(e.data))return p(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=u(t,e<0?0:0|h(e)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|h(e.length);t=u(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(r)return B(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,n);case"utf8":case"utf-8":return R(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return x(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function _(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=a.from(e,r)),a.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,o);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,o){var i,s=1,u=t.length,a=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,u/=2,a/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var l=-1;for(i=n;i<u;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===a)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(n+a>u&&(n=u-a),i=n;i>=0;i--){for(var f=!0,p=0;p<a;p++)if(c(t,i+p)!==c(e,p)){f=!1;break}if(f)return i}return-1}function g(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var u=parseInt(e.substr(2*s,2),16);if(isNaN(u))return s;t[n+s]=u}return s}function E(t,e,n,r){return H(B(e,t.length-n),t,n,r)}function w(t,e,n,r){return H(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function T(t,e,n,r){return w(t,e,n,r)}function m(t,e,n,r){return H(F(e),t,n,r)}function O(t,e,n,r){return H(function(t,e){for(var n,r,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function R(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,s,u,a,c=t[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(a=(31&c)<<6|63&i)>127&&(l=a);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(a=(15&c)<<12|(63&i)<<6|63&s)>2047&&(a<55296||a>57343)&&(l=a);break;case 4:i=t[o+1],s=t[o+2],u=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&u)&&(a=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&u)>65535&&a<1114112&&(l=a)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=a,e.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},e.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,n){return c(null,t,e,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?u(t,e):void 0!==n?"string"==typeof r?u(t,e).fill(n,r):u(t,e).fill(n):u(t,e)}(null,t,e,n)},a.allocUnsafe=function(t){return f(null,t)},a.allocUnsafeSlow=function(t){return f(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=a.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!a.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):y.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,e,n,r,o){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),u=Math.min(i,s),c=this.slice(r,o),l=t.slice(e,n),f=0;f<u;++f)if(c[f]!==l[f]){i=c[f],s=l[f];break}return i<s?-1:s<i?1:0},a.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},a.prototype.indexOf=function(t,e,n){return _(this,t,e,n,!0)},a.prototype.lastIndexOf=function(t,e,n){return _(this,t,e,n,!1)},a.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return g(this,t,e,n);case"utf8":case"utf-8":return E(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return T(this,t,e,n);case"base64":return m(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function x(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function P(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=G(t[i]);return o}function C(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function I(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function k(t,e,n,r,o,i){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function N(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function D(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function U(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,i){return i||U(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,i){return i||U(t,0,n,8),o.write(t,e,n,r,52,8),n+8}a.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),a.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=a.prototype;else{var o=e-t;n=new a(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},a.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},a.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},a.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},a.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},a.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||k(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},a.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||k(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},a.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);k(this,t,e,n,o-1,-o)}var i=0,s=1,u=0;for(this[e]=255&t;++i<n&&(s*=256);)t<0&&0===u&&0!==this[e+i-1]&&(u=1),this[e+i]=(t/s>>0)-u&255;return e+n},a.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);k(this,t,e,n,o-1,-o)}var i=n-1,s=1,u=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===u&&0!==this[e+i+1]&&(u=1),this[e+i]=(t/s>>0)-u&255;return e+n},a.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},a.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},a.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},a.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},a.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!a.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},a.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var s=a.isBuffer(t)?t:B(new a(t,r).toString()),u=s.length;for(i=0;i<n-e;++i)this[i+e]=s[i%u]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function F(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n(104))},function(t,e){var n={utf8:{stringToBytes:function(t){return n.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(n.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e},bytesToString:function(t){for(var e=[],n=0;n<t.length;n++)e.push(String.fromCharCode(t[n]));return e.join("")}}};t.exports=n},function(t,e){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,o=t.indexOf("["),i=t.indexOf("]");-1!=o&&-1!=i&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));for(var s,u,a=n.exec(t||""),c={},l=14;l--;)c[r[l]]=a[l]||"";return-1!=o&&-1!=i&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=function(t,e){var n=e.replace(/\/{2,9}/g,"/").split("/");"/"!=e.substr(0,1)&&0!==e.length||n.splice(0,1);"/"==e.substr(e.length-1,1)&&n.splice(n.length-1,1);return n}(0,c.path),c.queryKey=(s=c.query,u={},s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,n){e&&(u[e]=n)})),u),c}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const r=n(178),o=n(126),i=n(95),s=n(128),u=n(191),a=n(129),c=n(32)("socket.io-client:manager");class l extends a.StrictEventEmitter{constructor(t,e){super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new u({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const n=e.parser||i;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(c("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;c("opening %s",this.uri),this.engine=r(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=s.on(e,"open",(function(){n.onopen(),t&&t()})),i=s.on(e,"error",e=>{c("error"),n.cleanup(),n._readyState="closed",this.emitReserved("error",e),t?t(e):n.maybeReconnectOnOpen()});if(!1!==this._timeout){const t=this._timeout;c("connect attempt will timeout after %d",t),0===t&&o();const n=setTimeout(()=>{c("connect attempt timed out after %d",t),o(),e.close(),e.emit("error",new Error("timeout"))},t);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}return this.subs.push(o),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){c("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(s.on(t,"ping",this.onping.bind(this)),s.on(t,"data",this.ondata.bind(this)),s.on(t,"error",this.onerror.bind(this)),s.on(t,"close",this.onclose.bind(this)),s.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){this.decoder.add(t)}ondecoded(t){this.emitReserved("packet",t)}onerror(t){c("error",t),this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n||(n=new o.Socket(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return void c("socket %s is still active, skipping close",t)}this._close()}_packet(t){c("writing packet %j",t);const e=this.encoder.encode(t);for(let n=0;n<e.length;n++)this.engine.write(e[n],t.options)}cleanup(){c("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){c("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,"opening"===this._readyState&&this.cleanup(),this.backoff.reset(),this._readyState="closed",this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t){c("onclose"),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();c("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const n=setTimeout(()=>{t.skipReconnect||(c("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(c("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(c("reconnect success"),t.onreconnect())}))},e);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=l},function(t,e,n){const r=n(121),o=n(181),i=n(185),s=n(186);e.polling=function(t){let e,n=!1,s=!1;const u=!1!==t.jsonp;if("undefined"!=typeof location){const e="https:"===location.protocol;let r=location.port;r||(r=e?443:80),n=t.hostname!==location.hostname||r!==t.port,s=t.secure!==e}if(t.xdomain=n,t.xscheme=s,e=new r(t),"open"in e&&!t.forceJSONP)return new o(t);if(!u)throw new Error("JSONP disabled");return new i(t)},e.websocket=s},function(t,e,n){const r=n(180),o=n(69);t.exports=function(t){const e=t.xdomain,n=t.xscheme,i=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(t){}if(!e)try{return new(o[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},function(t,e,n){const r=n(92),o=n(94),i=n(62),s=n(124),u=n(32)("engine.io-client:polling");t.exports=class extends r{get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{u("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(u("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){u("pre-pause polling complete"),--t||e()}))),this.writable||(u("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){u("pre-pause writing complete"),--t||e()})))}else e()}poll(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")}onData(t){u("polling got data %s",t);i.decodePayload(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose(),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{u("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,i.encodePayload(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emit("drain")})})}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let n="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=s()),this.supportsBinary||t.sid||(t.b64=1),t=o.encode(t),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),t.length&&(t="?"+t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+t}}},function(t,e){const n=Object.create(null);n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";const r=Object.create(null);Object.keys(n).forEach(t=>{r[n[t]]=t});t.exports={PACKET_TYPES:n,PACKET_TYPES_REVERSE:r,ERROR_PACKET:{type:"error",data:"parser error"}}},function(t,e,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i={},s=0,u=0;function a(t){var e="";do{e=o[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function c(){var t=a(+new Date);return t!==r?(s=0,r=t):t+"."+a(s++)}for(;u<64;u++)i[o[u]]=u;c.encode=a,c.decode=function(t){var e=0;for(u=0;u<t.length;u++)e=64*e+i[t.charAt(u)];return e},t.exports=c},function(t,e){t.exports.pick=(t,...e)=>e.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const r=n(95),o=n(128),i=n(129),s=n(32)("socket.io-client:socket"),u=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class a extends i.StrictEventEmitter{constructor(t,e,n){super(),this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.auth&&(this.auth=n.auth),this.io._autoConnect&&this.open()}subEvents(){if(this.subs)return;const t=this.io;this.subs=[o.on(t,"open",this.onopen.bind(this)),o.on(t,"packet",this.onpacket.bind(this)),o.on(t,"error",this.onerror.bind(this)),o.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(u.hasOwnProperty(t))throw new Error('"'+t+'" is a reserved event name');e.unshift(t);const n={type:r.PacketType.EVENT,data:e,options:{}};n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(s("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++);const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)?s("discard packet as the transport is not currently writable"):this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){s("transport is open - connecting"),"function"==typeof this.auth?this.auth(t=>{this.packet({type:r.PacketType.CONNECT,data:t})}):this.packet({type:r.PacketType.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t){s("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emitReserved("disconnect",t)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case r.PacketType.CONNECT:if(t.data&&t.data.sid){const e=t.data.sid;this.onconnect(e)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case r.PacketType.EVENT:case r.PacketType.BINARY_EVENT:this.onevent(t);break;case r.PacketType.ACK:case r.PacketType.BINARY_ACK:this.onack(t);break;case r.PacketType.DISCONNECT:this.ondisconnect();break;case r.PacketType.CONNECT_ERROR:const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];s("emitting event %j",e),null!=t.id&&(s("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t)}ack(t){const e=this;let n=!1;return function(...o){n||(n=!0,s("sending ack %j",o),e.packet({type:r.PacketType.ACK,id:t,data:o}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(s("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):s("bad ack %s",t.id)}onconnect(t){s("socket connected with id %s",t),this.id=t,this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>this.packet(t)),this.sendBuffer=[]}ondisconnect(){s("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(s("performing disconnect (%s)",this.nsp),this.packet({type:r.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}}e.Socket=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const r="function"==typeof ArrayBuffer,o=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);function u(t){return r&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||i&&t instanceof Blob||s&&t instanceof File}e.isBinary=u,e.hasBinary=function t(e,n){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(t(e[n]))return!0;return!1}if(u(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return t(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return!0;return!1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=void 0,e.on=function(t,e,n){return t.on(e,n),function(){t.off(e,n)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StrictEventEmitter=void 0;const r=n(190);e.StrictEventEmitter=class extends r{on(t,e){return super.on(t,e),this}once(t,e){return super.once(t,e),this}emit(t,...e){return super.emit(t,...e),this}emitReserved(t,...e){return super.emit(t,...e),this}listeners(t){return super.listeners(t)}}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationProvider=void 0;var i=n(68),s=n(39),u=n(61),a=function(){function t(t){this.config=t}return t.fromUrl=function(e){return r(this,void 0,void 0,(function(){var n,r,u;return o(this,(function(o){switch(o.label){case 0:n=e instanceof i.default?e.encode():e,o.label=1;case 1:return o.trys.push([1,3,,4]),r=t.bind,[4,c(n)];case 2:return[2,new(r.apply(t,[void 0,o.sent()]))];case 3:throw u=o.sent(),s.default.error("can't initialise configuration from "+n),u;case 4:return[2]}}))}))},t.fromJson=function(e){return new t(JSON.parse(e))},t.getNextRegion=function(t){var e=u.BringgDashboardSDK.configurationProvider.getRegions(),n=e.indexOf(t);return e.length-1===n?e[0]:e[n+1]},t.prototype.getApiEndpoint=function(t){return this.config.regions[t].web_api_url},t.prototype.getRegionDiscoveryEndpoint=function(){return this.config.regions[this.getDefaultRegion()].web_api_url},t.prototype.getAuthenticationEndpoint=function(t){return this.config.regions[t].identity_api_url},t.prototype.getMonitoringEndpoint=function(t){return this.config.regions[t].real_time_url},t.prototype.getDefaultRegion=function(){return this.config.default_region},t.prototype.getRegions=function(){return Object.keys(this.config.regions)},t.prototype.getClientId=function(){return"Bringg Dashboard"},t.prototype.isUserAnalyticsEnabled=function(){return this.config.user_analytics.enabled},t.prototype.getUserAnalyticsApiKey=function(){return this.config.user_analytics.api_key},t.getConfigUrl=function(t){return"https://s3.amazonaws.com/bringg-hosts/regions/"+t+".json"},t}();function c(t){return fetch(t).then((function(t){if(!t.ok)throw new Error(t.statusText);return t.json().then((function(t){return t}))}))}e.ConfigurationProvider=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=function(t){return"function"==typeof t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(98),o=n(133);e.empty={closed:!0,next:function(t){},error:function(t){if(r.config.useDeprecatedSynchronousErrorHandling)throw t;o.hostReportError(t)},complete:function(){}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hostReportError=function(t){setTimeout((function(){throw t}),0)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DASHBOARD_EVENTS=void 0,e.DASHBOARD_EVENTS={DASHBOARDS_DATA_UPDATED:"dashboards data updated",WIDGET_DATA_FETCHED:"widget data fetched"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reasonToChangeInventoryExtractor=void 0;e.reasonToChangeInventoryExtractor=function(t){return t.reasons_to_change_inventories}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.taskInventoryExtractor=e.taskInventoryMassQuantityExtractor=void 0;e.taskInventoryMassQuantityExtractor=function(t){return t.task_inventories};e.taskInventoryExtractor=function(t){return t.task_inventory}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multipleExtractor=e.singleExtractor=e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t};e.singleExtractor=function(t){return t.conversation};e.multipleExtractor=function(t){return t.conversations}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multipleExtractor=e.singleExtractor=e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t};e.singleExtractor=function(t){return t.message};e.multipleExtractor=function(t){return t.messages}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notificationsTemplateExtractor=e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t};e.notificationsTemplateExtractor=function(t){return t.notification_templates}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCsvFieldsExtractor=e.assignmentHistoryExtractor=e.vehiclesExtractor=e.successExtractor=e.vehicleExtractor=e.REAL_TIME_EVENTS=e.INTERNAL_VEHICLE_EVENTS=void 0,e.INTERNAL_VEHICLE_EVENTS={VEHICLE_UPDATED:"vehicle updated"},e.REAL_TIME_EVENTS={VEHICLE_UPDATE:"vehicle update",VEHICLE_REMOVED:"vehicle removed"};e.vehicleExtractor=function(t){return t.vehicle};e.successExtractor=function(t){return t.success};e.vehiclesExtractor=function(t){return t.vehicles};e.assignmentHistoryExtractor=function(t){return t.changes};e.getCsvFieldsExtractor=function(t){return t.csv_upload_fields}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RunStatus=e.ResourceUploadType=e.DeliveryBlockConsts=e.TagConsts=e.Responses=e.ChatConversationConsts=e.ChatMessageConsts=e.CrewConsts=e.DashboardConsts=e.LanguageConsts=e.NotificationTemplateConsts=e.NotificationTypesConsts=e.PlannedRoutesConsts=e.ReasonToChangeInventory=e.RunConsts=e.TaskInventoryConsts=e.VehicleTypeConsts=e.BringgDashboardSDK=void 0;var r=n(11),o=n(39),i=n(61);Object.defineProperty(e,"BringgDashboardSDK",{enumerable:!0,get:function(){return i.BringgDashboardSDK}});var s=n(483);e.VehicleTypeConsts=s;var u=n(136);e.TaskInventoryConsts=u;var a=n(73);e.RunConsts=a;var c=n(135);e.ReasonToChangeInventory=c;var l=n(484);e.PlannedRoutesConsts=l;var f=n(140);e.NotificationTypesConsts=f;var p=n(141);e.NotificationTemplateConsts=p;var h=n(139);e.LanguageConsts=h;var d=n(134);e.DashboardConsts=d;var y=n(485);e.CrewConsts=y;var v=n(138);e.ChatMessageConsts=v;var _=n(137);e.ChatConversationConsts=_;var b=n(486);e.Responses=b;var g=n(487);e.TagConsts=g;var E=n(488);e.DeliveryBlockConsts=E;var w=n(489);e.ResourceUploadType=w.default;var T=n(73);Object.defineProperty(e,"RunStatus",{enumerable:!0,get:function(){return T.RunStatus}}),t.exports={},r.extend(t.exports,i.BringgDashboardSDK),r.extend(t.exports,o.LoggerUtil),r.extend(t.exports,{LOG_ALL:o.LOG_ALL,LOG_NONE:o.LOG_NONE,LOG_FATAL:o.LOG_FATAL,LOG_ERROR:o.LOG_ERROR,LOG_WARN:o.LOG_WARN,LOG_INFO:o.LOG_INFO,LOG_DEBUG:o.LOG_DEBUG,LOG_LEVEL:o.LOG_LEVEL})},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0});var s=n(105),u=n(172),a=n(130),c=n(68),l=n(61),f=n(63),p=n(193),h=n(39),d=n(67),y=n(194),v=function(){function t(t){this.merchant=null,this.webApplicationConfiguration=null,this.user=t,this.eventHandlers=new Set,this.sendDataEvent=this.sendDataEvent.bind(this)}return t.prototype.setEventHandler=function(t){this.eventHandlers.add(t)},t.prototype.sendDataEvent=function(e,n){t.sendDataEventInternal(this.eventHandlers,e,n)},t.prototype.update=function(t,e){if(!this[t])throw new Error("tried to update key: "+t+" not existing!");this[t]=y(this[t],e,{arrayMerge:function(t,e){return e}})},t.sendDataEventInternal=function(e,n,r){e.forEach((function(e){return t.checked(e,n,r)}))},t._merge=function(t,e){var n,r;try{for(var o=i(e),s=o.next();!s.done;s=o.next()){var u=s.value;t[u]=e[u]}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.fromUser=function(e,n){return void 0===n&&(n=!0),r(this,void 0,void 0,(function(){var r,i;return o(this,(function(o){switch(o.label){case 0:return r=new t(e),n?(i=r,[4,u.default.init(r)]):[3,2];case 1:i._persistentConnection=o.sent(),r._persistentConnection.subscribe(f.EMPLOYEE_UPDATE_EVENT,(function(e){e.uuid===r.user.uuid&&(t._merge(r.user,e),r.sendDataEvent("current user updated",r.user))})),o.label=2;case 2:return[2,r]}}))}))},Object.defineProperty(t.prototype,"userId",{get:function(){return this.user.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"region",{get:function(){return this.user.region?this.user.region:l.BringgDashboardSDK.configurationProvider.getDefaultRegion()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientId",{get:function(){return l.BringgDashboardSDK.configurationProvider.getClientId()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"config",{get:function(){var t=this;return new(function(){function e(){}return e.prototype.getApiEndpoint=function(){return c.default.parse(l.BringgDashboardSDK.configurationProvider.getApiEndpoint(t.region))},e.prototype.getAuthenticationEndpoint=function(){return c.default.parse(l.BringgDashboardSDK.configurationProvider.getAuthenticationEndpoint(t.region))},e.prototype.getMonitoringEndpoint=function(){return c.default.parse(l.BringgDashboardSDK.configurationProvider.getMonitoringEndpoint(t.region))},e}())},enumerable:!1,configurable:!0}),t.init=function(e){return r(this,void 0,void 0,(function(){var n,r,i,u;return o(this,(function(o){switch(o.label){case 0:return e.user?[3,6]:(r=s.default.init(e.region),e.authenticationToken?[4,r.loginWithToken(e.authenticationToken)]:[3,2]);case 1:return n=o.sent(),[3,6];case 2:return e.email?(i=e,[4,this.loginWithEmailRetry(e.region,i.email,i.password,i.merchant_uuid,i.recaptchaToken,i.recaptcha_qa_token,0)]):[3,4];case 3:return n=o.sent(),[3,6];case 4:return e.code?(u=e,[4,r.loginWithSessionCode(u.code,u.session)]):[3,6];case 5:n=o.sent(),o.label=6;case 6:return[2,t.fromUser(n)]}}))}))},t.loginWithEmailRetry=function(t,e,n,i,u,c,f){return r(this,void 0,void 0,(function(){var p,y,v,_=this;return o(this,(function(b){switch(b.label){case 0:p=t||l.BringgDashboardSDK.configurationProvider.getDefaultRegion(),f++,y=s.default.init(p),b.label=1;case 1:return b.trys.push([1,3,,4]),[4,y.loginWithEmail(e,n,i,u,c)];case 2:return[2,b.sent()];case 3:if(v=b.sent(),f<10&&v.message===d.REGION_NOT_WORKING)return h.default.error("Region is not accessible - "+p+", "+v.message),[2,new Promise((function(t,s){setTimeout((function(){return r(_,void 0,void 0,(function(){var r,l;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=t,[4,this.loginWithEmailRetry(a.ConfigurationProvider.getNextRegion(p),e,n,i,u,c,f)];case 1:return r.apply(void 0,[o.sent()]),[3,3];case 2:return l=o.sent(),s(l),[3,3];case 3:return[2]}}))}))}),100)}))];throw v;case 4:return[2]}}))}))},t.prototype.refreshCurrentUser=function(){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,s.default.init(this.user.region).loginWithToken(this.user.authentication_token)];case 1:return e=n.sent(),t._merge(this.user,e),this.sendDataEvent("current user updated",this.user),[2,this.user]}}))}))},t.prototype.logout=function(e){return void 0===e&&(e=!1),r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return n=new Set(this.eventHandlers.values()),t.sendDataEventInternal(n,p.GlobalEvents.SDK_DISPOSING),this.eventHandlers.clear(),[4,this.persistentConnection.dispose()];case 1:return r.sent(),t.sendDataEventInternal(n,p.GlobalEvents.SDK_DISPOSED),e?[3,3]:[4,s.default.init(this.user.region).logout(this.user.authentication_token)];case 2:return[2,r.sent()];case 3:return[2]}}))}))},t.prototype.switchAccounts=function(){return r(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return n=(e=t).fromUser,[4,s.default.init(this.user.region).switchAccounts(this.user.authentication_token)];case 1:return[2,n.apply(e,[r.sent()])]}}))}))},t.prototype.impersonate=function(e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return[4,s.default.init(this.user.region).impersonate(this.user.authentication_token,e)];case 1:return(n=r.sent()).original_user=this.user,[2,t.fromUser(n)]}}))}))},t.prototype.impersonateByTeam=function(e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return[4,s.default.init(this.user.region).impersonateByTeam(this.user.authentication_token,e)];case 1:return(n=r.sent()).original_user=this.user,[2,t.fromUser(n)]}}))}))},t.prototype.unwindImpersonation=function(){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,s.default.init(this.user.region).unwind(this.user.authentication_token)];case 1:return e=n.sent(),[2,t.fromUser(e)]}}))}))},t.initWithAuthToken=function(e,n,i){return void 0===i&&(i=!0),r(this,void 0,void 0,(function(){var r;return o(this,(function(o){switch(o.label){case 0:return[4,s.default.init(e).loginWithToken(n)];case 1:return r=o.sent(),[2,t.fromUser(r,i)]}}))}))},Object.defineProperty(t.prototype,"persistentConnection",{get:function(){return this._persistentConnection},enumerable:!1,configurable:!0}),t.checked=function(t,e,n){try{t(e,n)}catch(t){}},t}();e.default=v},function(t,e,n){t.exports=n(147)},function(t,e,n){"use strict";var r=n(23),o=n(107),i=n(148),s=n(114);function u(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var a=u(n(110));a.Axios=i,a.create=function(t){return u(s(a.defaults,t))},a.Cancel=n(115),a.CancelToken=n(161),a.isCancel=n(109),a.all=function(t){return Promise.all(t)},a.spread=n(162),a.isAxiosError=n(163),t.exports=a,t.exports.default=a},function(t,e,n){"use strict";var r=n(23),o=n(108),i=n(149),s=n(150),u=n(114);function a(t){this.defaults=t,this.interceptors={request:new i,response:new i}}a.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=u(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},a.prototype.getUri=function(t){return t=u(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){a.prototype[t]=function(e,n){return this.request(u(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){a.prototype[t]=function(e,n,r){return this.request(u(r||{},{method:t,url:e,data:n}))}})),t.exports=a},function(t,e,n){"use strict";var r=n(23);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},function(t,e,n){"use strict";var r=n(23),o=n(151),i=n(109),s=n(110);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(23);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e,n){"use strict";var r=n(23);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(113);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(23);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,s){var u=[];u.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),!0===s&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(157),o=n(158);t.exports=function(t,e){return t&&!r(e)?o(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(23),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,s={};return t?(r.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(s[e]&&o.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},function(t,e,n){"use strict";var r=n(23);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(115);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendableError=void 0;var r=n(165);Object.defineProperty(e,"ExtendableError",{enumerable:!0,get:function(){return r.ExtendableError}})},function(t,e,n){"use strict";var r=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=new(Error.bind.apply(Error,o([void 0],r(t))));return Object.setPrototypeOf(n,Object.getPrototypeOf(this)),n}Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendableError=void 0,e.ExtendableError=i,i.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(i,Error)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(11),o=function(){function t(t){t&&Object.assign(this,t)}return t.prototype.has_access=function(t,e){return this.hasAccess(t,e)},t.prototype.hasAccess=function(t,e){var n=this.authorization_flags&&this.authorization_flags[t];return r.isNil(n)?!e:e?n[e]:n.value},t}();e.default=o},function(t,e,n){(function(e){var r,o,i,s;r=n(171),o=n(117).utf8,i=n(117).bin,(s=function(t,n){var s=r.wordsToBytes(function(t){t.constructor==String?t=o.stringToBytes(t):void 0!==e&&"function"==typeof e.isBuffer&&e.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());var n=r.bytesToWords(t),i=8*t.length,s=[],u=1732584193,a=-271733879,c=-1732584194,l=271733878,f=-1009589776;n[i>>5]|=128<<24-i%32,n[15+(i+64>>>9<<4)]=i;for(var p=0;p<n.length;p+=16){for(var h=u,d=a,y=c,v=l,_=f,b=0;b<80;b++){if(b<16)s[b]=n[p+b];else{var g=s[b-3]^s[b-8]^s[b-14]^s[b-16];s[b]=g<<1|g>>>31}var E=(u<<5|u>>>27)+f+(s[b]>>>0)+(b<20?1518500249+(a&c|~a&l):b<40?1859775393+(a^c^l):b<60?(a&c|a&l|c&l)-1894007588:(a^c^l)-899497514);f=l,l=c,c=a<<30|a>>>2,a=u,u=E}u+=h,a+=d,c+=y,l+=v,f+=_}return[u,a,c,l,f]}(t));return n&&n.asBytes?s:n&&n.asString?i.bytesToString(s):r.bytesToHex(s)})._blocksize=16,s._digestsize=20,t.exports=s}).call(this,n(116).Buffer)},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),s=r[0],u=r[1],a=new i(function(t,e,n){return 3*(e+n)/4-n}(0,s,u)),l=0,f=u>0?s-4:s;for(n=0;n<f;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],a[l++]=e>>16&255,a[l++]=e>>8&255,a[l++]=255&e;2===u&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,a[l++]=255&e);1===u&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,a[l++]=e>>8&255,a[l++]=255&e);return a},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=0,u=n-o;s<u;s+=16383)i.push(l(t,s,s+16383>u?u:s+16383));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,a=s.length;u<a;++u)r[u]=s[u],o[s.charCodeAt(u)]=u;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var o,i,s=[],u=e;u<n;u+=3)o=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,o){var i,s,u=8*o-r-1,a=(1<<u)-1,c=a>>1,l=-7,f=n?o-1:0,p=n?-1:1,h=t[e+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=u;l>0;i=256*i+t[e+f],f+=p,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===a)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),i-=c}return(h?-1:1)*s*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var s,u,a,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+f>=1?p/a:p*Math.pow(2,1-f))*a>=2&&(s++,a/=2),s+f>=l?(u=0,s=l):s+f>=1?(u=(e*a-1)*Math.pow(2,o),s+=f):(u=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[n+h]=255&u,h+=d,u/=256,o-=8);for(s=s<<o|u,c+=o;c>0;t[n+h]=255&s,h+=d,s/=256,c-=8);t[n+h-d]|=128*y}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&r.rotl(t,8)|4278255360&r.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=r.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n<t.length;n++,r+=8)e[r>>>5]|=t[n]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},bytesToHex:function(t){for(var e=[],n=0;n<t.length;n++)e.push((t[n]>>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(parseInt(t.substr(n,2),16));return e},bytesToBase64:function(t){for(var e=[],r=0;r<t.length;r+=3)for(var o=t[r]<<16|t[r+1]<<8|t[r+2],i=0;i<4;i++)8*r+6*i<=8*t.length?e.push(n.charAt(o>>>6*(3-i)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],r=0,o=0;r<t.length;o=++r%4)0!=o&&e.push((n.indexOf(t.charAt(r-1))&Math.pow(2,-2*o+8)-1)<<2*o|n.indexOf(t.charAt(r))>>>6-2*o);return e}},t.exports=r},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.BringgAlive=e.UserWireMessage=e.REALTIME_CONNECTION_RETRY_TIME=void 0;var i=n(39),s=n(173),u=n(192),a=n(63);e.REALTIME_CONNECTION_RETRY_TIME=5e3;var c=function(t){this.id=t.id,this.auth_token=t.authentication_token,this.bringg_user_id=t.uuid};e.UserWireMessage=c;var l=function(){function t(){this.lastUpdate=-1,this.pending=new Map}return t.prototype.add=function(t){var e=Date.now();this.lastUpdate=e,this.pending.set(t,e)},t.prototype.resolve=function(t){try{var e=Date.now();i.default.debug("BringgAlive received ["+t+"] ..."),this.lastUpdate=e,this.pending.has(t)?i.default.debug("BringgAlive took ["+(e-this.pending.get(t))+"] ms. ["+(this.pending.size-1)+"] pending ..."):i.default.warn("BringgAlive id ["+t+"] does not exist")}finally{this.pending.delete(t)}},t}();e.BringgAlive=l;var f=function(){function t(t){this.bringgAlive=null,this.session=t}return t.wrapEventHandler=function(t,e,n){return function(r){n&&n(t,r),e(r)}},t.init=function(e){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return n=new t(e),r=n,[4,s.RealtimeConnection.connect(e.config.getMonitoringEndpoint(),n)];case 1:return r.connection=o.sent(),n.initBringgAlive(),[2,n]}}))}))},t.prototype.handshake=function(t){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,r){e.publishInternal(t,a.USER_CONNECT_EVENT,new c(e.session.user),(function(){e.publishInternal(t,a.SUBSCRIBE_AS_ADMIN_EVENT,new c(e.session.user),(function(){e.session.sendDataEvent("subscribed as admin",null),n()}))}))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.onConnect=function(t){return r(this,void 0,void 0,(function(){var n=this;return o(this,(function(r){switch(r.label){case 0:return[4,(new u.default).handle((function(t){return i.default.error("Failed establishing persistent connection to realtime, retry again in "+e.REALTIME_CONNECTION_RETRY_TIME/1e3+" seconds, "+t),"timeout"!==t.message})).waitAndRetry([e.REALTIME_CONNECTION_RETRY_TIME]).forever().executeForPromise((function(){return n.handshake(t)}))];case 1:return[2,r.sent()]}}))}))},t.prototype.onDisconnect=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2]}))}))},t.prototype.onReconnect=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2]}))}))},t.prototype.publishInternal=function(t,e,n,r){t.socket.emit(e.name,n,r)},t.prototype.subscribeInternal=function(e,n,r){e.socket.on(n.name,t.wrapEventHandler(n.name,r,this.session.sendDataEvent))},t.prototype.unsubscribe=function(t){this.connection.socket.off(t.name)},t.prototype.publish=function(t,e,n){this.publishInternal(this.connection,t,e,n)},t.prototype.subscribe=function(t,e){this.subscribeInternal(this.connection,t,e)},t.prototype.dispose=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return this.clearIntervalInternal(),this.unsubscribe(a.BRINGG_ALIVE_EVENT),[4,this.connection.disconnect()];case 1:return t.sent(),[2]}}))}))},t.prototype.setIntervalInternal=function(t){this.timeout=setInterval(t,e.REALTIME_CONNECTION_RETRY_TIME)},t.prototype.clearIntervalInternal=function(){this.timeout&&clearInterval(this.timeout)},t.prototype.initBringgAlive=function(){var t=this;this.bringgAlive=new l,this.setIntervalInternal((function(){var e=""+Math.floor(1e3*Math.random());t.bringgAlive.add(e),i.default.debug("Sending BringgAlive "+e),t.publish(a.BRINGG_ALIVE_EVENT,{keepalive_id:e},(function(){i.default.debug("BringgAlive callback is OK")}))})),this.subscribe(a.BRINGG_ALIVE_EVENT,(function(e){t.bringgAlive.resolve(e.keepalive_id)}))},t}();e.default=f},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.RealtimeConnection=void 0;var i=n(39),s=n(174),u=function(){function t(t,e){this.endpoint=t,this.notifiable=e}return t.connect=function(e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){return[2,new t(e,n).initInternal()]}))}))},t.prototype.disconnect=function(){return r(this,void 0,void 0,(function(){var t=this;return o(this,(function(e){return[2,new Promise((function(e,n){t._socket.on("disconnect",(function(){t._socket.off("disconnect"),t._socket.close(),e()})),t._socket.disconnect();var r=setTimeout((function(){clearTimeout(r),t._socket.close(),e()}),5e3)}))]}))}))},t.prototype.initInternal=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.initSocket()];case 1:return[2,t.sent()]}}))}))},t.prototype.handleOnConnectAsync=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e,n){t.handleOnConnect(e)}))];case 1:return e.sent(),[2]}}))}))},t.prototype.handleOnConnect=function(t){var e=this;void 0===t&&(t=null),this._socket.on("connect",(function(){return r(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return i.default.debug("connected to server"),this.notifiable?[4,this.notifiable.onConnect(this)]:[3,2];case 1:e.sent(),e.label=2;case 2:return t&&t(),[2]}}))}))}))},t.prototype.handleOnReconnect=function(){var t=this;this._socket.on("reconnect",(function(){return r(t,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return i.default.debug("reconnected to server"),this.notifiable?[4,this.notifiable.onReconnect(this)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))}))},t.prototype.handleOnDisconnect=function(){var t=this;this._socket.on("disconnect",(function(){return r(t,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return i.default.debug("disconnected from server"),this.notifiable?[4,this.notifiable.onDisconnect(this)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))}))},t.prototype.initSocket=function(){return r(this,void 0,void 0,(function(){var t;return o(this,(function(e){return t={forceNew:!1,multiplex:!1,reconnection:!0,autoConnect:!0,transports:["websocket"],transportOptions:{websocket:{port:this.endpoint.port,secure:"https:"===this.endpoint.protocol||"wss:"===this.endpoint.protocol}}},this._socket=s.io(this.endpoint.encode(),t),this.handleOnConnect(),this.handleOnReconnect(),this.handleOnDisconnect(),[2,this]}))}))},Object.defineProperty(t.prototype,"socket",{get:function(){return this._socket},enumerable:!1,configurable:!0}),t}();e.RealtimeConnection=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.io=e.Socket=e.Manager=e.protocol=void 0;const r=n(175),o=n(119),i=n(32)("socket.io-client");t.exports=e=u;const s=e.managers={};function u(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const n=r.url(t,e.path||"/socket.io"),u=n.source,a=n.id,c=n.path,l=s[a]&&c in s[a].nsps;let f;return e.forceNew||e["force new connection"]||!1===e.multiplex||l?(i("ignoring socket cache for %s",u),f=new o.Manager(u,e)):(s[a]||(i("new io instance for %s",u),s[a]=new o.Manager(u,e)),f=s[a]),n.query&&!e.query&&(e.query=n.queryKey),f.socket(n.path,e)}e.io=u;var a=n(95);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return a.protocol}}),e.connect=u;var c=n(119);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return c.Manager}});var l=n(126);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return l.Socket}}),e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.url=void 0;const r=n(118),o=n(32)("socket.io-client:url");e.url=function(t,e="",n){let i=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(o("protocol-less url %s",t),t=void 0!==n?n.protocol+"//"+t:"https://"+t),o("parse %s",t),i=r(t)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const s=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+s+":"+i.port+e,i.href=i.protocol+"://"+s+(n&&n.port===i.port?"":":"+i.port),i}},function(t,e,n){t.exports=function(t){function e(t){let n,o=null;function i(...t){if(!i.enabled)return;const r=i,o=Number(new Date),s=o-(n||o);r.diff=s,r.prev=n,r.curr=o,n=o,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let u=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(n,o)=>{if("%%"===n)return"%";u++;const i=e.formatters[o];if("function"==typeof i){const e=t[u];n=i.call(r,e),t.splice(u,1),u--}return n}),e.formatArgs.call(r,t);(r.log||e.log).apply(r,t)}return i.namespace=t,i.useColors=e.useColors(),i.color=e.selectColor(t),i.extend=r,i.destroy=e.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null===o?e.enabled(t):o,set:t=>{o=t}}),"function"==typeof e.init&&e.init(i),i}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function o(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(o),...e.skips.map(o).map(t=>"-"+t)].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(177),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(n=>{e[n]=t[n]}),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},function(t,e){var n=1e3,r=6e4,o=60*r,i=24*o;function s(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}t.exports=function(t,e){e=e||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=i)return s(t,e,i,"day");if(e>=o)return s(t,e,o,"hour");if(e>=r)return s(t,e,r,"minute");if(e>=n)return s(t,e,n,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=i)return Math.round(t/i)+"d";if(e>=o)return Math.round(t/o)+"h";if(e>=r)return Math.round(t/r)+"m";if(e>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){const r=n(179);t.exports=(t,e)=>new r(t,e),t.exports.Socket=r,t.exports.protocol=r.protocol,t.exports.Transport=n(92),t.exports.transports=n(120),t.exports.parser=n(62)},function(t,e,n){const r=n(120),o=n(93),i=n(32)("engine.io-client:socket"),s=n(62),u=n(118),a=n(94);class c extends o{constructor(t,e={}){super(),t&&"object"==typeof t&&(e=t,t=null),t?(t=u(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=u(e.host).host),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.transports=e.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,jsonp:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},e),this.opts.path=this.opts.path.replace(/\/$/,"")+"/","string"==typeof this.opts.query&&(this.opts.query=a.decode(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&addEventListener("beforeunload",()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},!1),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close")},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){i('creating transport "%s"',t);const e=function(t){const e={};for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(this.opts.query);e.EIO=s.protocol,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return i("options: %j",n),new r[t](n)}open(){let t;if(this.opts.rememberUpgrade&&c.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void setTimeout(()=>{this.emit("error","No transports available")},0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return i("error while creating transport: %s",t),this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){i("setting transport %s",t.name),this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",()=>{this.onClose("transport close")})}probe(t){i('probing transport "%s"',t);let e=this.createTransport(t,{probe:1}),n=!1;c.priorWebsocketSuccess=!1;const r=()=>{n||(i('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",r=>{if(!n)if("pong"===r.type&&"probe"===r.data){if(i('probe transport "%s" pong',t),this.upgrading=!0,this.emit("upgrading",e),!e)return;c.priorWebsocketSuccess="websocket"===e.name,i('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{n||"closed"!==this.readyState&&(i("changing transport and sending upgrade packet"),f(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emit("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{i('probe transport "%s" failed',t);const n=new Error("probe error");n.transport=e.name,this.emit("upgradeError",n)}}))};function o(){n||(n=!0,f(),e.close(),e=null)}const s=n=>{const r=new Error("probe error: "+n);r.transport=e.name,o(),i('probe transport "%s" failed because of error: %s',t,n),this.emit("upgradeError",r)};function u(){s("transport closed")}function a(){s("socket closed")}function l(t){e&&t.name!==e.name&&(i('"%s" works - aborting "%s"',t.name,e.name),o())}const f=()=>{e.removeListener("open",r),e.removeListener("error",s),e.removeListener("close",u),this.removeListener("close",a),this.removeListener("upgrading",l)};e.once("open",r),e.once("error",s),e.once("close",u),this.once("close",a),this.once("upgrading",l),e.open()}onOpen(){if(i("socket open"),this.readyState="open",c.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause){i("starting upgrade probes");let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(i('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emit("ping"),this.emit("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else i('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){clearTimeout(this.pingTimeoutTimer),this.pingTimeoutTimer=setTimeout(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()}flush(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(i("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const o={type:t,data:e,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),i("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.removeListener("upgrade",e),this.removeListener("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}onError(t){i("socket error %j",t),c.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(i('socket close with reason: "%s"',t),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emit("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n<r;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}c.priorWebsocketSuccess=!1,c.protocol=s.protocol,t.exports=c},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},function(t,e,n){const r=n(121),o=n(122),i=n(93),{pick:s}=n(125),u=n(69),a=n(32)("engine.io-client:polling-xhr");function c(){}const l=null!=new r({xdomain:!1}).responseType;class f extends i{constructor(t,e){super(),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.create()}create(){const t=s(this.opts,"agent","enablesXDR","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new r(t);try{a("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&e.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),this.hasXDR()?(e.onload=()=>{this.onLoad()},e.onerror=()=>{this.onError(e.responseText)}):e.onreadystatechange=()=>{4===e.readyState&&(200===e.status||1223===e.status?this.onLoad():setTimeout(()=>{this.onError("number"==typeof e.status?e.status:0)},0))},a("xhr data %s",this.data),e.send(this.data)}catch(t){return void setTimeout(()=>{this.onError(t)},0)}"undefined"!=typeof document&&(this.index=f.requestsCount++,f.requests[this.index]=this)}onSuccess(){this.emit("success"),this.cleanup()}onData(t){this.emit("data",t),this.onSuccess()}onError(t){this.emit("error",t),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete f.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&this.onData(t)}hasXDR(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR}abort(){this.cleanup()}}if(f.requestsCount=0,f.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",p);else if("function"==typeof addEventListener){addEventListener("onpagehide"in u?"pagehide":"unload",p,!1)}function p(){for(let t in f.requests)f.requests.hasOwnProperty(t)&&f.requests[t].abort()}t.exports=class extends o{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?443:80),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}const e=t&&t.forceBase64;this.supportsBinary=l&&!e}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new f(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",t=>{this.onError("xhr post error",t)})}doPoll(){a("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",t=>{this.onError("xhr poll error",t)}),this.pollXhr=t}},t.exports.Request=f},function(t,e,n){const{PACKET_TYPES:r}=n(123),o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),i="function"==typeof ArrayBuffer,s=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+t)},n.readAsDataURL(t)};t.exports=({type:t,data:e},n,u)=>{return o&&e instanceof Blob?n?u(e):s(e,u):i&&(e instanceof ArrayBuffer||(a=e,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(a):a&&a.buffer instanceof ArrayBuffer))?n?u(e instanceof ArrayBuffer?e:e.buffer):s(new Blob([e]),u):u(r[t]+(e||""));var a}},function(t,e,n){const{PACKET_TYPES_REVERSE:r,ERROR_PACKET:o}=n(123);let i;"function"==typeof ArrayBuffer&&(i=n(184));const s=(t,e)=>{if(i){const n=i.decode(t);return u(n,e)}return{base64:!0,data:t}},u=(t,e)=>{switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}};t.exports=(t,e)=>{if("string"!=typeof t)return{type:"message",data:u(t,e)};const n=t.charAt(0);if("b"===n)return{type:"message",data:s(t.substring(1),e)};return r[n]?t.length>1?{type:r[n],data:t.substring(1)}:{type:r[n]}:o}},function(t,e){!function(t){"use strict";e.encode=function(e){var n,r=new Uint8Array(e),o=r.length,i="";for(n=0;n<o;n+=3)i+=t[r[n]>>2],i+=t[(3&r[n])<<4|r[n+1]>>4],i+=t[(15&r[n+1])<<2|r[n+2]>>6],i+=t[63&r[n+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(e){var n,r,o,i,s,u=.75*e.length,a=e.length,c=0;"="===e[e.length-1]&&(u--,"="===e[e.length-2]&&u--);var l=new ArrayBuffer(u),f=new Uint8Array(l);for(n=0;n<a;n+=4)r=t.indexOf(e[n]),o=t.indexOf(e[n+1]),i=t.indexOf(e[n+2]),s=t.indexOf(e[n+3]),f[c++]=r<<2|o>>4,f[c++]=(15&o)<<4|i>>2,f[c++]=(3&i)<<6|63&s;return l}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(t,e,n){const r=n(122),o=n(69),i=/\n/g,s=/\\n/g;let u;t.exports=class extends r{constructor(t){super(t),this.query=this.query||{},u||(u=o.___eio=o.___eio||[]),this.index=u.length,u.push(this.onData.bind(this)),this.query.j=this.index}get supportsBinary(){return!1}doClose(){this.script&&(this.script.onerror=()=>{},this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),super.doClose()}doPoll(){const t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=t=>{this.onError("jsonp poll error",t)};const e=document.getElementsByTagName("script")[0];e?e.parentNode.insertBefore(t,e):(document.head||document.body).appendChild(t),this.script=t;"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){const t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)}),100)}doWrite(t,e){let n;if(!this.form){const t=document.createElement("form"),e=document.createElement("textarea"),n=this.iframeId="eio_iframe_"+this.index;t.className="socketio",t.style.position="absolute",t.style.top="-1000px",t.style.left="-1000px",t.target=n,t.method="POST",t.setAttribute("accept-charset","utf-8"),e.name="d",t.appendChild(e),document.body.appendChild(t),this.form=t,this.area=e}function r(){o(),e()}this.form.action=this.uri();const o=()=>{if(this.iframe)try{this.form.removeChild(this.iframe)}catch(t){this.onError("jsonp polling iframe removal error",t)}try{const t='<iframe src="javascript:0" name="'+this.iframeId+'">';n=document.createElement(t)}catch(t){n=document.createElement("iframe"),n.name=this.iframeId,n.src="javascript:0"}n.id=this.iframeId,this.form.appendChild(n),this.iframe=n};o(),t=t.replace(s,"\\\n"),this.area.value=t.replace(i,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=()=>{"complete"===this.iframe.readyState&&r()}:this.iframe.onload=r}}},function(t,e,n){(function(e){const r=n(92),o=n(62),i=n(94),s=n(124),{pick:u}=n(125),{WebSocket:a,usingBrowserWebSocket:c,defaultBinaryType:l,nextTick:f}=n(187),p=n(32)("engine.io-client:websocket"),h="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class d extends r{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,n=h?{}:u(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=c&&!h?e?new a(t,e):new a(t):new a(t,e,n)}catch(t){return this.emit("error",t)}this.ws.binaryType=this.socket.binaryType||l,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=this.onClose.bind(this),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;o.encodePacket(r,this.supportsBinary,t=>{const n={};if(!c&&(r.options&&(n.compress=r.options.compress),this.opts.perMessageDeflate)){("string"==typeof t?e.byteLength(t):t.length)<this.opts.perMessageDeflate.threshold&&(n.compress=!1)}try{c?this.ws.send(t):this.ws.send(t,n)}catch(t){p("websocket closed before onclose event")}i&&f(()=>{this.writable=!0,this.emit("drain")})})}}onClose(){r.prototype.onClose.call(this)}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let n="";this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=s()),this.supportsBinary||(t.b64=1),t=i.encode(t),t.length&&(t="?"+t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+t}check(){return!(!a||"__initialize"in a&&this.name===d.prototype.name)}}t.exports=d}).call(this,n(116).Buffer)},function(t,e,n){const r=n(69),o="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):t=>setTimeout(t,0);t.exports={WebSocket:r.WebSocket||r.MozWebSocket,usingBrowserWebSocket:!0,defaultBinaryType:"arraybuffer",nextTick:o}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=n(127);e.deconstructPacket=function(t){const e=[],n=t.data,o=t;return o.data=function t(e,n){if(!e)return e;if(r.isBinary(e)){const t={_placeholder:!0,num:n.length};return n.push(e),t}if(Array.isArray(e)){const r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=t(e[o],n);return r}if("object"==typeof e&&!(e instanceof Date)){const r={};for(const o in e)e.hasOwnProperty(o)&&(r[o]=t(e[o],n));return r}return e}(n,e),o.attachments=e.length,{packet:o,buffers:e}},e.reconstructPacket=function(t,e){return t.data=function t(e,n){if(!e)return e;if(e&&e._placeholder)return n[e.num];if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=t(e[r],n);else if("object"==typeof e)for(const r in e)e.hasOwnProperty(r)&&(e[r]=t(e[r],n));return e}(t.data,e),t.attachments=void 0,t}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Retryable=e.AsyncRetryable=void 0;var i=function(t){this.count=t},s=function(){function t(t){this.config=t}return t.prototype.forever=function(){return this.config.isForever=!0,this},t.prototype.executeForPromise=function(t){var e=this,n=0;return new Promise((function(r,o){var s;s=function(){t(new i(n)).then((function(t){r(t)})).catch((function(t){if(e.config.handleFn(t)){if(n<e.config.numRetries)n++;else{if(!e.config.isForever)return void o(t);n=0}setTimeout(s,e.config.delays?e.config.delays[n]:100)}else o(t)}))},setTimeout(s,5)})).then((function(t){return t})).catch((function(t){return t}))},t}();e.AsyncRetryable=s;var u=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.forever=function(){return polly.isForever=!0,this},e.prototype.execute=function(t){for(var e=0;;)try{return t(new i(e))}catch(t){if(!this.config.handleFn(t))throw t;if(e<this.config.numRetries)e++;else{if(!this.config.isForever)throw t;e=0}}},e}(s);e.Retryable=u;var a=function(){function t(){}return t.prototype.handle=function(t){return this.handleFn=t,this},t.prototype.retry=function(t){return this.numRetries=t,new u(this)},t.prototype.forever=function(){return this.isForever=!0,this},t.prototype.waitAndRetry=function(e){return"number"==typeof e?(this.numRetries=e,this.delays=t.getDelays(e)):(this.delays=e,this.numRetries=e.length),new s(this)},t.getDelays=function(t){for(var e=[],n=100,r=0;r<t;r++)e.push(n),n*=2;return e},t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalEvents=void 0,function(t){t.SDK_INITIALISED="sdkInitialized",t.SDK_DISPOSING="sdkDisposing",t.SDK_DISPOSED="sdkDisposed"}(e.GlobalEvents||(e.GlobalEvents={}))},function(t,e,n){"use strict";var r=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===o}(t)}(t)};var o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?l((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function s(t,e,n){return t.concat(e).map((function(t){return i(t,n)}))}function u(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function a(t,e){try{return e in t}catch(t){return!1}}function c(t,e,n){var r={};return n.isMergeableObject(t)&&u(t).forEach((function(e){r[e]=i(t[e],n)})),u(e).forEach((function(o){(function(t,e){return a(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,o)||(a(t,o)&&n.isMergeableObject(e[o])?r[o]=function(t,e){if(!e.customMerge)return l;var n=e.customMerge(t);return"function"==typeof n?n:l}(o,n)(t[o],e[o],n):r[o]=i(e[o],n))})),r}function l(t,e,n){(n=n||{}).arrayMerge=n.arrayMerge||s,n.isMergeableObject=n.isMergeableObject||r,n.cloneUnlessOtherwiseSpecified=i;var o=Array.isArray(e);return o===Array.isArray(t)?o?n.arrayMerge(t,e,n):c(t,e,n):i(e,n)}l.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return l(t,n,e)}),{})};var f=l;t.exports=f},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(196),u=n(11),a=n(72),c=function(){function t(t){this.merchantEntity=new s.default(t)}return t.prototype.get=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.merchantEntity.get()]}))}))},t.prototype.getAll=function(){return this.merchantEntity.getAll()},t.prototype.update=function(t){return this.merchantEntity.updateMerchantRequest(t)},t.prototype.clean=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return t=u.defaults(t,{withDrivers:!1}),[2,this.merchantEntity.clean(t)]}))}))},t.prototype.createMerchantByAccountManager=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.merchantEntity.createMerchantByAccountManager(t)]}))}))},t.prototype.proFeaturesEnabled=function(){var t=u.get(this.merchantEntity,"service.session.merchant");return!!u.get(t,"custom_payments")||!u.get(t,"pro")},t.prototype.featureFlags=function(){return u.get(this.merchantEntity,"service.session.merchant.feature_flags")},t.prototype.validateCopyMerchantSettings=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.merchantEntity.validateMerchantSettingsForCopy(t.origin_merchant_id,t.destination_merchant_id)]}))}))},t.prototype.copyMerchantSettings=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.merchantEntity.copyMerchantSettings(t.origin_merchant_id,t.destination_merchant_id,e)]}))}))},r([a.default],t.prototype,"get",null),t}();e.default=c},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=n(11),c=n(210),l={GET_MERCHANT:"/merchant",UPDATE_MERCHANT:"/merchant",CLEAN_MERCHANT:"/merchant/clean",FETCH_ALL:"/merchants/",CREATE_BY_ACCOUNT_MANAGER:"//merchant/create_by_account_manager/",COPY_MERCHANT_SETTINGS_VALIDATE:"//merchant/copy_merchant_settings_validate/",COPY_MERCHANT_SETTINGS:"//merchant/copy_merchant_settings/"},f=function(t){function e(e){var n=t.call(this,{session:e,entityName:"merchant",routes:[]})||this;return n.subscribe(),n}return o(e,t),e.prototype.updateMerchant=function(t){this.service.session.update("merchant",t)},e.prototype.subscribe=function(){var t=this;this.realTime.on("merchant update",(function(e){t.updateMerchant(e.merchant)})),this.realTime.on("merchant subscription updated",(function(e){t.updateMerchant(e.data)}))},e.prototype.get=function(){return i(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return this.service.session.merchant?[2,this.service.session.merchant]:[4,this.service.routeGenerator.get(l.GET_MERCHANT).setException("Could not read merchant").invoke()];case 1:return t=e.sent(),this.service.session.merchant?this.updateMerchant(t):this.service.session.merchant=t,[2,t]}}))}))},e.prototype.updateMerchantRequest=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.put(l.UPDATE_MERCHANT).setException("Could not update merchant").withExtractor(c.merchantExtractor).withPayload(t).invoke()];case 1:return e=n.sent(),this.updateMerchant(e),[2,e]}}))}))},e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.get(l.FETCH_ALL).withExtractor((function(t){return t.merchants})).setException("Could not read all merchants").invoke()];case 1:return[2,t.sent()]}}))}))},e.prototype.clean=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){return e=t.withDrivers,[2,this.service.routeGenerator.post(l.CLEAN_MERCHANT).withExtractor(a.stubTrue).setException(e?"Could not clean merchant and drivers":"Could not clean merchant").withPayload({withDrivers:e}).invoke()]}))}))},e.prototype.createMerchantByAccountManager=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post(l.CREATE_BY_ACCOUNT_MANAGER).withExtractor((function(t){return t.merchant_guid})).setException("Could not create merchant by account manager").withPayload(t).invoke()]}))}))},e.prototype.validateMerchantSettingsForCopy=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.post(l.COPY_MERCHANT_SETTINGS_VALIDATE).withExtractor((function(t){return t.data})).setException("Failed to validate merchant settings").withPayload({origin_merchant_id:t,destination_merchant_id:e}).invoke()]}))}))},e.prototype.copyMerchantSettings=function(t,e,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,this.service.routeGenerator.post(l.COPY_MERCHANT_SETTINGS).withExtractor(a.stubTrue).setException("Could not copy merchant settings").withPayload({fields:n,copy_data:{origin_merchant_id:t,destination_merchant_id:e}}).invoke()]}))}))},e}(u.default);e.default=f},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e,n,r,o){var u=t.call(this,e,n)||this;u.get=function(t,e){return i(u,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.routeGenerator.get(this.Routes.GET).withRouteParams({id:t}).withQueryString(e).setException("Failed to get "+this.entityName).invoke()];case 1:return[2,n.sent()]}}))}))},u.getAll=function(t){return i(u,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.routeGenerator.get(this.Routes.GET_ALL).withQueryString(t).setException("Failed to get all "+this.entityName).invoke()];case 1:return[2,e.sent()]}}))}))},u.create=function(t){return i(u,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.routeGenerator.post(this.Routes.CREATE).withPayload(t).setException("Failed to create "+this.entityName).invoke()];case 1:return[2,e.sent()]}}))}))},u.update=function(t,e){return i(u,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.routeGenerator.put(this.Routes.UPDATE).withRouteParams({id:t}).withPayload(e).setException("Failed to update "+this.entityName).invoke()];case 1:return[2,n.sent()]}}))}))},u.delete=function(t,e){return i(u,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.routeGenerator.delete(this.Routes.DELETE).withRouteParams({id:t}).withQueryString(e).setException("Failed to delete "+this.entityName).invoke()];case 1:return[2,n.sent()]}}))}))},u.patch=function(t,e){return i(u,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.routeGenerator.patch(t?this.Routes.PATCH_WITH_ID:this.Routes.PATCH).withRouteParams({id:t}).withPayload(e).setException("Failed to patch "+this.entityName).invoke()];case 1:return[2,n.sent()]}}))}))};var a=r?"/"+r+"/"+n:"/"+n;return o&&(a=a+"/"+o),u.Routes={GET:a+"/{:id}",GET_ALL:a,CREATE:a,UPDATE:a+"/{:id}",DELETE:a+"/{:id}",PATCH:a,PATCH_WITH_ID:a+"/{:id}"},u}return o(e,t),e}(n(96).default);e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(199),s=n(97),u=n(99),a=n(208),c=n(209),l=n(100),f=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return o(e,t),e}(s.Subscriber);e.SubjectSubscriber=f;var p=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return o(e,t),e.prototype[l.rxSubscriber]=function(){return new f(this)},e.prototype.lift=function(t){var e=new h(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new a.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new a.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new a.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new a.ObjectUnsubscribedError;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new a.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),u.Subscription.EMPTY):this.isStopped?(t.complete(),u.Subscription.EMPTY):(this.observers.push(t),new c.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new i.Observable;return t.source=this,t},e.create=function(t,e){return new h(t,e)},e}(i.Observable);e.Subject=p;var h=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return o(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):u.Subscription.EMPTY},e}(p);e.AnonymousSubject=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(200),o=n(204),i=n(205),s=n(206),u=n(98),a=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,i=o.toSubscriber(t,e,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||u.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),u.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){u.config.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),r.canReportError(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=c(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[i.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:s.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=c(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function c(t){if(t||(t=u.config.Promise||Promise),!t)throw new Error("no Promise impl found");return t}e.Observable=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(97);e.canReportError=function(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&o instanceof r.Subscriber?o:null}return!0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isObject=function(t){return null!==t&&"object"==typeof t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}();e.UnsubscriptionError=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(97),o=n(100),i=n(132);e.toSubscriber=function(t,e,n){if(t){if(t instanceof r.Subscriber)return t;if(t[o.rxSubscriber])return t[o.rxSubscriber]()}return t||e||n?new r.Subscriber(t,e,n):new r.Subscriber(i.empty)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(207);function o(t){return t?1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}:r.noop}e.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)},e.pipeFromArray=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.noop=function(){}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}();e.ObjectUnsubscribedError=r},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return o(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(99).Subscription);e.SubjectSubscription=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merchantExtractor=void 0;e.merchantExtractor=function(t){return t.merchant}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(212),o=function(){function t(t){this.rolloutsEntity=new r.default(t)}return t.prototype.getAll=function(){return this.rolloutsEntity.getAll()},t.prototype.createOrUpdateUserRollout=function(t){return this.rolloutsEntity.createOrUpdateUserRollout(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),s=n(213),u=function(t){function e(e){return t.call(this,{session:e,entityName:"rollouts",routes:[]})||this}return o(e,t),e.prototype.getAll=function(){return this.service.routeGenerator.get(s.Routes.getAll).withExtractor((function(t){return t.result})).invoke()},e.prototype.createOrUpdateUserRollout=function(t){return this.service.routeGenerator.post(s.Routes.createOrUpdateUserRollout).withPayload(t).withExtractor((function(t){return t.result})).invoke()},e}(i.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0,e.Routes={getAll:"/rollouts/",createOrUpdateUserRollout:"/rollouts/create_or_update_user_rollout/"}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(215),u=n(216),a=function(){function t(t){var e=this;this.unsubscribe=function(){e.runStore.store.unsubscribe()},this.onUpdate=function(t){return e.runStore.registerOnUpdate(t)},this.onDelete=function(t){return e.runStore.registerOnDelete(t)},this.onCreate=function(t){return e.runStore.registerOnCreate(t)},this.runsService=new s.RunsService(t),this.runStore=new u.default(t)}return t.prototype.attachSubscriptions=function(){this.runStore.attachSubscriptions()},t.prototype.loadAll=function(t){return o(this,void 0,void 0,(function(){var e,n,o,s=this;return i(this,(function(i){switch(i.label){case 0:return e=[],n=[],t.ids&&(t.ids.forEach((function(t){s.runStore.store.getItem(t)?e.push(t):n.push(t)})),e.length===t.ids.length)?[2,this.runStore.store.getItemsByIds(t.ids)]:[4,this.runsService.loadAll(r(r({page:1},t),{ids:n.length>0?n:void 0}))];case 1:return o=i.sent(),[2,this.runStore.setAll(o).concat(this.runStore.store.getItemsByIds(e))]}}))}))},t.prototype.load=function(t){return o(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(e=this.runStore.store.getItem(t))?[2,e]:[4,this.forceLoad(t)];case 1:return[2,n.sent()]}}))}))},t.prototype.forceLoad=function(t){return o(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.runsService.get(t)];case 1:return e=n.sent(),[2,this.runStore.set(e)]}}))}))},t.prototype.get=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.get(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getAll=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.getAll(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.update=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.runsService.update(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getHistory=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.getHistory(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getLocations=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.getLocations(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getCashout=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.getCashout(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.assignDriver=function(t,e,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.runsService.assignDriver(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.unassignDriver=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.runsService.unassignDriver(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.assignVehicle=function(t,e,n,r){return o(this,void 0,void 0,(function(){return i(this,(function(o){switch(o.label){case 0:return[4,this.runsService.assignVehicle(t,e,n,r)];case 1:return[2,o.sent()]}}))}))},t.prototype.unassignVehicle=function(t,e,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.runsService.unassignVehicle(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.assignVehicles=function(t,e,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.runsService.assignVehicles(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.unassignVehicles=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.unassignVehicles(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.bulkClose=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.bulkClose(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.markDonePlanning=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.markDonePlanning(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getActualBreaks=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.getActualBreaks(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.RunsService=e.Routes=void 0;var a=n(24),c=n(15),l=n(73),f=n(19);e.Routes={GET_RUNS:new f.Route("/runs",0),GET_RUN:new f.Route("/runs/{:id}",0),UPDATE_RUN:new f.Route("/runs/{:id}",3),GET_RUN_HISTORY:new f.Route("/runs/{:id}/history",0),GET_RUN_LOCATIONS:new f.Route("/runs/{:id}/locations",0),GET_RUN_CASHOUT:new f.Route("/runs/{:id}/cashout",0),ASSIGN_DRIVER:new f.Route("/runs/{:id}/assign",2),UNASSIGN_DRIVER:new f.Route("/runs/{:id}/unassign",2),ASSIGN_VEHICLE:new f.Route("/runs/{:id}/assign_vehicle",2),UNASSIGN_VEHICLE:new f.Route("/runs/{:id}/unassign_vehicle",2),BULK_CLOSE:new f.Route("/runs/bulk_close",1),MARK_DONE_PLANNING:new f.Route("/runs/mark_done_planning",1),GET_ACTUAL_BREAKS:new f.Route("/runs/actual_breaks",0),ASSIGN_VEHICLES:new f.Route("/runs/{:id}/vehicles_assignment",3),UNASSIGN_VEHICLES:new f.Route("/runs/{:id}/vehicles_assignment",4)};var p=function(t){function n(e){return t.call(this,e.config.getApiEndpoint(),e)||this}return o(n,t),n.prototype.getAll=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_RUNS,l.defaultExtractor,c.BringgException.serviceException("Failed to get Runs"),void 0,void 0,t)];case 1:return[2,n.sent()]}}))}))},n.prototype.loadAll=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(r){switch(r.label){case 0:return!t.ids||t.ids.length<=l.GetAllChunkSize?[2,this.loadPage(i({page:1},t))]:[3,1];case 1:return e=[],[4,this.loadPageChunked(i({page:1},t),n.splitToChunks(t.ids,l.GetAllChunkSize),e)];case 2:return r.sent(),[2,e]}}))}))},n.prototype.loadPageChunked=function(t,e,n,r){return void 0===r&&(r=0),s(this,void 0,void 0,(function(){var o;return u(this,(function(s){switch(s.label){case 0:return e[r]?[4,this.loadPage(i(i({},t),{ids:e[r]}))]:[2,n];case 1:return o=s.sent(),Array.prototype.push.apply(n,o),[2,this.loadPageChunked(t,e,n,r+1)]}}))}))},n.prototype.loadPage=function(t){return s(this,void 0,void 0,(function(){var e,n,r,o;return u(this,(function(s){switch(s.label){case 0:return[4,this.getAll(t)];case 1:if(!(e=s.sent()).success)throw new Error("Error fetching runs, error code: "+e.rc);return n=e.runs,e.next_page?(o=(r=n).concat,[4,this.loadPage(i(i({},t),{page:t.page+1}))]):[3,3];case 2:n=o.apply(r,[s.sent()]),s.label=3;case 3:return[2,n]}}))}))},n.prototype.get=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_RUN,l.runExtractor,c.BringgException.serviceException("Failed to get Run"),void 0,{id:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.update=function(t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.UPDATE_RUN,l.defaultExtractor,c.BringgException.serviceException("Failed to update Run"),n,{id:t})];case 1:return[2,r.sent()]}}))}))},n.prototype.getHistory=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_RUN_HISTORY,l.runsHistoryExtractor,c.BringgException.serviceException("Failed to get run history"),void 0,{id:t})];case 1:return[2,n.sent().run_histories]}}))}))},n.prototype.getLocations=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_RUN_LOCATIONS,l.runsLocationsExtractor,c.BringgException.serviceException("Failed to get run locations"),void 0,{id:t})];case 1:return[2,n.sent().run_locations]}}))}))},n.prototype.getCashout=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_RUN_CASHOUT,l.runCashoutExtractor,c.BringgException.serviceException("Failed to get run cashout"),void 0,{id:t})];case 1:return[2,n.sent().run_cashout]}}))}))},n.prototype.assignDriver=function(t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){switch(o.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.ASSIGN_DRIVER,l.defaultExtractor,c.BringgException.serviceException("Failed to assign driver to run"),{user_id:n,target_run:r},{id:t})];case 1:return[2,o.sent()]}}))}))},n.prototype.unassignDriver=function(t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.UNASSIGN_DRIVER,l.defaultExtractor,c.BringgException.serviceException("Failed to assign driver to run"),{user_id:n},{id:t})];case 1:return[2,r.sent()]}}))}))},n.prototype.assignVehicle=function(t,n,r,o){return s(this,void 0,void 0,(function(){return u(this,(function(i){switch(i.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.ASSIGN_VEHICLE,l.defaultExtractor,c.BringgException.serviceException("Failed to assign vehicle to run"),{vehicle_id:n,previous_vehicle_id:r,task_ids:o},{id:t})];case 1:return[2,i.sent()]}}))}))},n.prototype.unassignVehicle=function(t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){switch(o.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.UNASSIGN_VEHICLE,l.defaultExtractor,c.BringgException.serviceException("Failed to unassign vehicle from run"),{previous_vehicle_id:n,task_ids:r},{id:t})];case 1:return[2,o.sent()]}}))}))},n.prototype.assignVehicles=function(t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){switch(o.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.ASSIGN_VEHICLES,l.defaultExtractor,c.BringgException.serviceException("Failed to assign vehicles to run"),{vehicle_id:n,tasks:r},{id:t})];case 1:return[2,o.sent()]}}))}))},n.prototype.unassignVehicles=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.UNASSIGN_VEHICLES,l.defaultExtractor,c.BringgException.serviceException("Failed to unassign vehicles from run"),{},{id:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.bulkClose=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.BULK_CLOSE,l.defaultExtractor,c.BringgException.serviceException("Failed to bulk close runs"),{run_ids:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.markDonePlanning=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.MARK_DONE_PLANNING,l.defaultExtractor,c.BringgException.serviceException("Failed to mark done planning for runs"),{run_ids:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.getActualBreaks=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_ACTUAL_BREAKS,l.defaultExtractor,c.BringgException.serviceException("Failed to get actual breaks of runs"),{},{},{run_ids:t})];case 1:return[2,n.sent()]}}))}))},n.splitToChunks=function(t,e){for(var n=[],r=0;r<t.length;r+=e)n.push(t.slice(r,r+e));return n},n}(a.SessionBasedService);e.RunsService=p},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0});var s=n(9),u=n(73),a=n(74),c=function(t){function e(e){var n=t.call(this,{session:e,entityName:"runs"})||this;return n.createRun=function(t){return n.createOrUpdateRun(t,n.onCreate.bind(n))},n.updateRun=function(t){return n.createOrUpdateRun(t,n.onUpdate.bind(n))},n.createOrUpdateRun=function(t,e){var r=n.store.getItem(t.run.id),o={id:t.run.id,run:t.run,taskIds:void 0};r?o.taskIds=r.taskIds:(o.taskIds=n.taskIdsWaitingForRun.get(t.run.id)||new Set,n.taskIdsWaitingForRun.delete(t.run.id)),n.storeItem(o),e(n.store.getItem(t.run.id))},n.deleteRun=function(t){var e=n.store.getItem(t.id);n.store.removeFromStore(t.id),n.onDelete(e)},n.updateTaskIdsOnDelete=function(t){var e=n.store.getItem(t.run_id);e&&(e.taskIds.delete(t.id),n.updateRun(e))},n.updateTaskIds=function(t){var e=t.run_id||n.taskIdToRunId.get(t.id),r=n.store.getItem(e);r?n.taskAddedToRun(t,r)?(r.taskIds.add(t.id),n.updateRun(r)):n.taskRemovedFromRun(t,r)&&(r.taskIds.delete(t.id),n.updateRun(r)):n.backupTasksUntilRunIsCreated(t),n.updatePreviousRun(t),n.taskIdToRunId.set(t.id,t.run_id)},n.taskIdsWaitingForRun=new Map,n.taskIdToRunId=new Map,n}return o(e,t),e.prototype.attachSubscriptions=function(){this.subscribedToRealtime||(this.subscribedToRealtime=!0,this.realTime.on(u.RunEvents.CREATED,this.createRun),this.realTime.on(u.RunEvents.UPDATED,this.updateRun),this.realTime.on(u.RunEvents.DELETED,this.deleteRun),this.realTime.on(a.TaskRealTimeEvents.TASK_DELETED,this.updateTaskIdsOnDelete),this.realTime.on(a.TaskRealTimeEvents.TASK_UPDATE,this.updateTaskIds),this.realTime.on(a.TaskRealTimeEvents.NEW_TASK,this.updateTaskIds))},e.prototype.set=function(t){return this.setAll([t])[0]},e.prototype.setAll=function(t){var e,n,r=this,o=t.map((function(t){var e;return{id:t.id,run:t,taskIds:new Set(t.task_ids||(null===(e=t.tasks)||void 0===e?void 0:e.map((function(t){return t.id}))))}})),s=function(t){t.taskIds.forEach((function(e){r.taskIdToRunId.set(e,t.id)}))};try{for(var u=i(o),a=u.next();!a.done;a=u.next()){s(a.value)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return this.storeAllItems(o),o},e.prototype.updatePreviousRun=function(t){var e=this.taskIdToRunId.get(t.id);if(e&&e!=t.run_id){this.taskIdsWaitingForRun.has(e)&&this.taskIdsWaitingForRun.get(e).delete(t.id);var n=this.store.getItem(e);n&&(n.taskIds.delete(t.id),this.updateRun(n))}},e.prototype.taskRemovedFromRun=function(t,e){return!t.run_id&&e.taskIds.has(t.id)},e.prototype.taskAddedToRun=function(t,e){return t.run_id&&!e.taskIds.has(t.id)},e.prototype.backupTasksUntilRunIsCreated=function(t){t.run_id&&(this.taskIdsWaitingForRun.has(t.run_id)||this.taskIdsWaitingForRun.set(t.run_id,new Set),this.taskIdsWaitingForRun.get(t.run_id).add(t.id))},e}(s.default);e.default=c},function(t,e,n){"use strict";e.__esModule=!0,e.OwnerType=void 0,function(t){t[t.Driver=0]="Driver",t[t.Store=1]="Store"}(e.OwnerType||(e.OwnerType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";var r;e.__esModule=!0,e.AlertDisplayCategory=e.ALERT_TYPES_VALUES=e.ALERT_TYPES=void 0,function(t){t[t.UNACCEPTED=1]="UNACCEPTED",t[t.LATE=2]="LATE",t[t.FAILED_SMS=3]="FAILED_SMS",t[t.MISSED_CLIENT_MESSAGE=4]="MISSED_CLIENT_MESSAGE",t[t.FAILED_CONSUMER_APP=5]="FAILED_CONSUMER_APP",t[t.STAYS_TOO_LONG_ON_SITE=6]="STAYS_TOO_LONG_ON_SITE",t[t.UNKNOWN=7]="UNKNOWN",t[t.PHONE_STOPPED_REPORTING=8]="PHONE_STOPPED_REPORTING",t[t.LOW_BATTERY=9]="LOW_BATTERY",t[t.FAILED_PUSHING_TO_DRIVER=10]="FAILED_PUSHING_TO_DRIVER",t[t.DRIVER_LOST_GPS=11]="DRIVER_LOST_GPS",t[t.ROGUE_CUSTOMER_SUSPECTED=12]="ROGUE_CUSTOMER_SUSPECTED",t[t.ROGUE_ORDER_SUSPECTED=13]="ROGUE_ORDER_SUSPECTED",t[t.FAILED_EMAIL=14]="FAILED_EMAIL",t[t.DRIVER_FORCE_CLOSED_APP=15]="DRIVER_FORCE_CLOSED_APP",t[t.ADDRESS_CANT_BE_FOUND=16]="ADDRESS_CANT_BE_FOUND",t[t.DONE_LAST_ORDER=17]="DONE_LAST_ORDER",t[t.DRIVER_OFF_ROUTE=18]="DRIVER_OFF_ROUTE",t[t.CHECKIN_FAR_FROM_LOCATION=19]="CHECKIN_FAR_FROM_LOCATION",t[t.SCANNING_OUTSIDE_GEOFENCE=20]="SCANNING_OUTSIDE_GEOFENCE",t[t.DRIVER_ENDS_SHIFT_WITH_OPEN_TASKS=21]="DRIVER_ENDS_SHIFT_WITH_OPEN_TASKS",t[t.COULD_NOT_CREATE_RETURNING_TASK=22]="COULD_NOT_CREATE_RETURNING_TASK",t[t.DRIVER_ENDS_SHIFT_BEFORE_SCHEDULE=23]="DRIVER_ENDS_SHIFT_BEFORE_SCHEDULE",t[t.DRIVER_DEPOSIT_CLIENT_DEPOSIT_AMOUNT_DIFFERENT_FROM_SERVER=24]="DRIVER_DEPOSIT_CLIENT_DEPOSIT_AMOUNT_DIFFERENT_FROM_SERVER",t[t.DRIVER_DEPOSIT_CLIENT_DEPOSIT_AMOUNT_BASED_ON_TASK_IDS_DIFFERENT_FROM_SERVIER=25]="DRIVER_DEPOSIT_CLIENT_DEPOSIT_AMOUNT_BASED_ON_TASK_IDS_DIFFERENT_FROM_SERVIER",t[t.REQUIRE_MORE_DRIVERS=26]="REQUIRE_MORE_DRIVERS",t[t.TOO_MANY_DRIVERS=27]="TOO_MANY_DRIVERS",t[t.USER_RATED_BELLOW_THRESHOLD=28]="USER_RATED_BELLOW_THRESHOLD",t[t.WAY_POINT_NOT_GEOCODED=29]="WAY_POINT_NOT_GEOCODED",t[t.MOBILE_BLUETOOTH_IS_OFF=30]="MOBILE_BLUETOOTH_IS_OFF",t[t.ETA_TO_HOME=31]="ETA_TO_HOME",t[t.UNASSIGNED_TASK_THAT_MUST_LEAVE=32]="UNASSIGNED_TASK_THAT_MUST_LEAVE",t[t.GPS_IS_OFF=33]="GPS_IS_OFF",t[t.FLEET_FAILED_TO_FIND_DRIVER=34]="FLEET_FAILED_TO_FIND_DRIVER",t[t.FLEET_UNABLE_TO_DELIVER=35]="FLEET_UNABLE_TO_DELIVER",t[t.NOT_ASSIGNED_BEFORE_SCHEDULE=36]="NOT_ASSIGNED_BEFORE_SCHEDULE",t[t.NOT_ACCEPTED_BEFORE_SCHEDULE=37]="NOT_ACCEPTED_BEFORE_SCHEDULE",t[t.NOT_STARTED_BEFORE_SCHEDULE=38]="NOT_STARTED_BEFORE_SCHEDULE",t[t.ROUTE_OPTIMIZATION_FAILED=39]="ROUTE_OPTIMIZATION_FAILED",t[t.VRP_AUTO_DISPATCH_FAILED_TO_ASSIGN_TASK=40]="VRP_AUTO_DISPATCH_FAILED_TO_ASSIGN_TASK",t[t.DRIVER_STARTED_UNPRIORITIZED_TASK=41]="DRIVER_STARTED_UNPRIORITIZED_TASK",t[t.DRIVER_CANCELLED_ORDER=42]="DRIVER_CANCELLED_ORDER",t[t.BAD_OPTIMIZATION_PARAMETERS=43]="BAD_OPTIMIZATION_PARAMETERS",t[t.FAILED_TO_CREATE_FLEET_DELIVERY=44]="FAILED_TO_CREATE_FLEET_DELIVERY",t[t.ROUTE_OPTIMIZATION_ORDERS_LEFT_OUTSIDE_OPTIMIZATION=45]="ROUTE_OPTIMIZATION_ORDERS_LEFT_OUTSIDE_OPTIMIZATION",t[t.ROUTE_OPTIMIZATION_TASKS_REMOVED_BEFORE_OPTIMIZATION=46]="ROUTE_OPTIMIZATION_TASKS_REMOVED_BEFORE_OPTIMIZATION",t[t.FAILED_TO_CANCEL_FLEET_DELIVERY=47]="FAILED_TO_CANCEL_FLEET_DELIVERY",t[t.TMP_DAY_AND_ROSS_ORDER_TOTAL_WEIGHT_CHANGED=100]="TMP_DAY_AND_ROSS_ORDER_TOTAL_WEIGHT_CHANGED",t[t.TMP_DAY_AND_ROSS_INVENTORY_SIZE_CHANGED=101]="TMP_DAY_AND_ROSS_INVENTORY_SIZE_CHANGED",t[t.TMP_DAY_AND_ROSS_PICKUP_ORDER_TIME_WINDOW_CHANGED=102]="TMP_DAY_AND_ROSS_PICKUP_ORDER_TIME_WINDOW_CHANGED",t[t.TMP_DAY_AND_ROSS_DELIVERY_ORDER_TIME_WINDOW_CHANGED=103]="TMP_DAY_AND_ROSS_DELIVERY_ORDER_TIME_WINDOW_CHANGED",t[t.TMP_DAY_AND_ROSS_PICKUP_ORDER_SCHEDULED_TIME_CHANGED=104]="TMP_DAY_AND_ROSS_PICKUP_ORDER_SCHEDULED_TIME_CHANGED",t[t.TMP_DAY_AND_ROSS_DELIVERY_ORDER_SCHEDULED_TIME_CHANGED=105]="TMP_DAY_AND_ROSS_DELIVERY_ORDER_SCHEDULED_TIME_CHANGED",t[t.TMP_DAY_AND_ROSS_ORDER_DANGEROUS_GOODS_STATUS_CHANGED=106]="TMP_DAY_AND_ROSS_ORDER_DANGEROUS_GOODS_STATUS_CHANGED",t[t.TMP_DAY_AND_ROSS_PICKUP_ORDER_LOCATION_CHANGED=107]="TMP_DAY_AND_ROSS_PICKUP_ORDER_LOCATION_CHANGED",t[t.TMP_DAY_AND_ROSS_DELIVERY_ORDER_LOCATION_CHANGED=108]="TMP_DAY_AND_ROSS_DELIVERY_ORDER_LOCATION_CHANGED",t[t.TMP_DAY_AND_ROSS_ORDER_SERVICE_PLAN_CHANGED=109]="TMP_DAY_AND_ROSS_ORDER_SERVICE_PLAN_CHANGED",t[t.TMP_DAY_AND_ROSS_ORDER_REQUIRED_SKILLS_CHANGED=110]="TMP_DAY_AND_ROSS_ORDER_REQUIRED_SKILLS_CHANGED",t[t.TMP_DAY_AND_ROSS_NUMBER_OF_PALLETS_CHANGED=111]="TMP_DAY_AND_ROSS_NUMBER_OF_PALLETS_CHANGED",t[t.TMP_DAY_AND_ROSS_RUN_BREACHED_BY_WEIGHT=112]="TMP_DAY_AND_ROSS_RUN_BREACHED_BY_WEIGHT",t[t.TMP_DAY_AND_ROSS_RUN_BREACHED_BY_PALLETS=113]="TMP_DAY_AND_ROSS_RUN_BREACHED_BY_PALLETS"}(r=e.ALERT_TYPES||(e.ALERT_TYPES={})),e.ALERT_TYPES_VALUES=Object.values(r).filter((function(t){return"number"==typeof t})),function(t){t.TASK="task",t.DRIVER="driver",t.OPTIMIZATION="optimization"}(e.AlertDisplayCategory||(e.AlertDisplayCategory={}))},function(t,e,n){"use strict";e.__esModule=!0,e.AlertSeverity=void 0,function(t){t[t.Low=1]="Low",t[t.Medium=2]="Medium",t[t.High=3]="High"}(e.AlertSeverity||(e.AlertSeverity={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ApplicationUuid=void 0,function(t){t.AutoAssign="7083ab3d-c7de-40fd-83bb-f2c10bd0fa88",t.AAA="3ecfa3f6-1a21-11e8-accf-0ed5f89f718b",t.ActOnTriggerApp="8ebe8358-62d3-11ea-bc55-0242ac130003",t.AutoBreaks="9310325e-d7d5-11ea-87d0-0242ac130003",t.AvailableDrivers="17fea9d6-9f5e-4234-91b4-34d6677ba5be",t.Bitly="f4b3ade5-4997-418e-8f99-1813dd1e56df",t.BackToWarehouse="d21a5684-8997-11e8-9a94-a6cf71072f73",t.Boulanger="34dc733d-7d17-4e44-8884-bb1ec1197da6",t.Clover="7661994f-da60-4f5d-bda9-4c132fb19484",t.CocaCola="eaf03283-dce4-4567-b6bf-f3eb3573357e",t.CancellationTasks="94c67d35-e289-44de-a19d-8ee0b02b00e0",t.Chat="6ee9296a-38bd-4d8e-81c6-b16001a20ee3",t.CocaColaBrazilApp="f9bd58a4-a514-11ea-bb37-0242ac130002",t.CocaColaChile="075c7b23-a847-4510-bc86-79fd0d5be557",t.CocaColaIl="1e8e105b-61e2-4f54-bc70-5c6117348b87",t.ComingHomeApp="c7d80d71-fe64-43b1-9d66-c8a76db31ea5",t.Conduit="1294eec3-550d-4d71-8831-d9051750742a",t.CoopApp="6b88b9d4-d79a-4d62-8ded-fa0e5c7d67be",t.CustomerExperienceApp="caf4e836-e507-4f68-bb9c-c4511bb69750",t.CustomerExperienceWebApp="a4338daf-babe-4fc4-a2d4-9050da8c1782",t.DataTrac="d07f52b1-bf43-400f-88ab-40426de4b17c",t.DetectDriverOffRoute="dd2ad97a-ffee-11e5-86aa-5e5517507c66",t.DHL="ec424a40-a9b9-11e6-80f5-76304dec7eb7",t.DispatcherNotifier="f574941d-fd43-4c4e-bd85-9b4107e569f3",t.DriverActivityVerifier="f68bae82-dac7-411c-a772-792226bc8ea4",t.DriverPayments="88260a80-c003-4d66-bf81-5f15443286ed",t.ETA="9369f5d4-57d8-4806-b2c9-fcc6f4e51531",t.ExternalFleetApp="271c52e5-0a1a-40cb-9f24-730ec91e4afc",t.FailedDeliveryManager="de7f883b-bab4-4e25-a830-83bd1c5cb270",t.FedexFreight="064844ab-e6f4-4b0e-8e26-383a408cab2a",t.FedexIl="1b4e301f-86d1-4711-9947-08e3d8e73c6a",t.FleetRouterApp="0ee6e692-3948-4346-b57c-671d3c8b7237",t.FloatingInventoryApp="d7409473-fc0b-4d1e-a085-04634f5acd4f",t.GeocodingFiltering="afc79118-6409-43f5-94aa-268dd3d98539",t.HoursStats="88b80320-7587-447c-88bf-04e12737aebc",t.Integration="2a4c90a3-b433-40f5-88bc-d4e9020197dc",t.JusteatWebhooks="1aea54b2-d706-4c29-8b2b-47fe5660fd05",t.KFC="9250b181-92c1-4a3d-8934-8fdb6c791567",t.LeroyMerlinIntegrationApp="45c6821b-a645-424c-9bb6-9564f1f1d19f",t.LastLocationEstimator="325328e0-9347-11e5-abc1-69640172f3ad",t.ManagerAuthorizationRules="2a634eb8-145a-4269-978c-515878beda80",t.MarketplaceApp="463c04f0-a34c-11e7-ae10-5132451f306d",t.MiddleMile="13b785c1-5814-49b5-956a-b6f068161f41",t.Nextel="a91c3e27-ed17-4d0b-9c46-5981cd2cd09c",t.OAuth="811570c1-3e34-4b55-884a-6500dd50d310",t.OloApp="a8baa76c-b98d-40ec-bf30-05a0a6b8caf8",t.Panera="7e0b2c26-cfa2-4106-b4d6-c9aa3adc5478",t.ParcelShop="cd854cf7-0342-45e1-8212-dee71f599951",t.Pickup="3b62707b-22ad-4601-bef9-804927d6ca9f",t.PlannedEtaApp="e5a10347-ed56-44f4-8613-fe17f94a077f",t.Preparation="515a459e-bba3-4a52-889e-54b5b967cbf9",t.QuotesApp="c43a6eaa-dd2a-4d88-a339-861686546f08",t.RapidSosApp="76d2338f-6da3-412b-815b-b0e90d862b86",t.RDS="5ba318c1-aa07-448b-a25d-3a42e1e70ef0",t.RealtimeEtaApp="2fd6d6c6-f4b4-4b85-854c-4ee193512899",t.RouteOptimizer2="9dd3a937-b51e-41ed-afb4-6c3d97cdd620",t.ShareLocation="f8b6d7e6-bbeb-4468-be51-fb012d001fe3",t.SuperAdmin="2b8d33ba-41dc-4db5-bf42-791cd340154e",t.ShareLocationOnUpdate="b9c4b248-c517-11e9-aa8c-2a2ae2dbcce4",t.Shell="7167224f-1689-44eb-a615-ca2935e71b83",t.Shopify="2c376813-6647-498f-b53f-a53352ba02d7",t.SingleDriverOptimizerApp="2d6c4394-c504-4349-9395-cd01fded10f1",t.SingleSignOn="ec763a46-8ad7-48d8-aab7-dcefcb794ff9",t.SmsDriverNotifier="cbd475f3-a88b-45cb-aaf5-4d9bbe2c2f0b",t.StoreAppApp="b4152c59-70a3-415e-b414-ce419550782e",t.TowNow="cd52a2c2-193d-4f92-bf01-3412194e18b2",t.TasksETL="3043914f-9be6-43c6-b1d8-e249410c79bc",t.TaskScanner="255ef1ae-0012-448a-ad55-7dbfec3f1223",t.TaskSchedulingApp="779d22c8-e18a-4723-9fd9-b5475178c244",t.TaskSkillsApp="b6dbfed4-d416-48eb-9552-610b15ff5748",t.TaskTimesPredictions="6c573459-dad9-4486-bdaa-b7ff32bd3019",t.TaskValidation="56ca6350-b2bf-11e9-a2a3-2a2ae2dbcce4",t.TimeBasedTrigger="fa7399cd-745a-47b5-ba3d-34c3fa4c03ad",t.UserRoleSkills="f917dda7-806e-4d2c-bb07-47039375e4ec",t.UpsIntegration="b8cc8bb2-78be-11ea-bc55-0242ac130003",t.VrpAutoDispatch="da0db19e-5836-4750-959e-4689fb78a82c",t.Wizard="d1c9bbe8-ec15-11e4-adf3-1681e6b88ec1",t.Walmart="f9b14523-4a9a-4baf-b97e-2b9d9f3e913a",t.Webhooks="5920d1a0-4c82-11e4-916c-0800200c9a66",t.WebhookTimeZone="d3b976db-a8cf-4930-9489-b13d21075180",t.WebhookApp="52228df2-2759-432d-8865-2593d2ba6c12",t.EventBasedActions="56cc30b4-1600-42ca-ba58-94220961f110",t.InventoryTriggeredActions="bef201bc-f003-4ee5-9780-a03cb6951d3d",t.RuleEngine="e6d7c261-9d8d-4042-bd1e-5355cc5a348a"}(e.ApplicationUuid||(e.ApplicationUuid={}))},function(t,e,n){"use strict";e.__esModule=!0,e.LOGIN_ERRORS=void 0,function(t){t.MERCHANTS_DATA_REASON="HTTP_FAILED_DEPENDENCY",t.RECAPTCHA_REASON="HTTP_LOCKED"}(e.LOGIN_ERRORS||(e.LOGIN_ERRORS={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ChatConversationType=void 0,function(t){t[t.driver_and_team_dispatchers=0]="driver_and_team_dispatchers",t[t.task=1]="task",t[t.group=2]="group"}(e.ChatConversationType||(e.ChatConversationType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ChatMessageOrigin=e.ChatMessageType=void 0,function(t){t.TEXT="text",t.IMAGE="image"}(e.ChatMessageType||(e.ChatMessageType={})),function(t){t[t.MOBILE=0]="MOBILE",t[t.WEB=1]="WEB",t[t.SLACK=2]="SLACK"}(e.ChatMessageOrigin||(e.ChatMessageOrigin={}))},function(t,e,n){"use strict";e.__esModule=!0,e.Connection=e.DayOfWeek=void 0,function(t){t[t.Monday=0]="Monday",t[t.Tuesday=1]="Tuesday",t[t.Wednesday=2]="Wednesday",t[t.Thursday=3]="Thursday",t[t.Friday=4]="Friday",t[t.Saturday=5]="Saturday",t[t.Sunday=6]="Sunday"}(e.DayOfWeek||(e.DayOfWeek={})),function(t){t.Online="online",t.Offline="offline"}(e.Connection||(e.Connection={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.CustomFilterOperator=void 0,function(t){t[t.Equal=0]="Equal",t[t.GreaterThan=1]="GreaterThan",t[t.LessThan=2]="LessThan"}(e.CustomFilterOperator||(e.CustomFilterOperator={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.CustomerExperienceCancelEventTypes=e.TaskPhase=e.ApiVersion=void 0,function(t){t[t.V1=1]="V1",t[t.V2=2]="V2"}(e.ApiVersion||(e.ApiVersion={})),function(t){t.CREATED="created",t.SCHEDULING="scheduling",t.SCHEDULED="scheduled",t.DONE="done",t.RATING="rating"}(e.TaskPhase||(e.TaskPhase={})),function(t){t[t.DriverAssigned=0]="DriverAssigned",t[t.TaskStarted=1]="TaskStarted"}(e.CustomerExperienceCancelEventTypes||(e.CustomerExperienceCancelEventTypes={}))},function(t,e,n){"use strict";e.__esModule=!0,e.BreakType=void 0,function(t){t[t.Fixed=0]="Fixed",t[t.Flex=1]="Flex"}(e.BreakType||(e.BreakType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.DeliveryProviderFleetLegacyType=e.DeliveryProviderContractType=e.DeliveryProviderStatus=e.DeliveryProviderEcoFriendlyType=e.DeliveryProviderDeliverFromCapability=e.DeliveryProviderSecurityCapability=e.DeliveryProviderServiceCapability=e.DeliveryProviderServiceLevelCapability=e.DeliveryProviderCommitmentTimeCapability=e.DeliveryProviderSkillCapability=e.DeliveryProviderVehicleCapability=e.DeliveryProviderIndustryCapability=void 0,function(t){t.big_and_bulky="big_and_bulky",t.restaurant="restaurant",t.groceries="groceries",t.healthcare="healthcare",t.automotive="automotive",t.meal_kit="meal_kit"}(e.DeliveryProviderIndustryCapability||(e.DeliveryProviderIndustryCapability={})),function(t){t.on_foot="on_foot",t.bikes="bikes",t.cargo_bikes="bikes",t.bicycles="bicycles",t.cars="cars",t.vans="vans",t.trucks="trucks",t.robots="robots",t.drones="drones"}(e.DeliveryProviderVehicleCapability||(e.DeliveryProviderVehicleCapability={})),function(t){t.proof_of_delivery="proof_of_delivery",t.quotes="quotes",t.multi_parcel="multi_parcel",t.update_order="update_order",t.driver_live_tracking="driver_live_tracking",t.cancel_order="cancel_order"}(e.DeliveryProviderSkillCapability||(e.DeliveryProviderSkillCapability={})),function(t){t.min30="min30",t.min60="min60",t.min120="min120"}(e.DeliveryProviderCommitmentTimeCapability||(e.DeliveryProviderCommitmentTimeCapability={})),function(t){t.on_demand="on_demand",t.same_day="same_day",t.scheduled="scheduled"}(e.DeliveryProviderServiceLevelCapability||(e.DeliveryProviderServiceLevelCapability={})),function(t){t.installation="installation",t.assambly="assambly",t.room_of_choice="room_of_choice",t.over_the_threshold="over_the_threshold",t.contactless="contactless",t.dangerous_goods="dangerous_goods",t.fragile="fragile",t.alcohol="alcohol",t.medical="medical"}(e.DeliveryProviderServiceCapability||(e.DeliveryProviderServiceCapability={})),function(t){t.iso="iso",t.soc2="soc2"}(e.DeliveryProviderSecurityCapability||(e.DeliveryProviderSecurityCapability={})),function(t){t.store="store",t.warehouse="warehouse"}(e.DeliveryProviderDeliverFromCapability||(e.DeliveryProviderDeliverFromCapability={})),function(t){t[t.Yes=0]="Yes",t[t.No=1]="No",t[t.Partial=2]="Partial"}(e.DeliveryProviderEcoFriendlyType||(e.DeliveryProviderEcoFriendlyType={})),function(t){t[t.Pending=0]="Pending",t[t.InProgress=1]="InProgress",t[t.Active=2]="Active",t[t.Inactive=3]="Inactive"}(e.DeliveryProviderStatus||(e.DeliveryProviderStatus={})),function(t){t[t.HubAggregator=0]="HubAggregator",t[t.HubDirect=1]="HubDirect",t[t.NonHub=2]="NonHub"}(e.DeliveryProviderContractType||(e.DeliveryProviderContractType={})),function(t){t[t.BringgIntegration=0]="BringgIntegration",t[t.SelfIntegration=1]="SelfIntegration",t[t.Bringg2Bringg=2]="Bringg2Bringg",t[t.Aggregator=3]="Aggregator"}(e.DeliveryProviderFleetLegacyType||(e.DeliveryProviderFleetLegacyType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.DeliveryProviderLookupType=void 0,function(t){t[t.ServiceLevels=0]="ServiceLevels",t[t.VehicleTypes=1]="VehicleTypes",t[t.ShippingOrigins=2]="ShippingOrigins",t[t.DeliveryTypes=3]="DeliveryTypes",t[t.AgeRestrictions=4]="AgeRestrictions",t[t.WhiteGloves=5]="WhiteGloves"}(e.DeliveryProviderLookupType||(e.DeliveryProviderLookupType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.DisputeReason=void 0,function(t){t[t.DRIVER_ARRIVED_LATE=0]="DRIVER_ARRIVED_LATE",t[t.DRIVER_ARRIVED_EARLY=1]="DRIVER_ARRIVED_EARLY",t[t.POOR_DELIVERY_EXECUTION=2]="POOR_DELIVERY_EXECUTION",t[t.DRIVER_BEHAVIOR_COMPLAINT=3]="DRIVER_BEHAVIOR_COMPLAINT",t[t.FLEET_CANCELLED_AFTER_ORDER_PREP=4]="FLEET_CANCELLED_AFTER_ORDER_PREP",t[t.DRIVER_NEVER_ARRIVED_TO_PICKUP=5]="DRIVER_NEVER_ARRIVED_TO_PICKUP",t[t.DRIVER_NEVER_ARRIVED_TO_DROPOFF=6]="DRIVER_NEVER_ARRIVED_TO_DROPOFF",t[t.OTHER=100]="OTHER"}(e.DisputeReason||(e.DisputeReason={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.EmulatedDeliveryEvents=void 0,function(t){t.AssignDriverAndStart="AssignDriverAndStart",t.CancelOrder="CancelOrder",t.FinishOrder="FinishOrder",t.CheckInPickUp="CheckInPickUp",t.CheckOutPickUp="CheckOutPickUp",t.CheckInDropOff="CheckInDropOff",t.CheckOutDropOff="CheckOutDropOff"}(e.EmulatedDeliveryEvents||(e.EmulatedDeliveryEvents={}))},function(t,e,n){"use strict";e.__esModule=!0,e.EventType=e.AssociationsChangedType=void 0,function(t){t.way_point="way_point",t.task_inventory="task_inventory",t.form="form",t.task_note="task_note",t.task_photo="task_photo",t.signature="signature"}(e.AssociationsChangedType||(e.AssociationsChangedType={})),function(t){t.ApplicationActionRun="application:action:run",t.UserPreLeftHome="user:pre_left_home",t.UserPreGotHome="user:pre_got_home",t.UserTypeChanged="user_type_changed",t.TaskCashoutCreated="task:cashout:created",t.EmployeeUpdateLocation="employee:update_location",t.EmployeeUpdate="employee:update",t.TaskNew="task:new",t.TaskAcknowledged="task:acknowledged",t.TaskPaymentHistoryCreated="task_payment_history:created",t.UserRated="user:rated",t.CustomerTipped="customer:tipped",t.CustomerCreated="customer:created",t.CustomerOptedIn="customer:opted_in",t.CustomerOptedOut="customer:opted_out",t.CustomerAvailabilityHoursCreated="customer:availability_hours:created",t.EmployeeTurnsOffline="employee_turns_offline",t.EmployeeTurnsOnline="employee_turns_online",t.ShiftStarted="shift:started",t.ShiftEnded="shift:ended",t.TaskWayPointAdded="task:way_point:added",t.TaskChangePreparation="task:change_preparation",t.TaskPreparationChanged="task:preparation_changed",t.TaskStatusChanged="task:status_changed",t.TaskDeleted="task:deleted",t.TaskUpdate="task:update",t.TaskPackagesChanged="task:packages_changed",t.TeamUserAdded="team:user_added",t.UserNew="user:new",t.TeamUserRemoved="team:user_removed",t.TeamTaskAdded="team:task_added",t.TeamTaskRemoved="team:task_removed",t.TaskCreated="task:created",t.TaskCreatedFinal="task:created:final",t.TaskCreatedFinalProcessingDone="task:created:final:processing:done",t.TaskRemoved="task:removed",t.TaskRejected="task:rejected",t.UserGotHome="user:got_home",t.UserLeftHome="user:left_home",t.TaskLate="task:late",t.AppAdded="app:added",t.AppRemoved="app:removed",t.RequestPush="request_push",t.UsersReadyToExecute="users:ready_to_execute",t.UserReadyToExecute="user:ready_to_execute",t.RequestOptimizeRoute="request_optimize_route",t.RequestOptimizeDriverRoute="request_optimize_driver_route",t.RequestRescheduleCancelledTask="request_reschedule_cancelled_task",t.SharedLocationCreated="shared_location:created",t.MerchantCreated="merchant_created",t.UserActivityChange="user_activity_change",t.FormCreated="form_created",t.NoteCreated="note_created",t.FloatingInventoryUpdated="floating_inventory:updated",t.WayPointUpdated="way_point:updated",t.WayPointStarted="way_point:started",t.WayPointArrived="way_point:checkin",t.WayPointLeft="way_point:checkout",t.MassWayPointLeft="mass:way_point:checkout",t.WayPointOnTheWayProcessingDone="way_point:on_the_way:processing:done",t.TaskWayPointsDoneProcessingDone="task:way_points:done:processing:done",t.TaskProcessingDone="task:processing:done",t.WayPointRecalculateDistance="way_point:recalculate_distance",t.RecalculateDistance="recalculate_distance",t.TaskReadyToExecute="task:ready_to_execute",t.TeamUpdate="team:update",t.MerchantConfigurationUpdated="merchant:configuration_updated",t.RouteOptimized="route:optimized",t.RouteOptimizationProgress="route:optimization:progress",t.RouteOptimizationCanceled="route:optimization:canceled",t.RouteOptimizationPolling="route:optimization:polling",t.RouteOptimizationDone="route:optimization:done",t.PlanningDone="planning:done",t.InventoryScheduledArrivalCreated="inventory:scheduled_arrival:created",t.Scanned="scanned",t.InventoryScanned="inventory_scanned",t.AlertCreated="alert_created",t.RunStarted="run:started",t.RunEnded="run:ended",t.RunTaskAdded="run:task:added",t.RunTaskRemoved="run:task:removed",t.RunUpdated="run:updated",t.RunCalculateAggregations="run:calculate_aggregations",t.InvoiceCreated="invoice:created",t.RunDebriefed="run:debriefed",t.TasksMassRemove="tasks:mass_remove",t.ManifestDone="manifest:done",t.LocationHistoryReceived="location_history_received",t.QuoteReceived="quote_received",t.DeliveryBlockAssigned="delivery_block:assigned",t.DeliveryBlockUnassigned="delivery_block:unassigned",t.DriverShiftScheduleUpdated="driver_shift_schedule:updated",t.SchedulerEvent="scheduler_event",t.MobileAnalyticsEvent="mobile_analytics_event",t.MenuUpdated="menu:updated",t.TaskInventoryUpdate="task_inventory:update",t.MobileActionEvent="mobile_action_event",t.WayPointAnswersCreated="way_point:answers:created",t.WayPointScheduledArrivalUpdated="way_point:scheduled_arrival:updated",t.MaskedPhoneCallFinished="masked_phone:call_finished",t.RapidSosRequested="rapid_sos_requested",t.RatingSubmitted="rating:submitted",t.UserActualBreakUpdated="user:actual_break:updated",t.TimeBasedEvent="time_based_event",t.OpenFleetIntegrationEvent="open_fleet:integration_event"}(e.EventType||(e.EventType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.AggregatorType=e.IntegrationType=void 0,function(t){t[t.Fleet=1]="Fleet",t[t.Aggregator=2]="Aggregator",t[t.POS=3]="POS"}(e.IntegrationType||(e.IntegrationType={})),function(t){t[t.Uber=1]="Uber",t[t.Loggi=3]="Loggi",t[t.Ifood=5]="Ifood",t[t.McdPOS=6]="McdPOS",t[t.Vtex=7]="Vtex",t[t.Toast=8]="Toast",t[t.GoogleFood=9]="GoogleFood",t[t.Popeyes=10]="Popeyes"}(e.AggregatorType||(e.AggregatorType={}))},function(t,e,n){"use strict";var r,o;e.__esModule=!0,e.FleetTypeToCapabilities=e.FleetType=void 0,function(t){t[t.Uber=1]="Uber",t[t.Deliv=2]="Deliv",t[t.Loggi=3]="Loggi",t[t.Doordash=5]="Doordash",t[t.Ifood=6]="Ifood",t[t.Rappi=7]="Rappi",t[t.MensajerosUrbanos=8]="MensajerosUrbanos",t[t.PedidosYa=9]="PedidosYa",t[t.Glovo=10]="Glovo",t[t.Domicilios=11]="Domicilios",t[t.Postmates=12]="Postmates",t[t.FedEx=13]="FedEx",t[t.Stuart=14]="Stuart",t[t.Bringg=15]="Bringg",t[t.Deliveright=16]="Deliveright",t[t.Unmanaged=17]="Unmanaged",t[t.SelfIntegrated=18]="SelfIntegrated",t[t.Hertz=19]="Hertz",t[t.Shipt=20]="Shipt",t[t.Lyft=21]="Lyft",t[t.Deliveroo=22]="Deliveroo",t[t.ShippyPro=23]="ShippyPro",t[t.EasyPost=24]="EasyPost",t[t.Roadie=25]="Roadie",t[t.FiveString=26]="FiveString",t[t.PointPickup=27]="PointPickup",t[t.GLS=28]="GLS",t[t.TNT=29]="TNT",t[t.EmulatedDeliveryProvider=999]="EmulatedDeliveryProvider"}(o=e.FleetType||(e.FleetType={})),e.FleetTypeToCapabilities=((r={})[o.Uber]={create_delivery:!0,get_quote:!0,multiple_time_windows:!0,is_green:!1},r[o.Deliv]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.Loggi]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.Doordash]={create_delivery:!0,get_quote:!0,is_green:!1},r[o.Ifood]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.Rappi]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.MensajerosUrbanos]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.PedidosYa]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.Glovo]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.Domicilios]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.Postmates]={create_delivery:!0,get_quote:!0,is_green:!1},r[o.FedEx]={create_delivery:!0,get_quote:!0,is_green:!1},r[o.Stuart]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r[o.Bringg]={create_delivery:!0,get_quote:!1,update_delivery:!0,is_green:!1},r[o.Deliveright]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.SelfIntegrated]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r[o.Hertz]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.Shipt]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.Lyft]={create_delivery:!0,get_quote:!0,is_green:!1},r[o.Deliveroo]={create_delivery:!0,get_quote:!0,is_green:!1},r[o.ShippyPro]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.EasyPost]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.Roadie]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r[o.FiveString]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r[o.PointPickup]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r[o.GLS]={create_delivery:!0,get_quote:!1,update_delivery:!0,is_green:!1},r[o.TNT]={create_delivery:!0,get_quote:!1,update_delivery:!0,is_green:!1},r[o.EmulatedDeliveryProvider]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r)},function(t,e,n){"use strict";e.__esModule=!0,e.PreferredMethod=void 0,function(t){t.Priority="priority",t.Fastest="fastest",t.Cheapest="cheapest"}(e.PreferredMethod||(e.PreferredMethod={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.OWNERSHIP_ORIGIN=void 0,function(t){t[t.DRIVER_API=1]="DRIVER_API",t[t.WEB_API=2]="WEB_API",t[t.SERVICES_API=3]="SERVICES_API",t[t.FLOATING_INVENTORY_APP=4]="FLOATING_INVENTORY_APP"}(e.OWNERSHIP_ORIGIN||(e.OWNERSHIP_ORIGIN={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.IntegrationName=void 0,function(t){t[t.Ups=1]="Ups",t[t.iFood=2]="iFood",t[t.Arcos=3]="Arcos",t[t.LeroyMerlin=4]="LeroyMerlin",t[t.Salesforce=5]="Salesforce"}(e.IntegrationName||(e.IntegrationName={}))},function(t,e,n){"use strict";e.__esModule=!0,e.KEYSET_PAGINATION_VER=e.KeysetPaginationPageAction=void 0,function(t){t.NEXT="next",t.PREVIOUS="previous"}(e.KeysetPaginationPageAction||(e.KeysetPaginationPageAction={})),e.KEYSET_PAGINATION_VER=2},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.Origin=e.EntitySubType=e.EntityType=void 0,function(t){t.MENU="menu",t.SECTION="section",t.PRODUCT="product",t.COMPOSITE_PRODUCT="composite_product",t.CHOICE="choice",t.OPTION="option",t.PICKER="picker"}(e.EntityType||(e.EntityType={})),function(t){t.SIZE="size",t.PICKER_OPTION="picker_option"}(e.EntitySubType||(e.EntitySubType={})),function(t){t.MANUAL="manual",t.SYSTEM="system"}(e.Origin||(e.Origin={}))},function(t,e,n){"use strict";e.__esModule=!0,e.EnvironmentTypes=e.SubscriptionTypes=e.PrinterTypes=void 0,function(t){t.DEFAULT="",t.THREE_INCH="3inch",t.TWO_INCH="2inch"}(e.PrinterTypes||(e.PrinterTypes={})),function(t){t[t.TEST=-1]="TEST",t[t.UNKNOWN=0]="UNKNOWN",t[t.PRODUCTION=1]="PRODUCTION",t[t.CLOVER_DEMO=2]="CLOVER_DEMO",t[t.CLOVER_UNKNOWN=4]="CLOVER_UNKNOWN",t[t.CLOVER_FREE_TIER=5]="CLOVER_FREE_TIER",t[t.CLOVER_PRO_TIER=6]="CLOVER_PRO_TIER",t[t.CLOVER_TRIAL=7]="CLOVER_TRIAL",t[t.CLOVER_UNINSTALLED=9]="CLOVER_UNINSTALLED",t[t.DEACTIVATED=12]="DEACTIVATED",t[t.PRODUCTION_UNPAID=13]="PRODUCTION_UNPAID",t[t.BLOCKED_UNPAID=14]="BLOCKED_UNPAID",t[t.STRIPE=17]="STRIPE",t[t.ONE_TO_MANY=19]="ONE_TO_MANY"}(e.SubscriptionTypes||(e.SubscriptionTypes={})),function(t){t[t.Production=0]="Production",t[t.Test=1]="Test"}(e.EnvironmentTypes||(e.EnvironmentTypes={}))},function(t,e,n){"use strict";e.__esModule=!0,e.GrabMode=e.SmsProvider=e.SharingMode=e.ChainOfCustodyType=e.TipType=e.FormDisplayMode=e.HourFormat=e.FuturePeriod=void 0,function(t){t[t.none=-1]="none",t[t.today=1]="today",t[t.tomorrow=2]="tomorrow",t[t.next_24_hours=3]="next_24_hours",t[t.forever_and_ever=4]="forever_and_ever",t[t.custom=5]="custom",t[t.all_open_tasks=6]="all_open_tasks"}(e.FuturePeriod||(e.FuturePeriod={})),function(t){t[t.Default=0]="Default",t[t.TwelveHours=1]="TwelveHours",t[t.TwentyFourHours=2]="TwentyFourHours"}(e.HourFormat||(e.HourFormat={})),function(t){t[t.MANUAL=0]="MANUAL",t[t.AFTER_CHECK_IN=1]="AFTER_CHECK_IN",t[t.BEFORE_CHECKOUT=2]="BEFORE_CHECKOUT"}(e.FormDisplayMode||(e.FormDisplayMode={})),function(t){t[t.PERCENT=0]="PERCENT",t[t.MONEY=1]="MONEY"}(e.TipType||(e.TipType={})),function(t){t[t.WEAK=0]="WEAK",t[t.STRONG=1]="STRONG",t[t.NONE=2]="NONE",t[t.UNLOAD=3]="UNLOAD"}(e.ChainOfCustodyType||(e.ChainOfCustodyType={})),function(t){t[t.ALL=0]="ALL",t[t.EMAIL_ONLY=1]="EMAIL_ONLY",t[t.PHONE_ONLY=2]="PHONE_ONLY",t[t.NO_SHARING=3]="NO_SHARING",t[t.WEBHOOKS_ONLY=4]="WEBHOOKS_ONLY"}(e.SharingMode||(e.SharingMode={})),function(t){t[t.Twilio=0]="Twilio",t[t.Nexmo=1]="Nexmo"}(e.SmsProvider||(e.SmsProvider={})),function(t){t[t.OFF=0]="OFF",t[t.AUTOMATIC=1]="AUTOMATIC",t[t.ON_DEMAND=2]="ON_DEMAND"}(e.GrabMode||(e.GrabMode={}))},function(t,e,n){"use strict";e.__esModule=!0,e.SubscriptionNotificationType=e.SubscriptionType=void 0,function(t){t[t.Email=0]="Email"}(e.SubscriptionType||(e.SubscriptionType={})),function(t){t[t.InvalidInventory=0]="InvalidInventory",t[t.EtlReport=1]="EtlReport",t[t.WebhookFailures=2]="WebhookFailures",t[t.MenuIssue=3]="MenuIssue",t[t.IntegrationPollingError=4]="IntegrationPollingError"}(e.SubscriptionNotificationType||(e.SubscriptionNotificationType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.NotificationTypes=void 0,function(t){t.RatingScreenTitle="rating_screen_title",t.PostRatingPositiveTitle="post_rating_positive_title",t.PostRatingNegativeTitle="post_rating_negative_title"}(e.NotificationTypes||(e.NotificationTypes={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.OptInMethod=e.OptInType=void 0,function(t){t[t.OPT_IN=1]="OPT_IN",t[t.OPT_OUT=2]="OPT_OUT"}(e.OptInType||(e.OptInType={})),function(t){t[t.SMS=1]="SMS",t[t.API=2]="API"}(e.OptInMethod||(e.OptInMethod={}))},function(t,e,n){"use strict";e.__esModule=!0,e.RouteItemType=e.OPTIMIZATION_TYPE=void 0,function(t){t[t.ANONYMOUS=1]="ANONYMOUS",t[t.NAMED_VRP=2]="NAMED_VRP",t[t.NAMED_PDP=3]="NAMED_PDP",t[t.ROUTE_BASED=4]="ROUTE_BASED",t[t.CREW_BASED=5]="CREW_BASED"}(e.OPTIMIZATION_TYPE||(e.OPTIMIZATION_TYPE={})),function(t){t.Break="break"}(e.RouteItemType||(e.RouteItemType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.PrivilegeTypes=void 0,function(t){t.DISPATCH_SCREEN="dispatch",t.CREATE_ORDERS="create_order",t.VIEW_TASK="view_task",t.ACKNOWLEDGE_FLOW="acknowledge",t.HISTORY="history",t.DRIVERS="drivers",t.DRIVER_PRORFILE="driver_profile",t.ADD_DRIVER="add_driver",t.CHANGE_DRIVER_ROLE="change_driver_type",t.ASSIGN_DRIVER_TO_TASK="assign_driver_to_task",t.TEAMS="teams",t.USER_TYPES="user_types",t.CUSTOMERS="customers_menu",t.REPORTS="reports",t.REPORTS_NEW="reports_new",t.DASHBOARD="dashboard",t.CASHOUT_EDIT_DISTANCE="cashout_edit_distance",t.ACCESS_SETTINGS_SCREEN="access_settings_screen",t.CUSTOMER_CARE="customer_care",t.MAINTAIN_DRIVER_SHIFT_TIMES="maintain_driver_shift_times",t.COMPLETE_TASK="complete_task",t.EDIT_DELIVERY_BLOCK="edit_delivery_block",t.SEE_SEND_TO_PREPARATION="send_to_preparation",t.ACCESS_TASKS="access_task",t.ACCESS_TO_ALL_TASKS="access_to_all_tasks",t.ACCESS_CUSTOMER_ORDERS_ONLY="access_customer_orders_only",t.ACCESS_COMPANY_TASKS_ONLY="access_company_tasks_only",t.EDIT_COMPANY="edit_company",t.ENABLE_BI_DASHBOARD="enable_bi_dashboard",t.EDIT_EXCLUSION_WINDOWS="edit_exclusion_windows",t.EDIT_TASK_DETAILS="edit_task_details",t.TASKS_CSV_IMPORTER_EDIT_HEADERS="tasks_csv_importer_edit_headers",t.EDIT_SERVICE_AREAS="edit_service_areas",t.ACCESS_USERS="access_user",t.ACCESS_COMPANY_USERS_ONLY="access_company_users_only",t.ACCESS_TO_NONE_ORDERS="access_to_none_orders",t.CANCEL_TASK="cancel_task",t.LOCK_UNLOCK_TASK="lock_unlock_task",t.RESCHEDULE_CANCELLED_ORDER="reschedule_cancelled_order",t.BILLING_PORTAL="billing_portal",t.CUSTOMIZE_LIST_LAYOUT="customize_list_layout"}(e.PrivilegeTypes||(e.PrivilegeTypes={}))},function(t,e,n){"use strict";e.__esModule=!0,e.PushNotificationEnvironment=e.DevicePlatform=void 0,function(t){t[t.Android=1]="Android",t[t.IOS=2]="IOS"}(e.DevicePlatform||(e.DevicePlatform={})),function(t){t[t.Release=1]="Release",t[t.Development=2]="Development"}(e.PushNotificationEnvironment||(e.PushNotificationEnvironment={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ApplicationType=void 0,function(t){t[t.STORE_APP=0]="STORE_APP"}(e.ApplicationType||(e.ApplicationType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.VehicleTypeId=void 0,function(t){t[t.Walker=1]="Walker",t[t.Bicycle=2]="Bicycle",t[t.Car=3]="Car",t[t.Truck=4]="Truck"}(e.VehicleTypeId||(e.VehicleTypeId={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};e.__esModule=!0,o(n(279),e),o(n(280),e),o(n(281),e)},function(t,e,n){"use strict";e.__esModule=!0,e.Order=void 0,function(t){t.asc="asc",t.desc="desc"}(e.Order||(e.Order={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ReportExportingStatus=e.ReportExecuteOrigin=void 0,function(t){t[t.Scheduled=0]="Scheduled",t[t.ExportNow=1]="ExportNow",t[t.Download=2]="Download"}(e.ReportExecuteOrigin||(e.ReportExecuteOrigin={})),function(t){t.InProgress="InProgress",t.Completed="Completed",t.Error="Error",t.Canceled="Canceled"}(e.ReportExportingStatus||(e.ReportExportingStatus={}))},function(t,e,n){"use strict";e.__esModule=!0,e.CronDayOfWeek=e.ReportExportFormat=e.ReportDeliveryType=e.RecurrencePeriod=void 0,function(t){t.Monthly="Monthly",t.Weekly="Weekly",t.Daily="Daily"}(e.RecurrencePeriod||(e.RecurrencePeriod={})),function(t){t[t.Email=0]="Email",t[t.ApiOrUrl=1]="ApiOrUrl"}(e.ReportDeliveryType||(e.ReportDeliveryType={})),function(t){t[t.CSV=0]="CSV",t[t.JSON=1]="JSON"}(e.ReportExportFormat||(e.ReportExportFormat={})),function(t){t[t.Sunday=1]="Sunday",t[t.Monday=2]="Monday",t[t.Tuesday=3]="Tuesday",t[t.Wednesday=4]="Wednesday",t[t.Thursday=5]="Thursday",t[t.Friday=6]="Friday",t[t.Saturday=7]="Saturday"}(e.CronDayOfWeek||(e.CronDayOfWeek={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.FILTER_TYPES=e.UserRole=e.WIDGET_GROUPING_TYPES=e.NAV_MENU_HIERARCHY_TYPES=e.LAYOUT_SOURCE=e.NAV_MENU_TYPES=e.TARGET_OPERATORS=e.COMPONENT_TYPES=void 0,function(t){t[t.TIME_GRAPH=0]="TIME_GRAPH",t[t.METRICS=1]="METRICS",t[t.BIG_NUMBER=2]="BIG_NUMBER",t[t.TIME_LINE=3]="TIME_LINE",t[t.PIE=4]="PIE",t[t.STACKED_SEGMENT_BAR=5]="STACKED_SEGMENT_BAR",t[t.UNSTACKED_SEGMENT_BAR=6]="UNSTACKED_SEGMENT_BAR",t[t.NON_TIME_BASED_STACKED_SEGMENT_BAR=7]="NON_TIME_BASED_STACKED_SEGMENT_BAR",t[t.MULTIPLE_QUERIES=8]="MULTIPLE_QUERIES"}(e.COMPONENT_TYPES||(e.COMPONENT_TYPES={})),function(t){t[t.BIGGER=0]="BIGGER",t[t.SMALLER=1]="SMALLER"}(e.TARGET_OPERATORS||(e.TARGET_OPERATORS={})),function(t){t[t.MERCHANTS_TEAMS=0]="MERCHANTS_TEAMS",t[t.TEAMS=1]="TEAMS"}(e.NAV_MENU_TYPES||(e.NAV_MENU_TYPES={})),function(t){t[t.INSIGHT_APP=0]="INSIGHT_APP",t[t.BI_DASHBOARD=1]="BI_DASHBOARD"}(e.LAYOUT_SOURCE||(e.LAYOUT_SOURCE={})),function(t){t[t.GLOBAL=0]="GLOBAL",t[t.MERCHANT=1]="MERCHANT",t[t.TEAM=2]="TEAM"}(e.NAV_MENU_HIERARCHY_TYPES||(e.NAV_MENU_HIERARCHY_TYPES={})),function(t){t.GROUP_BY_ORIGIN="GROUP_BY_ORIGIN",t.GROUP_BY_FLEET="GROUP_BY_FLEET",t.GROUP_BY_MERCHANT="GROUP_BY_MERCHANT",t.GROUP_BY_HOUR_OF_DAY="GROUP_BY_HOUR_OF_DAY",t.GROUP_BY_DAY_OF_WEEK="GROUP_BY_DAY_OF_WEEK",t.GROUP_BY_TEAM="GROUP_BY_TEAM",t.GROUP_BY_WP1_ARRIVAL="GROUP_BY_WP1_ARRIVAL",t.GROUP_BY_WP2_ARRIVAL="GROUP_BY_WP2_ARRIVAL",t.GROUP_BY_FLEET_WITH_INTERNAL_FLEETS="GROUP_BY_FLEET_WITH_INTERNAL_FLEETS",t.GROUP_BY_RATING="GROUP_BY_RATING",t.GROUP_BY_DRIVER="GROUP_BY_DRIVER"}(e.WIDGET_GROUPING_TYPES||(e.WIDGET_GROUPING_TYPES={})),function(t){t[t.Partner=0]="Partner",t[t.Admin=1]="Admin",t[t.Dispatcher=2]="Dispatcher"}(e.UserRole||(e.UserRole={})),function(t){t.TIME_RANGE="TIME_RANGE",t.COMPARE_RANGE="COMPARE_RANGE",t.FLEETS="FLEETS"}(e.FILTER_TYPES||(e.FILTER_TYPES={}))},function(t,e,n){"use strict";e.__esModule=!0,e.RequestOrigin=void 0,function(t){t[t.DriverApi=1]="DriverApi",t[t.WebApi=2]="WebApi",t[t.RakeService=3]="RakeService",t[t.ScheduledRakeTask=4]="ScheduledRakeTask",t[t.CustomerExperienceApi=5]="CustomerExperienceApi",t[t.OpenFleetApi=6]="OpenFleetApi"}(e.RequestOrigin||(e.RequestOrigin={}))},function(t,e,n){"use strict";e.__esModule=!0,e.RuleRequestType=e.FactType=e.Entity=e.RuleCategory=e.AttributeDatatype=void 0,function(t){t.String="string",t.Number="number",t.Boolean="boolean",t.Datetime="datetime",t.Array="array"}(e.AttributeDatatype||(e.AttributeDatatype={})),function(t){t[t.FleetRouter=0]="FleetRouter",t[t.Alert=1]="Alert"}(e.RuleCategory||(e.RuleCategory={})),function(t){t.Fleet="fleet",t.Action="action"}(e.Entity||(e.Entity={})),function(t){t.Task="task",t.Waypoint="waypoint",t.Run="run"}(e.FactType||(e.FactType={})),function(t){t.Evaluate="rule:evaluate"}(e.RuleRequestType||(e.RuleRequestType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.OFFLINE_ONLINE_EVENT_TYPES=e.RUN_HISTORY_TYPES=e.HOME_EVENT_TYPES=e.START_END_METHODS=void 0,function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.FROM_MANUAL_START_TASK=1]="FROM_MANUAL_START_TASK",t[t.FROM_AUTO_START_TASK=2]="FROM_AUTO_START_TASK",t[t.FROM_END_RUN=3]="FROM_END_RUN",t[t.HOME_FROM_DASHBOARD=4]="HOME_FROM_DASHBOARD",t[t.HOME_FROM_BEACON=5]="HOME_FROM_BEACON",t[t.HOME_FROM_GEOFENCE=6]="HOME_FROM_GEOFENCE",t[t.HOME_FROM_APP=7]="HOME_FROM_APP",t[t.HOME_FROM_API=8]="HOME_FROM_API",t[t.HOME_FROM_SERVER=9]="HOME_FROM_SERVER",t[t.HOME_FROM_POLYGON=10]="HOME_FROM_POLYGON",t[t.FROM_ROLE_CHANGE=11]="FROM_ROLE_CHANGE",t[t.FROM_END_TASK=12]="FROM_END_TASK",t[t.FROM_START_TASK=13]="FROM_START_TASK",t[t.FROM_END_SHIFT=14]="FROM_END_SHIFT",t[t.ROUTES_CREATE_TASK=15]="ROUTES_CREATE_TASK"}(e.START_END_METHODS||(e.START_END_METHODS={})),function(t){t[t.AUTOMATIC_FROM_APP_GEOFENCE=1]="AUTOMATIC_FROM_APP_GEOFENCE",t[t.MANUAL_FROM_APP=2]="MANUAL_FROM_APP",t[t.FROM_DASHBOARD=3]="FROM_DASHBOARD",t[t.FROM_API=4]="FROM_API",t[t.AUTOMATIC_FROM_SERVER=5]="AUTOMATIC_FROM_SERVER",t[t.AUTOMATIC_FROM_APP_POLYGON=6]="AUTOMATIC_FROM_APP_POLYGON",t[t.AUTOMATIC_FROM_APP_BEACON=7]="AUTOMATIC_FROM_APP_BEACON",t[t.AUTOMATIC_FROM_ROLE_CHANGE=8]="AUTOMATIC_FROM_ROLE_CHANGE",t[t.FROM_END_SHIFT=9]="FROM_END_SHIFT"}(e.HOME_EVENT_TYPES||(e.HOME_EVENT_TYPES={})),function(t){t[t.ALERT=0]="ALERT",t[t.HOME_EVENT=1]="HOME_EVENT",t[t.OFFLINE_ONLINE_EVENT=2]="OFFLINE_ONLINE_EVENT",t[t.SHIFT=3]="SHIFT",t[t.TASK_HISTORY=4]="TASK_HISTORY"}(e.RUN_HISTORY_TYPES||(e.RUN_HISTORY_TYPES={})),function(t){t[t.OFFLINE=0]="OFFLINE",t[t.ONLINE=1]="ONLINE"}(e.OFFLINE_ONLINE_EVENT_TYPES||(e.OFFLINE_ONLINE_EVENT_TYPES={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ScanType=void 0,function(t){t.BarCode="BarcodeScan",t.Ocr="Ocr",t.Serial="SerialScan"}(e.ScanType||(e.ScanType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.ServiceWindowType=void 0,function(t){t[t.Delivery=0]="Delivery",t[t.Pickup=1]="Pickup",t[t.EatIn=2]="EatIn"}(e.ServiceWindowType||(e.ServiceWindowType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.SharingMethod=e.SharingType=void 0,function(t){t[t.Created=0]="Created",t[t.Start=1]="Start",t[t.CheckedIn=2]="CheckedIn",t[t.CheckedOut=3]="CheckedOut",t[t.Route=4]="Route",t[t.Late=5]="Late",t[t.Reschedule=6]="Reschedule",t[t.ReadyForPickup=7]="ReadyForPickup",t[t.ScheduleReady=8]="ScheduleReady",t[t.Acknowledged=9]="Acknowledged",t[t.Schedule=10]="Schedule",t[t.OptIn=11]="OptIn",t[t.EtaDelay=12]="EtaDelay",t[t.CustomerPickup=13]="CustomerPickup",t[t.OptInConfirmation=14]="OptInConfirmation"}(e.SharingType||(e.SharingType={})),function(t){t[t.Phone=0]="Phone",t[t.Email=1]="Email",t[t.Websocket=2]="Websocket",t[t.None=3]="None",t[t.Other=4]="Other",t[t.Api=5]="Api",t[t.Push=6]="Push",t[t.Webhook=7]="Webhook"}(e.SharingMethod||(e.SharingMethod={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ShiftRule=e.ShiftNoteType=void 0,function(t){t.ShiftForm="ShiftForm",t.ShiftNote="ShiftNote",t.ShiftPhoto="ShiftPhoto",t.ShiftSignature="ShiftSignature"}(e.ShiftNoteType||(e.ShiftNoteType={})),function(t){t[t.unknown=-1]="unknown",t[t.start_shift=0]="start_shift",t[t.end_shift=1]="end_shift"}(e.ShiftRule||(e.ShiftRule={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.NumberType=void 0,function(t){t[t.Regular=0]="Regular",t[t.AlphanumericSender=1]="AlphanumericSender",t[t.FreeSms=2]="FreeSms",t[t.TollFree=3]="TollFree"}(e.NumberType||(e.NumberType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.Association=e.InventoryServiceType=e.DeliveryMethod=e.RogueReasons=e.PreparationStatus=e.PaymentMethods=e.PickupDropoffOption=e.StatusChangedType=e.TaskAutomaticallyCancelled=e.TaskSubType=e.TaskTypeId=e.ScanningRole=e.InventoryChangeType=e.TaskStatus=e.AddressType=e.TaskHistoryOrigin=e.TaskHistoryEvent=e.NoteType=void 0,function(t){t.FormattedTaskNote="FormattedTaskNote",t.Form="Form",t.TaskNote="TaskNote",t.TaskPhoto="TaskPhoto",t.TipSignature="TipSignature",t.HtmlTaskNote="HtmlTaskNote",t.Signature="Signature",t.Document="Document"}(e.NoteType||(e.NoteType={})),function(t){t[t.status_changed=0]="status_changed",t[t.application_event=1]="application_event",t[t.postpone_notification_event=2]="postpone_notification_event",t[t.late_notification_event=3]="late_notification_event",t[t.reassigned=4]="reassigned",t[t.shared_location_sent=5]="shared_location_sent",t[t.client_alert=6]="client_alert",t[t.estimations_updated=7]="estimations_updated",t[t.marked_as_done=8]="marked_as_done",t[t.activity_change=9]="activity_change",t[t.administrator_notification=10]="administrator_notification",t[t.user_rated=11]="user_rated",t[t.shared_location_cancelled=12]="shared_location_cancelled",t[t.customer_alert=13]="customer_alert",t[t.reject_event=14]="reject_event",t[t.dismiss_task=15]="dismiss_task",t[t.payment_event=16]="payment_event",t[t.customer_added_note=17]="customer_added_note",t[t.driver_turned_off_gps=18]="driver_turned_off_gps",t[t.driver_gps_back=19]="driver_gps_back",t[t.client_sent_tip=20]="client_sent_tip",t[t.driver_lost_gps_reception=21]="driver_lost_gps_reception",t[t.driver_found_gps_reception=22]="driver_found_gps_reception",t[t.auto_dispatch_no_drivers_found=23]="auto_dispatch_no_drivers_found",t[t.task_started_event=24]="task_started_event",t[t.task_cancelled_Event=25]="task_cancelled_Event",t[t.webhooks_event=26]="webhooks_event",t[t.checkin_out_of_geofence=27]="checkin_out_of_geofence",t[t.shared_location_sent_via_push=28]="shared_location_sent_via_push",t[t.customer_called_driver=29]="customer_called_driver",t[t.driver_called_customer=30]="driver_called_customer",t[t.customer_smsed_driver=31]="customer_smsed_driver",t[t.driver_smsed_customer=32]="driver_smsed_customer",t[t.eta_updated=33]="eta_updated",t[t.task_forward_declined=34]="task_forward_declined",t[t.task_forward_accepted=35]="task_forward_accepted",t[t.task_rescheduled=36]="task_rescheduled",t[t.distance_traveled_updated_manually=37]="distance_traveled_updated_manually",t[t.geocode=38]="geocode",t[t.task_assigned_to_team=39]="task_assigned_to_team",t[t.notnow_task=40]="notnow_task",t[t.preparation_status_changed=41]="preparation_status_changed",t[t.task_broadcasted=42]="task_broadcasted",t[t.route_optimized=43]="route_optimized",t[t.external_fleet_changed=44]="external_fleet_changed",t[t.external_delivery_changed=45]="external_delivery_changed",t[t.reschedule_virtual_task=46]="reschedule_virtual_task",t[t.task_schedule_ready_time_window_updated=47]="task_schedule_ready_time_window_updated",t[t.task_ready_to_execute_changed=48]="task_ready_to_execute_changed",t[t.way_point_sla_changed=49]="way_point_sla_changed"}(e.TaskHistoryEvent||(e.TaskHistoryEvent={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.ROUTE_OPTIMIZATION=1]="ROUTE_OPTIMIZATION",t[t.AUTO_DISPATCH=2]="AUTO_DISPATCH",t[t.BROADCAST=3]="BROADCAST",t[t.MANUAL=4]="MANUAL",t[t.REJECT=5]="REJECT",t[t.AUTO_REJECT=6]="AUTO_REJECT",t[t.USER_ACCEPTED=7]="USER_ACCEPTED",t[t.FLEET=8]="FLEET"}(e.TaskHistoryOrigin||(e.TaskHistoryOrigin={})),function(t){t[t.Commercial=1]="Commercial",t[t.Residential=2]="Residential",t[t.Educational=3]="Educational",t[t.Government=4]="Government",t[t.Medical=5]="Medical",t[t.Industrial=6]="Industrial"}(e.AddressType||(e.AddressType={})),function(t){t[t.Created=0]="Created",t[t.Assigned=1]="Assigned",t[t.OnTheWay=2]="OnTheWay",t[t.CheckedIn=3]="CheckedIn",t[t.Done=4]="Done",t[t.Late=5]="Late",t[t.Accepted=6]="Accepted",t[t.Cancelled=7]="Cancelled",t[t.Rejected=8]="Rejected",t[t.Unacknowledged=9]="Unacknowledged",t[t.Pending=10]="Pending"}(e.TaskStatus||(e.TaskStatus={})),function(t){t[t.Quantity=0]="Quantity",t[t.OriginalQuantity=1]="OriginalQuantity",t[t.RejectedQuantity=2]="RejectedQuantity"}(e.InventoryChangeType||(e.InventoryChangeType={})),function(t){t[t.DRIVER=0]="DRIVER",t[t.DISPATCHER_STAGING=1]="DISPATCHER_STAGING",t[t.DISPATCHER_COC=2]="DISPATCHER_COC"}(e.ScanningRole||(e.ScanningRole={})),function(t){t[t.PICKUP=2]="PICKUP",t[t.RETURN_TASK=3]="RETURN_TASK",t[t.DELIVERY=4]="DELIVERY",t[t.PICKUP_AND_DELIVERY=5]="PICKUP_AND_DELIVERY",t[t.CLICK_AND_COLLECT=6]="CLICK_AND_COLLECT",t[t.SERVICE=7]="SERVICE",t[t.ROAMING=8]="ROAMING"}(e.TaskTypeId||(e.TaskTypeId={})),function(t){t[t.BACK_TO_WAREHOUSE=1]="BACK_TO_WAREHOUSE"}(e.TaskSubType||(e.TaskSubType={})),function(t){t[t.MANUAL=0]="MANUAL",t[t.AUTOMATIC=1]="AUTOMATIC",t[t.FROM_APPLICATION=2]="FROM_APPLICATION",t[t.FROM_LINKED_TASK=3]="FROM_LINKED_TASK",t[t.FROM_API=4]="FROM_API",t[t.FROM_FLEET=5]="FROM_FLEET",t[t.AUTOMATIC_FROM_FLEET=6]="AUTOMATIC_FROM_FLEET",t[t.FROM_CHILD_TASK=7]="FROM_CHILD_TASK",t[t.FROM_STORE_APP=8]="FROM_STORE_APP",t[t.FROM_CUSTOMER_APP=9]="FROM_CUSTOMER_APP"}(e.TaskAutomaticallyCancelled||(e.TaskAutomaticallyCancelled={})),function(t){t[t.Manual=0]="Manual",t[t.Automatic=1]="Automatic",t[t.Suggested=2]="Suggested",t[t.AutoCorrectedByClient=4]="AutoCorrectedByClient",t[t.AutoCorrectedByServer=5]="AutoCorrectedByServer",t[t.AutomatedByActivityTrigger=6]="AutomatedByActivityTrigger",t[t.FromDashboard=7]="FromDashboard",t[t.FromApplication=8]="FromApplication",t[t.FromRunEnv=9]="FromRunEnv",t[t.AutomaticByServer=10]="AutomaticByServer",t[t.FromApi=11]="FromApi",t[t.AutomaticFromFleet=12]="AutomaticFromFleet"}(e.StatusChangedType||(e.StatusChangedType={})),function(t){t[t.PICKUP=0]="PICKUP",t[t.DROPOFF=1]="DROPOFF",t[t.BOTH=2]="BOTH"}(e.PickupDropoffOption||(e.PickupDropoffOption={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.CASH=1]="CASH",t[t.CREDIT=2]="CREDIT",t[t.CHEQUE=3]="CHEQUE",t[t.CREDIT_CARD_TERMINAL=4]="CREDIT_CARD_TERMINAL"}(e.PaymentMethods||(e.PaymentMethods={})),function(t){t[t.ACKNOWLEDGED=0]="ACKNOWLEDGED",t[t.START_PREPARATION=1]="START_PREPARATION",t[t.PREPARATION_STARTED=2]="PREPARATION_STARTED",t[t.READY_FOR_PICKUP=3]="READY_FOR_PICKUP",t[t.PICKED_UP=4]="PICKED_UP",t[t.SEND_TO_PREPARATION_FAILED=5]="SEND_TO_PREPARATION_FAILED",t[t.UNACKNOWLEDGED=6]="UNACKNOWLEDGED"}(e.PreparationStatus||(e.PreparationStatus={})),function(t){t[t.TIME_WINDOW=0]="TIME_WINDOW",t[t.CAPACITY=1]="CAPACITY"}(e.RogueReasons||(e.RogueReasons={})),function(t){t.Contactless="contactless",t.StreetLevel="street_level",t.AtRoom="at_room",t.ThirdPartyPoint="third_party_point"}(e.DeliveryMethod||(e.DeliveryMethod={})),function(t){t.Installation="installation",t.Recycle="recycle",t.Fragile="fragile",t.Heavy_weight="heavy_weight",t.Flammable="flammable"}(e.InventoryServiceType||(e.InventoryServiceType={})),function(t){t.WayPoint="way_point",t.TaskInventory="task_inventory",t.Form="form",t.TaskNote="task_note",t.TaskPhoto="task_photo",t.Signature="signature"}(e.Association||(e.Association={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.AutoScheduleType=e.ReadyToLeaveBy=void 0,function(t){t[t.AfterCreated=0]="AfterCreated",t[t.AfterPrepared=1]="AfterPrepared",t[t.BeforeScheduled=2]="BeforeScheduled"}(e.ReadyToLeaveBy||(e.ReadyToLeaveBy={})),function(t){t[t.NextWindow=1]="NextWindow",t[t.Quote=2]="Quote"}(e.AutoScheduleType||(e.AutoScheduleType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.TaskServiceType=void 0,function(t){t.VALIDATE="validate"}(e.TaskServiceType||(e.TaskServiceType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.ClusterModeType=void 0,function(t){t[t.Location=1]="Location",t[t.InventoryPickup=2]="InventoryPickup",t[t.InventoryDropoff=3]="InventoryDropoff",t[t.InventoryPickupDropoff=4]="InventoryPickupDropoff"}(e.ClusterModeType||(e.ClusterModeType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.UserStatus=e.MobileTypes=e.ActivityTypes=void 0,function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.STATIONARY=1]="STATIONARY",t[t.WALKING=2]="WALKING",t[t.RUNNING=3]="RUNNING",t[t.BICYCLE=4]="BICYCLE",t[t.DRIVING=5]="DRIVING",t[t.PUBLIC_TRANSPORT=6]="PUBLIC_TRANSPORT"}(e.ActivityTypes||(e.ActivityTypes={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.ANDROID=1]="ANDROID",t[t.IOS=2]="IOS",t[t.WINDOWS=3]="WINDOWS"}(e.MobileTypes||(e.MobileTypes={})),function(t){t.FREE="Free",t.ASSIGNED="Assigned",t.ON_THE_WAY="Started",t.CHECKED_IN="Checked-In",t.LATE="Late",t.ACCEPTED="Accepted",t.ON_BREAK="On-Break"}(e.UserStatus||(e.UserStatus={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.Plan=void 0,function(t){t[t.Simple=0]="Simple",t[t.Advanced=1]="Advanced",t[t.Full=2]="Full"}(e.Plan||(e.Plan={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.customerExtractor=void 0;var i=n(324);e.customerExtractor=function(t){return t.customer};var s=function(){function t(t){this.customerEntity=new i.default(t)}return t.prototype.get=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.customerEntity.service.get(t)]}))}))},t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.customerEntity.service.getAll()]}))}))},t.prototype.getBatch=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.customerEntity.getBatch(t)]}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.customerEntity.create(t,e.customerExtractor,e.customerExtractor)];case 1:return[2,n.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=n(5),c=function(t){function e(e){return t.call(this,{session:e,entityName:"customers",routes:[a.BaseRoutes.Create,a.BaseRoutes.GetAll,a.BaseRoutes.Get]})||this}return o(e,t),e.prototype.getBatch=function(t){return void 0===t&&(t=[]),i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.get("/customers/batch/").withQueryString({ids:t.join(",")}).withExtractor((function(t){return t.items})).invoke()]}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(326),s=function(){function t(t){this.dashboardService=new i.default(t)}return t.prototype.getDashboard=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.dashboardService.getDashboard(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getWidgetsStructure=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.dashboardService.getWidgetsStructure()];case 1:return[2,t.sent()]}}))}))},t.prototype.getWidgetData=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.dashboardService.getWidgetData(t,e)];case 1:return[2,n.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.WidgetGetResponseExtractor=e.DashboardGetResponseExtractor=e.Routes=void 0;var u=n(11),a=n(24),c=n(15),l=n(19),f=n(134);e.Routes={GET_DASHBOARDS_FOR_ALL_TEAMS:new l.Route("/dashboard",0),GET_DASHBOARDS_FOR_TEAM:new l.Route("/dashboard/team/{:teamId}",0),GET_ALL_WIDGETS_STRUCTURE:new l.Route("/dashboard/widgets",0),GET_WIDGET_DATA:new l.Route("/dashboard/widgets/{:widgetId}",0)};var p=function(t){function n(e){return t.call(this,e.config.getApiEndpoint(),e)||this}return o(n,t),n.prototype.getDashboard=function(t){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,this.handleAuthorizedRequest(u.isNumber(t)?e.Routes.GET_DASHBOARDS_FOR_TEAM:e.Routes.GET_DASHBOARDS_FOR_ALL_TEAMS,e.DashboardGetResponseExtractor,c.BringgException.serviceException("Failed to get widgets"),void 0,{teamId:t})];case 1:return n=r.sent(),this.sendDataEvent(f.DASHBOARD_EVENTS.DASHBOARDS_DATA_UPDATED,{selectedTeam:t,widgets:n}),[2,n]}}))}))},n.prototype.getWidgetsStructure=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_ALL_WIDGETS_STRUCTURE,e.DashboardGetResponseExtractor,c.BringgException.serviceException("Failed to get widgets structure"))];case 1:return[2,t.sent()]}}))}))},n.prototype.getWidgetData=function(t,n){return i(this,void 0,void 0,(function(){var r;return s(this,(function(o){switch(o.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_WIDGET_DATA,e.WidgetGetResponseExtractor,c.BringgException.serviceException("Failed to get widget data"),void 0,{widgetId:t},n?{team_id:n}:void 0)];case 1:return r=o.sent(),this.sendDataEvent(f.DASHBOARD_EVENTS.WIDGET_DATA_FETCHED,{widgetId:t,selectedTeam:n,widgetData:r}),[2,r]}}))}))},n}(a.SessionBasedService);e.default=p;e.DashboardGetResponseExtractor=function(t){return t.widgets};e.WidgetGetResponseExtractor=function(t){return t.widget}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(328),s=function(){function t(t){this.reasonToChangeInventoryService=new i.ReasonToChangeInventoryService(t)}return t.prototype.getAll=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.reasonToChangeInventoryService.getAll(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonToChangeInventoryService=e.Routes=void 0;var u=n(24),a=n(15),c=n(135),l=n(19);e.Routes={GET:new l.Route("/reason_to_change_inventories",0)};var f=function(t){function n(e){return t.call(this,e.config.getApiEndpoint(),e)||this}return o(n,t),n.prototype.getAll=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET,c.reasonToChangeInventoryExtractor,a.BringgException.serviceException("Failed to get reason to change inventory"),void 0,void 0,{tag_id:t})];case 1:return[2,n.sent()]}}))}))},n}(u.SessionBasedService);e.ReasonToChangeInventoryService=f},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(330),s=function(){function t(t){this.taskInventoryService=new i.TaskInventoryService(t)}return t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.taskInventoryService.update(t,e)]}))}))},t.prototype.massQuantityUpdate=function(t,e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.taskInventoryService.massQuantityUpdate(t,e,n)];case 1:return[2,r.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.TaskInventoryService=e.Routes=void 0;var u=n(24),a=n(15),c=n(136),l=n(19);e.Routes={GET:new l.Route("/task_inventories/mass_quantity_update",1),UPDATE:new l.Route("/task_inventories/{:id}",2)};var f=function(t){function n(e){return t.call(this,e.config.getApiEndpoint(),e)||this}return o(n,t),n.prototype.update=function(t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,this.handleAuthorizedRequest(e.Routes.UPDATE,c.taskInventoryExtractor,a.BringgException.serviceException("Failed to update task inventory"),n,{id:t})]}))}))},n.prototype.massQuantityUpdate=function(t,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){switch(o.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET,c.taskInventoryMassQuantityExtractor,a.BringgException.serviceException("Failed to update task inventories"),{reason_to_change_inventory_id:n,reason_to_change_inventory_text:r,task_inventories:t},void 0)];case 1:return[2,o.sent()]}}))}))},n}(u.SessionBasedService);e.TaskInventoryService=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(332),o=n(333),i=function(){function t(t){this.chatConversationEntity=new r.default(t),this.chatMessage=new o.default(t),this.onListUpdate=this.chatConversationEntity.store.onListUpdate,this.onItemUpdate=this.chatConversationEntity.store.onItemUpdate,this.onItemRemoved=this.chatConversationEntity.store.onItemRemoved,this.onItemCreated=this.chatConversationEntity.store.onItemCreated}return t.prototype.getConversation=function(t){return this.chatConversationEntity.getConversation(t)},t.prototype.getConversations=function(t,e){return void 0===t&&(t=1),void 0===e&&(e={}),this.chatConversationEntity.getConversations(t,e)},t.prototype.createConversation=function(t){return this.chatConversationEntity.createConversation(t)},t.prototype.updateLastRead=function(t,e){return this.chatConversationEntity.updateLastRead(t,e)},t.prototype.fetchMessages=function(t){return this.chatMessage.fetchMessages(t)},t.prototype.getChatMessages=function(t){return this.chatMessage.getChatMessages(t)},t.prototype.createMessages=function(t){return this.chatMessage.createMessages(t)},t}();e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(137),a=n(9),c=n(5),l=n(11),f="/chat_conversations/{:id}/update_last_read",p=function(t){function e(e){var n=t.call(this,{session:e,entityName:"chat_conversations",routes:[c.BaseRoutes.Create,c.BaseRoutes.Get,c.BaseRoutes.GetAll]})||this;return n._itemIdsByPage={},n.realTime.on("conversation removed",(function(t){return n.store.removeFromStore(t.conversation_id)})),n.realTime.on("conversation created",(function(t){return n.store.addToStore(t.conversation||t)})),n.realTime.on("conversation update",(function(t){return n.store.updateInStore(chatConversationCreated.conversation||chatConversationCreated)})),n}return o(e,t),e.prototype.updateLastRead=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(f).withRouteParams({id:t}).withPayload({server_timestamp:e}).setException("Failed to update conversation last read").invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getConversations=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){return e=l.extend(e,{page:t}),[2,this.isPageFetched(e.page)?this._getPage(e.page):this._fetchConversations(e)]}))}))},e.prototype.getConversation=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.getOrFetch(t,u.singleExtractor,u.singleExtractor)];case 1:return[2,e.sent()]}}))}))},e.prototype.createConversation=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.create(t,u.singleExtractor)];case 1:return[2,e.sent().conversation]}}))}))},e.prototype._getPage=function(t){var e=this._itemIdsByPage[t];if(e)return{conversations:e.itemsIds.map(this.store.getItem),has_next_page:e.hasNextPage,success:!0,rc:0}},e.prototype._addPage=function(t,e,n){var r=this;t.forEach((function(t){return r.store.addToStore(t)})),this._itemIdsByPage[e]={hasNextPage:n,itemsIds:t.map((function(t){return t.id}))}},e.prototype.isPageFetched=function(t){return Boolean(this._itemIdsByPage[t])},e.prototype._fetchConversations=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.service.getAll(t)];case 1:return e=n.sent(),this._addPage(e.conversations,t.page,e.has_next_page),[2,e]}}))}))},e}(a.default);e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(334),o=function(){function t(t){this.chatMessageEntity=new r.default(t),this.onItemCreated=this.chatMessageEntity.store.onItemCreated,this.onListUpdate=this.chatMessageEntity.onChatMessagesUpdate}return t.prototype.fetchMessages=function(t){return this.chatMessageEntity.fetchMessages(t)},t.prototype.getChatMessages=function(t){return this.chatMessageEntity.getChatMessages(t)},t.prototype.createMessages=function(t){return this.chatMessageEntity.createMessages(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},u=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(e,"__esModule",{value:!0});var a=n(138),c=n(65),l=n(75),f=n(11),p=n(9),h=n(5),d=function(t){function e(e){var n=t.call(this,{session:e,entityName:"chat_messages",routes:[h.BaseRoutes.Create,h.BaseRoutes.GetAll]})||this;return n.mapByChatConversations=new Map,n.onChatMessagesUpdateEvent=f.noop,n.onChatMessagesUpdate=function(t){n.onChatMessagesUpdateEvent=t},n.store.state$.subscribe((function(t){l.from(Array.from(t.values())).pipe(c.groupBy((function(t){return t.chat_conversation_id}),(function(t){return t})),c.mergeMap((function(t){return l.zip(l.of(t.key),t.pipe(c.toArray()))}))).subscribe((function(t){var e=u(t,2),r=e[0],o=e[1];n.mapByChatConversations.set(r,f.sortBy(o,(function(t){return new Date(t.server_timestamp)}))),n.onChatMessagesUpdateEvent(n.mapByChatConversations)}))})),n.realTime.on("conversation message created",(function(t){return n.store.addToStore(t.message)})),n}return o(e,t),e.prototype.getChatMessages=function(t){return this.mapByChatConversations.get(t)||[]},e.prototype.fetchMessages=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.fetchAllAndStore({chat_conversation_id:t.id,before:t.before,after:t.after,page:t.page,items:t.items},a.multipleExtractor)]}))}))},e.prototype.createMessages=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.bulkCreate({messages:t},a.multipleExtractor)]}))}))},e}(p.default);e.default=d},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(336),s=function(){function t(t,e){this.crewStore=new i.default(t),this.usersStore=e,this.onListUpdate=this.crewStore.onListUpdate,this.onItemUpdate=this.crewStore.onItemUpdate,this.onItemRemoved=this.crewStore.onItemRemoved,this.onItemCreated=this.crewStore.onItemCreated}return t.prototype.getTeamAvalibleDrivers=function(t){return r(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return e=this.crewStore.driverCurrentlyAssigned.get(t)||[],[4,this.usersStore.getDriversByTeam(t)];case 1:return n=r.sent(),[2,n.filter((function(t){return!e.includes(t.id)}))]}}))}))},t.prototype.getAllByTeam=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.crewStore.getAllByTeam(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.get=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.crewStore.getById(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.crewStore.create(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.crewStore.update(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.crewStore.delete(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getCrewPlannedRoute=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.crewStore.getCrewPlannedRoute(t)];case 1:return e.sent(),[2]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},a=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},c=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0});var l=n(48),f=n(337),p=n(75),h=n(65),d=n(11),y=function(t){function e(e){var n=t.call(this)||this;return n.driverCurrentlyAssigned=new Map,n.crewsByTeam=new Map,n.state$.subscribe((function(t){var e=n.getItems(),r=[];e.forEach((function(t){var e=t.drivers.map((function(e){return i(i({},e),{team_ids:[t.team_id]})})),n=i(i({},t.primary_driver),{team_ids:[t.team_id]});r.push.apply(r,c(c([],a(e)),[n]))})),p.from(r).pipe(h.groupBy((function(t){return d.first(t.team_ids)}),(function(t){return t})),h.mergeMap((function(t){return p.zip(p.of(t.key),t.pipe(h.toArray()))}))).subscribe((function(t){var e=a(t,2),r=e[0],o=e[1];n.driverCurrentlyAssigned.set(r,o.map((function(t){return t.id})))}))})),n.state$.subscribe((function(t){p.from(n.getItems()).pipe(h.groupBy((function(t){return t.team_id}),(function(t){return t})),h.mergeMap((function(t){return p.zip(p.of(t.key),t.pipe(h.toArray()))}))).subscribe((function(t){var e=a(t,2),r=e[0],o=e[1];n.crewsByTeam.set(r,o)}))})),n.crewService=new f.default(e,n),n}return o(e,t),e.prototype.getCrewPlannedRoute=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.getById(t)];case 1:return e.sent(),[2,this.getItem(t).planned_route]}}))}))},e.prototype.getAllByTeam=function(t){return s(this,void 0,void 0,(function(){var e,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.crewService.getAllByTeam(t)];case 1:return e=r.sent(),this.crewsByTeam.get(t)?e.forEach((function(t){return n.updateInStore(t)})):e.forEach((function(t){return n.addToStore(t)})),[2,e]}}))}))},e.prototype.getById=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return(e=this.getItem(t))?[3,2]:[4,this._fetch(t)];case 1:e=n.sent(),n.label=2;case 2:return[2,e]}}))}))},e.prototype.create=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.crewService.create(t)];case 1:return e=n.sent(),this.addToStore(e),[2,e]}}))}))},e.prototype.update=function(t,e){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:return[4,this.crewService.update(t,e)];case 1:return n=r.sent(),this.updateInStore(n),[2,n]}}))}))},e.prototype.delete=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.crewService.delete(t)];case 1:return e.sent(),this.removeFromStore(t),[2]}}))}))},e.prototype._fetch=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.crewService.get(t)];case 1:return e=n.sent(),this.addToStore(e),[2,e]}}))}))},e}(l.default);e.default=y},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.deleteResponseExtractor=e.crewExtractor=e.defaultExtractor=e.Routes=void 0;var u=n(15),a=n(19),c=n(24);e.Routes={GET_CREW:new a.Route("/crews/{:id}",0),GET_BY_TEAM:new a.Route("/teams/{:teamId}/crews",0),CREATE_CREW:new a.Route("/crews/",1),UPDATE_CREW:new a.Route("/crews/{:id}",2),DELETE_CREW:new a.Route("/crews/{:id}",4)};e.defaultExtractor=function(t){return t.crews};e.crewExtractor=function(t){return t.crew};e.deleteResponseExtractor=function(t){return t.success};var l=function(t){function n(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.store=n,r}return o(n,t),n.prototype.getAllByTeam=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_BY_TEAM,e.defaultExtractor,u.BringgException.serviceException("Failed to get Crews"),void 0,{teamId:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.get=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_CREW,e.crewExtractor,u.BringgException.serviceException("Failed to get Crew"),void 0,{id:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.create=function(t){return i(this,void 0,void 0,(function(){var n,r,o,i;return s(this,(function(s){switch(s.label){case 0:return n=t.primary_driver_id,r=t.driver_ids,o=t.planned_route_id,i=t.team_id,[4,this.handleAuthorizedRequest(e.Routes.CREATE_CREW,e.crewExtractor,u.BringgException.serviceException("Failed to create Crew"),{primary_driver_id:n,driver_ids:r,planned_route_id:o,team_id:i})];case 1:return[2,s.sent()]}}))}))},n.prototype.update=function(t,n){return i(this,void 0,void 0,(function(){var r,o,i;return s(this,(function(s){switch(s.label){case 0:return r=n.primary_driver_id,o=n.driver_ids,i=n.planned_route_id,[4,this.handleAuthorizedRequest(e.Routes.UPDATE_CREW,e.crewExtractor,u.BringgException.serviceException("Failed to update Crew"),{primary_driver_id:r,driver_ids:o,planned_route_id:i},{id:t})];case 1:return[2,s.sent()]}}))}))},n.prototype.delete=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.DELETE_CREW,e.deleteResponseExtractor,u.BringgException.serviceException("Failed to delete Crew"),void 0,{id:t})];case 1:return[2,n.sent()]}}))}))},n}(c.SessionBasedService);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(339),o=function(){function t(t){this.plannedRoutesEntity=new r.default(t)}return t.prototype.getAllByTeam=function(t){return this.plannedRoutesEntity.getAllByTeam(t)},t.prototype.getAll=function(){return this.plannedRoutesEntity.getAll()},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.extractor=void 0;var i=n(5),s=n(9);e.extractor=function(t){return t.planned_routes};var u="/teams/{:teamId}/planned_routes",a=function(t){function n(e){return t.call(this,{session:e,entityName:"planned_routes",routes:[i.BaseRoutes.GetAll]})||this}return o(n,t),n.prototype.getAll=function(){return this.getAllOrFetch(null,e.extractor,e.extractor)},n.prototype.getAllByTeam=function(t){return this.service.routeGenerator.get(u).withExtractor(e.extractor).setException("Could not fetch planned routes of the team #"+t).withRouteParams({teamId:t}).invoke()},n}(s.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Language=void 0;var r=n(341),o=function(){function t(t){this.languageStore=new r.default(t)}return t.prototype.getAll=function(){return this.languageStore.getAll()},t}();e.Language=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(48),a=n(342),c=function(t){function e(e){var n=t.call(this)||this;return n.isFetched=!1,n.languageService=new a.default(e,n),n}return o(e,t),e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.isFetched?this.getItems():this._fetchAll()]}))}))},e.prototype._fetchAll=function(){return i(this,void 0,void 0,(function(){var t,e=this;return s(this,(function(n){switch(n.label){case 0:return[4,this.languageService.getAll()];case 1:return t=n.sent(),this.isFetched=!0,t.languages.forEach((function(t){return e.addToStore(t)})),[2,t.languages]}}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(15),a=n(19),c=n(139),l=n(24);e.Routes={GET_ALL:new a.Route("/languages",0)};var f=function(t){function n(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.store=n,r}return o(n,t),n.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_ALL,c.defaultExtractor,u.BringgException.serviceException("Failed to get Language"))];case 1:return[2,t.sent()]}}))}))},n}(l.SessionBasedService);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationType=void 0;var r=n(344),o=function(){function t(t){this.notificationTypeStore=new r.default(t)}return t.prototype.getAll=function(){return this.notificationTypeStore.getAll()},t}();e.NotificationType=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(48),a=n(345),c=function(t){function e(e){var n=t.call(this)||this;return n.notificationTypeService=new a.default(e,n),n}return o(e,t),e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.notificationTypeService.getAll()];case 1:return[2,t.sent().notification_types]}}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(15),a=n(19),c=n(140),l=n(24);e.Routes={GET_ALL:new a.Route("/notification_types",0)};var f=function(t){function n(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.store=n,r}return o(n,t),n.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_ALL,c.defaultExtractor,u.BringgException.serviceException("Failed to get NotificationType"))];case 1:return[2,t.sent()]}}))}))},n}(l.SessionBasedService);e.default=f},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(347),u=n(15),a=n(47),c=n(11),l=n(102),f=n(103),p=function(){function t(t){this.usersStore=new s.default(t),this.onListUpdate=this.usersStore.onListUpdate,this.onUpdate=this.usersStore.onItemUpdate,this.onDelete=this.usersStore.onItemRemoved,this.onCreate=this.usersStore.onItemCreated,this.unsubscribe=this.usersStore.unsubscribe}return t.prototype.create=function(t){if(c.isNil(t.email)&&c.isNil(t.phone))throw new u.BringgException(a.ExceptionReason.INVALID_ARGUMENTS,"Phone or Email is required");return this.usersStore.create(t)},t.prototype.getAllAdminsAndDispatchers=function(t){var e=t.limit,n=void 0===e?25:e,r=t.page_action,o=void 0===r?f.KeysetPaginationPageAction.NEXT:r,i=t.cursor;return this.usersStore.getAllAdminsAndDispatchers({limit:n,page_action:o,cursor:i})},t.prototype.getAllDrivers=function(t){var e=t.limit,n=void 0===e?25:e,r=t.page_action,o=void 0===r?f.KeysetPaginationPageAction.NEXT:r,i=t.cursor,s=t.options,u=c.defaults(s,{onlyOnlineDriver:!1,onlyCustomers:!1});return this.usersStore.getAllDrivers({limit:n,page_action:o,cursor:i,options:u})},t.prototype.byUserType=function(t){return this.usersStore.byUserType(t)},t.prototype.makeAdmin=function(t){return this.usersStore.makeAdmin(t)},t.prototype.totalEmployeesCount=function(){return this.usersStore.totalEmployeesCount()},t.prototype.totalDriversCount=function(){return this.usersStore.totalDriversCount()},t.prototype.getAdmin=function(t){return this.usersStore.get(t)},t.prototype.getDriver=function(t){return this.usersStore.get(t)},t.prototype.getDispatcher=function(t){return this.usersStore.get(t)},t.prototype.getDriversByTeam=function(t){return this.usersStore.getDriversByTeam(t)},t.prototype.getAll=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=50),o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.usersStore.getAll(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getAllKeysetPagination=function(t){var e=t.limit,n=void 0===e?2500:e,r=t.page_action,o=void 0===r?f.KeysetPaginationPageAction.NEXT:r,i=t.cursor;return this.usersStore.getAllKeysetPagination({limit:n,page_action:o,cursor:i})},t.prototype.get=function(t){return this.usersStore.get(t)},t.prototype.invite=function(t){return this.usersStore.invite(t)},t.prototype.unlock=function(t){return this.usersStore.unlock(t)},t.prototype.assignedTasksCount=function(t){return this.usersStore.assignedTasksCount(t)},t.prototype.inviteByEmail=function(t){return this.usersStore.inviteByEmail(t)},t.prototype.validatePhone=function(t){return this.usersStore.validatePhone(t)},t.prototype.closedTasks=function(t,e){return this.usersStore.closedTasks(t,e)},t.prototype.update=function(t,e){var n=this;return this.usersStore.update(t,e).then((function(t){return n.updateCurrentUserIfNeeded(t)}))},t.prototype.updateCurrentUserIfNeeded=function(t){var e=this.usersStore.usersService.session.user;return e.id===t.id&&(this.usersStore.usersService.session.user=c.merge(e,t),this.usersStore.usersService.session.sendDataEvent(l.UserEvents.CURRENT_USER_UPDATED,this.usersStore.usersService.session.user)),t},t.prototype.delete=function(t){return this.usersStore.delete(t)},t.prototype.getProfileImage=function(t){return this.usersStore.getProfileImage(t)},t.prototype.subscribeToGroupUpdates=function(t){this.usersStore.subscribeToGroupUpdates(t)},t.prototype.getOfflineDrivers=function(){return this.usersStore.getOfflineDrivers()},t.prototype.getOnlineDrivers=function(){return this.usersStore.getOnlineDrivers()},t.prototype.getAllLocalDrivers=function(){return this.usersStore.getAllLocalDrivers()},t.prototype.getOnShiftDrivers=function(){return this.usersStore.getOnShiftDrivers()},t.prototype.getAdmins=function(){return this.usersStore.getAdmins()},t.prototype.getDispatchers=function(){return this.usersStore.getDispatchers()},t.prototype.messageDriver=function(t,e){return this.usersStore.messageDriver(t,e)},r([u.logOnException],t.prototype,"create",null),r([u.logOnException],t.prototype,"getAllAdminsAndDispatchers",null),r([u.logOnException],t.prototype,"getAllDrivers",null),r([u.logOnException],t.prototype,"byUserType",null),r([u.logOnException],t.prototype,"makeAdmin",null),r([u.logOnException],t.prototype,"totalEmployeesCount",null),r([u.logOnException],t.prototype,"totalDriversCount",null),r([u.logOnException],t.prototype,"getAdmin",null),r([u.logOnException],t.prototype,"getDriver",null),r([u.logOnException],t.prototype,"getDispatcher",null),r([u.logOnException],t.prototype,"getDriversByTeam",null),r([u.logOnException],t.prototype,"getAll",null),r([u.logOnException],t.prototype,"getAllKeysetPagination",null),r([u.logOnException],t.prototype,"get",null),r([u.logOnException],t.prototype,"invite",null),r([u.logOnException],t.prototype,"unlock",null),r([u.logOnException],t.prototype,"assignedTasksCount",null),r([u.logOnException],t.prototype,"inviteByEmail",null),r([u.logOnException],t.prototype,"validatePhone",null),r([u.logOnException],t.prototype,"closedTasks",null),r([u.logOnException],t.prototype,"update",null),r([u.logOnException],t.prototype,"delete",null),r([u.logOnException],t.prototype,"getProfileImage",null),r([u.logOnException],t.prototype,"subscribeToGroupUpdates",null),r([u.logOnException],t.prototype,"getOfflineDrivers",null),r([u.logOnException],t.prototype,"getOnlineDrivers",null),r([u.logOnException],t.prototype,"getAllLocalDrivers",null),r([u.logOnException],t.prototype,"getOnShiftDrivers",null),r([u.logOnException],t.prototype,"getAdmins",null),r([u.logOnException],t.prototype,"getDispatchers",null),r([u.logOnException],t.prototype,"messageDriver",null),t}();e.default=p},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},u=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},c=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0});var l=n(64),f=n(48),p=n(348),h=n(102),d=n(65),y=n(75),v=n(11),_=function(t){function e(e,n){var r,o,i=t.call(this)||this;i.groupUpdateEvents=[],i.groupedValues=new Map,i.drivers=[],i.fetchedStatus={drivers:!1,customers:!1,adminsAndDispatchers:!1},i.usersService=new p.default(e,i),i.onlineDriversCounterByTeam=new Map;try{for(var s=u(Object.keys(h.GROUP_VALUES)),a=s.next();!a.done;a=s.next()){var c=a.value;i.groupedValues.set(h.GROUP_VALUES[c],new Set)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return n=n||500,i.onItemRemoved((function(t,e){var n,r;if((null==e?void 0:e.status)===l.Connection.Online)try{for(var o=u(e.team_ids),s=o.next();!s.done;s=o.next()){var a=s.value;i.onlineDriversCounterByTeam.set(a,Math.max(i.onlineDriversCounterByTeam.get(a)-1,0))}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}})),i.state$.pipe(d.throttleTime(n,y.asyncScheduler,{trailing:!0,leading:!1})).subscribe((function(t){i.initGroups(t.values()),i.emitGroupEvents()})),i}return o(e,t),e.prototype.initGroups=function(t,e){var n,r,o,i,s,a,c,f;void 0===e&&(e=Object.keys(h.GROUP_VALUES));var p={};try{for(var d=u(e),y=d.next();!y.done;y=d.next()){p[O=y.value]=new Set}}catch(t){n={error:t}}finally{try{y&&!y.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}this.drivers.length=0,this.onlineDriversCounterByTeam=new Map;try{for(var v=u(t),_=v.next();!_.done;_=v.next()){var b=_.value;if(b.driver)if(this.drivers.push(b),b.status===l.Connection.Online)try{for(var g=(s=void 0,u(b.team_ids)),E=g.next();!E.done;E=g.next()){var w=E.value;this.onlineDriversCounterByTeam.set(w,this.onlineDriversCounterByTeam.has(w)?this.onlineDriversCounterByTeam.get(w)+1:1)}}catch(t){s={error:t}}finally{try{E&&!E.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}p[O=h.userToGroupMapper(b)]&&p[O].add(b)}}catch(t){o={error:t}}finally{try{_&&!_.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var T=u(e),m=T.next();!m.done;m=T.next()){var O=m.value;this.groupedValues.set(h.GROUP_VALUES[O],p[O]||new Set)}}catch(t){c={error:t}}finally{try{m&&!m.done&&(f=T.return)&&f.call(T)}finally{if(c)throw c.error}}},e.prototype.create=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.create(t)];case 1:return e=n.sent(),this.addToStore(e),[2,e]}}))}))},e.prototype.getDriversByTeam=function(t){return i(this,void 0,void 0,(function(){var e,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.usersService.getDriversByTeam(t)];case 1:return(e=r.sent()).forEach((function(t){return n.addToStore(t)})),[2,e]}}))}))},e.prototype.getAll=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=50),i(this,void 0,void 0,(function(){var n,r=this;return s(this,(function(o){switch(o.label){case 0:return[4,this.usersService.getAll(t,e)];case 1:return n=o.sent(),v.forEach(n.users,(function(t){return r.getItem(t.id)?r.updateInStore(t):r.addToStore(t)})),[2,n]}}))}))},e.prototype.getAllKeysetPagination=function(t){return i(this,void 0,void 0,(function(){var e,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.usersService.getAllKeysetPagination(t)];case 1:return e=r.sent(),this.initGroups(e.users),v.forEach(e.users,(function(t){return n.getItem(t.id)?n.updateInStore(t):n.addToStore(t)})),[2,e]}}))}))},e.prototype.invite=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.invite(t)];case 1:return e=n.sent(),this.updateInStore(e),[2,e]}}))}))},e.prototype.inviteByEmail=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.inviteByEmail(t)];case 1:return e=n.sent(),this.updateInStore(e),[2,e]}}))}))},e.prototype.getAllAdminsAndDispatchers=function(t){return i(this,void 0,void 0,(function(){var e=this;return s(this,(function(n){return[2,this.getOrFetchUsers(t,this.fetchedStatus.adminsAndDispatchers,(function(t){return e.fetchedStatus.adminsAndDispatchers=t}),(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(t=e.usersService).getAllAdminsAndDispatchers.apply(t,c([],a(n)))}),(function(){return e.getAllLocalAdminsAndDispatchers()}))]}))}))},e.prototype.getAllDrivers=function(t){return i(this,void 0,void 0,(function(){var e,n,r,o=this;return s(this,(function(i){switch(i.label){case 0:return e=t.options,(r=null==e?void 0:e.onlyCustomers)?[4,this.getOrFetchUsers(t,this.fetchedStatus.customers,(function(t){return o.fetchedStatus.customers=t}),this.usersService.getAllDrivers,(function(){return o.getCustomers()}))]:[3,2];case 1:return n=i.sent(),[3,4];case 2:return[4,this.getOrFetchUsers(t,this.fetchedStatus.drivers,(function(t){return o.fetchedStatus.drivers=t}),(function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=o.usersService).getAllDrivers.apply(t,c([],a(e)))}),(function(){return o.getAllLocalDrivers()}))];case 3:n=i.sent(),i.label=4;case 4:return this.initGroups(n.users,r?[h.GROUP_VALUES.Customers]:[h.GROUP_VALUES.OfflineDrivers,h.GROUP_VALUES.OnlineDrivers,h.GROUP_VALUES.OnShiftDrivers]),[2,n]}}))}))},e.prototype.getOrFetchUsers=function(t,e,n,r,o){return i(this,void 0,void 0,(function(){var i,u=this;return s(this,(function(s){switch(s.label){case 0:return e?[3,2]:[4,r(t)];case 1:return(i=s.sent()).users.forEach((function(t){return u.addToStore(t)})),i.next_page_cursor||i.previous_page_cursor||n(!0),[2,i];case 2:return[2,{next_page_cursor:null,previous_page_cursor:null,users:o()}]}}))}))},e.prototype.byUserType=function(t){return i(this,void 0,void 0,(function(){var e,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.usersService.byUserType(t)];case 1:return(e=r.sent()).forEach((function(t){return n.addToStore(t)})),[2,e]}}))}))},e.prototype.makeAdmin=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.makeAdmin(t)];case 1:return e=n.sent(),this.updateInStore(e),[2,e]}}))}))},e.prototype.update=function(t,e){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,this.usersService.update(t,e)];case 1:return n=r.sent(),this.updateInStore(n),[2,n]}}))}))},e.prototype.delete=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.delete(t)];case 1:return(e=n.sent())&&this.removeFromStore(t),[2,e]}}))}))},e.prototype.get=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return(e=this.getItem(t))?[3,2]:[4,this.usersService.get(t)];case 1:e=n.sent(),n.label=2;case 2:return[2,e]}}))}))},e.prototype.unlock=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.usersService.unlock(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.assignedTasksCount=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.usersService.assignedTasksCount(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.totalEmployeesCount=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.usersService.totalEmployeesCount()];case 1:return[2,t.sent()]}}))}))},e.prototype.totalDriversCount=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.usersService.totalDriversCount()];case 1:return[2,t.sent()]}}))}))},e.prototype.getProfileImage=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.usersService.getProfileImage(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.validatePhone=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.usersService.validatePhone(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.closedTasks=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.closedTasks(t,e)];case 1:return[2,n.sent()]}}))}))},e.prototype.messageDriver=function(t,e){return this.usersService.messageDriver(t,e)},e.prototype.subscribeToGroupUpdates=function(t){this.groupUpdateEvents.push(t)},e.prototype.getOfflineDrivers=function(){return this.groupedValues.get(h.GROUP_VALUES.OfflineDrivers)||new Set},e.prototype.getOnlineDrivers=function(){return this.groupedValues.get(h.GROUP_VALUES.OnlineDrivers)||new Set},e.prototype.getOnShiftDrivers=function(){return Array.from(this.groupedValues.get(h.GROUP_VALUES.OnShiftDrivers)||[])},e.prototype.getCustomers=function(){return Array.from(this.groupedValues.get(h.GROUP_VALUES.Customers)||[])},e.prototype.getAdmins=function(){return Array.from(this.groupedValues.get(h.GROUP_VALUES.Admins)||[])},e.prototype.getDispatchers=function(){return Array.from(this.groupedValues.get(h.GROUP_VALUES.Dispatchers)||[])},e.prototype.emitGroupEvents=function(){var t=this;this.groupUpdateEvents.forEach((function(e){return e(t.groupedValues)}))},e.prototype.getAllLocalDrivers=function(){return this.drivers},e.prototype.getOnlineDriversCountByTeam=function(t){return this.onlineDriversCounterByTeam.get(t)||0},e.prototype.getAllLocalAdminsAndDispatchers=function(){return this.getAdmins().concat(this.getDispatchers())},e}(f.default);e.default=_},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(349),c=n(15),l=n(19),f=n(102),p=n(63),h=n(103),d=n(11),y={GET:new l.Route("/users/{:userId}",0),GET_ALL:new l.Route("/users/",0),GET_ALL_DRIVERS:new l.Route("/users/drivers",0),GET_USERS_WITH_USER_TYPE:new l.Route("/user_types/{:userTypeId}/users",0),GET_DRIVERS_BY_TEAM:new l.Route("/teams/{:teamId}/users",0),MAKE_ADMIN:new l.Route("/users/{:userId}/admin",1),CREATE_USER:new l.Route("/users/",1),INVITE:new l.Route("/users/{:userId}/reinvite",1),TOTAL_TASKS:new l.Route("/users/{:userId}/tasks/count",0),TOTAL_EMPLOYEES:new l.Route("/users/count",0),TOTAL_DRIVERS:new l.Route("/users/drivers/count",0),UNLOCK:new l.Route("/users/{:userId}/unlock",1),INVITE_VIA_EMAIL:new l.Route("/users/{:userId}/reinvite_via_email",1),VALIDATE_PHONE:new l.Route("/api/user/validate_phone",0),CLOSED_TASKS:new l.Route("/users/{:userId}/tasks/closed_tasks",0),UPDATE:new l.Route("/users/{:id}",3),DELETE:new l.Route("/users/{:id}",4),GET_PROFILE_IMAGE:new l.Route("/users/{:userId}/profile_image",0),MESSAGE_DRIVER:new l.Route("/announcement/user/{:userId}",2)},v=function(t){function e(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.store=n,r}return o(e,t),e.prototype.create=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.CREATE_USER,f.userExtractor,c.BringgException.serviceException("Could not create user"),t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getDriversByTeam=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.GET_DRIVERS_BY_TEAM,f.defaultExtractor,c.BringgException.serviceException("Could not get drivers"),{},{teamId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.get=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.GET,f.defaultExtractor,c.BringgException.serviceException((function(){return"Could not get user "+t})),{},{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.getAll=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=50),s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(y.GET_ALL,(function(t){return{has_next_page:t.has_next_page,users:t.users}}),c.BringgException.serviceException("Could not get users"),void 0,void 0,{page:t,limit:e})];case 1:return[2,n.sent()]}}))}))},e.prototype.getAllKeysetPagination=function(t){return s(this,void 0,void 0,(function(){var e,n,r;return u(this,(function(o){switch(o.label){case 0:return e=t.limit,n=t.page_action,r=t.cursor,[4,this.handleAuthorizedRequest(y.GET_ALL,(function(t){return{next_page_cursor:t.next_page_cursor,previous_page_cursor:t.previous_page_cursor,users:t.users}}),c.BringgException.serviceException("Could not get users"),void 0,void 0,{pgver:h.KEYSET_PAGINATION_VER,limit:e,page_action:n,cursor:r})];case 1:return[2,o.sent()]}}))}))},e.prototype.invite=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.INVITE,f.userExtractor,c.BringgException.serviceException((function(){return"Could not invite user with id: "+t})),void 0,{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.unlock=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.UNLOCK,f.successExtractor,c.BringgException.serviceException((function(){return"Could not unlock user with id: "+t})),void 0,{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.assignedTasksCount=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.TOTAL_TASKS,f.countExtractor,c.BringgException.serviceException((function(){return"Could not get task count for user with id: "+t})),void 0,{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.totalEmployeesCount=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(y.TOTAL_EMPLOYEES,f.countExtractor,c.BringgException.serviceException((function(){return"Could not get total employee count"})),void 0,void 0)];case 1:return[2,t.sent()]}}))}))},e.prototype.totalDriversCount=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(y.TOTAL_DRIVERS,f.countExtractor,c.BringgException.serviceException((function(){return"Could not get total drivers count"})),void 0,void 0)];case 1:return[2,t.sent()]}}))}))},e.prototype.inviteByEmail=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.INVITE_VIA_EMAIL,f.userExtractor,c.BringgException.serviceException((function(){return"Could not invite user with id: "+t})),void 0,{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.validatePhone=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.VALIDATE_PHONE,(function(t){return t.phone_valid}),c.BringgException.serviceException((function(){return"Phone is not valid: "+t})),void 0,{},{phone:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.closedTasks=function(t,e){return void 0===e&&(e=0),s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(y.CLOSED_TASKS,f.defaultExtractor,c.BringgException.serviceException((function(){return"Could not get tasks for user: "+t})),void 0,{userId:t},{page:e})];case 1:return[2,n.sent()]}}))}))},e.prototype.update=function(t,e){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(y.UPDATE,f.userExtractor,c.BringgException.serviceException((function(){return"Could not update user: "+t})),i({id:t},e),{id:t})];case 1:return[2,n.sent()]}}))}))},e.prototype.getAllAdminsAndDispatchers=function(t){return s(this,void 0,void 0,(function(){var e,n,r,o;return u(this,(function(i){switch(i.label){case 0:return e=t.limit,n=t.page_action,r=t.cursor,o=[f.UsersScopes.DISPATCHERS,f.UsersScopes.ADMINS],[4,this.handleAuthorizedRequest(y.GET_ALL,(function(t){return{next_page_cursor:t.next_page_cursor,previous_page_cursor:t.previous_page_cursor,users:t.users}}),c.BringgException.serviceException("Could not get admins and dispatchers"),void 0,void 0,{pgver:h.KEYSET_PAGINATION_VER,scopes:o,limit:e,page_action:n,cursor:r})];case 1:return[2,i.sent()]}}))}))},e.prototype.getAllDrivers=function(t){return s(this,void 0,void 0,(function(){var e,n,r,o,i;return u(this,(function(s){switch(s.label){case 0:return e=t.limit,n=t.page_action,r=t.cursor,o=t.options,i=[],d.get(o,"onlyCustomers")?i.push(f.UsersScopes.CUSTOMERS):i.push(f.UsersScopes.DRIVERS),o.onlyOnlineDriver&&i.push(f.UsersScopes.MARKED_AS_ONLINE),[4,this.handleAuthorizedRequest(y.GET_ALL,(function(t){return{next_page_cursor:t.next_page_cursor,previous_page_cursor:t.previous_page_cursor,users:t.users}}),c.BringgException.serviceException("Could not get drivers"),void 0,void 0,{pgver:h.KEYSET_PAGINATION_VER,scopes:i,limit:e,page_action:n,cursor:r})];case 1:return[2,s.sent()]}}))}))},e.prototype.delete=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.DELETE,f.successExtractor,c.BringgException.serviceException((function(){return"Could not delete user: "+t})),void 0,{id:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.getProfileImage=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.GET_PROFILE_IMAGE,(function(t){return t.profile_image}),c.BringgException.serviceException((function(){return"Could not get user's "+t+" profile image"})),{},{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.messageDriver=function(t,e){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(y.MESSAGE_DRIVER,(function(t){return t.announcement_id}),c.BringgException.serviceException((function(){return"Could not message to user "+t})),{user_id:t,message:e},{userId:t})];case 1:return[2,n.sent()]}}))}))},e.prototype.byUserType=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.GET_USERS_WITH_USER_TYPE,f.usersExtractor,c.BringgException.serviceException("Could not get users"),{},{userTypeId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.makeAdmin=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.MAKE_ADMIN,f.userExtractor,c.BringgException.serviceException((function(){return"Could not set admin on userId: "+t})),void 0,{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.attachSubscriptions=function(){var t=this;this.subscribeToEvent(p.DELETE_EMPLOYEE,(function(e){t.store.removeFromStore(e.user_id)})),this.subscribeToEvent(p.EMPLOYEE_UPDATE_EVENT,(function(e){t.store.updateInStore(e)})),this.subscribeToEvent(p.NEW_EMPLOYEE,(function(e){t.store.addToStore(e)}))},e}(a.PubSubService);e.default=v},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.PubSubService=void 0;var i=n(39),s=function(t){function e(e,n){var r=t.call(this,e,n)||this;return i.default.info("Attaching subscriptions to persistent connection.."),r.session.persistentConnection&&(r.attachSubscriptions(),i.default.info("Persistent connection established successfully!")),r}return o(e,t),e.prototype.publish=function(t,e){this.session.persistentConnection.publish(t,e.bind(this))},e.prototype.subscribeToEvent=function(t,e){this.session.persistentConnection.subscribe(t,e.bind(this))},e}(n(24).SessionBasedService);e.PubSubService=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserHelpers=void 0;var r=n(64),o=n(11),i=function(){function t(){}return t.isOfflineDriver=function(t){return!0===t.driver&&t.status===r.Connection.Offline},t.isOnlineDriver=function(t){return!0===t.driver&&t.status===r.Connection.Online},t.isOnShiftDriver=function(t){return!0===t.driver&&!o.isNil(t.active_shift_id)},t.isCustomer=function(t){return!0===t.customer},t.isAdmin=function(t){return!0===t.admin},t.isDispatcher=function(t){return!0===t.dispatcher},t}();e.UserHelpers=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationTemplate=void 0;var r=n(352),o=function(){function t(t){this.notificationTemplateStore=new r.default(t)}return t.prototype.getAll=function(){return this.notificationTemplateStore.getAll()},t.prototype.getByNames=function(t){return this.notificationTemplateStore.notificationTemplateService.getByNames(t)},t.prototype.create=function(t){return this.notificationTemplateStore.create(t)},t.prototype.update=function(t,e){return this.notificationTemplateStore.update(t,e)},t.prototype.delete=function(t){return this.notificationTemplateStore.delete(t)},t}();e.NotificationTemplate=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(48),a=n(353),c=function(t){function e(e){var n=t.call(this)||this;return n.isFetched=!1,n.notificationTemplateService=new a.default(e,n),n}return o(e,t),e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.isFetched?this.getItems():this._fetchAll()]}))}))},e.prototype.create=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.notificationTemplateService.create(t)];case 1:return e=n.sent(),this.addToStore(e.notification_template),[2,e.notification_template]}}))}))},e.prototype.update=function(t,e){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,this.notificationTemplateService.update(t,e)];case 1:return n=r.sent(),this.updateInStore(n.notification_template),[2,n.notification_template]}}))}))},e.prototype.delete=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.notificationTemplateService.delete(t)];case 1:return e=n.sent(),this.removeFromStore(t),[2,e]}}))}))},e.prototype._fetchAll=function(){return i(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return[4,this.notificationTemplateService.getAll()];case 1:return t=e.sent(),this.addItems(t.notification_templates),this.isFetched=!0,[2,t.notification_templates]}}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(15),a=n(19),c=n(141),l=n(24);e.Routes={GET_ALL:new a.Route("/merchant/notification_templates",0),CREATE:new a.Route("/merchant/notification_templates",1),UPDATE:new a.Route("/merchant/notification_templates/{:id}",2),DELETE:new a.Route("/merchant/notification_templates/{:id}",4),FIND_BY_NAMES:new a.Route("/merchant/notification_templates/find_by_names",1)};var f=function(t){function n(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.store=n,r}return o(n,t),n.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_ALL,c.defaultExtractor,u.BringgException.serviceException("Failed to get NotificationTemplate"))];case 1:return[2,t.sent()]}}))}))},n.prototype.getByNames=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.handleAuthorizedRequest(e.Routes.FIND_BY_NAMES,c.notificationsTemplateExtractor,u.BringgException.serviceException("Failed to get NotificationTemplate ny names"),{names:t})]}))}))},n.prototype.create=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.CREATE,c.defaultExtractor,u.BringgException.serviceException("Failed to create NotificationTemplate"),{notification_template:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.update=function(t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.UPDATE,c.defaultExtractor,u.BringgException.serviceException("Failed to update NotificationTemplate"),{notification_template:n},{id:t})];case 1:return[2,r.sent()]}}))}))},n.prototype.delete=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.DELETE,c.defaultExtractor,u.BringgException.serviceException("Failed to delete NotificationTemplate"),{id:t},{id:t})];case 1:return[2,n.sent()]}}))}))},n}(l.SessionBasedService);e.default=f},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(355),u=n(72),a=function(){function t(t){this.service=new s.default(t)}return t.prototype.get=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.service.get()];case 1:return[2,t.sent()]}}))}))},t.prototype.update=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.service.update(t)];case 1:return[2,e.sent()]}}))}))},r([u.default],t.prototype,"get",null),t}();e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.defaultExtractor=e.Routes=void 0;var i=n(24),s=n(15),u=n(19);e.Routes={GET:new u.Route("/merchant/customer_configuration",0),UPDATE:new u.Route("/merchant/customer_configuration",2)};e.defaultExtractor=function(t){return t};var a=function(t){function n(e){return t.call(this,e.config.getApiEndpoint(),e)||this}return o(n,t),n.prototype.get=function(){return this.handleAuthorizedRequest(e.Routes.GET,e.defaultExtractor,s.BringgException.serviceException("Failed to get customer configurations"))},n.prototype.update=function(t){return this.handleAuthorizedRequest(e.Routes.UPDATE,e.defaultExtractor,s.BringgException.serviceException("Failed to update customer configurations"),t)},n}(i.SessionBasedService);e.default=a},function(t,e,n){"use strict";var r=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),s=function(){var t=this;this.handlers=new Map,this.on=function(e,n){if(!i.isString(e))throw new Error("action can only be a string");var r=t.handlers.has(e)?t.handlers.get(e):[];return r.push(n),t.handlers.set(e,r),function(){return t.off(e,n)}},this.emit=function(e){for(var n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];var u=t.handlers.get(e);i.each(u,(function(t){t.apply(void 0,o([],r(n)))}))},this.off=function(e,n){var r=t.handlers.get(e),o=i.indexOf(r,n);-1!==o&&(r.splice(o,1),t.handlers.set(e,r))}};e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(358),o=function(){function t(t){this.companyEntity=new r.default(t)}return t.prototype.get=function(t){return this.companyEntity.service.get(t)},t.prototype.getAll=function(t){return this.companyEntity.service.getAll(t)},t.prototype.create=function(t){return this.companyEntity.service.create(t)},t.prototype.update=function(t,e){return this.companyEntity.service.update(t,e)},t.prototype.delete=function(t){return this.companyEntity.service.delete(t)},t.prototype.getUsers=function(t){return this.companyEntity.getUsers(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"companies",routes:[i.BaseRoutes.Create,i.BaseRoutes.Get,i.BaseRoutes.Update,i.BaseRoutes.Delete,i.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getUsers=function(t){return this.service.routeGenerator.get("/companies/"+t+"/users").withRouteParams({companyId:t}).invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(360),o=function(){function t(t){this.tagEntity=new r.default(t)}return t.prototype.getAll=function(){return this.tagEntity.service.getAll()},t.prototype.create=function(t){return this.tagEntity.service.create(t)},t.prototype.update=function(t,e){return this.tagEntity.service.update(t,e)},t.prototype.delete=function(t){return this.tagEntity.service.delete(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"tags",routes:[i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete,i.BaseRoutes.GetAll]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(362),s=function(){function t(t){this.reportsService=new i.default(t)}return t.prototype.getLayout=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.reportsService.getLayout(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getReport=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.reportsService.getReport(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getFilters=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.reportsService.getFilters(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getReportExecution=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.reportsService.getReportExecution(t)]}))}))},t.prototype.getLastUpdateTime=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.reportsService.getLastUpdateTime()];case 1:return[2,t.sent()]}}))}))},t.prototype.getConfigurations=function(t){return this.reportsService.getConfigurations(t)},t.prototype.getConfigurationsFilterOptions=function(){return this.reportsService.getConfigurationsFilterOptions()},t.prototype.downloadConfigurations=function(t){return this.reportsService.downloadConfigurations(t)},t.prototype.cacheablesGetReport=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.reportsService.cacheablesGetReport(t,e)];case 1:return[2,n.sent()]}}))}))},Object.defineProperty(t.prototype,"endpoint",{get:function(){return this.reportsService.endpoint},enumerable:!1,configurable:!0}),t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var a=n(96),c=n(11),l="reports-service";e.Routes={GENERATE_REPORT:"/"+l+"/v1/report",GET_LAYOUT:"/"+l+"/v1/layout",GET_REPORT:"/"+l+"/v2/report",GET_FILTERS:"/"+l+"/v2/filters",GET_REPORT_EXECUTION:"/"+l+"/v1/report_execution",GET_LAST_UPDATE_TIME:"/"+l+"/v1/last_update_time",GET_CONFIGURATIONS:"/"+l+"/v1/configurations",GET_CONFIGURATIONS_CSV:"/"+l+"/v1/configurations/report-download",GET_CONFIGURATIONS_FILTER_OPTOINS:"/"+l+"/v1/configurations/filter-options"};var f=function(t){function n(e){return t.call(this,e,"reports")||this}return o(n,t),n.prototype.getConfigurations=function(t){return s(this,void 0,void 0,(function(){var n,r;return u(this,(function(o){return n=c.pick(t,["changedBy","configurationModels","changeTime"]),r=c.pick(t,["limit","offset","sort"]),[2,this.routeGenerator.post(e.Routes.GET_CONFIGURATIONS).withPayload(n).withQueryString(r).invoke()]}))}))},n.prototype.downloadConfigurations=function(t){return s(this,void 0,void 0,(function(){var n,r;return u(this,(function(o){return n=c.pick(t,["changedBy","configurationModels","changeTime"]),r=c.pick(t,["limit","offset","sort"]),[2,this.routeGenerator.post(e.Routes.GET_CONFIGURATIONS_CSV).withPayload(n).withQueryString(r).invoke()]}))}))},n.prototype.getConfigurationsFilterOptions=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.routeGenerator.get(e.Routes.GET_CONFIGURATIONS_FILTER_OPTOINS).invoke()]}))}))},n.prototype.getReportExecution=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.routeGenerator.get(e.Routes.GET_REPORT_EXECUTION).withQueryString({uuid:t}).invoke()];case 1:return[2,n.sent().url]}}))}))},n.prototype.getLastUpdateTime=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.routeGenerator.get(e.Routes.GET_LAST_UPDATE_TIME).invoke()];case 1:return[2,t.sent().last_update_time]}}))}))},n.prototype.getLayout=function(t){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:return t?(n=JSON.stringify(t),[2,this.routeGenerator.get(e.Routes.GET_LAYOUT).withQueryString({payload:n}).invoke()]):[4,this.routeGenerator.get(e.Routes.GET_LAYOUT).invoke()];case 1:return[2,r.sent()]}}))}))},n.prototype.getReport=function(t,n){return s(this,void 0,void 0,(function(){var r;return u(this,(function(o){switch(o.label){case 0:return r=JSON.stringify(i({widget_id:t},n)),[4,this.routeGenerator.get(e.Routes.GET_REPORT).withQueryString({payload:r}).invoke()];case 1:return[2,o.sent().report]}}))}))},n.prototype.getFilters=function(t){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:return n=JSON.stringify(i({},t)),[4,this.routeGenerator.get(e.Routes.GET_FILTERS).withQueryString({payload:n}).invoke()];case 1:return[2,r.sent()]}}))}))},n.prototype.cacheablesGetReport=function(t,n){return s(this,void 0,void 0,(function(){var r;return u(this,(function(o){switch(o.label){case 0:return r=JSON.stringify(i({widget_id:t},n)),[4,this.routeGenerator.get(e.Routes.GENERATE_REPORT).withQueryString({payload:r}).invoke()];case 1:return[2,o.sent().report]}}))}))},n}(a.default);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(364),o=function(){function t(t){this.vrpAutoDispatchAnalyticEntity=new r.default(t)}return t.prototype.getAll=function(t){return this.vrpAutoDispatchAnalyticEntity.service.getAll(t)},t.prototype.onDoneEvent=function(t){this.vrpAutoDispatchAnalyticEntity.onDoneEvent=t},t.prototype.getTeamsStates=function(){return this.vrpAutoDispatchAnalyticEntity.getTeamsStates()},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=n(9),u=n(365),a=n(11),c=function(t){function e(e){var n=t.call(this,{session:e,entityName:"auto_dispatch_statistics",routes:[i.BaseRoutes.GetAll]})||this;return n.onDoneEvent=a.noop,n.realTime.on("vrp auto dispatch done",(function(t){return n.onDoneEvent(t)})),n}return o(e,t),e.prototype.getTeamsStates=function(){return this.service.routeGenerator.get(u.Routes.getTeamsStates).withExtractor((function(t){return t.result})).invoke()},e}(s.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0,e.Routes={getTeamsStates:"/auto_dispatch_statistics/state_by_teams/"}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=n(367),i=function(){function t(t){this.tagCustomerConfiguration=new o.default(t)}return t.prototype.getByTag=function(t){return this.tagCustomerConfiguration.getByTag(t)},t.prototype.getAll=function(){return this.tagCustomerConfiguration.service.getAll()},t.prototype.create=function(t,e){return this.tagCustomerConfiguration.service.create(r(r({},e),{tag_id:t}))},t.prototype.update=function(t,e){return this.tagCustomerConfiguration.service.update(t,e)},t.prototype.delete=function(t){return this.tagCustomerConfiguration.service.delete(t)},t}();e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"tag_customer_configurations",routePrefix:"tags",routes:[i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete,i.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getByTag=function(t){return this.service.routeGenerator.get("/tags/"+t+"/tag_customer_configurations").withRouteParams({tagId:t}).invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=n(369),i=function(){function t(t){this.tagMerchantConfiguration=new o.default(t)}return t.prototype.getAll=function(){return this.tagMerchantConfiguration.service.getAll()},t.prototype.getByTag=function(t){return this.tagMerchantConfiguration.getByTag(t)},t.prototype.create=function(t,e){return this.tagMerchantConfiguration.service.create(r(r({},e),{tag_id:t}))},t.prototype.update=function(t,e){return this.tagMerchantConfiguration.service.update(t,e)},t.prototype.delete=function(t){return this.tagMerchantConfiguration.service.delete(t)},t}();e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"tag_merchant_configurations",routePrefix:"tags",routes:[i.BaseRoutes.GetAll,i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete]})||this}return o(e,t),e.prototype.getByTag=function(t){return this.service.routeGenerator.get("/tags/"+t+"/tag_merchant_configurations").withRouteParams({tagId:t}).invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(371),o=function(){function t(t){this.InventoryActionsConfigurationEntity=new r.default(t)}return t.prototype.getAll=function(){return this.InventoryActionsConfigurationEntity.service.getAll()},t.prototype.create=function(t){return this.InventoryActionsConfigurationEntity.service.create(t)},t.prototype.update=function(t,e){return this.InventoryActionsConfigurationEntity.service.update(t,e)},t.prototype.delete=function(t){return this.InventoryActionsConfigurationEntity.service.delete(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"inventory_actions_configurations",routePrefix:"merchant",routes:[i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete,i.BaseRoutes.GetAll]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(373),o=function(){function t(t){this.TaskConfigurationEntity=new r.default(t)}return t.prototype.getAllActionData=function(){return this.TaskConfigurationEntity.getAllActionData()},t.prototype.create=function(t){return this.TaskConfigurationEntity.service.create(t)},t.prototype.update=function(t,e){return this.TaskConfigurationEntity.service.update(t,e)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"task_configurations",routePrefix:"merchant",routes:[i.BaseRoutes.Create,i.BaseRoutes.Update]})||this}return o(e,t),e.prototype.getAllActionData=function(){return this.service.routeGenerator.get("/merchant/task_configurations/get_all_action_data").invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(375),u=n(72),a=function(){function t(t){this.userConfigurationEntity=new s.default(t)}return t.prototype.get=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.userConfigurationEntity.get()]}))}))},t.prototype.getActionData=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.userConfigurationEntity.getActionData()]}))}))},t.prototype.update=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.userConfigurationEntity.update(t)]}))}))},r([u.default],t.prototype,"get",null),t}();e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){return t.call(this,{session:e,entityName:"user_configuration",routePrefix:"merchant",routes:[]})||this}return o(e,t),e.prototype.get=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get("/merchant/user_configuration").invoke()]}))}))},e.prototype.getActionData=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get("/merchant/user_configuration/get_action_data").invoke()]}))}))},e.prototype.update=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.put("/merchant/user_configuration").withPayload(t).invoke()]}))}))},e}(n(5).default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(377),o=function(){function t(t){this.userTypeEntity=new r.default(t)}return t.prototype.get=function(t){return this.userTypeEntity.getUserType(t)},t.prototype.getAll=function(){return this.userTypeEntity.getAllUserTypes()},t.prototype.update=function(t,e){return this.userTypeEntity.updateUserType(t,e)},t.prototype.create=function(t){return this.userTypeEntity.createUserType(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=n(5),c=n(378),l=[a.BaseRoutes.Get,a.BaseRoutes.GetAll,a.BaseRoutes.Create,a.BaseRoutes.Update],f=function(t){function e(e){return t.call(this,{session:e,entityName:"user_types",routes:l})||this}return o(e,t),e.prototype.getUserType=function(t){return this.getOrFetch(t)},e.prototype.getAllUserTypes=function(){return i(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return[4,this.getAllOrFetch(null,c.userTypesStoreExtractor,c.userTypesResponseExtractor)];case 1:return(t=e.sent()).count?[2,t]:[2,c.userTypesResponseExtractor(t)]}}))}))},e.prototype.updateUserType=function(t,e){return this.update(t,e,c.userTypeExtractor,c.userTypeExtractor)},e.prototype.createUserType=function(t){return this.create(t,c.userTypeExtractor,c.userTypeExtractor)},e}(u.default);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.userTypesResponseExtractor=e.userTypesStoreExtractor=e.userTypeExtractor=void 0;e.userTypeExtractor=function(t){return t.user_type};e.userTypesStoreExtractor=function(t){return t.user_types};e.userTypesResponseExtractor=function(t){return{count:t.count?t.count:t.length,user_types:t.user_types?t.user_types:t}}},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DeliveryBlocksApi=void 0;var s=n(15),u=n(380),a=function(){function t(t){this.deliveryBlocksEntity=new u.default(t)}return t.prototype.get=function(t,e,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.deliveryBlocksEntity.get(t,e,n)]}))}))},t.prototype.create=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.deliveryBlocksEntity.create(t)]}))}))},t.prototype.update=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.deliveryBlocksEntity.update(t)]}))}))},t.prototype.delete=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.deliveryBlocksEntity.delete(t,e)]}))}))},t.prototype.getByDriverId=function(t,e,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.deliveryBlocksEntity.getByDriverId(t,e,n)]}))}))},r([s.logOnException],t.prototype,"get",null),r([s.logOnException],t.prototype,"create",null),r([s.logOnException],t.prototype,"update",null),r([s.logOnException],t.prototype,"delete",null),r([s.logOnException],t.prototype,"getByDriverId",null),t}();e.DeliveryBlocksApi=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},u=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0});var a=n(5),c="/delivery_blocks",l="/delivery_blocks",f="/delivery_blocks/{:id}",p="/delivery_blocks/{:id}",h=function(t){function e(e){return t.call(this,{session:e,entityName:"delivery_blocks",routes:[]})||this}return o(e,t),e.prototype.get=function(t,e,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,this.service.routeGenerator.get(c).withQueryString({team_id:t,start_time:e,end_time:n}).setException("Could not fetch delivery block for team #"+t).withExtractor((function(t){return t.delivery_blocks})).invoke()];case 1:return[2,r.sent()]}}))}))},e.prototype.create=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l).withPayload(t).withExtractor((function(t){return t.delivery_block})).setException("Could not create delivery block for team #"+t.team_id).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.update=function(t){return i(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e=t.id,n=u(t,["id"]),[4,this.service.routeGenerator.put(f).withExtractor((function(t){return t.delivery_block})).setException("Could not update delivery block for team #"+t.team_id).withRouteParams({id:e}).withPayload(n).invoke()];case 1:return[2,r.sent()]}}))}))},e.prototype.delete=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.delete(p).withExtractor((function(t){return t.success})).setException("Could not delete delivery block with id #"+t).withRouteParams({id:t}).withQueryString({recurring:e}).invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getByDriverId=function(t,e,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,this.service.routeGenerator.get("/delivery_blocks/users/{:id}").withExtractor((function(t){return t.delivery_blocks})).withRouteParams({id:t}).setException("Could not fetch delivery block for user with id #"+t).withQueryString({start_time:e,end_time:n}).invoke()]}))}))},e}(a.default);e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(382),o=function(){function t(t){this.reportPreference=new r.default(t)}return t.prototype.upsert=function(t){return this.reportPreference.upsert(t)},t.prototype.delete=function(t){return this.reportPreference.service.delete(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"report_preference",routePrefix:"merchant",routes:[i.BaseRoutes.Delete]})||this}return o(e,t),e.prototype.upsert=function(t){return this.service.routeGenerator.put("/merchant/report_preferences/upsert").withPayload(t).invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(e,"__esModule",{value:!0});var o=n(384),i=n(72),s=function(){function t(t){this.teamEntity=new o.default(t)}return t.prototype.get=function(t){return this.teamEntity.get(t)},t.prototype.forceGet=function(t){return this.teamEntity.service.get(t)},t.prototype.getAll=function(){return this.teamEntity.getAll()},t.prototype.update=function(t,e){return this.teamEntity.updateTeam(t,e)},t.prototype.create=function(t){return this.teamEntity.createTeam(t)},t.prototype.byMerchantId=function(t){return this.teamEntity.byMerchantId(t)},r([i.default],t.prototype,"getAll",null),t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=n(9),c=function(t){return t.team},l="/users/{:userId}/teams",f="/merchant/{:merchantId}/teams",p=function(t){function e(e){var n=t.call(this,{session:e,entityName:"teams",routes:[u.BaseRoutes.Get,u.BaseRoutes.GetAll,u.BaseRoutes.Create,u.BaseRoutes.Update]})||this;return n.teamsByMerchant=new Map,n}return o(e,t),e.prototype.byUserId=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(l).withExtractor((function(t){return t})).setException("Could not fetch teams of the user #"+t).withRouteParams({userId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updateTeam=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.update(t,e,c,c)]}))}))},e.prototype.createTeam=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.create(t,c,c)]}))}))},e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.getAllOrFetch()]}))}))},e.prototype.get=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.getOrFetch(t)]}))}))},e.prototype.byMerchantId=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return this.teamsByMerchant.get(t)?[2,this.teamsByMerchant.get(t)]:[4,this.service.routeGenerator.get(f).withExtractor((function(t){return t.teams})).setException("Could not fetch teams of the merchant #"+t).withRouteParams({merchantId:t}).invoke()];case 1:return e=n.sent(),this.teamsByMerchant.set(t,e),[2,e]}}))}))},e}(a.default);e.default=p},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var s=n(15),u=n(19),a=n(24),c=n(70),l=n(9),f=function(t){function e(e){var n=t.call(this,e.config.getApiEndpoint(),e)||this;return n.prepare_resource=new u.Route("/resources/prepare",1),n.process_resource=new u.Route("/resources/{:id}/process",1),n.realTime=new l.RealTimeHandler(e.persistentConnection),n.processedCallbacks=[],n}return o(e,t),e.prototype.prepare=function(t,e){return this.handleAuthorizedRequest(this.prepare_resource,c.defaultExtractor,s.BringgException.serviceException("Failed to call prepare resource"),i({type:t},e))},e.prototype.process=function(t,e){return this.realTime.on(e,this.onProcessed.bind(this)),this.handleAuthorizedRequest(this.process_resource,c.defaultExtractor,s.BringgException.serviceException("Failed to call resource process"),null,{id:t})},e.prototype.registerOnProcessed=function(t,e){var n=this;return this.processedCallbacks.push({callback:e,resourceId:t}),function(){return n.processedCallbacks.splice(n.processedCallbacks.map((function(t){return t.callback})).indexOf(e),1)}},e.prototype.onProcessed=function(t){this.processedCallbacks.forEach((function(e){t.resource_id===e.resourceId&&e.callback(t)}))},e}(a.SessionBasedService);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(387),o=function(){function t(t){this.teamConfigurationEntity=new r.default(t)}return t.prototype.get=function(t){return this.teamConfigurationEntity.service.get(t)},t.prototype.getAll=function(){return this.teamConfigurationEntity.service.getAll()},t.prototype.update=function(t,e){return this.teamConfigurationEntity.service.update(t,e)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"team_configuration",routes:[i.BaseRoutes.Get,i.BaseRoutes.Update,i.BaseRoutes.GetAll]})||this}return o(e,t),e}(n(9).default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(389),s=function(){function t(t){this.scanEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.scanEntity.service.create(t)]}))}))},t.prototype.getTaskRouteDetails=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.scanEntity.getTaskRouteDetails(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=n(5),c=function(t){function e(e){return t.call(this,{session:e,entityName:"scans",routes:[a.BaseRoutes.Create]})||this}return o(e,t),e.prototype.getTaskRouteDetails=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.get("/scans/find_task_route_details").withQueryString({scan_string:t}).withExtractor((function(t){return t.task_route_details})).invoke()]}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Signature=void 0;var i=n(391),s=function(){function t(t){this.signatureEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.signatureEntity.create(t)]}))}))},t}();e.Signature=s,e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){return t.call(this,{session:e,entityName:"signatures",routes:[]})||this}return o(e,t),e.prototype.create=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/signatures").withHeaders({"Content-Type":"multipart/form-data"}).withPayload(t).invoke()]}))}))},e}(n(9).default);e.default=u},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(393),s=function(){function t(t){this.photoEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.photoEntity.create(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){return t.call(this,{session:e,entityName:"photos",routes:[]})||this}return o(e,t),e.prototype.create=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/task_photo").withHeaders({"Content-Type":"multipart/form-data"}).withPayload(t).invoke()]}))}))},e}(n(9).default);e.default=u},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.MerchantConfigurationApi=void 0;var i=n(395),s=n(11),u=n(396),a=function(){function t(t){this.entity=new i.default(t)}return t.prototype.get=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.get()]}))}))},t.prototype.fetchConfiguration=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.fetchConfiguration()]}))}))},t.prototype.update=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.update(s.pick(t,u.MerchantConfigurationKeys))]}))}))},t.prototype.uploadLogo=function(t){return this.entity.uploadLogo(t)},t.prototype.resetDeliveryPin=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.resetDeliveryPin()]}))}))},t.prototype.resetDestinationPin=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.resetDestinationPin()]}))}))},t.prototype.getCsvFields=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getCsvFields()]}))}))},t.prototype.setCsvFields=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.setCsvFields(t)]}))}))},t.prototype.getUserCsvFields=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getUserCsvFields()]}))}))},t.prototype.dashboardTableConfigurationUpdate=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.dashboardTableConfigurationUpdate(t)]}))}))},t.prototype.setUserCsvFields=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.setUserCsvFields(t)]}))}))},t.prototype.deliveryPinChange=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.deliveryPinChange(t)]}))}))},t.prototype.resetEmailLogo=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.resetEmailLogo()]}))}))},t.prototype.resetClientAppLogo=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.resetClientAppLogo()]}))}))},t.prototype.resetPublicTaskFormLogo=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.resetPublicTaskFormLogo()]}))}))},t.prototype.getRatingReasonConfiguration=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getRatingReasonConfiguration()]}))}))},t.prototype.setRatingReasonConfiguration=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.setRatingReasonConfiguration(t)]}))}))},t.prototype.requestBetaProgram=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.requestBetaProgram(t)]}))}))},t.prototype.getTipDriverConfiguration=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getTipDriverConfiguration()]}))}))},t.prototype.setTipDriverConfiguration=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.setTipDriverConfiguration(t)]}))}))},t.prototype.notifyCustomers=function(t,e,n,i){return r(this,void 0,void 0,(function(){return o(this,(function(r){return[2,this.entity.notifyCustomers(t,e,n,i)]}))}))},t.prototype.getPublicTaskForm=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getPublicTaskForm()]}))}))},t.prototype.setPublicTaskForm=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.entity.setPublicTaskForm(t,e)]}))}))},t.prototype.getMobileTaskForm=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getMobileTaskForm()]}))}))},t.prototype.setMobileTaskForm=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.setMobileTaskForm(t)]}))}))},t}();e.MerchantConfigurationApi=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a="/merchant/merchant_configuration",c={RESET_DELIVERY_PIN:a+"/delivery_pin_reset",RESET_DESTINATION_PIN:a+"/destination_pin_reset",GET_CSV_FIELDS:a+"/csv_upload_fields",SET_CSV_FIELDS:a+"/csv_upload_fields",GET_USER_CSV_FIELDS:a+"/user_csv_upload_fields",SET_USER_CSV_FIELDS:a+"/user_csv_upload_fields",DELIVERY_PIN_CHANGE:a+"/delivery_pin_change",RESET_EMAIL_LOGO:a+"/email_logo_reset",UPLOAD_LOGO:a+"/logo",RESET_CLIENT_APP_LOGO:a+"/client_app_logo_reset",GET_RATING_REASON_CONFIGURATION:a+"/rating_reasons",SET_RATING_REASON_CONFIGURATION:a+"/rating_reasons",REQUEST_BETA_PROGRAM:a+"/request_beta_program",GET_TIP_DRIVER_CONFIGURATION:a+"/tip_driver",SET_TIP_DRIVER_CONFIGURATION:a+"/tip_driver",NOTIFY_CUSTOMERS:a+"/notify_customers",GET_PUBLIC_TASK_FORM:a+"/public_task_form",SET_PUBLIC_TASK_FORM:a+"/public_task_form",RESET_PUBLIC_TASK_FORM_LOGO:a+"/reset_public_task_form_logo",GET_MOBILE_TASK_FORM:a+"/mobile_task_form",SET_MOBILE_TASK_FORM:a+"/mobile_task_form",UPDATE_TABLE_CONFIGURATION:"/dashboard_ui_configuration"},l=function(t){function e(e){return t.call(this,{session:e,entityName:"merchant",routeSuffix:"merchant_configuration",routes:[]})||this}return o(e,t),e.prototype.updateMerchantConfigurationField=function(t,e){var n;this.service.session.update("merchantConfiguration",((n={})[t]=e,n))},e.prototype.updateMerchantConfiguration=function(t){this.service.session.update("merchantConfiguration",t)},e.prototype.urlRequest=function(t){var e=t.route,n=t.errorMessage,r=t.fieldToUpdate,o=t.payload;return i(this,void 0,void 0,(function(){var t,i;return s(this,(function(s){switch(s.label){case 0:return t=this.service.routeGenerator.post(e).withExtractor((function(t){return t.url})).setException(n),o&&t.withPayload(o),[4,t.invoke()];case 1:return i=s.sent(),r&&this.updateMerchantConfigurationField(r,i),[2,i]}}))}))},e.prototype.resetDeliveryPin=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.urlRequest({route:c.RESET_DELIVERY_PIN,fieldToUpdate:"delivery_pin",errorMessage:"could not reset delivery pin"})]}))}))},e.prototype.resetDestinationPin=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.urlRequest({route:c.RESET_DESTINATION_PIN,fieldToUpdate:"destination_pin",errorMessage:"could not reset destination pin"})]}))}))},e.prototype.resetEmailLogo=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.urlRequest({route:c.RESET_EMAIL_LOGO,fieldToUpdate:"email_logo",errorMessage:"could not reset email logo"})]}))}))},e.prototype.resetClientAppLogo=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.urlRequest({route:c.RESET_CLIENT_APP_LOGO,fieldToUpdate:"logo",errorMessage:"could not reset client app logo"})]}))}))},e.prototype.uploadLogo=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){return(e=new FormData).append("file",t),[2,this.service.routeGenerator.post(c.UPLOAD_LOGO).withHeaders({"Content-Type":"multipart/form-data"}).withPayload(e).invoke()]}))}))},e.prototype.get=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return this.service.session.merchantConfiguration?[2,this.service.session.merchantConfiguration]:[4,this.fetchConfiguration()];case 1:return[2,t.sent()]}}))}))},e.prototype.fetchConfiguration=function(){return i(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t=this.service.session,[4,this.service.routeGenerator.get(a+"/").withExtractor((function(t){return t})).setException("could not fetch merchant_configuration").invoke()];case 1:return t.merchantConfiguration=e.sent(),[2,this.service.session.merchantConfiguration]}}))}))},e.prototype.update=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.put(a+"/").withExtractor((function(t){return t.merchant_configuration})).setException("failed updating merchant_configuration").withPayload(t).invoke()];case 1:return e=n.sent(),this.updateMerchantConfiguration(e),[2,e]}}))}))},e.prototype.getCsvFields=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(c.GET_CSV_FIELDS).withExtractor((function(t){return t.csv_upload_fields})).setException("could not fetch csv fields configuration").invoke()]}))}))},e.prototype.setCsvFields=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.SET_CSV_FIELDS).setException("could not set csv fields configuration").withPayload({csv_fields:t}).invoke()];case 1:return e.sent(),[4,this.getCsvFields()];case 2:return[2,e.sent()]}}))}))},e.prototype.getUserCsvFields=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(c.GET_USER_CSV_FIELDS).withExtractor((function(t){return t.csv_upload_fields})).setException("could not fetch user csv fields configuration").invoke()]}))}))},e.prototype.setUserCsvFields=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.SET_USER_CSV_FIELDS).setException("could not set user csv fields configuration").withPayload({csv_fields:t}).invoke()];case 1:return e.sent(),[4,this.getUserCsvFields()];case 2:return[2,e.sent()]}}))}))},e.prototype.deliveryPinChange=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.urlRequest({route:c.DELIVERY_PIN_CHANGE,fieldToUpdate:"delivery_pin",errorMessage:"failed updating delivery pin: "+t,payload:{alternate_delivery_pin:t}})];case 1:return[2,e.sent()]}}))}))},e.prototype.dashboardTableConfigurationUpdate=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.put(c.UPDATE_TABLE_CONFIGURATION).withPayload({dashboard_ui_configuration:{table_configuration:t}}).invoke()]}))}))},e.prototype.resetPublicTaskFormLogo=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.urlRequest({route:c.RESET_PUBLIC_TASK_FORM_LOGO,errorMessage:"could not reset public task logo"})];case 1:return[2,t.sent()]}}))}))},e.prototype.getRatingReasonConfiguration=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.get(c.GET_RATING_REASON_CONFIGURATION).withExtractor((function(t){return t.rating_reason_config})).setException("could not fetch rating reason configuration").invoke()];case 1:return[2,t.sent()]}}))}))},e.prototype.setRatingReasonConfiguration=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.SET_RATING_REASON_CONFIGURATION).setException("could not set merchant_configuration rating reason").withPayload({rating_reason_config:t}).invoke()];case 1:return e.sent(),[4,this.getRatingReasonConfiguration()];case 2:return[2,e.sent()]}}))}))},e.prototype.requestBetaProgram=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post(c.REQUEST_BETA_PROGRAM).setException("could not set beta program").withPayload({feature_name:t}).invoke()]}))}))},e.prototype.getTipDriverConfiguration=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(c.GET_TIP_DRIVER_CONFIGURATION).withExtractor((function(t){return t.configuration})).setException("could not get driver tip configuration").invoke()]}))}))},e.prototype.setTipDriverConfiguration=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.SET_TIP_DRIVER_CONFIGURATION).withExtractor((function(t){return t.message})).setException("could not set driver tip configuration").withPayload({tip_driver_configuration:t}).invoke()];case 1:return e.sent(),[4,this.getTipDriverConfiguration()];case 2:return[2,e.sent()]}}))}))},e.prototype.notifyCustomers=function(t,e,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){return[2,this.service.routeGenerator.post(c.NOTIFY_CUSTOMERS).setException("could not notify customers: "+r).withPayload({notification_text:t,notification_url:e,send_all:n,customer_ids:r}).invoke()]}))}))},e.prototype.getPublicTaskForm=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(c.GET_PUBLIC_TASK_FORM).withExtractor((function(t){return t.public_task_forms})).setException("could not fetch public task form").invoke()]}))}))},e.prototype.setPublicTaskForm=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.post(c.SET_PUBLIC_TASK_FORM).withExtractor((function(t){return t.public_task_forms})).setException("could not set public task form").withPayload({configuration:{color:t,forms:e}}).invoke()]}))}))},e.prototype.getMobileTaskForm=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(c.GET_MOBILE_TASK_FORM).withExtractor((function(t){return t.mobile_task_form})).setException("could not fetch mobile task form").invoke()]}))}))},e.prototype.setMobileTaskForm=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post(c.SET_MOBILE_TASK_FORM).withExtractor((function(t){return t.mobile_task_form})).setException("could not set mobile task form").withPayload({mobile_task_form:t}).invoke()]}))}))},e}(u.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MerchantConfigurationKeys=void 0,e.MerchantConfigurationKeys=["allow_share_location","acknowledge_flow_ui_config","task_fields","advance_configuration_enabled","address_format","alert_configurations","alert_if_user_rated_below","alerts_types","allow_access_to_all_open_tasks","allow_customer_fb_like","allow_customer_find_me","allow_cx_customer_cancellation","allow_dispatcher_to_access_all_teams","allow_dispatcher_to_access_task_price","allow_dispatcher_to_edit_drivers","allow_moving_tasks_to_planning_phase","allow_offshift_drivers_to_be_assigned","allow_rating","allow_single_order_per_driver","alternate_delivery_pin","application_configurations","application_merchant_configurations","applications","auto_dispatch","auto_dispatch_optimization_method","auto_dispatch_timeout","auto_dispatch_timeout_per_driver","auto_share_location","average_delivery_time","avoid_commercial_roads","driver_administration_time_seconds","cancel_undone_tasks_by_eod","cash_out_flow_enabled","cash_out_template_name","consumer_app_eta_display_method","country_code","custom_drivers_page_row_colors","customer_fb_like_url","cx_cancel_event_type","dashboard_refresh_rate_secs","debrief_flow_enabled","default_minutes_buffer_for_asap_orders","default_minutes_buffer_for_scheduled_orders","delivery_pin","destination_pin","distance_threshold","driver_at_home_flow_options","driver_preparation_time_seconds","email_logo","email_style_color","enable_dashboard","enable_dimension_editing_in_ui","enable_future_tasks","enable_kds","enable_looping_alert_sound","enable_map_overlays","enable_planned_routes","enable_reschedule_flow","enable_shifts_actions","enable_support","enable_task_acknowledge_flow","enable_task_cancellation","enable_task_price","enable_teams","enable_user_types","end_of_day_time","eta_background_color","eta_minutes_color","eta_time_color","eta_title_color","extra_terms_and_conditions_url","grab_future_timeout","grab_mode","grab_mode_alert_type","grab_mode_radius","grab_mode_timeout","header_color","history_fields","initial_tasks_page_size","inverse_header_color","invoice_printed_copies","language_code","lat","late_buffer","lng","logo","logout_idle_admin_minutes","logout_idle_dispatcher_minutes","looping_alert_sound_type","map_type","max_distance_for_optimization_in_meters","max_distance_from_home_to_task_km","max_distance_to_not_report","merchant_id","merchant_mode","minutes_until_first_wp_scheduled_at","name","number_of_retries_before_a_phone_call","open_tasks_filter","paid_google_maps_api","phone_call_string","planning_fields","planning_phase_exists","planning_phase_print_on_apply","planning_phase_send_emails_to_drivers_on_apply","preparation_flow_ui_config","price_currency","printer_type","qr_login_flow_options","reminder_timeout","reply_to_shared_email","run_batcher_on_grab_mode","scan_code_unique","secured_setup","send_notifications_to_customers","send_sms_to_first_way_point","share_if_too_close","sharing_mode","show_bringg_logo","show_eta_to_home","show_new_reports","soft_csv_import","sound_on_new_order","support_parcel_shop_last_mile","task_fields","task_alert_fields","driver_alert_fields","optimization_alert_fields","task_forwarding_enabled","task_home_when_delivery_ends","task_invoice_template_name","task_window_bottom_buffer_minutes","task_window_top_buffer_minutes","tasks_page_size","the_batcher","time_to_remind_before_start_task","tip_driver_enabled","update_location_max_idle_time","use_coc","use_time_windows","voice_reminder_frequency","voice_reminder_text","windows","windows_mode","enable_chat","inherit_team_from_group_team","hour_format","dispatch_filter_limit"]},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(398),s=function(){function t(t){this.vehicleTypesEntity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.vehicleTypesEntity.getAll()];case 1:return[2,t.sent()]}}))}))},t.prototype.get=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.vehicleTypesEntity.get(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.singleExtractor=e.listExtractor=void 0;var u=n(5),a=n(9);e.listExtractor=function(t){return t.vehicle_types};e.singleExtractor=function(t){return t.vehicle_type};var c=function(t){function n(e){return t.call(this,{session:e,entityName:"vehicle_types",routes:[u.BaseRoutes.GetAll,u.BaseRoutes.Get]})||this}return o(n,t),n.prototype.getAll=function(){return this.getAllOrFetch(null,e.listExtractor,e.listExtractor)},n.prototype.get=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.getOrFetch(t,e.singleExtractor,e.singleExtractor)]}))}))},n}(a.default);e.default=c},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(400),s=function(){function t(t){this.reasonToReassignTasksEntity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.reasonToReassignTasksEntity.getAll()];case 1:return[2,t.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),s=n(5),u=function(t){return t.reasons_to_reassign_tasks},a=function(t){function e(e){return t.call(this,{session:e,entityName:"reason_to_reassign_tasks",routes:[s.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getAll=function(){return this.getAllOrFetch(null,u,u)},e}(i.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(402),s=n(403),u=function(){function t(t){this.skillsEntity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t=s.skillsExtractor,[4,this.skillsEntity.service.getAll()];case 1:return[2,t.apply(void 0,[e.sent()])]}}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return n=s.skillExtractor,[4,this.skillsEntity.service.update(t,{name:e})];case 1:return[2,n.apply(void 0,[r.sent()])]}}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e=s.skillExtractor,[4,this.skillsEntity.service.create({name:t})];case 1:return[2,e.apply(void 0,[n.sent()])]}}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.skillsEntity.service.delete(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"skills",routes:[i.BaseRoutes.GetAll,i.BaseRoutes.Delete,i.BaseRoutes.Update,i.BaseRoutes.Create]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.skillsExtractor=e.successExtractor=e.skillExtractor=void 0;e.skillExtractor=function(t){return t.skill};e.successExtractor=function(t){return t.success};e.skillsExtractor=function(t){return t.skills}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(405),o=n(142),i=function(){function t(t){this.vehicleEntity=new r.default(t),this.onUpdate=this.vehicleEntity.store.onItemUpdate,this.onDelete=this.vehicleEntity.store.onItemRemoved,this.onCreate=this.vehicleEntity.store.onItemCreated,this.onVehicleUnassigned=this.vehicleEntity.onVehicleUnassigned,this.unsubscribe=this.vehicleEntity.store.unsubscribe}return t.prototype.getAll=function(){return this.vehicleEntity.getAll()},t.prototype.getAllByTeam=function(t){return this.vehicleEntity.getAllByTeam(t)},t.prototype.get=function(t){return this.vehicleEntity.get(t)},t.prototype.update=function(t,e){return this.vehicleEntity.update(t,e,o.vehicleExtractor,o.vehicleExtractor)},t.prototype.create=function(t){return this.vehicleEntity.create(t,o.vehicleExtractor,o.vehicleExtractor)},t.prototype.delete=function(t){return this.vehicleEntity.delete(t)},t.prototype.getAssignmentHistory=function(t){return this.vehicleEntity.getAssignmentHistory(t)},t.prototype.importVehiclesCsv=function(t){return this.vehicleEntity.importVehiclesCsv(t)},t.prototype.getCsvUploadFields=function(){return this.vehicleEntity.getCsvUploadFields()},t}();e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(9),a=n(5),c=n(142),l=n(11);e.Routes={GET_ASSIGNMENT_HISTORY:"/vehicles/get_assignment_history/",GET_BY_TEAM:"/teams/{:teamId}/vehicles",IMPORT_VEHICLES_CSV:"/vehicles/import_from_csv",GET_CSV_UPLOAD_FIELDS:"/vehicles/csv_upload_fields"};var f=function(t){function n(n){var r=t.call(this,{session:n,entityName:"vehicles",routes:[a.BaseRoutes.GetAll,a.BaseRoutes.Get,a.BaseRoutes.Delete,a.BaseRoutes.Update,a.BaseRoutes.Create]})||this;return r.onVehicleUnassignedEvent=l.noop,r.onVehicleUnassigned=function(t){r.onVehicleUnassignedEvent=t},r.importVehiclesCsv=function(t){var n=new FormData;return n.append("file",t),r.service.routeGenerator.post(e.Routes.IMPORT_VEHICLES_CSV).withHeaders({"Content-Type":"multipart/form-data"}).withPayload(n).invoke()},r.vehiclesByTeam=new Map,r.subscribeToRealtime(),r}return o(n,t),n.prototype.subscribeToRealtime=function(){var t=this;this.realTime.on(c.REAL_TIME_EVENTS.VEHICLE_REMOVED,(function(e){return t.onVehicleUnassignedEvent({user_id:e.user_id,vehicle_id:e.vehicle_id})})),this.realTime.on(c.REAL_TIME_EVENTS.VEHICLE_UPDATE,(function(e){return t.store.updateInStore(e)}))},n.prototype.getAll=function(){return this.getAllOrFetch(null,c.vehiclesExtractor,c.vehiclesExtractor)},n.prototype.getAllByTeam=function(t){return i(this,void 0,void 0,(function(){var n,r=this;return s(this,(function(o){switch(o.label){case 0:return this.vehiclesByTeam.has(t)?[2,this.vehiclesByTeam.get(t).map((function(t){return r.store.getItem(t)}))]:[4,this.service.routeGenerator.get(e.Routes.GET_BY_TEAM).withExtractor(c.vehiclesExtractor).setException("failed to get vehicles by team: "+t).withRouteParams({teamId:t}).invoke()];case 1:return(n=o.sent()).forEach((function(t){return r.store.addToStore(t)})),this.vehiclesByTeam.set(t,n.map((function(t){return t.id}))),[2,n]}}))}))},n.prototype.get=function(t){return this.getOrFetch(t,c.vehicleExtractor,c.vehicleExtractor)},n.prototype.getAssignmentHistory=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.post(e.Routes.GET_ASSIGNMENT_HISTORY).withExtractor(c.assignmentHistoryExtractor).setException("failed to get vehicle_Id: "+t+" assignment history").withPayload({vehicle_id:t}).invoke()]}))}))},n.prototype.getCsvUploadFields=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(e.Routes.GET_CSV_UPLOAD_FIELDS).withExtractor(c.getCsvFieldsExtractor).setException("failed to get vehicles csv upload fields").invoke()]}))}))},n}(u.default);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(407),o=function(){function t(t){this.webApplicationConfigurationEntity=new r.default(t)}return t.prototype.get=function(){return this.webApplicationConfigurationEntity.get()},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=function(t){function e(e){return t.call(this,{session:e,entityName:"web_application_configurations",routes:[]})||this}return o(e,t),e.prototype.get=function(){return i(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return this.service.session.webApplicationConfiguration?[2,this.service.session.webApplicationConfiguration]:(t=this.service.session,[4,this.service.routeGenerator.get("/web_application_configurations/").withExtractor((function(t){return t.web_application_configuration})).setException("Could not fetch web_application_configuration").invoke()]);case 1:return t.webApplicationConfiguration=e.sent(),[2,this.service.session.webApplicationConfiguration]}}))}))},e}(u.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(409),u=function(){function t(t){this.fleetsEntity=new s.default(t)}return t.prototype.getAll=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fleetsEntity.getAll()];case 1:return[2,t.sent()]}}))}))},t.prototype.getById=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fleetsEntity.getById(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getByTask=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fleetsEntity.getByTask(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.askForQuote=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fleetsEntity.askForQuote(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getAllConfigs=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fleetsEntity.getAllConfigs()];case 1:return[2,t.sent()]}}))}))},t.prototype.create=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fleetsEntity.create(r({type:t},e))];case 1:return[2,n.sent()]}}))}))},t.prototype.update=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fleetsEntity.update(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fleetsEntity.delete(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.quoteExtractor=e.fleetsExtractor=e.Routes=void 0;var u=n(9),a=n(5);e.Routes={GET_RELATED:"/fleets/related",ASK_QUOTE:"/fleets/ask_quote",GET_ALL_CONFIGS:"/fleets/get_all_configs"};var c=function(t){function n(e){return t.call(this,{session:e,entityName:"fleets",routes:[a.BaseRoutes.GetAll,a.BaseRoutes.Create,a.BaseRoutes.Update,a.BaseRoutes.Delete]})||this}return o(n,t),n.prototype.getAll=function(){return this.getAllOrFetch(null,e.fleetsExtractor,e.fleetsExtractor)},n.prototype.getById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return this.isAllFetched?[3,2]:[4,this.getAll()];case 1:e.sent(),e.label=2;case 2:return[2,this.store.getItem(t)]}}))}))},n.prototype.getByTask=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(e.Routes.GET_RELATED).withExtractor(e.fleetsExtractor).setException("Failed to get related fleet").withPayload({task_id:t}).invoke()];case 1:return[2,n.sent()]}}))}))},n.prototype.askForQuote=function(t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,this.service.routeGenerator.post(e.Routes.ASK_QUOTE).withExtractor(e.quoteExtractor).setException("Failed to get fleet quote").withPayload({task_id:t,fleet_id:n}).invoke()]}))}))},n.prototype.getAllConfigs=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(e.Routes.GET_ALL_CONFIGS).invoke()]}))}))},n}(u.default);e.default=c;e.fleetsExtractor=function(t){return t.fleets};e.quoteExtractor=function(t){return t.result}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(411),s=function(){function t(t){this.rulesEntity=new i.default(t)}return t.prototype.getMetadata=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.rulesEntity.getMetadata(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getRules=function(t,e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.rulesEntity.getRules(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.saveRules=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.rulesEntity.saveRules(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(9),a=n(5);e.Routes={GET_RULES:"/rule-service/rules",GET_METADATA:"/rule-service/metadata",POST_RULES:"/rule-service/rules"};var c=function(t){function n(e){return t.call(this,{session:e,entityName:"rules",routes:[a.BaseRoutes.GetAll,a.BaseRoutes.Create,a.BaseRoutes.Delete]})||this}return o(n,t),n.prototype.getMetadata=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.get(e.Routes.GET_METADATA).withQueryString(t).invoke()]}))}))},n.prototype.getRules=function(t,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){return[2,this.service.routeGenerator.get(e.Routes.GET_RULES).withQueryString({category_id:t,entity:n,entity_id:r}).invoke()]}))}))},n.prototype.saveRules=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.patch(e.Routes.POST_RULES).withPayload(t).invoke()]}))}))},n}(u.default);e.default=c},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(413),s=function(){function t(t){this.pushTokenSubscriptionEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.pushTokenSubscriptionEntity.service.create(t)]}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.pushTokenSubscriptionEntity.service.delete(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"push_token_subscriptions",routes:[i.BaseRoutes.Create,i.BaseRoutes.Delete]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(74),o=n(415),i=n(101),s=function(){function t(t){var e=this;this.unsubscribe=function(){e.taskEntity.store.unsubscribe()},this.onUpdate=function(t){return e.taskEntity.registerOnUpdate(t)},this.onCreate=function(t){return e.taskEntity.registerOnCreate(t)},this.onDelete=function(t){return e.taskEntity.registerOnDelete(t)},this.onWayPointUpdate=function(t){e.taskEntity.registerOnWayPointUpdate(t)},this.onWayPointAdd=function(t){e.taskEntity.registerOnWayPointAdded(t)},this.onWayPointDelete=function(t){e.taskEntity.registerOnWayPointDeleted(t)},this.taskEntity=new o.default(t)}return t.prototype.getOpenTasks=function(t){return this.taskEntity.getOpenTasks(t)},t.prototype.getOpenTasksKeySetPagination=function(t){return this.taskEntity.getOpenTasksKeySetPagination(t)},t.prototype.getInvalidTasks=function(){return this.taskEntity.getInvalidTasks()},t.prototype.updatePriorities=function(t){return this.taskEntity.updatePriorities(t)},t.prototype.getPlanningTasks=function(t){return this.taskEntity.getPlanningTasks(t)},t.prototype.update=function(t,e){return this.taskEntity.update(t,e,r.defaultExtractor,r.taskExtractor)},t.prototype.finish=function(t){return this.taskEntity.finish(t)},t.prototype.cancel=function(t){return this.taskEntity.cancel(t)},t.prototype.acknowledge=function(t){return this.taskEntity.acknowledge(t)},t.prototype.get=function(t){return this.taskEntity.get(t)},t.prototype.forceGet=function(t){return this.taskEntity.forceGet(t)},t.prototype.batchGet=function(t){return this.taskEntity.batchGet(t)},t.prototype.massAssign=function(t,e,n,r){return this.taskEntity.massAssign(t,e,n,r)},t.prototype.getChildTasks=function(t){return this.taskEntity.getChildTasks(t)},t.prototype.massUnassign=function(t,e){return this.taskEntity.massUnassign(t,e)},t.prototype.moveToPlanning=function(t){return this.taskEntity.moveToPlanning(t)},t.prototype.releaseToDrivers=function(t){return this.taskEntity.releaseToDrivers(t)},t.prototype.create=function(t){return this.taskEntity.create(t)},t.prototype.massCancel=function(t,e,n,r){return this.taskEntity.massCancel(t,e,n,r)},t.prototype.closedSince=function(t){return this.taskEntity.closedSince(t)},t.prototype.updatePreparationStatus=function(t,e){return this.taskEntity.updatePreparationStatus(t,e)},t.prototype.cancelAllOpen=function(){return this.taskEntity.cancelAllOpen()},t.prototype.closedTaskByQuery=function(t,e,n){return this.taskEntity.closedTaskByQuery(t,e,n)},t.prototype.activityLog=function(t){return this.taskEntity.activityLog(t)},t.prototype.changeTeam=function(t,e){return this.taskEntity.changeTeam(t,e)},t.prototype.getLocations=function(t){return this.taskEntity.getLocations(t)},t.prototype.submitForm=function(t){return this.taskEntity.submitForm(t)},t.prototype.lock=function(t){return this.taskEntity.lock(t)},t.prototype.unlock=function(t){return this.taskEntity.unlock(t)},t.prototype.duplicate=function(t){return this.taskEntity.duplicate(t)},t.prototype.rescheduleCancelled=function(t){return this.taskEntity.rescheduleCancelled(t)},t.prototype.rescheduleVirtualTasks=function(t,e,n){return this.taskEntity.rescheduleVirtualTasks(t,e,n)},t.prototype.getPickupQRCode=function(t){return this.taskEntity.getPickupQRCode(t)},t.prototype.getTaskNotesByWayPoint=function(t,e){return this.taskEntity.getTaskNotesByWayPoint(t,e)},t.prototype.getTaskInventoriesByWayPoint=function(t,e){return this.taskEntity.getTaskInventoriesByWayPoint(t,e)},t.prototype.importTasksCsv=function(t){return this.taskEntity.importTasksCsv(t)},t.prototype.broadcastToDrivers=function(t,e,n){return this.taskEntity.broadcastToDrivers(t,e,n)},t.prototype.addTaskNote=function(t,e,n,r,o){return this.taskEntity.addTaskNote(t,e,n,r,o)},t.prototype.deleteWayPoint=function(t,e){return this.taskEntity.deleteWayPoint(t,e)},t.prototype.attachSubscriptions=function(){this.taskEntity.attachSubscriptions()},t.prototype.subscribeToGroupUpdates=function(t){this.taskEntity.subscribeToGroupUpdates(t)},t.prototype.getOpenTasksIds=function(){return this.taskEntity.getOpenTasksIds()},t.prototype.getPlanningTasksIds=function(){return this.taskEntity.getPlanningTasksIds()},t.prototype.getClosedTasksIds=function(){return this.taskEntity.getClosedTasksIds()},t.prototype.getGeneralTasksIds=function(){return this.taskEntity.getGeneralTasksIds()},t.prototype.getInvalidTasksIds=function(){return this.taskEntity.getInvalidTasksIds()},t.isReadyToExecute=i.TaskHelpers.isReadyToExecute,t.isActive=i.TaskHelpers.isTaskInOpenState,t.isDone=i.TaskHelpers.isDone,t.isGroupFollower=i.TaskHelpers.isGroupFollower,t.isUnacknowledged=i.TaskHelpers.isUnacknowledged,t.isLate=i.TaskHelpers.isLate,t.isInOpenState=i.TaskHelpers.isInOpenState,t.isInPlanningState=i.TaskHelpers.isInPlanningState,t.isInClosedState=i.TaskHelpers.isInClosedState,t.isInvalid=i.TaskHelpers.isInvalid,t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},a=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(e,"__esModule",{value:!0});var c=n(9),l=n(64),f=n(5),p=n(74),h=n(75),d=n(65),y=n(11),v=n(101),_=n(103),b=function(t){function e(e,n){var r=t.call(this,{session:e,entityName:"tasks",routes:[f.BaseRoutes.Create,f.BaseRoutes.Get,f.BaseRoutes.Update]})||this;return r.groupUpdateEvents=[],r.groupedValues=new Map,r.registerOnWayPointUpdate=function(t){r.realTime.on(p.TaskRealTimeEvents.WAYPOINT_UPDATED,t)},r.registerOnWayPointAdded=function(t){r.realTime.on(p.TaskRealTimeEvents.WAYPOINT_ADDED,t)},r.registerOnWayPointDeleted=function(t){r.realTime.on(p.TaskRealTimeEvents.WAYPOINT_DELETED,t)},r.onUpdateTask=function(t){r.updateTask(t)},r.onNewTaskAdded=function(t){r.addOrUpdateTask(t),r.onCreate(r.store.getItem(t.id))},r.onTaskDelete=function(t){var e=r.store.getItem(t.id);e&&(r.store.removeFromStore(e.id),r.onDelete(e))},r.onWayPointAdded=function(t){var e=r.store.getItem(t.task_id);e&&(e.way_points.push(t),e.way_points=y.sortBy(e.way_points,"position"),r.updateTask(e))},r.onWayPointDeleted=function(t){var e=r.store.getItem(t.task_id);e&&(y.remove(e.way_points,(function(e){return e.id===t.id})),r.updateTask(e))},r.onWayPointUpdate=function(t){var e=r.store.getItem(t.task_id);if(e){var n=y.find(e.way_points,(function(e){return e.id==t.id}));y.merge(n,t),r.updateTask(e)}},r.onNewScanAdded=function(t){var e=r.store.getItem(t.task_id);e&&(e.scans.push(t),r.updateTask(e))},r.onNewNoteAdded=function(t){var e=r.store.getItem(t.task_id);e&&(y.find(e.task_notes,{id:t.id})||(e.task_notes||(e.task_notes=[]),e.task_notes.push(t),r.updateTask(e)))},r.handleTasksRequest=function(t,e){return s(r,void 0,void 0,(function(){var n,r,o,i=this;return u(this,(function(s){switch(s.label){case 0:return n=this.service.routeGenerator.get(t).withExtractor(p.defaultExtractor).setException("failed to fetch "+t+" tasks"),e&&n.withQueryString(e),[4,n.invoke()];case 1:return r=s.sent(),o=[],r.forEach((function(t){var e=i.addOrUpdateTask(t);e&&o.push(e)})),[2,o]}}))}))},r.handleTasksKeySetPaginationRequest=function(t,e){return s(r,void 0,void 0,(function(){var n,r,o,s,a,c,l=this;return u(this,(function(u){switch(u.label){case 0:return n={pgver:_.KEYSET_PAGINATION_VER},e&&(n=i(i({},e),n)),[4,this.service.routeGenerator.get(t).withQueryString(n).withExtractor((function(t){return{next_page_cursor:t.next_page_cursor,previous_page_cursor:t.previous_page_cursor,tasks:t.items}})).setException("failed to fetch "+t+" tasks").invoke()];case 1:return r=u.sent(),o=r.tasks,s=r.next_page_cursor,a=r.previous_page_cursor,c=[],o.forEach((function(t){var e=l.addOrUpdateTask(t);e&&c.push(e)})),[2,{next_page_cursor:s,previous_page_cursor:a,tasks:c}]}}))}))},r.shouldAddTask=function(t){return!v.TaskHelpers.isGroupFollower(t)},r.sendRealTimeTaskUpdate=function(t){r.onUpdate(r.store.getItem(t.id))},r.updateTask=function(t){var e=r.addOrUpdateTask(t);e&&r.sendRealTimeTaskUpdate(e)},r.addOrUpdateTask=function(t){if(r.shouldAddTask(t))return r.storeItem(t),r.store.getItem(t.id)},r.importTasksCsv=function(t){var e=new FormData;return e.append("file",t),r.service.routeGenerator.post(p.Routes.IMPORT_TASKS_CSV).withHeaders({"Content-Type":"multipart/form-data"}).withPayload(e).invoke()},r.broadcastToDrivers=function(t,e,n){return r.service.routeGenerator.post(p.Routes.BROADCAST_TO_DRIVERS).withPayload({task_id:t,user_ids:e,message:n}).setException("failed to broadcast to drivers task : "+t).invoke()},r.addTaskNote=function(t,e,n,o,i){return r.service.routeGenerator.post(p.Routes.CREATE_TASK_NOTE).withRouteParams({id:t,way_point_id:e}).withQueryString({note:n}).withPayload({type:o,image:i}).setException("failed to add note to task : "+t).withExtractor(p.taskExtractor).invoke()},r.deleteWayPoint=function(t,e){return r.service.routeGenerator.delete(p.Routes.DELETE_WAYPOINT).withRouteParams({id:t,way_point_id:e}).setException("failed to delete waypoint : task "+t+", waypoint "+e).invoke()},n=n||500,r.store.state$.pipe(d.throttleTime(n,h.asyncScheduler,{trailing:!0,leading:!1})).subscribe((function(t){h.from(t.values()).pipe(d.groupBy(p.taskToGroupMapper,(function(t){return t.id})),d.mergeMap((function(t){return h.zip(h.of(t.key),t.pipe(d.toArray()))}))).subscribe((function(t){var e=a(t,2),n=e[0],o=e[1];r.groupedValues.set(n,o),r.emitGroupEvents()}))})),r}return o(e,t),e.prototype.getGroupsCount=function(){return this.groupedValues.size},e.prototype.subscribeToGroupUpdates=function(t){this.groupUpdateEvents.push(t)},e.prototype.emitGroupEvents=function(){var t=this;this.groupUpdateEvents.forEach((function(e){return e(t.groupedValues)}))},e.prototype.getOpenTasksIds=function(){return this.groupedValues.get(p.GROUP_VALUES.Open)||[]},e.prototype.getPlanningTasksIds=function(){return this.groupedValues.get(p.GROUP_VALUES.Planning)||[]},e.prototype.getClosedTasksIds=function(){return this.groupedValues.get(p.GROUP_VALUES.Closed)||[]},e.prototype.getGeneralTasksIds=function(){return this.groupedValues.get(p.GROUP_VALUES.General)||[]},e.prototype.getInvalidTasksIds=function(){return this.groupedValues.get(p.GROUP_VALUES.Invalid)||[]},e.prototype.getChildTasks=function(t){return this.service.routeGenerator.get(p.Routes.GET_CHILD_TASKS).withExtractor(p.childTasksExtractor).withRouteParams({id:t}).setException("failed to get child tasks for task "+t).invoke()},e.prototype.getPickupQRCode=function(t){return this.service.routeGenerator.get(p.Routes.GET_PICKUP_QR_CODE).withExtractor(p.scanCodeExtractor).withRouteParams({id:t}).setException("failed to get QR code for task "+t).invoke()},e.prototype.rescheduleVirtualTasks=function(t,e,n){return this.service.routeGenerator.post(p.Routes.RESCHEDULE_VIRTUAL_TASKS).withExtractor(p.taskIdsExtractor).withPayload({task_ids:t,no_later_than:e,no_earlier_than:n}).setException("failed to get reschedule virtual tasks for tasks : ["+t.join(", ")+"]").invoke()},e.prototype.rescheduleCancelled=function(t){return this.service.routeGenerator.post(p.Routes.RESCHEDULE_CANCELED).withExtractor(p.successExtractor).withPayload({id:t}).setException("failed to reschedule cancelled task "+t).invoke()},e.prototype.unlock=function(t){return this.service.routeGenerator.post(p.Routes.UNLOCK_TASK).withExtractor(p.successExtractor).withPayload({task_ids:t}).setException("failed to unlock the tasks ["+t.join(", ")+"]").invoke()},e.prototype.lock=function(t){return this.service.routeGenerator.post(p.Routes.LOCK_TASK).withExtractor(p.successExtractor).withPayload({task_ids:t}).setException("failed to lock the tasks ["+t.join(", ")+"]").invoke()},e.prototype.duplicate=function(t){return this.service.routeGenerator.post(p.Routes.DUPLICATE_TASK).withExtractor(p.taskExtractor).withPayload({id:t}).setException("failed to duplicate task "+t).withRouteParams({id:t}).invoke()},e.prototype.submitForm=function(t){return this.service.routeGenerator.post(p.Routes.FORM_SUBMIT).withExtractor(p.formExtractor).withRouteParams({id:t.task_id,way_point_id:t.way_point_id}).withPayload(t).setException("failed to submit form").invoke()},e.prototype.getLocations=function(t){return this.service.routeGenerator.get(p.Routes.GET_TASK_LOCATIONS).withExtractor(p.locationExtractor).withRouteParams({id:t}).setException("failed to get location of the task "+t).invoke()},e.prototype.changeTeam=function(t,e){return this.service.routeGenerator.post(p.Routes.CHANGE_TASK_TEAM).withExtractor(p.successExtractor).withPayload({id:t,team_id:e}).setException("failed to change the team of task "+t).invoke()},e.prototype.activityLog=function(t){return this.service.routeGenerator.get(p.Routes.GET_TASK_ACTIVITY_LOG).withExtractor(p.defaultExtractor).withRouteParams({id:t}).setException("failed to get activity log for task "+t).invoke()},e.prototype.closedTaskByQuery=function(t,e,n){return this.service.routeGenerator.get(p.Routes.GET_CLOSED_TASKS_WITH_QUERY).withExtractor(p.defaultExtractor).withQueryString({query:t,page:e,limit:n}).setException("failed to get closed tasks with query "+t).invoke()},e.prototype.cancelAllOpen=function(){return this.service.routeGenerator.post(p.Routes.CANCEL_ALL_OPEN_TASKS).withExtractor(p.successExtractor).setException("failed to to cancel all open tasks").invoke()},e.prototype.updatePreparationStatus=function(t,e){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:return[4,this.service.routeGenerator.post(p.Routes.UPDATE_TASK_PREPARATION_STATUS).withExtractor(p.taskExtractor).setException("failed to update preparation status taskId: "+t+", status: "+e).withPayload({task_id:t,preparation_status:e}).invoke()];case 1:return n=r.sent(),[2,this.addOrUpdateTask(n)]}}))}))},e.prototype.closedSince=function(t){return s(this,void 0,void 0,(function(){var e,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.service.routeGenerator.get(p.Routes.GET_CLOSED_TASKS_SINCE_TIMESTAMP).withExtractor(p.defaultExtractor).setException("failed to fetched closed task").withQueryString({since:t}).invoke()];case 1:return(e=r.sent()).map((function(t){return n.addOrUpdateTask(t)})),[2,e]}}))}))},e.prototype.massCancel=function(t,e,n,r){return this.service.routeGenerator.post(p.Routes.MASS_TASK_CANCEL).withExtractor(p.successExtractor).setException("failed to cancel tasks ["+t.join(", ")+"]").withPayload({task_ids:t,reason:e,text:n,automatically_cancelled:r}).invoke()},e.prototype.releaseToDrivers=function(t){return this.service.routeGenerator.post(p.Routes.RELEASE_TASKS_TO_DRIVERS).withExtractor(p.successExtractor).setException("failed to release tasks ["+t.join(", ")+"] to drivers").withPayload({ids:t}).invoke()},e.prototype.moveToPlanning=function(t){return this.service.routeGenerator.post(p.Routes.MOVE_TASKS_TO_PLANNING).withExtractor(p.successExtractor).setException("failed to move tasks ["+t.join(", ")+"] to planning").withPayload({task_ids:t}).invoke()},e.prototype.massUnassign=function(t,e){return this.service.routeGenerator.post(p.Routes.MASS_TASK_UNASSIGN).withExtractor(p.successExtractor).setException("failed to unassign tasks "+t.join(", ")).withPayload({task_ids:t,options:e}).invoke()},e.prototype.massAssign=function(t,e,n,r){return this.service.routeGenerator.post(p.Routes.MASS_TASK_ASSIGN).withExtractor(p.successExtractor).setException("failed to assign tasks "+e.join(", ")+" to user "+t).withPayload({user_id:t,task_ids:e,options:n,target_run:r}).invoke()},e.prototype.batchGet=function(t){return s(this,void 0,void 0,(function(){var e,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.service.routeGenerator.get(p.Routes.BATCH_GET_TASK).withExtractor(p.tasksExtractor).setException("failed to fetch tasks ids - "+t.toString()).withQueryString({ids:t}).invoke()];case 1:return(e=r.sent()).map((function(t){return n.addOrUpdateTask(t)})),[2,e]}}))}))},e.prototype.get=function(t){return this.getOrFetch(t,p.defaultExtractor,p.defaultExtractor)},e.prototype.forceGet=function(t){return this.fetchAndStore(t,p.defaultExtractor,p.defaultExtractor)},e.prototype.acknowledge=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(p.Routes.ACKNOWLEDGE_TASK).withExtractor(p.taskExtractor).setException("failed to acknowledge task - "+t).withPayload({task_id:t}).invoke()];case 1:return e=n.sent(),[2,this.addOrUpdateTask(e)]}}))}))},e.prototype.cancel=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(p.Routes.CANCEL_TASK).withExtractor(p.defaultExtractor).setException("failed to cancel task - "+t).withRouteParams({id:t}).invoke()];case 1:return e=n.sent(),[2,this.addOrUpdateTask(e)]}}))}))},e.prototype.finish=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(p.Routes.FINISH_TASK).withExtractor(p.defaultExtractor).setException("failed to finish task - "+t).withRouteParams({id:t}).invoke()];case 1:return e=n.sent(),[2,this.addOrUpdateTask(e)]}}))}))},e.prototype.getPlanningTasks=function(t){return this.handleTasksRequest(p.Routes.GET_PLANNING_TASKS,t)},e.prototype.getOpenTasks=function(t){return this.handleTasksRequest(p.Routes.GET_OPEN_TASKS,t)},e.prototype.getOpenTasksKeySetPagination=function(t){return this.handleTasksKeySetPaginationRequest(p.Routes.GET_OPEN_TASKS,t)},e.prototype.getInvalidTasks=function(){return this.handleTasksRequest(p.Routes.GET_INVALID_TASKS)},e.prototype.updatePriorities=function(t){return this.service.routeGenerator.patch(p.Routes.UPDATE_TASKS_PRIORITIES).withExtractor(p.successExtractor).setException("failed to update priority of tasks "+t).withPayload({data:t}).invoke()},e.prototype.getTaskNotesByWayPoint=function(t,e){var n=this.store.getItem(t);return y.filter(n.task_notes,(function(t){return t.type===l.NoteType.TaskNote&&t.way_point_id===e}))},e.prototype.getTaskInventoriesByWayPoint=function(t,e){var n=this.store.getItem(t),r=y.filter(null==n?void 0:n.task_inventories,(function(t){return t.way_point_id===e}));return y.map(r,(function(t){return t.inventories=y.filter(r,(function(e){return e.parent_task_inventory_id==t.id})),t})).filter((function(t){return y.isNil(t.parent_task_inventory_id)}))},e.prototype.attachSubscriptions=function(){this.realTime.on(p.TaskRealTimeEvents.TASK_UPDATE,this.onUpdateTask),this.registerOnWayPointAdded(this.onWayPointAdded),this.registerOnWayPointUpdate(this.onWayPointUpdate),this.registerOnWayPointDeleted(this.onWayPointDeleted),this.realTime.on(p.TaskRealTimeEvents.NEW_SCAN,this.onNewScanAdded),this.realTime.on(p.TaskRealTimeEvents.NEW_NOTE,this.onNewNoteAdded),this.realTime.on(p.TaskRealTimeEvents.TASK_DELETED,this.onTaskDelete),this.realTime.on(p.TaskRealTimeEvents.NEW_TASK,this.onNewTaskAdded)},e}(c.default);e.default=b},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(417),s=function(){function t(t,e){this.entity=new i.default(t),this.merchantConfigurationApi=e}return t.prototype.getByAppId=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.getByAppId(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getByAppUuid=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.getByAppUuid(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.addApplicationById=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.addApplicationById(t)];case 1:return e=n.sent(),[4,this.merchantConfigurationApi.fetchConfiguration()];case 2:return n.sent(),[2,e]}}))}))},t.prototype.addApplicationByUuid=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.addApplicationByUuid(t)];case 1:return e=n.sent(),[4,this.merchantConfigurationApi.fetchConfiguration()];case 2:return n.sent(),[2,e]}}))}))},t.prototype.removeApplicationById=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.removeApplicationById(t)];case 1:return e.sent(),[4,this.merchantConfigurationApi.fetchConfiguration()];case 2:return e.sent(),[2]}}))}))},t.prototype.removeApplicationByUuid=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.removeApplicationByUuid(t)];case 1:return e.sent(),[4,this.merchantConfigurationApi.fetchConfiguration()];case 2:return e.sent(),[2]}}))}))},t.prototype.updateConfig=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.updateConfig(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getApplicationByUuid=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.getApplicationByUuid(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a="/merchant/applications",c={DELETE_APP_BY_UUID:a+"/no_id",GET_BY_ID:a+"/no_uuid"},l=function(t){function e(e){return t.call(this,{session:e,entityName:"applications",routePrefix:"merchant",routes:[u.BaseRoutes.Get,u.BaseRoutes.Update,u.BaseRoutes.Delete,u.BaseRoutes.Create]})||this}return o(e,t),e.prototype.addApplicationById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.create(t)];case 1:return[2,e.sent().application]}}))}))},e.prototype.addApplicationByUuid=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post(a).withExtractor((function(t){return t.application})).setException("could not add application").withPayload({uuid:t}).invoke()]}))}))},e.prototype.removeApplicationById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.delete(t)];case 1:return[2,e.sent().success]}}))}))},e.prototype.removeApplicationByUuid=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(c.DELETE_APP_BY_UUID).withExtractor((function(t){return t.success})).setException("could not remove application").withQueryString({uuid:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updateConfig=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.update(t,{data:e})];case 1:return[2,n.sent().success]}}))}))},e.prototype.getByAppId=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return(e=this.getAppConfigFromMerchantConfigurationByAppId(t))?[2,e]:[4,this.service.routeGenerator.get(c.GET_BY_ID).withExtractor((function(t){return t.config})).withQueryString({id:t}).setException("could not fetch application_merchant_configuration").invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getByAppUuid=function(t){return i(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return[4,this.getAppConfigFromMerchantConfigurationByUuid(t)];case 1:return(e=r.sent())?[2,e]:[4,this.service.get(t)];case 2:return[2,(n=r.sent())&&n.config]}}))}))},e.prototype.getAppConfigFromMerchantConfigurationByAppId=function(t){var e=this.service.session.merchantConfiguration;return e&&e.application_merchant_configurations?e.application_merchant_configurations.find((function(e){return e.application_id===t})):null},e.prototype.getAppConfigFromMerchantConfigurationByUuid=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.getApplicationByUuid(t)];case 1:return[2,(e=n.sent())&&this.getAppConfigFromMerchantConfigurationByAppId(e.id)]}}))}))},e.prototype.getApplicationByUuid=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){return(e=this.service.session.merchantConfiguration)&&e.applications?[2,e.applications.find((function(e){return e.uuid===t}))]:[2]}))}))},e}(u.default);e.default=l},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(419),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.getConfig=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.getConfig(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.updateConfig=function(t,e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.entity.updateConfig(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.removeConfig=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.removeConfig(t,e)];case 1:return[2,n.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=function(t){function e(e){return t.call(this,{session:e,entityName:"applications",routePrefix:"team",routes:[u.BaseRoutes.Get,u.BaseRoutes.Update,u.BaseRoutes.Delete,u.BaseRoutes.Create]})||this}return o(e,t),e.prototype.getConfig=function(t,e){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,this.service.get(t,{teamId:e})];case 1:return[2,(n=r.sent())&&n.config]}}))}))},e.prototype.updateConfig=function(t,e,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,this.service.update(t,{data:n,teamId:e})];case 1:return[2,r.sent().success]}}))}))},e.prototype.removeConfig=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.delete(t,{teamId:e})];case 1:return[2,n.sent().success]}}))}))},e}(u.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(421),o=function(){function t(t){this.googleMapsHelperEntity=new r.default(t)}return t.prototype.signUrl=function(t){return this.googleMapsHelperEntity.signUrl(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){return t.call(this,{session:e,entityName:"google_maps",routes:[]})||this}return o(e,t),e.prototype.signUrl=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/google_maps_helper/sign").withPayload({url:t}).withExtractor((function(t){return t})).setException("Failed to sign google maps api url").invoke()]}))}))},e}(n(5).default);e.default=u},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(423),s=function(){function t(t){this.onboardingEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.onboardingEntity.service.create({data:t})]}))}))},t.prototype.get=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.onboardingEntity.service.getAll()]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"merchant_onboarding",routes:[i.BaseRoutes.GetAll,i.BaseRoutes.Create]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(425),o=function(){function t(t){this.fleetRouterEntity=new r.default(t)}return t.prototype.getAll=function(){return this.fleetRouterEntity.service.getAll()},t.prototype.create=function(t){return this.fleetRouterEntity.service.create(t)},t.prototype.update=function(t,e){return this.fleetRouterEntity.service.update(t,e)},t.prototype.delete=function(t){return this.fleetRouterEntity.service.delete(t)},t.prototype.patch=function(t){return this.fleetRouterEntity.service.patch(void 0,t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),s=n(5),u=function(t){function e(e){return t.call(this,{session:e,entityName:"fleet_router",routeSuffix:"routing_rules",routes:[s.BaseRoutes.Create,s.BaseRoutes.Delete,s.BaseRoutes.Update,s.BaseRoutes.GetAll,s.BaseRoutes.Patch]})||this}return o(e,t),e}(i.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(427),o=n(428),i=n(429),s=function(){function t(t){this.alertConfigurationEntity=new r.default(t),this.configurationEntity=new o.default(t),this.alertSetEntity=new i.default(t)}return t.prototype.getAll=function(){return this.alertConfigurationEntity.service.getAll()},t.prototype.createSet=function(t){return this.alertSetEntity.service.create(t)},t.prototype.deleteSet=function(t){return this.alertSetEntity.service.delete(t)},t.prototype.updateSet=function(t,e){return this.alertSetEntity.service.patch(t,e)},t.prototype.createAlertConfiguration=function(t){return this.configurationEntity.service.create(t)},t.prototype.deleteAlertConfiguration=function(t){return this.configurationEntity.service.delete(t)},t.prototype.updateAlertConfiguration=function(t,e){return this.configurationEntity.service.patch(t,e)},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),s=n(5),u=function(t){function e(e){return t.call(this,{session:e,entityName:"alerts_configuration",routes:[s.BaseRoutes.Create,s.BaseRoutes.Delete,s.BaseRoutes.Update,s.BaseRoutes.GetAll,s.BaseRoutes.Patch]})||this}return o(e,t),e}(i.default);e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"configurations",routePrefix:"alerts_configuration",routes:[i.BaseRoutes.Patch,i.BaseRoutes.Delete,i.BaseRoutes.Create,i.BaseRoutes.Update]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"sets",routePrefix:"alerts_configuration",routes:[i.BaseRoutes.Patch,i.BaseRoutes.Delete,i.BaseRoutes.Create,i.BaseRoutes.Update]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(431),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.entity.getAll()];case 1:return[2,t.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=function(t){function e(e){return t.call(this,{session:e,entityName:"services_setup",routes:[u.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.getAll()];case 1:return[2,t.sent()]}}))}))},e}(u.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(433),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.update=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.update(t)]}))}))},t.prototype.getAvailableOpenFleets=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.entity.getAvailableFleets()];case 1:return[2,t.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.fleetTemplatesExtractor=e.Routes=void 0;var u=n(5);e.Routes={GET_AVAILABLE_FLEETS:"/fleet_templates/get_available_open_fleets"};var a=function(t){function n(e){return t.call(this,{session:e,entityName:"fleet_templates"})||this}return o(n,t),n.prototype.update=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.put("/fleet_templates/").setException("failed updating fleet_template").withPayload(t).invoke()]}))}))},n.prototype.getAvailableFleets=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(e.Routes.GET_AVAILABLE_FLEETS).withExtractor(e.fleetTemplatesExtractor).setException("Failed to get available fleet").invoke()]}))}))},n}(u.default);e.default=a;e.fleetTemplatesExtractor=function(t){return t.available_fleets}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(435),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.get=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.get()]}))}))},t.prototype.update=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.update(t)]}))}))},t.prototype.createSandboxTask=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.entity.createSandboxTask()];case 1:return t.sent(),[2]}}))}))},t.prototype.getMerchantCredentials=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.getMerchantCredentials(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getAllMerchantsCredentials=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.getAllMerchantsCredentials(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getAdminCredentials=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.entity.getAdminCredentials()];case 1:return[2,t.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=function(t){function e(e){return t.call(this,{session:e,entityName:"open_fleets",routes:[u.BaseRoutes.GetAll,u.BaseRoutes.Update]})||this}return o(e,t),e.prototype.get=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.getAll()]}))}))},e.prototype.update=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.put("/open_fleets/").setException("failed updating open_fleets").withPayload(t).invoke()]}))}))},e.prototype.createSandboxTask=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.post("/open_fleets/create_sandbox_task").setException("failed creating task for sandbox merchant").invoke()];case 1:return t.sent(),[2]}}))}))},e.prototype.getMerchantCredentials=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.get("/open_fleets/get_merchant_credentials").withQueryString({template_uuid:t,merchant_uuid:e}).setException("failed getting merchant credentials").invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getAllMerchantsCredentials=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get("/open_fleets/get_all_merchants_credentials").withQueryString({template_uuid:t}).setException("failed getting merchants credentials").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAdminCredentials=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.get("/open_fleets/get_admin_credentials").setException("failed getting open fleet admin credentials").invoke()];case 1:return[2,t.sent()]}}))}))},e}(u.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(437),o=function(){function t(t){this.geocodingEntity=new r.default(t)}return t.prototype.autoComplete=function(t){return this.geocodingEntity.autoComplete(t)},t.prototype.getPlaceDetails=function(t){return this.geocodingEntity.getPlaceDetails(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(5);e.Routes={AUTO_COMPLETE:"/api/geocoder/auto_complete",GET_PLACE_DETAILS:"/api/geocoder/place_details"};var a=function(t){function n(e){return t.call(this,{session:e,entityName:"/api/geocoder"})||this}return o(n,t),n.prototype.autoComplete=function(t){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){return n={address:t},[2,this.service.routeGenerator.post(e.Routes.AUTO_COMPLETE).withPayload(n).setException("Failed to get address autocomplete").invoke()]}))}))},n.prototype.getPlaceDetails=function(t){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){return n={place_id:t},[2,this.service.routeGenerator.post(e.Routes.GET_PLACE_DETAILS).withPayload(n).setException("Failed to get place details").invoke()]}))}))},n}(u.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(439),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.executeAction=function(t,e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.entity.executeAction(t,e,n)];case 1:return[2,r.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(9),c=n(490),l=n(11),f=function(t){function e(e){return t.call(this,{session:e,entityName:"application_action"})||this}return o(e,t),e.prototype.executeAction=function(t,e,n){return void 0===n&&(n={}),s(this,void 0,void 0,(function(){var r,o,s;return u(this,(function(u){switch(u.label){case 0:r=c.v4(),o="application action done ["+r+"]",l.defaults(n,{timeout:1e4}),u.label=1;case 1:return u.trys.push([1,,4,5]),s=this.waitForResultFromRealtime(o),[4,this.createApplicationAction({action_name:t,data:i(i({},e),{deadline:Date.now()+n.timeout}),uuid:r})];case 2:return u.sent(),[4,Promise.race([s,this.asyncTimeout(n.timeout)])];case 3:return[2,u.sent()];case 4:return this.realTime.off(o),[7];case 5:return[2]}}))}))},e.prototype.waitForResultFromRealtime=function(t){return s(this,void 0,void 0,(function(){var e=this;return u(this,(function(n){return[2,new Promise((function(n,r){e.realTime.on(t,(function(t){t.success?n(t.data):r(new Error(t.error))}))}))]}))}))},e.prototype.createApplicationAction=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post("/application_action/create").withExtractor((function(t){return t.uuid})).setException("could not execute action").withPayload(t).invoke()];case 1:return e.sent(),[2]}}))}))},e.prototype.asyncTimeout=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){return setTimeout(e,t)}))];case 1:throw e.sent(),new Error("timeout")}}))}))},e}(a.default);e.default=f},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(441),s=function(){function t(t){this.customerAvailabilityHourEntity=new i.default(t)}return t.prototype.getTaskCustomerAvailabilityHours=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.customerAvailabilityHourEntity.getTaskCustomerAvailabilityHours(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(9);e.Routes={GET_AVAILABILITY_HOURS:"/customer_availability_hours"};var a=function(t){function n(e){var n=t.call(this,{session:e,entityName:"customer_availability_hours"})||this;return n.taskCustomerAvailabilityHours=new Map,n}return o(n,t),n.prototype.getTaskCustomerAvailabilityHours=function(t){return i(this,void 0,void 0,(function(){var e,n,r,o=this;return s(this,(function(i){switch(i.label){case 0:return e=this._getKey(t.customer_id,t.task_id),this.taskCustomerAvailabilityHours.has(e)?[2,this.taskCustomerAvailabilityHours.get(e).map((function(t){return o.store.getItem(t)}))]:[4,this._getTaskCustomerAvailabilityHours(t)];case 1:return(n=i.sent()).forEach((function(t){return o.store.addToStore(t)})),r=n.map((function(t){return t.id})),this.taskCustomerAvailabilityHours.set(this._getKey(t.customer_id,t.task_id),r),[2,n]}}))}))},n.prototype._getTaskCustomerAvailabilityHours=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.get(e.Routes.GET_AVAILABILITY_HOURS).withQueryString(t).withExtractor((function(t){return t.availability_hours})).invoke()]}))}))},n.prototype._getKey=function(t,e){return"customer_id:"+t+":task_id:"+e},n}(u.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(443),o=function(){function t(t){this.shiftsEntity=new r.default(t)}return t.prototype.getShifts=function(t){return this.shiftsEntity.getShifts(t)},t.prototype.updateShifts=function(t,e){return this.shiftsEntity.updateShifts(t,e)},t.prototype.getBreaks=function(t){return this.shiftsEntity.getBreaks(t)},t.prototype.updateBreaks=function(t,e){return this.shiftsEntity.updateBreaks(t,e)},t.prototype.startShift=function(t,e){return this.shiftsEntity.startShift(t,e)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){return t.call(this,{session:e,entityName:"shifts"})||this}return o(e,t),e.prototype.getShifts=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.get("/teams/"+t+"/shifts_schedule/").setException("Failed to get shifts schedule").invoke()]}))}))},e.prototype.updateShifts=function(t,e){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){return n={id:t,configuration:e},[2,this.service.routeGenerator.put("/teams/"+t+"/shifts_schedule").withPayload(n).setException("Failed update shifts schedule").invoke()]}))}))},e.prototype.getBreaks=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.get("/teams/"+t+"/scheduled_breaks/").setException("Failed to get shifts breaks").invoke()]}))}))},e.prototype.updateBreaks=function(t,e){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){return n={id:t,configuration:e},[2,this.service.routeGenerator.put("/teams/"+t+"/scheduled_breaks").withPayload(n).setException("Failed update shift breaks").invoke()]}))}))},e.prototype.startShift=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.post("/users/"+t+"/shift").withPayload({active_team_id:e}).setException("Failed start user shift").invoke()]}))}))},e}(n(5).default);e.default=u},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(445),s=function(){function t(t){this.exclusionWindowEntity=new i.default(t)}return t.prototype.getAll=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.exclusionWindowEntity.service.getAll({team_id:t})]}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.exclusionWindowEntity.service.create(t)]}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.exclusionWindowEntity.service.update(t,e)]}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.exclusionWindowEntity.service.delete(t)]}))}))},t.prototype.copyFromMerchant=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.exclusionWindowEntity.copyFromMerchant(t,e)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(5);e.Routes={COPY_FROM_MERCHANT:"/merchant/exclusion_windows/copy_from_merchant"};var a=function(t){function n(e){return t.call(this,{session:e,entityName:"exclusion_windows",routePrefix:"merchant",routes:[u.BaseRoutes.GetAll,u.BaseRoutes.Create,u.BaseRoutes.Update,u.BaseRoutes.Delete]})||this}return o(n,t),n.prototype.copyFromMerchant=function(t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,this.service.routeGenerator.post(e.Routes.COPY_FROM_MERCHANT).withQueryString({team_id:t,id:n}).setException("Failed to copy exclusion windows from merchant").withExtractor((function(t){return t.exclusion_windows})).invoke()]}))}))},n}(u.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GET_COUNTRIES=void 0;var r=n(91),o=n(67),i=n(15),s=n(47),u=n(61),a=n(19),c=n(68);e.GET_COUNTRIES=new a.Route("/countries",0);var l=function(){function t(){}return t.getCountries=function(){return new r.AnonymousServiceRequest(u.BringgDashboardSDK.configurationProvider.getClientId()).invoke(c.default.parse(u.BringgDashboardSDK.configurationProvider.getRegionDiscoveryEndpoint()),e.GET_COUNTRIES,null,null).handle((function(t){var e=t.data;if(t.status!==o.HttpStatusCode.OK||!e.success)throw r.logErrorResponse(t),new i.BringgException(s.ExceptionReason.fromHttpStatusCode(o.HttpStatusCode.BAD_REQUEST),"Unable to get countries");return e.data}))},t}();e.default=l},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(448),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.service.getAll()]}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.service.create(t)]}))}))},t.prototype.destroy=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.service.delete(t)]}))}))},t.prototype.enable=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.enable(t)]}))}))},t.prototype.disable=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.disable(t)]}))}))},t.prototype.renew=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.renew(t)]}))}))},t.prototype.getAllEndpointsHierarchy=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getAllEndpointsHierarchy()]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a="/oauth/applications",c=function(t){function e(e){return t.call(this,{session:e,entityName:a,routes:[u.BaseRoutes.Create,u.BaseRoutes.Delete,u.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.enable=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/"+a+"/enable/{:id}").setException("failed to enable oauth application").withRouteParams({id:t}).invoke()]}))}))},e.prototype.disable=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/"+a+"/disable/{:id}").setException("failed to disable oauth application").withRouteParams({id:t}).invoke()]}))}))},e.prototype.renew=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/"+a+"/renew/{:id}").setException("failed to renew oauth application").withRouteParams({id:t}).invoke()]}))}))},e.prototype.getAllEndpointsHierarchy=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get("/"+a+"/get_all_endpoints_hierarchy").setException("failed to get all oauth application endpoints").invoke()]}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(450),o=function(){function t(t){this.inventory=new r.default(t)}return t.prototype.get=function(t){return this.inventory.service.get(t)},t.prototype.create=function(t){return this.inventory.service.create(t)},t.prototype.update=function(t,e){return this.inventory.service.update(t,e)},t.prototype.delete=function(t){return this.inventory.service.delete(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"inventories",routes:[i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete,i.BaseRoutes.Get]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(452),s=function(){function t(t){this.pushNotificationRegistrationEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.pushNotificationRegistrationEntity.service.create(t)]}))}))},t.prototype.remove=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.pushNotificationRegistrationEntity.service.delete(t,{unique_device_id:t})]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"push_registrations",routes:[i.BaseRoutes.Create,i.BaseRoutes.Delete]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(454),s=function(){function t(t){this.reasonToCancelTasksEntity=new i.default(t)}return t.prototype.getAll=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.reasonToCancelTasksEntity.getAll(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),s=n(5),u=function(t){return t.reasons_to_cancel_task},a=function(t){function e(e){return t.call(this,{session:e,entityName:"reason_to_cancel_tasks",routes:[s.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getAll=function(t){return this.service.routeGenerator.get("/reason_to_cancel_tasks").withExtractor(u).withQueryString({tag:t}).setException("Could not fetch delivery for reasons get cancel task tag id #"+t).invoke()},e}(i.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(456),s=function(){function t(t){this.customFilterEntity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.customFilterEntity.service.getAll()]}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.customFilterEntity.service.create(t)]}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.customFilterEntity.service.update(t,e)]}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.customFilterEntity.service.delete(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"custom_filters",routePrefix:"merchant",routes:[i.BaseRoutes.GetAll,i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(458),o=function(){function t(t){this.floatingInventory=new r.default(t)}return t.prototype.getUsersWithAvailableFloatingInventory=function(t){return this.floatingInventory.getUsersWithAvailableFloatingInventory(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=n(459),u=function(t){function e(e){return t.call(this,{session:e,entityName:"floating_inventories"})||this}return o(e,t),e.prototype.getUsersWithAvailableFloatingInventory=function(t){return this.service.routeGenerator.get("/floating_inventories/users_with_available_floating_inventory").withExtractor(s.userIdsExtractor).setException("failed to get available users for dispatch for task ["+t+"]").withQueryString({task_id:t}).invoke()},e}(i.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.userIdsExtractor=void 0;e.userIdsExtractor=function(t){return t.user_ids}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(461),o=function(){function t(t){this.serviceAreaEntity=new r.default(t)}return t.prototype.getAll=function(t){return this.serviceAreaEntity.service.getAll(t)},t.prototype.create=function(t){return this.serviceAreaEntity.service.create(t)},t.prototype.update=function(t,e){return this.serviceAreaEntity.service.update(t,e)},t.prototype.assign=function(t,e){return this.serviceAreaEntity.assign(t,e)},t.prototype.unassign=function(t){return this.serviceAreaEntity.unassign(t)},t.prototype.delete=function(t){return this.serviceAreaEntity.service.delete(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"service_areas",routes:[i.BaseRoutes.GetAll,i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete]})||this}return o(e,t),e.prototype.assign=function(t,e){return this.service.routeGenerator.put("/"+this.service.entityName+"/"+t+"/assign").withRouteParams({serviceAreaId:t}).withPayload(e).invoke()},e.prototype.unassign=function(t){return this.service.routeGenerator.put("/"+this.service.entityName+"/unassign_user").withPayload(t).invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(463),o=function(){function t(t){this.billingEntity=new r.default(t)}return t.prototype.getTasks=function(t){return this.billingEntity.getAllTasks(t)},t.prototype.getOrders=function(t){return this.billingEntity.getOrders(t)},t.prototype.getAggregatedTasks=function(t){return this.billingEntity.getAggregatedTasks(t)},t.prototype.getAggregatedTasksV2=function(t){return this.billingEntity.getAggregatedTasksV2(t)},t.prototype.getRefunds=function(t){return this.billingEntity.getRefunds(t)},t.prototype.getOrdersReport=function(t){return this.billingEntity.getOrdersReport(t)},t.prototype.getRefundsReport=function(t){return this.billingEntity.getRefundsReport(t)},t.prototype.getAggregatedByDaysTasksV2=function(t){return this.billingEntity.getAggregatedByDaysTasksV2(t)},t.prototype.getFleets=function(t){return this.billingEntity.getAllFleets(t)},t.prototype.getTeams=function(t){return this.billingEntity.getAllTeams(t)},t.prototype.getFleetsV3=function(t){return this.billingEntity.getAllFleetsV3(t)},t.prototype.getTeamsV3=function(t){return this.billingEntity.getAllTeamsV3(t)},t.prototype.postDispute=function(t){return this.billingEntity.postDispute(t)},t.prototype.getDisputesByTaskIds=function(t){return this.billingEntity.getDisputesByTaskIds(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u,a=n(5);!function(t){t.v1="v1",t.v2="v2",t.v3="v3"}(u||(u={}));var c="/billing-service",l={GET_TASKS:c+"/"+u.v1+"/tasks",GET_AGGREGATED_TASKS:c+"/"+u.v1+"/aggregated",GET_ORDERS:c+"/"+u.v2+"/billingData",GET_AGGREGATED_TASKS_V2:c+"/"+u.v2+"/billingData/aggregated",GET_ORDERS_REPORT:c+"/"+u.v2+"/billingData/report",GET_AGGREGATED_TASKS_BY_DAYS:c+"/"+u.v2+"/billingData/aggregatedByDays",GET_REFUNDS:c+"/"+u.v2+"/billingData/refunds",GET_REFUNDS_REPORT:c+"/"+u.v2+"/billingData/refunds/report",GET_FLEETS:c+"/"+u.v1+"/fleets",GET_FLEETS_V3:c+"/"+u.v3+"/fleets",GET_TEAMS:c+"/"+u.v1+"/teams",GET_TEAMS_V3:c+"/"+u.v3+"/teams",POST_DISPUTE:c+"/"+u.v1+"/dispute",GET_DISPUTES_BY_TASK_IDS:c+"/"+u.v1+"/dispute/getByTaskIds"},f=function(t){function e(e){return t.call(this,{session:e,entityName:"billing-service"})||this}return o(e,t),e.prototype.getAllTasks=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(l.GET_TASKS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getOrders=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_ORDERS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAggregatedTasks=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(l.GET_AGGREGATED_TASKS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAggregatedTasksV2=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_AGGREGATED_TASKS_V2).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getOrdersReport=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_ORDERS_REPORT).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getRefundsReport=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_REFUNDS_REPORT).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAggregatedByDaysTasksV2=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_AGGREGATED_TASKS_BY_DAYS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getRefunds=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_REFUNDS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAllFleets=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(l.GET_FLEETS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAllFleetsV3=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_FLEETS_V3).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAllTeams=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(l.GET_TEAMS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAllTeamsV3=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_TEAMS_V3).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.postDispute=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.POST_DISPUTE).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getDisputesByTaskIds=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_DISPUTES_BY_TASK_IDS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e}(a.default);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(465),o=function(){function t(t){this.packageEntity=new r.default(t)}return t.prototype.getPackageById=function(t){return this.packageEntity.getPackageById(t)},t.prototype.getAllTaskPackages=function(t){return this.packageEntity.getAllTaskPackages(t)},t.prototype.deletePackage=function(t){return this.packageEntity.deletePackage(t)},t.prototype.createPackage=function(t){return this.packageEntity.createPackage(t)},t.prototype.updatePackage=function(t){return this.packageEntity.updatePackage(t)},t.prototype.upsertPackage=function(t){return this.packageEntity.upsertPackage(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=n(466),c=function(t){function e(e){return t.call(this,{session:e,entityName:"package"})||this}return o(e,t),e.prototype.getPackageById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(a.Routes.GET).withQueryString(t).setException("failed to get package").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAllTaskPackages=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(a.Routes.GET_ALL_TASK_PACKAGES).withQueryString(t).setException("failed to get all task packages").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.deletePackage=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(a.Routes.GET).withQueryString(t).setException("failed to delete package").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.createPackage=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(a.Routes.GET).withPayload(t).setException("failed to create package").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updatePackage=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.patch(a.Routes.GET).withPayload(t).setException("failed to update package").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.upsertPackage=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(a.Routes.UPSERT).withPayload(t).setException("failed to upsert package").invoke()];case 1:return[2,e.sent()]}}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var r="/package-service/v1/package";e.Routes={GET:""+r,GET_ALL_TASK_PACKAGES:r+"/getAllTaskPackages",UPSERT:r+"/upsert"}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(468),s=n(471),u=function(){function t(t){this.session=t,this.userAnalytics=new i.default}return t.prototype.addSnippet=function(t){var e=t.apiKey;return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.userAnalytics.addSnippet({apiKey:e})];case 1:return[2,t.sent()]}}))}))},t.prototype.run=function(){return r(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:if(!(t=this.session.user.admin&&s.Role.ADMIN||this.session.user.dispatcher&&s.Role.DISPATCHER||this.session.user.driver&&s.Role.DRIVER||void 0))throw new Error("Invalid analytics user role");return[4,this.userAnalytics.run({user:{id:this.session.user.id,name:this.session.user.name,email:this.session.user.email,role:t,isImpersonated:"undefined"!=typeof localStorage&&Boolean(localStorage.getItem("ls.impersonate_original_user"))},merchant:{id:this.session.merchant.id,name:this.session.merchant.name,environment:this.session.user.region,isBringgAccount:1===this.session.merchant.id}})];case 1:return[2,e.sent()]}}))}))},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(469);e.default=class{constructor(){this.provider=new r.PendoProvider}async addSnippet(t){return await this.provider.addSnippet(t)}async run(t){return await this.provider.run(t)}async trackEvent(t){return await this.provider.trackEvent(t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PendoProvider=void 0;const r=n(470);e.PendoProvider=class{async addSnippet({apiKey:t}){(0,r.addSnippet)(t)}async run({user:t,merchant:e}){if("undefined"==typeof pendo)throw new Error("Pendo global is not defined");pendo.initialize({visitor:t,account:e})}async trackEvent({key:t,data:e}){pendo.track(t,e)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addSnippet=void 0;e.addSnippet=t=>{!function(e,n,r,o,i){var s,u,a,c,l;for((i=e[o]=e[o]||{})._q=i._q||[],u=0,a=(s=["initialize","identify","updateOptions","pageLoad","track"]).length;u<a;++u)!function(t){i[t]=i[t]||function(){i._q[t===s[0]?"unshift":"push"]([t].concat([].slice.call(arguments,0)))}}(s[u]);(c=n.createElement(r)).async=!0,c.src="https://cdn.eu.pendo.io/agent/static/"+t+"/pendo.js",(l=n.getElementsByTagName(r)[0]).parentNode.insertBefore(c,l)}(window,document,"script","pendo")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Role=void 0,function(t){t.ADMIN="admin",t.DISPATCHER="dispatcher",t.DRIVER="driver"}(e.Role||(e.Role={}))},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(473),s=function(){function t(t){this.analyticsReportsEntity=new i.default(t)}return t.prototype.getReport=function(t){return this.analyticsReportsEntity.getReport(t)},t.prototype.deleteReport=function(t){return this.analyticsReportsEntity.deleteReport(t)},t.prototype.getUserReports=function(t){return this.analyticsReportsEntity.getUserReports(t)},t.prototype.getSystemReports=function(t){return this.analyticsReportsEntity.getSystemReports(t)},t.prototype.createReportScheduledJob=function(t){return this.analyticsReportsEntity.createReportScheduledJob(t)},t.prototype.updateReportScheduledJob=function(t,e){return this.analyticsReportsEntity.updateReportScheduledJob(t,e)},t.prototype.getReportScheduledJob=function(t){return this.analyticsReportsEntity.getReportScheduledJob(t)},t.prototype.deleteReportScheduledJob=function(t){return this.analyticsReportsEntity.deleteReportScheduledJob(t)},t.prototype.getApiLink=function(){return this.analyticsReportsEntity.getApiLink()},t.prototype.getActiveReportExecutions=function(){return this.analyticsReportsEntity.getActiveReportExecutions()},t.prototype.exportReport=function(t,e){return this.analyticsReportsEntity.exportReport(t,e)},t.prototype.downloadReport=function(t,e){return this.analyticsReportsEntity.downloadReport(t,e)},t.prototype.retryReportExecution=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.analyticsReportsEntity.retryReportExecutions(t)]}))}))},t.prototype.removeReportExecution=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.analyticsReportsEntity.removeReportExecutions(t)]}))}))},t.prototype.subscribeReportExecutions=function(t){this.analyticsReportsEntity.subscribeReportExecutions(t)},t.prototype.unsubscribeReportExecutions=function(){this.analyticsReportsEntity.unsubscribeReportExecutions()},t.prototype.createReport=function(t){return this.analyticsReportsEntity.createReport(t)},t.prototype.updateReport=function(t,e){return this.analyticsReportsEntity.updateReport(t,e)},t.prototype.getReportRowsCount=function(t){return this.analyticsReportsEntity.getReportRowsCount(t)},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u,a=n(5),c=n(63);!function(t){t.v1="v1"}(u||(u={}));var l=function(t,e){return void 0===e&&(e=u.v1),"/analytics-service/"+e+t},f={GET_USER_REPORTS:l("/reports"),GET_SYSTEM_REPORTS:l("/system-reports"),GET_REPORT:l("/reports/{:reportId}"),CREATE_REPORT:l("/reports"),UPDATE_REPORT:l("/reports/{:reportId}"),DELETE_REPORT:l("/reports/{:reportId}"),CREATE_SCHEDULE_JOB:l("/scheduled-jobs"),UPDATE_SCHEDULE_JOB:l("/scheduled-jobs/{:jobId}"),GET_SCHEDULE_JOB:l("/scheduled-jobs/{:jobId}"),DELETE_SCHEDULE_JOB:l("/scheduled-jobs/{:jobId}"),GET_API_LINK:l("/api-link"),START_EXPORT_REPORT:l("/reports/{:reportId}/start-export"),START_DOWNLOAD_REPORT:l("/reports/{:reportId}/start-download"),GET_ACTIVE_REPORT_EXECUTIONS:l("/report-executions/active"),RETRY_EXECUTION_REPORT:l("/report-executions/{:executionId}/retry"),REMOVE_EXECUTION_REPORT:l("/report-executions/{:executionId}"),GET_REPORT_ROWS_COUNT:l("/report-query/rows-count")},p=function(t){function e(e){return t.call(this,{session:e,entityName:"analytics-service"})||this}return o(e,t),e.prototype.getReport=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(f.GET_REPORT).withRouteParams({reportId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.deleteReport=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(f.DELETE_REPORT).withRouteParams({reportId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.createReport=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(f.CREATE_REPORT).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updateReport=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.put(f.UPDATE_REPORT).withRouteParams({reportId:t}).withPayload(e).invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getUserReports=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(f.GET_USER_REPORTS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getSystemReports=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(f.GET_SYSTEM_REPORTS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.createReportScheduledJob=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(f.CREATE_SCHEDULE_JOB).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updateReportScheduledJob=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.put(f.UPDATE_SCHEDULE_JOB).withRouteParams({jobId:t}).withPayload(e).invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getReportScheduledJob=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(f.GET_SCHEDULE_JOB).withRouteParams({jobId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.deleteReportScheduledJob=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(f.DELETE_SCHEDULE_JOB).withRouteParams({jobId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getApiLink=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.get(f.GET_API_LINK).invoke()];case 1:return[2,t.sent()]}}))}))},e.prototype.exportReport=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(f.START_EXPORT_REPORT).withRouteParams({reportId:t}).withPayload(e).invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.downloadReport=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(f.START_DOWNLOAD_REPORT).withRouteParams({reportId:t}).withPayload(e).invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getActiveReportExecutions=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.get(f.GET_ACTIVE_REPORT_EXECUTIONS).invoke()];case 1:return[2,t.sent()]}}))}))},e.prototype.subscribeReportExecutions=function(t){this.service.session.persistentConnection.subscribe(new c.PubSubEvent("report_export_progress"),t)},e.prototype.unsubscribeReportExecutions=function(){this.service.session.persistentConnection.unsubscribe(new c.PubSubEvent("report_export_progress"))},e.prototype.retryReportExecutions=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(f.RETRY_EXECUTION_REPORT).withRouteParams({executionId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.removeReportExecutions=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(f.REMOVE_EXECUTION_REPORT).withRouteParams({executionId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getReportRowsCount=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(f.GET_REPORT_ROWS_COUNT).withPayload({queryJson:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e}(a.default);e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(475),o=function(){function t(t){this.servicePlansEntity=new r.default(t)}return t.prototype.getAll=function(){return this.servicePlansEntity.getAll()},t.prototype.get=function(t){return this.servicePlansEntity.service.get(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=n(9),c=n(476),l=function(t){function e(e){return t.call(this,{session:e,entityName:"service_plans",routes:[u.BaseRoutes.Create,u.BaseRoutes.Get,u.BaseRoutes.Delete,u.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.getAllOrFetch(null,c.planningResponseExtractor,c.planningResponseExtractor)]}))}))},e.prototype.get=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.getOrFetch(t,c.planningResponseExtractor,c.planningResponseExtractor)]}))}))},e}(a.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.planningResponseExtractor=void 0;e.planningResponseExtractor=function(t){return t.service_plans}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(478),o=function(){function t(t){this.alertsEntity=new r.default(t)}return t.prototype.attachSubscriptions=function(){this.alertsEntity.attachSubscriptions()},t.prototype.subscribeOnCreate=function(t){return this.alertsEntity.registerOnCreate(t)},t.prototype.subscribeOnDelete=function(t){return this.alertsEntity.registerOnDelete(t)},t.prototype.subscribeOnUpdateOwnership=function(t){return this.alertsEntity.registerOnUpdateOwnership(t)},t.prototype.getAlertsKeySetPagination=function(t){return this.alertsEntity.getAlertsKeySetPagination(t)},t.prototype.dismiss=function(t){return this.alertsEntity.dismiss(t)},t.prototype.batchDismiss=function(t){return this.alertsEntity.batchDismiss(t)},t.prototype.updateOwnership=function(t){return this.alertsEntity.updateOwnership(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=n(479),c=function(t){function e(e){var n=t.call(this,{session:e,entityName:"alerts"})||this;return n.isSubscriptionsAttached=!1,n._onUpdateOwnership=[],n.onUpdateOwnership=function(t){n._onUpdateOwnership.forEach((function(e){return e(t)}))},n.registerOnUpdateOwnership=function(t){return n._onUpdateOwnership.push(t),function(){return n._onUpdateOwnership.splice(n._onUpdateOwnership.indexOf(t),1)}},n}return o(e,t),e.prototype.attachSubscriptions=function(){this.isSubscriptionsAttached||(this.realTime.on(a.AlertRealTimeEvents.CREATED,this.onCreate),this.realTime.on(a.AlertRealTimeEvents.DELETED,this.onDelete),this.realTime.on(a.AlertRealTimeEvents.UPDATED_OWNERSHIP,this.onUpdateOwnership),this.isSubscriptionsAttached=!0)},e.prototype.getAlertsKeySetPagination=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(a.Routes.GET_ALL).withQueryString(t).setException("failed to get alerts").withExtractor(a.alertsExtractor).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.dismiss=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(a.Routes.DISMISS).withRouteParams({uuid:t}).setException("failed to dismiss alert "+t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.batchDismiss=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(a.Routes.BATCH_DISMISS).withPayload({ids:t}).setException("failed to dismiss alerts "+t.toString()).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updateOwnership=function(t){var e;return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(a.Routes.UPDATE_OWNERSHIP).withPayload(t).setException("failed to update alerts ownership "+(null===(e=null==t?void 0:t.alertUuids)||void 0===e?void 0:e.join(", "))).invoke()];case 1:return[2,n.sent()]}}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=e.AlertRealTimeEvents=e.alertsExtractor=void 0;e.alertsExtractor=function(t){return t.alerts},function(t){t.CREATED="new alert",t.DELETED="remove alert",t.UPDATED_OWNERSHIP="alert ownership updated"}(e.AlertRealTimeEvents||(e.AlertRealTimeEvents={}));e.Routes={GET_ALL:"/alerts",DISMISS:"/alerts/{:uuid}",BATCH_DISMISS:"/alerts/dismiss_by_ids",UPDATE_OWNERSHIP:"/alerts/ownership"}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(481),s=function(){function t(t){this.deliveryCatalogEntity=new i.default(t)}return t.prototype.getProviders=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.getProviders(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getFilters=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.deliveryCatalogEntity.getFilters()];case 1:return[2,t.sent()]}}))}))},t.prototype.getFiltersDetails=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.getFiltersDetails(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.toggleFavorites=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.toggleFavorites(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.sendEmailNotification=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.sendEmailNotification(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getFleetById=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.getFleetById(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getDeliveryById=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.getDeliveryById(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a="/delivery-provider-service/v1/delivery-providers",c={PROVIDERS:""+a,FILTERS:a+"/filters",FILTERS_DETAILS:a+"/filters/details",FAVOURITES:a+"/favorites",NOTIFICATION:"/delivery-provider-service/v1/merchant/delivery-providers/notify",FLEETS:"/fleet-service/v1/fleets/fleet",GET_DELIVERY_PROVIDER:a+"/delivery-provider"},l=function(t){function e(e){return t.call(this,{session:e,entityName:"fleet-service"})||this}return o(e,t),e.prototype.getProviders=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.PROVIDERS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getFilters=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.post(c.FILTERS).invoke()];case 1:return[2,t.sent()]}}))}))},e.prototype.getFiltersDetails=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.FILTERS_DETAILS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.toggleFavorites=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.FAVOURITES).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.sendEmailNotification=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.NOTIFICATION).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getFleetById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.FLEETS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getDeliveryById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.GET_DELIVERY_PROVIDER).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e}(u.default);e.default=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(70),s=n(24),u=n(15),a=n(19),c=function(t){function e(e){var n=t.call(this,e.config.getApiEndpoint(),e)||this;return n.cancel_requests=new a.Route("/route_optimizations/optimization",4),n}return o(e,t),e.prototype.cancelRequests=function(t){return this.handleAuthorizedRequest(this.cancel_requests,i.defaultExtractor,u.BringgException.serviceException("Failed to call cancel optimization requests"),{request_uuids:t})},e}(s.SessionBasedService);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.ZipCodes="zip_codes"}(r||(r={})),e.default=r},function(t,e,n){"use strict";var r;n.r(e);var o=new Uint8Array(16);function i(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}var s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var u=function(t){return"string"==typeof t&&s.test(t)},a=[],c=0;c<256;++c)a.push((c+256).toString(16).substr(1));var l,f,p=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n},h=0,d=0;var y=function(t,e,n){var r=e&&n||0,o=e||new Array(16),s=(t=t||{}).node||l,u=void 0!==t.clockseq?t.clockseq:f;if(null==s||null==u){var a=t.random||(t.rng||i)();null==s&&(s=l=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==u&&(u=f=16383&(a[6]<<8|a[7]))}var c=void 0!==t.msecs?t.msecs:Date.now(),y=void 0!==t.nsecs?t.nsecs:d+1,v=c-h+(y-d)/1e4;if(v<0&&void 0===t.clockseq&&(u=u+1&16383),(v<0||c>h)&&void 0===t.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=c,d=y,f=u;var _=(1e4*(268435455&(c+=122192928e5))+y)%4294967296;o[r++]=_>>>24&255,o[r++]=_>>>16&255,o[r++]=_>>>8&255,o[r++]=255&_;var b=c/4294967296*1e4&268435455;o[r++]=b>>>8&255,o[r++]=255&b,o[r++]=b>>>24&15|16,o[r++]=b>>>16&255,o[r++]=u>>>8|128,o[r++]=255&u;for(var g=0;g<6;++g)o[r+g]=s[g];return e||p(o)};var v=function(t){if(!u(t))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n};var _=function(t,e,n){function r(t,r,o,i){if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],n=0;n<t.length;++n)e.push(t.charCodeAt(n));return e}(t)),"string"==typeof r&&(r=v(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+t.length);if(s.set(r),s.set(t,r.length),(s=n(s))[6]=15&s[6]|e,s[8]=63&s[8]|128,o){i=i||0;for(var u=0;u<16;++u)o[i+u]=s[u];return o}return p(s)}try{r.name=t}catch(t){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r};function b(t){return 14+(t+64>>>9<<4)+1}function g(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function E(t,e,n,r,o,i){return g((s=g(g(e,t),g(r,i)))<<(u=o)|s>>>32-u,n);var s,u}function w(t,e,n,r,o,i,s){return E(e&n|~e&r,t,e,o,i,s)}function T(t,e,n,r,o,i,s){return E(e&r|n&~r,t,e,o,i,s)}function m(t,e,n,r,o,i,s){return E(e^n^r,t,e,o,i,s)}function O(t,e,n,r,o,i,s){return E(n^(e|~r),t,e,o,i,s)}var S=_("v3",48,(function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var n=0;n<e.length;++n)t[n]=e.charCodeAt(n)}return function(t){for(var e=[],n=32*t.length,r=0;r<n;r+=8){var o=t[r>>5]>>>r%32&255,i=parseInt("0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o),16);e.push(i)}return e}(function(t,e){t[e>>5]|=128<<e%32,t[b(e)-1]=e;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,s=0;s<t.length;s+=16){var u=n,a=r,c=o,l=i;n=w(n,r,o,i,t[s],7,-680876936),i=w(i,n,r,o,t[s+1],12,-389564586),o=w(o,i,n,r,t[s+2],17,606105819),r=w(r,o,i,n,t[s+3],22,-1044525330),n=w(n,r,o,i,t[s+4],7,-176418897),i=w(i,n,r,o,t[s+5],12,1200080426),o=w(o,i,n,r,t[s+6],17,-1473231341),r=w(r,o,i,n,t[s+7],22,-45705983),n=w(n,r,o,i,t[s+8],7,1770035416),i=w(i,n,r,o,t[s+9],12,-1958414417),o=w(o,i,n,r,t[s+10],17,-42063),r=w(r,o,i,n,t[s+11],22,-1990404162),n=w(n,r,o,i,t[s+12],7,1804603682),i=w(i,n,r,o,t[s+13],12,-40341101),o=w(o,i,n,r,t[s+14],17,-1502002290),r=w(r,o,i,n,t[s+15],22,1236535329),n=T(n,r,o,i,t[s+1],5,-165796510),i=T(i,n,r,o,t[s+6],9,-1069501632),o=T(o,i,n,r,t[s+11],14,643717713),r=T(r,o,i,n,t[s],20,-373897302),n=T(n,r,o,i,t[s+5],5,-701558691),i=T(i,n,r,o,t[s+10],9,38016083),o=T(o,i,n,r,t[s+15],14,-660478335),r=T(r,o,i,n,t[s+4],20,-405537848),n=T(n,r,o,i,t[s+9],5,568446438),i=T(i,n,r,o,t[s+14],9,-1019803690),o=T(o,i,n,r,t[s+3],14,-187363961),r=T(r,o,i,n,t[s+8],20,1163531501),n=T(n,r,o,i,t[s+13],5,-1444681467),i=T(i,n,r,o,t[s+2],9,-51403784),o=T(o,i,n,r,t[s+7],14,1735328473),r=T(r,o,i,n,t[s+12],20,-1926607734),n=m(n,r,o,i,t[s+5],4,-378558),i=m(i,n,r,o,t[s+8],11,-2022574463),o=m(o,i,n,r,t[s+11],16,1839030562),r=m(r,o,i,n,t[s+14],23,-35309556),n=m(n,r,o,i,t[s+1],4,-1530992060),i=m(i,n,r,o,t[s+4],11,1272893353),o=m(o,i,n,r,t[s+7],16,-155497632),r=m(r,o,i,n,t[s+10],23,-1094730640),n=m(n,r,o,i,t[s+13],4,681279174),i=m(i,n,r,o,t[s],11,-358537222),o=m(o,i,n,r,t[s+3],16,-722521979),r=m(r,o,i,n,t[s+6],23,76029189),n=m(n,r,o,i,t[s+9],4,-640364487),i=m(i,n,r,o,t[s+12],11,-421815835),o=m(o,i,n,r,t[s+15],16,530742520),r=m(r,o,i,n,t[s+2],23,-995338651),n=O(n,r,o,i,t[s],6,-198630844),i=O(i,n,r,o,t[s+7],10,1126891415),o=O(o,i,n,r,t[s+14],15,-1416354905),r=O(r,o,i,n,t[s+5],21,-57434055),n=O(n,r,o,i,t[s+12],6,1700485571),i=O(i,n,r,o,t[s+3],10,-1894986606),o=O(o,i,n,r,t[s+10],15,-1051523),r=O(r,o,i,n,t[s+1],21,-2054922799),n=O(n,r,o,i,t[s+8],6,1873313359),i=O(i,n,r,o,t[s+15],10,-30611744),o=O(o,i,n,r,t[s+6],15,-1560198380),r=O(r,o,i,n,t[s+13],21,1309151649),n=O(n,r,o,i,t[s+4],6,-145523070),i=O(i,n,r,o,t[s+11],10,-1120210379),o=O(o,i,n,r,t[s+2],15,718787259),r=O(r,o,i,n,t[s+9],21,-343485551),n=g(n,u),r=g(r,a),o=g(o,c),i=g(i,l)}return[n,r,o,i]}(function(t){if(0===t.length)return[];for(var e=8*t.length,n=new Uint32Array(b(e)),r=0;r<e;r+=8)n[r>>5]|=(255&t[r/8])<<r%32;return n}(t),8*t.length))}));var R=function(t,e,n){var r=(t=t||{}).random||(t.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return p(r)};function A(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:return e^n^r;case 2:return e&n^e&r^n&r;case 3:return e^n^r}}function x(t,e){return t<<e|t>>>32-e}var P=_("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var r=unescape(encodeURIComponent(t));t=[];for(var o=0;o<r.length;++o)t.push(r.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var i=t.length/4+2,s=Math.ceil(i/16),u=new Array(s),a=0;a<s;++a){for(var c=new Uint32Array(16),l=0;l<16;++l)c[l]=t[64*a+4*l]<<24|t[64*a+4*l+1]<<16|t[64*a+4*l+2]<<8|t[64*a+4*l+3];u[a]=c}u[s-1][14]=8*(t.length-1)/Math.pow(2,32),u[s-1][14]=Math.floor(u[s-1][14]),u[s-1][15]=8*(t.length-1)&4294967295;for(var f=0;f<s;++f){for(var p=new Uint32Array(80),h=0;h<16;++h)p[h]=u[f][h];for(var d=16;d<80;++d)p[d]=x(p[d-3]^p[d-8]^p[d-14]^p[d-16],1);for(var y=n[0],v=n[1],_=n[2],b=n[3],g=n[4],E=0;E<80;++E){var w=Math.floor(E/20),T=x(y,5)+A(w,v,_,b)+g+e[w]+p[E]>>>0;g=b,b=_,_=x(v,30)>>>0,v=y,y=T}n[0]=n[0]+y>>>0,n[1]=n[1]+v>>>0,n[2]=n[2]+_>>>0,n[3]=n[3]+b>>>0,n[4]=n[4]+g>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));var C=function(t){if(!u(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)};n.d(e,"v1",(function(){return y})),n.d(e,"v3",(function(){return S})),n.d(e,"v4",(function(){return R})),n.d(e,"v5",(function(){return P})),n.d(e,"NIL",(function(){return"00000000-0000-0000-0000-000000000000"})),n.d(e,"version",(function(){return C})),n.d(e,"validate",(function(){return u})),n.d(e,"stringify",(function(){return p})),n.d(e,"parse",(function(){return v}))}]);
|
|
31
|
+
var r=n(168),o=n(169),i=n(170);function s(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=a.prototype:(null===t&&(t=new a(e)),t.length=e),t}function a(t,e,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);a.TYPED_ARRAY_SUPPORT?(t=e).__proto__=a.prototype:t=p(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),o=(t=u(t,r)).write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(a.isBuffer(e)){var n=0|h(e.length);return 0===(t=u(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?u(t,0):p(t,e);if("Buffer"===e.type&&i(e.data))return p(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=u(t,e<0?0:0|h(e)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|h(e.length);t=u(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(r)return B(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,n);case"utf8":case"utf-8":return R(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return x(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function _(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=a.from(e,r)),a.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,o);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,o){var i,s=1,u=t.length,a=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,u/=2,a/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var l=-1;for(i=n;i<u;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===a)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(n+a>u&&(n=u-a),i=n;i>=0;i--){for(var f=!0,p=0;p<a;p++)if(c(t,i+p)!==c(e,p)){f=!1;break}if(f)return i}return-1}function E(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var u=parseInt(e.substr(2*s,2),16);if(isNaN(u))return s;t[n+s]=u}return s}function g(t,e,n,r){return H(B(e,t.length-n),t,n,r)}function w(t,e,n,r){return H(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function T(t,e,n,r){return w(t,e,n,r)}function m(t,e,n,r){return H(F(e),t,n,r)}function O(t,e,n,r){return H(function(t,e){for(var n,r,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function R(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,s,u,a,c=t[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(a=(31&c)<<6|63&i)>127&&(l=a);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(a=(15&c)<<12|(63&i)<<6|63&s)>2047&&(a<55296||a>57343)&&(l=a);break;case 4:i=t[o+1],s=t[o+2],u=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&u)&&(a=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&u)>65535&&a<1114112&&(l=a)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=a,e.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},e.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,n){return c(null,t,e,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?u(t,e):void 0!==n?"string"==typeof r?u(t,e).fill(n,r):u(t,e).fill(n):u(t,e)}(null,t,e,n)},a.allocUnsafe=function(t){return f(null,t)},a.allocUnsafeSlow=function(t){return f(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=a.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!a.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):y.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,e,n,r,o){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),u=Math.min(i,s),c=this.slice(r,o),l=t.slice(e,n),f=0;f<u;++f)if(c[f]!==l[f]){i=c[f],s=l[f];break}return i<s?-1:s<i?1:0},a.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},a.prototype.indexOf=function(t,e,n){return _(this,t,e,n,!0)},a.prototype.lastIndexOf=function(t,e,n){return _(this,t,e,n,!1)},a.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,t,e,n);case"utf8":case"utf-8":return g(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return T(this,t,e,n);case"base64":return m(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function x(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function P(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=G(t[i]);return o}function C(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function I(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function k(t,e,n,r,o,i){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function N(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function D(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function U(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,i){return i||U(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,i){return i||U(t,0,n,8),o.write(t,e,n,r,52,8),n+8}a.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),a.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=a.prototype;else{var o=e-t;n=new a(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},a.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},a.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},a.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},a.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},a.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||k(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},a.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||k(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},a.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);k(this,t,e,n,o-1,-o)}var i=0,s=1,u=0;for(this[e]=255&t;++i<n&&(s*=256);)t<0&&0===u&&0!==this[e+i-1]&&(u=1),this[e+i]=(t/s>>0)-u&255;return e+n},a.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);k(this,t,e,n,o-1,-o)}var i=n-1,s=1,u=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===u&&0!==this[e+i+1]&&(u=1),this[e+i]=(t/s>>0)-u&255;return e+n},a.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},a.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},a.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},a.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},a.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!a.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},a.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var s=a.isBuffer(t)?t:B(new a(t,r).toString()),u=s.length;for(i=0;i<n-e;++i)this[i+e]=s[i%u]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function F(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n(104))},function(t,e){var n={utf8:{stringToBytes:function(t){return n.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(n.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e},bytesToString:function(t){for(var e=[],n=0;n<t.length;n++)e.push(String.fromCharCode(t[n]));return e.join("")}}};t.exports=n},function(t,e){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,o=t.indexOf("["),i=t.indexOf("]");-1!=o&&-1!=i&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));for(var s,u,a=n.exec(t||""),c={},l=14;l--;)c[r[l]]=a[l]||"";return-1!=o&&-1!=i&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=function(t,e){var n=e.replace(/\/{2,9}/g,"/").split("/");"/"!=e.substr(0,1)&&0!==e.length||n.splice(0,1);"/"==e.substr(e.length-1,1)&&n.splice(n.length-1,1);return n}(0,c.path),c.queryKey=(s=c.query,u={},s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,n){e&&(u[e]=n)})),u),c}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const r=n(178),o=n(126),i=n(95),s=n(128),u=n(191),a=n(129),c=n(32)("socket.io-client:manager");class l extends a.StrictEventEmitter{constructor(t,e){super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new u({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const n=e.parser||i;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(c("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;c("opening %s",this.uri),this.engine=r(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=s.on(e,"open",(function(){n.onopen(),t&&t()})),i=s.on(e,"error",e=>{c("error"),n.cleanup(),n._readyState="closed",this.emitReserved("error",e),t?t(e):n.maybeReconnectOnOpen()});if(!1!==this._timeout){const t=this._timeout;c("connect attempt will timeout after %d",t),0===t&&o();const n=setTimeout(()=>{c("connect attempt timed out after %d",t),o(),e.close(),e.emit("error",new Error("timeout"))},t);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}return this.subs.push(o),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){c("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(s.on(t,"ping",this.onping.bind(this)),s.on(t,"data",this.ondata.bind(this)),s.on(t,"error",this.onerror.bind(this)),s.on(t,"close",this.onclose.bind(this)),s.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){this.decoder.add(t)}ondecoded(t){this.emitReserved("packet",t)}onerror(t){c("error",t),this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n||(n=new o.Socket(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return void c("socket %s is still active, skipping close",t)}this._close()}_packet(t){c("writing packet %j",t);const e=this.encoder.encode(t);for(let n=0;n<e.length;n++)this.engine.write(e[n],t.options)}cleanup(){c("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){c("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,"opening"===this._readyState&&this.cleanup(),this.backoff.reset(),this._readyState="closed",this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t){c("onclose"),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();c("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const n=setTimeout(()=>{t.skipReconnect||(c("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(c("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(c("reconnect success"),t.onreconnect())}))},e);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=l},function(t,e,n){const r=n(121),o=n(181),i=n(185),s=n(186);e.polling=function(t){let e,n=!1,s=!1;const u=!1!==t.jsonp;if("undefined"!=typeof location){const e="https:"===location.protocol;let r=location.port;r||(r=e?443:80),n=t.hostname!==location.hostname||r!==t.port,s=t.secure!==e}if(t.xdomain=n,t.xscheme=s,e=new r(t),"open"in e&&!t.forceJSONP)return new o(t);if(!u)throw new Error("JSONP disabled");return new i(t)},e.websocket=s},function(t,e,n){const r=n(180),o=n(69);t.exports=function(t){const e=t.xdomain,n=t.xscheme,i=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(t){}if(!e)try{return new(o[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},function(t,e,n){const r=n(92),o=n(94),i=n(62),s=n(124),u=n(32)("engine.io-client:polling");t.exports=class extends r{get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{u("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(u("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){u("pre-pause polling complete"),--t||e()}))),this.writable||(u("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){u("pre-pause writing complete"),--t||e()})))}else e()}poll(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")}onData(t){u("polling got data %s",t);i.decodePayload(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose(),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{u("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,i.encodePayload(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emit("drain")})})}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let n="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=s()),this.supportsBinary||t.sid||(t.b64=1),t=o.encode(t),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),t.length&&(t="?"+t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+t}}},function(t,e){const n=Object.create(null);n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";const r=Object.create(null);Object.keys(n).forEach(t=>{r[n[t]]=t});t.exports={PACKET_TYPES:n,PACKET_TYPES_REVERSE:r,ERROR_PACKET:{type:"error",data:"parser error"}}},function(t,e,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i={},s=0,u=0;function a(t){var e="";do{e=o[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function c(){var t=a(+new Date);return t!==r?(s=0,r=t):t+"."+a(s++)}for(;u<64;u++)i[o[u]]=u;c.encode=a,c.decode=function(t){var e=0;for(u=0;u<t.length;u++)e=64*e+i[t.charAt(u)];return e},t.exports=c},function(t,e){t.exports.pick=(t,...e)=>e.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const r=n(95),o=n(128),i=n(129),s=n(32)("socket.io-client:socket"),u=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class a extends i.StrictEventEmitter{constructor(t,e,n){super(),this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.auth&&(this.auth=n.auth),this.io._autoConnect&&this.open()}subEvents(){if(this.subs)return;const t=this.io;this.subs=[o.on(t,"open",this.onopen.bind(this)),o.on(t,"packet",this.onpacket.bind(this)),o.on(t,"error",this.onerror.bind(this)),o.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(u.hasOwnProperty(t))throw new Error('"'+t+'" is a reserved event name');e.unshift(t);const n={type:r.PacketType.EVENT,data:e,options:{}};n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(s("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++);const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)?s("discard packet as the transport is not currently writable"):this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){s("transport is open - connecting"),"function"==typeof this.auth?this.auth(t=>{this.packet({type:r.PacketType.CONNECT,data:t})}):this.packet({type:r.PacketType.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t){s("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emitReserved("disconnect",t)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case r.PacketType.CONNECT:if(t.data&&t.data.sid){const e=t.data.sid;this.onconnect(e)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case r.PacketType.EVENT:case r.PacketType.BINARY_EVENT:this.onevent(t);break;case r.PacketType.ACK:case r.PacketType.BINARY_ACK:this.onack(t);break;case r.PacketType.DISCONNECT:this.ondisconnect();break;case r.PacketType.CONNECT_ERROR:const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];s("emitting event %j",e),null!=t.id&&(s("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t)}ack(t){const e=this;let n=!1;return function(...o){n||(n=!0,s("sending ack %j",o),e.packet({type:r.PacketType.ACK,id:t,data:o}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(s("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):s("bad ack %s",t.id)}onconnect(t){s("socket connected with id %s",t),this.id=t,this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>this.packet(t)),this.sendBuffer=[]}ondisconnect(){s("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(s("performing disconnect (%s)",this.nsp),this.packet({type:r.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}}e.Socket=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const r="function"==typeof ArrayBuffer,o=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);function u(t){return r&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||i&&t instanceof Blob||s&&t instanceof File}e.isBinary=u,e.hasBinary=function t(e,n){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(t(e[n]))return!0;return!1}if(u(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return t(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return!0;return!1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=void 0,e.on=function(t,e,n){return t.on(e,n),function(){t.off(e,n)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StrictEventEmitter=void 0;const r=n(190);e.StrictEventEmitter=class extends r{on(t,e){return super.on(t,e),this}once(t,e){return super.once(t,e),this}emit(t,...e){return super.emit(t,...e),this}emitReserved(t,...e){return super.emit(t,...e),this}listeners(t){return super.listeners(t)}}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationProvider=void 0;var i=n(68),s=n(39),u=n(61),a=function(){function t(t){this.config=t}return t.fromUrl=function(e){return r(this,void 0,void 0,(function(){var n,r,u;return o(this,(function(o){switch(o.label){case 0:n=e instanceof i.default?e.encode():e,o.label=1;case 1:return o.trys.push([1,3,,4]),r=t.bind,[4,c(n)];case 2:return[2,new(r.apply(t,[void 0,o.sent()]))];case 3:throw u=o.sent(),s.default.error("can't initialise configuration from "+n),u;case 4:return[2]}}))}))},t.fromJson=function(e){return new t(JSON.parse(e))},t.getNextRegion=function(t){var e=u.BringgDashboardSDK.configurationProvider.getRegions(),n=e.indexOf(t);return e.length-1===n?e[0]:e[n+1]},t.prototype.getApiEndpoint=function(t){return this.config.regions[t].web_api_url},t.prototype.getRegionDiscoveryEndpoint=function(){return this.config.regions[this.getDefaultRegion()].web_api_url},t.prototype.getAuthenticationEndpoint=function(t){return this.config.regions[t].identity_api_url},t.prototype.getMonitoringEndpoint=function(t){return this.config.regions[t].real_time_url},t.prototype.getDefaultRegion=function(){return this.config.default_region},t.prototype.getRegions=function(){return Object.keys(this.config.regions)},t.prototype.getClientId=function(){return"Bringg Dashboard"},t.prototype.isUserAnalyticsEnabled=function(){return this.config.user_analytics.enabled},t.prototype.getUserAnalyticsApiKey=function(){return this.config.user_analytics.api_key},t.getConfigUrl=function(t){return"https://s3.amazonaws.com/bringg-hosts/regions/"+t+".json"},t}();function c(t){return fetch(t).then((function(t){if(!t.ok)throw new Error(t.statusText);return t.json().then((function(t){return t}))}))}e.ConfigurationProvider=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=function(t){return"function"==typeof t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(98),o=n(133);e.empty={closed:!0,next:function(t){},error:function(t){if(r.config.useDeprecatedSynchronousErrorHandling)throw t;o.hostReportError(t)},complete:function(){}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hostReportError=function(t){setTimeout((function(){throw t}),0)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DASHBOARD_EVENTS=void 0,e.DASHBOARD_EVENTS={DASHBOARDS_DATA_UPDATED:"dashboards data updated",WIDGET_DATA_FETCHED:"widget data fetched"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reasonToChangeInventoryExtractor=void 0;e.reasonToChangeInventoryExtractor=function(t){return t.reasons_to_change_inventories}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.taskInventoryExtractor=e.taskInventoryMassQuantityExtractor=void 0;e.taskInventoryMassQuantityExtractor=function(t){return t.task_inventories};e.taskInventoryExtractor=function(t){return t.task_inventory}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multipleExtractor=e.singleExtractor=e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t};e.singleExtractor=function(t){return t.conversation};e.multipleExtractor=function(t){return t.conversations}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multipleExtractor=e.singleExtractor=e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t};e.singleExtractor=function(t){return t.message};e.multipleExtractor=function(t){return t.messages}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notificationsTemplateExtractor=e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t};e.notificationsTemplateExtractor=function(t){return t.notification_templates}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCsvFieldsExtractor=e.assignmentHistoryExtractor=e.vehiclesExtractor=e.successExtractor=e.vehicleExtractor=e.REAL_TIME_EVENTS=e.INTERNAL_VEHICLE_EVENTS=void 0,e.INTERNAL_VEHICLE_EVENTS={VEHICLE_UPDATED:"vehicle updated"},e.REAL_TIME_EVENTS={VEHICLE_UPDATE:"vehicle update",VEHICLE_REMOVED:"vehicle removed"};e.vehicleExtractor=function(t){return t.vehicle};e.successExtractor=function(t){return t.success};e.vehiclesExtractor=function(t){return t.vehicles};e.assignmentHistoryExtractor=function(t){return t.changes};e.getCsvFieldsExtractor=function(t){return t.csv_upload_fields}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RunStatus=e.ResourceUploadType=e.DeliveryBlockConsts=e.TagConsts=e.Responses=e.ChatConversationConsts=e.ChatMessageConsts=e.CrewConsts=e.DashboardConsts=e.LanguageConsts=e.NotificationTemplateConsts=e.NotificationTypesConsts=e.PlannedRoutesConsts=e.ReasonToChangeInventory=e.RunConsts=e.TaskInventoryConsts=e.VehicleTypeConsts=e.BringgDashboardSDK=void 0;var r=n(11),o=n(39),i=n(61);Object.defineProperty(e,"BringgDashboardSDK",{enumerable:!0,get:function(){return i.BringgDashboardSDK}});var s=n(492);e.VehicleTypeConsts=s;var u=n(136);e.TaskInventoryConsts=u;var a=n(73);e.RunConsts=a;var c=n(135);e.ReasonToChangeInventory=c;var l=n(493);e.PlannedRoutesConsts=l;var f=n(140);e.NotificationTypesConsts=f;var p=n(141);e.NotificationTemplateConsts=p;var h=n(139);e.LanguageConsts=h;var d=n(134);e.DashboardConsts=d;var y=n(494);e.CrewConsts=y;var v=n(138);e.ChatMessageConsts=v;var _=n(137);e.ChatConversationConsts=_;var b=n(495);e.Responses=b;var E=n(496);e.TagConsts=E;var g=n(497);e.DeliveryBlockConsts=g;var w=n(498);e.ResourceUploadType=w.default;var T=n(73);Object.defineProperty(e,"RunStatus",{enumerable:!0,get:function(){return T.RunStatus}}),t.exports={},r.extend(t.exports,i.BringgDashboardSDK),r.extend(t.exports,o.LoggerUtil),r.extend(t.exports,{LOG_ALL:o.LOG_ALL,LOG_NONE:o.LOG_NONE,LOG_FATAL:o.LOG_FATAL,LOG_ERROR:o.LOG_ERROR,LOG_WARN:o.LOG_WARN,LOG_INFO:o.LOG_INFO,LOG_DEBUG:o.LOG_DEBUG,LOG_LEVEL:o.LOG_LEVEL})},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0});var s=n(105),u=n(172),a=n(130),c=n(68),l=n(61),f=n(63),p=n(193),h=n(39),d=n(67),y=n(194),v=function(){function t(t){this.merchant=null,this.webApplicationConfiguration=null,this.user=t,this.eventHandlers=new Set,this.sendDataEvent=this.sendDataEvent.bind(this)}return t.prototype.setEventHandler=function(t){this.eventHandlers.add(t)},t.prototype.sendDataEvent=function(e,n){t.sendDataEventInternal(this.eventHandlers,e,n)},t.prototype.update=function(t,e){if(!this[t])throw new Error("tried to update key: "+t+" not existing!");this[t]=y(this[t],e,{arrayMerge:function(t,e){return e}})},t.sendDataEventInternal=function(e,n,r){e.forEach((function(e){return t.checked(e,n,r)}))},t._merge=function(t,e){var n,r;try{for(var o=i(e),s=o.next();!s.done;s=o.next()){var u=s.value;t[u]=e[u]}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.fromUser=function(e,n){return void 0===n&&(n=!0),r(this,void 0,void 0,(function(){var r,i;return o(this,(function(o){switch(o.label){case 0:return r=new t(e),n?(i=r,[4,u.default.init(r)]):[3,2];case 1:i._persistentConnection=o.sent(),r._persistentConnection.subscribe(f.EMPLOYEE_UPDATE_EVENT,(function(e){e.uuid===r.user.uuid&&(t._merge(r.user,e),r.sendDataEvent("current user updated",r.user))})),o.label=2;case 2:return[2,r]}}))}))},Object.defineProperty(t.prototype,"userId",{get:function(){return this.user.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"region",{get:function(){return this.user.region?this.user.region:l.BringgDashboardSDK.configurationProvider.getDefaultRegion()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientId",{get:function(){return l.BringgDashboardSDK.configurationProvider.getClientId()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"config",{get:function(){var t=this;return new(function(){function e(){}return e.prototype.getApiEndpoint=function(){return c.default.parse(l.BringgDashboardSDK.configurationProvider.getApiEndpoint(t.region))},e.prototype.getAuthenticationEndpoint=function(){return c.default.parse(l.BringgDashboardSDK.configurationProvider.getAuthenticationEndpoint(t.region))},e.prototype.getMonitoringEndpoint=function(){return c.default.parse(l.BringgDashboardSDK.configurationProvider.getMonitoringEndpoint(t.region))},e}())},enumerable:!1,configurable:!0}),t.init=function(e){return r(this,void 0,void 0,(function(){var n,r,i,u;return o(this,(function(o){switch(o.label){case 0:return e.user?[3,6]:(r=s.default.init(e.region),e.authenticationToken?[4,r.loginWithToken(e.authenticationToken)]:[3,2]);case 1:return n=o.sent(),[3,6];case 2:return e.email?(i=e,[4,this.loginWithEmailRetry(e.region,i.email,i.password,i.merchant_uuid,i.recaptchaToken,i.recaptcha_qa_token,0)]):[3,4];case 3:return n=o.sent(),[3,6];case 4:return e.code?(u=e,[4,r.loginWithSessionCode(u.code,u.session)]):[3,6];case 5:n=o.sent(),o.label=6;case 6:return[2,t.fromUser(n)]}}))}))},t.loginWithEmailRetry=function(t,e,n,i,u,c,f){return r(this,void 0,void 0,(function(){var p,y,v,_=this;return o(this,(function(b){switch(b.label){case 0:p=t||l.BringgDashboardSDK.configurationProvider.getDefaultRegion(),f++,y=s.default.init(p),b.label=1;case 1:return b.trys.push([1,3,,4]),[4,y.loginWithEmail(e,n,i,u,c)];case 2:return[2,b.sent()];case 3:if(v=b.sent(),f<10&&v.message===d.REGION_NOT_WORKING)return h.default.error("Region is not accessible - "+p+", "+v.message),[2,new Promise((function(t,s){setTimeout((function(){return r(_,void 0,void 0,(function(){var r,l;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=t,[4,this.loginWithEmailRetry(a.ConfigurationProvider.getNextRegion(p),e,n,i,u,c,f)];case 1:return r.apply(void 0,[o.sent()]),[3,3];case 2:return l=o.sent(),s(l),[3,3];case 3:return[2]}}))}))}),100)}))];throw v;case 4:return[2]}}))}))},t.prototype.refreshCurrentUser=function(){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,s.default.init(this.user.region).loginWithToken(this.user.authentication_token)];case 1:return e=n.sent(),t._merge(this.user,e),this.sendDataEvent("current user updated",this.user),[2,this.user]}}))}))},t.prototype.logout=function(e){return void 0===e&&(e=!1),r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return n=new Set(this.eventHandlers.values()),t.sendDataEventInternal(n,p.GlobalEvents.SDK_DISPOSING),this.eventHandlers.clear(),[4,this.persistentConnection.dispose()];case 1:return r.sent(),t.sendDataEventInternal(n,p.GlobalEvents.SDK_DISPOSED),e?[3,3]:[4,s.default.init(this.user.region).logout(this.user.authentication_token)];case 2:return[2,r.sent()];case 3:return[2]}}))}))},t.prototype.switchAccounts=function(){return r(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return n=(e=t).fromUser,[4,s.default.init(this.user.region).switchAccounts(this.user.authentication_token)];case 1:return[2,n.apply(e,[r.sent()])]}}))}))},t.prototype.impersonate=function(e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return[4,s.default.init(this.user.region).impersonate(this.user.authentication_token,e)];case 1:return(n=r.sent()).original_user=this.user,[2,t.fromUser(n)]}}))}))},t.prototype.impersonateByTeam=function(e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return[4,s.default.init(this.user.region).impersonateByTeam(this.user.authentication_token,e)];case 1:return(n=r.sent()).original_user=this.user,[2,t.fromUser(n)]}}))}))},t.prototype.unwindImpersonation=function(){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,s.default.init(this.user.region).unwind(this.user.authentication_token)];case 1:return e=n.sent(),[2,t.fromUser(e)]}}))}))},t.initWithAuthToken=function(e,n,i){return void 0===i&&(i=!0),r(this,void 0,void 0,(function(){var r;return o(this,(function(o){switch(o.label){case 0:return[4,s.default.init(e).loginWithToken(n)];case 1:return r=o.sent(),[2,t.fromUser(r,i)]}}))}))},Object.defineProperty(t.prototype,"persistentConnection",{get:function(){return this._persistentConnection},enumerable:!1,configurable:!0}),t.checked=function(t,e,n){try{t(e,n)}catch(t){}},t}();e.default=v},function(t,e,n){t.exports=n(147)},function(t,e,n){"use strict";var r=n(23),o=n(107),i=n(148),s=n(114);function u(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var a=u(n(110));a.Axios=i,a.create=function(t){return u(s(a.defaults,t))},a.Cancel=n(115),a.CancelToken=n(161),a.isCancel=n(109),a.all=function(t){return Promise.all(t)},a.spread=n(162),a.isAxiosError=n(163),t.exports=a,t.exports.default=a},function(t,e,n){"use strict";var r=n(23),o=n(108),i=n(149),s=n(150),u=n(114);function a(t){this.defaults=t,this.interceptors={request:new i,response:new i}}a.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=u(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},a.prototype.getUri=function(t){return t=u(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){a.prototype[t]=function(e,n){return this.request(u(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){a.prototype[t]=function(e,n,r){return this.request(u(r||{},{method:t,url:e,data:n}))}})),t.exports=a},function(t,e,n){"use strict";var r=n(23);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},function(t,e,n){"use strict";var r=n(23),o=n(151),i=n(109),s=n(110);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(23);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e,n){"use strict";var r=n(23);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(113);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(23);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,s){var u=[];u.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),!0===s&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(157),o=n(158);t.exports=function(t,e){return t&&!r(e)?o(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(23),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,s={};return t?(r.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(s[e]&&o.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},function(t,e,n){"use strict";var r=n(23);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(115);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendableError=void 0;var r=n(165);Object.defineProperty(e,"ExtendableError",{enumerable:!0,get:function(){return r.ExtendableError}})},function(t,e,n){"use strict";var r=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=new(Error.bind.apply(Error,o([void 0],r(t))));return Object.setPrototypeOf(n,Object.getPrototypeOf(this)),n}Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendableError=void 0,e.ExtendableError=i,i.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(i,Error)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(11),o=function(){function t(t){t&&Object.assign(this,t)}return t.prototype.has_access=function(t,e){return this.hasAccess(t,e)},t.prototype.hasAccess=function(t,e){var n=this.authorization_flags&&this.authorization_flags[t];return r.isNil(n)?!e:e?n[e]:n.value},t}();e.default=o},function(t,e,n){(function(e){var r,o,i,s;r=n(171),o=n(117).utf8,i=n(117).bin,(s=function(t,n){var s=r.wordsToBytes(function(t){t.constructor==String?t=o.stringToBytes(t):void 0!==e&&"function"==typeof e.isBuffer&&e.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());var n=r.bytesToWords(t),i=8*t.length,s=[],u=1732584193,a=-271733879,c=-1732584194,l=271733878,f=-1009589776;n[i>>5]|=128<<24-i%32,n[15+(i+64>>>9<<4)]=i;for(var p=0;p<n.length;p+=16){for(var h=u,d=a,y=c,v=l,_=f,b=0;b<80;b++){if(b<16)s[b]=n[p+b];else{var E=s[b-3]^s[b-8]^s[b-14]^s[b-16];s[b]=E<<1|E>>>31}var g=(u<<5|u>>>27)+f+(s[b]>>>0)+(b<20?1518500249+(a&c|~a&l):b<40?1859775393+(a^c^l):b<60?(a&c|a&l|c&l)-1894007588:(a^c^l)-899497514);f=l,l=c,c=a<<30|a>>>2,a=u,u=g}u+=h,a+=d,c+=y,l+=v,f+=_}return[u,a,c,l,f]}(t));return n&&n.asBytes?s:n&&n.asString?i.bytesToString(s):r.bytesToHex(s)})._blocksize=16,s._digestsize=20,t.exports=s}).call(this,n(116).Buffer)},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),s=r[0],u=r[1],a=new i(function(t,e,n){return 3*(e+n)/4-n}(0,s,u)),l=0,f=u>0?s-4:s;for(n=0;n<f;n+=4)e=o[t.charCodeAt(n)]<<18|o[t.charCodeAt(n+1)]<<12|o[t.charCodeAt(n+2)]<<6|o[t.charCodeAt(n+3)],a[l++]=e>>16&255,a[l++]=e>>8&255,a[l++]=255&e;2===u&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,a[l++]=255&e);1===u&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,a[l++]=e>>8&255,a[l++]=255&e);return a},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=0,u=n-o;s<u;s+=16383)i.push(l(t,s,s+16383>u?u:s+16383));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,a=s.length;u<a;++u)r[u]=s[u],o[s.charCodeAt(u)]=u;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var o,i,s=[],u=e;u<n;u+=3)o=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,o){var i,s,u=8*o-r-1,a=(1<<u)-1,c=a>>1,l=-7,f=n?o-1:0,p=n?-1:1,h=t[e+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=u;l>0;i=256*i+t[e+f],f+=p,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===a)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),i-=c}return(h?-1:1)*s*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var s,u,a,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+f>=1?p/a:p*Math.pow(2,1-f))*a>=2&&(s++,a/=2),s+f>=l?(u=0,s=l):s+f>=1?(u=(e*a-1)*Math.pow(2,o),s+=f):(u=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[n+h]=255&u,h+=d,u/=256,o-=8);for(s=s<<o|u,c+=o;c>0;t[n+h]=255&s,h+=d,s/=256,c-=8);t[n+h-d]|=128*y}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&r.rotl(t,8)|4278255360&r.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=r.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n<t.length;n++,r+=8)e[r>>>5]|=t[n]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},bytesToHex:function(t){for(var e=[],n=0;n<t.length;n++)e.push((t[n]>>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(parseInt(t.substr(n,2),16));return e},bytesToBase64:function(t){for(var e=[],r=0;r<t.length;r+=3)for(var o=t[r]<<16|t[r+1]<<8|t[r+2],i=0;i<4;i++)8*r+6*i<=8*t.length?e.push(n.charAt(o>>>6*(3-i)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],r=0,o=0;r<t.length;o=++r%4)0!=o&&e.push((n.indexOf(t.charAt(r-1))&Math.pow(2,-2*o+8)-1)<<2*o|n.indexOf(t.charAt(r))>>>6-2*o);return e}},t.exports=r},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.BringgAlive=e.UserWireMessage=e.REALTIME_CONNECTION_RETRY_TIME=void 0;var i=n(39),s=n(173),u=n(192),a=n(63);e.REALTIME_CONNECTION_RETRY_TIME=5e3;var c=function(t){this.id=t.id,this.auth_token=t.authentication_token,this.bringg_user_id=t.uuid};e.UserWireMessage=c;var l=function(){function t(){this.lastUpdate=-1,this.pending=new Map}return t.prototype.add=function(t){var e=Date.now();this.lastUpdate=e,this.pending.set(t,e)},t.prototype.resolve=function(t){try{var e=Date.now();i.default.debug("BringgAlive received ["+t+"] ..."),this.lastUpdate=e,this.pending.has(t)?i.default.debug("BringgAlive took ["+(e-this.pending.get(t))+"] ms. ["+(this.pending.size-1)+"] pending ..."):i.default.warn("BringgAlive id ["+t+"] does not exist")}finally{this.pending.delete(t)}},t}();e.BringgAlive=l;var f=function(){function t(t){this.bringgAlive=null,this.session=t}return t.wrapEventHandler=function(t,e,n){return function(r){n&&n(t,r),e(r)}},t.init=function(e){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return n=new t(e),r=n,[4,s.RealtimeConnection.connect(e.config.getMonitoringEndpoint(),n)];case 1:return r.connection=o.sent(),n.initBringgAlive(),[2,n]}}))}))},t.prototype.handshake=function(t){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,r){e.publishInternal(t,a.USER_CONNECT_EVENT,new c(e.session.user),(function(){e.publishInternal(t,a.SUBSCRIBE_AS_ADMIN_EVENT,new c(e.session.user),(function(){e.session.sendDataEvent("subscribed as admin",null),n()}))}))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.onConnect=function(t){return r(this,void 0,void 0,(function(){var n=this;return o(this,(function(r){switch(r.label){case 0:return[4,(new u.default).handle((function(t){return i.default.error("Failed establishing persistent connection to realtime, retry again in "+e.REALTIME_CONNECTION_RETRY_TIME/1e3+" seconds, "+t),"timeout"!==t.message})).waitAndRetry([e.REALTIME_CONNECTION_RETRY_TIME]).forever().executeForPromise((function(){return n.handshake(t)}))];case 1:return[2,r.sent()]}}))}))},t.prototype.onDisconnect=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2]}))}))},t.prototype.onReconnect=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2]}))}))},t.prototype.publishInternal=function(t,e,n,r){t.socket.emit(e.name,n,r)},t.prototype.subscribeInternal=function(e,n,r){e.socket.on(n.name,t.wrapEventHandler(n.name,r,this.session.sendDataEvent))},t.prototype.unsubscribe=function(t){this.connection.socket.off(t.name)},t.prototype.publish=function(t,e,n){this.publishInternal(this.connection,t,e,n)},t.prototype.subscribe=function(t,e){this.subscribeInternal(this.connection,t,e)},t.prototype.dispose=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return this.clearIntervalInternal(),this.unsubscribe(a.BRINGG_ALIVE_EVENT),[4,this.connection.disconnect()];case 1:return t.sent(),[2]}}))}))},t.prototype.setIntervalInternal=function(t){this.timeout=setInterval(t,e.REALTIME_CONNECTION_RETRY_TIME)},t.prototype.clearIntervalInternal=function(){this.timeout&&clearInterval(this.timeout)},t.prototype.initBringgAlive=function(){var t=this;this.bringgAlive=new l,this.setIntervalInternal((function(){var e=""+Math.floor(1e3*Math.random());t.bringgAlive.add(e),i.default.debug("Sending BringgAlive "+e),t.publish(a.BRINGG_ALIVE_EVENT,{keepalive_id:e},(function(){i.default.debug("BringgAlive callback is OK")}))})),this.subscribe(a.BRINGG_ALIVE_EVENT,(function(e){t.bringgAlive.resolve(e.keepalive_id)}))},t}();e.default=f},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.RealtimeConnection=void 0;var i=n(39),s=n(174),u=function(){function t(t,e){this.endpoint=t,this.notifiable=e}return t.connect=function(e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){return[2,new t(e,n).initInternal()]}))}))},t.prototype.disconnect=function(){return r(this,void 0,void 0,(function(){var t=this;return o(this,(function(e){return[2,new Promise((function(e,n){t._socket.on("disconnect",(function(){t._socket.off("disconnect"),t._socket.close(),e()})),t._socket.disconnect();var r=setTimeout((function(){clearTimeout(r),t._socket.close(),e()}),5e3)}))]}))}))},t.prototype.initInternal=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.initSocket()];case 1:return[2,t.sent()]}}))}))},t.prototype.handleOnConnectAsync=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e,n){t.handleOnConnect(e)}))];case 1:return e.sent(),[2]}}))}))},t.prototype.handleOnConnect=function(t){var e=this;void 0===t&&(t=null),this._socket.on("connect",(function(){return r(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return i.default.debug("connected to server"),this.notifiable?[4,this.notifiable.onConnect(this)]:[3,2];case 1:e.sent(),e.label=2;case 2:return t&&t(),[2]}}))}))}))},t.prototype.handleOnReconnect=function(){var t=this;this._socket.on("reconnect",(function(){return r(t,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return i.default.debug("reconnected to server"),this.notifiable?[4,this.notifiable.onReconnect(this)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))}))},t.prototype.handleOnDisconnect=function(){var t=this;this._socket.on("disconnect",(function(){return r(t,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return i.default.debug("disconnected from server"),this.notifiable?[4,this.notifiable.onDisconnect(this)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))}))},t.prototype.initSocket=function(){return r(this,void 0,void 0,(function(){var t;return o(this,(function(e){return t={forceNew:!1,multiplex:!1,reconnection:!0,autoConnect:!0,transports:["websocket"],transportOptions:{websocket:{port:this.endpoint.port,secure:"https:"===this.endpoint.protocol||"wss:"===this.endpoint.protocol}}},this._socket=s.io(this.endpoint.encode(),t),this.handleOnConnect(),this.handleOnReconnect(),this.handleOnDisconnect(),[2,this]}))}))},Object.defineProperty(t.prototype,"socket",{get:function(){return this._socket},enumerable:!1,configurable:!0}),t}();e.RealtimeConnection=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.io=e.Socket=e.Manager=e.protocol=void 0;const r=n(175),o=n(119),i=n(32)("socket.io-client");t.exports=e=u;const s=e.managers={};function u(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const n=r.url(t,e.path||"/socket.io"),u=n.source,a=n.id,c=n.path,l=s[a]&&c in s[a].nsps;let f;return e.forceNew||e["force new connection"]||!1===e.multiplex||l?(i("ignoring socket cache for %s",u),f=new o.Manager(u,e)):(s[a]||(i("new io instance for %s",u),s[a]=new o.Manager(u,e)),f=s[a]),n.query&&!e.query&&(e.query=n.queryKey),f.socket(n.path,e)}e.io=u;var a=n(95);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return a.protocol}}),e.connect=u;var c=n(119);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return c.Manager}});var l=n(126);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return l.Socket}}),e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.url=void 0;const r=n(118),o=n(32)("socket.io-client:url");e.url=function(t,e="",n){let i=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(o("protocol-less url %s",t),t=void 0!==n?n.protocol+"//"+t:"https://"+t),o("parse %s",t),i=r(t)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const s=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+s+":"+i.port+e,i.href=i.protocol+"://"+s+(n&&n.port===i.port?"":":"+i.port),i}},function(t,e,n){t.exports=function(t){function e(t){let n,o=null;function i(...t){if(!i.enabled)return;const r=i,o=Number(new Date),s=o-(n||o);r.diff=s,r.prev=n,r.curr=o,n=o,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let u=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(n,o)=>{if("%%"===n)return"%";u++;const i=e.formatters[o];if("function"==typeof i){const e=t[u];n=i.call(r,e),t.splice(u,1),u--}return n}),e.formatArgs.call(r,t);(r.log||e.log).apply(r,t)}return i.namespace=t,i.useColors=e.useColors(),i.color=e.selectColor(t),i.extend=r,i.destroy=e.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null===o?e.enabled(t):o,set:t=>{o=t}}),"function"==typeof e.init&&e.init(i),i}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function o(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(o),...e.skips.map(o).map(t=>"-"+t)].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(177),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(n=>{e[n]=t[n]}),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},function(t,e){var n=1e3,r=6e4,o=60*r,i=24*o;function s(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}t.exports=function(t,e){e=e||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=i)return s(t,e,i,"day");if(e>=o)return s(t,e,o,"hour");if(e>=r)return s(t,e,r,"minute");if(e>=n)return s(t,e,n,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=i)return Math.round(t/i)+"d";if(e>=o)return Math.round(t/o)+"h";if(e>=r)return Math.round(t/r)+"m";if(e>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){const r=n(179);t.exports=(t,e)=>new r(t,e),t.exports.Socket=r,t.exports.protocol=r.protocol,t.exports.Transport=n(92),t.exports.transports=n(120),t.exports.parser=n(62)},function(t,e,n){const r=n(120),o=n(93),i=n(32)("engine.io-client:socket"),s=n(62),u=n(118),a=n(94);class c extends o{constructor(t,e={}){super(),t&&"object"==typeof t&&(e=t,t=null),t?(t=u(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=u(e.host).host),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.transports=e.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,jsonp:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},e),this.opts.path=this.opts.path.replace(/\/$/,"")+"/","string"==typeof this.opts.query&&(this.opts.query=a.decode(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&addEventListener("beforeunload",()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},!1),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close")},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){i('creating transport "%s"',t);const e=function(t){const e={};for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(this.opts.query);e.EIO=s.protocol,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return i("options: %j",n),new r[t](n)}open(){let t;if(this.opts.rememberUpgrade&&c.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void setTimeout(()=>{this.emit("error","No transports available")},0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return i("error while creating transport: %s",t),this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){i("setting transport %s",t.name),this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",()=>{this.onClose("transport close")})}probe(t){i('probing transport "%s"',t);let e=this.createTransport(t,{probe:1}),n=!1;c.priorWebsocketSuccess=!1;const r=()=>{n||(i('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",r=>{if(!n)if("pong"===r.type&&"probe"===r.data){if(i('probe transport "%s" pong',t),this.upgrading=!0,this.emit("upgrading",e),!e)return;c.priorWebsocketSuccess="websocket"===e.name,i('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{n||"closed"!==this.readyState&&(i("changing transport and sending upgrade packet"),f(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emit("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{i('probe transport "%s" failed',t);const n=new Error("probe error");n.transport=e.name,this.emit("upgradeError",n)}}))};function o(){n||(n=!0,f(),e.close(),e=null)}const s=n=>{const r=new Error("probe error: "+n);r.transport=e.name,o(),i('probe transport "%s" failed because of error: %s',t,n),this.emit("upgradeError",r)};function u(){s("transport closed")}function a(){s("socket closed")}function l(t){e&&t.name!==e.name&&(i('"%s" works - aborting "%s"',t.name,e.name),o())}const f=()=>{e.removeListener("open",r),e.removeListener("error",s),e.removeListener("close",u),this.removeListener("close",a),this.removeListener("upgrading",l)};e.once("open",r),e.once("error",s),e.once("close",u),this.once("close",a),this.once("upgrading",l),e.open()}onOpen(){if(i("socket open"),this.readyState="open",c.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause){i("starting upgrade probes");let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(i('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emit("ping"),this.emit("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else i('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){clearTimeout(this.pingTimeoutTimer),this.pingTimeoutTimer=setTimeout(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()}flush(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(i("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const o={type:t,data:e,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),i("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.removeListener("upgrade",e),this.removeListener("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}onError(t){i("socket error %j",t),c.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(i('socket close with reason: "%s"',t),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emit("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n<r;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}c.priorWebsocketSuccess=!1,c.protocol=s.protocol,t.exports=c},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},function(t,e,n){const r=n(121),o=n(122),i=n(93),{pick:s}=n(125),u=n(69),a=n(32)("engine.io-client:polling-xhr");function c(){}const l=null!=new r({xdomain:!1}).responseType;class f extends i{constructor(t,e){super(),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.create()}create(){const t=s(this.opts,"agent","enablesXDR","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new r(t);try{a("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&e.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),this.hasXDR()?(e.onload=()=>{this.onLoad()},e.onerror=()=>{this.onError(e.responseText)}):e.onreadystatechange=()=>{4===e.readyState&&(200===e.status||1223===e.status?this.onLoad():setTimeout(()=>{this.onError("number"==typeof e.status?e.status:0)},0))},a("xhr data %s",this.data),e.send(this.data)}catch(t){return void setTimeout(()=>{this.onError(t)},0)}"undefined"!=typeof document&&(this.index=f.requestsCount++,f.requests[this.index]=this)}onSuccess(){this.emit("success"),this.cleanup()}onData(t){this.emit("data",t),this.onSuccess()}onError(t){this.emit("error",t),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete f.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&this.onData(t)}hasXDR(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR}abort(){this.cleanup()}}if(f.requestsCount=0,f.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",p);else if("function"==typeof addEventListener){addEventListener("onpagehide"in u?"pagehide":"unload",p,!1)}function p(){for(let t in f.requests)f.requests.hasOwnProperty(t)&&f.requests[t].abort()}t.exports=class extends o{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?443:80),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}const e=t&&t.forceBase64;this.supportsBinary=l&&!e}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new f(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",t=>{this.onError("xhr post error",t)})}doPoll(){a("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",t=>{this.onError("xhr poll error",t)}),this.pollXhr=t}},t.exports.Request=f},function(t,e,n){const{PACKET_TYPES:r}=n(123),o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),i="function"==typeof ArrayBuffer,s=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+t)},n.readAsDataURL(t)};t.exports=({type:t,data:e},n,u)=>{return o&&e instanceof Blob?n?u(e):s(e,u):i&&(e instanceof ArrayBuffer||(a=e,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(a):a&&a.buffer instanceof ArrayBuffer))?n?u(e instanceof ArrayBuffer?e:e.buffer):s(new Blob([e]),u):u(r[t]+(e||""));var a}},function(t,e,n){const{PACKET_TYPES_REVERSE:r,ERROR_PACKET:o}=n(123);let i;"function"==typeof ArrayBuffer&&(i=n(184));const s=(t,e)=>{if(i){const n=i.decode(t);return u(n,e)}return{base64:!0,data:t}},u=(t,e)=>{switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}};t.exports=(t,e)=>{if("string"!=typeof t)return{type:"message",data:u(t,e)};const n=t.charAt(0);if("b"===n)return{type:"message",data:s(t.substring(1),e)};return r[n]?t.length>1?{type:r[n],data:t.substring(1)}:{type:r[n]}:o}},function(t,e){!function(t){"use strict";e.encode=function(e){var n,r=new Uint8Array(e),o=r.length,i="";for(n=0;n<o;n+=3)i+=t[r[n]>>2],i+=t[(3&r[n])<<4|r[n+1]>>4],i+=t[(15&r[n+1])<<2|r[n+2]>>6],i+=t[63&r[n+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(e){var n,r,o,i,s,u=.75*e.length,a=e.length,c=0;"="===e[e.length-1]&&(u--,"="===e[e.length-2]&&u--);var l=new ArrayBuffer(u),f=new Uint8Array(l);for(n=0;n<a;n+=4)r=t.indexOf(e[n]),o=t.indexOf(e[n+1]),i=t.indexOf(e[n+2]),s=t.indexOf(e[n+3]),f[c++]=r<<2|o>>4,f[c++]=(15&o)<<4|i>>2,f[c++]=(3&i)<<6|63&s;return l}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(t,e,n){const r=n(122),o=n(69),i=/\n/g,s=/\\n/g;let u;t.exports=class extends r{constructor(t){super(t),this.query=this.query||{},u||(u=o.___eio=o.___eio||[]),this.index=u.length,u.push(this.onData.bind(this)),this.query.j=this.index}get supportsBinary(){return!1}doClose(){this.script&&(this.script.onerror=()=>{},this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),super.doClose()}doPoll(){const t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=t=>{this.onError("jsonp poll error",t)};const e=document.getElementsByTagName("script")[0];e?e.parentNode.insertBefore(t,e):(document.head||document.body).appendChild(t),this.script=t;"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){const t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)}),100)}doWrite(t,e){let n;if(!this.form){const t=document.createElement("form"),e=document.createElement("textarea"),n=this.iframeId="eio_iframe_"+this.index;t.className="socketio",t.style.position="absolute",t.style.top="-1000px",t.style.left="-1000px",t.target=n,t.method="POST",t.setAttribute("accept-charset","utf-8"),e.name="d",t.appendChild(e),document.body.appendChild(t),this.form=t,this.area=e}function r(){o(),e()}this.form.action=this.uri();const o=()=>{if(this.iframe)try{this.form.removeChild(this.iframe)}catch(t){this.onError("jsonp polling iframe removal error",t)}try{const t='<iframe src="javascript:0" name="'+this.iframeId+'">';n=document.createElement(t)}catch(t){n=document.createElement("iframe"),n.name=this.iframeId,n.src="javascript:0"}n.id=this.iframeId,this.form.appendChild(n),this.iframe=n};o(),t=t.replace(s,"\\\n"),this.area.value=t.replace(i,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=()=>{"complete"===this.iframe.readyState&&r()}:this.iframe.onload=r}}},function(t,e,n){(function(e){const r=n(92),o=n(62),i=n(94),s=n(124),{pick:u}=n(125),{WebSocket:a,usingBrowserWebSocket:c,defaultBinaryType:l,nextTick:f}=n(187),p=n(32)("engine.io-client:websocket"),h="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class d extends r{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,n=h?{}:u(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=c&&!h?e?new a(t,e):new a(t):new a(t,e,n)}catch(t){return this.emit("error",t)}this.ws.binaryType=this.socket.binaryType||l,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=this.onClose.bind(this),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;o.encodePacket(r,this.supportsBinary,t=>{const n={};if(!c&&(r.options&&(n.compress=r.options.compress),this.opts.perMessageDeflate)){("string"==typeof t?e.byteLength(t):t.length)<this.opts.perMessageDeflate.threshold&&(n.compress=!1)}try{c?this.ws.send(t):this.ws.send(t,n)}catch(t){p("websocket closed before onclose event")}i&&f(()=>{this.writable=!0,this.emit("drain")})})}}onClose(){r.prototype.onClose.call(this)}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let n="";this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=s()),this.supportsBinary||(t.b64=1),t=i.encode(t),t.length&&(t="?"+t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+t}check(){return!(!a||"__initialize"in a&&this.name===d.prototype.name)}}t.exports=d}).call(this,n(116).Buffer)},function(t,e,n){const r=n(69),o="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):t=>setTimeout(t,0);t.exports={WebSocket:r.WebSocket||r.MozWebSocket,usingBrowserWebSocket:!0,defaultBinaryType:"arraybuffer",nextTick:o}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=n(127);e.deconstructPacket=function(t){const e=[],n=t.data,o=t;return o.data=function t(e,n){if(!e)return e;if(r.isBinary(e)){const t={_placeholder:!0,num:n.length};return n.push(e),t}if(Array.isArray(e)){const r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=t(e[o],n);return r}if("object"==typeof e&&!(e instanceof Date)){const r={};for(const o in e)e.hasOwnProperty(o)&&(r[o]=t(e[o],n));return r}return e}(n,e),o.attachments=e.length,{packet:o,buffers:e}},e.reconstructPacket=function(t,e){return t.data=function t(e,n){if(!e)return e;if(e&&e._placeholder)return n[e.num];if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=t(e[r],n);else if("object"==typeof e)for(const r in e)e.hasOwnProperty(r)&&(e[r]=t(e[r],n));return e}(t.data,e),t.attachments=void 0,t}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Retryable=e.AsyncRetryable=void 0;var i=function(t){this.count=t},s=function(){function t(t){this.config=t}return t.prototype.forever=function(){return this.config.isForever=!0,this},t.prototype.executeForPromise=function(t){var e=this,n=0;return new Promise((function(r,o){var s;s=function(){t(new i(n)).then((function(t){r(t)})).catch((function(t){if(e.config.handleFn(t)){if(n<e.config.numRetries)n++;else{if(!e.config.isForever)return void o(t);n=0}setTimeout(s,e.config.delays?e.config.delays[n]:100)}else o(t)}))},setTimeout(s,5)})).then((function(t){return t})).catch((function(t){return t}))},t}();e.AsyncRetryable=s;var u=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.forever=function(){return polly.isForever=!0,this},e.prototype.execute=function(t){for(var e=0;;)try{return t(new i(e))}catch(t){if(!this.config.handleFn(t))throw t;if(e<this.config.numRetries)e++;else{if(!this.config.isForever)throw t;e=0}}},e}(s);e.Retryable=u;var a=function(){function t(){}return t.prototype.handle=function(t){return this.handleFn=t,this},t.prototype.retry=function(t){return this.numRetries=t,new u(this)},t.prototype.forever=function(){return this.isForever=!0,this},t.prototype.waitAndRetry=function(e){return"number"==typeof e?(this.numRetries=e,this.delays=t.getDelays(e)):(this.delays=e,this.numRetries=e.length),new s(this)},t.getDelays=function(t){for(var e=[],n=100,r=0;r<t;r++)e.push(n),n*=2;return e},t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalEvents=void 0,function(t){t.SDK_INITIALISED="sdkInitialized",t.SDK_DISPOSING="sdkDisposing",t.SDK_DISPOSED="sdkDisposed"}(e.GlobalEvents||(e.GlobalEvents={}))},function(t,e,n){"use strict";var r=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===o}(t)}(t)};var o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?l((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function s(t,e,n){return t.concat(e).map((function(t){return i(t,n)}))}function u(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function a(t,e){try{return e in t}catch(t){return!1}}function c(t,e,n){var r={};return n.isMergeableObject(t)&&u(t).forEach((function(e){r[e]=i(t[e],n)})),u(e).forEach((function(o){(function(t,e){return a(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,o)||(a(t,o)&&n.isMergeableObject(e[o])?r[o]=function(t,e){if(!e.customMerge)return l;var n=e.customMerge(t);return"function"==typeof n?n:l}(o,n)(t[o],e[o],n):r[o]=i(e[o],n))})),r}function l(t,e,n){(n=n||{}).arrayMerge=n.arrayMerge||s,n.isMergeableObject=n.isMergeableObject||r,n.cloneUnlessOtherwiseSpecified=i;var o=Array.isArray(e);return o===Array.isArray(t)?o?n.arrayMerge(t,e,n):c(t,e,n):i(e,n)}l.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return l(t,n,e)}),{})};var f=l;t.exports=f},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(196),u=n(11),a=n(72),c=function(){function t(t){this.merchantEntity=new s.default(t)}return t.prototype.get=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.merchantEntity.get()]}))}))},t.prototype.getAll=function(){return this.merchantEntity.getAll()},t.prototype.update=function(t){return this.merchantEntity.updateMerchantRequest(t)},t.prototype.clean=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return t=u.defaults(t,{withDrivers:!1}),[2,this.merchantEntity.clean(t)]}))}))},t.prototype.createMerchantByAccountManager=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.merchantEntity.createMerchantByAccountManager(t)]}))}))},t.prototype.proFeaturesEnabled=function(){var t=u.get(this.merchantEntity,"service.session.merchant");return!!u.get(t,"custom_payments")||!u.get(t,"pro")},t.prototype.featureFlags=function(){return u.get(this.merchantEntity,"service.session.merchant.feature_flags")},t.prototype.validateCopyMerchantSettings=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.merchantEntity.validateMerchantSettingsForCopy(t.origin_merchant_id,t.destination_merchant_id)]}))}))},t.prototype.copyMerchantSettings=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.merchantEntity.copyMerchantSettings(t.origin_merchant_id,t.destination_merchant_id,e)]}))}))},r([a.default],t.prototype,"get",null),t}();e.default=c},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=n(11),c=n(210),l={GET_MERCHANT:"/merchant",UPDATE_MERCHANT:"/merchant",CLEAN_MERCHANT:"/merchant/clean",FETCH_ALL:"/merchants/",CREATE_BY_ACCOUNT_MANAGER:"//merchant/create_by_account_manager/",COPY_MERCHANT_SETTINGS_VALIDATE:"//merchant/copy_merchant_settings_validate/",COPY_MERCHANT_SETTINGS:"//merchant/copy_merchant_settings/"},f=function(t){function e(e){var n=t.call(this,{session:e,entityName:"merchant",routes:[]})||this;return n.subscribe(),n}return o(e,t),e.prototype.updateMerchant=function(t){this.service.session.update("merchant",t)},e.prototype.subscribe=function(){var t=this;this.realTime.on("merchant update",(function(e){t.updateMerchant(e.merchant)})),this.realTime.on("merchant subscription updated",(function(e){t.updateMerchant(e.data)}))},e.prototype.get=function(){return i(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return this.service.session.merchant?[2,this.service.session.merchant]:[4,this.service.routeGenerator.get(l.GET_MERCHANT).setException("Could not read merchant").invoke()];case 1:return t=e.sent(),this.service.session.merchant?this.updateMerchant(t):this.service.session.merchant=t,[2,t]}}))}))},e.prototype.updateMerchantRequest=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.put(l.UPDATE_MERCHANT).setException("Could not update merchant").withExtractor(c.merchantExtractor).withPayload(t).invoke()];case 1:return e=n.sent(),this.updateMerchant(e),[2,e]}}))}))},e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.get(l.FETCH_ALL).withExtractor((function(t){return t.merchants})).setException("Could not read all merchants").invoke()];case 1:return[2,t.sent()]}}))}))},e.prototype.clean=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){return e=t.withDrivers,[2,this.service.routeGenerator.post(l.CLEAN_MERCHANT).withExtractor(a.stubTrue).setException(e?"Could not clean merchant and drivers":"Could not clean merchant").withPayload({withDrivers:e}).invoke()]}))}))},e.prototype.createMerchantByAccountManager=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post(l.CREATE_BY_ACCOUNT_MANAGER).withExtractor((function(t){return t.merchant_guid})).setException("Could not create merchant by account manager").withPayload(t).invoke()]}))}))},e.prototype.validateMerchantSettingsForCopy=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.post(l.COPY_MERCHANT_SETTINGS_VALIDATE).withExtractor((function(t){return t.data})).setException("Failed to validate merchant settings").withPayload({origin_merchant_id:t,destination_merchant_id:e}).invoke()]}))}))},e.prototype.copyMerchantSettings=function(t,e,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,this.service.routeGenerator.post(l.COPY_MERCHANT_SETTINGS).withExtractor(a.stubTrue).setException("Could not copy merchant settings").withPayload({fields:n,copy_data:{origin_merchant_id:t,destination_merchant_id:e}}).invoke()]}))}))},e}(u.default);e.default=f},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e,n,r,o){var u=t.call(this,e,n)||this;u.get=function(t,e){return i(u,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.routeGenerator.get(this.Routes.GET).withRouteParams({id:t}).withQueryString(e).setException("Failed to get "+this.entityName).invoke()];case 1:return[2,n.sent()]}}))}))},u.getAll=function(t){return i(u,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.routeGenerator.get(this.Routes.GET_ALL).withQueryString(t).setException("Failed to get all "+this.entityName).invoke()];case 1:return[2,e.sent()]}}))}))},u.create=function(t){return i(u,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.routeGenerator.post(this.Routes.CREATE).withPayload(t).setException("Failed to create "+this.entityName).invoke()];case 1:return[2,e.sent()]}}))}))},u.update=function(t,e){return i(u,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.routeGenerator.put(this.Routes.UPDATE).withRouteParams({id:t}).withPayload(e).setException("Failed to update "+this.entityName).invoke()];case 1:return[2,n.sent()]}}))}))},u.delete=function(t,e){return i(u,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.routeGenerator.delete(this.Routes.DELETE).withRouteParams({id:t}).withQueryString(e).setException("Failed to delete "+this.entityName).invoke()];case 1:return[2,n.sent()]}}))}))},u.patch=function(t,e){return i(u,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.routeGenerator.patch(t?this.Routes.PATCH_WITH_ID:this.Routes.PATCH).withRouteParams({id:t}).withPayload(e).setException("Failed to patch "+this.entityName).invoke()];case 1:return[2,n.sent()]}}))}))};var a=r?"/"+r+"/"+n:"/"+n;return o&&(a=a+"/"+o),u.Routes={GET:a+"/{:id}",GET_ALL:a,CREATE:a,UPDATE:a+"/{:id}",DELETE:a+"/{:id}",PATCH:a,PATCH_WITH_ID:a+"/{:id}"},u}return o(e,t),e}(n(96).default);e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(199),s=n(97),u=n(99),a=n(208),c=n(209),l=n(100),f=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return o(e,t),e}(s.Subscriber);e.SubjectSubscriber=f;var p=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return o(e,t),e.prototype[l.rxSubscriber]=function(){return new f(this)},e.prototype.lift=function(t){var e=new h(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new a.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new a.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new a.ObjectUnsubscribedError;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new a.ObjectUnsubscribedError;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new a.ObjectUnsubscribedError;return this.hasError?(t.error(this.thrownError),u.Subscription.EMPTY):this.isStopped?(t.complete(),u.Subscription.EMPTY):(this.observers.push(t),new c.SubjectSubscription(this,t))},e.prototype.asObservable=function(){var t=new i.Observable;return t.source=this,t},e.create=function(t,e){return new h(t,e)},e}(i.Observable);e.Subject=p;var h=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return o(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):u.Subscription.EMPTY},e}(p);e.AnonymousSubject=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(200),o=n(204),i=n(205),s=n(206),u=n(98),a=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,i=o.toSubscriber(t,e,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||u.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),u.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){u.config.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),r.canReportError(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=c(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[i.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:s.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=c(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function c(t){if(t||(t=u.config.Promise||Promise),!t)throw new Error("no Promise impl found");return t}e.Observable=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(97);e.canReportError=function(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&o instanceof r.Subscriber?o:null}return!0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isObject=function(t){return null!==t&&"object"==typeof t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}();e.UnsubscriptionError=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(97),o=n(100),i=n(132);e.toSubscriber=function(t,e,n){if(t){if(t instanceof r.Subscriber)return t;if(t[o.rxSubscriber])return t[o.rxSubscriber]()}return t||e||n?new r.Subscriber(t,e,n):new r.Subscriber(i.empty)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(207);function o(t){return t?1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}:r.noop}e.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)},e.pipeFromArray=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.noop=function(){}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}();e.ObjectUnsubscribedError=r},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return o(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(99).Subscription);e.SubjectSubscription=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merchantExtractor=void 0;e.merchantExtractor=function(t){return t.merchant}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(212),o=function(){function t(t){this.rolloutsEntity=new r.default(t)}return t.prototype.getAll=function(){return this.rolloutsEntity.getAll()},t.prototype.createOrUpdateUserRollout=function(t){return this.rolloutsEntity.createOrUpdateUserRollout(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),s=n(213),u=function(t){function e(e){return t.call(this,{session:e,entityName:"rollouts",routes:[]})||this}return o(e,t),e.prototype.getAll=function(){return this.service.routeGenerator.get(s.Routes.getAll).withExtractor((function(t){return t.result})).invoke()},e.prototype.createOrUpdateUserRollout=function(t){return this.service.routeGenerator.post(s.Routes.createOrUpdateUserRollout).withPayload(t).withExtractor((function(t){return t.result})).invoke()},e}(i.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0,e.Routes={getAll:"/rollouts/",createOrUpdateUserRollout:"/rollouts/create_or_update_user_rollout/"}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(215),u=n(216),a=function(){function t(t){var e=this;this.unsubscribe=function(){e.runStore.store.unsubscribe()},this.onUpdate=function(t){return e.runStore.registerOnUpdate(t)},this.onDelete=function(t){return e.runStore.registerOnDelete(t)},this.onCreate=function(t){return e.runStore.registerOnCreate(t)},this.runsService=new s.RunsService(t),this.runStore=new u.default(t)}return t.prototype.attachSubscriptions=function(){this.runStore.attachSubscriptions()},t.prototype.loadAll=function(t){return o(this,void 0,void 0,(function(){var e,n,o,s=this;return i(this,(function(i){switch(i.label){case 0:return e=[],n=[],t.ids&&(t.ids.forEach((function(t){s.runStore.store.getItem(t)?e.push(t):n.push(t)})),e.length===t.ids.length)?[2,this.runStore.store.getItemsByIds(t.ids)]:[4,this.runsService.loadAll(r(r({page:1},t),{ids:n.length>0?n:void 0}))];case 1:return o=i.sent(),[2,this.runStore.setAll(o).concat(this.runStore.store.getItemsByIds(e))]}}))}))},t.prototype.load=function(t){return o(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(e=this.runStore.store.getItem(t))?[2,e]:[4,this.forceLoad(t)];case 1:return[2,n.sent()]}}))}))},t.prototype.forceLoad=function(t){return o(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.runsService.get(t)];case 1:return e=n.sent(),[2,this.runStore.set(e)]}}))}))},t.prototype.get=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.get(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getAll=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.getAll(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.update=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.runsService.update(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getHistory=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.getHistory(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getLocations=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.getLocations(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getCashout=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.getCashout(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.assignDriver=function(t,e,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.runsService.assignDriver(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.unassignDriver=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.runsService.unassignDriver(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.assignVehicle=function(t,e,n,r){return o(this,void 0,void 0,(function(){return i(this,(function(o){switch(o.label){case 0:return[4,this.runsService.assignVehicle(t,e,n,r)];case 1:return[2,o.sent()]}}))}))},t.prototype.unassignVehicle=function(t,e,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.runsService.unassignVehicle(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.assignVehicles=function(t,e,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.runsService.assignVehicles(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.unassignVehicles=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.unassignVehicles(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.bulkClose=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.bulkClose(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.markDonePlanning=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.markDonePlanning(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getActualBreaks=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.runsService.getActualBreaks(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.RunsService=e.Routes=void 0;var a=n(24),c=n(15),l=n(73),f=n(19);e.Routes={GET_RUNS:new f.Route("/runs",0),GET_RUN:new f.Route("/runs/{:id}",0),UPDATE_RUN:new f.Route("/runs/{:id}",3),GET_RUN_HISTORY:new f.Route("/runs/{:id}/history",0),GET_RUN_LOCATIONS:new f.Route("/runs/{:id}/locations",0),GET_RUN_CASHOUT:new f.Route("/runs/{:id}/cashout",0),ASSIGN_DRIVER:new f.Route("/runs/{:id}/assign",2),UNASSIGN_DRIVER:new f.Route("/runs/{:id}/unassign",2),ASSIGN_VEHICLE:new f.Route("/runs/{:id}/assign_vehicle",2),UNASSIGN_VEHICLE:new f.Route("/runs/{:id}/unassign_vehicle",2),BULK_CLOSE:new f.Route("/runs/bulk_close",1),MARK_DONE_PLANNING:new f.Route("/runs/mark_done_planning",1),GET_ACTUAL_BREAKS:new f.Route("/runs/actual_breaks",0),ASSIGN_VEHICLES:new f.Route("/runs/{:id}/vehicles_assignment",3),UNASSIGN_VEHICLES:new f.Route("/runs/{:id}/vehicles_assignment",4)};var p=function(t){function n(e){return t.call(this,e.config.getApiEndpoint(),e)||this}return o(n,t),n.prototype.getAll=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_RUNS,l.defaultExtractor,c.BringgException.serviceException("Failed to get Runs"),void 0,void 0,t)];case 1:return[2,n.sent()]}}))}))},n.prototype.loadAll=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(r){switch(r.label){case 0:return!t.ids||t.ids.length<=l.GetAllChunkSize?[2,this.loadPage(i({page:1},t))]:[3,1];case 1:return e=[],[4,this.loadPageChunked(i({page:1},t),n.splitToChunks(t.ids,l.GetAllChunkSize),e)];case 2:return r.sent(),[2,e]}}))}))},n.prototype.loadPageChunked=function(t,e,n,r){return void 0===r&&(r=0),s(this,void 0,void 0,(function(){var o;return u(this,(function(s){switch(s.label){case 0:return e[r]?[4,this.loadPage(i(i({},t),{ids:e[r]}))]:[2,n];case 1:return o=s.sent(),Array.prototype.push.apply(n,o),[2,this.loadPageChunked(t,e,n,r+1)]}}))}))},n.prototype.loadPage=function(t){return s(this,void 0,void 0,(function(){var e,n,r,o;return u(this,(function(s){switch(s.label){case 0:return[4,this.getAll(t)];case 1:if(!(e=s.sent()).success)throw new Error("Error fetching runs, error code: "+e.rc);return n=e.runs,e.next_page?(o=(r=n).concat,[4,this.loadPage(i(i({},t),{page:t.page+1}))]):[3,3];case 2:n=o.apply(r,[s.sent()]),s.label=3;case 3:return[2,n]}}))}))},n.prototype.get=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_RUN,l.runExtractor,c.BringgException.serviceException("Failed to get Run"),void 0,{id:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.update=function(t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.UPDATE_RUN,l.defaultExtractor,c.BringgException.serviceException("Failed to update Run"),n,{id:t})];case 1:return[2,r.sent()]}}))}))},n.prototype.getHistory=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_RUN_HISTORY,l.runsHistoryExtractor,c.BringgException.serviceException("Failed to get run history"),void 0,{id:t})];case 1:return[2,n.sent().run_histories]}}))}))},n.prototype.getLocations=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_RUN_LOCATIONS,l.runsLocationsExtractor,c.BringgException.serviceException("Failed to get run locations"),void 0,{id:t})];case 1:return[2,n.sent().run_locations]}}))}))},n.prototype.getCashout=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_RUN_CASHOUT,l.runCashoutExtractor,c.BringgException.serviceException("Failed to get run cashout"),void 0,{id:t})];case 1:return[2,n.sent().run_cashout]}}))}))},n.prototype.assignDriver=function(t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){switch(o.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.ASSIGN_DRIVER,l.defaultExtractor,c.BringgException.serviceException("Failed to assign driver to run"),{user_id:n,target_run:r},{id:t})];case 1:return[2,o.sent()]}}))}))},n.prototype.unassignDriver=function(t,n){return s(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.UNASSIGN_DRIVER,l.defaultExtractor,c.BringgException.serviceException("Failed to assign driver to run"),{user_id:n},{id:t})];case 1:return[2,r.sent()]}}))}))},n.prototype.assignVehicle=function(t,n,r,o){return s(this,void 0,void 0,(function(){return u(this,(function(i){switch(i.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.ASSIGN_VEHICLE,l.defaultExtractor,c.BringgException.serviceException("Failed to assign vehicle to run"),{vehicle_id:n,previous_vehicle_id:r,task_ids:o},{id:t})];case 1:return[2,i.sent()]}}))}))},n.prototype.unassignVehicle=function(t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){switch(o.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.UNASSIGN_VEHICLE,l.defaultExtractor,c.BringgException.serviceException("Failed to unassign vehicle from run"),{previous_vehicle_id:n,task_ids:r},{id:t})];case 1:return[2,o.sent()]}}))}))},n.prototype.assignVehicles=function(t,n,r){return s(this,void 0,void 0,(function(){return u(this,(function(o){switch(o.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.ASSIGN_VEHICLES,l.defaultExtractor,c.BringgException.serviceException("Failed to assign vehicles to run"),{vehicle_id:n,tasks:r},{id:t})];case 1:return[2,o.sent()]}}))}))},n.prototype.unassignVehicles=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.UNASSIGN_VEHICLES,l.defaultExtractor,c.BringgException.serviceException("Failed to unassign vehicles from run"),{},{id:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.bulkClose=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.BULK_CLOSE,l.defaultExtractor,c.BringgException.serviceException("Failed to bulk close runs"),{run_ids:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.markDonePlanning=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.MARK_DONE_PLANNING,l.defaultExtractor,c.BringgException.serviceException("Failed to mark done planning for runs"),{run_ids:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.getActualBreaks=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_ACTUAL_BREAKS,l.defaultExtractor,c.BringgException.serviceException("Failed to get actual breaks of runs"),{},{},{run_ids:t})];case 1:return[2,n.sent()]}}))}))},n.splitToChunks=function(t,e){for(var n=[],r=0;r<t.length;r+=e)n.push(t.slice(r,r+e));return n},n}(a.SessionBasedService);e.RunsService=p},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0});var s=n(9),u=n(73),a=n(74),c=function(t){function e(e){var n=t.call(this,{session:e,entityName:"runs"})||this;return n.createRun=function(t){return n.createOrUpdateRun(t,n.onCreate.bind(n))},n.updateRun=function(t){return n.createOrUpdateRun(t,n.onUpdate.bind(n))},n.createOrUpdateRun=function(t,e){var r=n.store.getItem(t.run.id),o={id:t.run.id,run:t.run,taskIds:void 0};r?o.taskIds=r.taskIds:(o.taskIds=n.taskIdsWaitingForRun.get(t.run.id)||new Set,n.taskIdsWaitingForRun.delete(t.run.id)),n.storeItem(o),e(n.store.getItem(t.run.id))},n.deleteRun=function(t){var e=n.store.getItem(t.id);n.store.removeFromStore(t.id),n.onDelete(e)},n.updateTaskIdsOnDelete=function(t){var e=n.store.getItem(t.run_id);e&&(e.taskIds.delete(t.id),n.updateRun(e))},n.updateTaskIds=function(t){var e=t.run_id||n.taskIdToRunId.get(t.id),r=n.store.getItem(e);r?n.taskAddedToRun(t,r)?(r.taskIds.add(t.id),n.updateRun(r)):n.taskRemovedFromRun(t,r)&&(r.taskIds.delete(t.id),n.updateRun(r)):n.backupTasksUntilRunIsCreated(t),n.updatePreviousRun(t),n.taskIdToRunId.set(t.id,t.run_id)},n.taskIdsWaitingForRun=new Map,n.taskIdToRunId=new Map,n}return o(e,t),e.prototype.attachSubscriptions=function(){this.subscribedToRealtime||(this.subscribedToRealtime=!0,this.realTime.on(u.RunEvents.CREATED,this.createRun),this.realTime.on(u.RunEvents.UPDATED,this.updateRun),this.realTime.on(u.RunEvents.DELETED,this.deleteRun),this.realTime.on(a.TaskRealTimeEvents.TASK_DELETED,this.updateTaskIdsOnDelete),this.realTime.on(a.TaskRealTimeEvents.TASK_UPDATE,this.updateTaskIds),this.realTime.on(a.TaskRealTimeEvents.NEW_TASK,this.updateTaskIds))},e.prototype.set=function(t){return this.setAll([t])[0]},e.prototype.setAll=function(t){var e,n,r=this,o=t.map((function(t){var e;return{id:t.id,run:t,taskIds:new Set(t.task_ids||(null===(e=t.tasks)||void 0===e?void 0:e.map((function(t){return t.id}))))}})),s=function(t){t.taskIds.forEach((function(e){r.taskIdToRunId.set(e,t.id)}))};try{for(var u=i(o),a=u.next();!a.done;a=u.next()){s(a.value)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return this.storeAllItems(o),o},e.prototype.updatePreviousRun=function(t){var e=this.taskIdToRunId.get(t.id);if(e&&e!=t.run_id){this.taskIdsWaitingForRun.has(e)&&this.taskIdsWaitingForRun.get(e).delete(t.id);var n=this.store.getItem(e);n&&(n.taskIds.delete(t.id),this.updateRun(n))}},e.prototype.taskRemovedFromRun=function(t,e){return!t.run_id&&e.taskIds.has(t.id)},e.prototype.taskAddedToRun=function(t,e){return t.run_id&&!e.taskIds.has(t.id)},e.prototype.backupTasksUntilRunIsCreated=function(t){t.run_id&&(this.taskIdsWaitingForRun.has(t.run_id)||this.taskIdsWaitingForRun.set(t.run_id,new Set),this.taskIdsWaitingForRun.get(t.run_id).add(t.id))},e}(s.default);e.default=c},function(t,e,n){"use strict";e.__esModule=!0,e.ActionType=void 0,function(t){t[t.ALERT=0]="ALERT",t[t.INTERNAL_SMS=1]="INTERNAL_SMS",t[t.INTERNAL_EMAIL=2]="INTERNAL_EMAIL",t[t.WEBHOOK=3]="WEBHOOK"}(e.ActionType||(e.ActionType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.OwnerType=void 0,function(t){t[t.Driver=0]="Driver",t[t.Store=1]="Store"}(e.OwnerType||(e.OwnerType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";var r;e.__esModule=!0,e.AlertDisplayCategory=e.ALERT_TYPES_VALUES=e.ALERT_TYPES=void 0,function(t){t[t.UNACCEPTED=1]="UNACCEPTED",t[t.LATE=2]="LATE",t[t.FAILED_SMS=3]="FAILED_SMS",t[t.MISSED_CLIENT_MESSAGE=4]="MISSED_CLIENT_MESSAGE",t[t.FAILED_CONSUMER_APP=5]="FAILED_CONSUMER_APP",t[t.STAYS_TOO_LONG_ON_SITE=6]="STAYS_TOO_LONG_ON_SITE",t[t.UNKNOWN=7]="UNKNOWN",t[t.PHONE_STOPPED_REPORTING=8]="PHONE_STOPPED_REPORTING",t[t.LOW_BATTERY=9]="LOW_BATTERY",t[t.FAILED_PUSHING_TO_DRIVER=10]="FAILED_PUSHING_TO_DRIVER",t[t.DRIVER_LOST_GPS=11]="DRIVER_LOST_GPS",t[t.ROGUE_CUSTOMER_SUSPECTED=12]="ROGUE_CUSTOMER_SUSPECTED",t[t.ROGUE_ORDER_SUSPECTED=13]="ROGUE_ORDER_SUSPECTED",t[t.FAILED_EMAIL=14]="FAILED_EMAIL",t[t.DRIVER_FORCE_CLOSED_APP=15]="DRIVER_FORCE_CLOSED_APP",t[t.ADDRESS_CANT_BE_FOUND=16]="ADDRESS_CANT_BE_FOUND",t[t.DONE_LAST_ORDER=17]="DONE_LAST_ORDER",t[t.DRIVER_OFF_ROUTE=18]="DRIVER_OFF_ROUTE",t[t.CHECKIN_FAR_FROM_LOCATION=19]="CHECKIN_FAR_FROM_LOCATION",t[t.SCANNING_OUTSIDE_GEOFENCE=20]="SCANNING_OUTSIDE_GEOFENCE",t[t.DRIVER_ENDS_SHIFT_WITH_OPEN_TASKS=21]="DRIVER_ENDS_SHIFT_WITH_OPEN_TASKS",t[t.COULD_NOT_CREATE_RETURNING_TASK=22]="COULD_NOT_CREATE_RETURNING_TASK",t[t.DRIVER_ENDS_SHIFT_BEFORE_SCHEDULE=23]="DRIVER_ENDS_SHIFT_BEFORE_SCHEDULE",t[t.DRIVER_DEPOSIT_CLIENT_DEPOSIT_AMOUNT_DIFFERENT_FROM_SERVER=24]="DRIVER_DEPOSIT_CLIENT_DEPOSIT_AMOUNT_DIFFERENT_FROM_SERVER",t[t.DRIVER_DEPOSIT_CLIENT_DEPOSIT_AMOUNT_BASED_ON_TASK_IDS_DIFFERENT_FROM_SERVIER=25]="DRIVER_DEPOSIT_CLIENT_DEPOSIT_AMOUNT_BASED_ON_TASK_IDS_DIFFERENT_FROM_SERVIER",t[t.REQUIRE_MORE_DRIVERS=26]="REQUIRE_MORE_DRIVERS",t[t.TOO_MANY_DRIVERS=27]="TOO_MANY_DRIVERS",t[t.USER_RATED_BELLOW_THRESHOLD=28]="USER_RATED_BELLOW_THRESHOLD",t[t.WAY_POINT_NOT_GEOCODED=29]="WAY_POINT_NOT_GEOCODED",t[t.MOBILE_BLUETOOTH_IS_OFF=30]="MOBILE_BLUETOOTH_IS_OFF",t[t.ETA_TO_HOME=31]="ETA_TO_HOME",t[t.UNASSIGNED_TASK_THAT_MUST_LEAVE=32]="UNASSIGNED_TASK_THAT_MUST_LEAVE",t[t.GPS_IS_OFF=33]="GPS_IS_OFF",t[t.FLEET_FAILED_TO_FIND_DRIVER=34]="FLEET_FAILED_TO_FIND_DRIVER",t[t.FLEET_UNABLE_TO_DELIVER=35]="FLEET_UNABLE_TO_DELIVER",t[t.NOT_ASSIGNED_BEFORE_SCHEDULE=36]="NOT_ASSIGNED_BEFORE_SCHEDULE",t[t.NOT_ACCEPTED_BEFORE_SCHEDULE=37]="NOT_ACCEPTED_BEFORE_SCHEDULE",t[t.NOT_STARTED_BEFORE_SCHEDULE=38]="NOT_STARTED_BEFORE_SCHEDULE",t[t.ROUTE_OPTIMIZATION_FAILED=39]="ROUTE_OPTIMIZATION_FAILED",t[t.VRP_AUTO_DISPATCH_FAILED_TO_ASSIGN_TASK=40]="VRP_AUTO_DISPATCH_FAILED_TO_ASSIGN_TASK",t[t.DRIVER_STARTED_UNPRIORITIZED_TASK=41]="DRIVER_STARTED_UNPRIORITIZED_TASK",t[t.DRIVER_CANCELLED_ORDER=42]="DRIVER_CANCELLED_ORDER",t[t.BAD_OPTIMIZATION_PARAMETERS=43]="BAD_OPTIMIZATION_PARAMETERS",t[t.FAILED_TO_CREATE_FLEET_DELIVERY=44]="FAILED_TO_CREATE_FLEET_DELIVERY",t[t.ROUTE_OPTIMIZATION_ORDERS_LEFT_OUTSIDE_OPTIMIZATION=45]="ROUTE_OPTIMIZATION_ORDERS_LEFT_OUTSIDE_OPTIMIZATION",t[t.ROUTE_OPTIMIZATION_TASKS_REMOVED_BEFORE_OPTIMIZATION=46]="ROUTE_OPTIMIZATION_TASKS_REMOVED_BEFORE_OPTIMIZATION",t[t.FAILED_TO_CANCEL_FLEET_DELIVERY=47]="FAILED_TO_CANCEL_FLEET_DELIVERY",t[t.FAILED_TO_UPDATE_FLEET_DELIVERY=48]="FAILED_TO_UPDATE_FLEET_DELIVERY",t[t.TMP_DAY_AND_ROSS_ORDER_TOTAL_WEIGHT_CHANGED=100]="TMP_DAY_AND_ROSS_ORDER_TOTAL_WEIGHT_CHANGED",t[t.TMP_DAY_AND_ROSS_INVENTORY_SIZE_CHANGED=101]="TMP_DAY_AND_ROSS_INVENTORY_SIZE_CHANGED",t[t.TMP_DAY_AND_ROSS_PICKUP_ORDER_TIME_WINDOW_CHANGED=102]="TMP_DAY_AND_ROSS_PICKUP_ORDER_TIME_WINDOW_CHANGED",t[t.TMP_DAY_AND_ROSS_DELIVERY_ORDER_TIME_WINDOW_CHANGED=103]="TMP_DAY_AND_ROSS_DELIVERY_ORDER_TIME_WINDOW_CHANGED",t[t.TMP_DAY_AND_ROSS_PICKUP_ORDER_SCHEDULED_TIME_CHANGED=104]="TMP_DAY_AND_ROSS_PICKUP_ORDER_SCHEDULED_TIME_CHANGED",t[t.TMP_DAY_AND_ROSS_DELIVERY_ORDER_SCHEDULED_TIME_CHANGED=105]="TMP_DAY_AND_ROSS_DELIVERY_ORDER_SCHEDULED_TIME_CHANGED",t[t.TMP_DAY_AND_ROSS_ORDER_DANGEROUS_GOODS_STATUS_CHANGED=106]="TMP_DAY_AND_ROSS_ORDER_DANGEROUS_GOODS_STATUS_CHANGED",t[t.TMP_DAY_AND_ROSS_PICKUP_ORDER_LOCATION_CHANGED=107]="TMP_DAY_AND_ROSS_PICKUP_ORDER_LOCATION_CHANGED",t[t.TMP_DAY_AND_ROSS_DELIVERY_ORDER_LOCATION_CHANGED=108]="TMP_DAY_AND_ROSS_DELIVERY_ORDER_LOCATION_CHANGED",t[t.TMP_DAY_AND_ROSS_ORDER_SERVICE_PLAN_CHANGED=109]="TMP_DAY_AND_ROSS_ORDER_SERVICE_PLAN_CHANGED",t[t.TMP_DAY_AND_ROSS_ORDER_REQUIRED_SKILLS_CHANGED=110]="TMP_DAY_AND_ROSS_ORDER_REQUIRED_SKILLS_CHANGED",t[t.TMP_DAY_AND_ROSS_NUMBER_OF_PALLETS_CHANGED=111]="TMP_DAY_AND_ROSS_NUMBER_OF_PALLETS_CHANGED",t[t.TMP_DAY_AND_ROSS_RUN_BREACHED_BY_WEIGHT=112]="TMP_DAY_AND_ROSS_RUN_BREACHED_BY_WEIGHT",t[t.TMP_DAY_AND_ROSS_RUN_BREACHED_BY_PALLETS=113]="TMP_DAY_AND_ROSS_RUN_BREACHED_BY_PALLETS"}(r=e.ALERT_TYPES||(e.ALERT_TYPES={})),e.ALERT_TYPES_VALUES=Object.values(r).filter((function(t){return"number"==typeof t})),function(t){t.TASK="task",t.DRIVER="driver",t.OPTIMIZATION="optimization"}(e.AlertDisplayCategory||(e.AlertDisplayCategory={}))},function(t,e,n){"use strict";e.__esModule=!0,e.AlertSeverity=void 0,function(t){t[t.Low=1]="Low",t[t.Medium=2]="Medium",t[t.High=3]="High"}(e.AlertSeverity||(e.AlertSeverity={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ApplicationUuid=void 0,function(t){t.AutoAssign="7083ab3d-c7de-40fd-83bb-f2c10bd0fa88",t.AAA="3ecfa3f6-1a21-11e8-accf-0ed5f89f718b",t.ActOnTriggerApp="8ebe8358-62d3-11ea-bc55-0242ac130003",t.AutoBreaks="9310325e-d7d5-11ea-87d0-0242ac130003",t.AvailableDrivers="17fea9d6-9f5e-4234-91b4-34d6677ba5be",t.Bitly="f4b3ade5-4997-418e-8f99-1813dd1e56df",t.BackToWarehouse="d21a5684-8997-11e8-9a94-a6cf71072f73",t.Boulanger="34dc733d-7d17-4e44-8884-bb1ec1197da6",t.Clover="7661994f-da60-4f5d-bda9-4c132fb19484",t.CocaCola="eaf03283-dce4-4567-b6bf-f3eb3573357e",t.CancellationTasks="94c67d35-e289-44de-a19d-8ee0b02b00e0",t.Chat="6ee9296a-38bd-4d8e-81c6-b16001a20ee3",t.CocaColaBrazilApp="f9bd58a4-a514-11ea-bb37-0242ac130002",t.CocaColaChile="075c7b23-a847-4510-bc86-79fd0d5be557",t.CocaColaIl="1e8e105b-61e2-4f54-bc70-5c6117348b87",t.ComingHomeApp="c7d80d71-fe64-43b1-9d66-c8a76db31ea5",t.Conduit="1294eec3-550d-4d71-8831-d9051750742a",t.CoopApp="6b88b9d4-d79a-4d62-8ded-fa0e5c7d67be",t.CustomerExperienceApp="caf4e836-e507-4f68-bb9c-c4511bb69750",t.CustomerExperienceWebApp="a4338daf-babe-4fc4-a2d4-9050da8c1782",t.DataTrac="d07f52b1-bf43-400f-88ab-40426de4b17c",t.DetectDriverOffRoute="dd2ad97a-ffee-11e5-86aa-5e5517507c66",t.DHL="ec424a40-a9b9-11e6-80f5-76304dec7eb7",t.DispatcherNotifier="f574941d-fd43-4c4e-bd85-9b4107e569f3",t.DriverActivityVerifier="f68bae82-dac7-411c-a772-792226bc8ea4",t.DriverPayments="88260a80-c003-4d66-bf81-5f15443286ed",t.ETA="9369f5d4-57d8-4806-b2c9-fcc6f4e51531",t.ExternalFleetApp="271c52e5-0a1a-40cb-9f24-730ec91e4afc",t.FailedDeliveryManager="de7f883b-bab4-4e25-a830-83bd1c5cb270",t.FedexFreight="064844ab-e6f4-4b0e-8e26-383a408cab2a",t.FedexIl="1b4e301f-86d1-4711-9947-08e3d8e73c6a",t.FleetRouterApp="0ee6e692-3948-4346-b57c-671d3c8b7237",t.FloatingInventoryApp="d7409473-fc0b-4d1e-a085-04634f5acd4f",t.GeocodingFiltering="afc79118-6409-43f5-94aa-268dd3d98539",t.HoursStats="88b80320-7587-447c-88bf-04e12737aebc",t.Integration="2a4c90a3-b433-40f5-88bc-d4e9020197dc",t.JusteatWebhooks="1aea54b2-d706-4c29-8b2b-47fe5660fd05",t.KFC="9250b181-92c1-4a3d-8934-8fdb6c791567",t.LeroyMerlinIntegrationApp="45c6821b-a645-424c-9bb6-9564f1f1d19f",t.LastLocationEstimator="325328e0-9347-11e5-abc1-69640172f3ad",t.ManagerAuthorizationRules="2a634eb8-145a-4269-978c-515878beda80",t.MarketplaceApp="463c04f0-a34c-11e7-ae10-5132451f306d",t.MiddleMile="13b785c1-5814-49b5-956a-b6f068161f41",t.Nextel="a91c3e27-ed17-4d0b-9c46-5981cd2cd09c",t.OAuth="811570c1-3e34-4b55-884a-6500dd50d310",t.OloApp="a8baa76c-b98d-40ec-bf30-05a0a6b8caf8",t.Panera="7e0b2c26-cfa2-4106-b4d6-c9aa3adc5478",t.ParcelShop="cd854cf7-0342-45e1-8212-dee71f599951",t.Pickup="3b62707b-22ad-4601-bef9-804927d6ca9f",t.PlannedEtaApp="e5a10347-ed56-44f4-8613-fe17f94a077f",t.Preparation="515a459e-bba3-4a52-889e-54b5b967cbf9",t.QuotesApp="c43a6eaa-dd2a-4d88-a339-861686546f08",t.RapidSosApp="76d2338f-6da3-412b-815b-b0e90d862b86",t.RDS="5ba318c1-aa07-448b-a25d-3a42e1e70ef0",t.RealtimeEtaApp="2fd6d6c6-f4b4-4b85-854c-4ee193512899",t.RouteOptimizer2="9dd3a937-b51e-41ed-afb4-6c3d97cdd620",t.ShareLocation="f8b6d7e6-bbeb-4468-be51-fb012d001fe3",t.SuperAdmin="2b8d33ba-41dc-4db5-bf42-791cd340154e",t.ShareLocationOnUpdate="b9c4b248-c517-11e9-aa8c-2a2ae2dbcce4",t.Shell="7167224f-1689-44eb-a615-ca2935e71b83",t.Shopify="2c376813-6647-498f-b53f-a53352ba02d7",t.SingleDriverOptimizerApp="2d6c4394-c504-4349-9395-cd01fded10f1",t.SingleSignOn="ec763a46-8ad7-48d8-aab7-dcefcb794ff9",t.SmsDriverNotifier="cbd475f3-a88b-45cb-aaf5-4d9bbe2c2f0b",t.StoreAppApp="b4152c59-70a3-415e-b414-ce419550782e",t.TowNow="cd52a2c2-193d-4f92-bf01-3412194e18b2",t.TasksETL="3043914f-9be6-43c6-b1d8-e249410c79bc",t.TaskScanner="255ef1ae-0012-448a-ad55-7dbfec3f1223",t.TaskSchedulingApp="779d22c8-e18a-4723-9fd9-b5475178c244",t.TaskSkillsApp="b6dbfed4-d416-48eb-9552-610b15ff5748",t.TaskTimesPredictions="6c573459-dad9-4486-bdaa-b7ff32bd3019",t.TaskValidation="56ca6350-b2bf-11e9-a2a3-2a2ae2dbcce4",t.TimeBasedTrigger="fa7399cd-745a-47b5-ba3d-34c3fa4c03ad",t.UserRoleSkills="f917dda7-806e-4d2c-bb07-47039375e4ec",t.UpsIntegration="b8cc8bb2-78be-11ea-bc55-0242ac130003",t.VrpAutoDispatch="da0db19e-5836-4750-959e-4689fb78a82c",t.Wizard="d1c9bbe8-ec15-11e4-adf3-1681e6b88ec1",t.Walmart="f9b14523-4a9a-4baf-b97e-2b9d9f3e913a",t.Webhooks="5920d1a0-4c82-11e4-916c-0800200c9a66",t.WebhookTimeZone="d3b976db-a8cf-4930-9489-b13d21075180",t.WebhookApp="52228df2-2759-432d-8865-2593d2ba6c12",t.EventBasedActions="56cc30b4-1600-42ca-ba58-94220961f110",t.InventoryTriggeredActions="bef201bc-f003-4ee5-9780-a03cb6951d3d",t.RuleEngine="e6d7c261-9d8d-4042-bd1e-5355cc5a348a"}(e.ApplicationUuid||(e.ApplicationUuid={}))},function(t,e,n){"use strict";e.__esModule=!0,e.LOGIN_ERRORS=void 0,function(t){t.MERCHANTS_DATA_REASON="HTTP_FAILED_DEPENDENCY",t.RECAPTCHA_REASON="HTTP_LOCKED"}(e.LOGIN_ERRORS||(e.LOGIN_ERRORS={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ChatConversationType=void 0,function(t){t[t.driver_and_team_dispatchers=0]="driver_and_team_dispatchers",t[t.task=1]="task",t[t.group=2]="group"}(e.ChatConversationType||(e.ChatConversationType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ChatMessageOrigin=e.ChatMessageType=void 0,function(t){t.TEXT="text",t.IMAGE="image"}(e.ChatMessageType||(e.ChatMessageType={})),function(t){t[t.MOBILE=0]="MOBILE",t[t.WEB=1]="WEB",t[t.SLACK=2]="SLACK"}(e.ChatMessageOrigin||(e.ChatMessageOrigin={}))},function(t,e,n){"use strict";e.__esModule=!0,e.Connection=e.DayOfWeek=void 0,function(t){t[t.Monday=0]="Monday",t[t.Tuesday=1]="Tuesday",t[t.Wednesday=2]="Wednesday",t[t.Thursday=3]="Thursday",t[t.Friday=4]="Friday",t[t.Saturday=5]="Saturday",t[t.Sunday=6]="Sunday"}(e.DayOfWeek||(e.DayOfWeek={})),function(t){t.Online="online",t.Offline="offline"}(e.Connection||(e.Connection={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.CustomFilterOperator=void 0,function(t){t[t.Equal=0]="Equal",t[t.GreaterThan=1]="GreaterThan",t[t.LessThan=2]="LessThan"}(e.CustomFilterOperator||(e.CustomFilterOperator={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.CustomerExperienceCancelEventTypes=e.TaskPhase=e.ApiVersion=void 0,function(t){t[t.V1=1]="V1",t[t.V2=2]="V2"}(e.ApiVersion||(e.ApiVersion={})),function(t){t.CREATED="created",t.SCHEDULING="scheduling",t.SCHEDULED="scheduled",t.DONE="done",t.RATING="rating"}(e.TaskPhase||(e.TaskPhase={})),function(t){t[t.DriverAssigned=0]="DriverAssigned",t[t.TaskStarted=1]="TaskStarted"}(e.CustomerExperienceCancelEventTypes||(e.CustomerExperienceCancelEventTypes={}))},function(t,e,n){"use strict";e.__esModule=!0,e.DeliveryBlockResourceLocationType=e.BreakType=void 0,function(t){t[t.Fixed=0]="Fixed",t[t.Flex=1]="Flex"}(e.BreakType||(e.BreakType={})),function(t){t[t.DRIVER_ADDRESS=1]="DRIVER_ADDRESS",t[t.TEAM_ADDRESS=2]="TEAM_ADDRESS",t[t.PARKING_SPOT=3]="PARKING_SPOT",t[t.VEHICLE_LOCATION=4]="VEHICLE_LOCATION"}(e.DeliveryBlockResourceLocationType||(e.DeliveryBlockResourceLocationType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.DeliveryProviderFleetLegacyType=e.DeliveryProviderContractType=e.DeliveryProviderStatus=e.DeliveryProviderEcoFriendlyType=e.DeliveryProviderDeliverFromCapability=e.DeliveryProviderSecurityCapability=e.DeliveryProviderServiceCapability=e.DeliveryProviderServiceLevelCapability=e.DeliveryProviderCommitmentTimeCapability=e.DeliveryProviderSkillCapability=e.DeliveryProviderVehicleCapability=e.DeliveryProviderIndustryCapability=void 0,function(t){t.big_and_bulky="big_and_bulky",t.restaurant="restaurant",t.groceries="groceries",t.healthcare="healthcare",t.automotive="automotive",t.meal_kit="meal_kit"}(e.DeliveryProviderIndustryCapability||(e.DeliveryProviderIndustryCapability={})),function(t){t.on_foot="on_foot",t.bikes="bikes",t.cargo_bikes="bikes",t.bicycles="bicycles",t.cars="cars",t.vans="vans",t.trucks="trucks",t.robots="robots",t.drones="drones"}(e.DeliveryProviderVehicleCapability||(e.DeliveryProviderVehicleCapability={})),function(t){t.proof_of_delivery="proof_of_delivery",t.quotes="quotes",t.multi_parcel="multi_parcel",t.update_order="update_order",t.driver_live_tracking="driver_live_tracking",t.cancel_order="cancel_order"}(e.DeliveryProviderSkillCapability||(e.DeliveryProviderSkillCapability={})),function(t){t.min30="min30",t.min60="min60",t.min120="min120"}(e.DeliveryProviderCommitmentTimeCapability||(e.DeliveryProviderCommitmentTimeCapability={})),function(t){t.on_demand="on_demand",t.same_day="same_day",t.scheduled="scheduled"}(e.DeliveryProviderServiceLevelCapability||(e.DeliveryProviderServiceLevelCapability={})),function(t){t.installation="installation",t.assambly="assambly",t.room_of_choice="room_of_choice",t.over_the_threshold="over_the_threshold",t.contactless="contactless",t.dangerous_goods="dangerous_goods",t.fragile="fragile",t.alcohol="alcohol",t.medical="medical"}(e.DeliveryProviderServiceCapability||(e.DeliveryProviderServiceCapability={})),function(t){t.iso="iso",t.soc2="soc2"}(e.DeliveryProviderSecurityCapability||(e.DeliveryProviderSecurityCapability={})),function(t){t.store="store",t.warehouse="warehouse"}(e.DeliveryProviderDeliverFromCapability||(e.DeliveryProviderDeliverFromCapability={})),function(t){t[t.Yes=0]="Yes",t[t.No=1]="No",t[t.Partial=2]="Partial"}(e.DeliveryProviderEcoFriendlyType||(e.DeliveryProviderEcoFriendlyType={})),function(t){t[t.Pending=0]="Pending",t[t.InProgress=1]="InProgress",t[t.Active=2]="Active",t[t.Inactive=3]="Inactive"}(e.DeliveryProviderStatus||(e.DeliveryProviderStatus={})),function(t){t[t.HubAggregator=0]="HubAggregator",t[t.HubDirect=1]="HubDirect",t[t.NonHub=2]="NonHub"}(e.DeliveryProviderContractType||(e.DeliveryProviderContractType={})),function(t){t[t.BringgIntegration=0]="BringgIntegration",t[t.SelfIntegration=1]="SelfIntegration",t[t.Bringg2Bringg=2]="Bringg2Bringg",t[t.Aggregator=3]="Aggregator"}(e.DeliveryProviderFleetLegacyType||(e.DeliveryProviderFleetLegacyType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.DeliveryProviderLookupType=void 0,function(t){t[t.ServiceLevels=0]="ServiceLevels",t[t.VehicleTypes=1]="VehicleTypes",t[t.ShippingOrigins=2]="ShippingOrigins",t[t.DeliveryTypes=3]="DeliveryTypes",t[t.AgeRestrictions=4]="AgeRestrictions",t[t.WhiteGloves=5]="WhiteGloves"}(e.DeliveryProviderLookupType||(e.DeliveryProviderLookupType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.DisputeReason=void 0,function(t){t[t.DRIVER_ARRIVED_LATE=0]="DRIVER_ARRIVED_LATE",t[t.DRIVER_ARRIVED_EARLY=1]="DRIVER_ARRIVED_EARLY",t[t.POOR_DELIVERY_EXECUTION=2]="POOR_DELIVERY_EXECUTION",t[t.DRIVER_BEHAVIOR_COMPLAINT=3]="DRIVER_BEHAVIOR_COMPLAINT",t[t.FLEET_CANCELLED_AFTER_ORDER_PREP=4]="FLEET_CANCELLED_AFTER_ORDER_PREP",t[t.DRIVER_NEVER_ARRIVED_TO_PICKUP=5]="DRIVER_NEVER_ARRIVED_TO_PICKUP",t[t.DRIVER_NEVER_ARRIVED_TO_DROPOFF=6]="DRIVER_NEVER_ARRIVED_TO_DROPOFF",t[t.OTHER=100]="OTHER"}(e.DisputeReason||(e.DisputeReason={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.EmulatedDeliveryEvents=void 0,function(t){t.AssignDriverAndStart="AssignDriverAndStart",t.CancelOrder="CancelOrder",t.FinishOrder="FinishOrder",t.CheckInPickUp="CheckInPickUp",t.CheckOutPickUp="CheckOutPickUp",t.CheckInDropOff="CheckInDropOff",t.CheckOutDropOff="CheckOutDropOff"}(e.EmulatedDeliveryEvents||(e.EmulatedDeliveryEvents={}))},function(t,e,n){"use strict";e.__esModule=!0,e.EventType=e.AssociationsChangedType=void 0,function(t){t.way_point="way_point",t.task_inventory="task_inventory",t.form="form",t.task_note="task_note",t.task_photo="task_photo",t.signature="signature"}(e.AssociationsChangedType||(e.AssociationsChangedType={})),function(t){t.ApplicationActionRun="application:action:run",t.UserPreLeftHome="user:pre_left_home",t.UserPreGotHome="user:pre_got_home",t.UserTypeChanged="user_type_changed",t.TaskCashoutCreated="task:cashout:created",t.EmployeeUpdateLocation="employee:update_location",t.EmployeeUpdate="employee:update",t.TaskNew="task:new",t.TaskAcknowledged="task:acknowledged",t.TaskPaymentHistoryCreated="task_payment_history:created",t.UserRated="user:rated",t.CustomerTipped="customer:tipped",t.CustomerCreated="customer:created",t.CustomerOptedIn="customer:opted_in",t.CustomerOptedOut="customer:opted_out",t.CustomerAvailabilityHoursCreated="customer:availability_hours:created",t.EmployeeTurnsOffline="employee_turns_offline",t.EmployeeTurnsOnline="employee_turns_online",t.ShiftStarted="shift:started",t.ShiftEnded="shift:ended",t.TaskWayPointAdded="task:way_point:added",t.TaskChangePreparation="task:change_preparation",t.TaskPreparationChanged="task:preparation_changed",t.TaskStatusChanged="task:status_changed",t.TaskDeleted="task:deleted",t.TaskUpdate="task:update",t.TaskPackagesChanged="task:packages_changed",t.TeamUserAdded="team:user_added",t.UserNew="user:new",t.TeamUserRemoved="team:user_removed",t.TeamTaskAdded="team:task_added",t.TeamTaskRemoved="team:task_removed",t.TaskCreated="task:created",t.TaskCreatedFinal="task:created:final",t.TaskCreatedFinalProcessingDone="task:created:final:processing:done",t.TaskRemoved="task:removed",t.TaskRejected="task:rejected",t.UserGotHome="user:got_home",t.UserLeftHome="user:left_home",t.TaskLate="task:late",t.AppAdded="app:added",t.AppRemoved="app:removed",t.RequestPush="request_push",t.UsersReadyToExecute="users:ready_to_execute",t.UserReadyToExecute="user:ready_to_execute",t.RequestOptimizeRoute="request_optimize_route",t.RequestOptimizeDriverRoute="request_optimize_driver_route",t.RequestRescheduleCancelledTask="request_reschedule_cancelled_task",t.SharedLocationCreated="shared_location:created",t.MerchantCreated="merchant_created",t.UserActivityChange="user_activity_change",t.FormCreated="form_created",t.NoteCreated="note_created",t.FloatingInventoryUpdated="floating_inventory:updated",t.WayPointUpdated="way_point:updated",t.WayPointStarted="way_point:started",t.WayPointArrived="way_point:checkin",t.WayPointLeft="way_point:checkout",t.MassWayPointLeft="mass:way_point:checkout",t.WayPointOnTheWayProcessingDone="way_point:on_the_way:processing:done",t.TaskWayPointsDoneProcessingDone="task:way_points:done:processing:done",t.TaskProcessingDone="task:processing:done",t.WayPointRecalculateDistance="way_point:recalculate_distance",t.RecalculateDistance="recalculate_distance",t.TaskReadyToExecute="task:ready_to_execute",t.TeamUpdate="team:update",t.MerchantConfigurationUpdated="merchant:configuration_updated",t.RouteOptimized="route:optimized",t.RouteOptimizationProgress="route:optimization:progress",t.RouteOptimizationCanceled="route:optimization:canceled",t.RouteOptimizationPolling="route:optimization:polling",t.RouteOptimizationDone="route:optimization:done",t.PlanningDone="planning:done",t.InventoryScheduledArrivalCreated="inventory:scheduled_arrival:created",t.Scanned="scanned",t.InventoryScanned="inventory_scanned",t.AlertCreated="alert_created",t.RunStarted="run:started",t.RunEnded="run:ended",t.RunTaskAdded="run:task:added",t.RunTaskRemoved="run:task:removed",t.RunUpdated="run:updated",t.RunCalculateAggregations="run:calculate_aggregations",t.InvoiceCreated="invoice:created",t.RunDebriefed="run:debriefed",t.TasksMassRemove="tasks:mass_remove",t.ManifestDone="manifest:done",t.LocationHistoryReceived="location_history_received",t.QuoteReceived="quote_received",t.DeliveryBlockAssigned="delivery_block:assigned",t.DeliveryBlockUnassigned="delivery_block:unassigned",t.DriverShiftScheduleUpdated="driver_shift_schedule:updated",t.SchedulerEvent="scheduler_event",t.MobileAnalyticsEvent="mobile_analytics_event",t.MenuUpdated="menu:updated",t.TaskInventoryUpdate="task_inventory:update",t.MobileActionEvent="mobile_action_event",t.WayPointAnswersCreated="way_point:answers:created",t.WayPointScheduledArrivalUpdated="way_point:scheduled_arrival:updated",t.MaskedPhoneCallFinished="masked_phone:call_finished",t.RapidSosRequested="rapid_sos_requested",t.RatingSubmitted="rating:submitted",t.UserActualBreakUpdated="user:actual_break:updated",t.TimeBasedEvent="time_based_event",t.OpenFleetIntegrationEvent="open_fleet:integration_event"}(e.EventType||(e.EventType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.AggregatorType=e.IntegrationType=void 0,function(t){t[t.Fleet=1]="Fleet",t[t.Aggregator=2]="Aggregator",t[t.POS=3]="POS"}(e.IntegrationType||(e.IntegrationType={})),function(t){t[t.Uber=1]="Uber",t[t.Loggi=3]="Loggi",t[t.Ifood=5]="Ifood",t[t.McdPOS=6]="McdPOS",t[t.Vtex=7]="Vtex",t[t.Toast=8]="Toast",t[t.GoogleFood=9]="GoogleFood",t[t.Popeyes=10]="Popeyes"}(e.AggregatorType||(e.AggregatorType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.FILTER_CONDITIONS=void 0,function(t){t.CONTAINS="CONTAINS",t.NOT_CONTAINS="NOT_CONTAINS",t.EQUALS="EQUALS",t.NOT_EQUALS="NOT_EQUALS",t.IS_EMPTY="IS_EMPTY",t.IS_NOT_EMPTY="IS_NOT_EMPTY",t.BETWEEN="BETWEEN",t.GREATER_THAN="GREATER_THAN",t.GREATER_THAN_OR_EQUALS="GREATER_THAN_OR_EQUALS",t.LESS_THAN="LESS_THAN",t.LESS_THAN_OR_EQUALS="LESS_THAN_OR_EQUALS"}(e.FILTER_CONDITIONS||(e.FILTER_CONDITIONS={}))},function(t,e,n){"use strict";var r,o;e.__esModule=!0,e.FleetTypeToCapabilities=e.FleetType=e.FleetStatus=e.FleetEnvType=void 0,function(t){t[t.Production=0]="Production",t[t.Staging=1]="Staging"}(e.FleetEnvType||(e.FleetEnvType={})),function(t){t[t.Active=0]="Active",t[t.Paused=1]="Paused",t[t.Pending=2]="Pending",t[t.Draft=3]="Draft",t[t.Failed=4]="Failed"}(e.FleetStatus||(e.FleetStatus={})),function(t){t[t.Uber=1]="Uber",t[t.Deliv=2]="Deliv",t[t.Loggi=3]="Loggi",t[t.Doordash=5]="Doordash",t[t.Ifood=6]="Ifood",t[t.Rappi=7]="Rappi",t[t.MensajerosUrbanos=8]="MensajerosUrbanos",t[t.PedidosYa=9]="PedidosYa",t[t.Glovo=10]="Glovo",t[t.Domicilios=11]="Domicilios",t[t.Postmates=12]="Postmates",t[t.FedEx=13]="FedEx",t[t.Stuart=14]="Stuart",t[t.Bringg=15]="Bringg",t[t.Deliveright=16]="Deliveright",t[t.Unmanaged=17]="Unmanaged",t[t.SelfIntegrated=18]="SelfIntegrated",t[t.Hertz=19]="Hertz",t[t.Shipt=20]="Shipt",t[t.Lyft=21]="Lyft",t[t.Deliveroo=22]="Deliveroo",t[t.ShippyPro=23]="ShippyPro",t[t.EasyPost=24]="EasyPost",t[t.Roadie=25]="Roadie",t[t.FiveString=26]="FiveString",t[t.PointPickup=27]="PointPickup",t[t.GLS=28]="GLS",t[t.TNT=29]="TNT",t[t.IFoodRestaurants=30]="IFoodRestaurants",t[t.EmulatedDeliveryProvider=999]="EmulatedDeliveryProvider"}(o=e.FleetType||(e.FleetType={})),e.FleetTypeToCapabilities=((r={})[o.Uber]={create_delivery:!0,get_quote:!0,multiple_time_windows:!0,is_green:!1},r[o.Deliv]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.Loggi]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.Doordash]={create_delivery:!0,get_quote:!0,is_green:!1},r[o.Ifood]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.Rappi]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.MensajerosUrbanos]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.PedidosYa]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.Glovo]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.Domicilios]={create_delivery:!1,get_quote:!1,is_green:!1},r[o.Postmates]={create_delivery:!0,get_quote:!0,is_green:!1},r[o.FedEx]={create_delivery:!0,get_quote:!0,is_green:!1},r[o.Stuart]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r[o.Bringg]={create_delivery:!0,get_quote:!1,update_delivery:!0,is_green:!1},r[o.Deliveright]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.SelfIntegrated]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r[o.Hertz]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.Shipt]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.Lyft]={create_delivery:!0,get_quote:!0,is_green:!1},r[o.Deliveroo]={create_delivery:!0,get_quote:!0,is_green:!1},r[o.ShippyPro]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.EasyPost]={create_delivery:!0,get_quote:!1,is_green:!1},r[o.Roadie]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r[o.FiveString]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r[o.PointPickup]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r[o.GLS]={create_delivery:!0,get_quote:!1,update_delivery:!0,is_green:!1},r[o.TNT]={create_delivery:!0,get_quote:!1,update_delivery:!0,is_green:!1},r[o.IFoodRestaurants]={create_delivery:!0,get_quote:!0,update_delivery:!1,is_green:!1},r[o.EmulatedDeliveryProvider]={create_delivery:!0,get_quote:!0,update_delivery:!0,is_green:!1},r)},function(t,e,n){"use strict";e.__esModule=!0,e.PreferredMethod=void 0,function(t){t.Priority="priority",t.Fastest="fastest",t.Cheapest="cheapest"}(e.PreferredMethod||(e.PreferredMethod={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.OWNERSHIP_ORIGIN=void 0,function(t){t[t.DRIVER_API=1]="DRIVER_API",t[t.WEB_API=2]="WEB_API",t[t.SERVICES_API=3]="SERVICES_API",t[t.FLOATING_INVENTORY_APP=4]="FLOATING_INVENTORY_APP"}(e.OWNERSHIP_ORIGIN||(e.OWNERSHIP_ORIGIN={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.IntegrationName=void 0,function(t){t[t.Ups=1]="Ups",t[t.iFood=2]="iFood",t[t.Arcos=3]="Arcos",t[t.LeroyMerlin=4]="LeroyMerlin",t[t.Salesforce=5]="Salesforce"}(e.IntegrationName||(e.IntegrationName={}))},function(t,e,n){"use strict";e.__esModule=!0,e.KEYSET_PAGINATION_VER=e.KeysetPaginationPageAction=void 0,function(t){t.NEXT="next",t.PREVIOUS="previous"}(e.KeysetPaginationPageAction||(e.KeysetPaginationPageAction={})),e.KEYSET_PAGINATION_VER=2},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.Origin=e.EntitySubType=e.EntityType=void 0,function(t){t.MENU="menu",t.SECTION="section",t.PRODUCT="product",t.COMPOSITE_PRODUCT="composite_product",t.CHOICE="choice",t.OPTION="option",t.PICKER="picker"}(e.EntityType||(e.EntityType={})),function(t){t.SIZE="size",t.PICKER_OPTION="picker_option"}(e.EntitySubType||(e.EntitySubType={})),function(t){t.MANUAL="manual",t.SYSTEM="system"}(e.Origin||(e.Origin={}))},function(t,e,n){"use strict";e.__esModule=!0,e.EnvironmentTypes=e.SubscriptionTypes=e.PrinterTypes=void 0,function(t){t.DEFAULT="",t.THREE_INCH="3inch",t.TWO_INCH="2inch"}(e.PrinterTypes||(e.PrinterTypes={})),function(t){t[t.TEST=-1]="TEST",t[t.UNKNOWN=0]="UNKNOWN",t[t.PRODUCTION=1]="PRODUCTION",t[t.CLOVER_DEMO=2]="CLOVER_DEMO",t[t.CLOVER_UNKNOWN=4]="CLOVER_UNKNOWN",t[t.CLOVER_FREE_TIER=5]="CLOVER_FREE_TIER",t[t.CLOVER_PRO_TIER=6]="CLOVER_PRO_TIER",t[t.CLOVER_TRIAL=7]="CLOVER_TRIAL",t[t.CLOVER_UNINSTALLED=9]="CLOVER_UNINSTALLED",t[t.DEACTIVATED=12]="DEACTIVATED",t[t.PRODUCTION_UNPAID=13]="PRODUCTION_UNPAID",t[t.BLOCKED_UNPAID=14]="BLOCKED_UNPAID",t[t.STRIPE=17]="STRIPE",t[t.ONE_TO_MANY=19]="ONE_TO_MANY"}(e.SubscriptionTypes||(e.SubscriptionTypes={})),function(t){t[t.Production=0]="Production",t[t.Test=1]="Test"}(e.EnvironmentTypes||(e.EnvironmentTypes={}))},function(t,e,n){"use strict";e.__esModule=!0,e.GrabMode=e.SmsProvider=e.SharingMode=e.ChainOfCustodyType=e.TipType=e.FormDisplayMode=e.HourFormat=e.FuturePeriod=void 0,function(t){t[t.none=-1]="none",t[t.today=1]="today",t[t.tomorrow=2]="tomorrow",t[t.next_24_hours=3]="next_24_hours",t[t.forever_and_ever=4]="forever_and_ever",t[t.custom=5]="custom",t[t.all_open_tasks=6]="all_open_tasks"}(e.FuturePeriod||(e.FuturePeriod={})),function(t){t[t.Default=0]="Default",t[t.TwelveHours=1]="TwelveHours",t[t.TwentyFourHours=2]="TwentyFourHours"}(e.HourFormat||(e.HourFormat={})),function(t){t[t.MANUAL=0]="MANUAL",t[t.AFTER_CHECK_IN=1]="AFTER_CHECK_IN",t[t.BEFORE_CHECKOUT=2]="BEFORE_CHECKOUT"}(e.FormDisplayMode||(e.FormDisplayMode={})),function(t){t[t.PERCENT=0]="PERCENT",t[t.MONEY=1]="MONEY"}(e.TipType||(e.TipType={})),function(t){t[t.WEAK=0]="WEAK",t[t.STRONG=1]="STRONG",t[t.NONE=2]="NONE",t[t.UNLOAD=3]="UNLOAD"}(e.ChainOfCustodyType||(e.ChainOfCustodyType={})),function(t){t[t.ALL=0]="ALL",t[t.EMAIL_ONLY=1]="EMAIL_ONLY",t[t.PHONE_ONLY=2]="PHONE_ONLY",t[t.NO_SHARING=3]="NO_SHARING",t[t.WEBHOOKS_ONLY=4]="WEBHOOKS_ONLY"}(e.SharingMode||(e.SharingMode={})),function(t){t[t.Twilio=0]="Twilio",t[t.Nexmo=1]="Nexmo"}(e.SmsProvider||(e.SmsProvider={})),function(t){t[t.OFF=0]="OFF",t[t.AUTOMATIC=1]="AUTOMATIC",t[t.ON_DEMAND=2]="ON_DEMAND"}(e.GrabMode||(e.GrabMode={}))},function(t,e,n){"use strict";e.__esModule=!0,e.SubscriptionNotificationType=e.SubscriptionType=void 0,function(t){t[t.Email=0]="Email"}(e.SubscriptionType||(e.SubscriptionType={})),function(t){t[t.InvalidInventory=0]="InvalidInventory",t[t.EtlReport=1]="EtlReport",t[t.WebhookFailures=2]="WebhookFailures",t[t.MenuIssue=3]="MenuIssue",t[t.IntegrationPollingError=4]="IntegrationPollingError"}(e.SubscriptionNotificationType||(e.SubscriptionNotificationType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.NotificationTypes=void 0,function(t){t.RatingScreenTitle="rating_screen_title",t.PostRatingPositiveTitle="post_rating_positive_title",t.PostRatingNegativeTitle="post_rating_negative_title"}(e.NotificationTypes||(e.NotificationTypes={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.OptInMethod=e.OptInType=void 0,function(t){t[t.OPT_IN=1]="OPT_IN",t[t.OPT_OUT=2]="OPT_OUT"}(e.OptInType||(e.OptInType={})),function(t){t[t.SMS=1]="SMS",t[t.API=2]="API"}(e.OptInMethod||(e.OptInMethod={}))},function(t,e,n){"use strict";e.__esModule=!0,e.RouteItemType=e.OPTIMIZATION_TYPE=void 0,function(t){t[t.ANONYMOUS=1]="ANONYMOUS",t[t.NAMED_VRP=2]="NAMED_VRP",t[t.NAMED_PDP=3]="NAMED_PDP",t[t.ROUTE_BASED=4]="ROUTE_BASED",t[t.CREW_BASED=5]="CREW_BASED",t[t.COMBINED=6]="COMBINED"}(e.OPTIMIZATION_TYPE||(e.OPTIMIZATION_TYPE={})),function(t){t.Break="break"}(e.RouteItemType||(e.RouteItemType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.PrivilegeTypes=void 0,function(t){t.DISPATCH_SCREEN="dispatch",t.CREATE_ORDERS="create_order",t.VIEW_TASK="view_task",t.ACKNOWLEDGE_FLOW="acknowledge",t.HISTORY="history",t.DRIVERS="drivers",t.DRIVER_PRORFILE="driver_profile",t.ADD_DRIVER="add_driver",t.CHANGE_DRIVER_ROLE="change_driver_type",t.ASSIGN_DRIVER_TO_TASK="assign_driver_to_task",t.TEAMS="teams",t.USER_TYPES="user_types",t.CUSTOMERS="customers_menu",t.REPORTS="reports",t.REPORTS_NEW="reports_new",t.DASHBOARD="dashboard",t.CASHOUT_EDIT_DISTANCE="cashout_edit_distance",t.ACCESS_SETTINGS_SCREEN="access_settings_screen",t.CUSTOMER_CARE="customer_care",t.MAINTAIN_DRIVER_SHIFT_TIMES="maintain_driver_shift_times",t.COMPLETE_TASK="complete_task",t.EDIT_DELIVERY_BLOCK="edit_delivery_block",t.SEE_SEND_TO_PREPARATION="send_to_preparation",t.ACCESS_TASKS="access_task",t.ACCESS_TO_ALL_TASKS="access_to_all_tasks",t.ACCESS_COMPANY_TASKS_ONLY="access_company_tasks_only",t.EDIT_COMPANY="edit_company",t.ENABLE_BI_DASHBOARD="enable_bi_dashboard",t.EDIT_EXCLUSION_WINDOWS="edit_exclusion_windows",t.EDIT_TASK_DETAILS="edit_task_details",t.TASKS_CSV_IMPORTER_EDIT_HEADERS="tasks_csv_importer_edit_headers",t.EDIT_SERVICE_AREAS="edit_service_areas",t.ACCESS_USERS="access_user",t.ACCESS_COMPANY_USERS_ONLY="access_company_users_only",t.ACCESS_TO_NONE_ORDERS="access_to_none_orders",t.CANCEL_TASK="cancel_task",t.LOCK_UNLOCK_TASK="lock_unlock_task",t.RESCHEDULE_CANCELLED_ORDER="reschedule_cancelled_order",t.BILLING_PORTAL="billing_portal",t.CUSTOMIZE_LIST_LAYOUT="customize_list_layout"}(e.PrivilegeTypes||(e.PrivilegeTypes={}))},function(t,e,n){"use strict";e.__esModule=!0,e.PushNotificationEnvironment=e.DevicePlatform=void 0,function(t){t[t.Android=1]="Android",t[t.IOS=2]="IOS"}(e.DevicePlatform||(e.DevicePlatform={})),function(t){t[t.Release=1]="Release",t[t.Development=2]="Development"}(e.PushNotificationEnvironment||(e.PushNotificationEnvironment={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ApplicationType=void 0,function(t){t[t.STORE_APP=0]="STORE_APP"}(e.ApplicationType||(e.ApplicationType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.VehicleTypeId=void 0,function(t){t[t.Walker=1]="Walker",t[t.Bicycle=2]="Bicycle",t[t.Car=3]="Car",t[t.Truck=4]="Truck"}(e.VehicleTypeId||(e.VehicleTypeId={}))},function(t,e,n){"use strict";e.__esModule=!0,e.RateCardRateBase=e.RateCardTermType=e.RateCardEntityType=void 0,function(t){t.Fleet="fleet",t.DeliveryProvider="delivery_provider"}(e.RateCardEntityType||(e.RateCardEntityType={})),function(t){t.Base="base",t.Surcharge="surcharge"}(e.RateCardTermType||(e.RateCardTermType={})),function(t){t.Flat="flat",t.Units="units",t.Miles="miles",t.Weight="weight"}(e.RateCardRateBase||(e.RateCardRateBase={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};e.__esModule=!0,o(n(283),e),o(n(284),e),o(n(285),e),o(n(286),e)},function(t,e,n){"use strict";e.__esModule=!0,e.Order=void 0,function(t){t.asc="asc",t.desc="desc"}(e.Order||(e.Order={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ReportExportingStatus=e.ReportExecuteOrigin=void 0,function(t){t[t.Scheduled=0]="Scheduled",t[t.ExportNow=1]="ExportNow",t[t.Download=2]="Download"}(e.ReportExecuteOrigin||(e.ReportExecuteOrigin={})),function(t){t.InProgress="InProgress",t.Completed="Completed",t.Error="Error",t.Canceled="Canceled"}(e.ReportExportingStatus||(e.ReportExportingStatus={}))},function(t,e,n){"use strict";e.__esModule=!0,e.SharedReportAccessLevel=void 0,function(t){t[t.Viewer=0]="Viewer",t[t.Editor=1]="Editor"}(e.SharedReportAccessLevel||(e.SharedReportAccessLevel={}))},function(t,e,n){"use strict";e.__esModule=!0,e.CronDayOfWeek=e.ReportExportFormat=e.ReportDeliveryType=e.RecurrencePeriod=void 0,function(t){t.Monthly="Monthly",t.Weekly="Weekly",t.Daily="Daily"}(e.RecurrencePeriod||(e.RecurrencePeriod={})),function(t){t[t.Email=0]="Email",t[t.ApiOrUrl=1]="ApiOrUrl"}(e.ReportDeliveryType||(e.ReportDeliveryType={})),function(t){t[t.CSV=0]="CSV",t[t.JSON=1]="JSON"}(e.ReportExportFormat||(e.ReportExportFormat={})),function(t){t[t.Sunday=1]="Sunday",t[t.Monday=2]="Monday",t[t.Tuesday=3]="Tuesday",t[t.Wednesday=4]="Wednesday",t[t.Thursday=5]="Thursday",t[t.Friday=6]="Friday",t[t.Saturday=7]="Saturday"}(e.CronDayOfWeek||(e.CronDayOfWeek={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.FILTER_TYPES=e.UserRole=e.WIDGET_GROUPING_TYPES=e.NAV_MENU_HIERARCHY_TYPES=e.LAYOUT_SOURCE=e.NAV_MENU_TYPES=e.TARGET_OPERATORS=e.COMPONENT_TYPES=void 0,function(t){t[t.TIME_GRAPH=0]="TIME_GRAPH",t[t.METRICS=1]="METRICS",t[t.BIG_NUMBER=2]="BIG_NUMBER",t[t.TIME_LINE=3]="TIME_LINE",t[t.PIE=4]="PIE",t[t.STACKED_SEGMENT_BAR=5]="STACKED_SEGMENT_BAR",t[t.UNSTACKED_SEGMENT_BAR=6]="UNSTACKED_SEGMENT_BAR",t[t.NON_TIME_BASED_STACKED_SEGMENT_BAR=7]="NON_TIME_BASED_STACKED_SEGMENT_BAR",t[t.MULTIPLE_QUERIES=8]="MULTIPLE_QUERIES"}(e.COMPONENT_TYPES||(e.COMPONENT_TYPES={})),function(t){t[t.BIGGER=0]="BIGGER",t[t.SMALLER=1]="SMALLER"}(e.TARGET_OPERATORS||(e.TARGET_OPERATORS={})),function(t){t[t.MERCHANTS_TEAMS=0]="MERCHANTS_TEAMS",t[t.TEAMS=1]="TEAMS"}(e.NAV_MENU_TYPES||(e.NAV_MENU_TYPES={})),function(t){t[t.INSIGHT_APP=0]="INSIGHT_APP",t[t.BI_DASHBOARD=1]="BI_DASHBOARD"}(e.LAYOUT_SOURCE||(e.LAYOUT_SOURCE={})),function(t){t[t.GLOBAL=0]="GLOBAL",t[t.MERCHANT=1]="MERCHANT",t[t.TEAM=2]="TEAM"}(e.NAV_MENU_HIERARCHY_TYPES||(e.NAV_MENU_HIERARCHY_TYPES={})),function(t){t.GROUP_BY_ORIGIN="GROUP_BY_ORIGIN",t.GROUP_BY_FLEET="GROUP_BY_FLEET",t.GROUP_BY_MERCHANT="GROUP_BY_MERCHANT",t.GROUP_BY_HOUR_OF_DAY="GROUP_BY_HOUR_OF_DAY",t.GROUP_BY_DAY_OF_WEEK="GROUP_BY_DAY_OF_WEEK",t.GROUP_BY_TEAM="GROUP_BY_TEAM",t.GROUP_BY_WP1_ARRIVAL="GROUP_BY_WP1_ARRIVAL",t.GROUP_BY_WP2_ARRIVAL="GROUP_BY_WP2_ARRIVAL",t.GROUP_BY_CUSTOMER_WP="GROUP_BY_CUSTOMER_WP",t.GROUP_BY_FLEET_WITH_INTERNAL_FLEETS="GROUP_BY_FLEET_WITH_INTERNAL_FLEETS",t.GROUP_BY_RATING="GROUP_BY_RATING",t.GROUP_BY_DRIVER="GROUP_BY_DRIVER"}(e.WIDGET_GROUPING_TYPES||(e.WIDGET_GROUPING_TYPES={})),function(t){t[t.Partner=0]="Partner",t[t.Admin=1]="Admin",t[t.Dispatcher=2]="Dispatcher"}(e.UserRole||(e.UserRole={})),function(t){t.TIME_RANGE="TIME_RANGE",t.COMPARE_RANGE="COMPARE_RANGE",t.FLEETS="FLEETS"}(e.FILTER_TYPES||(e.FILTER_TYPES={}))},function(t,e,n){"use strict";e.__esModule=!0,e.RequestOrigin=void 0,function(t){t[t.DriverApi=1]="DriverApi",t[t.WebApi=2]="WebApi",t[t.RakeService=3]="RakeService",t[t.ScheduledRakeTask=4]="ScheduledRakeTask",t[t.CustomerExperienceApi=5]="CustomerExperienceApi",t[t.OpenFleetApi=6]="OpenFleetApi"}(e.RequestOrigin||(e.RequestOrigin={}))},function(t,e,n){"use strict";e.__esModule=!0,e.RuleRequestType=e.FactType=e.Entity=e.RuleCategory=e.RuleCompareOperator=e.AttributeDatatype=void 0,function(t){t.String="string",t.Number="number",t.Boolean="boolean",t.Datetime="datetime",t.Array="array"}(e.AttributeDatatype||(e.AttributeDatatype={})),function(t){t.EQUALS="EQUALS",t.NOT_EQUALS="NOT_EQUALS",t.INCLUDE="INCLUDE",t.EXCLUDE="EXCLUDE",t.LESS_THAN="LESS_THAN",t.LESS_THAN_OR_EQUALS="LESS_THAN_OR_EQUALS",t.GREATER_THAN="GREATER_THAN",t.GREATER_THAN_OR_EQUALS="GREATER_THAN_OR_EQUALS",t.IN="IN",t.IN_RANGE="IN_RANGE",t.CHANGED="CHANGED"}(e.RuleCompareOperator||(e.RuleCompareOperator={})),function(t){t[t.FleetRouter=0]="FleetRouter",t[t.Alert=1]="Alert",t[t.Rate=2]="Rate"}(e.RuleCategory||(e.RuleCategory={})),function(t){t.Fleet="fleet",t.DeliveryProvider="delivery_provider",t.Action="action"}(e.Entity||(e.Entity={})),function(t){t.Task="task",t.Waypoint="waypoint",t.Run="run",t.Rate="rate"}(e.FactType||(e.FactType={})),function(t){t.Evaluate="rule:evaluate"}(e.RuleRequestType||(e.RuleRequestType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.OFFLINE_ONLINE_EVENT_TYPES=e.RUN_HISTORY_TYPES=e.HOME_EVENT_TYPES=e.START_END_METHODS=void 0,function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.FROM_MANUAL_START_TASK=1]="FROM_MANUAL_START_TASK",t[t.FROM_AUTO_START_TASK=2]="FROM_AUTO_START_TASK",t[t.FROM_END_RUN=3]="FROM_END_RUN",t[t.HOME_FROM_DASHBOARD=4]="HOME_FROM_DASHBOARD",t[t.HOME_FROM_BEACON=5]="HOME_FROM_BEACON",t[t.HOME_FROM_GEOFENCE=6]="HOME_FROM_GEOFENCE",t[t.HOME_FROM_APP=7]="HOME_FROM_APP",t[t.HOME_FROM_API=8]="HOME_FROM_API",t[t.HOME_FROM_SERVER=9]="HOME_FROM_SERVER",t[t.HOME_FROM_POLYGON=10]="HOME_FROM_POLYGON",t[t.FROM_ROLE_CHANGE=11]="FROM_ROLE_CHANGE",t[t.FROM_END_TASK=12]="FROM_END_TASK",t[t.FROM_START_TASK=13]="FROM_START_TASK",t[t.FROM_END_SHIFT=14]="FROM_END_SHIFT",t[t.ROUTES_CREATE_TASK=15]="ROUTES_CREATE_TASK"}(e.START_END_METHODS||(e.START_END_METHODS={})),function(t){t[t.AUTOMATIC_FROM_APP_GEOFENCE=1]="AUTOMATIC_FROM_APP_GEOFENCE",t[t.MANUAL_FROM_APP=2]="MANUAL_FROM_APP",t[t.FROM_DASHBOARD=3]="FROM_DASHBOARD",t[t.FROM_API=4]="FROM_API",t[t.AUTOMATIC_FROM_SERVER=5]="AUTOMATIC_FROM_SERVER",t[t.AUTOMATIC_FROM_APP_POLYGON=6]="AUTOMATIC_FROM_APP_POLYGON",t[t.AUTOMATIC_FROM_APP_BEACON=7]="AUTOMATIC_FROM_APP_BEACON",t[t.AUTOMATIC_FROM_ROLE_CHANGE=8]="AUTOMATIC_FROM_ROLE_CHANGE",t[t.FROM_END_SHIFT=9]="FROM_END_SHIFT"}(e.HOME_EVENT_TYPES||(e.HOME_EVENT_TYPES={})),function(t){t[t.ALERT=0]="ALERT",t[t.HOME_EVENT=1]="HOME_EVENT",t[t.OFFLINE_ONLINE_EVENT=2]="OFFLINE_ONLINE_EVENT",t[t.SHIFT=3]="SHIFT",t[t.TASK_HISTORY=4]="TASK_HISTORY"}(e.RUN_HISTORY_TYPES||(e.RUN_HISTORY_TYPES={})),function(t){t[t.OFFLINE=0]="OFFLINE",t[t.ONLINE=1]="ONLINE"}(e.OFFLINE_ONLINE_EVENT_TYPES||(e.OFFLINE_ONLINE_EVENT_TYPES={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ScanType=void 0,function(t){t.BarCode="BarcodeScan",t.Ocr="Ocr",t.Serial="SerialScan"}(e.ScanType||(e.ScanType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.ServiceWindowType=void 0,function(t){t[t.Delivery=0]="Delivery",t[t.Pickup=1]="Pickup",t[t.EatIn=2]="EatIn"}(e.ServiceWindowType||(e.ServiceWindowType={}))},function(t,e,n){"use strict";e.__esModule=!0,e.SharingMethod=e.SharingType=void 0,function(t){t[t.Created=0]="Created",t[t.Start=1]="Start",t[t.CheckedIn=2]="CheckedIn",t[t.CheckedOut=3]="CheckedOut",t[t.Route=4]="Route",t[t.Late=5]="Late",t[t.Reschedule=6]="Reschedule",t[t.ReadyForPickup=7]="ReadyForPickup",t[t.ScheduleReady=8]="ScheduleReady",t[t.Acknowledged=9]="Acknowledged",t[t.Schedule=10]="Schedule",t[t.OptIn=11]="OptIn",t[t.EtaDelay=12]="EtaDelay",t[t.CustomerPickup=13]="CustomerPickup",t[t.OptInConfirmation=14]="OptInConfirmation"}(e.SharingType||(e.SharingType={})),function(t){t[t.Phone=0]="Phone",t[t.Email=1]="Email",t[t.Websocket=2]="Websocket",t[t.None=3]="None",t[t.Other=4]="Other",t[t.Api=5]="Api",t[t.Push=6]="Push",t[t.Webhook=7]="Webhook"}(e.SharingMethod||(e.SharingMethod={}))},function(t,e,n){"use strict";e.__esModule=!0,e.ShiftRule=e.ShiftNoteType=void 0,function(t){t.ShiftForm="ShiftForm",t.ShiftNote="ShiftNote",t.ShiftPhoto="ShiftPhoto",t.ShiftSignature="ShiftSignature"}(e.ShiftNoteType||(e.ShiftNoteType={})),function(t){t[t.unknown=-1]="unknown",t[t.start_shift=0]="start_shift",t[t.end_shift=1]="end_shift"}(e.ShiftRule||(e.ShiftRule={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.NumberType=void 0,function(t){t[t.Regular=0]="Regular",t[t.AlphanumericSender=1]="AlphanumericSender",t[t.FreeSms=2]="FreeSms",t[t.TollFree=3]="TollFree"}(e.NumberType||(e.NumberType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.Association=e.InventoryServiceType=e.DeliveryMethod=e.RogueReasons=e.PreparationStatus=e.PaymentMethods=e.PickupDropoffOption=e.StatusChangedType=e.TaskAutomaticallyCancelled=e.TaskSubType=e.TaskTypeId=e.ScanningRole=e.InventoryChangeType=e.TaskStatus=e.AddressType=e.TaskHistoryOrigin=e.TaskHistoryEvent=e.NoteType=void 0,function(t){t.FormattedTaskNote="FormattedTaskNote",t.Form="Form",t.TaskNote="TaskNote",t.TaskPhoto="TaskPhoto",t.TipSignature="TipSignature",t.HtmlTaskNote="HtmlTaskNote",t.Signature="Signature",t.Document="Document"}(e.NoteType||(e.NoteType={})),function(t){t[t.status_changed=0]="status_changed",t[t.application_event=1]="application_event",t[t.postpone_notification_event=2]="postpone_notification_event",t[t.late_notification_event=3]="late_notification_event",t[t.reassigned=4]="reassigned",t[t.shared_location_sent=5]="shared_location_sent",t[t.client_alert=6]="client_alert",t[t.estimations_updated=7]="estimations_updated",t[t.marked_as_done=8]="marked_as_done",t[t.activity_change=9]="activity_change",t[t.administrator_notification=10]="administrator_notification",t[t.user_rated=11]="user_rated",t[t.shared_location_cancelled=12]="shared_location_cancelled",t[t.customer_alert=13]="customer_alert",t[t.reject_event=14]="reject_event",t[t.dismiss_task=15]="dismiss_task",t[t.payment_event=16]="payment_event",t[t.customer_added_note=17]="customer_added_note",t[t.driver_turned_off_gps=18]="driver_turned_off_gps",t[t.driver_gps_back=19]="driver_gps_back",t[t.client_sent_tip=20]="client_sent_tip",t[t.driver_lost_gps_reception=21]="driver_lost_gps_reception",t[t.driver_found_gps_reception=22]="driver_found_gps_reception",t[t.auto_dispatch_no_drivers_found=23]="auto_dispatch_no_drivers_found",t[t.task_started_event=24]="task_started_event",t[t.task_cancelled_Event=25]="task_cancelled_Event",t[t.webhooks_event=26]="webhooks_event",t[t.checkin_out_of_geofence=27]="checkin_out_of_geofence",t[t.shared_location_sent_via_push=28]="shared_location_sent_via_push",t[t.customer_called_driver=29]="customer_called_driver",t[t.driver_called_customer=30]="driver_called_customer",t[t.customer_smsed_driver=31]="customer_smsed_driver",t[t.driver_smsed_customer=32]="driver_smsed_customer",t[t.eta_updated=33]="eta_updated",t[t.task_forward_declined=34]="task_forward_declined",t[t.task_forward_accepted=35]="task_forward_accepted",t[t.task_rescheduled=36]="task_rescheduled",t[t.distance_traveled_updated_manually=37]="distance_traveled_updated_manually",t[t.geocode=38]="geocode",t[t.task_assigned_to_team=39]="task_assigned_to_team",t[t.notnow_task=40]="notnow_task",t[t.preparation_status_changed=41]="preparation_status_changed",t[t.task_broadcasted=42]="task_broadcasted",t[t.route_optimized=43]="route_optimized",t[t.external_fleet_changed=44]="external_fleet_changed",t[t.external_delivery_changed=45]="external_delivery_changed",t[t.reschedule_virtual_task=46]="reschedule_virtual_task",t[t.task_schedule_ready_time_window_updated=47]="task_schedule_ready_time_window_updated",t[t.task_ready_to_execute_changed=48]="task_ready_to_execute_changed",t[t.way_point_sla_changed=49]="way_point_sla_changed"}(e.TaskHistoryEvent||(e.TaskHistoryEvent={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.ROUTE_OPTIMIZATION=1]="ROUTE_OPTIMIZATION",t[t.AUTO_DISPATCH=2]="AUTO_DISPATCH",t[t.BROADCAST=3]="BROADCAST",t[t.MANUAL=4]="MANUAL",t[t.REJECT=5]="REJECT",t[t.AUTO_REJECT=6]="AUTO_REJECT",t[t.USER_ACCEPTED=7]="USER_ACCEPTED",t[t.FLEET=8]="FLEET"}(e.TaskHistoryOrigin||(e.TaskHistoryOrigin={})),function(t){t[t.Commercial=1]="Commercial",t[t.Residential=2]="Residential",t[t.Educational=3]="Educational",t[t.Government=4]="Government",t[t.Medical=5]="Medical",t[t.Industrial=6]="Industrial"}(e.AddressType||(e.AddressType={})),function(t){t[t.Created=0]="Created",t[t.Assigned=1]="Assigned",t[t.OnTheWay=2]="OnTheWay",t[t.CheckedIn=3]="CheckedIn",t[t.Done=4]="Done",t[t.Late=5]="Late",t[t.Accepted=6]="Accepted",t[t.Cancelled=7]="Cancelled",t[t.Rejected=8]="Rejected",t[t.Unacknowledged=9]="Unacknowledged",t[t.Pending=10]="Pending"}(e.TaskStatus||(e.TaskStatus={})),function(t){t[t.Quantity=0]="Quantity",t[t.OriginalQuantity=1]="OriginalQuantity",t[t.RejectedQuantity=2]="RejectedQuantity"}(e.InventoryChangeType||(e.InventoryChangeType={})),function(t){t[t.DRIVER=0]="DRIVER",t[t.DISPATCHER_STAGING=1]="DISPATCHER_STAGING",t[t.DISPATCHER_COC=2]="DISPATCHER_COC"}(e.ScanningRole||(e.ScanningRole={})),function(t){t[t.PICKUP=2]="PICKUP",t[t.RETURN_TASK=3]="RETURN_TASK",t[t.DELIVERY=4]="DELIVERY",t[t.PICKUP_AND_DELIVERY=5]="PICKUP_AND_DELIVERY",t[t.CLICK_AND_COLLECT=6]="CLICK_AND_COLLECT",t[t.SERVICE=7]="SERVICE",t[t.ROAMING=8]="ROAMING"}(e.TaskTypeId||(e.TaskTypeId={})),function(t){t[t.BACK_TO_WAREHOUSE=1]="BACK_TO_WAREHOUSE"}(e.TaskSubType||(e.TaskSubType={})),function(t){t[t.MANUAL=0]="MANUAL",t[t.AUTOMATIC=1]="AUTOMATIC",t[t.FROM_APPLICATION=2]="FROM_APPLICATION",t[t.FROM_LINKED_TASK=3]="FROM_LINKED_TASK",t[t.FROM_API=4]="FROM_API",t[t.FROM_FLEET=5]="FROM_FLEET",t[t.AUTOMATIC_FROM_FLEET=6]="AUTOMATIC_FROM_FLEET",t[t.FROM_CHILD_TASK=7]="FROM_CHILD_TASK",t[t.FROM_STORE_APP=8]="FROM_STORE_APP",t[t.FROM_CUSTOMER_APP=9]="FROM_CUSTOMER_APP"}(e.TaskAutomaticallyCancelled||(e.TaskAutomaticallyCancelled={})),function(t){t[t.Manual=0]="Manual",t[t.Automatic=1]="Automatic",t[t.Suggested=2]="Suggested",t[t.AutoCorrectedByClient=4]="AutoCorrectedByClient",t[t.AutoCorrectedByServer=5]="AutoCorrectedByServer",t[t.AutomatedByActivityTrigger=6]="AutomatedByActivityTrigger",t[t.FromDashboard=7]="FromDashboard",t[t.FromApplication=8]="FromApplication",t[t.FromRunEnv=9]="FromRunEnv",t[t.AutomaticByServer=10]="AutomaticByServer",t[t.FromApi=11]="FromApi",t[t.AutomaticFromFleet=12]="AutomaticFromFleet"}(e.StatusChangedType||(e.StatusChangedType={})),function(t){t[t.PICKUP=0]="PICKUP",t[t.DROPOFF=1]="DROPOFF",t[t.BOTH=2]="BOTH"}(e.PickupDropoffOption||(e.PickupDropoffOption={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.CASH=1]="CASH",t[t.CREDIT=2]="CREDIT",t[t.CHEQUE=3]="CHEQUE",t[t.CREDIT_CARD_TERMINAL=4]="CREDIT_CARD_TERMINAL"}(e.PaymentMethods||(e.PaymentMethods={})),function(t){t[t.ACKNOWLEDGED=0]="ACKNOWLEDGED",t[t.START_PREPARATION=1]="START_PREPARATION",t[t.PREPARATION_STARTED=2]="PREPARATION_STARTED",t[t.READY_FOR_PICKUP=3]="READY_FOR_PICKUP",t[t.PICKED_UP=4]="PICKED_UP",t[t.SEND_TO_PREPARATION_FAILED=5]="SEND_TO_PREPARATION_FAILED",t[t.UNACKNOWLEDGED=6]="UNACKNOWLEDGED"}(e.PreparationStatus||(e.PreparationStatus={})),function(t){t[t.TIME_WINDOW=0]="TIME_WINDOW",t[t.CAPACITY=1]="CAPACITY"}(e.RogueReasons||(e.RogueReasons={})),function(t){t.Contactless="contactless",t.StreetLevel="street_level",t.AtRoom="at_room",t.ThirdPartyPoint="third_party_point",t.HomeDelivery="home_delivery"}(e.DeliveryMethod||(e.DeliveryMethod={})),function(t){t.Installation="installation",t.Recycle="recycle",t.Fragile="fragile",t.Heavy_weight="heavy_weight",t.Flammable="flammable"}(e.InventoryServiceType||(e.InventoryServiceType={})),function(t){t.WayPoint="way_point",t.TaskInventory="task_inventory",t.Form="form",t.TaskNote="task_note",t.TaskPhoto="task_photo",t.Signature="signature"}(e.Association||(e.Association={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.AutoScheduleType=e.ReadyToLeaveBy=void 0,function(t){t[t.AfterCreated=0]="AfterCreated",t[t.AfterPrepared=1]="AfterPrepared",t[t.BeforeScheduled=2]="BeforeScheduled"}(e.ReadyToLeaveBy||(e.ReadyToLeaveBy={})),function(t){t[t.NextWindow=1]="NextWindow",t[t.Quote=2]="Quote"}(e.AutoScheduleType||(e.AutoScheduleType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.TaskServiceType=void 0,function(t){t.VALIDATE="validate"}(e.TaskServiceType||(e.TaskServiceType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.ClusterModeType=void 0,function(t){t[t.Location=1]="Location",t[t.InventoryPickup=2]="InventoryPickup",t[t.InventoryDropoff=3]="InventoryDropoff",t[t.InventoryPickupDropoff=4]="InventoryPickupDropoff"}(e.ClusterModeType||(e.ClusterModeType={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.UserStatus=e.MobileTypes=e.ActivityTypes=void 0,function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.STATIONARY=1]="STATIONARY",t[t.WALKING=2]="WALKING",t[t.RUNNING=3]="RUNNING",t[t.BICYCLE=4]="BICYCLE",t[t.DRIVING=5]="DRIVING",t[t.PUBLIC_TRANSPORT=6]="PUBLIC_TRANSPORT"}(e.ActivityTypes||(e.ActivityTypes={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.ANDROID=1]="ANDROID",t[t.IOS=2]="IOS",t[t.WINDOWS=3]="WINDOWS"}(e.MobileTypes||(e.MobileTypes={})),function(t){t.FREE="Free",t.ASSIGNED="Assigned",t.ON_THE_WAY="Started",t.CHECKED_IN="Checked-In",t.LATE="Late",t.ACCEPTED="Accepted",t.ON_BREAK="On-Break"}(e.UserStatus||(e.UserStatus={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0,e.Plan=void 0,function(t){t[t.Simple=0]="Simple",t[t.Advanced=1]="Advanced",t[t.Full=2]="Full"}(e.Plan||(e.Plan={}))},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";e.__esModule=!0},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.customerExtractor=void 0;var i=n(330);e.customerExtractor=function(t){return t.customer};var s=function(){function t(t){this.customerEntity=new i.default(t)}return t.prototype.get=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.customerEntity.service.get(t)]}))}))},t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.customerEntity.service.getAll()]}))}))},t.prototype.getBatch=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.customerEntity.getBatch(t)]}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.customerEntity.create(t,e.customerExtractor,e.customerExtractor)];case 1:return[2,n.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=n(5),c=function(t){function e(e){return t.call(this,{session:e,entityName:"customers",routes:[a.BaseRoutes.Create,a.BaseRoutes.GetAll,a.BaseRoutes.Get]})||this}return o(e,t),e.prototype.getBatch=function(t){return void 0===t&&(t=[]),i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.get("/customers/batch/").withQueryString({ids:t.join(",")}).withExtractor((function(t){return t.items})).invoke()]}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(332),s=function(){function t(t){this.dashboardService=new i.default(t)}return t.prototype.getDashboard=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.dashboardService.getDashboard(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getWidgetsStructure=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.dashboardService.getWidgetsStructure()];case 1:return[2,t.sent()]}}))}))},t.prototype.getWidgetData=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.dashboardService.getWidgetData(t,e)];case 1:return[2,n.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.WidgetGetResponseExtractor=e.DashboardGetResponseExtractor=e.Routes=void 0;var u=n(11),a=n(24),c=n(15),l=n(19),f=n(134);e.Routes={GET_DASHBOARDS_FOR_ALL_TEAMS:new l.Route("/dashboard",0),GET_DASHBOARDS_FOR_TEAM:new l.Route("/dashboard/team/{:teamId}",0),GET_ALL_WIDGETS_STRUCTURE:new l.Route("/dashboard/widgets",0),GET_WIDGET_DATA:new l.Route("/dashboard/widgets/{:widgetId}",0)};var p=function(t){function n(e){return t.call(this,e.config.getApiEndpoint(),e)||this}return o(n,t),n.prototype.getDashboard=function(t){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,this.handleAuthorizedRequest(u.isNumber(t)?e.Routes.GET_DASHBOARDS_FOR_TEAM:e.Routes.GET_DASHBOARDS_FOR_ALL_TEAMS,e.DashboardGetResponseExtractor,c.BringgException.serviceException("Failed to get widgets"),void 0,{teamId:t})];case 1:return n=r.sent(),this.sendDataEvent(f.DASHBOARD_EVENTS.DASHBOARDS_DATA_UPDATED,{selectedTeam:t,widgets:n}),[2,n]}}))}))},n.prototype.getWidgetsStructure=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_ALL_WIDGETS_STRUCTURE,e.DashboardGetResponseExtractor,c.BringgException.serviceException("Failed to get widgets structure"))];case 1:return[2,t.sent()]}}))}))},n.prototype.getWidgetData=function(t,n){return i(this,void 0,void 0,(function(){var r;return s(this,(function(o){switch(o.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_WIDGET_DATA,e.WidgetGetResponseExtractor,c.BringgException.serviceException("Failed to get widget data"),void 0,{widgetId:t},n?{team_id:n}:void 0)];case 1:return r=o.sent(),this.sendDataEvent(f.DASHBOARD_EVENTS.WIDGET_DATA_FETCHED,{widgetId:t,selectedTeam:n,widgetData:r}),[2,r]}}))}))},n}(a.SessionBasedService);e.default=p;e.DashboardGetResponseExtractor=function(t){return t.widgets};e.WidgetGetResponseExtractor=function(t){return t.widget}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(334),s=function(){function t(t){this.reasonToChangeInventoryService=new i.ReasonToChangeInventoryService(t)}return t.prototype.getAll=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.reasonToChangeInventoryService.getAll(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonToChangeInventoryService=e.Routes=void 0;var u=n(24),a=n(15),c=n(135),l=n(19);e.Routes={GET:new l.Route("/reason_to_change_inventories",0)};var f=function(t){function n(e){return t.call(this,e.config.getApiEndpoint(),e)||this}return o(n,t),n.prototype.getAll=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET,c.reasonToChangeInventoryExtractor,a.BringgException.serviceException("Failed to get reason to change inventory"),void 0,void 0,{tag_id:t})];case 1:return[2,n.sent()]}}))}))},n}(u.SessionBasedService);e.ReasonToChangeInventoryService=f},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(336),s=function(){function t(t){this.taskInventoryService=new i.TaskInventoryService(t)}return t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.taskInventoryService.update(t,e)]}))}))},t.prototype.massQuantityUpdate=function(t,e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.taskInventoryService.massQuantityUpdate(t,e,n)];case 1:return[2,r.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.TaskInventoryService=e.Routes=void 0;var u=n(24),a=n(15),c=n(136),l=n(19);e.Routes={GET:new l.Route("/task_inventories/mass_quantity_update",1),UPDATE:new l.Route("/task_inventories/{:id}",2)};var f=function(t){function n(e){return t.call(this,e.config.getApiEndpoint(),e)||this}return o(n,t),n.prototype.update=function(t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,this.handleAuthorizedRequest(e.Routes.UPDATE,c.taskInventoryExtractor,a.BringgException.serviceException("Failed to update task inventory"),n,{id:t})]}))}))},n.prototype.massQuantityUpdate=function(t,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){switch(o.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET,c.taskInventoryMassQuantityExtractor,a.BringgException.serviceException("Failed to update task inventories"),{reason_to_change_inventory_id:n,reason_to_change_inventory_text:r,task_inventories:t},void 0)];case 1:return[2,o.sent()]}}))}))},n}(u.SessionBasedService);e.TaskInventoryService=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(338),o=n(339),i=function(){function t(t){this.chatConversationEntity=new r.default(t),this.chatMessage=new o.default(t),this.onListUpdate=this.chatConversationEntity.store.onListUpdate,this.onItemUpdate=this.chatConversationEntity.store.onItemUpdate,this.onItemRemoved=this.chatConversationEntity.store.onItemRemoved,this.onItemCreated=this.chatConversationEntity.store.onItemCreated}return t.prototype.getConversation=function(t){return this.chatConversationEntity.getConversation(t)},t.prototype.getConversations=function(t,e){return void 0===t&&(t=1),void 0===e&&(e={}),this.chatConversationEntity.getConversations(t,e)},t.prototype.createConversation=function(t){return this.chatConversationEntity.createConversation(t)},t.prototype.updateLastRead=function(t,e){return this.chatConversationEntity.updateLastRead(t,e)},t.prototype.fetchMessages=function(t){return this.chatMessage.fetchMessages(t)},t.prototype.getChatMessages=function(t){return this.chatMessage.getChatMessages(t)},t.prototype.createMessages=function(t){return this.chatMessage.createMessages(t)},t}();e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(137),a=n(9),c=n(5),l=n(11),f="/chat_conversations/{:id}/update_last_read",p=function(t){function e(e){var n=t.call(this,{session:e,entityName:"chat_conversations",routes:[c.BaseRoutes.Create,c.BaseRoutes.Get,c.BaseRoutes.GetAll]})||this;return n._itemIdsByPage={},n.realTime.on("conversation removed",(function(t){return n.store.removeFromStore(t.conversation_id)})),n.realTime.on("conversation created",(function(t){return n.store.addToStore(t.conversation||t)})),n.realTime.on("conversation update",(function(t){return n.store.updateInStore(chatConversationCreated.conversation||chatConversationCreated)})),n}return o(e,t),e.prototype.updateLastRead=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(f).withRouteParams({id:t}).withPayload({server_timestamp:e}).setException("Failed to update conversation last read").invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getConversations=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){return e=l.extend(e,{page:t}),[2,this.isPageFetched(e.page)?this._getPage(e.page):this._fetchConversations(e)]}))}))},e.prototype.getConversation=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.getOrFetch(t,u.singleExtractor,u.singleExtractor)];case 1:return[2,e.sent()]}}))}))},e.prototype.createConversation=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.create(t,u.singleExtractor)];case 1:return[2,e.sent().conversation]}}))}))},e.prototype._getPage=function(t){var e=this._itemIdsByPage[t];if(e)return{conversations:e.itemsIds.map(this.store.getItem),has_next_page:e.hasNextPage,success:!0,rc:0}},e.prototype._addPage=function(t,e,n){var r=this;t.forEach((function(t){return r.store.addToStore(t)})),this._itemIdsByPage[e]={hasNextPage:n,itemsIds:t.map((function(t){return t.id}))}},e.prototype.isPageFetched=function(t){return Boolean(this._itemIdsByPage[t])},e.prototype._fetchConversations=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.service.getAll(t)];case 1:return e=n.sent(),this._addPage(e.conversations,t.page,e.has_next_page),[2,e]}}))}))},e}(a.default);e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(340),o=function(){function t(t){this.chatMessageEntity=new r.default(t),this.onItemCreated=this.chatMessageEntity.store.onItemCreated,this.onListUpdate=this.chatMessageEntity.onChatMessagesUpdate}return t.prototype.fetchMessages=function(t){return this.chatMessageEntity.fetchMessages(t)},t.prototype.getChatMessages=function(t){return this.chatMessageEntity.getChatMessages(t)},t.prototype.createMessages=function(t){return this.chatMessageEntity.createMessages(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},u=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(e,"__esModule",{value:!0});var a=n(138),c=n(65),l=n(75),f=n(11),p=n(9),h=n(5),d=function(t){function e(e){var n=t.call(this,{session:e,entityName:"chat_messages",routes:[h.BaseRoutes.Create,h.BaseRoutes.GetAll]})||this;return n.mapByChatConversations=new Map,n.onChatMessagesUpdateEvent=f.noop,n.onChatMessagesUpdate=function(t){n.onChatMessagesUpdateEvent=t},n.store.state$.subscribe((function(t){l.from(Array.from(t.values())).pipe(c.groupBy((function(t){return t.chat_conversation_id}),(function(t){return t})),c.mergeMap((function(t){return l.zip(l.of(t.key),t.pipe(c.toArray()))}))).subscribe((function(t){var e=u(t,2),r=e[0],o=e[1];n.mapByChatConversations.set(r,f.sortBy(o,(function(t){return new Date(t.server_timestamp)}))),n.onChatMessagesUpdateEvent(n.mapByChatConversations)}))})),n.realTime.on("conversation message created",(function(t){return n.store.addToStore(t.message)})),n}return o(e,t),e.prototype.getChatMessages=function(t){return this.mapByChatConversations.get(t)||[]},e.prototype.fetchMessages=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.fetchAllAndStore({chat_conversation_id:t.id,before:t.before,after:t.after,page:t.page,items:t.items},a.multipleExtractor)]}))}))},e.prototype.createMessages=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.bulkCreate({messages:t},a.multipleExtractor)]}))}))},e}(p.default);e.default=d},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(342),s=function(){function t(t,e){this.crewStore=new i.default(t),this.usersStore=e,this.onListUpdate=this.crewStore.onListUpdate,this.onItemUpdate=this.crewStore.onItemUpdate,this.onItemRemoved=this.crewStore.onItemRemoved,this.onItemCreated=this.crewStore.onItemCreated}return t.prototype.getTeamAvalibleDrivers=function(t){return r(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return e=this.crewStore.driverCurrentlyAssigned.get(t)||[],[4,this.usersStore.getDriversByTeam(t)];case 1:return n=r.sent(),[2,n.filter((function(t){return!e.includes(t.id)}))]}}))}))},t.prototype.getAllByTeam=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.crewStore.getAllByTeam(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.get=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.crewStore.getById(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.crewStore.create(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.crewStore.update(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.crewStore.delete(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getCrewPlannedRoute=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.crewStore.getCrewPlannedRoute(t)];case 1:return e.sent(),[2]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},a=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},c=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0});var l=n(48),f=n(343),p=n(75),h=n(65),d=n(11),y=function(t){function e(e){var n=t.call(this)||this;return n.driverCurrentlyAssigned=new Map,n.crewsByTeam=new Map,n.state$.subscribe((function(t){var e=n.getItems(),r=[];e.forEach((function(t){var e=t.drivers.map((function(e){return i(i({},e),{team_ids:[t.team_id]})})),n=i(i({},t.primary_driver),{team_ids:[t.team_id]});r.push.apply(r,c(c([],a(e)),[n]))})),p.from(r).pipe(h.groupBy((function(t){return d.first(t.team_ids)}),(function(t){return t})),h.mergeMap((function(t){return p.zip(p.of(t.key),t.pipe(h.toArray()))}))).subscribe((function(t){var e=a(t,2),r=e[0],o=e[1];n.driverCurrentlyAssigned.set(r,o.map((function(t){return t.id})))}))})),n.state$.subscribe((function(t){p.from(n.getItems()).pipe(h.groupBy((function(t){return t.team_id}),(function(t){return t})),h.mergeMap((function(t){return p.zip(p.of(t.key),t.pipe(h.toArray()))}))).subscribe((function(t){var e=a(t,2),r=e[0],o=e[1];n.crewsByTeam.set(r,o)}))})),n.crewService=new f.default(e,n),n}return o(e,t),e.prototype.getCrewPlannedRoute=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.getById(t)];case 1:return e.sent(),[2,this.getItem(t).planned_route]}}))}))},e.prototype.getAllByTeam=function(t){return s(this,void 0,void 0,(function(){var e,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.crewService.getAllByTeam(t)];case 1:return e=r.sent(),this.crewsByTeam.get(t)?e.forEach((function(t){return n.updateInStore(t)})):e.forEach((function(t){return n.addToStore(t)})),[2,e]}}))}))},e.prototype.getById=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return(e=this.getItem(t))?[3,2]:[4,this._fetch(t)];case 1:e=n.sent(),n.label=2;case 2:return[2,e]}}))}))},e.prototype.create=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.crewService.create(t)];case 1:return e=n.sent(),this.addToStore(e),[2,e]}}))}))},e.prototype.update=function(t,e){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:return[4,this.crewService.update(t,e)];case 1:return n=r.sent(),this.updateInStore(n),[2,n]}}))}))},e.prototype.delete=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.crewService.delete(t)];case 1:return e.sent(),this.removeFromStore(t),[2]}}))}))},e.prototype._fetch=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.crewService.get(t)];case 1:return e=n.sent(),this.addToStore(e),[2,e]}}))}))},e}(l.default);e.default=y},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.deleteResponseExtractor=e.crewExtractor=e.defaultExtractor=e.Routes=void 0;var u=n(15),a=n(19),c=n(24);e.Routes={GET_CREW:new a.Route("/crews/{:id}",0),GET_BY_TEAM:new a.Route("/teams/{:teamId}/crews",0),CREATE_CREW:new a.Route("/crews/",1),UPDATE_CREW:new a.Route("/crews/{:id}",2),DELETE_CREW:new a.Route("/crews/{:id}",4)};e.defaultExtractor=function(t){return t.crews};e.crewExtractor=function(t){return t.crew};e.deleteResponseExtractor=function(t){return t.success};var l=function(t){function n(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.store=n,r}return o(n,t),n.prototype.getAllByTeam=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_BY_TEAM,e.defaultExtractor,u.BringgException.serviceException("Failed to get Crews"),void 0,{teamId:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.get=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_CREW,e.crewExtractor,u.BringgException.serviceException("Failed to get Crew"),void 0,{id:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.create=function(t){return i(this,void 0,void 0,(function(){var n,r,o,i;return s(this,(function(s){switch(s.label){case 0:return n=t.primary_driver_id,r=t.driver_ids,o=t.planned_route_id,i=t.team_id,[4,this.handleAuthorizedRequest(e.Routes.CREATE_CREW,e.crewExtractor,u.BringgException.serviceException("Failed to create Crew"),{primary_driver_id:n,driver_ids:r,planned_route_id:o,team_id:i})];case 1:return[2,s.sent()]}}))}))},n.prototype.update=function(t,n){return i(this,void 0,void 0,(function(){var r,o,i;return s(this,(function(s){switch(s.label){case 0:return r=n.primary_driver_id,o=n.driver_ids,i=n.planned_route_id,[4,this.handleAuthorizedRequest(e.Routes.UPDATE_CREW,e.crewExtractor,u.BringgException.serviceException("Failed to update Crew"),{primary_driver_id:r,driver_ids:o,planned_route_id:i},{id:t})];case 1:return[2,s.sent()]}}))}))},n.prototype.delete=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.DELETE_CREW,e.deleteResponseExtractor,u.BringgException.serviceException("Failed to delete Crew"),void 0,{id:t})];case 1:return[2,n.sent()]}}))}))},n}(c.SessionBasedService);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(345),o=function(){function t(t){this.plannedRoutesEntity=new r.default(t)}return t.prototype.getAllByTeam=function(t){return this.plannedRoutesEntity.getAllByTeam(t)},t.prototype.getAll=function(){return this.plannedRoutesEntity.getAll()},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.extractor=void 0;var i=n(5),s=n(9);e.extractor=function(t){return t.planned_routes};var u="/teams/{:teamId}/planned_routes",a=function(t){function n(e){return t.call(this,{session:e,entityName:"planned_routes",routes:[i.BaseRoutes.GetAll]})||this}return o(n,t),n.prototype.getAll=function(){return this.getAllOrFetch(null,e.extractor,e.extractor)},n.prototype.getAllByTeam=function(t){return this.service.routeGenerator.get(u).withExtractor(e.extractor).setException("Could not fetch planned routes of the team #"+t).withRouteParams({teamId:t}).invoke()},n}(s.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Language=void 0;var r=n(347),o=function(){function t(t){this.languageStore=new r.default(t)}return t.prototype.getAll=function(){return this.languageStore.getAll()},t}();e.Language=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(48),a=n(348),c=function(t){function e(e){var n=t.call(this)||this;return n.isFetched=!1,n.languageService=new a.default(e,n),n}return o(e,t),e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.isFetched?this.getItems():this._fetchAll()]}))}))},e.prototype._fetchAll=function(){return i(this,void 0,void 0,(function(){var t,e=this;return s(this,(function(n){switch(n.label){case 0:return[4,this.languageService.getAll()];case 1:return t=n.sent(),this.isFetched=!0,t.languages.forEach((function(t){return e.addToStore(t)})),[2,t.languages]}}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(15),a=n(19),c=n(139),l=n(24);e.Routes={GET_ALL:new a.Route("/languages",0)};var f=function(t){function n(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.store=n,r}return o(n,t),n.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_ALL,c.defaultExtractor,u.BringgException.serviceException("Failed to get Language"))];case 1:return[2,t.sent()]}}))}))},n}(l.SessionBasedService);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationType=void 0;var r=n(350),o=function(){function t(t){this.notificationTypeStore=new r.default(t)}return t.prototype.getAll=function(){return this.notificationTypeStore.getAll()},t}();e.NotificationType=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(48),a=n(351),c=function(t){function e(e){var n=t.call(this)||this;return n.notificationTypeService=new a.default(e,n),n}return o(e,t),e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.notificationTypeService.getAll()];case 1:return[2,t.sent().notification_types]}}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(15),a=n(19),c=n(140),l=n(24);e.Routes={GET_ALL:new a.Route("/notification_types",0)};var f=function(t){function n(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.store=n,r}return o(n,t),n.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_ALL,c.defaultExtractor,u.BringgException.serviceException("Failed to get NotificationType"))];case 1:return[2,t.sent()]}}))}))},n}(l.SessionBasedService);e.default=f},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(353),u=n(15),a=n(47),c=n(11),l=n(102),f=n(103),p=function(){function t(t){this.usersStore=new s.default(t),this.onListUpdate=this.usersStore.onListUpdate,this.onUpdate=this.usersStore.onItemUpdate,this.onDelete=this.usersStore.onItemRemoved,this.onCreate=this.usersStore.onItemCreated,this.unsubscribe=this.usersStore.unsubscribe}return t.prototype.create=function(t){if(c.isNil(t.email)&&c.isNil(t.phone))throw new u.BringgException(a.ExceptionReason.INVALID_ARGUMENTS,"Phone or Email is required");return this.usersStore.create(t)},t.prototype.getAllAdminsAndDispatchers=function(t){var e=t.limit,n=void 0===e?25:e,r=t.page_action,o=void 0===r?f.KeysetPaginationPageAction.NEXT:r,i=t.cursor;return this.usersStore.getAllAdminsAndDispatchers({limit:n,page_action:o,cursor:i})},t.prototype.getAllDrivers=function(t){var e=t.limit,n=void 0===e?25:e,r=t.page_action,o=void 0===r?f.KeysetPaginationPageAction.NEXT:r,i=t.cursor,s=t.options,u=c.defaults(s,{onlyOnlineDriver:!1,onlyCustomers:!1});return this.usersStore.getAllDrivers({limit:n,page_action:o,cursor:i,options:u})},t.prototype.byUserType=function(t){return this.usersStore.byUserType(t)},t.prototype.makeAdmin=function(t){return this.usersStore.makeAdmin(t)},t.prototype.totalEmployeesCount=function(){return this.usersStore.totalEmployeesCount()},t.prototype.totalDriversCount=function(){return this.usersStore.totalDriversCount()},t.prototype.getAdmin=function(t){return this.usersStore.get(t)},t.prototype.getDriver=function(t){return this.usersStore.get(t)},t.prototype.getDispatcher=function(t){return this.usersStore.get(t)},t.prototype.getDriversByTeam=function(t){return this.usersStore.getDriversByTeam(t)},t.prototype.getAll=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=50),o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.usersStore.getAll(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getAllKeysetPagination=function(t){var e=t.limit,n=void 0===e?2500:e,r=t.page_action,o=void 0===r?f.KeysetPaginationPageAction.NEXT:r,i=t.cursor;return this.usersStore.getAllKeysetPagination({limit:n,page_action:o,cursor:i})},t.prototype.get=function(t){return this.usersStore.get(t)},t.prototype.invite=function(t){return this.usersStore.invite(t)},t.prototype.unlock=function(t){return this.usersStore.unlock(t)},t.prototype.assignedTasksCount=function(t){return this.usersStore.assignedTasksCount(t)},t.prototype.inviteByEmail=function(t){return this.usersStore.inviteByEmail(t)},t.prototype.validatePhone=function(t){return this.usersStore.validatePhone(t)},t.prototype.closedTasks=function(t,e){return this.usersStore.closedTasks(t,e)},t.prototype.update=function(t,e){var n=this;return this.usersStore.update(t,e).then((function(t){return n.updateCurrentUserIfNeeded(t)}))},t.prototype.updateCurrentUserIfNeeded=function(t){var e=this.usersStore.usersService.session.user;return e.id===t.id&&(this.usersStore.usersService.session.user=c.merge(e,t),this.usersStore.usersService.session.sendDataEvent(l.UserEvents.CURRENT_USER_UPDATED,this.usersStore.usersService.session.user)),t},t.prototype.delete=function(t){return this.usersStore.delete(t)},t.prototype.getProfileImage=function(t){return this.usersStore.getProfileImage(t)},t.prototype.subscribeToGroupUpdates=function(t){this.usersStore.subscribeToGroupUpdates(t)},t.prototype.getOfflineDrivers=function(){return this.usersStore.getOfflineDrivers()},t.prototype.getOnlineDrivers=function(){return this.usersStore.getOnlineDrivers()},t.prototype.getAllLocalDrivers=function(){return this.usersStore.getAllLocalDrivers()},t.prototype.getOnShiftDrivers=function(){return this.usersStore.getOnShiftDrivers()},t.prototype.getAdmins=function(){return this.usersStore.getAdmins()},t.prototype.getDispatchers=function(){return this.usersStore.getDispatchers()},t.prototype.messageDriver=function(t,e){return this.usersStore.messageDriver(t,e)},r([u.logOnException],t.prototype,"create",null),r([u.logOnException],t.prototype,"getAllAdminsAndDispatchers",null),r([u.logOnException],t.prototype,"getAllDrivers",null),r([u.logOnException],t.prototype,"byUserType",null),r([u.logOnException],t.prototype,"makeAdmin",null),r([u.logOnException],t.prototype,"totalEmployeesCount",null),r([u.logOnException],t.prototype,"totalDriversCount",null),r([u.logOnException],t.prototype,"getAdmin",null),r([u.logOnException],t.prototype,"getDriver",null),r([u.logOnException],t.prototype,"getDispatcher",null),r([u.logOnException],t.prototype,"getDriversByTeam",null),r([u.logOnException],t.prototype,"getAll",null),r([u.logOnException],t.prototype,"getAllKeysetPagination",null),r([u.logOnException],t.prototype,"get",null),r([u.logOnException],t.prototype,"invite",null),r([u.logOnException],t.prototype,"unlock",null),r([u.logOnException],t.prototype,"assignedTasksCount",null),r([u.logOnException],t.prototype,"inviteByEmail",null),r([u.logOnException],t.prototype,"validatePhone",null),r([u.logOnException],t.prototype,"closedTasks",null),r([u.logOnException],t.prototype,"update",null),r([u.logOnException],t.prototype,"delete",null),r([u.logOnException],t.prototype,"getProfileImage",null),r([u.logOnException],t.prototype,"subscribeToGroupUpdates",null),r([u.logOnException],t.prototype,"getOfflineDrivers",null),r([u.logOnException],t.prototype,"getOnlineDrivers",null),r([u.logOnException],t.prototype,"getAllLocalDrivers",null),r([u.logOnException],t.prototype,"getOnShiftDrivers",null),r([u.logOnException],t.prototype,"getAdmins",null),r([u.logOnException],t.prototype,"getDispatchers",null),r([u.logOnException],t.prototype,"messageDriver",null),t}();e.default=p},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},u=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},c=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0});var l=n(64),f=n(11),p=n(48),h=n(354),d=n(102),y=n(65),v=n(75),_=function(t){function e(e,n){var r,o,i=t.call(this)||this;i.groupUpdateEvents=[],i.groupedValues=new Map,i.drivers=[],i.fetchedStatus={drivers:!1,customers:!1,adminsAndDispatchers:!1},i.usersService=new h.default(e,i),i.onlineDriversCounterByTeam=new Map;try{for(var s=u(Object.keys(d.GROUP_VALUES)),a=s.next();!a.done;a=s.next()){var c=a.value;i.groupedValues.set(d.GROUP_VALUES[c],new Set)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return n=n||500,i.onItemRemoved((function(t,e){var n,r;if((null==e?void 0:e.status)===l.Connection.Online)try{for(var o=u(e.team_ids),s=o.next();!s.done;s=o.next()){var a=s.value;i.onlineDriversCounterByTeam.set(a,Math.max(i.onlineDriversCounterByTeam.get(a)-1,0))}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}})),i.state$.pipe(y.throttleTime(n,v.asyncScheduler,{trailing:!0,leading:!1})).subscribe((function(t){i.initGroups(t.values()),i.emitGroupEvents()})),i}return o(e,t),e.prototype.initGroups=function(t,e){var n,r,o,i,s,a,c,f,p,h;void 0===e&&(e=Object.keys(d.GROUP_VALUES));var y={};try{for(var v=u(e),_=v.next();!_.done;_=v.next()){y[P=_.value]=new Set}}catch(t){n={error:t}}finally{try{_&&!_.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}this.drivers.length=0,this.onlineDriversCounterByTeam=new Map;try{for(var b=u(t),E=b.next();!E.done;E=b.next()){var g=E.value;if(g.driver)if(this.drivers.push(g),g.status===l.Connection.Online)try{for(var w=(s=void 0,u(g.team_ids)),T=w.next();!T.done;T=w.next()){var m=T.value;this.onlineDriversCounterByTeam.set(m,this.onlineDriversCounterByTeam.has(m)?this.onlineDriversCounterByTeam.get(m)+1:1)}}catch(t){s={error:t}}finally{try{T&&!T.done&&(a=w.return)&&a.call(w)}finally{if(s)throw s.error}}var O=d.userToGroupsMapper(g);try{for(var S=(c=void 0,u(O)),R=S.next();!R.done;R=S.next()){y[P=R.value]&&y[P].add(g)}}catch(t){c={error:t}}finally{try{R&&!R.done&&(f=S.return)&&f.call(S)}finally{if(c)throw c.error}}}}catch(t){o={error:t}}finally{try{E&&!E.done&&(i=b.return)&&i.call(b)}finally{if(o)throw o.error}}try{for(var A=u(e),x=A.next();!x.done;x=A.next()){var P=x.value;this.groupedValues.set(d.GROUP_VALUES[P],y[P]||new Set)}}catch(t){p={error:t}}finally{try{x&&!x.done&&(h=A.return)&&h.call(A)}finally{if(p)throw p.error}}},e.prototype.create=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.create(t)];case 1:return e=n.sent(),this.addToStore(e),[2,e]}}))}))},e.prototype.getDriversByTeam=function(t){return i(this,void 0,void 0,(function(){var e,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.usersService.getDriversByTeam(t)];case 1:return(e=r.sent()).forEach((function(t){return n.addToStore(t)})),[2,e]}}))}))},e.prototype.getAll=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=50),i(this,void 0,void 0,(function(){var n,r=this;return s(this,(function(o){switch(o.label){case 0:return[4,this.usersService.getAll(t,e)];case 1:return n=o.sent(),f.forEach(n.users,(function(t){return r.getItem(t.id)?r.updateInStore(t):r.addToStore(t)})),[2,n]}}))}))},e.prototype.getAllKeysetPagination=function(t){return i(this,void 0,void 0,(function(){var e,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.usersService.getAllKeysetPagination(t)];case 1:return e=r.sent(),this.initGroups(e.users),f.forEach(e.users,(function(t){return n.getItem(t.id)?n.updateInStore(t):n.addToStore(t)})),[2,e]}}))}))},e.prototype.invite=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.invite(t)];case 1:return e=n.sent(),this.updateInStore(e),[2,e]}}))}))},e.prototype.inviteByEmail=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.inviteByEmail(t)];case 1:return e=n.sent(),this.updateInStore(e),[2,e]}}))}))},e.prototype.getAllAdminsAndDispatchers=function(t){return i(this,void 0,void 0,(function(){var e=this;return s(this,(function(n){return[2,this.getOrFetchUsers(t,this.fetchedStatus.adminsAndDispatchers,(function(t){return e.fetchedStatus.adminsAndDispatchers=t}),(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(t=e.usersService).getAllAdminsAndDispatchers.apply(t,c([],a(n)))}),(function(){return e.getAllLocalAdminsAndDispatchers()}))]}))}))},e.prototype.getAllDrivers=function(t){return i(this,void 0,void 0,(function(){var e,n,r,o=this;return s(this,(function(i){switch(i.label){case 0:return e=t.options,(r=null==e?void 0:e.onlyCustomers)?[4,this.getOrFetchUsers(t,this.fetchedStatus.customers,(function(t){return o.fetchedStatus.customers=t}),this.usersService.getAllDrivers,(function(){return o.getCustomers()}))]:[3,2];case 1:return n=i.sent(),[3,4];case 2:return[4,this.getOrFetchUsers(t,this.fetchedStatus.drivers,(function(t){return o.fetchedStatus.drivers=t}),(function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=o.usersService).getAllDrivers.apply(t,c([],a(e)))}),(function(){return o.getAllLocalDrivers()}))];case 3:n=i.sent(),i.label=4;case 4:return this.initGroups(n.users,r?[d.GROUP_VALUES.Customers]:[d.GROUP_VALUES.OfflineDrivers,d.GROUP_VALUES.OnlineDrivers,d.GROUP_VALUES.OnShiftDrivers]),[2,n]}}))}))},e.prototype.getOrFetchUsers=function(t,e,n,r,o){return i(this,void 0,void 0,(function(){var i,u=this;return s(this,(function(s){switch(s.label){case 0:return e?[3,2]:[4,r(t)];case 1:return(i=s.sent()).users.forEach((function(t){return u.addToStore(t)})),i.next_page_cursor||i.previous_page_cursor||n(!0),[2,i];case 2:return[2,{next_page_cursor:null,previous_page_cursor:null,users:o()}]}}))}))},e.prototype.byUserType=function(t){return i(this,void 0,void 0,(function(){var e,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.usersService.byUserType(t)];case 1:return(e=r.sent()).forEach((function(t){return n.addToStore(t)})),[2,e]}}))}))},e.prototype.makeAdmin=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.makeAdmin(t)];case 1:return e=n.sent(),this.updateInStore(e),[2,e]}}))}))},e.prototype.update=function(t,e){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,this.usersService.update(t,e)];case 1:return n=r.sent(),this.updateInStore(n),[2,n]}}))}))},e.prototype.delete=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.delete(t)];case 1:return(e=n.sent())&&this.removeFromStore(t),[2,e]}}))}))},e.prototype.get=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return(e=this.getItem(t))?[3,2]:[4,this.usersService.get(t)];case 1:e=n.sent(),n.label=2;case 2:return[2,e]}}))}))},e.prototype.unlock=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.usersService.unlock(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.assignedTasksCount=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.usersService.assignedTasksCount(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.totalEmployeesCount=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.usersService.totalEmployeesCount()];case 1:return[2,t.sent()]}}))}))},e.prototype.totalDriversCount=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.usersService.totalDriversCount()];case 1:return[2,t.sent()]}}))}))},e.prototype.getProfileImage=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.usersService.getProfileImage(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.validatePhone=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.usersService.validatePhone(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.closedTasks=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.usersService.closedTasks(t,e)];case 1:return[2,n.sent()]}}))}))},e.prototype.messageDriver=function(t,e){return this.usersService.messageDriver(t,e)},e.prototype.subscribeToGroupUpdates=function(t){this.groupUpdateEvents.push(t)},e.prototype.getOfflineDrivers=function(){return this.groupedValues.get(d.GROUP_VALUES.OfflineDrivers)||new Set},e.prototype.getOnlineDrivers=function(){return this.groupedValues.get(d.GROUP_VALUES.OnlineDrivers)||new Set},e.prototype.getOnShiftDrivers=function(){return Array.from(this.groupedValues.get(d.GROUP_VALUES.OnShiftDrivers)||[])},e.prototype.getCustomers=function(){return Array.from(this.groupedValues.get(d.GROUP_VALUES.Customers)||[])},e.prototype.getAdmins=function(){return Array.from(this.groupedValues.get(d.GROUP_VALUES.Admins)||[])},e.prototype.getDispatchers=function(){return Array.from(this.groupedValues.get(d.GROUP_VALUES.Dispatchers)||[])},e.prototype.emitGroupEvents=function(){var t=this;this.groupUpdateEvents.forEach((function(e){return e(t.groupedValues)}))},e.prototype.getAllLocalDrivers=function(){return this.drivers},e.prototype.getOnlineDriversCountByTeam=function(t){return this.onlineDriversCounterByTeam.get(t)||0},e.prototype.getAllLocalAdminsAndDispatchers=function(){return c([],a(new Set(this.getAdmins().concat(this.getDispatchers()))))},e}(p.default);e.default=_},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(355),c=n(15),l=n(19),f=n(102),p=n(63),h=n(103),d=n(11),y={GET:new l.Route("/users/{:userId}",0),GET_ALL:new l.Route("/users/",0),GET_ALL_DRIVERS:new l.Route("/users/drivers",0),GET_USERS_WITH_USER_TYPE:new l.Route("/user_types/{:userTypeId}/users",0),GET_DRIVERS_BY_TEAM:new l.Route("/teams/{:teamId}/users",0),MAKE_ADMIN:new l.Route("/users/{:userId}/admin",1),CREATE_USER:new l.Route("/users/",1),INVITE:new l.Route("/users/{:userId}/reinvite",1),TOTAL_TASKS:new l.Route("/users/{:userId}/tasks/count",0),TOTAL_EMPLOYEES:new l.Route("/users/count",0),TOTAL_DRIVERS:new l.Route("/users/drivers/count",0),UNLOCK:new l.Route("/users/{:userId}/unlock",1),INVITE_VIA_EMAIL:new l.Route("/users/{:userId}/reinvite_via_email",1),VALIDATE_PHONE:new l.Route("/api/user/validate_phone",0),CLOSED_TASKS:new l.Route("/users/{:userId}/tasks/closed_tasks",0),UPDATE:new l.Route("/users/{:id}",3),DELETE:new l.Route("/users/{:id}",4),GET_PROFILE_IMAGE:new l.Route("/users/{:userId}/profile_image",0),MESSAGE_DRIVER:new l.Route("/announcement/user/{:userId}",2)},v=function(t){function e(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.store=n,r}return o(e,t),e.prototype.create=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.CREATE_USER,f.userExtractor,c.BringgException.serviceException("Could not create user"),t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getDriversByTeam=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.GET_DRIVERS_BY_TEAM,f.defaultExtractor,c.BringgException.serviceException("Could not get drivers"),{},{teamId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.get=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.GET,f.defaultExtractor,c.BringgException.serviceException((function(){return"Could not get user "+t})),{},{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.getAll=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=50),s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(y.GET_ALL,(function(t){return{has_next_page:t.has_next_page,users:t.users}}),c.BringgException.serviceException("Could not get users"),void 0,void 0,{page:t,limit:e})];case 1:return[2,n.sent()]}}))}))},e.prototype.getAllKeysetPagination=function(t){return s(this,void 0,void 0,(function(){var e,n,r;return u(this,(function(o){switch(o.label){case 0:return e=t.limit,n=t.page_action,r=t.cursor,[4,this.handleAuthorizedRequest(y.GET_ALL,(function(t){return{next_page_cursor:t.next_page_cursor,previous_page_cursor:t.previous_page_cursor,users:t.users}}),c.BringgException.serviceException("Could not get users"),void 0,void 0,{pgver:h.KEYSET_PAGINATION_VER,limit:e,page_action:n,cursor:r})];case 1:return[2,o.sent()]}}))}))},e.prototype.invite=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.INVITE,f.userExtractor,c.BringgException.serviceException((function(){return"Could not invite user with id: "+t})),void 0,{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.unlock=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.UNLOCK,f.successExtractor,c.BringgException.serviceException((function(){return"Could not unlock user with id: "+t})),void 0,{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.assignedTasksCount=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.TOTAL_TASKS,f.countExtractor,c.BringgException.serviceException((function(){return"Could not get task count for user with id: "+t})),void 0,{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.totalEmployeesCount=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(y.TOTAL_EMPLOYEES,f.countExtractor,c.BringgException.serviceException((function(){return"Could not get total employee count"})),void 0,void 0)];case 1:return[2,t.sent()]}}))}))},e.prototype.totalDriversCount=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(y.TOTAL_DRIVERS,f.countExtractor,c.BringgException.serviceException((function(){return"Could not get total drivers count"})),void 0,void 0)];case 1:return[2,t.sent()]}}))}))},e.prototype.inviteByEmail=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.INVITE_VIA_EMAIL,f.userExtractor,c.BringgException.serviceException((function(){return"Could not invite user with id: "+t})),void 0,{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.validatePhone=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.VALIDATE_PHONE,(function(t){return t.phone_valid}),c.BringgException.serviceException((function(){return"Phone is not valid: "+t})),void 0,{},{phone:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.closedTasks=function(t,e){return void 0===e&&(e=0),s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(y.CLOSED_TASKS,f.defaultExtractor,c.BringgException.serviceException((function(){return"Could not get tasks for user: "+t})),void 0,{userId:t},{page:e})];case 1:return[2,n.sent()]}}))}))},e.prototype.update=function(t,e){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(y.UPDATE,f.userExtractor,c.BringgException.serviceException((function(){return"Could not update user: "+t})),i({id:t},e),{id:t})];case 1:return[2,n.sent()]}}))}))},e.prototype.getAllAdminsAndDispatchers=function(t){return s(this,void 0,void 0,(function(){var e,n,r,o;return u(this,(function(i){switch(i.label){case 0:return e=t.limit,n=t.page_action,r=t.cursor,o=[f.UsersScopes.DISPATCHERS,f.UsersScopes.ADMINS],[4,this.handleAuthorizedRequest(y.GET_ALL,(function(t){return{next_page_cursor:t.next_page_cursor,previous_page_cursor:t.previous_page_cursor,users:t.users}}),c.BringgException.serviceException("Could not get admins and dispatchers"),void 0,void 0,{pgver:h.KEYSET_PAGINATION_VER,scopes:o,limit:e,page_action:n,cursor:r})];case 1:return[2,i.sent()]}}))}))},e.prototype.getAllDrivers=function(t){return s(this,void 0,void 0,(function(){var e,n,r,o,i;return u(this,(function(s){switch(s.label){case 0:return e=t.limit,n=t.page_action,r=t.cursor,o=t.options,i=[],d.get(o,"onlyCustomers")?i.push(f.UsersScopes.CUSTOMERS):i.push(f.UsersScopes.DRIVERS),o.onlyOnlineDriver&&i.push(f.UsersScopes.MARKED_AS_ONLINE),[4,this.handleAuthorizedRequest(y.GET_ALL,(function(t){return{next_page_cursor:t.next_page_cursor,previous_page_cursor:t.previous_page_cursor,users:t.users}}),c.BringgException.serviceException("Could not get drivers"),void 0,void 0,{pgver:h.KEYSET_PAGINATION_VER,scopes:i,limit:e,page_action:n,cursor:r})];case 1:return[2,s.sent()]}}))}))},e.prototype.delete=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.DELETE,f.successExtractor,c.BringgException.serviceException((function(){return"Could not delete user: "+t})),void 0,{id:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.getProfileImage=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.GET_PROFILE_IMAGE,(function(t){return t.profile_image}),c.BringgException.serviceException((function(){return"Could not get user's "+t+" profile image"})),{},{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.messageDriver=function(t,e){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(y.MESSAGE_DRIVER,(function(t){return t.announcement_id}),c.BringgException.serviceException((function(){return"Could not message to user "+t})),{user_id:t,message:e},{userId:t})];case 1:return[2,n.sent()]}}))}))},e.prototype.byUserType=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.GET_USERS_WITH_USER_TYPE,f.usersExtractor,c.BringgException.serviceException("Could not get users"),{},{userTypeId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.makeAdmin=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.handleAuthorizedRequest(y.MAKE_ADMIN,f.userExtractor,c.BringgException.serviceException((function(){return"Could not set admin on userId: "+t})),void 0,{userId:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.attachSubscriptions=function(){var t=this;this.subscribeToEvent(p.DELETE_EMPLOYEE,(function(e){t.store.removeFromStore(e.user_id)})),this.subscribeToEvent(p.EMPLOYEE_UPDATE_EVENT,(function(e){t.store.updateInStore(e)})),this.subscribeToEvent(p.NEW_EMPLOYEE,(function(e){t.store.addToStore(e)}))},e}(a.PubSubService);e.default=v},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.PubSubService=void 0;var i=n(39),s=function(t){function e(e,n){var r=t.call(this,e,n)||this;return i.default.info("Attaching subscriptions to persistent connection.."),r.session.persistentConnection&&(r.attachSubscriptions(),i.default.info("Persistent connection established successfully!")),r}return o(e,t),e.prototype.publish=function(t,e){this.session.persistentConnection.publish(t,e.bind(this))},e.prototype.subscribeToEvent=function(t,e){this.session.persistentConnection.subscribe(t,e.bind(this))},e}(n(24).SessionBasedService);e.PubSubService=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserHelpers=void 0;var r=n(64),o=n(11),i=function(){function t(){}return t.isOfflineDriver=function(t){return!0===t.driver&&t.status===r.Connection.Offline},t.isOnlineDriver=function(t){return!0===t.driver&&t.status===r.Connection.Online},t.isOnShiftDriver=function(t){return!0===t.driver&&!o.isNil(t.active_shift_id)},t.isCustomer=function(t){return!0===t.customer},t.isAdmin=function(t){return!0===t.admin},t.isDispatcher=function(t){return!0===t.dispatcher},t}();e.UserHelpers=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationTemplate=void 0;var r=n(358),o=function(){function t(t){this.notificationTemplateStore=new r.default(t)}return t.prototype.getAll=function(){return this.notificationTemplateStore.getAll()},t.prototype.getByNames=function(t){return this.notificationTemplateStore.notificationTemplateService.getByNames(t)},t.prototype.create=function(t){return this.notificationTemplateStore.create(t)},t.prototype.update=function(t,e){return this.notificationTemplateStore.update(t,e)},t.prototype.delete=function(t){return this.notificationTemplateStore.delete(t)},t}();e.NotificationTemplate=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(48),a=n(359),c=function(t){function e(e){var n=t.call(this)||this;return n.isFetched=!1,n.notificationTemplateService=new a.default(e,n),n}return o(e,t),e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.isFetched?this.getItems():this._fetchAll()]}))}))},e.prototype.create=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.notificationTemplateService.create(t)];case 1:return e=n.sent(),this.addToStore(e.notification_template),[2,e.notification_template]}}))}))},e.prototype.update=function(t,e){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,this.notificationTemplateService.update(t,e)];case 1:return n=r.sent(),this.updateInStore(n.notification_template),[2,n.notification_template]}}))}))},e.prototype.delete=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.notificationTemplateService.delete(t)];case 1:return e=n.sent(),this.removeFromStore(t),[2,e]}}))}))},e.prototype._fetchAll=function(){return i(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return[4,this.notificationTemplateService.getAll()];case 1:return t=e.sent(),this.addItems(t.notification_templates),this.isFetched=!0,[2,t.notification_templates]}}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(15),a=n(19),c=n(141),l=n(24);e.Routes={GET_ALL:new a.Route("/merchant/notification_templates",0),CREATE:new a.Route("/merchant/notification_templates",1),UPDATE:new a.Route("/merchant/notification_templates/{:id}",2),DELETE:new a.Route("/merchant/notification_templates/{:id}",4),FIND_BY_NAMES:new a.Route("/merchant/notification_templates/find_by_names",1)};var f=function(t){function n(e,n){var r=t.call(this,e.config.getApiEndpoint(),e)||this;return r.store=n,r}return o(n,t),n.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.GET_ALL,c.defaultExtractor,u.BringgException.serviceException("Failed to get NotificationTemplate"))];case 1:return[2,t.sent()]}}))}))},n.prototype.getByNames=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.handleAuthorizedRequest(e.Routes.FIND_BY_NAMES,c.notificationsTemplateExtractor,u.BringgException.serviceException("Failed to get NotificationTemplate ny names"),{names:t})]}))}))},n.prototype.create=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.CREATE,c.defaultExtractor,u.BringgException.serviceException("Failed to create NotificationTemplate"),{notification_template:t})];case 1:return[2,n.sent()]}}))}))},n.prototype.update=function(t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.UPDATE,c.defaultExtractor,u.BringgException.serviceException("Failed to update NotificationTemplate"),{notification_template:n},{id:t})];case 1:return[2,r.sent()]}}))}))},n.prototype.delete=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.handleAuthorizedRequest(e.Routes.DELETE,c.defaultExtractor,u.BringgException.serviceException("Failed to delete NotificationTemplate"),{id:t},{id:t})];case 1:return[2,n.sent()]}}))}))},n}(l.SessionBasedService);e.default=f},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(361),u=n(72),a=function(){function t(t){this.service=new s.default(t)}return t.prototype.get=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.service.get()];case 1:return[2,t.sent()]}}))}))},t.prototype.update=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.service.update(t)];case 1:return[2,e.sent()]}}))}))},r([u.default],t.prototype,"get",null),t}();e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.defaultExtractor=e.Routes=void 0;var i=n(24),s=n(15),u=n(19);e.Routes={GET:new u.Route("/merchant/customer_configuration",0),UPDATE:new u.Route("/merchant/customer_configuration",2)};e.defaultExtractor=function(t){return t};var a=function(t){function n(e){return t.call(this,e.config.getApiEndpoint(),e)||this}return o(n,t),n.prototype.get=function(){return this.handleAuthorizedRequest(e.Routes.GET,e.defaultExtractor,s.BringgException.serviceException("Failed to get customer configurations"))},n.prototype.update=function(t){return this.handleAuthorizedRequest(e.Routes.UPDATE,e.defaultExtractor,s.BringgException.serviceException("Failed to update customer configurations"),t)},n}(i.SessionBasedService);e.default=a},function(t,e,n){"use strict";var r=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),s=function(){var t=this;this.handlers=new Map,this.on=function(e,n){if(!i.isString(e))throw new Error("action can only be a string");var r=t.handlers.has(e)?t.handlers.get(e):[];return r.push(n),t.handlers.set(e,r),function(){return t.off(e,n)}},this.emit=function(e){for(var n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];var u=t.handlers.get(e);i.each(u,(function(t){t.apply(void 0,o([],r(n)))}))},this.off=function(e,n){var r=t.handlers.get(e),o=i.indexOf(r,n);-1!==o&&(r.splice(o,1),t.handlers.set(e,r))}};e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(364),o=function(){function t(t){this.companyEntity=new r.default(t)}return t.prototype.get=function(t){return this.companyEntity.service.get(t)},t.prototype.getAll=function(t){return this.companyEntity.service.getAll(t)},t.prototype.create=function(t){return this.companyEntity.service.create(t)},t.prototype.update=function(t,e){return this.companyEntity.service.update(t,e)},t.prototype.delete=function(t){return this.companyEntity.service.delete(t)},t.prototype.getUsers=function(t){return this.companyEntity.getUsers(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"companies",routes:[i.BaseRoutes.Create,i.BaseRoutes.Get,i.BaseRoutes.Update,i.BaseRoutes.Delete,i.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getUsers=function(t){return this.service.routeGenerator.get("/companies/"+t+"/users").withRouteParams({companyId:t}).invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(366),o=function(){function t(t){this.tagEntity=new r.default(t)}return t.prototype.getAll=function(){return this.tagEntity.service.getAll()},t.prototype.create=function(t){return this.tagEntity.service.create(t)},t.prototype.update=function(t,e){return this.tagEntity.service.update(t,e)},t.prototype.delete=function(t){return this.tagEntity.service.delete(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"tags",routes:[i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete,i.BaseRoutes.GetAll]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(368),s=function(){function t(t){this.reportsService=new i.default(t)}return t.prototype.getLayout=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.reportsService.getLayout(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getReport=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.reportsService.getReport(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getFilters=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.reportsService.getFilters(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getReportExecution=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.reportsService.getReportExecution(t)]}))}))},t.prototype.getLastUpdateTime=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.reportsService.getLastUpdateTime()];case 1:return[2,t.sent()]}}))}))},t.prototype.getConfigurations=function(t){return this.reportsService.getConfigurations(t)},t.prototype.getConfigurationsFilterOptions=function(){return this.reportsService.getConfigurationsFilterOptions()},t.prototype.downloadConfigurations=function(t){return this.reportsService.downloadConfigurations(t)},t.prototype.cacheablesGetReport=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.reportsService.cacheablesGetReport(t,e)];case 1:return[2,n.sent()]}}))}))},Object.defineProperty(t.prototype,"endpoint",{get:function(){return this.reportsService.endpoint},enumerable:!1,configurable:!0}),t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var a=n(96),c=n(11),l="reports-service";e.Routes={GENERATE_REPORT:"/"+l+"/v1/report",GET_LAYOUT:"/"+l+"/v1/layout",GET_REPORT:"/"+l+"/v2/report",GET_FILTERS:"/"+l+"/v2/filters",GET_REPORT_EXECUTION:"/"+l+"/v1/report_execution",GET_LAST_UPDATE_TIME:"/"+l+"/v1/last_update_time",GET_CONFIGURATIONS:"/"+l+"/v1/configurations",GET_CONFIGURATIONS_CSV:"/"+l+"/v1/configurations/report-download",GET_CONFIGURATIONS_FILTER_OPTOINS:"/"+l+"/v1/configurations/filter-options"};var f=function(t){function n(e){return t.call(this,e,"reports")||this}return o(n,t),n.prototype.getConfigurations=function(t){return s(this,void 0,void 0,(function(){var n,r;return u(this,(function(o){return n=c.pick(t,["changedBy","configurationModels","changeTime"]),r=c.pick(t,["limit","offset","sort"]),[2,this.routeGenerator.post(e.Routes.GET_CONFIGURATIONS).withPayload(n).withQueryString(r).invoke()]}))}))},n.prototype.downloadConfigurations=function(t){return s(this,void 0,void 0,(function(){var n,r;return u(this,(function(o){return n=c.pick(t,["changedBy","configurationModels","changeTime"]),r=c.pick(t,["limit","offset","sort"]),[2,this.routeGenerator.post(e.Routes.GET_CONFIGURATIONS_CSV).withPayload(n).withQueryString(r).invoke()]}))}))},n.prototype.getConfigurationsFilterOptions=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.routeGenerator.get(e.Routes.GET_CONFIGURATIONS_FILTER_OPTOINS).invoke()]}))}))},n.prototype.getReportExecution=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,this.routeGenerator.get(e.Routes.GET_REPORT_EXECUTION).withQueryString({uuid:t}).invoke()];case 1:return[2,n.sent().url]}}))}))},n.prototype.getLastUpdateTime=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.routeGenerator.get(e.Routes.GET_LAST_UPDATE_TIME).invoke()];case 1:return[2,t.sent().last_update_time]}}))}))},n.prototype.getLayout=function(t){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:return t?(n=JSON.stringify(t),[2,this.routeGenerator.get(e.Routes.GET_LAYOUT).withQueryString({payload:n}).invoke()]):[4,this.routeGenerator.get(e.Routes.GET_LAYOUT).invoke()];case 1:return[2,r.sent()]}}))}))},n.prototype.getReport=function(t,n){return s(this,void 0,void 0,(function(){var r;return u(this,(function(o){switch(o.label){case 0:return r=JSON.stringify(i({widget_id:t},n)),[4,this.routeGenerator.get(e.Routes.GET_REPORT).withQueryString({payload:r}).invoke()];case 1:return[2,o.sent().report]}}))}))},n.prototype.getFilters=function(t){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:return n=JSON.stringify(i({},t)),[4,this.routeGenerator.get(e.Routes.GET_FILTERS).withQueryString({payload:n}).invoke()];case 1:return[2,r.sent()]}}))}))},n.prototype.cacheablesGetReport=function(t,n){return s(this,void 0,void 0,(function(){var r;return u(this,(function(o){switch(o.label){case 0:return r=JSON.stringify(i({widget_id:t},n)),[4,this.routeGenerator.get(e.Routes.GENERATE_REPORT).withQueryString({payload:r}).invoke()];case 1:return[2,o.sent().report]}}))}))},n}(a.default);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(370),o=function(){function t(t){this.vrpAutoDispatchAnalyticEntity=new r.default(t)}return t.prototype.getAll=function(t){return this.vrpAutoDispatchAnalyticEntity.service.getAll(t)},t.prototype.onDoneEvent=function(t){this.vrpAutoDispatchAnalyticEntity.onDoneEvent=t},t.prototype.getTeamsStates=function(){return this.vrpAutoDispatchAnalyticEntity.getTeamsStates()},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=n(9),u=n(371),a=n(11),c=function(t){function e(e){var n=t.call(this,{session:e,entityName:"auto_dispatch_statistics",routes:[i.BaseRoutes.GetAll]})||this;return n.onDoneEvent=a.noop,n.realTime.on("vrp auto dispatch done",(function(t){return n.onDoneEvent(t)})),n}return o(e,t),e.prototype.getTeamsStates=function(){return this.service.routeGenerator.get(u.Routes.getTeamsStates).withExtractor((function(t){return t.result})).invoke()},e}(s.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0,e.Routes={getTeamsStates:"/auto_dispatch_statistics/state_by_teams/"}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=n(373),i=function(){function t(t){this.tagCustomerConfiguration=new o.default(t)}return t.prototype.getByTag=function(t){return this.tagCustomerConfiguration.getByTag(t)},t.prototype.getAll=function(){return this.tagCustomerConfiguration.service.getAll()},t.prototype.create=function(t,e){return this.tagCustomerConfiguration.service.create(r(r({},e),{tag_id:t}))},t.prototype.update=function(t,e){return this.tagCustomerConfiguration.service.update(t,e)},t.prototype.delete=function(t){return this.tagCustomerConfiguration.service.delete(t)},t}();e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"tag_customer_configurations",routePrefix:"tags",routes:[i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete,i.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getByTag=function(t){return this.service.routeGenerator.get("/tags/"+t+"/tag_customer_configurations").withRouteParams({tagId:t}).invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=n(375),i=function(){function t(t){this.tagMerchantConfiguration=new o.default(t)}return t.prototype.getAll=function(){return this.tagMerchantConfiguration.service.getAll()},t.prototype.getByTag=function(t){return this.tagMerchantConfiguration.getByTag(t)},t.prototype.create=function(t,e){return this.tagMerchantConfiguration.service.create(r(r({},e),{tag_id:t}))},t.prototype.update=function(t,e){return this.tagMerchantConfiguration.service.update(t,e)},t.prototype.delete=function(t){return this.tagMerchantConfiguration.service.delete(t)},t}();e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"tag_merchant_configurations",routePrefix:"tags",routes:[i.BaseRoutes.GetAll,i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete]})||this}return o(e,t),e.prototype.getByTag=function(t){return this.service.routeGenerator.get("/tags/"+t+"/tag_merchant_configurations").withRouteParams({tagId:t}).invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(377),o=function(){function t(t){this.InventoryActionsConfigurationEntity=new r.default(t)}return t.prototype.getAll=function(){return this.InventoryActionsConfigurationEntity.service.getAll()},t.prototype.create=function(t){return this.InventoryActionsConfigurationEntity.service.create(t)},t.prototype.update=function(t,e){return this.InventoryActionsConfigurationEntity.service.update(t,e)},t.prototype.delete=function(t){return this.InventoryActionsConfigurationEntity.service.delete(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"inventory_actions_configurations",routePrefix:"merchant",routes:[i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete,i.BaseRoutes.GetAll]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(379),o=function(){function t(t){this.TaskConfigurationEntity=new r.default(t)}return t.prototype.getAllActionData=function(){return this.TaskConfigurationEntity.getAllActionData()},t.prototype.create=function(t){return this.TaskConfigurationEntity.service.create(t)},t.prototype.update=function(t,e){return this.TaskConfigurationEntity.service.update(t,e)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"task_configurations",routePrefix:"merchant",routes:[i.BaseRoutes.Create,i.BaseRoutes.Update]})||this}return o(e,t),e.prototype.getAllActionData=function(){return this.service.routeGenerator.get("/merchant/task_configurations/get_all_action_data").invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(381),u=n(72),a=function(){function t(t){this.userConfigurationEntity=new s.default(t)}return t.prototype.get=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.userConfigurationEntity.get()]}))}))},t.prototype.getActionData=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.userConfigurationEntity.getActionData()]}))}))},t.prototype.update=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.userConfigurationEntity.update(t)]}))}))},r([u.default],t.prototype,"get",null),t}();e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){return t.call(this,{session:e,entityName:"user_configuration",routePrefix:"merchant",routes:[]})||this}return o(e,t),e.prototype.get=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get("/merchant/user_configuration").invoke()]}))}))},e.prototype.getActionData=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get("/merchant/user_configuration/get_action_data").invoke()]}))}))},e.prototype.update=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.put("/merchant/user_configuration").withPayload(t).invoke()]}))}))},e}(n(5).default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(383),o=function(){function t(t){this.userTypeEntity=new r.default(t)}return t.prototype.get=function(t){return this.userTypeEntity.getUserType(t)},t.prototype.getAll=function(){return this.userTypeEntity.getAllUserTypes()},t.prototype.update=function(t,e){return this.userTypeEntity.updateUserType(t,e)},t.prototype.create=function(t){return this.userTypeEntity.createUserType(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=n(5),c=n(384),l=[a.BaseRoutes.Get,a.BaseRoutes.GetAll,a.BaseRoutes.Create,a.BaseRoutes.Update],f=function(t){function e(e){return t.call(this,{session:e,entityName:"user_types",routes:l})||this}return o(e,t),e.prototype.getUserType=function(t){return this.getOrFetch(t)},e.prototype.getAllUserTypes=function(){return i(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return[4,this.getAllOrFetch(null,c.userTypesStoreExtractor,c.userTypesResponseExtractor)];case 1:return(t=e.sent()).count?[2,t]:[2,c.userTypesResponseExtractor(t)]}}))}))},e.prototype.updateUserType=function(t,e){return this.update(t,e,c.userTypeExtractor,c.userTypeExtractor)},e.prototype.createUserType=function(t){return this.create(t,c.userTypeExtractor,c.userTypeExtractor)},e}(u.default);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.userTypesResponseExtractor=e.userTypesStoreExtractor=e.userTypeExtractor=void 0;e.userTypeExtractor=function(t){return t.user_type};e.userTypesStoreExtractor=function(t){return t.user_types};e.userTypesResponseExtractor=function(t){return{count:t.count?t.count:t.length,user_types:t.user_types?t.user_types:t}}},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DeliveryBlocksApi=void 0;var s=n(15),u=n(386),a=function(){function t(t){this.deliveryBlocksEntity=new u.default(t)}return t.prototype.get=function(t,e,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.deliveryBlocksEntity.get(t,e,n)]}))}))},t.prototype.create=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.deliveryBlocksEntity.create(t)]}))}))},t.prototype.update=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.deliveryBlocksEntity.update(t)]}))}))},t.prototype.delete=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.deliveryBlocksEntity.delete(t,e)]}))}))},t.prototype.getByDriverId=function(t,e,n){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.deliveryBlocksEntity.getByDriverId(t,e,n)]}))}))},r([s.logOnException],t.prototype,"get",null),r([s.logOnException],t.prototype,"create",null),r([s.logOnException],t.prototype,"update",null),r([s.logOnException],t.prototype,"delete",null),r([s.logOnException],t.prototype,"getByDriverId",null),t}();e.DeliveryBlocksApi=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},u=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0});var a=n(5),c="/delivery_blocks",l="/delivery_blocks",f="/delivery_blocks/{:id}",p="/delivery_blocks/{:id}",h=function(t){function e(e){return t.call(this,{session:e,entityName:"delivery_blocks",routes:[]})||this}return o(e,t),e.prototype.get=function(t,e,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,this.service.routeGenerator.get(c).withQueryString({team_id:t,start_time:e,end_time:n}).setException("Could not fetch delivery block for team #"+t).withExtractor((function(t){return t.delivery_blocks})).invoke()];case 1:return[2,r.sent()]}}))}))},e.prototype.create=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l).withPayload(t).withExtractor((function(t){return t.delivery_block})).setException("Could not create delivery block for team #"+t.team_id).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.update=function(t){return i(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e=t.id,n=u(t,["id"]),[4,this.service.routeGenerator.put(f).withExtractor((function(t){return t.delivery_block})).setException("Could not update delivery block for team #"+t.team_id).withRouteParams({id:e}).withPayload(n).invoke()];case 1:return[2,r.sent()]}}))}))},e.prototype.delete=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.delete(p).withExtractor((function(t){return t.success})).setException("Could not delete delivery block with id #"+t).withRouteParams({id:t}).withQueryString({recurring:e}).invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getByDriverId=function(t,e,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,this.service.routeGenerator.get("/delivery_blocks/users/{:id}").withExtractor((function(t){return t.delivery_blocks})).withRouteParams({id:t}).setException("Could not fetch delivery block for user with id #"+t).withQueryString({start_time:e,end_time:n}).invoke()]}))}))},e}(a.default);e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(388),o=function(){function t(t){this.reportPreference=new r.default(t)}return t.prototype.upsert=function(t){return this.reportPreference.upsert(t)},t.prototype.delete=function(t){return this.reportPreference.service.delete(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"report_preference",routePrefix:"merchant",routes:[i.BaseRoutes.Delete]})||this}return o(e,t),e.prototype.upsert=function(t){return this.service.routeGenerator.put("/merchant/report_preferences/upsert").withPayload(t).invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};Object.defineProperty(e,"__esModule",{value:!0});var o=n(390),i=n(72),s=function(){function t(t){this.teamEntity=new o.default(t)}return t.prototype.get=function(t){return this.teamEntity.get(t)},t.prototype.forceGet=function(t){return this.teamEntity.service.get(t)},t.prototype.getAll=function(){return this.teamEntity.getAll()},t.prototype.update=function(t,e){return this.teamEntity.updateTeam(t,e)},t.prototype.create=function(t){return this.teamEntity.createTeam(t)},t.prototype.byMerchantId=function(t){return this.teamEntity.byMerchantId(t)},r([i.default],t.prototype,"getAll",null),t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=n(9),c=function(t){return t.team},l="/users/{:userId}/teams",f="/merchant/{:merchantId}/teams",p=function(t){function e(e){var n=t.call(this,{session:e,entityName:"teams",routes:[u.BaseRoutes.Get,u.BaseRoutes.GetAll,u.BaseRoutes.Create,u.BaseRoutes.Update]})||this;return n.teamsByMerchant=new Map,n}return o(e,t),e.prototype.byUserId=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(l).withExtractor((function(t){return t})).setException("Could not fetch teams of the user #"+t).withRouteParams({userId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updateTeam=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.update(t,e,c,c)]}))}))},e.prototype.createTeam=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.create(t,c,c)]}))}))},e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.getAllOrFetch()]}))}))},e.prototype.get=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.getOrFetch(t)]}))}))},e.prototype.byMerchantId=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return this.teamsByMerchant.get(t)?[2,this.teamsByMerchant.get(t)]:[4,this.service.routeGenerator.get(f).withExtractor((function(t){return t.teams})).setException("Could not fetch teams of the merchant #"+t).withRouteParams({merchantId:t}).invoke()];case 1:return e=n.sent(),this.teamsByMerchant.set(t,e),[2,e]}}))}))},e}(a.default);e.default=p},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var s=n(15),u=n(19),a=n(24),c=n(70),l=n(9),f=function(t){function e(e){var n=t.call(this,e.config.getApiEndpoint(),e)||this;return n.prepare_resource=new u.Route("/resources/prepare",1),n.process_resource=new u.Route("/resources/{:id}/process",1),n.realTime=new l.RealTimeHandler(e.persistentConnection),n.processedCallbacks=[],n}return o(e,t),e.prototype.prepare=function(t,e){return this.handleAuthorizedRequest(this.prepare_resource,c.defaultExtractor,s.BringgException.serviceException("Failed to call prepare resource"),i({type:t},e))},e.prototype.process=function(t,e){return this.realTime.on(e,this.onProcessed.bind(this)),this.handleAuthorizedRequest(this.process_resource,c.defaultExtractor,s.BringgException.serviceException("Failed to call resource process"),null,{id:t})},e.prototype.registerOnProcessed=function(t,e){var n=this;return this.processedCallbacks.push({callback:e,resourceId:t}),function(){return n.processedCallbacks.splice(n.processedCallbacks.map((function(t){return t.callback})).indexOf(e),1)}},e.prototype.onProcessed=function(t){this.processedCallbacks.forEach((function(e){t.resource_id===e.resourceId&&e.callback(t)}))},e}(a.SessionBasedService);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(393),o=function(){function t(t){this.teamConfigurationEntity=new r.default(t)}return t.prototype.get=function(t){return this.teamConfigurationEntity.service.get(t)},t.prototype.getAll=function(){return this.teamConfigurationEntity.service.getAll()},t.prototype.update=function(t,e){return this.teamConfigurationEntity.service.update(t,e)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"team_configuration",routes:[i.BaseRoutes.Get,i.BaseRoutes.Update,i.BaseRoutes.GetAll]})||this}return o(e,t),e}(n(9).default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(395),s=function(){function t(t){this.scanEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.scanEntity.service.create(t)]}))}))},t.prototype.getTaskRouteDetails=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.scanEntity.getTaskRouteDetails(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=n(5),c=function(t){function e(e){return t.call(this,{session:e,entityName:"scans",routes:[a.BaseRoutes.Create]})||this}return o(e,t),e.prototype.getTaskRouteDetails=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.get("/scans/find_task_route_details").withQueryString({scan_string:t}).withExtractor((function(t){return t.task_route_details})).invoke()]}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Signature=void 0;var i=n(397),s=function(){function t(t){this.signatureEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.signatureEntity.create(t)]}))}))},t}();e.Signature=s,e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){return t.call(this,{session:e,entityName:"signatures",routes:[]})||this}return o(e,t),e.prototype.create=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/signatures").withHeaders({"Content-Type":"multipart/form-data"}).withPayload(t).invoke()]}))}))},e}(n(9).default);e.default=u},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(399),s=function(){function t(t){this.photoEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.photoEntity.create(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){return t.call(this,{session:e,entityName:"photos",routes:[]})||this}return o(e,t),e.prototype.create=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/task_photo").withHeaders({"Content-Type":"multipart/form-data"}).withPayload(t).invoke()]}))}))},e}(n(9).default);e.default=u},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.MerchantConfigurationApi=void 0;var i=n(401),s=n(11),u=n(402),a=function(){function t(t){this.entity=new i.default(t)}return t.prototype.get=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.get()]}))}))},t.prototype.fetchConfiguration=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.fetchConfiguration()]}))}))},t.prototype.update=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.update(s.pick(t,u.MerchantConfigurationKeys))]}))}))},t.prototype.uploadLogo=function(t){return this.entity.uploadLogo(t)},t.prototype.resetDeliveryPin=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.resetDeliveryPin()]}))}))},t.prototype.resetDestinationPin=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.resetDestinationPin()]}))}))},t.prototype.getCsvFields=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getCsvFields()]}))}))},t.prototype.setCsvFields=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.setCsvFields(t)]}))}))},t.prototype.getUserCsvFields=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getUserCsvFields()]}))}))},t.prototype.dashboardTableConfigurationUpdate=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.dashboardTableConfigurationUpdate(t)]}))}))},t.prototype.setUserCsvFields=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.setUserCsvFields(t)]}))}))},t.prototype.deliveryPinChange=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.deliveryPinChange(t)]}))}))},t.prototype.resetEmailLogo=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.resetEmailLogo()]}))}))},t.prototype.resetClientAppLogo=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.resetClientAppLogo()]}))}))},t.prototype.resetPublicTaskFormLogo=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.resetPublicTaskFormLogo()]}))}))},t.prototype.getRatingReasonConfiguration=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getRatingReasonConfiguration()]}))}))},t.prototype.setRatingReasonConfiguration=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.setRatingReasonConfiguration(t)]}))}))},t.prototype.requestBetaProgram=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.requestBetaProgram(t)]}))}))},t.prototype.getTipDriverConfiguration=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getTipDriverConfiguration()]}))}))},t.prototype.setTipDriverConfiguration=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.setTipDriverConfiguration(t)]}))}))},t.prototype.notifyCustomers=function(t,e,n,i){return r(this,void 0,void 0,(function(){return o(this,(function(r){return[2,this.entity.notifyCustomers(t,e,n,i)]}))}))},t.prototype.getPublicTaskForm=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getPublicTaskForm()]}))}))},t.prototype.setPublicTaskForm=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.entity.setPublicTaskForm(t,e)]}))}))},t.prototype.getMobileTaskForm=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getMobileTaskForm()]}))}))},t.prototype.setMobileTaskForm=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.setMobileTaskForm(t)]}))}))},t}();e.MerchantConfigurationApi=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a="/merchant/merchant_configuration",c={RESET_DELIVERY_PIN:a+"/delivery_pin_reset",RESET_DESTINATION_PIN:a+"/destination_pin_reset",GET_CSV_FIELDS:a+"/csv_upload_fields",SET_CSV_FIELDS:a+"/csv_upload_fields",GET_USER_CSV_FIELDS:a+"/user_csv_upload_fields",SET_USER_CSV_FIELDS:a+"/user_csv_upload_fields",DELIVERY_PIN_CHANGE:a+"/delivery_pin_change",RESET_EMAIL_LOGO:a+"/email_logo_reset",UPLOAD_LOGO:a+"/logo",RESET_CLIENT_APP_LOGO:a+"/client_app_logo_reset",GET_RATING_REASON_CONFIGURATION:a+"/rating_reasons",SET_RATING_REASON_CONFIGURATION:a+"/rating_reasons",REQUEST_BETA_PROGRAM:a+"/request_beta_program",GET_TIP_DRIVER_CONFIGURATION:a+"/tip_driver",SET_TIP_DRIVER_CONFIGURATION:a+"/tip_driver",NOTIFY_CUSTOMERS:a+"/notify_customers",GET_PUBLIC_TASK_FORM:a+"/public_task_form",SET_PUBLIC_TASK_FORM:a+"/public_task_form",RESET_PUBLIC_TASK_FORM_LOGO:a+"/reset_public_task_form_logo",GET_MOBILE_TASK_FORM:a+"/mobile_task_form",SET_MOBILE_TASK_FORM:a+"/mobile_task_form",UPDATE_TABLE_CONFIGURATION:"/dashboard_ui_configuration"},l=function(t){function e(e){return t.call(this,{session:e,entityName:"merchant",routeSuffix:"merchant_configuration",routes:[]})||this}return o(e,t),e.prototype.updateMerchantConfigurationField=function(t,e){var n;this.service.session.update("merchantConfiguration",((n={})[t]=e,n))},e.prototype.updateMerchantConfiguration=function(t){this.service.session.update("merchantConfiguration",t)},e.prototype.urlRequest=function(t){var e=t.route,n=t.errorMessage,r=t.fieldToUpdate,o=t.payload;return i(this,void 0,void 0,(function(){var t,i;return s(this,(function(s){switch(s.label){case 0:return t=this.service.routeGenerator.post(e).withExtractor((function(t){return t.url})).setException(n),o&&t.withPayload(o),[4,t.invoke()];case 1:return i=s.sent(),r&&this.updateMerchantConfigurationField(r,i),[2,i]}}))}))},e.prototype.resetDeliveryPin=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.urlRequest({route:c.RESET_DELIVERY_PIN,fieldToUpdate:"delivery_pin",errorMessage:"could not reset delivery pin"})]}))}))},e.prototype.resetDestinationPin=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.urlRequest({route:c.RESET_DESTINATION_PIN,fieldToUpdate:"destination_pin",errorMessage:"could not reset destination pin"})]}))}))},e.prototype.resetEmailLogo=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.urlRequest({route:c.RESET_EMAIL_LOGO,fieldToUpdate:"email_logo",errorMessage:"could not reset email logo"})]}))}))},e.prototype.resetClientAppLogo=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.urlRequest({route:c.RESET_CLIENT_APP_LOGO,fieldToUpdate:"logo",errorMessage:"could not reset client app logo"})]}))}))},e.prototype.uploadLogo=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){return(e=new FormData).append("file",t),[2,this.service.routeGenerator.post(c.UPLOAD_LOGO).withHeaders({"Content-Type":"multipart/form-data"}).withPayload(e).invoke()]}))}))},e.prototype.get=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return this.service.session.merchantConfiguration?[2,this.service.session.merchantConfiguration]:[4,this.fetchConfiguration()];case 1:return[2,t.sent()]}}))}))},e.prototype.fetchConfiguration=function(){return i(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t=this.service.session,[4,this.service.routeGenerator.get(a+"/").withExtractor((function(t){return t})).setException("could not fetch merchant_configuration").invoke()];case 1:return t.merchantConfiguration=e.sent(),[2,this.service.session.merchantConfiguration]}}))}))},e.prototype.update=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.put(a+"/").withExtractor((function(t){return t.merchant_configuration})).setException("failed updating merchant_configuration").withPayload(t).invoke()];case 1:return e=n.sent(),this.updateMerchantConfiguration(e),[2,e]}}))}))},e.prototype.getCsvFields=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(c.GET_CSV_FIELDS).withExtractor((function(t){return t.csv_upload_fields})).setException("could not fetch csv fields configuration").invoke()]}))}))},e.prototype.setCsvFields=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.SET_CSV_FIELDS).setException("could not set csv fields configuration").withPayload({csv_fields:t}).invoke()];case 1:return e.sent(),[4,this.getCsvFields()];case 2:return[2,e.sent()]}}))}))},e.prototype.getUserCsvFields=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(c.GET_USER_CSV_FIELDS).withExtractor((function(t){return t.csv_upload_fields})).setException("could not fetch user csv fields configuration").invoke()]}))}))},e.prototype.setUserCsvFields=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.SET_USER_CSV_FIELDS).setException("could not set user csv fields configuration").withPayload({csv_fields:t}).invoke()];case 1:return e.sent(),[4,this.getUserCsvFields()];case 2:return[2,e.sent()]}}))}))},e.prototype.deliveryPinChange=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.urlRequest({route:c.DELIVERY_PIN_CHANGE,fieldToUpdate:"delivery_pin",errorMessage:"failed updating delivery pin: "+t,payload:{alternate_delivery_pin:t}})];case 1:return[2,e.sent()]}}))}))},e.prototype.dashboardTableConfigurationUpdate=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.put(c.UPDATE_TABLE_CONFIGURATION).withPayload({dashboard_ui_configuration:{table_configuration:t}}).invoke()]}))}))},e.prototype.resetPublicTaskFormLogo=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.urlRequest({route:c.RESET_PUBLIC_TASK_FORM_LOGO,errorMessage:"could not reset public task logo"})];case 1:return[2,t.sent()]}}))}))},e.prototype.getRatingReasonConfiguration=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.get(c.GET_RATING_REASON_CONFIGURATION).withExtractor((function(t){return t.rating_reason_config})).setException("could not fetch rating reason configuration").invoke()];case 1:return[2,t.sent()]}}))}))},e.prototype.setRatingReasonConfiguration=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.SET_RATING_REASON_CONFIGURATION).setException("could not set merchant_configuration rating reason").withPayload({rating_reason_config:t}).invoke()];case 1:return e.sent(),[4,this.getRatingReasonConfiguration()];case 2:return[2,e.sent()]}}))}))},e.prototype.requestBetaProgram=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post(c.REQUEST_BETA_PROGRAM).setException("could not set beta program").withPayload({feature_name:t}).invoke()]}))}))},e.prototype.getTipDriverConfiguration=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(c.GET_TIP_DRIVER_CONFIGURATION).withExtractor((function(t){return t.configuration})).setException("could not get driver tip configuration").invoke()]}))}))},e.prototype.setTipDriverConfiguration=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(c.SET_TIP_DRIVER_CONFIGURATION).withExtractor((function(t){return t.message})).setException("could not set driver tip configuration").withPayload({tip_driver_configuration:t}).invoke()];case 1:return e.sent(),[4,this.getTipDriverConfiguration()];case 2:return[2,e.sent()]}}))}))},e.prototype.notifyCustomers=function(t,e,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){return[2,this.service.routeGenerator.post(c.NOTIFY_CUSTOMERS).setException("could not notify customers: "+r).withPayload({notification_text:t,notification_url:e,send_all:n,customer_ids:r}).invoke()]}))}))},e.prototype.getPublicTaskForm=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(c.GET_PUBLIC_TASK_FORM).withExtractor((function(t){return t.public_task_forms})).setException("could not fetch public task form").invoke()]}))}))},e.prototype.setPublicTaskForm=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.post(c.SET_PUBLIC_TASK_FORM).withExtractor((function(t){return t.public_task_forms})).setException("could not set public task form").withPayload({configuration:{color:t,forms:e}}).invoke()]}))}))},e.prototype.getMobileTaskForm=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(c.GET_MOBILE_TASK_FORM).withExtractor((function(t){return t.mobile_task_form})).setException("could not fetch mobile task form").invoke()]}))}))},e.prototype.setMobileTaskForm=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post(c.SET_MOBILE_TASK_FORM).withExtractor((function(t){return t.mobile_task_form})).setException("could not set mobile task form").withPayload({mobile_task_form:t}).invoke()]}))}))},e}(u.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MerchantConfigurationKeys=void 0,e.MerchantConfigurationKeys=["allow_share_location","acknowledge_flow_ui_config","task_fields","advance_configuration_enabled","address_format","alert_configurations","alert_if_user_rated_below","alerts_types","allow_access_to_all_open_tasks","allow_customer_fb_like","allow_customer_find_me","allow_cx_customer_cancellation","allow_dispatcher_to_access_all_teams","allow_dispatcher_to_access_task_price","allow_dispatcher_to_edit_drivers","allow_moving_tasks_to_planning_phase","allow_offshift_drivers_to_be_assigned","allow_rating","allow_single_order_per_driver","alternate_delivery_pin","application_configurations","application_merchant_configurations","applications","auto_dispatch","auto_dispatch_optimization_method","auto_dispatch_timeout","auto_dispatch_timeout_per_driver","auto_share_location","average_delivery_time","avoid_commercial_roads","driver_administration_time_seconds","cancel_undone_tasks_by_eod","cash_out_flow_enabled","cash_out_template_name","consumer_app_eta_display_method","country_code","custom_drivers_page_row_colors","customer_fb_like_url","cx_cancel_event_type","dashboard_refresh_rate_secs","debrief_flow_enabled","default_minutes_buffer_for_asap_orders","default_minutes_buffer_for_scheduled_orders","delivery_pin","destination_pin","distance_threshold","driver_at_home_flow_options","driver_preparation_time_seconds","email_logo","email_style_color","enable_dashboard","enable_dimension_editing_in_ui","enable_future_tasks","enable_kds","enable_looping_alert_sound","enable_map_overlays","enable_planned_routes","enable_reschedule_flow","enable_shifts_actions","enable_support","enable_task_acknowledge_flow","enable_task_cancellation","enable_task_price","enable_teams","enable_user_types","end_of_day_time","eta_background_color","eta_minutes_color","eta_time_color","eta_title_color","extra_terms_and_conditions_url","grab_future_timeout","grab_mode","grab_mode_alert_type","grab_mode_radius","grab_mode_timeout","header_color","history_fields","initial_tasks_page_size","inverse_header_color","invoice_printed_copies","language_code","lat","late_buffer","lng","logo","logout_idle_admin_minutes","logout_idle_dispatcher_minutes","looping_alert_sound_type","map_type","max_distance_for_optimization_in_meters","max_distance_from_home_to_task_km","max_distance_to_not_report","merchant_id","merchant_mode","minutes_until_first_wp_scheduled_at","name","number_of_retries_before_a_phone_call","open_tasks_filter","paid_google_maps_api","phone_call_string","planning_fields","planning_phase_exists","planning_phase_print_on_apply","planning_phase_send_emails_to_drivers_on_apply","preparation_flow_ui_config","price_currency","printer_type","qr_login_flow_options","reminder_timeout","reply_to_shared_email","run_batcher_on_grab_mode","scan_code_unique","secured_setup","send_notifications_to_customers","send_sms_to_first_way_point","share_if_too_close","sharing_mode","show_bringg_logo","show_eta_to_home","show_new_reports","soft_csv_import","sound_on_new_order","support_parcel_shop_last_mile","task_fields","task_alert_fields","driver_alert_fields","optimization_alert_fields","task_forwarding_enabled","task_home_when_delivery_ends","task_invoice_template_name","task_window_bottom_buffer_minutes","task_window_top_buffer_minutes","tasks_page_size","the_batcher","time_to_remind_before_start_task","tip_driver_enabled","update_location_max_idle_time","use_coc","use_time_windows","voice_reminder_frequency","voice_reminder_text","windows","windows_mode","enable_chat","inherit_team_from_group_team","hour_format","dispatch_filter_limit"]},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(404),s=function(){function t(t){this.vehicleTypesEntity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.vehicleTypesEntity.getAll()];case 1:return[2,t.sent()]}}))}))},t.prototype.get=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.vehicleTypesEntity.get(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.singleExtractor=e.listExtractor=void 0;var u=n(5),a=n(9);e.listExtractor=function(t){return t.vehicle_types};e.singleExtractor=function(t){return t.vehicle_type};var c=function(t){function n(e){return t.call(this,{session:e,entityName:"vehicle_types",routes:[u.BaseRoutes.GetAll,u.BaseRoutes.Get]})||this}return o(n,t),n.prototype.getAll=function(){return this.getAllOrFetch(null,e.listExtractor,e.listExtractor)},n.prototype.get=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.getOrFetch(t,e.singleExtractor,e.singleExtractor)]}))}))},n}(a.default);e.default=c},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(406),s=function(){function t(t){this.reasonToReassignTasksEntity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.reasonToReassignTasksEntity.getAll()];case 1:return[2,t.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),s=n(5),u=function(t){return t.reasons_to_reassign_tasks},a=function(t){function e(e){return t.call(this,{session:e,entityName:"reason_to_reassign_tasks",routes:[s.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getAll=function(){return this.getAllOrFetch(null,u,u)},e}(i.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(408),s=n(409),u=function(){function t(t){this.skillsEntity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t=s.skillsExtractor,[4,this.skillsEntity.service.getAll()];case 1:return[2,t.apply(void 0,[e.sent()])]}}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return n=s.skillExtractor,[4,this.skillsEntity.service.update(t,{name:e})];case 1:return[2,n.apply(void 0,[r.sent()])]}}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e=s.skillExtractor,[4,this.skillsEntity.service.create({name:t})];case 1:return[2,e.apply(void 0,[n.sent()])]}}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.skillsEntity.service.delete(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"skills",routes:[i.BaseRoutes.GetAll,i.BaseRoutes.Delete,i.BaseRoutes.Update,i.BaseRoutes.Create]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.skillsExtractor=e.successExtractor=e.skillExtractor=void 0;e.skillExtractor=function(t){return t.skill};e.successExtractor=function(t){return t.success};e.skillsExtractor=function(t){return t.skills}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(411),o=n(142),i=function(){function t(t){this.vehicleEntity=new r.default(t),this.onUpdate=this.vehicleEntity.store.onItemUpdate,this.onDelete=this.vehicleEntity.store.onItemRemoved,this.onCreate=this.vehicleEntity.store.onItemCreated,this.onVehicleUnassigned=this.vehicleEntity.onVehicleUnassigned,this.unsubscribe=this.vehicleEntity.store.unsubscribe}return t.prototype.getAll=function(){return this.vehicleEntity.getAll()},t.prototype.getAllByTeam=function(t){return this.vehicleEntity.getAllByTeam(t)},t.prototype.get=function(t){return this.vehicleEntity.get(t)},t.prototype.update=function(t,e){return this.vehicleEntity.update(t,e,o.vehicleExtractor,o.vehicleExtractor)},t.prototype.create=function(t){return this.vehicleEntity.create(t,o.vehicleExtractor,o.vehicleExtractor)},t.prototype.delete=function(t){return this.vehicleEntity.delete(t)},t.prototype.getAssignmentHistory=function(t){return this.vehicleEntity.getAssignmentHistory(t)},t.prototype.importVehiclesCsv=function(t){return this.vehicleEntity.importVehiclesCsv(t)},t.prototype.getCsvUploadFields=function(){return this.vehicleEntity.getCsvUploadFields()},t}();e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(9),a=n(5),c=n(142),l=n(11);e.Routes={GET_ASSIGNMENT_HISTORY:"/vehicles/get_assignment_history/",GET_BY_TEAM:"/teams/{:teamId}/vehicles",IMPORT_VEHICLES_CSV:"/vehicles/import_from_csv",GET_CSV_UPLOAD_FIELDS:"/vehicles/csv_upload_fields"};var f=function(t){function n(n){var r=t.call(this,{session:n,entityName:"vehicles",routes:[a.BaseRoutes.GetAll,a.BaseRoutes.Get,a.BaseRoutes.Delete,a.BaseRoutes.Update,a.BaseRoutes.Create]})||this;return r.onVehicleUnassignedEvent=l.noop,r.onVehicleUnassigned=function(t){r.onVehicleUnassignedEvent=t},r.importVehiclesCsv=function(t){var n=new FormData;return n.append("file",t),r.service.routeGenerator.post(e.Routes.IMPORT_VEHICLES_CSV).withHeaders({"Content-Type":"multipart/form-data"}).withPayload(n).invoke()},r.vehiclesByTeam=new Map,r.subscribeToRealtime(),r}return o(n,t),n.prototype.subscribeToRealtime=function(){var t=this;this.realTime.on(c.REAL_TIME_EVENTS.VEHICLE_REMOVED,(function(e){return t.onVehicleUnassignedEvent({user_id:e.user_id,vehicle_id:e.vehicle_id})})),this.realTime.on(c.REAL_TIME_EVENTS.VEHICLE_UPDATE,(function(e){return t.store.updateInStore(e)}))},n.prototype.getAll=function(){return this.getAllOrFetch(null,c.vehiclesExtractor,c.vehiclesExtractor)},n.prototype.getAllByTeam=function(t){return i(this,void 0,void 0,(function(){var n,r=this;return s(this,(function(o){switch(o.label){case 0:return this.vehiclesByTeam.has(t)?[2,this.vehiclesByTeam.get(t).map((function(t){return r.store.getItem(t)}))]:[4,this.service.routeGenerator.get(e.Routes.GET_BY_TEAM).withExtractor(c.vehiclesExtractor).setException("failed to get vehicles by team: "+t).withRouteParams({teamId:t}).invoke()];case 1:return(n=o.sent()).forEach((function(t){return r.store.addToStore(t)})),this.vehiclesByTeam.set(t,n.map((function(t){return t.id}))),[2,n]}}))}))},n.prototype.get=function(t){return this.getOrFetch(t,c.vehicleExtractor,c.vehicleExtractor)},n.prototype.getAssignmentHistory=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.post(e.Routes.GET_ASSIGNMENT_HISTORY).withExtractor(c.assignmentHistoryExtractor).setException("failed to get vehicle_Id: "+t+" assignment history").withPayload({vehicle_id:t}).invoke()]}))}))},n.prototype.getCsvUploadFields=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(e.Routes.GET_CSV_UPLOAD_FIELDS).withExtractor(c.getCsvFieldsExtractor).setException("failed to get vehicles csv upload fields").invoke()]}))}))},n}(u.default);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(413),o=function(){function t(t){this.webApplicationConfigurationEntity=new r.default(t)}return t.prototype.get=function(){return this.webApplicationConfigurationEntity.get()},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=function(t){function e(e){return t.call(this,{session:e,entityName:"web_application_configurations",routes:[]})||this}return o(e,t),e.prototype.get=function(){return i(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return this.service.session.webApplicationConfiguration?[2,this.service.session.webApplicationConfiguration]:(t=this.service.session,[4,this.service.routeGenerator.get("/web_application_configurations/").withExtractor((function(t){return t.web_application_configuration})).setException("Could not fetch web_application_configuration").invoke()]);case 1:return t.webApplicationConfiguration=e.sent(),[2,this.service.session.webApplicationConfiguration]}}))}))},e}(u.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(415),u=function(){function t(t){this.fleetsEntity=new s.default(t)}return t.prototype.getAll=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fleetsEntity.getAll()];case 1:return[2,t.sent()]}}))}))},t.prototype.getById=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fleetsEntity.getById(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getByTask=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fleetsEntity.getByTask(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.askForQuote=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fleetsEntity.askForQuote(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getAllConfigs=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fleetsEntity.getAllConfigs()];case 1:return[2,t.sent()]}}))}))},t.prototype.create=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fleetsEntity.create(r({type:t},e))];case 1:return[2,n.sent()]}}))}))},t.prototype.update=function(t,e){return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fleetsEntity.update(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fleetsEntity.delete(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.quoteExtractor=e.fleetsExtractor=e.Routes=void 0;var u=n(9),a=n(5);e.Routes={GET_RELATED:"/fleets/related",ASK_QUOTE:"/fleets/ask_quote",GET_ALL_CONFIGS:"/fleets/get_all_configs"};var c=function(t){function n(e){return t.call(this,{session:e,entityName:"fleets",routes:[a.BaseRoutes.GetAll,a.BaseRoutes.Create,a.BaseRoutes.Update,a.BaseRoutes.Delete]})||this}return o(n,t),n.prototype.getAll=function(){return this.getAllOrFetch(null,e.fleetsExtractor,e.fleetsExtractor)},n.prototype.getById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return this.isAllFetched?[3,2]:[4,this.getAll()];case 1:e.sent(),e.label=2;case 2:return[2,this.store.getItem(t)]}}))}))},n.prototype.getByTask=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(e.Routes.GET_RELATED).withExtractor(e.fleetsExtractor).setException("Failed to get related fleet").withPayload({task_id:t}).invoke()];case 1:return[2,n.sent()]}}))}))},n.prototype.askForQuote=function(t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,this.service.routeGenerator.post(e.Routes.ASK_QUOTE).withExtractor(e.quoteExtractor).setException("Failed to get fleet quote").withPayload({task_id:t,fleet_id:n}).invoke()]}))}))},n.prototype.getAllConfigs=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(e.Routes.GET_ALL_CONFIGS).invoke()]}))}))},n}(u.default);e.default=c;e.fleetsExtractor=function(t){return t.fleets};e.quoteExtractor=function(t){return t.result}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(417),s=function(){function t(t){this.rulesEntity=new i.default(t)}return t.prototype.getMetadata=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.rulesEntity.getMetadata(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getRules=function(t,e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.rulesEntity.getRules(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.saveRules=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.rulesEntity.saveRules(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(9),a=n(5);e.Routes={GET_RULES:"/rule-service/rules",GET_METADATA:"/rule-service/metadata",POST_RULES:"/rule-service/rules"};var c=function(t){function n(e){return t.call(this,{session:e,entityName:"rules",routes:[a.BaseRoutes.GetAll,a.BaseRoutes.Create,a.BaseRoutes.Delete]})||this}return o(n,t),n.prototype.getMetadata=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.get(e.Routes.GET_METADATA).withQueryString(t).invoke()]}))}))},n.prototype.getRules=function(t,n,r){return i(this,void 0,void 0,(function(){return s(this,(function(o){return[2,this.service.routeGenerator.get(e.Routes.GET_RULES).withQueryString({category_id:t,entity:n,entity_id:r}).invoke()]}))}))},n.prototype.saveRules=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.patch(e.Routes.POST_RULES).withPayload(t).invoke()]}))}))},n}(u.default);e.default=c},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(419),s=function(){function t(t){this.pushTokenSubscriptionEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.pushTokenSubscriptionEntity.service.create(t)]}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.pushTokenSubscriptionEntity.service.delete(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"push_token_subscriptions",routes:[i.BaseRoutes.Create,i.BaseRoutes.Delete]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(74),o=n(421),i=n(101),s=function(){function t(t){var e=this;this.unsubscribe=function(){e.taskEntity.store.unsubscribe()},this.onUpdate=function(t){return e.taskEntity.registerOnUpdate(t)},this.onCreate=function(t){return e.taskEntity.registerOnCreate(t)},this.onDelete=function(t){return e.taskEntity.registerOnDelete(t)},this.onWayPointUpdate=function(t){e.taskEntity.registerOnWayPointUpdate(t)},this.onWayPointAdd=function(t){e.taskEntity.registerOnWayPointAdded(t)},this.onWayPointDelete=function(t){e.taskEntity.registerOnWayPointDeleted(t)},this.taskEntity=new o.default(t)}return t.prototype.getOpenTasks=function(t){return this.taskEntity.getOpenTasks(t)},t.prototype.getOpenTasksKeySetPagination=function(t){return this.taskEntity.getOpenTasksKeySetPagination(t)},t.prototype.getInvalidTasks=function(){return this.taskEntity.getInvalidTasks()},t.prototype.updatePriorities=function(t){return this.taskEntity.updatePriorities(t)},t.prototype.getPlanningTasks=function(t){return this.taskEntity.getPlanningTasks(t)},t.prototype.update=function(t,e){return this.taskEntity.update(t,e,r.defaultExtractor,r.taskExtractor)},t.prototype.finish=function(t){return this.taskEntity.finish(t)},t.prototype.cancel=function(t){return this.taskEntity.cancel(t)},t.prototype.acknowledge=function(t){return this.taskEntity.acknowledge(t)},t.prototype.get=function(t){return this.taskEntity.get(t)},t.prototype.forceGet=function(t){return this.taskEntity.forceGet(t)},t.prototype.batchGet=function(t){return this.taskEntity.batchGet(t)},t.prototype.massAssign=function(t,e,n,r){return this.taskEntity.massAssign(t,e,n,r)},t.prototype.getChildTasks=function(t){return this.taskEntity.getChildTasks(t)},t.prototype.massUnassign=function(t,e){return this.taskEntity.massUnassign(t,e)},t.prototype.moveToPlanning=function(t){return this.taskEntity.moveToPlanning(t)},t.prototype.releaseToDrivers=function(t){return this.taskEntity.releaseToDrivers(t)},t.prototype.create=function(t){return this.taskEntity.create(t)},t.prototype.massCancel=function(t,e,n,r){return this.taskEntity.massCancel(t,e,n,r)},t.prototype.closedSince=function(t){return this.taskEntity.closedSince(t)},t.prototype.updatePreparationStatus=function(t,e){return this.taskEntity.updatePreparationStatus(t,e)},t.prototype.cancelAllOpen=function(){return this.taskEntity.cancelAllOpen()},t.prototype.closedTaskByQuery=function(t,e,n){return this.taskEntity.closedTaskByQuery(t,e,n)},t.prototype.activityLog=function(t){return this.taskEntity.activityLog(t)},t.prototype.changeTeam=function(t,e){return this.taskEntity.changeTeam(t,e)},t.prototype.getLocations=function(t){return this.taskEntity.getLocations(t)},t.prototype.submitForm=function(t){return this.taskEntity.submitForm(t)},t.prototype.lock=function(t){return this.taskEntity.lock(t)},t.prototype.unlock=function(t){return this.taskEntity.unlock(t)},t.prototype.duplicate=function(t){return this.taskEntity.duplicate(t)},t.prototype.rescheduleCancelled=function(t){return this.taskEntity.rescheduleCancelled(t)},t.prototype.rescheduleVirtualTasks=function(t,e,n){return this.taskEntity.rescheduleVirtualTasks(t,e,n)},t.prototype.getPickupQRCode=function(t){return this.taskEntity.getPickupQRCode(t)},t.prototype.getTaskNotesByWayPoint=function(t,e){return this.taskEntity.getTaskNotesByWayPoint(t,e)},t.prototype.getTaskInventoriesByWayPoint=function(t,e){return this.taskEntity.getTaskInventoriesByWayPoint(t,e)},t.prototype.importTasksCsv=function(t){return this.taskEntity.importTasksCsv(t)},t.prototype.broadcastToDrivers=function(t,e,n){return this.taskEntity.broadcastToDrivers(t,e,n)},t.prototype.addTaskNote=function(t,e,n,r,o){return this.taskEntity.addTaskNote(t,e,n,r,o)},t.prototype.deleteWayPoint=function(t,e){return this.taskEntity.deleteWayPoint(t,e)},t.prototype.attachSubscriptions=function(){this.taskEntity.attachSubscriptions()},t.prototype.subscribeToGroupUpdates=function(t){this.taskEntity.subscribeToGroupUpdates(t)},t.prototype.getOpenTasksIds=function(){return this.taskEntity.getOpenTasksIds()},t.prototype.getPlanningTasksIds=function(){return this.taskEntity.getPlanningTasksIds()},t.prototype.getClosedTasksIds=function(){return this.taskEntity.getClosedTasksIds()},t.prototype.getGeneralTasksIds=function(){return this.taskEntity.getGeneralTasksIds()},t.prototype.getInvalidTasksIds=function(){return this.taskEntity.getInvalidTasksIds()},t.isReadyToExecute=i.TaskHelpers.isReadyToExecute,t.isActive=i.TaskHelpers.isTaskInOpenState,t.isDone=i.TaskHelpers.isDone,t.isGroupFollower=i.TaskHelpers.isGroupFollower,t.isUnacknowledged=i.TaskHelpers.isUnacknowledged,t.isLate=i.TaskHelpers.isLate,t.isInOpenState=i.TaskHelpers.isInOpenState,t.isInPlanningState=i.TaskHelpers.isInPlanningState,t.isInClosedState=i.TaskHelpers.isInClosedState,t.isInvalid=i.TaskHelpers.isInvalid,t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},a=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(e,"__esModule",{value:!0});var c=n(9),l=n(64),f=n(5),p=n(74),h=n(75),d=n(65),y=n(11),v=n(101),_=n(103),b=function(t){function e(e,n){var r=t.call(this,{session:e,entityName:"tasks",routes:[f.BaseRoutes.Create,f.BaseRoutes.Get,f.BaseRoutes.Update]})||this;return r.groupUpdateEvents=[],r.groupedValues=new Map,r.registerOnWayPointUpdate=function(t){r.realTime.on(p.TaskRealTimeEvents.WAYPOINT_UPDATED,t)},r.registerOnWayPointAdded=function(t){r.realTime.on(p.TaskRealTimeEvents.WAYPOINT_ADDED,t)},r.registerOnWayPointDeleted=function(t){r.realTime.on(p.TaskRealTimeEvents.WAYPOINT_DELETED,t)},r.onUpdateTask=function(t){r.updateTask(t)},r.onNewTaskAdded=function(t){r.addOrUpdateTask(t),r.onCreate(r.store.getItem(t.id))},r.onTaskDelete=function(t){var e=r.store.getItem(t.id);e&&(r.store.removeFromStore(e.id),r.onDelete(e))},r.onWayPointAdded=function(t){var e=r.store.getItem(t.task_id);e&&(e.way_points.push(t),e.way_points=y.sortBy(e.way_points,"position"),r.updateTask(e))},r.onWayPointDeleted=function(t){var e=r.store.getItem(t.task_id);e&&(y.remove(e.way_points,(function(e){return e.id===t.id})),r.updateTask(e))},r.onWayPointUpdate=function(t){var e=r.store.getItem(t.task_id);if(e){var n=y.find(e.way_points,(function(e){return e.id==t.id}));y.merge(n,t),r.updateTask(e)}},r.onNewScanAdded=function(t){var e=r.store.getItem(t.task_id);e&&(e.scans.push(t),r.updateTask(e))},r.onNewNoteAdded=function(t){var e=r.store.getItem(t.task_id);e&&(y.find(e.task_notes,{id:t.id})||(e.task_notes||(e.task_notes=[]),e.task_notes.push(t),r.updateTask(e)))},r.handleTasksRequest=function(t,e){return s(r,void 0,void 0,(function(){var n,r,o,i=this;return u(this,(function(s){switch(s.label){case 0:return n=this.service.routeGenerator.get(t).withExtractor(p.defaultExtractor).setException("failed to fetch "+t+" tasks"),e&&n.withQueryString(e),[4,n.invoke()];case 1:return r=s.sent(),o=[],r.forEach((function(t){var e=i.addOrUpdateTask(t);e&&o.push(e)})),[2,o]}}))}))},r.handleTasksKeySetPaginationRequest=function(t,e){return s(r,void 0,void 0,(function(){var n,r,o,s,a,c,l=this;return u(this,(function(u){switch(u.label){case 0:return n={pgver:_.KEYSET_PAGINATION_VER},e&&(n=i(i({},e),n)),[4,this.service.routeGenerator.get(t).withQueryString(n).withExtractor((function(t){return{next_page_cursor:t.next_page_cursor,previous_page_cursor:t.previous_page_cursor,tasks:t.items}})).setException("failed to fetch "+t+" tasks").invoke()];case 1:return r=u.sent(),o=r.tasks,s=r.next_page_cursor,a=r.previous_page_cursor,c=[],o.forEach((function(t){var e=l.addOrUpdateTask(t);e&&c.push(e)})),[2,{next_page_cursor:s,previous_page_cursor:a,tasks:c}]}}))}))},r.shouldAddTask=function(t){return!v.TaskHelpers.isGroupFollower(t)},r.sendRealTimeTaskUpdate=function(t){r.onUpdate(r.store.getItem(t.id))},r.updateTask=function(t){var e=r.addOrUpdateTask(t);e&&r.sendRealTimeTaskUpdate(e)},r.addOrUpdateTask=function(t){if(r.shouldAddTask(t))return r.storeItem(t),r.store.getItem(t.id)},r.importTasksCsv=function(t){var e=new FormData;return e.append("file",t),r.service.routeGenerator.post(p.Routes.IMPORT_TASKS_CSV).withHeaders({"Content-Type":"multipart/form-data"}).withPayload(e).invoke()},r.broadcastToDrivers=function(t,e,n){return r.service.routeGenerator.post(p.Routes.BROADCAST_TO_DRIVERS).withPayload({task_id:t,user_ids:e,message:n}).setException("failed to broadcast to drivers task : "+t).invoke()},r.addTaskNote=function(t,e,n,o,i){return r.service.routeGenerator.post(p.Routes.CREATE_TASK_NOTE).withRouteParams({id:t,way_point_id:e}).withQueryString({note:n}).withPayload({type:o,image:i}).setException("failed to add note to task : "+t).withExtractor(p.taskExtractor).invoke()},r.deleteWayPoint=function(t,e){return r.service.routeGenerator.delete(p.Routes.DELETE_WAYPOINT).withRouteParams({id:t,way_point_id:e}).setException("failed to delete waypoint : task "+t+", waypoint "+e).invoke()},n=n||500,r.store.state$.pipe(d.throttleTime(n,h.asyncScheduler,{trailing:!0,leading:!1})).subscribe((function(t){h.from(t.values()).pipe(d.groupBy(p.taskToGroupMapper,(function(t){return t.id})),d.mergeMap((function(t){return h.zip(h.of(t.key),t.pipe(d.toArray()))}))).subscribe((function(t){var e=a(t,2),n=e[0],o=e[1];r.groupedValues.set(n,o),r.emitGroupEvents()}))})),r}return o(e,t),e.prototype.getGroupsCount=function(){return this.groupedValues.size},e.prototype.subscribeToGroupUpdates=function(t){this.groupUpdateEvents.push(t)},e.prototype.emitGroupEvents=function(){var t=this;this.groupUpdateEvents.forEach((function(e){return e(t.groupedValues)}))},e.prototype.getOpenTasksIds=function(){return this.groupedValues.get(p.GROUP_VALUES.Open)||[]},e.prototype.getPlanningTasksIds=function(){return this.groupedValues.get(p.GROUP_VALUES.Planning)||[]},e.prototype.getClosedTasksIds=function(){return this.groupedValues.get(p.GROUP_VALUES.Closed)||[]},e.prototype.getGeneralTasksIds=function(){return this.groupedValues.get(p.GROUP_VALUES.General)||[]},e.prototype.getInvalidTasksIds=function(){return this.groupedValues.get(p.GROUP_VALUES.Invalid)||[]},e.prototype.getChildTasks=function(t){return this.service.routeGenerator.get(p.Routes.GET_CHILD_TASKS).withExtractor(p.childTasksExtractor).withRouteParams({id:t}).setException("failed to get child tasks for task "+t).invoke()},e.prototype.getPickupQRCode=function(t){return this.service.routeGenerator.get(p.Routes.GET_PICKUP_QR_CODE).withExtractor(p.scanCodeExtractor).withRouteParams({id:t}).setException("failed to get QR code for task "+t).invoke()},e.prototype.rescheduleVirtualTasks=function(t,e,n){return this.service.routeGenerator.post(p.Routes.RESCHEDULE_VIRTUAL_TASKS).withExtractor(p.taskIdsExtractor).withPayload({task_ids:t,no_later_than:e,no_earlier_than:n}).setException("failed to get reschedule virtual tasks for tasks : ["+t.join(", ")+"]").invoke()},e.prototype.rescheduleCancelled=function(t){return this.service.routeGenerator.post(p.Routes.RESCHEDULE_CANCELED).withExtractor(p.successExtractor).withPayload({id:t}).setException("failed to reschedule cancelled task "+t).invoke()},e.prototype.unlock=function(t){return this.service.routeGenerator.post(p.Routes.UNLOCK_TASK).withExtractor(p.successExtractor).withPayload({task_ids:t}).setException("failed to unlock the tasks ["+t.join(", ")+"]").invoke()},e.prototype.lock=function(t){return this.service.routeGenerator.post(p.Routes.LOCK_TASK).withExtractor(p.successExtractor).withPayload({task_ids:t}).setException("failed to lock the tasks ["+t.join(", ")+"]").invoke()},e.prototype.duplicate=function(t){return this.service.routeGenerator.post(p.Routes.DUPLICATE_TASK).withExtractor(p.taskExtractor).withPayload({id:t}).setException("failed to duplicate task "+t).withRouteParams({id:t}).invoke()},e.prototype.submitForm=function(t){return this.service.routeGenerator.post(p.Routes.FORM_SUBMIT).withExtractor(p.formExtractor).withRouteParams({id:t.task_id,way_point_id:t.way_point_id}).withPayload(t).setException("failed to submit form").invoke()},e.prototype.getLocations=function(t){return this.service.routeGenerator.get(p.Routes.GET_TASK_LOCATIONS).withExtractor(p.locationExtractor).withRouteParams({id:t}).setException("failed to get location of the task "+t).invoke()},e.prototype.changeTeam=function(t,e){return this.service.routeGenerator.post(p.Routes.CHANGE_TASK_TEAM).withExtractor(p.successExtractor).withPayload({id:t,team_id:e}).setException("failed to change the team of task "+t).invoke()},e.prototype.activityLog=function(t){return this.service.routeGenerator.get(p.Routes.GET_TASK_ACTIVITY_LOG).withExtractor(p.defaultExtractor).withRouteParams({id:t}).setException("failed to get activity log for task "+t).invoke()},e.prototype.closedTaskByQuery=function(t,e,n){return this.service.routeGenerator.get(p.Routes.GET_CLOSED_TASKS_WITH_QUERY).withExtractor(p.defaultExtractor).withQueryString({query:t,page:e,limit:n}).setException("failed to get closed tasks with query "+t).invoke()},e.prototype.cancelAllOpen=function(){return this.service.routeGenerator.post(p.Routes.CANCEL_ALL_OPEN_TASKS).withExtractor(p.successExtractor).setException("failed to to cancel all open tasks").invoke()},e.prototype.updatePreparationStatus=function(t,e){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:return[4,this.service.routeGenerator.post(p.Routes.UPDATE_TASK_PREPARATION_STATUS).withExtractor(p.taskExtractor).setException("failed to update preparation status taskId: "+t+", status: "+e).withPayload({task_id:t,preparation_status:e}).invoke()];case 1:return n=r.sent(),[2,this.addOrUpdateTask(n)]}}))}))},e.prototype.closedSince=function(t){return s(this,void 0,void 0,(function(){var e,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.service.routeGenerator.get(p.Routes.GET_CLOSED_TASKS_SINCE_TIMESTAMP).withExtractor(p.defaultExtractor).setException("failed to fetched closed task").withQueryString({since:t}).invoke()];case 1:return(e=r.sent()).map((function(t){return n.addOrUpdateTask(t)})),[2,e]}}))}))},e.prototype.massCancel=function(t,e,n,r){return this.service.routeGenerator.post(p.Routes.MASS_TASK_CANCEL).withExtractor(p.successExtractor).setException("failed to cancel tasks ["+t.join(", ")+"]").withPayload({task_ids:t,reason:e,text:n,automatically_cancelled:r}).invoke()},e.prototype.releaseToDrivers=function(t){return this.service.routeGenerator.post(p.Routes.RELEASE_TASKS_TO_DRIVERS).withExtractor(p.successExtractor).setException("failed to release tasks ["+t.join(", ")+"] to drivers").withPayload({ids:t}).invoke()},e.prototype.moveToPlanning=function(t){return this.service.routeGenerator.post(p.Routes.MOVE_TASKS_TO_PLANNING).withExtractor(p.successExtractor).setException("failed to move tasks ["+t.join(", ")+"] to planning").withPayload({task_ids:t}).invoke()},e.prototype.massUnassign=function(t,e){return this.service.routeGenerator.post(p.Routes.MASS_TASK_UNASSIGN).withExtractor(p.successExtractor).setException("failed to unassign tasks "+t.join(", ")).withPayload({task_ids:t,options:e}).invoke()},e.prototype.massAssign=function(t,e,n,r){return this.service.routeGenerator.post(p.Routes.MASS_TASK_ASSIGN).withExtractor(p.successExtractor).setException("failed to assign tasks "+e.join(", ")+" to user "+t).withPayload({user_id:t,task_ids:e,options:n,target_run:r}).invoke()},e.prototype.batchGet=function(t){return s(this,void 0,void 0,(function(){var e,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.service.routeGenerator.get(p.Routes.BATCH_GET_TASK).withExtractor(p.tasksExtractor).setException("failed to fetch tasks ids - "+t.toString()).withQueryString({ids:t}).invoke()];case 1:return(e=r.sent()).map((function(t){return n.addOrUpdateTask(t)})),[2,e]}}))}))},e.prototype.get=function(t){return this.getOrFetch(t,p.defaultExtractor,p.defaultExtractor)},e.prototype.forceGet=function(t){return this.fetchAndStore(t,p.defaultExtractor,p.defaultExtractor)},e.prototype.acknowledge=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(p.Routes.ACKNOWLEDGE_TASK).withExtractor(p.taskExtractor).setException("failed to acknowledge task - "+t).withPayload({task_id:t}).invoke()];case 1:return e=n.sent(),[2,this.addOrUpdateTask(e)]}}))}))},e.prototype.cancel=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(p.Routes.CANCEL_TASK).withExtractor(p.defaultExtractor).setException("failed to cancel task - "+t).withRouteParams({id:t}).invoke()];case 1:return e=n.sent(),[2,this.addOrUpdateTask(e)]}}))}))},e.prototype.finish=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(p.Routes.FINISH_TASK).withExtractor(p.defaultExtractor).setException("failed to finish task - "+t).withRouteParams({id:t}).invoke()];case 1:return e=n.sent(),[2,this.addOrUpdateTask(e)]}}))}))},e.prototype.getPlanningTasks=function(t){return this.handleTasksRequest(p.Routes.GET_PLANNING_TASKS,t)},e.prototype.getOpenTasks=function(t){return this.handleTasksRequest(p.Routes.GET_OPEN_TASKS,t)},e.prototype.getOpenTasksKeySetPagination=function(t){return this.handleTasksKeySetPaginationRequest(p.Routes.GET_OPEN_TASKS,t)},e.prototype.getInvalidTasks=function(){return this.handleTasksRequest(p.Routes.GET_INVALID_TASKS)},e.prototype.updatePriorities=function(t){return this.service.routeGenerator.patch(p.Routes.UPDATE_TASKS_PRIORITIES).withExtractor(p.successExtractor).setException("failed to update priority of tasks "+t).withPayload({data:t}).invoke()},e.prototype.getTaskNotesByWayPoint=function(t,e){var n=this.store.getItem(t);return y.filter(n.task_notes,(function(t){return t.type===l.NoteType.TaskNote&&t.way_point_id===e}))},e.prototype.getTaskInventoriesByWayPoint=function(t,e){var n=this.store.getItem(t),r=y.filter(null==n?void 0:n.task_inventories,(function(t){return t.way_point_id===e}));return y.map(r,(function(t){return t.inventories=y.filter(r,(function(e){return e.parent_task_inventory_id==t.id})),t})).filter((function(t){return y.isNil(t.parent_task_inventory_id)}))},e.prototype.attachSubscriptions=function(){this.realTime.on(p.TaskRealTimeEvents.TASK_UPDATE,this.onUpdateTask),this.registerOnWayPointAdded(this.onWayPointAdded),this.registerOnWayPointUpdate(this.onWayPointUpdate),this.registerOnWayPointDeleted(this.onWayPointDeleted),this.realTime.on(p.TaskRealTimeEvents.NEW_SCAN,this.onNewScanAdded),this.realTime.on(p.TaskRealTimeEvents.NEW_NOTE,this.onNewNoteAdded),this.realTime.on(p.TaskRealTimeEvents.TASK_DELETED,this.onTaskDelete),this.realTime.on(p.TaskRealTimeEvents.NEW_TASK,this.onNewTaskAdded)},e}(c.default);e.default=b},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(423),s=function(){function t(t,e){this.entity=new i.default(t),this.merchantConfigurationApi=e}return t.prototype.getByAppId=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.getByAppId(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getByAppUuid=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.getByAppUuid(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.addApplicationById=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.addApplicationById(t)];case 1:return e=n.sent(),[4,this.merchantConfigurationApi.fetchConfiguration()];case 2:return n.sent(),[2,e]}}))}))},t.prototype.addApplicationByUuid=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.addApplicationByUuid(t)];case 1:return e=n.sent(),[4,this.merchantConfigurationApi.fetchConfiguration()];case 2:return n.sent(),[2,e]}}))}))},t.prototype.removeApplicationById=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.removeApplicationById(t)];case 1:return e.sent(),[4,this.merchantConfigurationApi.fetchConfiguration()];case 2:return e.sent(),[2]}}))}))},t.prototype.removeApplicationByUuid=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.removeApplicationByUuid(t)];case 1:return e.sent(),[4,this.merchantConfigurationApi.fetchConfiguration()];case 2:return e.sent(),[2]}}))}))},t.prototype.updateConfig=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.updateConfig(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getApplicationByUuid=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.getApplicationByUuid(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a="/merchant/applications",c={DELETE_APP_BY_UUID:a+"/no_id",GET_BY_ID:a+"/no_uuid"},l=function(t){function e(e){return t.call(this,{session:e,entityName:"applications",routePrefix:"merchant",routes:[u.BaseRoutes.Get,u.BaseRoutes.Update,u.BaseRoutes.Delete,u.BaseRoutes.Create]})||this}return o(e,t),e.prototype.addApplicationById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.create(t)];case 1:return[2,e.sent().application]}}))}))},e.prototype.addApplicationByUuid=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post(a).withExtractor((function(t){return t.application})).setException("could not add application").withPayload({uuid:t}).invoke()]}))}))},e.prototype.removeApplicationById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.delete(t)];case 1:return[2,e.sent().success]}}))}))},e.prototype.removeApplicationByUuid=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(c.DELETE_APP_BY_UUID).withExtractor((function(t){return t.success})).setException("could not remove application").withQueryString({uuid:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updateConfig=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.update(t,{data:e})];case 1:return[2,n.sent().success]}}))}))},e.prototype.getByAppId=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return(e=this.getAppConfigFromMerchantConfigurationByAppId(t))?[2,e]:[4,this.service.routeGenerator.get(c.GET_BY_ID).withExtractor((function(t){return t.config})).withQueryString({id:t}).setException("could not fetch application_merchant_configuration").invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getByAppUuid=function(t){return i(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return[4,this.getAppConfigFromMerchantConfigurationByUuid(t)];case 1:return(e=r.sent())?[2,e]:[4,this.service.get(t)];case 2:return[2,(n=r.sent())&&n.config]}}))}))},e.prototype.getAppConfigFromMerchantConfigurationByAppId=function(t){var e=this.service.session.merchantConfiguration;return e&&e.application_merchant_configurations?e.application_merchant_configurations.find((function(e){return e.application_id===t})):null},e.prototype.getAppConfigFromMerchantConfigurationByUuid=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,this.getApplicationByUuid(t)];case 1:return[2,(e=n.sent())&&this.getAppConfigFromMerchantConfigurationByAppId(e.id)]}}))}))},e.prototype.getApplicationByUuid=function(t){return i(this,void 0,void 0,(function(){var e;return s(this,(function(n){return(e=this.service.session.merchantConfiguration)&&e.applications?[2,e.applications.find((function(e){return e.uuid===t}))]:[2]}))}))},e}(u.default);e.default=l},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(425),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.getConfig=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.getConfig(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.updateConfig=function(t,e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.entity.updateConfig(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.removeConfig=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.removeConfig(t,e)];case 1:return[2,n.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=function(t){function e(e){return t.call(this,{session:e,entityName:"applications",routePrefix:"team",routes:[u.BaseRoutes.Get,u.BaseRoutes.Update,u.BaseRoutes.Delete,u.BaseRoutes.Create]})||this}return o(e,t),e.prototype.getConfig=function(t,e){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,this.service.get(t,{teamId:e})];case 1:return[2,(n=r.sent())&&n.config]}}))}))},e.prototype.updateConfig=function(t,e,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,this.service.update(t,{data:n,teamId:e})];case 1:return[2,r.sent().success]}}))}))},e.prototype.removeConfig=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.delete(t,{teamId:e})];case 1:return[2,n.sent().success]}}))}))},e}(u.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(427),o=function(){function t(t){this.googleMapsHelperEntity=new r.default(t)}return t.prototype.signUrl=function(t){return this.googleMapsHelperEntity.signUrl(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){return t.call(this,{session:e,entityName:"google_maps",routes:[]})||this}return o(e,t),e.prototype.signUrl=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/google_maps_helper/sign").withPayload({url:t}).withExtractor((function(t){return t})).setException("Failed to sign google maps api url").invoke()]}))}))},e}(n(5).default);e.default=u},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(429),s=function(){function t(t){this.onboardingEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.onboardingEntity.service.create({data:t})]}))}))},t.prototype.get=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.onboardingEntity.service.getAll()]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"merchant_onboarding",routes:[i.BaseRoutes.GetAll,i.BaseRoutes.Create]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(431),o=function(){function t(t){this.fleetRouterEntity=new r.default(t)}return t.prototype.getAll=function(){return this.fleetRouterEntity.service.getAll()},t.prototype.create=function(t){return this.fleetRouterEntity.service.create(t)},t.prototype.update=function(t,e){return this.fleetRouterEntity.service.update(t,e)},t.prototype.delete=function(t){return this.fleetRouterEntity.service.delete(t)},t.prototype.patch=function(t){return this.fleetRouterEntity.service.patch(void 0,t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),s=n(5),u=function(t){function e(e){return t.call(this,{session:e,entityName:"fleet_router",routeSuffix:"routing_rules",routes:[s.BaseRoutes.Create,s.BaseRoutes.Delete,s.BaseRoutes.Update,s.BaseRoutes.GetAll,s.BaseRoutes.Patch]})||this}return o(e,t),e}(i.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(433),o=n(434),i=n(435),s=function(){function t(t){this.alertConfigurationEntity=new r.default(t),this.configurationEntity=new o.default(t),this.alertSetEntity=new i.default(t)}return t.prototype.getAll=function(){return this.alertConfigurationEntity.service.getAll()},t.prototype.createSet=function(t){return this.alertSetEntity.service.create(t)},t.prototype.deleteSet=function(t){return this.alertSetEntity.service.delete(t)},t.prototype.updateSet=function(t,e){return this.alertSetEntity.service.patch(t,e)},t.prototype.createAlertConfiguration=function(t){return this.configurationEntity.service.create(t)},t.prototype.deleteAlertConfiguration=function(t){return this.configurationEntity.service.delete(t)},t.prototype.updateAlertConfiguration=function(t,e){return this.configurationEntity.service.patch(t,e)},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),s=n(5),u=function(t){function e(e){return t.call(this,{session:e,entityName:"alerts_configuration",routes:[s.BaseRoutes.Create,s.BaseRoutes.Delete,s.BaseRoutes.Update,s.BaseRoutes.GetAll,s.BaseRoutes.Patch]})||this}return o(e,t),e}(i.default);e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"configurations",routePrefix:"alerts_configuration",routes:[i.BaseRoutes.Patch,i.BaseRoutes.Delete,i.BaseRoutes.Create,i.BaseRoutes.Update]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"sets",routePrefix:"alerts_configuration",routes:[i.BaseRoutes.Patch,i.BaseRoutes.Delete,i.BaseRoutes.Create,i.BaseRoutes.Update]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(437),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.entity.getAll()];case 1:return[2,t.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=function(t){function e(e){return t.call(this,{session:e,entityName:"services_setup",routes:[u.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.getAll()];case 1:return[2,t.sent()]}}))}))},e}(u.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(439),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.update=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.update(t)]}))}))},t.prototype.getAvailableOpenFleets=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.entity.getAvailableFleets()];case 1:return[2,t.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.fleetTemplatesExtractor=e.Routes=void 0;var u=n(5);e.Routes={GET_AVAILABLE_FLEETS:"/fleet_templates/get_available_open_fleets"};var a=function(t){function n(e){return t.call(this,{session:e,entityName:"fleet_templates"})||this}return o(n,t),n.prototype.update=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.put("/fleet_templates/").setException("failed updating fleet_template").withPayload(t).invoke()]}))}))},n.prototype.getAvailableFleets=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get(e.Routes.GET_AVAILABLE_FLEETS).withExtractor(e.fleetTemplatesExtractor).setException("Failed to get available fleet").invoke()]}))}))},n}(u.default);e.default=a;e.fleetTemplatesExtractor=function(t){return t.available_fleets}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(441),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.get=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.get()]}))}))},t.prototype.update=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.update(t)]}))}))},t.prototype.createSandboxTask=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.entity.createSandboxTask()];case 1:return t.sent(),[2]}}))}))},t.prototype.getMerchantCredentials=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.entity.getMerchantCredentials(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.getAllMerchantsCredentials=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.entity.getAllMerchantsCredentials(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getAdminCredentials=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.entity.getAdminCredentials()];case 1:return[2,t.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=function(t){function e(e){return t.call(this,{session:e,entityName:"open_fleets",routes:[u.BaseRoutes.GetAll,u.BaseRoutes.Update]})||this}return o(e,t),e.prototype.get=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.getAll()]}))}))},e.prototype.update=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.put("/open_fleets/").setException("failed updating open_fleets").withPayload(t).invoke()]}))}))},e.prototype.createSandboxTask=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.post("/open_fleets/create_sandbox_task").setException("failed creating task for sandbox merchant").invoke()];case 1:return t.sent(),[2]}}))}))},e.prototype.getMerchantCredentials=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.get("/open_fleets/get_merchant_credentials").withQueryString({template_uuid:t,merchant_uuid:e}).setException("failed getting merchant credentials").invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getAllMerchantsCredentials=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get("/open_fleets/get_all_merchants_credentials").withQueryString({template_uuid:t}).setException("failed getting merchants credentials").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAdminCredentials=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.get("/open_fleets/get_admin_credentials").setException("failed getting open fleet admin credentials").invoke()];case 1:return[2,t.sent()]}}))}))},e}(u.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(443),o=function(){function t(t){this.geocodingEntity=new r.default(t)}return t.prototype.autoComplete=function(t){return this.geocodingEntity.autoComplete(t)},t.prototype.getPlaceDetails=function(t){return this.geocodingEntity.getPlaceDetails(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(5);e.Routes={AUTO_COMPLETE:"/api/geocoder/auto_complete",GET_PLACE_DETAILS:"/api/geocoder/place_details"};var a=function(t){function n(e){return t.call(this,{session:e,entityName:"/api/geocoder"})||this}return o(n,t),n.prototype.autoComplete=function(t){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){return n={address:t},[2,this.service.routeGenerator.post(e.Routes.AUTO_COMPLETE).withPayload(n).setException("Failed to get address autocomplete").invoke()]}))}))},n.prototype.getPlaceDetails=function(t){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){return n={place_id:t},[2,this.service.routeGenerator.post(e.Routes.GET_PLACE_DETAILS).withPayload(n).setException("Failed to get place details").invoke()]}))}))},n}(u.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(445),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.executeAction=function(t,e,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.entity.executeAction(t,e,n)];case 1:return[2,r.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(9),c=n(499),l=n(11),f=function(t){function e(e){return t.call(this,{session:e,entityName:"application_action"})||this}return o(e,t),e.prototype.executeAction=function(t,e,n){return void 0===n&&(n={}),s(this,void 0,void 0,(function(){var r,o,s;return u(this,(function(u){switch(u.label){case 0:r=c.v4(),o="application action done ["+r+"]",l.defaults(n,{timeout:1e4}),u.label=1;case 1:return u.trys.push([1,,4,5]),s=this.waitForResultFromRealtime(o),[4,this.createApplicationAction({action_name:t,data:i(i({},e),{deadline:Date.now()+n.timeout}),uuid:r})];case 2:return u.sent(),[4,Promise.race([s,this.asyncTimeout(n.timeout)])];case 3:return[2,u.sent()];case 4:return this.realTime.off(o),[7];case 5:return[2]}}))}))},e.prototype.waitForResultFromRealtime=function(t){return s(this,void 0,void 0,(function(){var e=this;return u(this,(function(n){return[2,new Promise((function(n,r){e.realTime.on(t,(function(t){t.success?n(t.data):r(new Error(t.error))}))}))]}))}))},e.prototype.createApplicationAction=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post("/application_action/create").withExtractor((function(t){return t.uuid})).setException("could not execute action").withPayload(t).invoke()];case 1:return e.sent(),[2]}}))}))},e.prototype.asyncTimeout=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){return setTimeout(e,t)}))];case 1:throw e.sent(),new Error("timeout")}}))}))},e}(a.default);e.default=f},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(447),s=function(){function t(t){this.customerAvailabilityHourEntity=new i.default(t)}return t.prototype.getTaskCustomerAvailabilityHours=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.customerAvailabilityHourEntity.getTaskCustomerAvailabilityHours(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(9);e.Routes={GET_AVAILABILITY_HOURS:"/customer_availability_hours"};var a=function(t){function n(e){var n=t.call(this,{session:e,entityName:"customer_availability_hours"})||this;return n.taskCustomerAvailabilityHours=new Map,n}return o(n,t),n.prototype.getTaskCustomerAvailabilityHours=function(t){return i(this,void 0,void 0,(function(){var e,n,r,o=this;return s(this,(function(i){switch(i.label){case 0:return e=this._getKey(t.customer_id,t.task_id),this.taskCustomerAvailabilityHours.has(e)?[2,this.taskCustomerAvailabilityHours.get(e).map((function(t){return o.store.getItem(t)}))]:[4,this._getTaskCustomerAvailabilityHours(t)];case 1:return(n=i.sent()).forEach((function(t){return o.store.addToStore(t)})),r=n.map((function(t){return t.id})),this.taskCustomerAvailabilityHours.set(this._getKey(t.customer_id,t.task_id),r),[2,n]}}))}))},n.prototype._getTaskCustomerAvailabilityHours=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.get(e.Routes.GET_AVAILABILITY_HOURS).withQueryString(t).withExtractor((function(t){return t.availability_hours})).invoke()]}))}))},n.prototype._getKey=function(t,e){return"customer_id:"+t+":task_id:"+e},n}(u.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(449),o=function(){function t(t){this.shiftsEntity=new r.default(t)}return t.prototype.getShifts=function(t){return this.shiftsEntity.getShifts(t)},t.prototype.updateShifts=function(t,e){return this.shiftsEntity.updateShifts(t,e)},t.prototype.getBreaks=function(t){return this.shiftsEntity.getBreaks(t)},t.prototype.updateBreaks=function(t,e){return this.shiftsEntity.updateBreaks(t,e)},t.prototype.startShift=function(t,e){return this.shiftsEntity.startShift(t,e)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=function(t){function e(e){return t.call(this,{session:e,entityName:"shifts"})||this}return o(e,t),e.prototype.getShifts=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.get("/teams/"+t+"/shifts_schedule/").setException("Failed to get shifts schedule").invoke()]}))}))},e.prototype.updateShifts=function(t,e){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){return n={id:t,configuration:e},[2,this.service.routeGenerator.put("/teams/"+t+"/shifts_schedule").withPayload(n).setException("Failed update shifts schedule").invoke()]}))}))},e.prototype.getBreaks=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.get("/teams/"+t+"/scheduled_breaks/").setException("Failed to get shifts breaks").invoke()]}))}))},e.prototype.updateBreaks=function(t,e){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){return n={id:t,configuration:e},[2,this.service.routeGenerator.put("/teams/"+t+"/scheduled_breaks").withPayload(n).setException("Failed update shift breaks").invoke()]}))}))},e.prototype.startShift=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.service.routeGenerator.post("/users/"+t+"/shift").withPayload({active_team_id:e}).setException("Failed start user shift").invoke()]}))}))},e}(n(5).default);e.default=u},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(451),s=function(){function t(t){this.exclusionWindowEntity=new i.default(t)}return t.prototype.getAll=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.exclusionWindowEntity.service.getAll({team_id:t})]}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.exclusionWindowEntity.service.create(t)]}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.exclusionWindowEntity.service.update(t,e)]}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.exclusionWindowEntity.service.delete(t)]}))}))},t.prototype.copyFromMerchant=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.exclusionWindowEntity.copyFromMerchant(t,e)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var u=n(5);e.Routes={COPY_FROM_MERCHANT:"/merchant/exclusion_windows/copy_from_merchant"};var a=function(t){function n(e){return t.call(this,{session:e,entityName:"exclusion_windows",routePrefix:"merchant",routes:[u.BaseRoutes.GetAll,u.BaseRoutes.Create,u.BaseRoutes.Update,u.BaseRoutes.Delete]})||this}return o(n,t),n.prototype.copyFromMerchant=function(t,n){return i(this,void 0,void 0,(function(){return s(this,(function(r){return[2,this.service.routeGenerator.post(e.Routes.COPY_FROM_MERCHANT).withQueryString({team_id:t,id:n}).setException("Failed to copy exclusion windows from merchant").withExtractor((function(t){return t.exclusion_windows})).invoke()]}))}))},n}(u.default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GET_COUNTRIES=void 0;var r=n(91),o=n(67),i=n(15),s=n(47),u=n(61),a=n(19),c=n(68);e.GET_COUNTRIES=new a.Route("/countries",0);var l=function(){function t(){}return t.getCountries=function(){return new r.AnonymousServiceRequest(u.BringgDashboardSDK.configurationProvider.getClientId()).invoke(c.default.parse(u.BringgDashboardSDK.configurationProvider.getRegionDiscoveryEndpoint()),e.GET_COUNTRIES,null,null).handle((function(t){var e=t.data;if(t.status!==o.HttpStatusCode.OK||!e.success)throw r.logErrorResponse(t),new i.BringgException(s.ExceptionReason.fromHttpStatusCode(o.HttpStatusCode.BAD_REQUEST),"Unable to get countries");return e.data}))},t}();e.default=l},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(454),s=function(){function t(t){this.entity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.service.getAll()]}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.service.create(t)]}))}))},t.prototype.destroy=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.service.delete(t)]}))}))},t.prototype.enable=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.enable(t)]}))}))},t.prototype.disable=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.disable(t)]}))}))},t.prototype.renew=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.entity.renew(t)]}))}))},t.prototype.getAllEndpointsHierarchy=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.entity.getAllEndpointsHierarchy()]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a="/oauth/applications",c=function(t){function e(e){return t.call(this,{session:e,entityName:a,routes:[u.BaseRoutes.Create,u.BaseRoutes.Delete,u.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.enable=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/"+a+"/enable/{:id}").setException("failed to enable oauth application").withRouteParams({id:t}).invoke()]}))}))},e.prototype.disable=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/"+a+"/disable/{:id}").setException("failed to disable oauth application").withRouteParams({id:t}).invoke()]}))}))},e.prototype.renew=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.service.routeGenerator.post("/"+a+"/renew/{:id}").setException("failed to renew oauth application").withRouteParams({id:t}).invoke()]}))}))},e.prototype.getAllEndpointsHierarchy=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.service.routeGenerator.get("/"+a+"/get_all_endpoints_hierarchy").setException("failed to get all oauth application endpoints").invoke()]}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(456),o=function(){function t(t){this.inventory=new r.default(t)}return t.prototype.get=function(t){return this.inventory.service.get(t)},t.prototype.create=function(t){return this.inventory.service.create(t)},t.prototype.update=function(t,e){return this.inventory.service.update(t,e)},t.prototype.delete=function(t){return this.inventory.service.delete(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"inventories",routes:[i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete,i.BaseRoutes.Get]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(458),s=function(){function t(t){this.pushNotificationRegistrationEntity=new i.default(t)}return t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.pushNotificationRegistrationEntity.service.create(t)]}))}))},t.prototype.remove=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.pushNotificationRegistrationEntity.service.delete(t,{unique_device_id:t})]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"push_registrations",routes:[i.BaseRoutes.Create,i.BaseRoutes.Delete]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(460),s=function(){function t(t){this.reasonToCancelTasksEntity=new i.default(t)}return t.prototype.getAll=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.reasonToCancelTasksEntity.getAll(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),s=n(5),u=function(t){return t.reasons_to_cancel_task},a=function(t){function e(e){return t.call(this,{session:e,entityName:"reason_to_cancel_tasks",routes:[s.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getAll=function(t){return this.service.routeGenerator.get("/reason_to_cancel_tasks").withExtractor(u).withQueryString({tag:t}).setException("Could not fetch delivery for reasons get cancel task tag id #"+t).invoke()},e}(i.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(462),s=function(){function t(t){this.customFilterEntity=new i.default(t)}return t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.customFilterEntity.service.getAll()]}))}))},t.prototype.create=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.customFilterEntity.service.create(t)]}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.customFilterEntity.service.update(t,e)]}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.customFilterEntity.service.delete(t)]}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"custom_filters",routePrefix:"merchant",routes:[i.BaseRoutes.GetAll,i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete]})||this}return o(e,t),e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(464),o=function(){function t(t){this.floatingInventory=new r.default(t)}return t.prototype.getUsersWithAvailableFloatingInventory=function(t){return this.floatingInventory.getUsersWithAvailableFloatingInventory(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=n(465),u=function(t){function e(e){return t.call(this,{session:e,entityName:"floating_inventories"})||this}return o(e,t),e.prototype.getUsersWithAvailableFloatingInventory=function(t){return this.service.routeGenerator.get("/floating_inventories/users_with_available_floating_inventory").withExtractor(s.userIdsExtractor).setException("failed to get available users for dispatch for task ["+t+"]").withQueryString({task_id:t}).invoke()},e}(i.default);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.userIdsExtractor=void 0;e.userIdsExtractor=function(t){return t.user_ids}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(467),o=function(){function t(t){this.serviceAreaEntity=new r.default(t)}return t.prototype.getAll=function(t){return this.serviceAreaEntity.service.getAll(t)},t.prototype.create=function(t){return this.serviceAreaEntity.service.create(t)},t.prototype.update=function(t,e){return this.serviceAreaEntity.service.update(t,e)},t.prototype.assign=function(t,e){return this.serviceAreaEntity.assign(t,e)},t.prototype.unassign=function(t){return this.serviceAreaEntity.unassign(t)},t.prototype.delete=function(t){return this.serviceAreaEntity.service.delete(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),s=function(t){function e(e){return t.call(this,{session:e,entityName:"service_areas",routes:[i.BaseRoutes.GetAll,i.BaseRoutes.Create,i.BaseRoutes.Update,i.BaseRoutes.Delete]})||this}return o(e,t),e.prototype.assign=function(t,e){return this.service.routeGenerator.put("/"+this.service.entityName+"/"+t+"/assign").withRouteParams({serviceAreaId:t}).withPayload(e).invoke()},e.prototype.unassign=function(t){return this.service.routeGenerator.put("/"+this.service.entityName+"/unassign_user").withPayload(t).invoke()},e}(i.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(469),o=function(){function t(t){this.billingEntity=new r.default(t)}return t.prototype.getTasks=function(t){return this.billingEntity.getAllTasks(t)},t.prototype.getOrders=function(t){return this.billingEntity.getOrders(t)},t.prototype.getAggregatedTasks=function(t){return this.billingEntity.getAggregatedTasks(t)},t.prototype.getAggregatedTasksV2=function(t){return this.billingEntity.getAggregatedTasksV2(t)},t.prototype.getRefunds=function(t){return this.billingEntity.getRefunds(t)},t.prototype.getOrdersReport=function(t){return this.billingEntity.getOrdersReport(t)},t.prototype.getRefundsReport=function(t){return this.billingEntity.getRefundsReport(t)},t.prototype.getAggregatedByDaysTasksV2=function(t){return this.billingEntity.getAggregatedByDaysTasksV2(t)},t.prototype.getFleets=function(t){return this.billingEntity.getAllFleets(t)},t.prototype.getTeams=function(t){return this.billingEntity.getAllTeams(t)},t.prototype.getFleetsV3=function(t){return this.billingEntity.getAllFleetsV3(t)},t.prototype.getTeamsV3=function(t){return this.billingEntity.getAllTeamsV3(t)},t.prototype.postDispute=function(t){return this.billingEntity.postDispute(t)},t.prototype.getDisputesByTaskIds=function(t){return this.billingEntity.getDisputesByTaskIds(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u,a=n(5);!function(t){t.v1="v1",t.v2="v2",t.v3="v3"}(u||(u={}));var c="/billing-service",l={GET_TASKS:c+"/"+u.v1+"/tasks",GET_AGGREGATED_TASKS:c+"/"+u.v1+"/aggregated",GET_ORDERS:c+"/"+u.v2+"/billingData",GET_AGGREGATED_TASKS_V2:c+"/"+u.v2+"/billingData/aggregated",GET_ORDERS_REPORT:c+"/"+u.v2+"/billingData/report",GET_AGGREGATED_TASKS_BY_DAYS:c+"/"+u.v2+"/billingData/aggregatedByDays",GET_REFUNDS:c+"/"+u.v2+"/billingData/refunds",GET_REFUNDS_REPORT:c+"/"+u.v2+"/billingData/refunds/report",GET_FLEETS:c+"/"+u.v1+"/fleets",GET_FLEETS_V3:c+"/"+u.v3+"/fleets",GET_TEAMS:c+"/"+u.v1+"/teams",GET_TEAMS_V3:c+"/"+u.v3+"/teams",POST_DISPUTE:c+"/"+u.v1+"/dispute",GET_DISPUTES_BY_TASK_IDS:c+"/"+u.v1+"/dispute/getByTaskIds"},f=function(t){function e(e){return t.call(this,{session:e,entityName:"billing-service"})||this}return o(e,t),e.prototype.getAllTasks=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(l.GET_TASKS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getOrders=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_ORDERS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAggregatedTasks=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(l.GET_AGGREGATED_TASKS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAggregatedTasksV2=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_AGGREGATED_TASKS_V2).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getOrdersReport=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_ORDERS_REPORT).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getRefundsReport=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_REFUNDS_REPORT).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAggregatedByDaysTasksV2=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_AGGREGATED_TASKS_BY_DAYS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getRefunds=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_REFUNDS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAllFleets=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(l.GET_FLEETS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAllFleetsV3=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_FLEETS_V3).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAllTeams=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(l.GET_TEAMS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAllTeamsV3=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_TEAMS_V3).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.postDispute=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.POST_DISPUTE).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getDisputesByTaskIds=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_DISPUTES_BY_TASK_IDS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e}(a.default);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(471),o=function(){function t(t){this.packageEntity=new r.default(t)}return t.prototype.getPackageById=function(t){return this.packageEntity.getPackageById(t)},t.prototype.getAllTaskPackages=function(t){return this.packageEntity.getAllTaskPackages(t)},t.prototype.deletePackage=function(t){return this.packageEntity.deletePackage(t)},t.prototype.createPackage=function(t){return this.packageEntity.createPackage(t)},t.prototype.updatePackage=function(t){return this.packageEntity.updatePackage(t)},t.prototype.upsertPackage=function(t){return this.packageEntity.upsertPackage(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=n(472),c=function(t){function e(e){return t.call(this,{session:e,entityName:"package"})||this}return o(e,t),e.prototype.getPackageById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(a.Routes.GET).withQueryString(t).setException("failed to get package").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getAllTaskPackages=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(a.Routes.GET_ALL_TASK_PACKAGES).withQueryString(t).setException("failed to get all task packages").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.deletePackage=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(a.Routes.GET).withQueryString(t).setException("failed to delete package").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.createPackage=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(a.Routes.GET).withPayload(t).setException("failed to create package").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updatePackage=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.patch(a.Routes.GET).withPayload(t).setException("failed to update package").invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.upsertPackage=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(a.Routes.UPSERT).withPayload(t).setException("failed to upsert package").invoke()];case 1:return[2,e.sent()]}}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;var r="/package-service/v1/package";e.Routes={GET:""+r,GET_ALL_TASK_PACKAGES:r+"/getAllTaskPackages",UPSERT:r+"/upsert"}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(474),s=n(477),u=function(){function t(t){this.session=t,this.userAnalytics=new i.default}return t.prototype.addSnippet=function(t){var e=t.apiKey;return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.userAnalytics.addSnippet({apiKey:e})];case 1:return[2,t.sent()]}}))}))},t.prototype.run=function(){return r(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:if(!(t=this.session.user.admin&&s.Role.ADMIN||this.session.user.dispatcher&&s.Role.DISPATCHER||this.session.user.driver&&s.Role.DRIVER||void 0))throw new Error("Invalid analytics user role");return[4,this.userAnalytics.run({user:{id:this.session.user.id,name:this.session.user.name,email:this.session.user.email,role:t,isImpersonated:"undefined"!=typeof localStorage&&Boolean(localStorage.getItem("ls.impersonate_original_user"))},merchant:{id:this.session.merchant.id,name:this.session.merchant.name,environment:this.session.user.region,isBringgAccount:1===this.session.merchant.id}})];case 1:return[2,e.sent()]}}))}))},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(475);e.default=class{constructor(){this.provider=new r.PendoProvider}async addSnippet(t){return await this.provider.addSnippet(t)}async run(t){return await this.provider.run(t)}async trackEvent(t){return await this.provider.trackEvent(t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PendoProvider=void 0;const r=n(476);e.PendoProvider=class{async addSnippet({apiKey:t}){(0,r.addSnippet)(t)}async run({user:t,merchant:e}){if("undefined"==typeof pendo)throw new Error("Pendo global is not defined");pendo.initialize({visitor:t,account:e})}async trackEvent({key:t,data:e}){pendo.track(t,e)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addSnippet=void 0;e.addSnippet=t=>{!function(e,n,r,o,i){var s,u,a,c,l;for((i=e[o]=e[o]||{})._q=i._q||[],u=0,a=(s=["initialize","identify","updateOptions","pageLoad","track"]).length;u<a;++u)!function(t){i[t]=i[t]||function(){i._q[t===s[0]?"unshift":"push"]([t].concat([].slice.call(arguments,0)))}}(s[u]);(c=n.createElement(r)).async=!0,c.src="https://cdn.eu.pendo.io/agent/static/"+t+"/pendo.js",(l=n.getElementsByTagName(r)[0]).parentNode.insertBefore(c,l)}(window,document,"script","pendo")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Role=void 0,function(t){t.ADMIN="admin",t.DISPATCHER="dispatcher",t.DRIVER="driver"}(e.Role||(e.Role={}))},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(479),s=function(){function t(t){this.analyticsReportsEntity=new i.default(t)}return t.prototype.getReport=function(t){return this.analyticsReportsEntity.getReport(t)},t.prototype.deleteReport=function(t){return this.analyticsReportsEntity.deleteReport(t)},t.prototype.getUserReports=function(t){return this.analyticsReportsEntity.getUserReports(t)},t.prototype.getSystemReports=function(t){return this.analyticsReportsEntity.getSystemReports(t)},t.prototype.createReportScheduledJob=function(t){return this.analyticsReportsEntity.createReportScheduledJob(t)},t.prototype.updateReportScheduledJob=function(t,e){return this.analyticsReportsEntity.updateReportScheduledJob(t,e)},t.prototype.getReportScheduledJob=function(t){return this.analyticsReportsEntity.getReportScheduledJob(t)},t.prototype.deleteReportScheduledJob=function(t){return this.analyticsReportsEntity.deleteReportScheduledJob(t)},t.prototype.getApiLink=function(){return this.analyticsReportsEntity.getApiLink()},t.prototype.getActiveReportExecutions=function(){return this.analyticsReportsEntity.getActiveReportExecutions()},t.prototype.exportReport=function(t,e){return this.analyticsReportsEntity.exportReport(t,e)},t.prototype.downloadReport=function(t,e){return this.analyticsReportsEntity.downloadReport(t,e)},t.prototype.retryReportExecution=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.analyticsReportsEntity.retryReportExecutions(t)]}))}))},t.prototype.removeReportExecution=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.analyticsReportsEntity.removeReportExecutions(t)]}))}))},t.prototype.subscribeReportExecutions=function(t){this.analyticsReportsEntity.subscribeReportExecutions(t)},t.prototype.unsubscribeReportExecutions=function(){this.analyticsReportsEntity.unsubscribeReportExecutions()},t.prototype.createReport=function(t){return this.analyticsReportsEntity.createReport(t)},t.prototype.updateReport=function(t,e){return this.analyticsReportsEntity.updateReport(t,e)},t.prototype.getReportRowsCount=function(t){return this.analyticsReportsEntity.getReportRowsCount(t)},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u,a=n(5),c=n(63);!function(t){t.v1="v1"}(u||(u={}));var l=function(t,e){return void 0===e&&(e=u.v1),"/analytics-service/"+e+t},f={GET_USER_REPORTS:l("/reports"),GET_SYSTEM_REPORTS:l("/system-reports"),GET_REPORT:l("/reports/{:reportId}"),CREATE_REPORT:l("/reports"),UPDATE_REPORT:l("/reports/{:reportId}"),DELETE_REPORT:l("/reports/{:reportId}"),CREATE_SCHEDULE_JOB:l("/scheduled-jobs"),UPDATE_SCHEDULE_JOB:l("/scheduled-jobs/{:jobId}"),GET_SCHEDULE_JOB:l("/scheduled-jobs/{:jobId}"),DELETE_SCHEDULE_JOB:l("/scheduled-jobs/{:jobId}"),GET_API_LINK:l("/api-link"),START_EXPORT_REPORT:l("/reports/{:reportId}/start-export"),START_DOWNLOAD_REPORT:l("/reports/{:reportId}/start-download"),GET_ACTIVE_REPORT_EXECUTIONS:l("/report-executions/active"),RETRY_EXECUTION_REPORT:l("/report-executions/{:executionId}/retry"),REMOVE_EXECUTION_REPORT:l("/report-executions/{:executionId}"),GET_REPORT_ROWS_COUNT:l("/report-query/rows-count")},p=function(t){function e(e){return t.call(this,{session:e,entityName:"analytics-service"})||this}return o(e,t),e.prototype.getReport=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(f.GET_REPORT).withRouteParams({reportId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.deleteReport=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(f.DELETE_REPORT).withRouteParams({reportId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.createReport=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(f.CREATE_REPORT).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updateReport=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.put(f.UPDATE_REPORT).withRouteParams({reportId:t}).withPayload(e).invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getUserReports=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(f.GET_USER_REPORTS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getSystemReports=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(f.GET_SYSTEM_REPORTS).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.createReportScheduledJob=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(f.CREATE_SCHEDULE_JOB).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updateReportScheduledJob=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.put(f.UPDATE_SCHEDULE_JOB).withRouteParams({jobId:t}).withPayload(e).invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getReportScheduledJob=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(f.GET_SCHEDULE_JOB).withRouteParams({jobId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.deleteReportScheduledJob=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(f.DELETE_SCHEDULE_JOB).withRouteParams({jobId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getApiLink=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.get(f.GET_API_LINK).invoke()];case 1:return[2,t.sent()]}}))}))},e.prototype.exportReport=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(f.START_EXPORT_REPORT).withRouteParams({reportId:t}).withPayload(e).invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.downloadReport=function(t,e){return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(f.START_DOWNLOAD_REPORT).withRouteParams({reportId:t}).withPayload(e).invoke()];case 1:return[2,n.sent()]}}))}))},e.prototype.getActiveReportExecutions=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.get(f.GET_ACTIVE_REPORT_EXECUTIONS).invoke()];case 1:return[2,t.sent()]}}))}))},e.prototype.subscribeReportExecutions=function(t){this.service.session.persistentConnection.subscribe(new c.PubSubEvent("report_export_progress"),t)},e.prototype.unsubscribeReportExecutions=function(){this.service.session.persistentConnection.unsubscribe(new c.PubSubEvent("report_export_progress"))},e.prototype.retryReportExecutions=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(f.RETRY_EXECUTION_REPORT).withRouteParams({executionId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.removeReportExecutions=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(f.REMOVE_EXECUTION_REPORT).withRouteParams({executionId:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getReportRowsCount=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(f.GET_REPORT_ROWS_COUNT).withPayload({queryJson:t}).invoke()];case 1:return[2,e.sent()]}}))}))},e}(a.default);e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(481),o=function(){function t(t){this.servicePlansEntity=new r.default(t)}return t.prototype.getAll=function(){return this.servicePlansEntity.getAll()},t.prototype.get=function(t){return this.servicePlansEntity.service.get(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=n(9),c=n(482),l=function(t){function e(e){return t.call(this,{session:e,entityName:"service_plans",routes:[u.BaseRoutes.Create,u.BaseRoutes.Get,u.BaseRoutes.Delete,u.BaseRoutes.GetAll]})||this}return o(e,t),e.prototype.getAll=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.getAllOrFetch(null,c.planningResponseExtractor,c.planningResponseExtractor)]}))}))},e.prototype.get=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.getOrFetch(t,c.planningResponseExtractor,c.planningResponseExtractor)]}))}))},e}(a.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.planningResponseExtractor=void 0;e.planningResponseExtractor=function(t){return t.service_plans}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(484),o=function(){function t(t){this.alertsEntity=new r.default(t)}return t.prototype.attachSubscriptions=function(){this.alertsEntity.attachSubscriptions()},t.prototype.subscribeOnCreate=function(t){return this.alertsEntity.registerOnCreate(t)},t.prototype.subscribeOnDelete=function(t){return this.alertsEntity.registerOnDelete(t)},t.prototype.subscribeOnUpdateOwnership=function(t){return this.alertsEntity.registerOnUpdateOwnership(t)},t.prototype.getAlertsKeySetPagination=function(t){return this.alertsEntity.getAlertsKeySetPagination(t)},t.prototype.dismiss=function(t){return this.alertsEntity.dismiss(t)},t.prototype.batchDismiss=function(t){return this.alertsEntity.batchDismiss(t)},t.prototype.updateOwnership=function(t){return this.alertsEntity.updateOwnership(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(9),a=n(485),c=function(t){function e(e){var n=t.call(this,{session:e,entityName:"alerts"})||this;return n.isSubscriptionsAttached=!1,n._onUpdateOwnership=[],n.onUpdateOwnership=function(t){n._onUpdateOwnership.forEach((function(e){return e(t)}))},n.registerOnUpdateOwnership=function(t){return n._onUpdateOwnership.push(t),function(){return n._onUpdateOwnership.splice(n._onUpdateOwnership.indexOf(t),1)}},n}return o(e,t),e.prototype.attachSubscriptions=function(){this.isSubscriptionsAttached||(this.realTime.on(a.AlertRealTimeEvents.CREATED,this.onCreate),this.realTime.on(a.AlertRealTimeEvents.DELETED,this.onDelete),this.realTime.on(a.AlertRealTimeEvents.UPDATED_OWNERSHIP,this.onUpdateOwnership),this.isSubscriptionsAttached=!0)},e.prototype.getAlertsKeySetPagination=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(a.Routes.GET_ALL).withQueryString(t).setException("failed to get alerts").withExtractor(a.alertsExtractor).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.dismiss=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.delete(a.Routes.DISMISS).withRouteParams({uuid:t}).setException("failed to dismiss alert "+t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.batchDismiss=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(a.Routes.BATCH_DISMISS).withPayload({ids:t}).setException("failed to dismiss alerts "+t.toString()).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updateOwnership=function(t){var e;return i(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.service.routeGenerator.post(a.Routes.UPDATE_OWNERSHIP).withPayload(t).setException("failed to update alerts ownership "+(null===(e=null==t?void 0:t.alertUuids)||void 0===e?void 0:e.join(", "))).invoke()];case 1:return[2,n.sent()]}}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=e.AlertRealTimeEvents=e.alertsExtractor=void 0;e.alertsExtractor=function(t){return t.alerts},function(t){t.CREATED="new alert",t.DELETED="remove alert",t.UPDATED_OWNERSHIP="alert ownership updated"}(e.AlertRealTimeEvents||(e.AlertRealTimeEvents={}));e.Routes={GET_ALL:"/alerts",DISMISS:"/alerts/{:uuid}",BATCH_DISMISS:"/alerts/dismiss_by_ids",UPDATE_OWNERSHIP:"/alerts/ownership"}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(487),s=function(){function t(t){this.deliveryCatalogEntity=new i.default(t)}return t.prototype.getProviders=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.getProviders(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getFilters=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.deliveryCatalogEntity.getFilters()];case 1:return[2,t.sent()]}}))}))},t.prototype.getFiltersDetails=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.getFiltersDetails(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.toggleFavorites=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.toggleFavorites(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.sendEmailNotification=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.sendEmailNotification(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getFleetById=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.getFleetById(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getDeliveryById=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.getDeliveryById(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.getMerchantConnectionsList=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.deliveryCatalogEntity.getMerchantConnectionsList()];case 1:return[2,t.sent()]}}))}))},t.prototype.createMerchantConnection=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.createMerchantConnection(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.updateMerchantConnection=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.updateMerchantConnection(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.deleteMerchantConnection=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.deleteMerchantConnection(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.verifyMerchantConnectionCredentials=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.verifyMerchantConnectionCredentials(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.pauseMerchantConnection=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.deliveryCatalogEntity.pauseMerchantConnection(t)];case 1:return[2,e.sent()]}}))}))},t}();e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a="/delivery-provider-service/v1/delivery-providers",c="/delivery-provider-service/v1/merchant-connections",l={PROVIDERS:""+a,FILTERS:a+"/filters",FILTERS_DETAILS:a+"/filters/details",FAVOURITES:a+"/favorites",NOTIFICATION:"/delivery-provider-service/v1/merchant/delivery-providers/notify",FLEETS:"/fleet-service/v1/fleets/fleet",GET_DELIVERY_PROVIDER:a+"/delivery-provider",MERCHANT_CONNECTIONS:{LIST:c+"/list",CREATE:c+"/create",UPDATE:c+"/update",DELETE:c+"/delete",VERIFY:c+"/verify",PAUSE:c+"/pause"}},f=function(t){function e(e){return t.call(this,{session:e,entityName:"fleet-service"})||this}return o(e,t),e.prototype.getProviders=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.PROVIDERS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getFilters=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.post(l.FILTERS).invoke()];case 1:return[2,t.sent()]}}))}))},e.prototype.getFiltersDetails=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.FILTERS_DETAILS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.toggleFavorites=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.FAVOURITES).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.sendEmailNotification=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.NOTIFICATION).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getFleetById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.FLEETS).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getDeliveryById=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.GET_DELIVERY_PROVIDER).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.getMerchantConnectionsList=function(){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.service.routeGenerator.post(l.MERCHANT_CONNECTIONS.LIST).invoke()];case 1:return[2,t.sent()]}}))}))},e.prototype.createMerchantConnection=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.MERCHANT_CONNECTIONS.CREATE).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.updateMerchantConnection=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.MERCHANT_CONNECTIONS.UPDATE).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.deleteMerchantConnection=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.MERCHANT_CONNECTIONS.DELETE).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.verifyMerchantConnectionCredentials=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.MERCHANT_CONNECTIONS.VERIFY).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.pauseMerchantConnection=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(l.MERCHANT_CONNECTIONS.PAUSE).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e}(u.default);e.default=f},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(70),s=n(24),u=n(15),a=n(19),c=function(t){function e(e){var n=t.call(this,e.config.getApiEndpoint(),e)||this;return n.cancel_requests=new a.Route("/route_optimizations/optimization",4),n}return o(e,t),e.prototype.cancelRequests=function(t){return this.handleAuthorizedRequest(this.cancel_requests,i.defaultExtractor,u.BringgException.serviceException("Failed to call cancel optimization requests"),{request_uuids:t})},e}(s.SessionBasedService);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(490),o=function(){function t(t){this.ratesEntity=new r.default(t)}return t.prototype.getRates=function(t){return this.ratesEntity.getRates(t)},t.prototype.postRates=function(t){return this.ratesEntity.postRates(t)},t}();e.default=o},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(5),a=n(491),c=function(t){function e(e){return t.call(this,{session:e,entityName:"rates"})||this}return o(e,t),e.prototype.getRates=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.get(a.Routes.RATES_V1).withQueryString(t).invoke()];case 1:return[2,e.sent()]}}))}))},e.prototype.postRates=function(t){return i(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.service.routeGenerator.post(a.Routes.RATES_V1).withPayload(t).invoke()];case 1:return[2,e.sent()]}}))}))},e}(u.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Routes=void 0;e.Routes={RATES_V1:"/rate-service/v1/rates"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultExtractor=void 0;e.defaultExtractor=function(t){return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.ZipCodes="zip_codes"}(r||(r={})),e.default=r},function(t,e,n){"use strict";var r;n.r(e);var o=new Uint8Array(16);function i(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}var s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var u=function(t){return"string"==typeof t&&s.test(t)},a=[],c=0;c<256;++c)a.push((c+256).toString(16).substr(1));var l,f,p=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n},h=0,d=0;var y=function(t,e,n){var r=e&&n||0,o=e||new Array(16),s=(t=t||{}).node||l,u=void 0!==t.clockseq?t.clockseq:f;if(null==s||null==u){var a=t.random||(t.rng||i)();null==s&&(s=l=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==u&&(u=f=16383&(a[6]<<8|a[7]))}var c=void 0!==t.msecs?t.msecs:Date.now(),y=void 0!==t.nsecs?t.nsecs:d+1,v=c-h+(y-d)/1e4;if(v<0&&void 0===t.clockseq&&(u=u+1&16383),(v<0||c>h)&&void 0===t.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=c,d=y,f=u;var _=(1e4*(268435455&(c+=122192928e5))+y)%4294967296;o[r++]=_>>>24&255,o[r++]=_>>>16&255,o[r++]=_>>>8&255,o[r++]=255&_;var b=c/4294967296*1e4&268435455;o[r++]=b>>>8&255,o[r++]=255&b,o[r++]=b>>>24&15|16,o[r++]=b>>>16&255,o[r++]=u>>>8|128,o[r++]=255&u;for(var E=0;E<6;++E)o[r+E]=s[E];return e||p(o)};var v=function(t){if(!u(t))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n};var _=function(t,e,n){function r(t,r,o,i){if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],n=0;n<t.length;++n)e.push(t.charCodeAt(n));return e}(t)),"string"==typeof r&&(r=v(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+t.length);if(s.set(r),s.set(t,r.length),(s=n(s))[6]=15&s[6]|e,s[8]=63&s[8]|128,o){i=i||0;for(var u=0;u<16;++u)o[i+u]=s[u];return o}return p(s)}try{r.name=t}catch(t){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r};function b(t){return 14+(t+64>>>9<<4)+1}function E(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function g(t,e,n,r,o,i){return E((s=E(E(e,t),E(r,i)))<<(u=o)|s>>>32-u,n);var s,u}function w(t,e,n,r,o,i,s){return g(e&n|~e&r,t,e,o,i,s)}function T(t,e,n,r,o,i,s){return g(e&r|n&~r,t,e,o,i,s)}function m(t,e,n,r,o,i,s){return g(e^n^r,t,e,o,i,s)}function O(t,e,n,r,o,i,s){return g(n^(e|~r),t,e,o,i,s)}var S=_("v3",48,(function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var n=0;n<e.length;++n)t[n]=e.charCodeAt(n)}return function(t){for(var e=[],n=32*t.length,r=0;r<n;r+=8){var o=t[r>>5]>>>r%32&255,i=parseInt("0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o),16);e.push(i)}return e}(function(t,e){t[e>>5]|=128<<e%32,t[b(e)-1]=e;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,s=0;s<t.length;s+=16){var u=n,a=r,c=o,l=i;n=w(n,r,o,i,t[s],7,-680876936),i=w(i,n,r,o,t[s+1],12,-389564586),o=w(o,i,n,r,t[s+2],17,606105819),r=w(r,o,i,n,t[s+3],22,-1044525330),n=w(n,r,o,i,t[s+4],7,-176418897),i=w(i,n,r,o,t[s+5],12,1200080426),o=w(o,i,n,r,t[s+6],17,-1473231341),r=w(r,o,i,n,t[s+7],22,-45705983),n=w(n,r,o,i,t[s+8],7,1770035416),i=w(i,n,r,o,t[s+9],12,-1958414417),o=w(o,i,n,r,t[s+10],17,-42063),r=w(r,o,i,n,t[s+11],22,-1990404162),n=w(n,r,o,i,t[s+12],7,1804603682),i=w(i,n,r,o,t[s+13],12,-40341101),o=w(o,i,n,r,t[s+14],17,-1502002290),r=w(r,o,i,n,t[s+15],22,1236535329),n=T(n,r,o,i,t[s+1],5,-165796510),i=T(i,n,r,o,t[s+6],9,-1069501632),o=T(o,i,n,r,t[s+11],14,643717713),r=T(r,o,i,n,t[s],20,-373897302),n=T(n,r,o,i,t[s+5],5,-701558691),i=T(i,n,r,o,t[s+10],9,38016083),o=T(o,i,n,r,t[s+15],14,-660478335),r=T(r,o,i,n,t[s+4],20,-405537848),n=T(n,r,o,i,t[s+9],5,568446438),i=T(i,n,r,o,t[s+14],9,-1019803690),o=T(o,i,n,r,t[s+3],14,-187363961),r=T(r,o,i,n,t[s+8],20,1163531501),n=T(n,r,o,i,t[s+13],5,-1444681467),i=T(i,n,r,o,t[s+2],9,-51403784),o=T(o,i,n,r,t[s+7],14,1735328473),r=T(r,o,i,n,t[s+12],20,-1926607734),n=m(n,r,o,i,t[s+5],4,-378558),i=m(i,n,r,o,t[s+8],11,-2022574463),o=m(o,i,n,r,t[s+11],16,1839030562),r=m(r,o,i,n,t[s+14],23,-35309556),n=m(n,r,o,i,t[s+1],4,-1530992060),i=m(i,n,r,o,t[s+4],11,1272893353),o=m(o,i,n,r,t[s+7],16,-155497632),r=m(r,o,i,n,t[s+10],23,-1094730640),n=m(n,r,o,i,t[s+13],4,681279174),i=m(i,n,r,o,t[s],11,-358537222),o=m(o,i,n,r,t[s+3],16,-722521979),r=m(r,o,i,n,t[s+6],23,76029189),n=m(n,r,o,i,t[s+9],4,-640364487),i=m(i,n,r,o,t[s+12],11,-421815835),o=m(o,i,n,r,t[s+15],16,530742520),r=m(r,o,i,n,t[s+2],23,-995338651),n=O(n,r,o,i,t[s],6,-198630844),i=O(i,n,r,o,t[s+7],10,1126891415),o=O(o,i,n,r,t[s+14],15,-1416354905),r=O(r,o,i,n,t[s+5],21,-57434055),n=O(n,r,o,i,t[s+12],6,1700485571),i=O(i,n,r,o,t[s+3],10,-1894986606),o=O(o,i,n,r,t[s+10],15,-1051523),r=O(r,o,i,n,t[s+1],21,-2054922799),n=O(n,r,o,i,t[s+8],6,1873313359),i=O(i,n,r,o,t[s+15],10,-30611744),o=O(o,i,n,r,t[s+6],15,-1560198380),r=O(r,o,i,n,t[s+13],21,1309151649),n=O(n,r,o,i,t[s+4],6,-145523070),i=O(i,n,r,o,t[s+11],10,-1120210379),o=O(o,i,n,r,t[s+2],15,718787259),r=O(r,o,i,n,t[s+9],21,-343485551),n=E(n,u),r=E(r,a),o=E(o,c),i=E(i,l)}return[n,r,o,i]}(function(t){if(0===t.length)return[];for(var e=8*t.length,n=new Uint32Array(b(e)),r=0;r<e;r+=8)n[r>>5]|=(255&t[r/8])<<r%32;return n}(t),8*t.length))}));var R=function(t,e,n){var r=(t=t||{}).random||(t.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return p(r)};function A(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:return e^n^r;case 2:return e&n^e&r^n&r;case 3:return e^n^r}}function x(t,e){return t<<e|t>>>32-e}var P=_("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var r=unescape(encodeURIComponent(t));t=[];for(var o=0;o<r.length;++o)t.push(r.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var i=t.length/4+2,s=Math.ceil(i/16),u=new Array(s),a=0;a<s;++a){for(var c=new Uint32Array(16),l=0;l<16;++l)c[l]=t[64*a+4*l]<<24|t[64*a+4*l+1]<<16|t[64*a+4*l+2]<<8|t[64*a+4*l+3];u[a]=c}u[s-1][14]=8*(t.length-1)/Math.pow(2,32),u[s-1][14]=Math.floor(u[s-1][14]),u[s-1][15]=8*(t.length-1)&4294967295;for(var f=0;f<s;++f){for(var p=new Uint32Array(80),h=0;h<16;++h)p[h]=u[f][h];for(var d=16;d<80;++d)p[d]=x(p[d-3]^p[d-8]^p[d-14]^p[d-16],1);for(var y=n[0],v=n[1],_=n[2],b=n[3],E=n[4],g=0;g<80;++g){var w=Math.floor(g/20),T=x(y,5)+A(w,v,_,b)+E+e[w]+p[g]>>>0;E=b,b=_,_=x(v,30)>>>0,v=y,y=T}n[0]=n[0]+y>>>0,n[1]=n[1]+v>>>0,n[2]=n[2]+_>>>0,n[3]=n[3]+b>>>0,n[4]=n[4]+E>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));var C=function(t){if(!u(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)};n.d(e,"v1",(function(){return y})),n.d(e,"v3",(function(){return S})),n.d(e,"v4",(function(){return R})),n.d(e,"v5",(function(){return P})),n.d(e,"NIL",(function(){return"00000000-0000-0000-0000-000000000000"})),n.d(e,"version",(function(){return C})),n.d(e,"validate",(function(){return u})),n.d(e,"stringify",(function(){return p})),n.d(e,"parse",(function(){return v}))}]);
|
|
32
32
|
//# sourceMappingURL=bringg-dashboard-sdk.min.js.map
|