!function(){function t(t){return O(t)||g(t)||y(t)||v()}function e(t,i){e=function(t,e){return new c(t,void 0,e)};var r=n(RegExp),o=RegExp.prototype,s=new WeakMap;function c(t,e,n){var i=r.call(this,t,e);return s.set(i,n||s.get(t)),i}function u(t,e){var n=s.get(e);return Object.keys(n).reduce((function(e,i){return e[i]=t[n[i]],e}),Object.create(null))}return a(c,r),c.prototype.exec=function(t){var e=o.exec.call(this,t);return e&&(e.groups=u(e,this)),e},c.prototype[Symbol.replace]=function(t,e){if("string"==typeof e){var n=s.get(this);return o[Symbol.replace].call(this,t,e.replace(/\$<([^>]+)>/g,(function(t,e){return"$"+n[e]})))}if("function"==typeof e){var i=this;return o[Symbol.replace].call(this,t,(function(){var t=[];return t.push.apply(t,arguments),"object"!=typeof t[t.length-1]&&t.push(u(t,i)),e.apply(this,t)}))}return o[Symbol.replace].call(this,t,e)},e.apply(this,arguments)}function n(t){var e="function"==typeof Map?new Map:void 0;return(n=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return i(t,arguments,h(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,t)})(t)}function i(t,e,n){return(i=d()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&s(r,n.prototype),r}).apply(null,arguments)}function r(t){if(null==t)throw new TypeError("Cannot destructure undefined")}function o(t,e,n){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(n):r.value}})(t,e,n||t)}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=d();return function(){var n,i=h(t);if(e){var r=h(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return u(this,n)}}function u(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?l(t):e}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=y(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function b(t){return function(t){if(Array.isArray(t))return _(t)}(t)||g(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function m(t,e){return O(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(c){r=!0,o=c}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}(t,e)||y(t,e)||v()}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:e,timings:t}}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:3,steps:t,options:e}}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:t,options:e}}function l(t){return{type:6,styles:t,offset:null}}function d(t,e,n){return{type:0,name:t,styles:e,options:n}}function h(t){return{type:5,steps:t}}function f(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:t,animation:e,options:n}}function p(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:9,options:t}}function b(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:t,animation:e,options:n}}function g(t){Promise.resolve(null).then(t)}var m=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;C(this,t),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=e+n}return w(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[])}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"hasStarted",value:function(){return this._started}},{key:"init",value:function(){}},{key:"play",value:function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}},{key:"triggerMicrotask",value:function(){var t=this;g((function(){return t._onFinish()}))}},{key:"_onStart",value:function(){this._onStartFns.forEach((function(t){return t()})),this._onStartFns=[]}},{key:"pause",value:function(){}},{key:"restart",value:function(){}},{key:"finish",value:function(){this._onFinish()}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach((function(t){return t()})),this._onDestroyFns=[])}},{key:"reset",value:function(){}},{key:"setPosition",value:function(t){}},{key:"getPosition",value:function(){return 0}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}}]),t}(),v=function(){function t(e){var n=this;C(this,t),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;var i=0,r=0,o=0,a=this.players.length;0==a?g((function(){return n._onFinish()})):this.players.forEach((function(t){t.onDone((function(){++i==a&&n._onFinish()})),t.onDestroy((function(){++r==a&&n._onDestroy()})),t.onStart((function(){++o==a&&n._onStart()}))})),this.totalTime=this.players.reduce((function(t,e){return Math.max(t,e.totalTime)}),0)}return w(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach((function(t){return t.init()}))}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach((function(t){return t()})),this._onStartFns=[])}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach((function(t){return t.play()}))}},{key:"pause",value:function(){this.players.forEach((function(t){return t.pause()}))}},{key:"restart",value:function(){this.players.forEach((function(t){return t.restart()}))}},{key:"finish",value:function(){this._onFinish(),this.players.forEach((function(t){return t.finish()}))}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach((function(t){return t.destroy()})),this._onDestroyFns.forEach((function(t){return t()})),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach((function(t){return t.reset()})),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(t){var e=t*this.totalTime;this.players.forEach((function(t){var n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)}))}},{key:"getPosition",value:function(){var t=0;return this.players.forEach((function(e){var n=e.getPosition();t=Math.min(n,t)})),t}},{key:"beforeDestroy",value:function(){this.players.forEach((function(t){t.beforeDestroy&&t.beforeDestroy()}))}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}}]),t}(),y="!"},"+Aie":function(t,e,n){var i;!function(r,o,a){if(r){for(var s,c={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},u={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},l={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},d={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},h=1;h<20;++h)c[111+h]="f"+h;for(h=0;h<=9;++h)c[h+96]=h.toString();v.prototype.bind=function(t,e,n){return this._bindMultiple.call(this,t=t instanceof Array?t:[t],e,n),this},v.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},v.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},v.prototype.reset=function(){return this._callbacks={},this._directMap={},this},v.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,n){return null!==e&&e!==o&&(e===n||t(e.parentNode,n))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},v.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},v.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);s=null},v.init=function(){var t=v(o);for(var e in t)"_"!==e.charAt(0)&&(v[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},v.init(),r.Mousetrap=v,t.exports&&(t.exports=v),void 0===(i=(function(){return v}).call(e,n,e,t))||(t.exports=i)}function f(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)}function p(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return c[t.which]?c[t.which]:u[t.which]?u[t.which]:String.fromCharCode(t.which).toLowerCase()}function b(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function g(t,e,n){return n||(n=function(){if(!s)for(var t in s={},c)t>95&&t<112||c.hasOwnProperty(t)&&(s[c[t]]=t);return s}()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function m(t,e){var n,i,r,o=[];for(n=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),r=0;r1?function(t,e,o,a){function u(e){return function(){s=e,++i[t],clearTimeout(n),n=setTimeout(c,1e3)}}function d(e){l(o,e,t),"keyup"!==a&&(r=p(e)),setTimeout(c,10)}i[t]=0;for(var f=0;f0}},{key:"num",get:function(){var t=this.ghostly[0];return t.endsWith(".")?this.ghostly[0].slice(0,t.length-1):this.ghostly[0]}},{key:"zeros",get:function(){return this.ghostly[0].endsWith(".")?"."+this.ghostly[1]:this.ghostly[1]}},{key:"unit",get:function(){return this.ghostly[2]}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["ghost-trail"]],inputs:{content:"content",showZeros:"showZeros"},decls:7,vars:6,consts:[[1,"num"],["class","zeros global__text--ghost",4,"ngIf"],[1,"unit"],[1,"zeros","global__text--ghost"]],template:function(t,e){1&t&&(i.Ub(0,"span"),i.Ub(1,"span",0),i.Qc(2),i.Tb(),i.Oc(3,o,2,1,"span",1),i.Qc(4),i.Ub(5,"span",2),i.Qc(6),i.Tb(),i.Tb()),2&t&&(i.Gb("global__text--ghost",e.allZero),i.Cb(2),i.Rc(e.num),i.Cb(1),i.mc("ngIf",e.showZeros),i.Cb(1),i.Sc(" "," "," "),i.Cb(2),i.Rc(e.unit))},directives:[r.n],encapsulation:2,changeDetection:0}),t}()},"+Px6":function(t,e,n){"use strict";n.d(e,"b",(function(){return f})),n.d(e,"r",(function(){return g})),n.d(e,"d",(function(){return m})),n.d(e,"f",(function(){return v})),n.d(e,"e",(function(){return y})),n.d(e,"g",(function(){return _})),n.d(e,"k",(function(){return O})),n.d(e,"t",(function(){return k})),n.d(e,"s",(function(){return w})),n.d(e,"u",(function(){return C})),n.d(e,"j",(function(){return T})),n.d(e,"p",(function(){return S})),n.d(e,"i",(function(){return E})),n.d(e,"c",(function(){return x})),n.d(e,"n",(function(){return P})),n.d(e,"l",(function(){return A})),n.d(e,"h",(function(){return I})),n.d(e,"a",(function(){return M})),n.d(e,"o",(function(){return D})),n.d(e,"q",(function(){return R})),n.d(e,"m",(function(){return j}));var i=n("zqNl"),r=n("og7C"),o=n("VmIW"),a=n("TYVA"),s=n("p5wL"),c=n("orIj"),u=n("lx5p"),l=n("wMit"),d={selected:"PF_XBTUSD",quote:"USD",assets:Object(r.b)(),futures:Object(r.b)(),indices:Object(r.b)(),feeSchedules:Object(r.b)(),leveragePrefs:Object(r.b)(),pnlPrefs:Object(r.b)()},h=Object(i.i)(d,Object(i.k)(l.q,(function(t,e){var n=e.symbol;return Object(s.b)(n.toUpperCase(),t,"selected")})),Object(i.k)(l.p,(function(t,e){var n=e.symbol;return Object(s.b)(n.toUpperCase(),t,"quote")})),Object(i.k)(l.k,(function(t,e){var n=e.assets;return Object(s.b)(Object(s.c)(n,"name"),t,"assets")})),Object(i.k)(l.m,(function(t,e){var n=e.markets;return Object(s.b)(Object(s.c)(n,"symbol"),t,"futures")})),Object(i.k)(l.l,(function(t,e){var n=e.feeSchedules;return Object(s.b)(Object(s.c)(n,"uid"),t,"feeSchedules")})),Object(i.k)(l.n,(function(t,e){var n=e.leveragePreferences;return Object(s.b)(Object(s.c)(n,"symbol"),t,"leveragePrefs")})),Object(i.k)(l.o,(function(t,e){var n=e.pnlCurrency;return Object(s.b)(Object(s.c)(n,"symbol"),t,"pnlPrefs")})));function f(t,e){return h(t,e)}var p=Object(i.h)("market"),g=Object(i.j)(p,Object(u.F)("selected")),m=Object(i.j)(p,Object(u.F)("assets")),v=Object(i.j)(p,Object(u.F)("futures")),y=Object(i.j)(p,Object(u.F)("feeSchedules")),_=Object(i.j)(p,Object(u.F)("leveragePrefs")),O=Object(i.j)(p,Object(u.F)("pnlPrefs")),k=Object(i.j)(g,a.u),w=Object(i.j)(k,a.d),C=Object(i.j)(k,a.v),T=Object(i.j)(v,(function(t){return t})),S=Object(i.j)(g,(function(t){return Object(a.o)(t)})),E=Object(i.j)(T,(function(t,e){return t.get(e.symbol)})),x=Object(i.j)(m,(function(t){function e(t,e){return(new Intl.Collator).compare(t.name,e.name)}var n=[],i=[],r=[];return t.forEach((function(t){var e=t.name.toUpperCase();e in c.b?n.push(t):e in c.c?i.push(t):r.push(t)})),{fiat:n.sort(e),stablecoin:i.sort(e),crypto:r.sort((function(t,e){var n=a.e;return n.indexOf(t.name)-n.indexOf(e.name)}))}})),P=Object(i.j)(v,g,(function(t,e){return t.get(e)})),A=Object(i.j)(v,(function(t){return b(t.filter((function(t){return!t.symbol.split("_")[2]&&"flexible_futures"!==t.type})).map((function(t){return"F"+t.symbol.slice(1).toUpperCase()})).values())})),I=Object(i.j)(v,(function(t){return b(t.filter((function(t){return"flexible_futures"===t.type})).map((function(t){return t.symbol})).values())})),M=Object(i.j)(P,(function(t){return"flexible_futures"===(null==t?void 0:t.type)})),D=Object(i.j)(g,_,(function(t,e){return e.get(t)||{symbol:t,cross:!0}})),R=Object(i.j)(g,O,(function(t,e){return e.get(t)||{symbol:t,pnlCurrency:"USD"}})),j=Object(i.j)(y,P,(function(t,e){return"flexible_futures"===(null==e?void 0:e.type)||"futures_inverse"===(null==e?void 0:e.type)||"futures_vanilla"===(null==e?void 0:e.type)?o.Maybe.fromNull(t.get(e.feeScheduleUid)):o.Maybe.None()}))},"+Tmv":function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("kZht"),r=n("An66"),o=function(t,e){return{"strength-meter--valid":t,"strength-meter--invalid":e}},a=function(t){return{"strength-meter__indicator--active":t}},s=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["strength-meter"]],inputs:{strength:"strength"},decls:5,vars:16,consts:[[1,"strength-meter",3,"ngClass"],[1,"strength-meter__indicator",3,"ngClass"]],template:function(t,e){1&t&&(i.Ub(0,"section",0),i.Pb(1,"div",1),i.Pb(2,"div",1),i.Pb(3,"div",1),i.Pb(4,"div",1),i.Tb()),2&t&&(i.mc("ngClass",i.sc(5,o,e.strength>=3,e.strength<=2)),i.Cb(1),i.mc("ngClass",i.rc(8,a,e.strength>=1)),i.Cb(1),i.mc("ngClass",i.rc(10,a,e.strength>=2)),i.Cb(1),i.mc("ngClass",i.rc(12,a,e.strength>=3)),i.Cb(1),i.mc("ngClass",i.rc(14,a,e.strength>=4)))},directives:[r.l],styles:["[_nghost-%COMP%]{display:block;position:relative;top:calc(var(--spacing) * -1)}.strength-meter[_ngcontent-%COMP%]{display:flex;height:5px;justify-content:space-between;width:100%}.strength-meter--valid[_ngcontent-%COMP%] .strength-meter__indicator--active[_ngcontent-%COMP%]{background:var(--accent-colour)!important}.strength-meter--invalid[_ngcontent-%COMP%] .strength-meter__indicator--active[_ngcontent-%COMP%]{background:var(--warn-colour)!important}.strength-meter__indicator[_ngcontent-%COMP%]{background:var(--form-input-colour);flex:1;margin:0 3px}.strength-meter__indicator[_ngcontent-%COMP%]:first-of-type{margin-left:0}.strength-meter__indicator[_ngcontent-%COMP%]:nth-of-type(4){margin-right:0}"],changeDetection:0}),t}()},"+axt":function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return d}));var i=n("zqNl"),r=n("og7C"),o=n("dWHr"),a=n("p5wL"),s={prices:Object(r.b)()},c=Object(i.i)(s,Object(i.k)(o.b,(function(t,e){var n=e.prices;return Object(a.a)(n,t,"prices")})));function u(t,e){return c(t,e)}var l=Object(i.h)("prices"),d=Object(i.j)(l,(function(t){return t.prices}))},"+e22":function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("kZht"),r=n("LbKT"),o=n("NxuZ"),a=n("An66"),s=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"hasChanged",get:function(){return 0!==this.value}},{key:"negative",get:function(){return this.value<0}},{key:"change",get:function(){return Math.abs(this.value)}},{key:"icon",get:function(){return this.hasChanged?this.negative?"caret-down":"caret-up":"blank"}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["change"]],inputs:{value:"value"},decls:4,vars:6,consts:[["pnlZero","",3,"pnl"],["size","1x","transform","grow-8 down-3.75 right-0.2",3,"icon"]],template:function(t,e){1&t&&(i.Ub(0,"span",0),i.Pb(1,"fa-icon",1),i.Qc(2),i.gc(3,"number"),i.Tb()),2&t&&(i.mc("pnl",e.value),i.Cb(1),i.mc("icon",e.icon),i.Cb(1),i.Sc(" ",i.ic(3,3,e.change||0,"1.1-1"),"%\n"))},directives:[r.a,o.b],pipes:[a.f],styles:["[_nghost-%COMP%]{white-space:nowrap}fa-icon[_ngcontent-%COMP%]{pointer-events:none}"],changeDetection:0}),t}()},"+luX":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("ssKD"),r=n("Nxx2"),o=n("1XZd"),a=n("oznm"),s=function(){function t(e,n){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=null==n?t.makeArray(e):n)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var n=t.makeArray(e);i.default.arraycopy(this.bits,0,n,0,this.bits.length),this.bits=n}},t.prototype.get=function(t){return 0!=(this.bits[Math.floor(t/32)]&1<<(31&t))},t.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},t.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},t.prototype.getNextSet=function(t){var e=this.size;if(t>=e)return e;var n=this.bits,i=Math.floor(t/32),o=n[i];o&=~((1<<(31&t))-1);for(var a=n.length;0===o;){if(++i===a)return e;o=n[i]}var s=32*i+r.default.numberOfTrailingZeros(o);return s>e?e:s},t.prototype.getNextUnset=function(t){var e=this.size;if(t>=e)return e;var n=this.bits,i=Math.floor(t/32),o=~n[i];o&=~((1<<(31&t))-1);for(var a=n.length;0===o;){if(++i===a)return e;o=~n[i]}var s=32*i+r.default.numberOfTrailingZeros(o);return s>e?e:s},t.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},t.prototype.setRange=function(t,e){if(ethis.size)throw new a.default;if(e!==t){e--;for(var n=Math.floor(t/32),i=Math.floor(e/32),r=this.bits,o=n;o<=i;o++)r[o]|=(2<<(on?0:31&t))}},t.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,n=0;nthis.size)throw new a.default;if(e===t)return!0;e--;for(var i=Math.floor(t/32),r=Math.floor(e/32),o=this.bits,s=i;s<=r;s++){var c=(2<<(si?0:31&t))&4294967295;if((o[s]&c)!==(n?c:0))return!1}return!0},t.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},t.prototype.appendBits=function(t,e){if(e<0||e>32)throw new a.default("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(var n=e;n>0;n--)this.appendBit(1==(t>>n-1&1))},t.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e);for(var n=0;n>1&1431655765|(1431655765&o)<<1)>>2&858993459|(858993459&o)<<2)>>4&252645135|(252645135&o)<<4)>>8&16711935|(16711935&o)<<8)>>16&65535|(65535&o)<<16}if(this.size!==32*n){var a=32*n-this.size,s=t[0]>>>a;for(r=1;r>>a}t[n-1]=s}this.bits=t},t.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},t.prototype.equals=function(e){return e instanceof t&&this.size===e.size&&o.default.equals(this.bits,e.bits)},t.prototype.hashCode=function(){return 31*this.size+o.default.hashCode(this.bits)},t.prototype.toString=function(){for(var t="",e=0,n=this.size;e6&&void 0!==arguments[6]?arguments[6]:"Lax";if(this.documentIsAccessible){var s=encodeURIComponent(t)+"="+encodeURIComponent(e)+";";n&&(s+="number"==typeof n?"expires="+new Date((new Date).getTime()+1e3*n*60*60*24).toUTCString()+";":"expires="+n.toUTCString()+";"),i&&(s+="path="+i+";"),r&&(s+="domain="+r+";"),!1===o&&"None"===a&&(o=!0,console.warn("[ngx-cookie-service] Cookie ".concat(t," was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130"))),o&&(s+="secure;"),s+="sameSite="+a+";",this.document.cookie=s}}},{key:"delete",value:function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"Lax";this.documentIsAccessible&&this.set(t,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"),e,n,i,r)}},{key:"deleteAll",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Lax";if(this.documentIsAccessible){var r=this.getAll();for(var o in r)r.hasOwnProperty(o)&&this.delete(o,t,e,n,i)}}},{key:"getCookieRegExp",value:function(t){var e=t.replace(/([\[\]\{\}\(\)\|\=\;\+\?\,\.\*\^\$])/gi,"\\$1");return new RegExp("(?:^"+e+"|;\\s*"+e+")=(.*?)(?:;|$)","g")}},{key:"safeDecodeURIComponent",value:function(t){try{return decodeURIComponent(t)}catch(e){return t}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(r.d),i.Yb(i.D))},t.\u0275prov=Object(i.Kb)({factory:function(){return new t(Object(i.Yb)(r.d),Object(i.Yb)(i.D))},token:t,providedIn:"root"}),t}()},"0SRF":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("H88Z"),r=n("LqyJ");e.default=function(){function t(t,e,n,i,r,o,a){this.image=t,this.startX=e,this.startY=n,this.width=i,this.height=r,this.moduleSize=o,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var t=this.startX,e=this.height,n=t+this.width,i=this.startY+e/2,o=new Int32Array(3),a=this.image,s=0;s=n)return!1;return!0},t.prototype.crossCheckVertical=function(e,n,i,r){var o=this.image,a=o.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var c=e;c>=0&&o.get(n,c)&&s[1]<=i;)s[1]++,c--;if(c<0||s[1]>i)return NaN;for(;c>=0&&!o.get(n,c)&&s[0]<=i;)s[0]++,c--;if(s[0]>i)return NaN;for(c=e+1;ci)return NaN;for(;ci||5*Math.abs(s[0]+s[1]+s[2]-r)>=2*r?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.handlePossibleCenter=function(e,n,r){var o=e[0]+e[1]+e[2],a=t.centerFromEnd(e,r),s=this.crossCheckVertical(n,a,2*e[1],o);if(!isNaN(s)){for(var c=(e[0]+e[1]+e[2])/3,u=0,l=this.possibleCenters;u'},t}();window.TradingView=window.TradingView||{},window.TradingView.version=o,t.version=o,t.widget=a,Object.defineProperty(t,"__esModule",{value:!0})}(e)},"0o+O":function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s}));var i=n("kZht"),r=n("OHEV"),o=["qrcElement"],a=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.platformId=n,this.colordark="",this.colorlight="",this.level="",this.hidetitle=!1,this.size=0,this.usesvg=!1,this.allowEmptyString=!1,this.qrdata="",this.colorDark="#000000ff",this.colorLight="#ffffffff",this.cssClass="qrcode",this.elementType="canvas",this.errorCorrectionLevel="M",this.margin=4,this.scale=4,this.width=10,""!==this.colordark&&console.warn("[angularx-qrcode] colordark is deprecated, use colorDark."),""!==this.colorlight&&console.warn("[angularx-qrcode] colorlight is deprecated, use colorLight."),""!==this.level&&console.warn("[angularx-qrcode] level is deprecated, use errorCorrectionLevel."),!1!==this.hidetitle&&console.warn("[angularx-qrcode] hidetitle is deprecated."),0!==this.size&&console.warn("[angularx-qrcode] size is deprecated, use `width`. Defaults to 10."),!1!==this.usesvg&&console.warn("[angularx-qrcode] usesvg is deprecated, use [elementType]=\"'svg'\".")}return w(t,[{key:"ngOnChanges",value:function(){this.createQRCode()}},{key:"isValidQrCodeText",value:function(t){return!1===this.allowEmptyString?!(void 0===t||""===t||"null"===t||null===t):!(void 0===t)}},{key:"toDataURL",value:function(){var t=this;return new Promise((function(e,n){Object(r.toDataURL)(t.qrdata,{color:{dark:t.colorDark,light:t.colorLight},errorCorrectionLevel:t.errorCorrectionLevel,margin:t.margin,scale:t.scale,version:t.version,width:t.width},(function(t,i){t?n(t):e(i)}))}))}},{key:"toCanvas",value:function(t){var e=this;return new Promise((function(n,i){Object(r.toCanvas)(t,e.qrdata,{color:{dark:e.colorDark,light:e.colorLight},errorCorrectionLevel:e.errorCorrectionLevel,margin:e.margin,scale:e.scale,version:e.version,width:e.width},(function(t){t?i(t):n("success")}))}))}},{key:"toSVG",value:function(){var t=this;return new Promise((function(e,n){Object(r.toString)(t.qrdata,{color:{dark:t.colorDark,light:t.colorLight},errorCorrectionLevel:t.errorCorrectionLevel,margin:t.margin,scale:t.scale,type:"svg",version:t.version,width:t.width},(function(t,i){t?n(t):e(i)}))}))}},{key:"renderElement",value:function(t){var e,n=p(this.qrcElement.nativeElement.childNodes);try{for(n.s();!(e=n.n()).done;){var i=e.value;this.renderer.removeChild(this.qrcElement.nativeElement,i)}}catch(r){n.e(r)}finally{n.f()}this.renderer.appendChild(this.qrcElement.nativeElement,t)}},{key:"createQRCode",value:function(){var t=this;this.version&&this.version>40?(console.warn("[angularx-qrcode] max value for `version` is 40"),this.version=40):this.version&&this.version<1?(console.warn("[angularx-qrcode]`min value for `version` is 1"),this.version=1):void 0!==this.version&&isNaN(this.version)&&(console.warn("[angularx-qrcode] version should be a number, defaulting to auto."),this.version=void 0);try{if(!this.isValidQrCodeText(this.qrdata))throw new Error('[angularx-qrcode] Field `qrdata` is empty, set`allowEmptyString="true"` to overwrite this behaviour.');var e;switch(this.elementType){case"canvas":e=this.renderer.createElement("canvas"),this.toCanvas(e).then((function(){t.renderElement(e)})).catch((function(t){console.error("[angularx-qrcode] canvas error: ",t)}));break;case"svg":e=this.renderer.createElement("svg","svg"),this.toSVG().then((function(n){e.innerHTML=n,t.renderer.setAttribute(e,"height",""+t.width),t.renderer.setAttribute(e,"width",""+t.width),t.renderElement(e)})).catch((function(t){console.error("[angularx-qrcode] svg error: ",t)}));break;case"url":case"img":default:e=this.renderer.createElement("img"),this.toDataURL().then((function(n){e.setAttribute("src",n),t.renderElement(e)})).catch((function(t){console.error("[angularx-qrcode] img/url error: ",t)}))}}catch(n){console.error("[angularx-qrcode] Error generating QR Code: ",n.message)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.D))},t.\u0275cmp=i.Ib({type:t,selectors:[["qrcode"]],viewQuery:function(t,e){var n;1&t&&i.Jc(o,!0),2&t&&i.zc(n=i.cc())&&(e.qrcElement=n.first)},inputs:{colordark:"colordark",colorlight:"colorlight",level:"level",hidetitle:"hidetitle",size:"size",usesvg:"usesvg",allowEmptyString:"allowEmptyString",qrdata:"qrdata",colorDark:"colorDark",colorLight:"colorLight",cssClass:"cssClass",elementType:"elementType",errorCorrectionLevel:"errorCorrectionLevel",margin:"margin",scale:"scale",width:"width",version:"version"},features:[i.Ab],decls:2,vars:2,consts:[["qrcElement",""]],template:function(t,e){1&t&&i.Pb(0,"div",null,0),2&t&&i.Eb(e.cssClass)},encapsulation:2,changeDetection:0}),t}(),s=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},providers:[]}),t}()},"0tVE":function(t,e,n){"use strict";n.d(e,"x",(function(){return r})),n.d(e,"l",(function(){return o})),n.d(e,"G",(function(){return a})),n.d(e,"o",(function(){return s})),n.d(e,"J",(function(){return c})),n.d(e,"n",(function(){return u})),n.d(e,"H",(function(){return l})),n.d(e,"y",(function(){return d})),n.d(e,"g",(function(){return h})),n.d(e,"t",(function(){return f})),n.d(e,"b",(function(){return p})),n.d(e,"I",(function(){return b})),n.d(e,"a",(function(){return g})),n.d(e,"D",(function(){return m})),n.d(e,"s",(function(){return v})),n.d(e,"e",(function(){return y})),n.d(e,"d",(function(){return _})),n.d(e,"v",(function(){return O})),n.d(e,"q",(function(){return k})),n.d(e,"h",(function(){return w})),n.d(e,"j",(function(){return C})),n.d(e,"w",(function(){return T})),n.d(e,"z",(function(){return S})),n.d(e,"c",(function(){return E})),n.d(e,"u",(function(){return x})),n.d(e,"k",(function(){return P})),n.d(e,"B",(function(){return A})),n.d(e,"C",(function(){return I})),n.d(e,"f",(function(){return M})),n.d(e,"A",(function(){return D})),n.d(e,"r",(function(){return R})),n.d(e,"E",(function(){return j})),n.d(e,"M",(function(){return L})),n.d(e,"p",(function(){return N})),n.d(e,"K",(function(){return U})),n.d(e,"m",(function(){return F})),n.d(e,"F",(function(){return B})),n.d(e,"i",(function(){return z})),n.d(e,"L",(function(){return V}));var i=n("zqNl"),r=Object(i.g)("Reset User State"),o=Object(i.g)("Fetch User"),a=Object(i.g)("Set User Details",Object(i.l)()),s=Object(i.g)("Get User Summary"),c=Object(i.g)("Set User Summary",Object(i.l)()),u=Object(i.g)("Get User Docs"),l=Object(i.g)("Set User Docs",Object(i.l)()),d=Object(i.g)("Respond to Document",Object(i.l)()),h=Object(i.g)("Check User Terms"),f=Object(i.g)("Process New SSO"),p=Object(i.g)("Activate SSO transfers"),b=Object(i.g)("Set User Limitations",Object(i.l)()),g=Object(i.g)("Accept Terms"),m=Object(i.g)("Set Quantity Units",Object(i.l)()),v=Object(i.g)("Init Frontend Data",Object(i.l)()),y=Object(i.g)("Add Frontend Data",Object(i.l)()),_=Object(i.g)("Add Favorite Market",Object(i.l)()),O=Object(i.g)("Remove Favorite Market",Object(i.l)()),k=Object(i.g)("Get API Keys"),w=Object(i.g)("Create API Key",Object(i.l)()),C=Object(i.g)("Delete API Key",Object(i.l)()),T=Object(i.g)("Reset API Key",Object(i.l)()),S=Object(i.g)("Set API Keys",Object(i.l)()),E=Object(i.g)("Add API Key",Object(i.l)()),x=Object(i.g)("Remove API Key",Object(i.l)()),P=Object(i.g)("Fetch Email Alerts"),A=Object(i.g)("Set Email Alerts",Object(i.l)()),I=Object(i.g)("Set Newsletter",Object(i.l)()),M=Object(i.g)("Change Email Alerts",Object(i.l)()),D=Object(i.g)("Set Assignment Accepted Date",Object(i.l)()),R=Object(i.g)("Get Sub Accounts"),j=Object(i.g)("Set Sub Accounts",Object(i.l)()),L=Object(i.g)("Subaccount Signup",Object(i.l)()),N=Object(i.g)("Fetch Fee Schedule Volumes"),U=Object(i.g)("Set Fee Schedule Volumes",Object(i.l)()),F=Object(i.g)("Fetch User Algos"),B=Object(i.g)("Set User Algos",Object(i.l)()),z=Object(i.g)("Create User Algo",Object(i.l)()),V=Object(i.g)("Sign User Algo",Object(i.l)())},"13Sj":function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("J180"),a=n("uepk");e.BrowserBarcodeReader=function(t){function e(e,n){return void 0===e&&(e=500),t.call(this,new a.default(n),e,n)||this}return r(e,t),e}(o.BrowserCodeReader)},"15qg":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){if(null==t)return null;var e=["week","month","quarter","semiannual"].includes(t)?t+"ly":t;return e.substring(0,1).toUpperCase()+e.substring(1)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Nb({name:"tag",type:t,pure:!0}),t}()},"188V":function(t,e,n){var i=n("67SP");function r(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new i(t*t),this.data.fill(0),this.reservedBit=new i(t*t),this.reservedBit.fill(0)}r.prototype.set=function(t,e,n,i){var r=t*this.size+e;this.data[r]=n,i&&(this.reservedBit[r]=!0)},r.prototype.get=function(t,e){return this.data[t*this.size+e]},r.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},r.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=r},"1MAX":function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n("dUuy"),r=n("i9P/"),o=n("sWLk"),a=n("qEfY"),s=n("eY+9"),c=n("/vgl"),u=n("X0qr"),l=function(t){if(t&&"function"==typeof t[a.a])return l=t,function(t){var e=l[a.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(s.a)(t))return Object(i.a)(t);if(Object(c.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,r.a),t};if(t&&"function"==typeof t[o.a])return e=t,function(t){for(var n=e[o.a]();;){var i=void 0;try{i=n.next()}catch(r){return t.error(r),t}if(i.done){t.complete();break}if(t.next(i.value),t.closed)break}return"function"==typeof n.return&&t.add((function(){n.return&&n.return()})),t};var e,n,l,d=Object(u.a)(t)?"an invalid object":"'".concat(t,"'");throw new TypeError("You provided ".concat(d," where a stream was expected. You can provide an Observable, Promise, Array, or Iterable."))}},"1OAy":function(t,e,n){"use strict";n.d(e,"j",(function(){return r})),n.d(e,"p",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"i",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"e",(function(){return l})),n.d(e,"m",(function(){return d})),n.d(e,"a",(function(){return h})),n.d(e,"o",(function(){return f})),n.d(e,"f",(function(){return p})),n.d(e,"n",(function(){return b})),n.d(e,"h",(function(){return g})),n.d(e,"l",(function(){return m})),n.d(e,"g",(function(){return v})),n.d(e,"k",(function(){return y}));var i=n("zqNl"),r=Object(i.g)("Reset Private Logs State"),o=Object(i.g)("Set Public Trades",Object(i.l)()),a=Object(i.g)("Add Public Trade",Object(i.l)()),s=Object(i.g)("Add Public Trade Batch",Object(i.l)()),c=Object(i.g)("Open Private Log Feeds"),u=Object(i.g)("Close Private Log Feeds"),l=Object(i.g)("Fetch Private Logs",Object(i.l)()),d=Object(i.g)("Set Private Logs",Object(i.l)()),h=Object(i.g)("Add Private Logs",Object(i.l)()),f=Object(i.g)("Set Private Transfers",Object(i.l)()),p=Object(i.g)("Fetch Private Orders"),b=Object(i.g)("Set Private Orders",Object(i.l)()),g=Object(i.g)("Get Fiat Manual Withdrawals"),m=Object(i.g)("Set Fiat Manual Withdrawals",Object(i.l)()),v=Object(i.g)("Get Fiat Manual Deposits"),y=Object(i.g)("Set Fiat Manual Deposits",Object(i.l)())},"1ONQ":function(t,e,n){"use strict";n.d(e,"f",(function(){return r})),n.d(e,"e",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"h",(function(){return s})),n.d(e,"g",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"i",(function(){return l})),n.d(e,"c",(function(){return d})),n.d(e,"a",(function(){return h}));var i=n("zqNl"),r=Object(i.g)("Reset Assignment State"),o=Object(i.g)("Get Assignment Preferences"),a=Object(i.g)("Get Assignment Preference History"),s=Object(i.g)("Set Assignment Preferences",Object(i.l)()),c=Object(i.g)("Set Assignment Preference History",Object(i.l)()),u=Object(i.g)("Add Participant",Object(i.l)()),l=Object(i.g)("Update Participants",Object(i.l)()),d=Object(i.g)("Delete Participant",Object(i.l)()),h=Object(i.g)("Accept Assignment Terms")},"1VvW":function(t,e,n){"use strict";n.d(e,"a",(function(){return qt})),n.d(e,"b",(function(){return $})),n.d(e,"c",(function(){return On})),n.d(e,"d",(function(){return un})),n.d(e,"e",(function(){return ln})),n.d(e,"f",(function(){return mn})),n.d(e,"g",(function(){return dn})),n.d(e,"h",(function(){return An})),n.d(e,"i",(function(){return vn}));var i=n("An66"),r=n("kZht"),o=n("ROBh"),s=n("GoAz"),u=n("C05f"),d=n("HM3f"),h=n("IdLP"),f=n("VxHp"),g=n("i9xl"),m=n("6Oco"),v=n("ZTXN"),y=n("YtkY"),_=n("mawV"),O=n("xVbo"),k=n("5uGe"),T=n("PNff");function S(t){return function(e){return 0===t?Object(m.b)():e.lift(new E(t))}}var E=function(){function t(e){if(C(this,t),this.total=e,this.total<0)throw new T.a}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new x(t,this.total))}}]),t}(),x=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t)).total=i,r.ring=new Array,r.count=0,r}return w(n,[{key:"_next",value:function(t){var e=this.ring,n=this.total,i=this.count++;e.length0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r2&&void 0!==arguments[2]?arguments[2]:"imperative",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return C(this,n),(r=e.call(this,t,i)).navigationTrigger=o,r.restoredState=a,r}return w(n,[{key:"toString",value:function(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(H),$=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,t,i)).urlAfterRedirects=r,o}return w(n,[{key:"toString",value:function(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}}]),n}(H),Q=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,t,i)).reason=r,o}return w(n,[{key:"toString",value:function(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(H),W=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,t,i)).error=r,o}return w(n,[{key:"toString",value:function(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}}]),n}(H),G=function(t){a(n,t);var e=c(n);function n(t,i,r,o){var a;return C(this,n),(a=e.call(this,t,i)).urlAfterRedirects=r,a.state=o,a}return w(n,[{key:"toString",value:function(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(H),Y=function(t){a(n,t);var e=c(n);function n(t,i,r,o){var a;return C(this,n),(a=e.call(this,t,i)).urlAfterRedirects=r,a.state=o,a}return w(n,[{key:"toString",value:function(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(H),K=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a){var s;return C(this,n),(s=e.call(this,t,i)).urlAfterRedirects=r,s.state=o,s.shouldActivate=a,s}return w(n,[{key:"toString",value:function(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}}]),n}(H),Z=function(t){a(n,t);var e=c(n);function n(t,i,r,o){var a;return C(this,n),(a=e.call(this,t,i)).urlAfterRedirects=r,a.state=o,a}return w(n,[{key:"toString",value:function(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(H),X=function(t){a(n,t);var e=c(n);function n(t,i,r,o){var a;return C(this,n),(a=e.call(this,t,i)).urlAfterRedirects=r,a.state=o,a}return w(n,[{key:"toString",value:function(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(H),J=function(){function t(e){C(this,t),this.route=e}return w(t,[{key:"toString",value:function(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}}]),t}(),tt=function(){function t(e){C(this,t),this.route=e}return w(t,[{key:"toString",value:function(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}}]),t}(),et=function(){function t(e){C(this,t),this.snapshot=e}return w(t,[{key:"toString",value:function(){return"ChildActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),nt=function(){function t(e){C(this,t),this.snapshot=e}return w(t,[{key:"toString",value:function(){return"ChildActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),it=function(){function t(e){C(this,t),this.snapshot=e}return w(t,[{key:"toString",value:function(){return"ActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),rt=function(){function t(e){C(this,t),this.snapshot=e}return w(t,[{key:"toString",value:function(){return"ActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),ot=function(){function t(e,n,i){C(this,t),this.routerEvent=e,this.position=n,this.anchor=i}return w(t,[{key:"toString",value:function(){return"Scroll(anchor: '".concat(this.anchor,"', position: '").concat(this.position?"".concat(this.position[0],", ").concat(this.position[1]):null,"')")}}]),t}(),at=function(){function t(e){C(this,t),this.params=e||{}}return w(t,[{key:"has",value:function(t){return Object.prototype.hasOwnProperty.call(this.params,t)}},{key:"get",value:function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null}},{key:"getAll",value:function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]}},{key:"keys",get:function(){return Object.keys(this.params)}}]),t}();function st(t){return new at(t)}function ct(t){var e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function ut(t,e,n){var i=n.path.split("/");if(i.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||i.length0?t[t.length-1]:null}function pt(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)}function bt(t){return Object(r.tb)(t)?t:Object(r.ub)(t)?Object(s.a)(Promise.resolve(t)):Object(o.a)(t)}function gt(t,e,n){return n?function(t,e){return lt(t,e)}(t.queryParams,e.queryParams)&&function t(e,n){if(!_t(e.segments,n.segments))return!1;if(e.numberOfChildren!==n.numberOfChildren)return!1;for(var i in n.children){if(!e.children[i])return!1;if(!t(e.children[i],n.children[i]))return!1}return!0}(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every((function(n){return dt(t[n],e[n])}))}(t.queryParams,e.queryParams)&&function t(e,n){return function e(n,i,r){if(n.segments.length>r.length)return!!_t(n.segments.slice(0,r.length),r)&&!i.hasChildren();if(n.segments.length===r.length){if(!_t(n.segments,r))return!1;for(var o in i.children){if(!n.children[o])return!1;if(!t(n.children[o],i.children[o]))return!1}return!0}var a=r.slice(0,n.segments.length),s=r.slice(n.segments.length);return!!_t(n.segments,a)&&!!n.children.primary&&e(n.children.primary,i,s)}(e,n,n.segments)}(t.root,e.root)}var mt=function(){function t(e,n,i){C(this,t),this.root=e,this.queryParams=n,this.fragment=i}return w(t,[{key:"toString",value:function(){return Ct.serialize(this)}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=st(this.queryParams)),this._queryParamMap}}]),t}(),vt=function(){function t(e,n){var i=this;C(this,t),this.segments=e,this.children=n,this.parent=null,pt(n,(function(t,e){return t.parent=i}))}return w(t,[{key:"hasChildren",value:function(){return this.numberOfChildren>0}},{key:"toString",value:function(){return Tt(this)}},{key:"numberOfChildren",get:function(){return Object.keys(this.children).length}}]),t}(),yt=function(){function t(e,n){C(this,t),this.path=e,this.parameters=n}return w(t,[{key:"toString",value:function(){return It(this)}},{key:"parameterMap",get:function(){return this._parameterMap||(this._parameterMap=st(this.parameters)),this._parameterMap}}]),t}();function _t(t,e){return t.length===e.length&&t.every((function(t,n){return t.path===e[n].path}))}function Ot(t,e){var n=[];return pt(t.children,(function(t,i){"primary"===i&&(n=n.concat(e(t,i)))})),pt(t.children,(function(t,i){"primary"!==i&&(n=n.concat(e(t,i)))})),n}var kt=function t(){C(this,t)},wt=function(){function t(){C(this,t)}return w(t,[{key:"parse",value:function(t){var e=new Lt(t);return new mt(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}},{key:"serialize",value:function(t){return"".concat("/"+function t(e,n){if(!e.hasChildren())return Tt(e);if(n){var i=e.children.primary?t(e.children.primary,!1):"",r=[];return pt(e.children,(function(e,n){"primary"!==n&&r.push("".concat(n,":").concat(t(e,!1)))})),r.length>0?"".concat(i,"(").concat(r.join("//"),")"):i}var o=Ot(e,(function(n,i){return"primary"===i?[t(e.children.primary,!1)]:["".concat(i,":").concat(t(n,!1))]}));return 1===Object.keys(e.children).length&&null!=e.children.primary?"".concat(Tt(e),"/").concat(o[0]):"".concat(Tt(e),"/(").concat(o.join("//"),")")}(t.root,!0)).concat((e=t.queryParams,n=Object.keys(e).map((function(t){var n=e[t];return Array.isArray(n)?n.map((function(e){return"".concat(Et(t),"=").concat(Et(e))})).join("&"):"".concat(Et(t),"=").concat(Et(n))})),n.length?"?"+n.join("&"):"")).concat("string"==typeof t.fragment?"#"+encodeURI(t.fragment):"");var e,n}}]),t}(),Ct=new wt;function Tt(t){return t.segments.map((function(t){return It(t)})).join("/")}function St(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Et(t){return St(t).replace(/%3B/gi,";")}function xt(t){return St(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Pt(t){return decodeURIComponent(t)}function At(t){return Pt(t.replace(/\+/g,"%20"))}function It(t){return"".concat(xt(t.path)).concat((e=t.parameters,Object.keys(e).map((function(t){return";".concat(xt(t),"=").concat(xt(e[t]))})).join("")));var e}var Mt=/^[^\/()?;=#]+/;function Dt(t){var e=t.match(Mt);return e?e[0]:""}var Rt=/^[^=?&#]+/,jt=/^[^?&#]+/,Lt=function(){function t(e){C(this,t),this.url=e,this.remaining=e}return w(t,[{key:"parseRootSegment",value:function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new vt([],{}):new vt([],this.parseChildren())}},{key:"parseQueryParams",value:function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}},{key:"parseFragment",value:function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}},{key:"parseChildren",value:function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new vt(t,e)),n}},{key:"parseSegment",value:function(){var t=Dt(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '".concat(this.remaining,"'."));return this.capture(t),new yt(Pt(t),this.parseMatrixParams())}},{key:"parseMatrixParams",value:function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t}},{key:"parseParam",value:function(t){var e=Dt(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var i=Dt(this.remaining);i&&(n=i,this.capture(n))}t[Pt(e)]=Pt(n)}}},{key:"parseQueryParam",value:function(t){var e=function(t){var e=t.match(Rt);return e?e[0]:""}(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var i=function(t){var e=t.match(jt);return e?e[0]:""}(this.remaining);i&&(n=i,this.capture(n))}var r=At(e),o=At(n);if(t.hasOwnProperty(r)){var a=t[r];Array.isArray(a)||(a=[a],t[r]=a),a.push(o)}else t[r]=o}}},{key:"parseParens",value:function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=Dt(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error("Cannot parse url '".concat(this.url,"'"));var r=void 0;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):t&&(r="primary");var o=this.parseChildren();e[r]=1===Object.keys(o).length?o.primary:new vt([],o),this.consumeOptional("//")}return e}},{key:"peekStartsWith",value:function(t){return this.remaining.startsWith(t)}},{key:"consumeOptional",value:function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}},{key:"capture",value:function(t){if(!this.consumeOptional(t))throw new Error('Expected "'.concat(t,'".'))}}]),t}(),Nt=function(){function t(e){C(this,t),this._root=e}return w(t,[{key:"parent",value:function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}},{key:"children",value:function(t){var e=Ut(t,this._root);return e?e.children.map((function(t){return t.value})):[]}},{key:"firstChild",value:function(t){var e=Ut(t,this._root);return e&&e.children.length>0?e.children[0].value:null}},{key:"siblings",value:function(t){var e=Ft(t,this._root);return e.length<2?[]:e[e.length-2].children.map((function(t){return t.value})).filter((function(e){return e!==t}))}},{key:"pathFromRoot",value:function(t){return Ft(t,this._root).map((function(t){return t.value}))}},{key:"root",get:function(){return this._root.value}}]),t}();function Ut(t,e){if(t===e.value)return e;var n,i=p(e.children);try{for(i.s();!(n=i.n()).done;){var r=Ut(t,n.value);if(r)return r}}catch(o){i.e(o)}finally{i.f()}return null}function Ft(t,e){if(t===e.value)return[e];var n,i=p(e.children);try{for(i.s();!(n=i.n()).done;){var r=Ft(t,n.value);if(r.length)return r.unshift(e),r}}catch(o){i.e(o)}finally{i.f()}return[]}var Bt=function(){function t(e,n){C(this,t),this.value=e,this.children=n}return w(t,[{key:"toString",value:function(){return"TreeNode(".concat(this.value,")")}}]),t}();function zt(t){var e={};return t&&t.children.forEach((function(t){return e[t.value.outlet]=t})),e}var Vt=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t)).snapshot=i,Gt(l(r),t),r}return w(n,[{key:"toString",value:function(){return this.snapshot.toString()}}]),n}(Nt);function Ht(t,e){var n=function(t,e){var n=new Qt([],{},{},"",{},"primary",e,null,t.root,-1,{});return new Wt("",new Bt(n,[]))}(t,e),i=new u.a([new yt("",{})]),r=new u.a({}),o=new u.a({}),a=new u.a({}),s=new u.a(""),c=new qt(i,r,a,s,o,"primary",e,n.root);return c.snapshot=n.root,new Vt(new Bt(c,[]),n)}var qt=function(){function t(e,n,i,r,o,a,s,c){C(this,t),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=a,this.component=s,this._futureSnapshot=c}return w(t,[{key:"toString",value:function(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}},{key:"routeConfig",get:function(){return this._futureSnapshot.routeConfig}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=this.params.pipe(Object(y.a)((function(t){return st(t)})))),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Object(y.a)((function(t){return st(t)})))),this._queryParamMap}}]),t}();function $t(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"emptyOnly",n=t.pathFromRoot,i=0;if("always"!==e)for(i=n.length-1;i>=1;){var r=n[i],o=n[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function(t){return t.reduce((function(t,e){return{params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}}),{params:{},data:{},resolve:{}})}(n.slice(i))}var Qt=function(){function t(e,n,i,r,o,a,s,c,u,l,d){C(this,t),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=a,this.component=s,this.routeConfig=c,this._urlSegment=u,this._lastPathIndex=l,this._resolve=d}return w(t,[{key:"toString",value:function(){return"Route(url:'".concat(this.url.map((function(t){return t.toString()})).join("/"),"', path:'").concat(this.routeConfig?this.routeConfig.path:"","')")}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=st(this.params)),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=st(this.queryParams)),this._queryParamMap}}]),t}(),Wt=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,i)).url=t,Gt(l(r),i),r}return w(n,[{key:"toString",value:function(){return Yt(this._root)}}]),n}(Nt);function Gt(t,e){e.value._routerState=t,e.children.forEach((function(e){return Gt(t,e)}))}function Yt(t){var e=t.children.length>0?" { ".concat(t.children.map(Yt).join(", ")," } "):"";return"".concat(t.value).concat(e)}function Kt(t){if(t.snapshot){var e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,lt(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),lt(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(var n=0;n0&&Xt(i[0]))throw new Error("Root segment cannot have matrix parameters");var r=i.find((function(t){return"object"==typeof t&&null!=t&&t.outlets}));if(r&&r!==ft(i))throw new Error("{outlets:{}} has to be the last command")}return w(t,[{key:"toRoot",value:function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}]),t}(),ee=function t(e,n,i){C(this,t),this.segmentGroup=e,this.processChildren=n,this.index=i};function ne(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets.primary:""+t}function ie(t,e,n){if(t||(t=new vt([],{})),0===t.segments.length&&t.hasChildren())return re(t,e,n);var i=function(t,e,n){for(var i=0,r=e,o={match:!1,pathIndex:0,commandIndex:0};r=n.length)return o;var a=t.segments[r],s=ne(n[i]),c=i0&&void 0===s)break;if(s&&c&&"object"==typeof c&&void 0===c.outlets){if(!ce(s,c,a))return o;i+=2}else{if(!ce(s,{},a))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,e,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex0?new vt([],{primary:t}):t;return new mt(i,e,n)}},{key:"expandSegmentGroup",value:function(t,e,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(Object(y.a)((function(t){return new vt([],t)}))):this.expandSegment(t,n,e,n.segments,i,!0)}},{key:"expandChildren",value:function(t,e,n){var i=this;return function(n,r){if(0===Object.keys(n).length)return Object(o.a)({});var a=[],s=[],c={};return pt(n,(function(n,r){var o,u,l=(o=r,u=n,i.expandSegmentGroup(t,e,u,o)).pipe(Object(y.a)((function(t){return c[r]=t})));"primary"===r?a.push(l):s.push(l)})),o.a.apply(null,a.concat(s)).pipe(Object(_.a)(),function(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Object(O.a)((function(e,n){return t(e,n,i)})):I.a,S(1),n?Object(A.a)(e):Object(P.a)((function(){return new f.a})))}}(),Object(y.a)((function(){return c})))}(n.children)}},{key:"expandSegment",value:function(t,e,n,i,r,a){var s=this;return Object(o.a).apply(void 0,b(n)).pipe(Object(y.a)((function(c){return s.expandSegmentAgainstRoute(t,e,n,c,i,r,a).pipe(Object(L.a)((function(t){if(t instanceof ge)return Object(o.a)(null);throw t})))})),Object(_.a)(),Object(N.a)((function(t){return!!t})),Object(L.a)((function(t,n){if(t instanceof f.a||"EmptyError"===t.name){if(s.noLeftoversInUrl(e,i,r))return Object(o.a)(new vt([],{}));throw new ge(e)}throw t})))}},{key:"noLeftoversInUrl",value:function(t,e,n){return 0===e.length&&!t.children[n]}},{key:"expandSegmentAgainstRoute",value:function(t,e,n,i,r,o,a){return Te(i)!==o?ve(e):void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,e,i,r):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,i,r,o):ve(e)}},{key:"expandSegmentAgainstRouteUsingRedirect",value:function(t,e,n,i,r,o){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,i,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,r,o)}},{key:"expandWildCardWithParamsAgainstRouteUsingRedirect",value:function(t,e,n,i){var r=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?ye(o):this.lineralizeSegments(n,o).pipe(Object(U.a)((function(n){var o=new vt(n,{});return r.expandSegment(t,o,e,n,i,!1)})))}},{key:"expandRegularSegmentAgainstRouteUsingRedirect",value:function(t,e,n,i,r,o){var a=this,s=ke(e,i,r),c=s.matched,u=s.consumedSegments,l=s.lastChild,d=s.positionalParamSegments;if(!c)return ve(e);var h=this.applyRedirectCommands(u,i.redirectTo,d);return i.redirectTo.startsWith("/")?ye(h):this.lineralizeSegments(i,h).pipe(Object(U.a)((function(i){return a.expandSegment(t,e,n,i.concat(r.slice(l)),o,!1)})))}},{key:"matchSegmentAgainstRoute",value:function(t,e,n,i){var r=this;if("**"===n.path)return n.loadChildren?Object(g.a)((function(){return r.configLoader.load(t.injector,n).pipe(Object(y.a)((function(t){return n._loadedConfig=t,new vt(i,{})})))})):Object(o.a)(new vt(i,{}));var a=ke(e,n,i),s=a.matched,c=a.consumedSegments,u=a.lastChild;if(!s)return ve(e);var l=i.slice(u);return this.getChildConfig(t,n,i).pipe(Object(U.a)((function(t){var n=t.module,i=t.routes,a=function(t,e,n,i){return n.length>0&&function(t,e,n){return n.some((function(n){return Ce(t,e,n)&&"primary"!==Te(n)}))}(t,n,i)?{segmentGroup:we(new vt(e,function(t,e){var n={};n.primary=e;var i,r=p(t);try{for(r.s();!(i=r.n()).done;){var o=i.value;""===o.path&&"primary"!==Te(o)&&(n[Te(o)]=new vt([],{}))}}catch(a){r.e(a)}finally{r.f()}return n}(i,new vt(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return n.some((function(n){return Ce(t,e,n)}))}(t,n,i)?{segmentGroup:we(new vt(t.segments,function(t,e,n,i){var r,o={},a=p(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;Ce(t,e,s)&&!i[Te(s)]&&(o[Te(s)]=new vt([],{}))}}catch(c){a.e(c)}finally{a.f()}return Object.assign(Object.assign({},i),o)}(t,n,i,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,c,l,i),s=a.segmentGroup,u=a.slicedSegments;return 0===u.length&&s.hasChildren()?r.expandChildren(n,i,s).pipe(Object(y.a)((function(t){return new vt(c,t)}))):0===i.length&&0===u.length?Object(o.a)(new vt(c,{})):r.expandSegment(n,s,i,u,"primary",!0).pipe(Object(y.a)((function(t){return new vt(c.concat(t.segments),t.children)})))})))}},{key:"getChildConfig",value:function(t,e,n){var i=this;return e.children?Object(o.a)(new de(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Object(o.a)(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(Object(U.a)((function(n){return n?i.configLoader.load(t.injector,e).pipe(Object(y.a)((function(t){return e._loadedConfig=t,t}))):function(t){return new h.a((function(e){return e.error(ct("Cannot load children because the guard of the route \"path: '".concat(t.path,"'\" returned false")))}))}(e)}))):Object(o.a)(new de([],t))}},{key:"runCanLoadGuards",value:function(t,e,n){var i=this,r=e.canLoad;if(!r||0===r.length)return Object(o.a)(!0);var a=r.map((function(i){var r,o=t.get(i);if(function(t){return t&&he(t.canLoad)}(o))r=o.canLoad(e,n);else{if(!he(o))throw new Error("Invalid CanLoad guard");r=o(e,n)}return bt(r)}));return Object(o.a)(a).pipe(be(),Object(F.a)((function(t){if(fe(t)){var e=ct('Redirecting to "'.concat(i.urlSerializer.serialize(t),'"'));throw e.url=t,e}})),Object(y.a)((function(t){return!0===t})))}},{key:"lineralizeSegments",value:function(t,e){for(var n=[],i=e.root;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return Object(o.a)(n);if(i.numberOfChildren>1||!i.children.primary)return _e(t.redirectTo);i=i.children.primary}}},{key:"applyRedirectCommands",value:function(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}},{key:"applyRedirectCreatreUrlTree",value:function(t,e,n,i){var r=this.createSegmentGroup(t,e.root,n,i);return new mt(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}},{key:"createQueryParams",value:function(t,e){var n={};return pt(t,(function(t,i){if("string"==typeof t&&t.startsWith(":")){var r=t.substring(1);n[i]=e[r]}else n[i]=t})),n}},{key:"createSegmentGroup",value:function(t,e,n,i){var r=this,o=this.createSegments(t,e.segments,n,i),a={};return pt(e.children,(function(e,o){a[o]=r.createSegmentGroup(t,e,n,i)})),new vt(o,a)}},{key:"createSegments",value:function(t,e,n,i){var r=this;return e.map((function(e){return e.path.startsWith(":")?r.findPosParam(t,e,i):r.findOrReturn(e,n)}))}},{key:"findPosParam",value:function(t,e,n){var i=n[e.path.substring(1)];if(!i)throw new Error("Cannot redirect to '".concat(t,"'. Cannot find '").concat(e.path,"'."));return i}},{key:"findOrReturn",value:function(t,e){var n,i=0,r=p(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.path===t.path)return e.splice(i),o;i++}}catch(a){r.e(a)}finally{r.f()}return t}}]),t}();function ke(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var i=(e.matcher||ut)(n,t,e);return i?{matched:!0,consumedSegments:i.consumed,lastChild:i.consumed.length,positionalParamSegments:i.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function we(t){if(1===t.numberOfChildren&&t.children.primary){var e=t.children.primary;return new vt(t.segments.concat(e.segments),e.children)}return t}function Ce(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function Te(t){return t.outlet||"primary"}var Se=function t(e){C(this,t),this.path=e,this.route=this.path[this.path.length-1]},Ee=function t(e,n){C(this,t),this.component=e,this.route=n};function xe(t,e,n){var i=function(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var n=e.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(e);return(i?i.module.injector:n).get(t)}function Pe(t,e,n){var i=zt(t),r=t.value;pt(i,(function(t,i){Pe(t,r.component?e?e.children.getContext(i):null:e,n)})),n.canDeactivateChecks.push(new Ee(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}function Ae(t,e){return null!==t&&e&&e(new it(t)),Object(o.a)(!0)}function Ie(t,e){return null!==t&&e&&e(new et(t)),Object(o.a)(!0)}function Me(t,e,n){var i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||0===i.length)return Object(o.a)(!0);var r=i.map((function(i){return Object(g.a)((function(){var r,o=xe(i,e,n);if(function(t){return t&&he(t.canActivate)}(o))r=bt(o.canActivate(e,t));else{if(!he(o))throw new Error("Invalid CanActivate guard");r=bt(o(e,t))}return r.pipe(Object(N.a)())}))}));return Object(o.a)(r).pipe(be())}function De(t,e,n){var i=e[e.length-1],r=e.slice(0,e.length-1).reverse().map((function(t){return function(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)})).filter((function(t){return null!==t})).map((function(e){return Object(g.a)((function(){var r=e.guards.map((function(r){var o,a=xe(r,e.node,n);if(function(t){return t&&he(t.canActivateChild)}(a))o=bt(a.canActivateChild(i,t));else{if(!he(a))throw new Error("Invalid CanActivateChild guard");o=bt(a(i,t))}return o.pipe(Object(N.a)())}));return Object(o.a)(r).pipe(be())}))}));return Object(o.a)(r).pipe(be())}var Re=function t(){C(this,t)},je=function(){function t(e,n,i,r,o,a){C(this,t),this.rootComponentType=e,this.config=n,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=a}return w(t,[{key:"recognize",value:function(){try{var t=Ue(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary"),n=new Qt([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),i=new Bt(n,e),r=new Wt(this.url,i);return this.inheritParamsAndData(r._root),Object(o.a)(r)}catch(a){return new h.a((function(t){return t.error(a)}))}}},{key:"inheritParamsAndData",value:function(t){var e=this,n=t.value,i=$t(n,this.paramsInheritanceStrategy);n.params=Object.freeze(i.params),n.data=Object.freeze(i.data),t.children.forEach((function(t){return e.inheritParamsAndData(t)}))}},{key:"processSegmentGroup",value:function(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}},{key:"processChildren",value:function(t,e){var n,i=this,r=Ot(e,(function(e,n){return i.processSegmentGroup(t,e,n)}));return n={},r.forEach((function(t){var e=n[t.value.outlet];if(e){var i=e.url.map((function(t){return t.toString()})).join("/"),r=t.value.url.map((function(t){return t.toString()})).join("/");throw new Error("Two segments cannot have the same outlet name: '".concat(i,"' and '").concat(r,"'."))}n[t.value.outlet]=t.value})),r.sort((function(t,e){return"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)})),r}},{key:"processSegment",value:function(t,e,n,i){var r,o=p(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;try{return this.processSegmentAgainstRoute(a,e,n,i)}catch(s){if(!(s instanceof Re))throw s}}}catch(c){o.e(c)}finally{o.f()}if(this.noLeftoversInUrl(e,n,i))return[];throw new Re}},{key:"noLeftoversInUrl",value:function(t,e,n){return 0===e.length&&!t.children[n]}},{key:"processSegmentAgainstRoute",value:function(t,e,n,i){if(t.redirectTo)throw new Re;if((t.outlet||"primary")!==i)throw new Re;var r,o=[],a=[];if("**"===t.path){var s=n.length>0?ft(n).parameters:{};r=new Qt(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,ze(t),i,t.component,t,Le(e),Ne(e)+n.length,Ve(t))}else{var c=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new Re;return{consumedSegments:[],lastChild:0,parameters:{}}}var i=(e.matcher||ut)(n,t,e);if(!i)throw new Re;var r={};pt(i.posParams,(function(t,e){r[e]=t.path}));var o=i.consumed.length>0?Object.assign(Object.assign({},r),i.consumed[i.consumed.length-1].parameters):r;return{consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:o}}(e,t,n);o=c.consumedSegments,a=n.slice(c.lastChild),r=new Qt(o,c.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,ze(t),i,t.component,t,Le(e),Ne(e)+o.length,Ve(t))}var u=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),l=Ue(e,o,a,u,this.relativeLinkResolution),d=l.segmentGroup,h=l.slicedSegments;if(0===h.length&&d.hasChildren()){var f=this.processChildren(u,d);return[new Bt(r,f)]}if(0===u.length&&0===h.length)return[new Bt(r,[])];var p=this.processSegment(u,d,h,"primary");return[new Bt(r,p)]}}]),t}();function Le(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function Ne(t){for(var e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)n+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return n-1}function Ue(t,e,n,i,r){if(n.length>0&&function(t,e,n){return n.some((function(n){return Fe(t,e,n)&&"primary"!==Be(n)}))}(t,n,i)){var o=new vt(e,function(t,e,n,i){var r={};r.primary=i,i._sourceSegment=t,i._segmentIndexShift=e.length;var o,a=p(n);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(""===s.path&&"primary"!==Be(s)){var c=new vt([],{});c._sourceSegment=t,c._segmentIndexShift=e.length,r[Be(s)]=c}}}catch(u){a.e(u)}finally{a.f()}return r}(t,e,i,new vt(n,t.children)));return o._sourceSegment=t,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return n.some((function(n){return Fe(t,e,n)}))}(t,n,i)){var a=new vt(t.segments,function(t,e,n,i,r,o){var a,s={},c=p(i);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(Fe(t,n,u)&&!r[Be(u)]){var l=new vt([],{});l._sourceSegment=t,l._segmentIndexShift="legacy"===o?t.segments.length:e.length,s[Be(u)]=l}}}catch(d){c.e(d)}finally{c.f()}return Object.assign(Object.assign({},r),s)}(t,e,n,i,t.children,r));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:n}}var s=new vt(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}function Fe(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function Be(t){return t.outlet||"primary"}function ze(t){return t.data||{}}function Ve(t){return t.resolve||{}}function He(t){return function(e){return e.pipe(Object(M.a)((function(e){var n=t(e);return n?Object(s.a)(n).pipe(Object(y.a)((function(){return e}))):Object(s.a)([e])})))}}var qe,$e=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(function(){function t(){C(this,t)}return w(t,[{key:"shouldDetach",value:function(t){return!1}},{key:"store",value:function(t,e){}},{key:"shouldAttach",value:function(t){return!1}},{key:"retrieve",value:function(t){return null}},{key:"shouldReuseRoute",value:function(t,e){return t.routeConfig===e.routeConfig}}]),t}()),Qe=((qe=function t(){C(this,t)}).\u0275fac=function(t){return new(t||qe)},qe.\u0275cmp=r.Ib({type:qe,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&r.Pb(0,"router-outlet")},directives:function(){return[vn]},encapsulation:2}),qe);function We(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n4&&void 0!==arguments[4]?arguments[4]:"emptyOnly",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"legacy";return new je(t,e,n,i,r,o).recognize()}(t,n,i.urlAfterRedirects,(a=i.urlAfterRedirects,e.serializeUrl(a)),r,o).pipe(Object(y.a)((function(t){return Object.assign(Object.assign({},i),{targetSnapshot:t})})));var a})))}}(e.rootComponentType,e.config,0,e.paramsInheritanceStrategy,e.relativeLinkResolution),Object(F.a)((function(t){"eager"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects)})),Object(F.a)((function(t){var i=new G(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);n.next(i)})));if(c&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var u=t.id,l=t.extractedUrl,d=t.source,h=t.restoredState,f=t.extras,p=new q(u,e.serializeUrl(l),d,h);n.next(p);var b=Ht(l,e.rootComponentType).snapshot;return Object(o.a)(Object.assign(Object.assign({},t),{targetSnapshot:b,urlAfterRedirects:l,extras:Object.assign(Object.assign({},f),{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,e.browserUrlTree=t.urlAfterRedirects,t.resolve(null),m.a})),He((function(t){var n=t.targetSnapshot,i=t.id,r=t.extractedUrl,o=t.rawUrl,a=t.extras,s=a.skipLocationChange,c=a.replaceUrl;return e.hooks.beforePreactivation(n,{navigationId:i,appliedUrlTree:r,rawUrlTree:o,skipLocationChange:!!s,replaceUrl:!!c})})),Object(F.a)((function(t){var n=new Y(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)})),Object(y.a)((function(t){return Object.assign(Object.assign({},t),{guards:(n=t.targetSnapshot,i=t.currentSnapshot,r=e.rootContexts,o=n._root,function t(e,n,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},a=zt(n);return e.children.forEach((function(e){!function(e,n,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},a=e.value,s=n?n.value:null,c=i?i.getContext(e.value.outlet):null;if(s&&a.routeConfig===s.routeConfig){var u=function(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!_t(t.url,e.url);case"pathParamsOrQueryParamsChange":return!_t(t.url,e.url)||!lt(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Zt(t,e)||!lt(t.queryParams,e.queryParams);case"paramsChange":default:return!Zt(t,e)}}(s,a,a.routeConfig.runGuardsAndResolvers);u?o.canActivateChecks.push(new Se(r)):(a.data=s.data,a._resolvedData=s._resolvedData),t(e,n,a.component?c?c.children:null:i,r,o),u&&o.canDeactivateChecks.push(new Ee(c&&c.outlet&&c.outlet.component||null,s))}else s&&Pe(n,c,o),o.canActivateChecks.push(new Se(r)),t(e,null,a.component?c?c.children:null:i,r,o)}(e,a[e.value.outlet],i,r.concat([e.value]),o),delete a[e.value.outlet]})),pt(a,(function(t,e){return Pe(t,i.getContext(e),o)})),o}(o,i?i._root:null,r,[o.value]))});var n,i,r,o})),function(t,e){return function(n){return n.pipe(Object(U.a)((function(n){var i=n.targetSnapshot,r=n.currentSnapshot,a=n.guards,c=a.canActivateChecks,u=a.canDeactivateChecks;return 0===u.length&&0===c.length?Object(o.a)(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,i){return Object(s.a)(t).pipe(Object(U.a)((function(t){return function(t,e,n,i,r){var a=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!a||0===a.length)return Object(o.a)(!0);var s=a.map((function(o){var a,s=xe(o,e,r);if(function(t){return t&&he(t.canDeactivate)}(s))a=bt(s.canDeactivate(t,e,n,i));else{if(!he(s))throw new Error("Invalid CanDeactivate guard");a=bt(s(t,e,n,i))}return a.pipe(Object(N.a)())}));return Object(o.a)(s).pipe(be())}(t.component,t.route,n,e,i)})),Object(N.a)((function(t){return!0!==t}),!0))}(u,i,r,t).pipe(Object(U.a)((function(n){return n&&"boolean"==typeof n?function(t,e,n,i){return Object(s.a)(e).pipe(Object(B.a)((function(e){return Object(s.a)([Ie(e.route.parent,i),Ae(e.route,i),De(t,e.path,n),Me(t,e.route,n)]).pipe(Object(_.a)(),Object(N.a)((function(t){return!0!==t}),!0))})),Object(N.a)((function(t){return!0!==t}),!0))}(i,c,t,e):Object(o.a)(n)})),Object(y.a)((function(t){return Object.assign(Object.assign({},n),{guardsResult:t})})))})))}}(e.ngModule.injector,(function(t){return e.triggerEvent(t)})),Object(F.a)((function(t){if(fe(t.guardsResult)){var n=ct('Redirecting to "'.concat(e.serializeUrl(t.guardsResult),'"'));throw n.url=t.guardsResult,n}})),Object(F.a)((function(t){var n=new K(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(n)})),Object(O.a)((function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var i=new Q(t.id,e.serializeUrl(t.extractedUrl),"");return n.next(i),t.resolve(!1),!1}return!0})),He((function(t){if(t.guards.canActivateChecks.length)return Object(o.a)(t).pipe(Object(F.a)((function(t){var n=new Z(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)})),Object(M.a)((function(t){var i,r,a=!1;return Object(o.a)(t).pipe((i=e.paramsInheritanceStrategy,r=e.ngModule.injector,function(t){return t.pipe(Object(U.a)((function(t){var e=t.targetSnapshot,n=t.guards.canActivateChecks;if(!n.length)return Object(o.a)(t);var a=0;return Object(s.a)(n).pipe(Object(B.a)((function(t){return function(t,e,n,i){return function(t,e,n,i){var r=Object.keys(t);if(0===r.length)return Object(o.a)({});var a={};return Object(s.a)(r).pipe(Object(U.a)((function(r){return function(t,e,n,i){var r=xe(t,e,i);return bt(r.resolve?r.resolve(e,n):r(e,n))}(t[r],e,n,i).pipe(Object(F.a)((function(t){a[r]=t})))})),S(1),Object(U.a)((function(){return Object.keys(a).length===r.length?Object(o.a)(a):m.a})))}(t._resolve,t,e,i).pipe(Object(y.a)((function(e){return t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),$t(t,n).resolve),null})))}(t.route,e,i,r)})),Object(F.a)((function(){return a++})),S(1),Object(U.a)((function(e){return a===n.length?Object(o.a)(t):m.a})))})))}),Object(F.a)({next:function(){return a=!0},complete:function(){if(!a){var i=new Q(t.id,e.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");n.next(i),t.resolve(!1)}}}))})),Object(F.a)((function(t){var n=new X(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)})))})),He((function(t){var n=t.targetSnapshot,i=t.id,r=t.extractedUrl,o=t.rawUrl,a=t.extras,s=a.skipLocationChange,c=a.replaceUrl;return e.hooks.afterPreactivation(n,{navigationId:i,appliedUrlTree:r,rawUrlTree:o,skipLocationChange:!!s,replaceUrl:!!c})})),Object(y.a)((function(t){var n=function(t,e,n){var i=function t(e,n,i){if(i&&e.shouldReuseRoute(n.value,i.value.snapshot)){var r=i.value;r._futureSnapshot=n.value;var o=function(e,n,i){return n.children.map((function(n){var r,o=p(i.children);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(e.shouldReuseRoute(a.value.snapshot,n.value))return t(e,n,a)}}catch(s){o.e(s)}finally{o.f()}return t(e,n)}))}(e,n,i);return new Bt(r,o)}var a=e.retrieve(n.value);if(a){var s=a.route;return function t(e,n){if(e.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=e.value;for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{},n=e.relativeTo,i=e.queryParams,o=e.fragment,a=e.preserveQueryParams,s=e.queryParamsHandling,c=e.preserveFragment;Object(r.X)()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var u=n||this.routerState.root,l=c?this.currentUrlTree.fragment:o,d=null;if(s)switch(s){case"merge":d=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=i||null}else d=a?this.currentUrlTree.queryParams:i||null;return null!==d&&(d=this.removeEmptyProps(d)),function(t,e,n,i,r){if(0===n.length)return Jt(e.root,e.root,e,i,r);var o=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new te(!0,0,t);var e=0,n=!1,i=t.reduce((function(t,i,r){if("object"==typeof i&&null!=i){if(i.outlets){var o={};return pt(i.outlets,(function(t,e){o[e]="string"==typeof t?t.split("/"):t})),[].concat(b(t),[{outlets:o}])}if(i.segmentPath)return[].concat(b(t),[i.segmentPath])}return"string"!=typeof i?[].concat(b(t),[i]):0===r?(i.split("/").forEach((function(i,r){0==r&&"."===i||(0==r&&""===i?n=!0:".."===i?e++:""!=i&&t.push(i))})),t):[].concat(b(t),[i])}),[]);return new te(n,e,i)}(n);if(o.toRoot())return Jt(e.root,new vt([],{}),e,i,r);var a=function(t,e,n){if(t.isAbsolute)return new ee(e.root,!0,0);if(-1===n.snapshot._lastPathIndex){var i=n.snapshot._urlSegment;return new ee(i,i===e.root,0)}var r=Xt(t.commands[0])?0:1;return function(t,e,n){for(var i=t,r=e,o=n;o>r;){if(o-=r,!(i=i.parent))throw new Error("Invalid number of '../'");r=i.segments.length}return new ee(i,!1,r-o)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+r,t.numberOfDoubleDots)}(o,e,t),s=a.processChildren?re(a.segmentGroup,a.index,o.commands):ie(a.segmentGroup,a.index,o.commands);return Jt(a.segmentGroup,s,e,i,r)}(u,this.currentUrlTree,t,d,l)}},{key:"navigateByUrl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};Object(r.X)()&&this.isNgZoneEnabled&&!r.B.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=fe(t)?t:this.parseUrl(t),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,e)}},{key:"navigate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};return function(t){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};C(this,t),this.router=e,this.viewportScroller=n,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}return w(t,[{key:"init",value:function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}},{key:"createScrollEvents",value:function(){var t=this;return this.router.events.subscribe((function(e){e instanceof q?(t.store[t.lastId]=t.viewportScroller.getScrollPosition(),t.lastSource=e.navigationTrigger,t.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof $&&(t.lastId=e.id,t.scheduleScrollEvent(e,t.router.parseUrl(e.urlAfterRedirects).fragment))}))}},{key:"consumeScrollEvents",value:function(){var t=this;return this.router.events.subscribe((function(e){e instanceof ot&&(e.position?"top"===t.options.scrollPositionRestoration?t.viewportScroller.scrollToPosition([0,0]):"enabled"===t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===t.options.anchorScrolling?t.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition([0,0]))}))}},{key:"scheduleScrollEvent",value:function(t,e){this.router.triggerEvent(new ot(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}},{key:"ngOnDestroy",value:function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}]),t}()).\u0275fac=function(t){return new(t||bn)(r.Yb(un),r.Yb(i.y),r.Yb(void 0))},bn.\u0275prov=r.Kb({token:bn,factory:bn.\u0275fac}),bn),Tn=new r.s("ROUTER_CONFIGURATION"),Sn=new r.s("ROUTER_FORROOT_GUARD"),En=[i.j,{provide:kt,useClass:wt},{provide:un,useFactory:function(t,e,n,r,o,a,s){var c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},u=arguments.length>8?arguments[8]:void 0,l=arguments.length>9?arguments[9]:void 0,d=new un(null,t,e,n,r,o,a,ht(s));if(u&&(d.urlHandlingStrategy=u),l&&(d.routeReuseStrategy=l),c.errorHandler&&(d.errorHandler=c.errorHandler),c.malformedUriErrorHandler&&(d.malformedUriErrorHandler=c.malformedUriErrorHandler),c.enableTracing){var h=Object(i.C)();d.events.subscribe((function(t){h.logGroup("Router Event: "+t.constructor.name),h.log(t.toString()),h.log(t),h.logGroupEnd()}))}return c.onSameUrlNavigation&&(d.onSameUrlNavigation=c.onSameUrlNavigation),c.paramsInheritanceStrategy&&(d.paramsInheritanceStrategy=c.paramsInheritanceStrategy),c.urlUpdateStrategy&&(d.urlUpdateStrategy=c.urlUpdateStrategy),c.relativeLinkResolution&&(d.relativeLinkResolution=c.relativeLinkResolution),d},deps:[kt,tn,i.j,r.t,r.y,r.i,Ze,Tn,[function(){return function t(){C(this,t)}}(),new r.C],[function(){return function t(){C(this,t)}}(),new r.C]]},tn,{provide:qt,useFactory:function(t){return t.routerState.root},deps:[un]},{provide:r.y,useClass:r.M},wn,kn,On,{provide:Tn,useValue:{enableTracing:!1}}];function xn(){return new r.A("Router",un)}var Pn,An=((Pn=function(){function t(e,n){C(this,t)}return w(t,null,[{key:"forRoot",value:function(e,n){return{ngModule:t,providers:[En,Rn(e),{provide:Sn,useFactory:Dn,deps:[[un,new r.C,new r.L]]},{provide:Tn,useValue:n||{}},{provide:i.k,useFactory:Mn,deps:[i.v,[new r.q(i.a),new r.C],Tn]},{provide:Cn,useFactory:In,deps:[un,i.y,Tn]},{provide:_n,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:kn},{provide:r.A,multi:!0,useFactory:xn},[Ln,{provide:r.d,multi:!0,useFactory:Nn,deps:[Ln]},{provide:Fn,useFactory:Un,deps:[Ln]},{provide:r.b,multi:!0,useExisting:Fn}]]}}},{key:"forChild",value:function(e){return{ngModule:t,providers:[Rn(e)]}}}]),t}()).\u0275mod=r.Mb({type:Pn}),Pn.\u0275inj=r.Lb({factory:function(t){return new(t||Pn)(r.Yb(Sn,8),r.Yb(un,8))}}),Pn);function In(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new Cn(t,e,n)}function Mn(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.useHash?new i.g(t,e):new i.t(t,e)}function Dn(t){if(t)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function Rn(t){return[{provide:r.a,multi:!0,useValue:t},{provide:Ze,multi:!0,useValue:t}]}var jn,Ln=((jn=function(){function t(e){C(this,t),this.injector=e,this.initNavigation=!1,this.resultOfPreactivationDone=new v.b}return w(t,[{key:"appInitializer",value:function(){var t=this;return this.injector.get(i.i,Promise.resolve(null)).then((function(){var e=null,n=new Promise((function(t){return e=t})),i=t.injector.get(un),r=t.injector.get(Tn);if(t.isLegacyDisabled(r)||t.isLegacyEnabled(r))e(!0);else if("disabled"===r.initialNavigation)i.setUpLocationChangeListener(),e(!0);else{if("enabled"!==r.initialNavigation)throw new Error("Invalid initialNavigation options: '".concat(r.initialNavigation,"'"));i.hooks.afterPreactivation=function(){return t.initNavigation?Object(o.a)(null):(t.initNavigation=!0,e(!0),t.resultOfPreactivationDone)},i.initialNavigation()}return n}))}},{key:"bootstrapListener",value:function(t){var e=this.injector.get(Tn),n=this.injector.get(wn),i=this.injector.get(Cn),o=this.injector.get(un),a=this.injector.get(r.g);t===a.components[0]&&(this.isLegacyEnabled(e)?o.initialNavigation():this.isLegacyDisabled(e)&&o.setUpLocationChangeListener(),n.setUpPreloading(),i.init(),o.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}},{key:"isLegacyEnabled",value:function(t){return"legacy_enabled"===t.initialNavigation||!0===t.initialNavigation||void 0===t.initialNavigation}},{key:"isLegacyDisabled",value:function(t){return"legacy_disabled"===t.initialNavigation||!1===t.initialNavigation}}]),t}()).\u0275fac=function(t){return new(t||jn)(r.Yb(r.t))},jn.\u0275prov=r.Kb({token:jn,factory:jn.\u0275fac}),jn);function Nn(t){return t.appInitializer.bind(t)}function Un(t){return t.bootstrapListener.bind(t)}var Fn=new r.s("Router Initializer")},"1XZd":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("ssKD");e.default=function(){function t(){}return t.equals=function(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(var n=0,i=t.length;n>1,s=i(n,e[a]);if(s>0)r=a+1;else{if(!(s<0))return a;o=a-1}}return-r-1},t.numberComparator=function(t,e){return t-e},t}()},"1a33":function(t,e,n){"use strict";n.r(e),n.d(e,"MobileScanComponent",(function(){return N}));var i=n("D57K"),r=n("zqNl"),o=n("JpLq"),a=n("Nhx6"),s=n("gxtV"),c=n("KQpv"),u=n.n(c),l=n("94ty"),d=n("9Ccw"),h=n("bjK4"),f=n("9baa"),p=n("ZTXN"),b=n("C05f"),g=n("GoAz"),m=n("ROBh"),v=n("YtkY"),y=n("8j5Y"),_=n("TLy2"),O=n("xVbo"),k=n("i67J"),T=n("kZht"),S=n("rfPA"),E=n("bBQR"),x=n("An66"),P=n("1etq"),A=n("aDqW"),I=n("anSm");function M(t,e){1&t&&(T.Ub(0,"div",5),T.Ub(1,"p",6),T.Qc(2,"DIALOG.SCAN_QR_CODE.NO_PERMISSION"),T.Tb(),T.Ub(3,"p",7),T.Qc(4,"DIALOG.SCAN_QR_CODE.UNSUPPORTED_DEVICE"),T.Tb(),T.Tb())}function D(t,e){if(1&t){var n=T.Vb();T.Ub(0,"zxing-scanner",8),T.bc("scanSuccess",(function(t){return T.Ec(n),T.fc().scanSuccessHandler(t)})),T.Tb()}if(2&t){var i=T.fc();T.mc("autostart",!1)("formats",i.scannerFormats)}}function R(t,e){if(1&t&&(T.Sb(0),T.Ub(1,"p",9),T.Qc(2,"DIALOG.SCAN_QR_CODE.CONFIRM_CODE"),T.Tb(),T.Ub(3,"div",10),T.Ub(4,"p",11),T.Qc(5),T.Tb(),T.Tb(),T.Rb()),2&t){var n=e.ngIf;T.Cb(5),T.Rc(n)}}var j=u()("app:mobile-scanner"),L=/back|rear|environment/gi,N=function(){var t=function(){function t(e){C(this,t),this.store=e,this.scannerFormats=[a.BarcodeFormat.QR_CODE],this.device$=new p.b,this.showPermissionWarning$=new b.a(!1),this.confirmationCode$=this.store.pipe(Object(r.m)(d.e)),this.hideScanner$=this.confirmationCode$.pipe(Object(v.a)((function(t){return t.isSome()}))),this.loading$=this.store.pipe(Object(r.m)(h.m,{filter:l.v.type}))}return w(t,[{key:"ngOnInit",value:function(){var t=this;this.hideScanner$.pipe(Object(k.g)(),Object(s.b)(this)).subscribe((function(){return t.scanner.device=null}))}},{key:"ngAfterViewInit",value:function(){var t=this;this.isWeb&&(j("scanner component",this.scanner),Object(g.a)(this.scanner.askForPermission()).pipe(Object(y.a)((function(t){return j("perms?",t)})),Object(_.a)((function(e){return e?Object(g.a)(t.scanner.updateVideoInputDevices()):(t.showPermissionWarning$.next(!0),Object(m.a)([]))})),Object(y.a)((function(t){return j("cameras",t)})),Object(O.a)((function(t){return t.length>0}))).subscribe((function(e){var n,i=null!==(n=e.find((function(t){return L.test(t.label)})))&&void 0!==n?n:e[0];i&&(j("selected device",i),t.scanner.device=i)})))}},{key:"scanSuccessHandler",value:function(t){this.store.dispatch(Object(l.v)({serializedPayload:t}))}},{key:"isNative",get:function(){var t;return null!==(t=f.a.isNative)&&void 0!==t&&t}},{key:"isWeb",get:function(){return!this.isNative}}]),t}();return t.\u0275fac=function(e){return new(e||t)(T.Ob(r.b))},t.\u0275cmp=T.Ib({type:t,selectors:[["mobile-scan"]],viewQuery:function(t,e){var n;1&t&&T.Wc(o.a,!0),2&t&&T.zc(n=T.cc())&&(e.scanner=n.first)},decls:8,vars:10,consts:[["heading","DIALOG.SCAN_QR_CODE.TITLE",3,"loading"],[1,"mobile-scan"],["class","denied",4,"ngIf"],["class","small-video",3,"autostart","formats","scanSuccess",4,"ngIf"],[4,"ngIf"],[1,"denied"],["subheading","","translate","",1,"global__text--warn"],["body","","translate",""],[1,"small-video",3,"autostart","formats","scanSuccess"],["subheading","","translate",""],[1,"mobile-scan__info"],["subheading","","color","accent"]],template:function(t,e){if(1&t&&(T.Ub(0,"pro-dialog",0),T.gc(1,"async"),T.Ub(2,"section",1),T.Oc(3,M,5,0,"div",2),T.gc(4,"async"),T.Oc(5,D,1,2,"zxing-scanner",3),T.Oc(6,R,6,1,"ng-container",4),T.gc(7,"async"),T.Tb(),T.Tb()),2&t){var n=null;T.mc("loading",T.hc(1,4,e.loading$)),T.Cb(3),T.mc("ngIf",T.hc(4,6,e.showPermissionWarning$)),T.Cb(2),T.mc("ngIf",e.isWeb),T.Cb(1),T.mc("ngIf",null==(n=T.hc(7,8,e.confirmationCode$))?null:n.orUndefined())}},directives:[S.a,E.a,x.n,P.a,A.a,I.a,o.a],pipes:[x.b],styles:[".mobile-scan__info[_ngcontent-%COMP%]{border:solid var(--accent-colour);text-align:center;padding:var(--spacing);margin:var(--spacing) 0}.small-video[_ngcontent-%COMP%] video{height:100vw!important}.denied[_ngcontent-%COMP%]{line-height:1.4}"],changeDetection:0}),t=Object(i.d)([Object(s.a)()],t)}()},"1a7C":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){function t(){}return t.prototype.RSSUtils=function(){},t.getRSSvalue=function(e,n,i){for(var r=0,o=0,a=e;o=u-l-1&&(h-=t.combins(r-d-(u-l),u-l-2)),u-l-1>1){for(var f=0,p=r-d-(u-l-2);p>n;p--)f+=t.combins(r-d-p-1,u-l-3);h-=f*(u-1-l)}else r-d>n&&h--;s+=h}r-=d}return s},t.combins=function(t,e){var n,i;t-e>e?(i=e,n=t-e):(i=t-e,n=e);for(var r=1,o=1,a=t;a>n;a--)r*=a,o<=i&&(r/=o,o++);for(;o<=i;)r/=o,o++;return r},t}()},"1aiz":function(t,e,n){var i=n("VTjg");e.render=function(t,e,n){var r=n,o=e;void 0!==r||e&&e.getContext||(r=e,e=void 0),e||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),r=i.getOptions(r);var a=i.getImageWidth(t.modules.size,r),s=o.getContext("2d"),c=s.createImageData(a,a);return i.qrToImageData(c.data,t,r),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,o,a),s.putImageData(c,0,0),o},e.renderToDataURL=function(t,n,i){var r=i;return void 0!==r||n&&n.getContext||(r=n,n=void 0),r||(r={}),e.render(t,n,r).toDataURL(r.type||"image/png",(r.rendererOpts||{}).quality)}},"1eaT":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("kZht"),r=n("anSm"),o=["*"],a=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["nutritional-info"]],ngContentSelectors:o,decls:2,vars:0,consts:[["body","",1,"grid"]],template:function(t,e){1&t&&(i.lc(),i.Ub(0,"div",0),i.kc(1),i.Tb())},directives:[r.a],styles:[".gap-xs-xs[_ngcontent-%COMP%]{gap:var(--spacing-xs) var(--spacing-xs)}.gap-xs-s[_ngcontent-%COMP%]{gap:var(--spacing-xs) var(--spacing-s)}.gap-xs-m[_ngcontent-%COMP%]{gap:var(--spacing-xs) var(--spacing-m)}.gap-xs-l[_ngcontent-%COMP%]{gap:var(--spacing-xs) var(--spacing-l)}.gap-xs-xl[_ngcontent-%COMP%]{gap:var(--spacing-xs) var(--spacing-xl)}.gap-s-xs[_ngcontent-%COMP%]{gap:var(--spacing-s) var(--spacing-xs)}.gap-s-s[_ngcontent-%COMP%]{gap:var(--spacing-s) var(--spacing-s)}.gap-s-m[_ngcontent-%COMP%]{gap:var(--spacing-s) var(--spacing-m)}.gap-s-l[_ngcontent-%COMP%]{gap:var(--spacing-s) var(--spacing-l)}.gap-s-xl[_ngcontent-%COMP%]{gap:var(--spacing-s) var(--spacing-xl)}.gap-m-xs[_ngcontent-%COMP%]{gap:var(--spacing-m) var(--spacing-xs)}.gap-m-s[_ngcontent-%COMP%]{gap:var(--spacing-m) var(--spacing-s)}.gap-m-m[_ngcontent-%COMP%]{gap:var(--spacing-m) var(--spacing-m)}.gap-m-l[_ngcontent-%COMP%]{gap:var(--spacing-m) var(--spacing-l)}.gap-m-xl[_ngcontent-%COMP%]{gap:var(--spacing-m) var(--spacing-xl)}.gap-l-xs[_ngcontent-%COMP%]{gap:var(--spacing-l) var(--spacing-xs)}.gap-l-s[_ngcontent-%COMP%]{gap:var(--spacing-l) var(--spacing-s)}.gap-l-m[_ngcontent-%COMP%]{gap:var(--spacing-l) var(--spacing-m)}.gap-l-l[_ngcontent-%COMP%]{gap:var(--spacing-l) var(--spacing-l)}.gap-l-xl[_ngcontent-%COMP%]{gap:var(--spacing-l) var(--spacing-xl)}.gap-xl-xs[_ngcontent-%COMP%]{gap:var(--spacing-xl) var(--spacing-xs)}.gap-xl-s[_ngcontent-%COMP%]{gap:var(--spacing-xl) var(--spacing-s)}.gap-xl-m[_ngcontent-%COMP%]{gap:var(--spacing-xl) var(--spacing-m)}.gap-xl-l[_ngcontent-%COMP%]{gap:var(--spacing-xl) var(--spacing-l)}.gap-xl-xl[_ngcontent-%COMP%]{gap:var(--spacing-xl) var(--spacing-xl)}[_nghost-%COMP%]{display:block;padding:var(--spacing) 0}[_nghost-%COMP%]:not(:last-of-type){border-bottom:1px dashed var(--border-colour-dark)}.grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;align-items:center;justify-content:space-between;gap:var(--spacing-m) var(--spacing-m)}"],changeDetection:0}),t}()},"1etq":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n}return w(t,[{key:"ngOnInit",value:function(){this.renderer.addClass(this.element.nativeElement,"global__text"),this.renderer.addClass(this.element.nativeElement,"global__text-subheading")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","subheading",""]]}),t}()},"1h0I":function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n("kZht"),r=n("1etq"),o=n("aDqW"),a=n("8spT"),s=n("TADc"),c=function(){var t=function t(){C(this,t),this.changeTradingUnits$=new i.o,this.changeWalletUnits$=new i.o};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["quantity-units-choice"]],inputs:{quantityUnits:"quantityUnits"},outputs:{changeTradingUnits$:"changeTradingUnits",changeWalletUnits$:"changeWalletUnits"},decls:23,vars:14,consts:[["subheading","","translate",""],["translate",""],[3,"value","change"],["value","order"],["value","notional"],[2,"--divider-margin","1em auto"],["value","face"],["value","market"]],template:function(t,e){1&t&&(i.Ub(0,"h2",0),i.Qc(1,"HEADING.TRADING_UNITS"),i.Tb(),i.Ub(2,"p",1),i.Qc(3,"EXPLAIN.TRADING_UNITS"),i.Tb(),i.Ub(4,"mat-radio-group",2),i.bc("change",(function(t){return e.changeTradingUnits$.emit(t.value)})),i.Ub(5,"mat-radio-button",3),i.Qc(6),i.gc(7,"translate"),i.Tb(),i.Ub(8,"mat-radio-button",4),i.Qc(9),i.gc(10,"translate"),i.Tb(),i.Tb(),i.Pb(11,"sb-divider",5),i.Ub(12,"h2",0),i.Qc(13,"HEADING.WALLET_UNITS"),i.Tb(),i.Ub(14,"p",1),i.Qc(15,"EXPLAIN.WALLET_UNITS"),i.Tb(),i.Ub(16,"mat-radio-group",2),i.bc("change",(function(t){return e.changeWalletUnits$.emit(t.value)})),i.Ub(17,"mat-radio-button",6),i.Qc(18),i.gc(19,"translate"),i.Tb(),i.Ub(20,"mat-radio-button",7),i.Qc(21),i.gc(22,"translate"),i.Tb(),i.Tb()),2&t&&(i.Cb(4),i.mc("value",e.quantityUnits.trading),i.Cb(2),i.Sc(" ",i.hc(7,6,"TRADING_UNITS.ORDER")," "),i.Cb(3),i.Sc(" ",i.hc(10,8,"TRADING_UNITS.NOTIONAL")," "),i.Cb(7),i.mc("value",e.quantityUnits.wallet),i.Cb(2),i.Sc(" ",i.hc(19,10,"WALLET_UNITS.FACE")," "),i.Cb(3),i.Sc(" ",i.hc(22,12,"WALLET_UNITS.MARKET")," "))},directives:[r.a,o.a,a.b,a.a,s.a],pipes:[o.d],styles:["[_nghost-%COMP%]{display:block;font-family:var(--typeface);color:var(--text-colour)}p[_ngcontent-%COMP%]{margin:.25em 0;line-height:1.4}h2[_ngcontent-%COMP%]{margin-bottom:.2em 0;line-height:1.2}mat-radio-button[_ngcontent-%COMP%]:not(:last-child){margin-right:var(--spacing-l)}"],changeDetection:0}),t}()},"1o0v":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n}return w(t,[{key:"ngOnInit",value:function(){this.renderer.addClass(this.element.nativeElement,"global__text--ghost")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","ghost",""]]}),t}()},"1u95":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return c}));var i=n("zqNl"),r=Object(i.g)("Get Initial Margin",Object(i.l)()),o=Object(i.g)("Get Bracket Initial Margin",Object(i.l)()),a=Object(i.g)("Set Initial Margin",Object(i.l)()),s=Object(i.g)("Set Edit Initial Margin",Object(i.l)()),c=Object(i.g)("Set Bracket Initial Margin",Object(i.l)())},"25CY":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},"2Agw":function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("4Pxi"),a=n("ZCEf"),s=n("KFdt"),c=n("Qkwj"),u=n("iiuT"),l=n("KZGf"),d=n("ssKD"),h=n("nB6u"),f=n("LqyJ");e.default=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.narrowLineWidth=-1,e}return r(e,t),e.prototype.decodeRow=function(t,n,i){var r=this.decodeStart(n),u=this.decodeEnd(n),d=new l.default;e.decodeMiddle(n,r[1],u[0],d);var f=d.toString(),p=null;null!=i&&(p=i.get(a.default.ALLOWED_LENGTHS)),null==p&&(p=e.DEFAULT_ALLOWED_LENGTHS);for(var b=f.length,g=!1,m=0,v=0,y=p;vm&&(m=_)}if(!g&&b>m&&(g=!0),!g)throw new h.default;var O=[new c.default(r[1],t),new c.default(u[0],t)];return new s.default(f,null,0,O,o.default.ITF,(new Date).getTime())},e.decodeMiddle=function(t,n,i,r){var o=new Array(10),a=new Array(5),s=new Array(5);for(o.fill(0),a.fill(0),s.fill(0);n0&&i>=0&&!t.get(i);i--)n--;if(0!==n)throw new f.default},e.skipWhiteSpace=function(t){var e=t.getSize(),n=t.getNextSet(0);if(n===e)throw new f.default;return n},e.prototype.decodeEnd=function(t){t.reverse();try{var n=e.skipWhiteSpace(t),i=void 0;try{i=e.findGuardPattern(t,n,e.END_PATTERN_REVERSED[0])}catch(o){i=e.findGuardPattern(t,n,e.END_PATTERN_REVERSED[1])}this.validateQuietZone(t,i[0]);var r=i[0];return i[0]=t.getSize()-i[1],i[1]=t.getSize()-r,i}finally{t.reverse()}},e.findGuardPattern=function(t,n,i){var r=i.length,o=new Array(r),a=t.getSize(),s=!1,c=0,l=n;o.fill(0);for(var h=n;h=0)return i%10;throw new f.default},e.W=3,e.w=2,e.N=1,e.PATTERNS=[[1,1,2,2,1],[2,1,1,1,2],[1,2,1,1,2],[2,2,1,1,1],[1,1,2,1,2],[2,1,2,1,1],[1,2,2,1,1],[1,1,1,2,2],[2,1,1,2,1],[1,2,1,2,1],[1,1,3,3,1],[3,1,1,1,3],[1,3,1,1,3],[3,3,1,1,1],[1,1,3,1,3],[3,1,3,1,1],[1,3,3,1,1],[1,1,1,3,3],[3,1,1,3,1],[1,3,1,3,1]],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=[1,1,1,1],e.END_PATTERN_REVERSED=[[1,1,2],[1,1,3]],e}(u.default)},"2Xgx":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function t(e,n){C(this,t),this.renderer=e,this.element=n,this.renderer.addClass(this.element.nativeElement,"sb__card")};return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","sb-card",""]]}),t}()},"2YH/":function(t,e,n){"use strict";n.d(e,"a",(function(){return B}));var i=n("kZht"),r=n("3kIJ"),o=n("C05f"),a=n("jOdJ"),s=n("YtkY"),c=n("pjhv"),u=n("lE9u"),l=n("lx5p"),d=n("nXdR"),h=n("zqNl"),f=n("anSm"),p=n("EmXI"),g=n("scAs"),m=n("oiza"),v=n("aDqW"),y=n("IOEv"),_=n("An66"),O=n("Eu46"),k=n("hCLc"),T=n("NxuZ"),S=n("Tcl6"),E=n("yPvj"),x=n("pTnX"),P=n("1eaT"),A=n("+I9z"),I=n("1o0v"),M=n("P0Um"),D=n("DpwM");function R(t,e){if(1&t&&(i.Ub(0,"mat-option",23),i.Qc(1),i.gc(2,"walletName"),i.gc(3,"walletType"),i.Tb()),2&t){var n=e.$implicit;i.mc("value",n.name),i.Cb(1),i.Tc(" ",i.hc(2,3,n.name)," ",i.hc(3,5,n.type)," Wallet ")}}var j=function(t){return{"global__text--warn":t}};function L(t,e){if(1&t&&(i.Ub(0,"nutritional-info"),i.Ub(1,"span",24),i.Qc(2),i.gc(3,"translate"),i.Tb(),i.Pb(4,"ghost-trail",25),i.gc(5,"cryptoPrecise"),i.Tb()),2&t){var n=e.ngLet,r=i.fc();i.Cb(1),i.mc("ngClass",i.rc(8,j,null==r.form.get("amount").errors?null:r.form.get("amount").errors.amountOverBalance)),i.Cb(1),i.Sc(" ",i.hc(3,3,r.originBalanceLabel)," "),i.Cb(2),i.mc("content",i.ic(5,5,n,r.selected.currency))}}function N(t,e){if(1&t&&(i.Ub(0,"mat-option",23),i.Qc(1),i.gc(2,"walletName"),i.gc(3,"walletType"),i.Tb()),2&t){var n=e.$implicit;i.mc("value",n.name),i.Cb(1),i.Tc(" ",i.hc(2,3,n.name)," ",i.hc(3,5,n.type)," Wallet ")}}function U(t,e){if(1&t&&(i.Ub(0,"nutritional-info"),i.Ub(1,"span"),i.Qc(2),i.gc(3,"translate"),i.Tb(),i.Pb(4,"ghost-trail",25),i.gc(5,"cryptoPrecise"),i.Tb()),2&t){var n=e.ngLet,r=i.fc();i.Cb(2),i.Rc(i.hc(3,2,r.destinationBalanceLabel)),i.Cb(2),i.mc("content",i.ic(5,4,n,r.selected.currency))}}function F(t,e){if(1&t){var n=i.Vb();i.Ub(0,"mat-form-field",26),i.Ub(1,"mat-label",5),i.Qc(2,"FORM.USD_AMOUNT"),i.Tb(),i.Ub(3,"span",27),i.Qc(4,"\u2248"),i.Tb(),i.Ub(5,"input",28),i.bc("input",(function(){return i.Ec(n),i.fc().setAmount()})),i.Tb(),i.Pb(6,"market-icon",29),i.Tb()}}var B=function(){var t=function(){function t(e,n){C(this,t),this.store=e,this.fb=n,this.form=this.buildForm(),this.origins$=new o.a(void 0),this.destinations$=new o.a(void 0),this.transfer=new i.o}return w(t,[{key:"ngOnChanges",value:function(t){var e,n;if(null===(e=t.selected)||void 0===e?void 0:e.currentValue){var i=t.selected.currentValue;this.form.reset(),null===(n=this.form.get("origin"))||void 0===n||n.setValue(i.name),this.setWallets(i.name)}}},{key:"buildForm",value:function(){return this.fb.group({origin:["",r.x.required],amount:[0,[r.x.required,r.x.min(1e-12),this.amountValidator.bind(this)]],usdAmount:[0],destination:["",r.x.required]})}},{key:"amountValidator",value:function(t){var e=this;try{var n=this.rawWallets.find((function(t){var n;return t.name===(null===(n=e.form.get("origin"))||void 0===n?void 0:n.value)}));return"futures"===n.type?n.am>=t.value?null:{amountOverBalance:!0}:n.balance>=t.value?null:{amountOverBalance:!0}}catch(i){return null}}},{key:"setWallets",value:function(t){var e=this.rawWallets.find((function(e){return e.name===t}));this.setOrigins(e,this.rawWallets),this.setDestination(e,this.rawWallets)}},{key:"setOrigins",value:function(t,e){var n,i=e.filter((function(e){return e.currency===(null==t?void 0:t.currency)||"BTC"===e.currency&&"XBT"===t.currency||"XBT"===e.currency&&"BTC"===t.currency}));null===(n=this.form.get("origin"))||void 0===n||n.setValue(null==t?void 0:t.name),this.origins$.next(i)}},{key:"setDestination",value:function(t,e){var n,i=e.filter((function(e){return e.currency===(null==t?void 0:t.currency)||"BTC"===e.currency&&"XBT"===t.currency||"XBT"===e.currency&&"BTC"===t.currency})).filter((function(e){return e.name!==(null==t?void 0:t.name)||e.type!==t.type}));null===(n=this.form.get("destination"))||void 0===n||n.setValue(i[0].name),this.destinations$.next(i)}},{key:"setWalletPercentage",value:function(t){var e,n=null===(e=this.form.get("origin"))||void 0===e?void 0:e.value,i=this.rawWallets.find((function(t){return t.name===n})),r=Object(c.b)(i.currency,!0),o=Math.pow(10,r),a=i.am?i.am:i.balance;if(1===t)return this.form.get("amount").setValue(a),void this.setUSDAmount();var s=Math.min(a*t,a),u=Math.floor(s*o)/o;this.form.get("amount").setValue(u),this.setUSDAmount()}},{key:"submitTransfer",value:function(){var t,e=this,n=this.rawWallets.find((function(t){var n;return t.name===(null===(n=e.form.get("origin"))||void 0===n?void 0:n.value)})),i=this.rawWallets.find((function(t){var n;return t.name===(null===(n=e.form.get("destination"))||void 0===n?void 0:n.value)}));this.store.dispatch(Object(u.y)({quantity:null===(t=this.form.get("amount"))||void 0===t?void 0:t.value,asset:n.currency,source:n,destination:i}))}},{key:"switch",value:function(){var t,e,n=this,i=this.rawWallets.find((function(t){var e;return t.name===(null===(e=n.form.get("destination"))||void 0===e?void 0:e.value)}));null===(t=this.form.get("origin"))||void 0===t||t.setValue(null==i?void 0:i.name),this.setWallets(null==i?void 0:i.name),null===(e=this.form.get("amount"))||void 0===e||e.updateValueAndValidity()}},{key:"setUSDAmount",value:function(){var t,e,n=null===(t=this.form.get("amount"))||void 0===t?void 0:t.value;null===(e=this.form.get("usdAmount"))||void 0===e||e.setValue(Object(l.I)(.001)(n*this.price))}},{key:"setAmount",value:function(){var t,e,n=null===(t=this.form.get("usdAmount"))||void 0===t?void 0:t.value;null===(e=this.form.get("amount"))||void 0===e||e.setValue((n/this.price).toFixed(Object(c.b)(this.selected.currency,!0)))}},{key:"rawWallets",get:function(){var t,e=this.wallets,n=e.holding,i=e.futures,r=e.flex,o=[].concat(b(n.values()),b(i.values()));return(null==r?void 0:r.flexAssets)&&this.flexEnabled&&o.push.apply(o,b(null===(t=r.flexAssets)||void 0===t?void 0:t.values())),o.sort(d.r)}},{key:"balance$",get:function(){var t=this;return this.origins$.pipe(Object(a.a)(),Object(s.a)((function(e){var n,i=null===(n=t.form.get("origin"))||void 0===n?void 0:n.value,r=null==e?void 0:e.find((function(t){return t.name===i}));return"holding"===r.type?r.balance:r.am})))}},{key:"margin$",get:function(){var t=this;return this.destinations$.pipe(Object(a.a)(),Object(s.a)((function(e){var n,i=null===(n=t.form.get("destination"))||void 0===n?void 0:n.value,r=null==e?void 0:e.find((function(t){return t.name===i}));return"holding"===r.type?r.balance:r.am})))}},{key:"amount",get:function(){var t;return null===(t=this.form.get("amount"))||void 0===t?void 0:t.value}},{key:"originBalanceLabel",get:function(){var t=this,e=this.rawWallets.find((function(e){var n;return e.name===(null===(n=t.form.get("origin"))||void 0===n?void 0:n.value)}));return e?"holding"===e.type?"LABEL.BALANCE":"LABEL.AVAILABLE_MARGIN":"LABEL.BALANCE"}},{key:"destinationBalanceLabel",get:function(){var t=this,e=this.rawWallets.find((function(e){var n;return e.name===(null===(n=t.form.get("destination"))||void 0===n?void 0:n.value)}));return e?"holding"===e.type?"LABEL.BALANCE":"LABEL.AVAILABLE_MARGIN":"LABEL.BALANCE"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(h.b),i.Ob(r.d))},t.\u0275cmp=i.Ib({type:t,selectors:[["crypto-transfer-form"]],inputs:{selected:"selected",wallets:"wallets",ticker:"ticker",price:"price",market:"market",loading:"loading",flexEnabled:"flexEnabled"},outputs:{transfer:"transfer"},features:[i.Ab],decls:41,vars:24,consts:[["body","",3,"formGroup","ngSubmit"],["body","","bold","","uppercase","","translate",""],[1,"transfer-grid"],[1,"from"],["color","accent","appearance","fill",1,"no-padding"],["translate",""],["matNativeControl","","formControlName","origin",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf"],[1,"from-balance"],[4,"ngLet"],[1,"switch"],["mat-raised-button","","type","button","body","",1,"mat-small-button",3,"click"],["icon","transfer","size","2x"],[1,"to"],["matNativeControl","","formControlName","destination"],[1,"to-balance"],["color","accent","appearance","fill",1,"market-form"],["matInput","","formControlName","amount","required","","type","number","min","0","inputmode","numeric","autocomplete","off",3,"input"],["amountField",""],["matSuffix","","mat-raised-button","","body","","type","button",1,"mat-small-button",3,"click"],["matSuffix","",1,"form-icon",3,"base"],["color","accent","appearance","fill",4,"ngIf"],["mat-raised-button","",3,"disabled"],[3,"value"],[3,"ngClass"],[3,"content"],["color","accent","appearance","fill"],["ghost","","matPrefix","",1,"estimate"],["matInput","","formControlName","usdAmount","type","number","min","0","inputmode","numeric","autocomplete","off",3,"input"],["matSuffix","","base","USD",1,"form-icon"]],template:function(t,e){1&t&&(i.Ub(0,"form",0),i.bc("ngSubmit",(function(){return e.submitTransfer()})),i.Ub(1,"mat-label",1),i.Qc(2,"LABEL.TRANSFER_BETWEEN_WALLETS"),i.Tb(),i.Ub(3,"div",2),i.Ub(4,"div",3),i.Ub(5,"mat-form-field",4),i.Ub(6,"mat-label",5),i.Qc(7,"FORM.FROM"),i.Tb(),i.Ub(8,"mat-select",6),i.bc("selectionChange",(function(t){return e.setWallets(t.value)})),i.Oc(9,R,4,7,"mat-option",7),i.gc(10,"async"),i.Tb(),i.Tb(),i.Tb(),i.Ub(11,"div",8),i.Oc(12,L,6,10,"nutritional-info",9),i.gc(13,"async"),i.Tb(),i.Ub(14,"div",10),i.Ub(15,"button",11),i.bc("click",(function(){return e.switch()})),i.Pb(16,"fa-icon",12),i.Tb(),i.Tb(),i.Ub(17,"div",13),i.Ub(18,"mat-form-field",4),i.Ub(19,"mat-label",5),i.Qc(20,"FORM.TO"),i.Tb(),i.Ub(21,"mat-select",14),i.Oc(22,N,4,7,"mat-option",7),i.gc(23,"async"),i.Tb(),i.Tb(),i.Tb(),i.Ub(24,"div",15),i.Oc(25,U,6,7,"nutritional-info",9),i.gc(26,"async"),i.Tb(),i.Tb(),i.Ub(27,"mat-form-field",16),i.Ub(28,"mat-label",5),i.Qc(29,"FORM.AMOUNT"),i.Tb(),i.Ub(30,"input",17,18),i.bc("input",(function(){return e.setUSDAmount()})),i.Tb(),i.Ub(32,"button",19),i.bc("click",(function(){return e.setWalletPercentage(1)})),i.Qc(33),i.gc(34,"uppercase"),i.gc(35,"translate"),i.Tb(),i.Pb(36,"market-icon",20),i.Tb(),i.Oc(37,F,7,0,"mat-form-field",21),i.Ub(38,"button",22),i.Qc(39),i.gc(40,"translate"),i.Tb(),i.Tb()),2&t&&(i.mc("formGroup",e.form),i.Cb(9),i.mc("ngForOf",i.hc(10,10,e.origins$)),i.Cb(3),i.mc("ngLet",i.hc(13,12,e.balance$)),i.Cb(10),i.mc("ngForOf",i.hc(23,14,e.destinations$)),i.Cb(3),i.mc("ngLet",i.hc(26,16,e.margin$)),i.Cb(8),i.Sc(" ",i.hc(34,18,i.hc(35,20,"BUTTON.MAX"))," "),i.Cb(3),i.mc("base",e.selected.currency),i.Cb(1),i.mc("ngIf",e.price),i.Cb(1),i.mc("disabled",e.form.invalid||e.loading),i.Cb(1),i.Sc(" ",i.hc(40,22,"BUTTON.SUBMIT_TRANSFER")," "))},directives:[r.z,r.p,f.a,r.h,p.f,g.a,m.a,v.a,p.c,y.a,r.o,r.g,_.m,O.a,k.b,T.b,S.b,r.c,r.s,r.v,p.h,E.a,_.n,x.n,P.a,_.l,A.a,I.a,p.g],pipes:[_.b,_.x,v.d,M.a,M.b,D.b],styles:['button[_ngcontent-%COMP%], mat-form-field[_ngcontent-%COMP%]{width:100%}.transfer-grid[_ngcontent-%COMP%]{margin-top:var(--spacing)}@media (max-width:1024px){.transfer-grid[_ngcontent-%COMP%]{display:flex;flex-direction:column}.transfer-grid[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.transfer-grid[_ngcontent-%COMP%] .switch[_ngcontent-%COMP%]{display:none}}@media (min-width:1025px){.transfer-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr auto 1fr;grid-template-rows:auto auto;grid-template:"from switch to" auto "fromBalance empty toBalance" auto/min-content min-content min-content;grid-column-gap:var(--spacing)}.transfer-grid.subaccount[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr;grid-template:"from-account to-account" auto "from to" auto "fromBalance toBalance" auto/auto}.transfer-grid[_ngcontent-%COMP%] .from-account[_ngcontent-%COMP%]{grid-area:from-account}.transfer-grid[_ngcontent-%COMP%] .to-account[_ngcontent-%COMP%]{grid-area:to-account}.transfer-grid[_ngcontent-%COMP%] .from[_ngcontent-%COMP%]{grid-area:from}.transfer-grid[_ngcontent-%COMP%] .to[_ngcontent-%COMP%]{grid-area:to}.transfer-grid[_ngcontent-%COMP%] .switch[_ngcontent-%COMP%]{align-self:center;grid-area:switch}.transfer-grid[_ngcontent-%COMP%] .switch[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:42px!important}.transfer-grid[_ngcontent-%COMP%] .from-balance[_ngcontent-%COMP%]{grid-area:fromBalance}.transfer-grid[_ngcontent-%COMP%] .to-balance[_ngcontent-%COMP%]{grid-area:toBalance}}.estimate[_ngcontent-%COMP%]{font-size:2em;margin-right:var(--spacing)}'],changeDetection:0}),t}()},"2gaf":function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("w6/c");e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.default)},"2hZ/":function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var i=n("D57K"),r=n("gxtV"),o=n("zqNl"),a=n("xVbo"),s=n("bjK4"),c=n("kZht"),u=n("LBlH"),l=n("y1fC"),d=n("pPqe"),h=n("w2Kr"),f=n("1etq"),p=n("aDqW"),b=["tourStep"];function g(t,e){if(1&t){var n=c.Vb();c.Ub(0,"tour-step",3),c.bc("dispose",(function(){return c.Ec(n),c.fc().disposePopper(1)})),c.Ub(1,"p",4),c.Qc(2," Start using the Multi-collateral single wallet by transferring assets from your Holding or Single Collateral Wallets to the Multi-Collateral Wallet. "),c.Tb(),c.Ub(3,"p",4),c.Qc(4," You can deposit one or more collateral of your choosing (fiat, crypto, stablecoin) to get exposure to more than 20 contracts available using a single wallet. Your wallet will be valued and margined in USD. "),c.Tb(),c.Tb()}2&t&&c.mc("title","Multi-collateral, single wallet")("image","flex-wallets")("minHeight","300px")}function m(t,e){if(1&t){var n=c.Vb();c.Ub(0,"tour-step",3),c.bc("dispose",(function(){return c.Ec(n),c.fc().disposePopper(2)})),c.Ub(1,"p",4),c.Qc(2," You can choose to trade from a wide variety of contracts using your single multi-collateral wallet. "),c.Tb(),c.Tb()}2&t&&c.mc("title","Variety of 20+ contracts")("image","flex-contracts")("minHeight","300px")}function v(t,e){if(1&t){var n=c.Vb();c.Ub(0,"tour-step",3),c.bc("dispose",(function(){return c.Ec(n),c.fc().disposePopper(3)})),c.Ub(1,"p",4),c.Qc(2," Decide to trade contracts in Isolated Margin Mode, and allocate amounts of margin to each contract, or choose Cross Margin Mode with your total available margin shared across all open positions. "),c.Tb(),c.Ub(3,"p",4),c.Qc(4," Adjust the leverage of your isolated positions depending on how much of your margin you want to put at risk. "),c.Tb(),c.Tb()}2&t&&c.mc("title","Flexibility with your risk appetite")("image","flex-isolated")("minHeight","300px")}function y(t,e){if(1&t){var n=c.Vb();c.Ub(0,"tour-step",3),c.bc("dispose",(function(){return c.Ec(n),c.fc().disposePopper(4)})),c.Ub(1,"p",4),c.Qc(2," Choose which currency to realize your Profit on a per contract basis. This can be a different currency than your collateral. "),c.Tb(),c.Tb()}2&t&&c.mc("title","Choose your realized Profit Currency:")("image","flex-pnl")("minHeight","300px")}function _(t,e){if(1&t){var n=c.Vb();c.Ub(0,"tour-step",3),c.bc("dispose",(function(){return c.Ec(n),c.fc().disposePopper(5)})),c.Ub(1,"p",4),c.Qc(2," Experience fully customizable workspaces, with draggable widgets that can be turned on and off depending on what you want to actively monitor. "),c.Tb(),c.Tb()}2&t&&c.mc("title","Customizable user experience")("image","flex-custom")("minHeight","300px")}var O=function(){var t=function(){function t(e){C(this,t),this.store=e,this.tour$=this.store.pipe(Object(o.m)(s.k))}return w(t,[{key:"ngAfterViewInit",value:function(){var t=this;this.tour$.pipe(Object(r.b)(this),Object(a.a)((function(t){return t.inProgress})),Object(a.a)((function(t){return"flex"===t.type})),Object(a.a)((function(t){var e=t.step;return e>0&&e0)("ngIfElse",i)}}var L=function(t){return{pair:t}};function N(t,e){if(1&t&&(g.Ub(0,"p"),g.Qc(1),g.gc(2,"translate"),g.Tb()),2&t){var n=e.ngIfSome;g.Cb(1),g.Sc(" ",g.ic(2,1,"NO_CONTENT.PAIR_OPEN_POSITIONS",g.rc(4,L,n))," ")}}function U(t,e){1&t&&(g.Ub(0,"p",14),g.Qc(1,"NO_CONTENT.OPEN_POSITIONS"),g.Tb())}function F(t,e){if(1&t&&(g.Ub(0,"section",10),g.Pb(1,"fa-icon",11),g.Oc(2,N,3,6,"p",12),g.gc(3,"async"),g.Oc(4,U,2,0,"ng-template",null,13,g.Pc),g.Tb()),2&t){var n=g.Ac(5),i=g.fc();g.Cb(2),g.mc("ngIfSome",g.hc(3,2,i.filterPair$))("ngIfSomeElse",n)}}function B(t,e){1&t&&g.Pb(0,"kraken-loading")}var z=function(){var t=function(){function t(e,n,i){C(this,t),this.store=e,this.translate=n,this.market=i,this.flexOnly=!1,this.instruments$=this.store.pipe(Object(r.m)(l.f)),this.tickers$=this.store.pipe(Object(r.m)(d.o)),this.filterPair$=this.store.pipe(Object(r.m)(p.q)),this.displayTooltips$=this.store.pipe(Object(r.m)(p.y))}return w(t,[{key:"ngOnInit",value:function(){this.positions$=this.store.pipe(Object(r.m)(this.flexOnly?h.e:h.k),Object(s.p)())}},{key:"selectTicker",value:function(t){var e=t.symbol,n=t.replaceUrl;this.market.navigateToMarket(e,n)}},{key:"marketClose",value:function(t){var e=t.position,n=e.balance>0?"Long":"Short",i={symbol:e.instrument,side:e.balance>0?"sell":"buy",size:Math.abs(e.balance),orderType:"market",reduceOnly:!0},r={title:"DIALOG.CONFIRM_CLOSE_POSITION.TITLE",subtitle:"DIALOG.CONFIRM_CLOSE_POSITION.SUBTITLE",body:this.translate.instant("DIALOG.CONFIRM_CLOSE_POSITION.CONTENT",{direction:n,size:e.balance.toLocaleString(),contract:e.instrument}),buttons:[{label:"BUTTON.YES",colour:"accent",actions:[Object(u.o)(i),Object(c.c)()]},{label:"BUTTON.NO",colour:"warn",actions:[Object(c.c)()]}]};this.store.dispatch(Object(c.g)({name:"confirmation",inputs:r}))}},{key:"limitClose",value:function(t){var e=this,n=t.position;Object(o.a)([this.tickers$,this.instruments$]).pipe(Object(a.a)()).subscribe((function(t){var i=m(t,2),r=i[0],o=i[1],a=r.get(n.instrument),s=o.get(n.instrument);e.store.dispatch(Object(c.g)({name:"limit-close",inputs:{position:n,ticker:a,instrument:s}}))}))}},{key:"viewDetailed",value:function(t){var e=this,n=t.position;this.instruments$.pipe(Object(s.h)()).subscribe((function(t){var i=t.get(n.instrument);e.store.dispatch(Object(c.g)({name:"position-details",inputs:{position:n,instrument:i}}))}))}},{key:"sharePosition",value:function(t){var e=this,n=t.position;this.instruments$.pipe(Object(s.h)()).subscribe((function(t){var i=t.get(n.instrument);e.store.dispatch(Object(c.g)({name:"share-position",inputs:{position:n,instrument:i}}))}))}},{key:"viewLvgPrefs",value:function(t){var e=this,n=t.position;this.instruments$.pipe(Object(s.h)()).subscribe((function(t){"flexible_futures"===t.get(n.instrument).type&&e.store.dispatch(Object(c.g)({name:"flex-prefs"}))}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(g.Ob(r.b),g.Ob(v.e),g.Ob(f.a))},t.\u0275cmp=g.Ib({type:t,selectors:[["open-positions"]],inputs:{flexOnly:"flexOnly"},decls:6,vars:3,consts:[["class","table-wrapper","breakpoint","",3,"breakpoints",4,"ngLet"],["noEntries",""],["loader",""],["breakpoint","",1,"table-wrapper",3,"breakpoints"],["tourPositionRef",""],[4,"ngIf","ngIfElse"],[3,"flexOnly","positions","displayTooltips","selectTicker","marketClose","limitClose","viewDetailed","sharePosition","viewLvgPrefs"],[3,"itemSize"],[3,"position","selectTicker","marketClose","limitClose","viewDetailed",4,"cdkVirtualFor","cdkVirtualForOf"],[3,"position","selectTicker","marketClose","limitClose","viewDetailed"],["body","","ghost","",1,"no-activity"],["icon","list","size","3x"],[4,"ngIfSome","ngIfSomeElse"],["unfiltered",""],["translate",""]],template:function(t,e){1&t&&(g.Oc(0,j,3,4,"div",0),g.gc(1,"async"),g.Oc(2,F,6,4,"ng-template",null,1,g.Pc),g.Oc(4,B,1,0,"ng-template",null,2,g.Pc)),2&t&&g.mc("ngLet",g.hc(1,1,e.positions$))},directives:[y.a,_.a,O.n,k.a,T.e,T.a,T.d,S.a,E.a,x.a,P.b,A.a,v.a,I.a],pipes:[O.b,v.d],styles:["market-icon[_ngcontent-%COMP%]{font-size:20px}[_nghost-%COMP%]{display:flex;flex-direction:column;padding:var(--spacing)}.table-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%]{height:100%}.no-activity[_ngcontent-%COMP%]{text-align:center;padding:var(--spacing-l)}cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{height:100%}@media (max-width:1024px){.table-wrapper[_ngcontent-%COMP%] open-positions-desktop[_ngcontent-%COMP%]{display:none}.table-wrapper[_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{display:block!important}}.table-wrapper[breakpoint=large][_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%], .table-wrapper[breakpoint=medium][_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%], .table-wrapper[breakpoint=small][_ngcontent-%COMP%] open-positions-desktop[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),t=Object(i.d)([Object(b.a)()],t)}()},"3GEX":function(t,e,n){"use strict";var i;n.d(e,"a",(function(){return m}));var r=n("Aey0"),o=n("YzTY"),a=n("uJYd"),s=n("kZht"),c=n("zqNl"),u=n("anSm"),l=n("1o0v"),d=n("NxuZ"),h=n("An66"),p=n("aDqW"),b=["*"],g=(f(i={},o.a.OPEN_POSITIONS,"POSITIONS_ORDERS"),f(i,o.a.OPEN_ORDERS,"POSITIONS_ORDERS"),f(i,o.a.TRIGGER_ORDERS,"POSITIONS_ORDERS"),f(i,o.a.FILLED_ORDERS,"POSITIONS_ORDERS"),f(i,o.a.ORDERBOOK,"ORDERBOOK"),f(i,o.a.MARKET_CHART,"MARKET_CHART"),f(i,o.a.TRADE_HISTORY,"TRADE_HISTORY"),i),m=function(){var t=function(){function t(e,n){C(this,t),this.layout=e,this.store=n,this.CID=o.a}return w(t,[{key:"pushItem",value:function(t){this.layout.pushItem(t)}},{key:"openSettings",value:function(){var t=g[this.draggableItem.id];this.store.dispatch(Object(a.g)({name:"tab-settings",inputs:{title:t}}))}},{key:"removeItem",value:function(){this.layout.removeItem(this.draggableItem)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Ob(r.a),s.Ob(c.b))},t.\u0275cmp=s.Ib({type:t,selectors:[["draggable-container"]],inputs:{draggableItem:"draggableItem"},ngContentSelectors:b,decls:11,vars:5,consts:[[1,"draggable-container"],[1,"draggable"],["body","","ghost",""],["icon","close-medium","size","lg",3,"click","mousedown"],["icon","cog","size","lg",3,"click","mousedown"],[1,"content"]],template:function(t,e){1&t&&(s.lc(),s.Ub(0,"section",0),s.Ub(1,"div",1),s.Ub(2,"p",2),s.Qc(3),s.gc(4,"uppercase"),s.gc(5,"translate"),s.Tb(),s.Ub(6,"div"),s.Ub(7,"fa-icon",3),s.bc("click",(function(){return e.removeItem()}))("mousedown",(function(t){return t.stopPropagation()})),s.Tb(),s.Ub(8,"fa-icon",4),s.bc("click",(function(){return e.openSettings()}))("mousedown",(function(t){return t.stopPropagation()})),s.Tb(),s.Tb(),s.Tb(),s.Ub(9,"div",5),s.kc(10),s.Tb(),s.Tb()),2&t&&(s.Cb(3),s.Rc(s.hc(4,1,s.hc(5,3,"HEADING."+e.CID[e.draggableItem.id]))))},directives:[u.a,l.a,d.b],pipes:[h.x,p.d],styles:[".draggable-container[_ngcontent-%COMP%]{height:100%}.draggable-container[_ngcontent-%COMP%]:hover .draggable[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{display:inherit}.draggable[_ngcontent-%COMP%]{background:var(--card-colour);height:30px;cursor:grab;display:flex;justify-content:space-between;align-items:center;padding:0 var(--spacing);position:sticky}.draggable[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{display:none;color:var(--icon-colour);float:right;padding:var(--spacing) var(--spacing-s);cursor:pointer}.content[_ngcontent-%COMP%]{background:var(--card-colour);height:calc(100% - 30px);overflow-y:auto}"]}),t}()},"3W1Y":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n}return w(t,[{key:"ngOnInit",value:function(){this.renderer.addClass(this.element.nativeElement,"global__text"),this.renderer.addClass(this.element.nativeElement,"global__text-caption")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","caption",""]]}),t}()},"3ZBw":function(t,e,n){"use strict";n.r(e),n.d(e,"EditOrderComponent",(function(){return I}));var i=n("3kIJ"),r=n("mcff"),o=n("zqNl"),a=n("ZTXN"),s=n("8lHc"),c=n("xVbo"),u=n("kuMc"),l=n("1u95"),d=n("h3eB"),h=n("KyJX"),f=n("kZht"),p=n("rfPA"),b=n("bBQR"),g=n("An66"),m=n("EmXI"),v=n("Tcl6"),y=n("hCLc"),_=n("aDqW"),O=n("DpwM"),k=n("rUBT");function T(t,e){if(1&t&&(f.Ub(0,"mat-form-field",13),f.Ub(1,"mat-label"),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Pb(4,"input",14),f.Tb()),2&t){var n=f.fc();f.Cb(2),f.Rc(f.hc(3,2,"FORM.TRIGGER_PRICE")),f.Cb(2),f.mc("step",n.tickSize)}}function S(t,e){if(1&t&&(f.Ub(0,"mat-form-field",13),f.Ub(1,"mat-label"),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Pb(4,"input",15),f.Tb()),2&t){var n=f.fc();f.Cb(2),f.Rc(f.hc(3,2,"FORM.LIMIT_PRICE")),f.Cb(2),f.mc("step",n.tickSize)}}function E(t,e){if(1&t&&(f.Ub(0,"p",9),f.Qc(1),f.gc(2,"cryptoPrecise"),f.gc(3,"async"),f.gc(4,"collateral"),f.gc(5,"collateral"),f.Tb()),2&t){var n,i=f.fc(2);f.Cb(1),f.Tc(" ",f.ic(2,2,(null==(n=f.hc(3,5,i.editInitialMargin$))?null:n.buy)||0,f.hc(4,7,i.inputs.instrument.symbol))," ",f.hc(5,9,i.inputs.instrument.symbol)," ")}}function x(t,e){if(1&t&&(f.Ub(0,"p",9),f.Qc(1),f.gc(2,"cryptoPrecise"),f.gc(3,"async"),f.gc(4,"collateral"),f.gc(5,"collateral"),f.Tb()),2&t){var n,i=f.fc(2);f.Cb(1),f.Tc(" ",f.ic(2,2,(null==(n=f.hc(3,5,i.editInitialMargin$))?null:n.sell)||0,f.hc(4,7,i.inputs.instrument.symbol))," ",f.hc(5,9,i.inputs.instrument.symbol)," ")}}function P(t,e){if(1&t&&(f.Ub(0,"div",3),f.Ub(1,"p",4),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Oc(4,E,6,11,"p",16),f.Oc(5,x,6,11,"p",16),f.Tb()),2&t){var n=f.fc();f.Cb(2),f.Rc(f.hc(3,3,"LABEL.MARGIN_REQUIREMENT")),f.Cb(2),f.mc("ngIf","Long"===n.orderDirection),f.Cb(1),f.mc("ngIf","Short"===n.orderDirection)}}var A=function(t,e){return{"global__text--accent":t,"global__text--warn":e}},I=function(){var t=function(){function t(e,n,i){C(this,t),this.store=e,this.inputs=n,this.formBuilder=i,this.destroy$=new a.b,this.editInitialMargin$=this.store.pipe(Object(o.m)(h.c))}return w(t,[{key:"ngOnInit",value:function(){this.form=this.buildForm,this.getInitialMargin()}},{key:"ngOnDestroy",value:function(){this.destroy$.next(!0),this.destroy$.unsubscribe()}},{key:"getInitialMargin",value:function(){var t=this;Object(s.a)(500,1500).pipe(Object(c.a)((function(){return t.marginRequired})),Object(c.a)((function(){return t.form&&t.form.get("size").value>0&&(!t.form.get("limitPrice")||t.form.get("limitPrice").value>0)&&(!t.form.get("stopPrice")||t.form.get("stopPrice").value>0)})),Object(u.a)(this.destroy$)).subscribe((function(){t.store.dispatch(Object(l.b)({order:Object.assign(Object.assign({},t.form.value),{side:t.inputs.order.direction?"sell":"buy",symbol:t.inputs.order.instrument,orderType:t.inputs.order.type.toLowerCase()}),editMargin:!0}))}))}},{key:"submitForm",value:function(){this.store.dispatch(Object(d.g)(this.form.value))}},{key:"calculateNotionalValue",value:function(t,e,n){switch(n){case"futures_inverse":return t/e;case"futures_vanilla":case"flexible_futures":return t*e}}},{key:"buildForm",get:function(){return this.formBuilder.group(Object.assign(Object.assign({orderId:[this.inputs.order.order_id,i.x.required],size:[Math.abs(this.inputs.order.qty),[i.x.required]]},this.inputs.order.limit_price&&{limitPrice:[this.inputs.order.limit_price,[i.x.required]]}),this.inputs.order.stop_price&&{stopPrice:[this.inputs.order.stop_price,[i.x.required]]}))}},{key:"tickSize",get:function(){return this.inputs.instrument?this.inputs.instrument.tickSize:1}},{key:"orderDirection",get:function(){return 0===this.inputs.order.direction?"Long":"Short"}},{key:"marginRequired",get:function(){return"market"===this.inputs.order.type||"limit"===this.inputs.order.type}}]),t}();return t.\u0275fac=function(e){return new(e||t)(f.Ob(o.b),f.Ob(r.a),f.Ob(i.d))},t.\u0275cmp=f.Ib({type:t,selectors:[["edit-order"]],decls:64,vars:70,consts:[["heading","DIALOG.EDIT_ORDER.TITLE"],[1,"edit-order__form","global__text","global__text-body",3,"formGroup"],[1,"edit-order__details"],[1,"edit-order__detail"],[1,"global__text","global__text-body"],[1,"global__text","global__text-body",3,"ngClass"],["color","accent","appearance","fill",1,"edit-order__quantity","global__text","global__text-body"],["formControlName","size","required","","matInput","","type","number","min","0"],["color","accent","appearance","fill","class","edit-order__limit-price global__text global__text-body",4,"ngIf"],[1,"global__text","global__text-body","global__text--mono"],[1,"global__text","global__text-body","global__text--mono",3,"ngClass"],["class","edit-order__detail",4,"ngIf"],["mat-raised-button","","color","warn",1,"global__text","global__text-body",3,"disabled","click"],["color","accent","appearance","fill",1,"edit-order__limit-price","global__text","global__text-body"],["formControlName","stopPrice","required","","matInput","","type","number","min","0",3,"step"],["formControlName","limitPrice","required","","matInput","","type","number","min","0",3,"step"],["class","global__text global__text-body global__text--mono",4,"ngIf"]],template:function(t,e){1&t&&(f.Ub(0,"pro-dialog",0),f.Ub(1,"form",1),f.Ub(2,"section",2),f.Ub(3,"div",3),f.Ub(4,"p",4),f.Qc(5),f.gc(6,"translate"),f.Tb(),f.Ub(7,"p",4),f.Qc(8),f.Tb(),f.Tb(),f.Ub(9,"div",3),f.Ub(10,"p",4),f.Qc(11),f.gc(12,"translate"),f.Tb(),f.Ub(13,"p",4),f.Qc(14),f.gc(15,"date"),f.Tb(),f.Tb(),f.Ub(16,"div",3),f.Ub(17,"p",4),f.Qc(18),f.gc(19,"translate"),f.Tb(),f.Ub(20,"p",4),f.Qc(21),f.Tb(),f.Tb(),f.Ub(22,"div",3),f.Ub(23,"p",4),f.Qc(24),f.gc(25,"translate"),f.Tb(),f.Ub(26,"p",5),f.Qc(27),f.Tb(),f.Tb(),f.Ub(28,"div",3),f.Ub(29,"p",4),f.Qc(30),f.gc(31,"translate"),f.Tb(),f.Ub(32,"p",5),f.Qc(33),f.Tb(),f.Tb(),f.Tb(),f.Ub(34,"mat-form-field",6),f.Ub(35,"mat-label"),f.Qc(36),f.gc(37,"translate"),f.Tb(),f.Pb(38,"input",7),f.Tb(),f.Oc(39,T,5,4,"mat-form-field",8),f.Oc(40,S,5,4,"mat-form-field",8),f.Ub(41,"section",2),f.Ub(42,"div",3),f.Ub(43,"p",4),f.Qc(44),f.gc(45,"translate"),f.Tb(),f.Ub(46,"p",9),f.Qc(47),f.gc(48,"cryptoPrecise"),f.gc(49,"collateral"),f.gc(50,"collateral"),f.Tb(),f.Tb(),f.Ub(51,"div",3),f.Ub(52,"p",4),f.Qc(53),f.gc(54,"translate"),f.Tb(),f.Ub(55,"p",10),f.Qc(56),f.gc(57,"cryptoPrecise"),f.gc(58,"collateral"),f.gc(59,"collateral"),f.Tb(),f.Tb(),f.Oc(60,P,6,5,"div",11),f.Tb(),f.Ub(61,"button",12),f.bc("click",(function(){return e.submitForm()})),f.Qc(62),f.gc(63,"translate"),f.Tb(),f.Tb(),f.Tb()),2&t&&(f.Cb(1),f.mc("formGroup",e.form),f.Cb(4),f.Rc(f.hc(6,26,"COLUMN.SYMBOL")),f.Cb(3),f.Sc(" ",e.inputs.order.instrument," "),f.Cb(3),f.Rc(f.hc(12,28,"COLUMN.DATE_TIME")),f.Cb(3),f.Sc(" ",f.ic(15,30,e.inputs.order.time,"dd/MMM/yyyy HH:mm:ss")," "),f.Cb(4),f.Rc(f.hc(19,33,"COLUMN.TYPE")),f.Cb(3),f.Sc(" ",e.inputs.order.type," "),f.Cb(3),f.Rc(f.hc(25,35,"BUTTON.REDUCE_ONLY")),f.Cb(2),f.mc("ngClass",f.sc(61,A,null==e.inputs.order?null:e.inputs.order.reduce_only,!(null!=e.inputs.order&&e.inputs.order.reduce_only))),f.Cb(1),f.Sc(" ",e.inputs.order.reduce_only," "),f.Cb(3),f.Rc(f.hc(31,37,"COLUMN.SIDE")),f.Cb(2),f.mc("ngClass",f.sc(64,A,"Long"===e.orderDirection,"Short"===e.orderDirection)),f.Cb(1),f.Sc(" ",e.orderDirection," "),f.Cb(3),f.Rc(f.hc(37,39,"FORM.QUANTITY")),f.Cb(3),f.mc("ngIf",null==e.inputs?null:e.inputs.order.stop_price),f.Cb(1),f.mc("ngIf",null==e.inputs?null:e.inputs.order.limit_price),f.Cb(4),f.Rc(f.hc(45,41,"LABEL.ORDER_VALUE")),f.Cb(3),f.Tc(" ",f.ic(48,43,e.calculateNotionalValue(e.form.value.size,e.form.value.limitPrice,null==e.inputs.instrument?null:e.inputs.instrument.type)||0,f.hc(49,46,e.inputs.instrument.symbol))," ",f.hc(50,48,e.inputs.instrument.symbol)," "),f.Cb(6),f.Rc(f.hc(54,50,"LABEL.AVAILABLE_MARGIN")),f.Cb(2),f.mc("ngClass",f.sc(67,A,e.inputs.availableMargin>0,e.inputs.availableMargin<=0)),f.Cb(1),f.Tc(" ",f.ic(57,52,e.inputs.availableMargin||0,f.hc(58,55,e.inputs.instrument.symbol))," ",f.hc(59,57,e.inputs.instrument.symbol)," "),f.Cb(4),f.mc("ngIf",e.marginRequired),f.Cb(1),f.mc("disabled",e.form.invalid),f.Cb(1),f.Sc(" ",f.hc(63,59,"BUTTON.EDIT_ORDER")," "))},directives:[p.a,b.a,i.z,i.p,i.h,g.l,m.c,m.f,i.c,v.b,i.s,i.o,i.g,i.v,g.n,y.b],pipes:[_.d,g.e,O.b,k.b,g.b],styles:["form[_ngcontent-%COMP%]{width:250px}@media (max-width:599px){form[_ngcontent-%COMP%]{width:100%}}form[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{margin-top:var(--spacing);width:100%}.edit-order__details[_ngcontent-%COMP%]{padding:var(--spacing) 0}.edit-order__detail[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;margin-bottom:6px;text-transform:capitalize}"],changeDetection:0}),t}()},"3as9":function(t,e,n){var i;!function(r,o){"use strict";var a="model",s="name",c="type",u="vendor",l="version",d="mobile",h="tablet",f="smarttv",p=function(t){for(var e={},n=0;n0?2===o.length?this[o[0]]="function"==typeof o[1]?o[1].call(this,s):o[1]:3===o.length?this[o[0]]="function"!=typeof o[1]||o[1].exec&&o[1].test?s?s.replace(o[1],o[2]):void 0:s?o[1].call(this,s,o[2]):void 0:4===o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;c+=2}},y=function(t,e){for(var n in e)if("object"==typeof e[n]&&e[n].length>0){for(var i=0;i2&&(t.model="iPad",t.type=h),t},this.getEngine=function(){var t={name:void 0,version:void 0};return v.call(t,o,s.engine),t},this.getOS=function(){var t={name:void 0,version:void 0};return v.call(t,o,s.os),c&&!t.name&&a&&"Unknown"!=a.platform&&(t.name=a.platform.replace(/chrome os/i,"Chromium OS").replace(/macos/i,"Mac OS")),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return o},this.setUA=function(t){return o="string"==typeof t&&t.length>350?m(t,350):t,this},this.setUA(o),this};k.VERSION="0.7.36",k.BROWSER=p([s,l,"major"]),k.CPU=p(["architecture"]),k.DEVICE=p([a,u,c,"console",d,f,h,"wearable","embedded"]),k.ENGINE=k.OS=p([s,l]),void 0!==e?(void 0!==t&&t.exports&&(e=t.exports=k),e.UAParser=k):n("jPSd")?void 0===(i=(function(){return k}).call(e,n,e,t))||(t.exports=i):void 0!==r&&(r.UAParser=k);var w=void 0!==r&&(r.jQuery||r.Zepto);if(w&&!w.ua){var C=new k;w.ua=C.getResult(),w.ua.get=function(){return C.getUA()},w.ua.set=function(t){C.setUA(t);var e=C.getResult();for(var n in e)w.ua[n]=e[n]}}}("object"==typeof window?window:this)},"3kIJ":function(t,e,n){"use strict";n.d(e,"a",(function(){return zt})),n.d(e,"b",(function(){return y})),n.d(e,"c",(function(){return m})),n.d(e,"d",(function(){return Gt})),n.d(e,"e",(function(){return mt})),n.d(e,"f",(function(){return xt})),n.d(e,"g",(function(){return Nt})),n.d(e,"h",(function(){return At})),n.d(e,"i",(function(){return Mt})),n.d(e,"j",(function(){return Yt})),n.d(e,"k",(function(){return qt})),n.d(e,"l",(function(){return P})),n.d(e,"m",(function(){return l})),n.d(e,"n",(function(){return O})),n.d(e,"o",(function(){return T})),n.d(e,"p",(function(){return S})),n.d(e,"q",(function(){return kt})),n.d(e,"r",(function(){return G})),n.d(e,"s",(function(){return F})),n.d(e,"t",(function(){return Qt})),n.d(e,"u",(function(){return Kt})),n.d(e,"v",(function(){return Bt})),n.d(e,"w",(function(){return W})),n.d(e,"x",(function(){return M})),n.d(e,"y",(function(){return X})),n.d(e,"z",(function(){return Tt}));var i=n("kZht"),r=n("An66"),o=n("P4Xx"),s=n("GoAz"),u=n("YtkY"),l=new i.s("NgValueAccessor"),d={provide:l,useExisting:Object(i.V)((function(){return h})),multi:!0},h=function(){var t=function(){function t(e,n){C(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return w(t,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}},{key:"registerOnChange",value:function(t){this.onChange=t}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&i.bc("change",(function(t){return e.onChange(t.target.checked)}))("blur",(function(){return e.onTouched()}))},features:[i.Bb([d])]}),t}(),f={provide:l,useExisting:Object(i.V)((function(){return m})),multi:!0},g=new i.s("CompositionEventMode"),m=function(){var t=function(){function t(e,n,i){var o;C(this,t),this._renderer=e,this._elementRef=n,this._compositionMode=i,this.onChange=function(t){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(o=Object(r.C)()?Object(r.C)().getUserAgent():"",!/android (\d+)/.test(o.toLowerCase())))}return w(t,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}},{key:"registerOnChange",value:function(t){this.onChange=t}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},{key:"_handleInput",value:function(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}},{key:"_compositionStart",value:function(){this._composing=!0}},{key:"_compositionEnd",value:function(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l),i.Ob(g,8))},t.\u0275dir=i.Jb({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&i.bc("input",(function(t){return e._handleInput(t.target.value)}))("blur",(function(){return e.onTouched()}))("compositionstart",(function(){return e._compositionStart()}))("compositionend",(function(t){return e._compositionEnd(t.target.value)}))},features:[i.Bb([f])]}),t}(),v=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"reset",value:function(t){this.control&&this.control.reset(t)}},{key:"hasError",value:function(t,e){return!!this.control&&this.control.hasError(t,e)}},{key:"getError",value:function(t,e){return this.control?this.control.getError(t,e):null}},{key:"value",get:function(){return this.control?this.control.value:null}},{key:"valid",get:function(){return this.control?this.control.valid:null}},{key:"invalid",get:function(){return this.control?this.control.invalid:null}},{key:"pending",get:function(){return this.control?this.control.pending:null}},{key:"disabled",get:function(){return this.control?this.control.disabled:null}},{key:"enabled",get:function(){return this.control?this.control.enabled:null}},{key:"errors",get:function(){return this.control?this.control.errors:null}},{key:"pristine",get:function(){return this.control?this.control.pristine:null}},{key:"dirty",get:function(){return this.control?this.control.dirty:null}},{key:"touched",get:function(){return this.control?this.control.touched:null}},{key:"status",get:function(){return this.control?this.control.status:null}},{key:"untouched",get:function(){return this.control?this.control.untouched:null}},{key:"statusChanges",get:function(){return this.control?this.control.statusChanges:null}},{key:"valueChanges",get:function(){return this.control?this.control.valueChanges:null}},{key:"path",get:function(){return null}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Jb({type:t}),t}(),y=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(v);return t.\u0275fac=function(e){return _(e||t)},t.\u0275dir=i.Jb({type:t,features:[i.zb]}),t}(),_=i.Wb(y),O=function(t){a(n,t);var e=c(n);function n(){var t;return C(this,n),(t=e.apply(this,arguments))._parent=null,t.name=null,t.valueAccessor=null,t._rawValidators=[],t._rawAsyncValidators=[],t}return w(n,[{key:"validator",get:function(){}},{key:"asyncValidator",get:function(){}}]),n}(v),k=function(){function t(e){C(this,t),this._cd=e}return w(t,[{key:"ngClassUntouched",get:function(){return!!this._cd.control&&this._cd.control.untouched}},{key:"ngClassTouched",get:function(){return!!this._cd.control&&this._cd.control.touched}},{key:"ngClassPristine",get:function(){return!!this._cd.control&&this._cd.control.pristine}},{key:"ngClassDirty",get:function(){return!!this._cd.control&&this._cd.control.dirty}},{key:"ngClassValid",get:function(){return!!this._cd.control&&this._cd.control.valid}},{key:"ngClassInvalid",get:function(){return!!this._cd.control&&this._cd.control.invalid}},{key:"ngClassPending",get:function(){return!!this._cd.control&&this._cd.control.pending}}]),t}(),T=function(){var t=function(t){a(n,t);var e=c(n);function n(t){return C(this,n),e.call(this,t)}return n}(k);return t.\u0275fac=function(e){return new(e||t)(i.Ob(O,2))},t.\u0275dir=i.Jb({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&i.Gb("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[i.zb]}),t}(),S=function(){var t=function(t){a(n,t);var e=c(n);function n(t){return C(this,n),e.call(this,t)}return n}(k);return t.\u0275fac=function(e){return new(e||t)(i.Ob(y,2))},t.\u0275dir=i.Jb({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&i.Gb("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[i.zb]}),t}();function E(t){return null==t||0===t.length}function x(t){return null!=t&&"number"==typeof t.length}var P=new i.s("NgValidators"),A=new i.s("NgAsyncValidators"),I=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,M=function(){function t(){C(this,t)}return w(t,null,[{key:"min",value:function(t){return function(e){if(E(e.value)||E(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&nt?{max:{max:t,actual:e.value}}:null}}},{key:"required",value:function(t){return E(t.value)?{required:!0}:null}},{key:"requiredTrue",value:function(t){return!0===t.value?null:{required:!0}}},{key:"email",value:function(t){return E(t.value)||I.test(t.value)?null:{email:!0}}},{key:"minLength",value:function(t){return function(e){return E(e.value)||!x(e.value)?null:e.value.lengtht?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}}},{key:"pattern",value:function(e){return e?("string"==typeof e?(i="","^"!==e.charAt(0)&&(i+="^"),i+=e,"$"!==e.charAt(e.length-1)&&(i+="$"),n=new RegExp(i)):(i=e.toString(),n=e),function(t){if(E(t.value))return null;var e=t.value;return n.test(e)?null:{pattern:{requiredPattern:i,actualValue:e}}}):t.nullValidator;var n,i}},{key:"nullValidator",value:function(t){return null}},{key:"compose",value:function(t){if(!t)return null;var e=t.filter(D);return 0==e.length?null:function(t){return j(L(t,e))}}},{key:"composeAsync",value:function(t){if(!t)return null;var e=t.filter(D);return 0==e.length?null:function(t){var n=L(t,e).map(R);return Object(o.a)(n).pipe(Object(u.a)(j))}}}]),t}();function D(t){return null!=t}function R(t){var e=Object(i.ub)(t)?Object(s.a)(t):t;return Object(i.tb)(e),e}function j(t){var e={};return t.forEach((function(t){e=null!=t?Object.assign(Object.assign({},e),t):e})),0===Object.keys(e).length?null:e}function L(t,e){return e.map((function(e){return e(t)}))}function N(t){return t.map((function(t){return function(t){return!t.validate}(t)?t:function(e){return t.validate(e)}}))}var U={provide:l,useExisting:Object(i.V)((function(){return F})),multi:!0},F=function(){var t=function(){function t(e,n){C(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return w(t,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}},{key:"registerOnChange",value:function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&i.bc("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[i.Bb([U])]}),t}(),B={provide:l,useExisting:Object(i.V)((function(){return V})),multi:!0},z=function(){var t=function(){function t(){C(this,t),this._accessors=[]}return w(t,[{key:"add",value:function(t,e){this._accessors.push([t,e])}},{key:"remove",value:function(t){for(var e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}},{key:"select",value:function(t){var e=this;this._accessors.forEach((function(n){e._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)}))}},{key:"_isSameGroup",value:function(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),V=function(){var t=function(){function t(e,n,i,r){C(this,t),this._renderer=e,this._elementRef=n,this._registry=i,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return w(t,[{key:"ngOnInit",value:function(){this._control=this._injector.get(O),this._checkName(),this._registry.add(this._control,this)}},{key:"ngOnDestroy",value:function(){this._registry.remove(this)}},{key:"writeValue",value:function(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}},{key:"registerOnChange",value:function(t){var e=this;this._fn=t,this.onChange=function(){t(e.value),e._registry.select(e)}}},{key:"fireUncheck",value:function(t){this.writeValue(t)}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},{key:"_checkName",value:function(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l),i.Ob(z),i.Ob(i.t))},t.\u0275dir=i.Jb({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&i.bc("change",(function(){return e.onChange()}))("blur",(function(){return e.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[i.Bb([B])]}),t}(),H={provide:l,useExisting:Object(i.V)((function(){return q})),multi:!0},q=function(){var t=function(){function t(e,n){C(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return w(t,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}},{key:"registerOnChange",value:function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&i.bc("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[i.Bb([H])]}),t}(),$={provide:l,useExisting:Object(i.V)((function(){return W})),multi:!0};function Q(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),"".concat(t,": ").concat(e).slice(0,50))}var W=function(){var t=function(){function t(e,n){C(this,t),this._renderer=e,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Object.is}return w(t,[{key:"writeValue",value:function(t){this.value=t;var e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=Q(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}},{key:"registerOnChange",value:function(t){var e=this;this.onChange=function(n){e.value=e._getOptionValue(n),t(e.value)}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},{key:"_registerOption",value:function(){return(this._idCounter++).toString()}},{key:"_getOptionId",value:function(t){for(var e=0,n=Array.from(this._optionMap.keys());e-1)}}else e=function(t,e){t._setSelected(!1)};this._optionMap.forEach(e)}},{key:"registerOnChange",value:function(t){var e=this;this.onChange=function(n){var i=[];if(void 0!==n.selectedOptions)for(var r=n.selectedOptions,o=0;o-1&&t.splice(n,1)}function lt(t,e,n,r){Object(i.X)()&&"never"!==r&&((null!==r&&"once"!==r||e._ngModelWarningSentOnce)&&("always"!==r||n._ngModelWarningSent)||(e._ngModelWarningSentOnce=!0,n._ngModelWarningSent=!0))}function dt(t){return(bt(t)?t.validators:t)||null}function ht(t){return Array.isArray(t)?it(t):t||null}function ft(t,e){return(bt(e)?e.asyncValidators:t)||null}function pt(t){return Array.isArray(t)?rt(t):t||null}function bt(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var gt=function(){function t(e,n){C(this,t),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=n,this._composedValidatorFn=ht(this._rawValidators),this._composedAsyncValidatorFn=pt(this._rawAsyncValidators)}return w(t,[{key:"setValidators",value:function(t){this._rawValidators=t,this._composedValidatorFn=ht(t)}},{key:"setAsyncValidators",value:function(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=pt(t)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild((function(t){return t.markAllAsTouched()}))}},{key:"markAsUntouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild((function(t){t.markAsUntouched({onlySelf:!0})})),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"markAsDirty",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}},{key:"markAsPristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild((function(t){t.markAsPristine({onlySelf:!0})})),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"markAsPending",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}},{key:"disable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild((function(e){e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))})),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach((function(t){return t(!0)}))}},{key:"enable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild((function(e){e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))})),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach((function(t){return t(!1)}))}},{key:"_updateAncestors",value:function(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(t){this._parent=t}},{key:"updateValueAndValidity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}},{key:"_updateTreeValidity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild((function(e){return e._updateTreeValidity(t)})),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}},{key:"_setInitialStatus",value:function(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(t){var e=this;if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;var n=R(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe((function(n){e._hasOwnPendingAsyncValidator=!1,e.setErrors(n,{emitEvent:t})}))}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{key:"setErrors",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}},{key:"get",value:function(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;var i=t;return e.forEach((function(t){i=i instanceof vt?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof yt&&i.at(t)||null})),i}(this,t)}},{key:"getError",value:function(t,e){var n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}},{key:"hasError",value:function(t,e){return!!this.getError(t,e)}},{key:"_updateControlsErrors",value:function(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}},{key:"_initObservables",value:function(){this.valueChanges=new i.o,this.statusChanges=new i.o}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}},{key:"_anyControlsHaveStatus",value:function(t){return this._anyControls((function(e){return e.status===t}))}},{key:"_anyControlsDirty",value:function(){return this._anyControls((function(t){return t.dirty}))}},{key:"_anyControlsTouched",value:function(){return this._anyControls((function(t){return t.touched}))}},{key:"_updatePristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"_updateTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"_isBoxedValue",value:function(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}},{key:"_registerOnCollectionChange",value:function(t){this._onCollectionChange=t}},{key:"_setUpdateStrategy",value:function(t){bt(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}},{key:"_parentMarkedDirty",value:function(t){return!t&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}},{key:"validator",get:function(){return this._composedValidatorFn},set:function(t){this._rawValidators=this._composedValidatorFn=t}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return"VALID"===this.status}},{key:"invalid",get:function(){return"INVALID"===this.status}},{key:"pending",get:function(){return"PENDING"==this.status}},{key:"disabled",get:function(){return"DISABLED"===this.status}},{key:"enabled",get:function(){return"DISABLED"!==this.status}},{key:"dirty",get:function(){return!this.pristine}},{key:"untouched",get:function(){return!this.touched}},{key:"updateOn",get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}},{key:"root",get:function(){for(var t=this;t._parent;)t=t._parent;return t}}]),t}(),mt=function(t){a(n,t);var e=c(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;return C(this,n),(t=e.call(this,dt(r),ft(o,r)))._onChange=[],t._applyFormState(i),t._setUpdateStrategy(r),t.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),t._initObservables(),t}return w(n,[{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=t,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach((function(t){return t(e.value,!1!==n.emitViewToModelChange)})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(t,e)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(t){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(t){this._onChange.push(t)}},{key:"_clearChangeFns",value:function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}}},{key:"registerOnDisabledChange",value:function(t){this._onDisabledChange.push(t)}},{key:"_forEachChild",value:function(t){}},{key:"_syncPendingControls",value:function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}},{key:"_applyFormState",value:function(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}]),n}(gt),vt=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,dt(i),ft(r,i))).controls=t,o._initObservables(),o._setUpdateStrategy(i),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),o}return w(n,[{key:"registerControl",value:function(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}},{key:"addControl",value:function(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"removeControl",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"contains",value:function(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),Object.keys(t).forEach((function(i){e._throwIfControlMissing(i),e.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((function(i){e.controls[i]&&e.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild((function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})})),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this._reduceChildren({},(function(t,e,n){return t[n]=e instanceof mt?e.value:e.getRawValue(),t}))}},{key:"_syncPendingControls",value:function(){var t=this._reduceChildren(!1,(function(t,e){return!!e._syncPendingControls()||t}));return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error("Cannot find form control with name: ".concat(t,"."))}},{key:"_forEachChild",value:function(t){var e=this;Object.keys(this.controls).forEach((function(n){return t(e.controls[n],n)}))}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild((function(e){e.setParent(t),e._registerOnCollectionChange(t._onCollectionChange)}))}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(t){for(var e=0,n=Object.keys(this.controls);e0||this.disabled}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild((function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '".concat(n,"'."))}))}}]),n}(gt),yt=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,dt(i),ft(r,i))).controls=t,o._initObservables(),o._setUpdateStrategy(i),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),o}return w(n,[{key:"at",value:function(t){return this.controls[t]}},{key:"push",value:function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"insert",value:function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}},{key:"removeAt",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),this.controls.splice(t,1),this.updateValueAndValidity()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),t.forEach((function(t,i){e._throwIfControlMissing(i),e.at(i).setValue(t,{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.forEach((function(t,i){e.at(i)&&e.at(i).patchValue(t,{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild((function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})})),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this.controls.map((function(t){return t instanceof mt?t.value:t.getRawValue()}))}},{key:"clear",value:function(){this.controls.length<1||(this._forEachChild((function(t){return t._registerOnCollectionChange((function(){}))})),this.controls.splice(0),this.updateValueAndValidity())}},{key:"_syncPendingControls",value:function(){var t=this.controls.reduce((function(t,e){return!!e._syncPendingControls()||t}),!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)}},{key:"_forEachChild",value:function(t){this.controls.forEach((function(e,n){t(e,n)}))}},{key:"_updateValue",value:function(){var t=this;this.value=this.controls.filter((function(e){return e.enabled||t.disabled})).map((function(t){return t.value}))}},{key:"_anyControls",value:function(t){return this.controls.some((function(e){return e.enabled&&t(e)}))}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild((function(e){return t._registerControl(e)}))}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild((function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: ".concat(n,"."))}))}},{key:"_allControlsDisabled",value:function(){var t,e=p(this.controls);try{for(e.s();!(t=e.n()).done;){if(t.value.enabled)return!1}}catch(n){e.e(n)}finally{e.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}},{key:"length",get:function(){return this.controls.length}}]),n}(gt),_t={provide:y,useExisting:Object(i.V)((function(){return kt}))},Ot=Promise.resolve(null),kt=function(){var t=function(t){a(n,t);var e=c(n);function n(t,r){var o;return C(this,n),(o=e.call(this)).submitted=!1,o._directives=[],o.ngSubmit=new i.o,o.form=new vt({},it(t),rt(r)),o}return w(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"addControl",value:function(t){var e=this;Ot.then((function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),tt(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)}))}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){var e=this;Ot.then((function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name),ut(e._directives,t)}))}},{key:"addFormGroup",value:function(t){var e=this;Ot.then((function(){var n=e._findContainer(t.path),i=new vt({});nt(i,t),n.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})}))}},{key:"removeFormGroup",value:function(t){var e=this;Ot.then((function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)}))}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){var n=this;Ot.then((function(){n.form.get(t.path).setValue(e)}))}},{key:"setValue",value:function(t){this.control.setValue(t)}},{key:"onSubmit",value:function(t){return this.submitted=!0,st(this.form,this._directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(t){this.form.reset(t),this.submitted=!1}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}},{key:"_findContainer",value:function(t){return t.pop(),t.length?this.form.get(t):this.form}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}},{key:"controls",get:function(){return this.form.controls}}]),n}(y);return t.\u0275fac=function(e){return new(e||t)(i.Ob(P,10),i.Ob(A,10))},t.\u0275dir=i.Jb({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&i.bc("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i.Bb([_t]),i.zb]}),t}(),wt=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,[{key:"ngOnInit",value:function(){this._checkParentType(),this.formDirective.addFormGroup(this)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeFormGroup(this)}},{key:"_checkParentType",value:function(){}},{key:"control",get:function(){return this.formDirective.getFormGroup(this)}},{key:"path",get:function(){return J(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return it(this._validators)}},{key:"asyncValidator",get:function(){return rt(this._asyncValidators)}}]),n}(y);return t.\u0275fac=function(e){return Ct(e||t)},t.\u0275dir=i.Jb({type:t,features:[i.zb]}),t}(),Ct=i.Wb(wt),Tt=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Jb({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t}(),St=new i.s("NgModelWithFormControlWarning"),Et={provide:O,useExisting:Object(i.V)((function(){return xt}))},xt=function(){var t=function(t){a(n,t);var e=c(n);function n(t,r,o,a){var s;return C(this,n),(s=e.call(this))._ngModelWarningConfig=a,s.update=new i.o,s._ngModelWarningSent=!1,s._rawValidators=t||[],s._rawAsyncValidators=r||[],s.valueAccessor=ct(0,o),s}return w(n,[{key:"ngOnChanges",value:function(t){this._isControlChanged(t)&&(tt(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),ot(t,this.viewModel)&&(lt(0,n,this,this._ngModelWarningConfig),this.form.setValue(this.model),this.viewModel=this.model)}},{key:"viewToModelUpdate",value:function(t){this.viewModel=t,this.update.emit(t)}},{key:"_isControlChanged",value:function(t){return t.hasOwnProperty("form")}},{key:"isDisabled",set:function(t){}},{key:"path",get:function(){return[]}},{key:"validator",get:function(){return it(this._rawValidators)}},{key:"asyncValidator",get:function(){return rt(this._rawAsyncValidators)}},{key:"control",get:function(){return this.form}}]),n}(O);return t.\u0275fac=function(e){return new(e||t)(i.Ob(P,10),i.Ob(A,10),i.Ob(l,10),i.Ob(St,8))},t.\u0275dir=i.Jb({type:t,selectors:[["","formControl",""]],inputs:{isDisabled:["disabled","isDisabled"],form:["formControl","form"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[i.Bb([Et]),i.zb,i.Ab]}),t._ngModelWarningSentOnce=!1,t}(),Pt={provide:y,useExisting:Object(i.V)((function(){return At}))},At=function(){var t=function(t){a(n,t);var e=c(n);function n(t,r){var o;return C(this,n),(o=e.call(this))._validators=t,o._asyncValidators=r,o.submitted=!1,o.directives=[],o.form=null,o.ngSubmit=new i.o,o}return w(n,[{key:"ngOnChanges",value:function(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}},{key:"addControl",value:function(t){var e=this.form.get(t.path);return tt(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){ut(this.directives,t)}},{key:"addFormGroup",value:function(t){var e=this.form.get(t.path);nt(e,t),e.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormGroup",value:function(t){}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"addFormArray",value:function(t){var e=this.form.get(t.path);nt(e,t),e.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormArray",value:function(t){}},{key:"getFormArray",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){this.form.get(t.path).setValue(e)}},{key:"onSubmit",value:function(t){return this.submitted=!0,st(this.form,this.directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(t){this.form.reset(t),this.submitted=!1}},{key:"_updateDomValue",value:function(){var t=this;this.directives.forEach((function(e){var n=t.form.get(e.path);e.control!==n&&(function(t,e){var n=function(){};e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n),e._rawValidators.forEach((function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)})),e._rawAsyncValidators.forEach((function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)})),t&&t._clearChangeFns()}(e.control,e),n&&tt(n,e),e.control=n)})),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_updateRegistrations",value:function(){var t=this;this.form._registerOnCollectionChange((function(){return t._updateDomValue()})),this._oldForm&&this._oldForm._registerOnCollectionChange((function(){})),this._oldForm=this.form}},{key:"_updateValidators",value:function(){var t=it(this._validators);this.form.validator=M.compose([this.form.validator,t]);var e=rt(this._asyncValidators);this.form.asyncValidator=M.composeAsync([this.form.asyncValidator,e])}},{key:"_checkFormPresent",value:function(){}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}}]),n}(y);return t.\u0275fac=function(e){return new(e||t)(i.Ob(P,10),i.Ob(A,10))},t.\u0275dir=i.Jb({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&i.bc("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i.Bb([Pt]),i.zb,i.Ab]}),t}(),It={provide:y,useExisting:Object(i.V)((function(){return Mt}))},Mt=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this))._parent=t,o._validators=i,o._asyncValidators=r,o}return w(n,[{key:"_checkParentType",value:function(){jt(this._parent)}}]),n}(wt);return t.\u0275fac=function(e){return new(e||t)(i.Ob(y,13),i.Ob(P,10),i.Ob(A,10))},t.\u0275dir=i.Jb({type:t,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[i.Bb([It]),i.zb]}),t}(),Dt={provide:y,useExisting:Object(i.V)((function(){return Rt}))},Rt=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this))._parent=t,o._validators=i,o._asyncValidators=r,o}return w(n,[{key:"ngOnInit",value:function(){this._checkParentType(),this.formDirective.addFormArray(this)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeFormArray(this)}},{key:"_checkParentType",value:function(){jt(this._parent)}},{key:"control",get:function(){return this.formDirective.getFormArray(this)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"path",get:function(){return J(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"validator",get:function(){return it(this._validators)}},{key:"asyncValidator",get:function(){return rt(this._asyncValidators)}}]),n}(y);return t.\u0275fac=function(e){return new(e||t)(i.Ob(y,13),i.Ob(P,10),i.Ob(A,10))},t.\u0275dir=i.Jb({type:t,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[i.Bb([Dt]),i.zb]}),t}();function jt(t){return!(t instanceof Mt||t instanceof At||t instanceof Rt)}var Lt={provide:O,useExisting:Object(i.V)((function(){return Nt}))},Nt=function(){var t=function(t){a(n,t);var e=c(n);function n(t,r,o,a,s){var c;return C(this,n),(c=e.call(this))._ngModelWarningConfig=s,c._added=!1,c.update=new i.o,c._ngModelWarningSent=!1,c._parent=t,c._rawValidators=r||[],c._rawAsyncValidators=o||[],c.valueAccessor=ct(0,a),c}return w(n,[{key:"ngOnChanges",value:function(t){this._added||this._setUpControl(),ot(t,this.viewModel)&&(lt(0,n,this,this._ngModelWarningConfig),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(t){this.viewModel=t,this.update.emit(t)}},{key:"_checkParentType",value:function(){}},{key:"_setUpControl",value:function(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}},{key:"isDisabled",set:function(t){}},{key:"path",get:function(){return J(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return it(this._rawValidators)}},{key:"asyncValidator",get:function(){return rt(this._rawAsyncValidators)}}]),n}(O);return t.\u0275fac=function(e){return new(e||t)(i.Ob(y,13),i.Ob(P,10),i.Ob(A,10),i.Ob(l,10),i.Ob(St,8))},t.\u0275dir=i.Jb({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[i.Bb([Lt]),i.zb,i.Ab]}),t._ngModelWarningSentOnce=!1,t}(),Ut={provide:P,useExisting:Object(i.V)((function(){return Bt})),multi:!0},Ft={provide:P,useExisting:Object(i.V)((function(){return zt})),multi:!0},Bt=function(){var t=function(){function t(){C(this,t),this._required=!1}return w(t,[{key:"validate",value:function(t){return this.required?M.required(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"required",get:function(){return this._required},set:function(t){this._required=null!=t&&!1!==t&&""+t!="false",this._onChange&&this._onChange()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Jb({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&i.Db("required",e.required?"":null)},inputs:{required:"required"},features:[i.Bb([Ut])]}),t}(),zt=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,[{key:"validate",value:function(t){return this.required?M.requiredTrue(t):null}}]),n}(Bt);return t.\u0275fac=function(e){return Vt(e||t)},t.\u0275dir=i.Jb({type:t,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&i.Db("required",e.required?"":null)},features:[i.Bb([Ft]),i.zb]}),t}(),Vt=i.Wb(zt),Ht={provide:P,useExisting:Object(i.V)((function(){return qt})),multi:!0},qt=function(){var t=function(){function t(){C(this,t),this._validator=M.nullValidator}return w(t,[{key:"ngOnChanges",value:function(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(t){return null!=this.maxlength?this._validator(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"_createValidator",value:function(){this._validator=M.maxLength("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Jb({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&i.Db("maxlength",e.maxlength?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[i.Bb([Ht]),i.Ab]}),t}(),$t={provide:P,useExisting:Object(i.V)((function(){return Qt})),multi:!0},Qt=function(){var t=function(){function t(){C(this,t),this._validator=M.nullValidator}return w(t,[{key:"ngOnChanges",value:function(t){"pattern"in t&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(t){return this._validator(t)}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"_createValidator",value:function(){this._validator=M.pattern(this.pattern)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Jb({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&i.Db("pattern",e.pattern?e.pattern:null)},inputs:{pattern:"pattern"},features:[i.Bb([$t]),i.Ab]}),t}(),Wt=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)}}),t}(),Gt=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"group",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this._reduceControls(t),i=null,r=null,o=void 0;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(i=null!=e.validators?e.validators:null,r=null!=e.asyncValidators?e.asyncValidators:null,o=null!=e.updateOn?e.updateOn:void 0):(i=null!=e.validator?e.validator:null,r=null!=e.asyncValidator?e.asyncValidator:null)),new vt(n,{asyncValidators:r,updateOn:o,validators:i})}},{key:"control",value:function(t,e,n){return new mt(t,e,n)}},{key:"array",value:function(t,e,n){var i=this,r=t.map((function(t){return i._createControl(t)}));return new yt(r,e,n)}},{key:"_reduceControls",value:function(t){var e=this,n={};return Object.keys(t).forEach((function(i){n[i]=e._createControl(t[i])})),n}},{key:"_createControl",value:function(t){return t instanceof mt||t instanceof vt||t instanceof yt?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),Yt=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},providers:[z],imports:[Wt]}),t}(),Kt=function(){var t=function(){function t(){C(this,t)}return w(t,null,[{key:"withConfig",value:function(e){return{ngModule:t,providers:[{provide:St,useValue:e.warnOnNgModelWithFormControl}]}}}]),t}();return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},providers:[Gt,z],imports:[Wt]}),t}()},"3lSR":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("cJ9h"),r=n("5E2i");function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return Object(i.a)(r.a,t)}},"3mST":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("5uGe");function r(t){return function(e){return e.lift(new o(t))}}var o=function(){function t(e){C(this,t),this.total=e}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new s(t,this.total))}}]),t}(),s=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t)).total=i,r.count=0,r}return w(n,[{key:"_next",value:function(t){++this.count>this.total&&this.destination.next(t)}}]),n}(i.a)},"3p4X":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("IdLP"),r=n("Efrr"),o=n("KRZI");function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.a;return(!Object(o.a)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=r.a),new i.a((function(n){return n.add(e.schedule(s,t,{subscriber:n,counter:0,period:t})),n}))}function s(t){var e=t.subscriber,n=t.counter,i=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:i},i)}},"3xzP":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("2gaf"),r=n("y1Fj");e.default=function(){function t(){}return t.decode=function(t,e){var n=this.encodingName(e);return"undefined"==typeof TextDecoder?this.decodeFallback(t,n):new TextDecoder(n).decode(t)},t.encode=function(e,n){return t.isBrowser()?"undefined"==typeof TextEncoder?this.encodeFallback(e):(new TextEncoder).encode(e):new TextEncoder(this.encodingName(n),{NONSTANDARD_allowLegacyEncoding:!0}).encode(e)},t.isBrowser=function(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)},t.encodingName=function(t){return"string"==typeof t?t:t.getName()},t.encodingCharacterSet=function(t){return r.default.getCharacterSetECIByName(this.encodingName(t))},t.decodeFallback=function(t,e){var n=this.encodingCharacterSet(e);if(n.equals(r.default.UTF8)||n.equals(r.default.ISO8859_1)||n.equals(r.default.ASCII)){for(var o="",a=0,s=t.length;a0)("global__text--warn",n.currentPosition.balance<0),p.Cb(1),p.nc("content",n.currentPosition.balance)}}function R(t,e){if(1&t&&(p.Ub(0,"nutritional-info"),p.Ub(1,"span"),p.Qc(2),p.gc(3,"translate"),p.Tb(),p.Ub(4,"span"),p.Pb(5,"ghost-trail",14),p.Tb(),p.Tb()),2&t){var n=p.fc().ngIf;p.Cb(2),p.Rc(p.hc(3,6,"LABEL.POSITION_AFTER_EXECUTE")),p.Cb(2),p.Gb("global__text--accent",n.positionSize>0)("global__text--warn",n.positionSize<0),p.Cb(1),p.nc("content",n.positionSize)}}function j(t,e){if(1&t&&(p.Ub(0,"nutritional-info"),p.Ub(1,"span"),p.Qc(2),p.gc(3,"translate"),p.Tb(),p.Ub(4,"span"),p.Pb(5,"ghost-trail",14),p.gc(6,"sato"),p.Tb(),p.Tb()),2&t){var n=p.fc().ngIf,i=p.fc();p.Cb(2),p.Rc(p.hc(3,3,"LABEL.POST_AVG_ENTRY")),p.Cb(3),p.pc("content","",p.ic(6,5,i.postEntryPrice(n.currentPosition,n.ticker),null==i.inputs?null:i.inputs.instrument)," ",i.quoteCurrency,"")}}function L(t,e){if(1&t&&(p.Ub(0,"div",12),p.Ub(1,"h2",13),p.Qc(2),p.gc(3,"uppercase"),p.gc(4,"translate"),p.Tb(),p.Ub(5,"nutritional-info"),p.Ub(6,"span"),p.Qc(7),p.gc(8,"translate"),p.Tb(),p.Ub(9,"span"),p.Qc(10),p.gc(11,"uppercase"),p.Tb(),p.Tb(),p.Ub(12,"nutritional-info"),p.Ub(13,"span"),p.Qc(14),p.gc(15,"translate"),p.Tb(),p.Ub(16,"span"),p.Pb(17,"ghost-trail",14),p.gc(18,"cryptoPrecise"),p.gc(19,"collateral"),p.gc(20,"collateral"),p.Tb(),p.Tb(),p.Ub(21,"nutritional-info"),p.Ub(22,"span"),p.Qc(23),p.gc(24,"translate"),p.Tb(),p.Ub(25,"span"),p.Pb(26,"ghost-trail",14),p.gc(27,"sato"),p.Tb(),p.Tb(),p.Ub(28,"nutritional-info"),p.Ub(29,"span"),p.Qc(30),p.gc(31,"translate"),p.Tb(),p.Ub(32,"span"),p.Pb(33,"ghost-trail",14),p.gc(34,"cryptoPrecise"),p.gc(35,"collateral"),p.gc(36,"collateral"),p.Tb(),p.Tb(),p.Oc(37,D,6,8,"nutritional-info",15),p.Oc(38,R,6,8,"nutritional-info",15),p.Oc(39,j,7,8,"nutritional-info",15),p.Tb()),2&t){var n=e.ngIf,i=p.fc();p.Cb(2),p.Sc(" ",p.hc(3,15,p.hc(4,17,"BUTTON.DETAILS"))," "),p.Cb(5),p.Rc(p.hc(8,19,"LABEL.ORDER_TYPE")),p.Cb(3),p.Sc(" ",p.hc(11,21,null==i.inputs?null:i.inputs.order.orderType)," "),p.Cb(4),p.Rc(p.hc(15,23,"LABEL.ORDER_VALUE")),p.Cb(3),p.pc("content","\n ",p.ic(18,25,n.orderValue,p.hc(19,28,null==i.inputs?null:i.inputs.instrument.symbol)),"\n ",p.hc(20,30,null==i.inputs?null:i.inputs.instrument.symbol),""),p.Cb(6),p.Rc(p.hc(24,32,"LABEL.MARK_PRICE")),p.Cb(3),p.pc("content","\n ",p.ic(27,34,null==n.selectedTicker?null:n.selectedTicker.markPrice,null==i.inputs?null:i.inputs.instrument)," ",i.quoteCurrency,""),p.Cb(4),p.Rc(p.hc(31,37,"LABEL.AVAILABLE_MARGIN")),p.Cb(3),p.pc("content","\n ",p.ic(34,39,(null==n.wallet?null:n.wallet.am)||0,p.hc(35,42,null==i.inputs?null:i.inputs.instrument.symbol))," ",p.hc(36,44,null==i.inputs?null:i.inputs.instrument.symbol),""),p.Cb(4),p.mc("ngIf",n.currentPosition),p.Cb(1),p.mc("ngIf",n.currentPosition),p.Cb(1),p.mc("ngIf","limit"===(null==i.inputs?null:i.inputs.order.orderType)&&n.currentPosition)}}var N=function(t,e,n,i,r){return{side:t,size:e,symbol:n,quote:i,limitPrice:r}},U=function(t,e,n,i,r){return{selectedTicker:t,wallet:e,currentPosition:n,positionSize:i,orderValue:r}},F=function(){var t=function(){function t(e,n){var i=this;C(this,t),this.store=e,this.inputs=n,this.selectedInstrumentPosition$=this.store.pipe(Object(r.m)(l.g)),this.selectedFuturesWallet$=this.store.pipe(Object(r.m)(d.n)),this.selectedTicker$=this.store.pipe(Object(r.m)(u.p)),this.orderValue$=this.selectedTicker$.pipe(Object(h.g)(),Object(o.a)((function(t){var e=i.inputs.instrument;if(e){var n=i.inputs.order.size,r=i.inputs.order.limitPrice?i.inputs.order.limitPrice:Object(f.j)(t);if("futures_inverse"===e.type)return n/r||0;if("futures_vanilla"===e.type)return n*r||0}return 0}))),this.positionSizeAfterExecute$=this.selectedInstrumentPosition$.pipe(Object(h.g)(),Object(o.a)((function(t){return t.balance+("buy"===i.inputs.order.side?i.inputs.order.size:-i.inputs.order.size)})))}return w(t,[{key:"submitOrder",value:function(){this.store.dispatch(Object(c.o)(this.inputs.order))}},{key:"closeDialog",value:function(){this.store.dispatch(Object(s.c)())}},{key:"postEntryPrice",value:function(t,e){var n=t.balance,i=this.inputs.order.size;return(t.entry_price*n+i*(this.inputs.order.limitPrice?this.inputs.order.limitPrice:Object(f.j)(e)))/(n+i)}},{key:"capitalizeFirstLetter",value:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}},{key:"quoteCurrency",get:function(){return Object(a.p)(this.inputs.instrument.symbol)}},{key:"orderType",get:function(){return this.inputs.order.stopPrice?"stop":this.inputs.order.limitPrice?"limit":"market"}},{key:"triggerAbove",get:function(){return"stop"===this.inputs.order.orderType==("buy"===this.inputs.order.side)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(p.Ob(r.b),p.Ob(i.a))},t.\u0275cmp=p.Ib({type:t,selectors:[["order-confirmation"]],decls:24,vars:38,consts:[["heading","HEADING.ORDER_CONFIRMATION"],[1,"header"],[1,"divider"],[1,"inner"],[3,"pair"],["subheading","","bold","",1,"subtitle"],["class","subtitle","subheading","",4,"ngIf"],["class","details",4,"ngIf"],[1,"buttons"],["body","","mat-raised-button","","color","accent",3,"click"],["body","","mat-raised-button","","color","warn",3,"click"],["subheading","",1,"subtitle"],[1,"details"],["body","","bold",""],[3,"content"],[4,"ngIf"]],template:function(t,e){1&t&&(p.Ub(0,"pro-dialog",0),p.Ub(1,"div",1),p.Ub(2,"div",2),p.Pb(3,"div",3),p.Pb(4,"market-icon",4),p.gc(5,"pair"),p.Tb(),p.Ub(6,"p",5),p.Qc(7),p.gc(8,"translate"),p.Tb(),p.Oc(9,I,3,7,"p",6),p.Oc(10,M,3,7,"p",6),p.Tb(),p.Oc(11,L,40,46,"div",7),p.gc(12,"async"),p.gc(13,"async"),p.gc(14,"async"),p.gc(15,"async"),p.gc(16,"async"),p.Ub(17,"section",8),p.Ub(18,"button",9),p.bc("click",(function(){return e.submitOrder()})),p.Qc(19),p.gc(20,"translate"),p.Tb(),p.Ub(21,"button",10),p.bc("click",(function(){return e.closeDialog()})),p.Qc(22),p.gc(23,"translate"),p.Tb(),p.Tb(),p.Tb()),2&t&&(p.Cb(4),p.mc("pair",p.hc(5,7,null==e.inputs?null:e.inputs.order.symbol)),p.Cb(3),p.Sc(" ",p.ic(8,9,"DIALOG.ORDER_CONFIRMATION.DESCRIPTION",p.vc(26,N,e.capitalizeFirstLetter(null==e.inputs?null:e.inputs.order.side),null==e.inputs?null:e.inputs.order.size,null==e.inputs?null:e.inputs.order.symbol.toUpperCase(),e.quoteCurrency,(null==e.inputs||null==e.inputs.order?null:e.inputs.order.limitPrice)||"Market"))," "),p.Cb(2),p.mc("ngIf",(null==e.inputs?null:e.inputs.order.stopPrice)&&!e.triggerAbove),p.Cb(1),p.mc("ngIf",(null==e.inputs?null:e.inputs.order.stopPrice)&&e.triggerAbove),p.Cb(1),p.mc("ngIf",p.vc(32,U,p.hc(12,12,e.selectedTicker$),p.hc(13,14,e.selectedFuturesWallet$),p.hc(14,16,e.selectedInstrumentPosition$),p.hc(15,18,e.positionSizeAfterExecute$),p.hc(16,20,e.orderValue$))),p.Cb(8),p.Sc(" ",p.hc(20,22,"BUTTON.SUBMIT_ORDER")," "),p.Cb(3),p.Sc(" ",p.hc(23,24,"BUTTON.CANCEL")," "))},directives:[b.a,g.a,m.a,v.a,y.a,_.n,O.b,k.a,T.a,S.a],pipes:[E.e,x.d,_.b,_.x,P.b,E.b,P.c],styles:[".buttons[_ngcontent-%COMP%]{margin-top:var(--spacing-l);width:100%}.buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1}.buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{margin-left:var(--spacing)}.error[_ngcontent-%COMP%]{padding-top:var(--spacing);width:100%}.error[_ngcontent-%COMP%], .header[_ngcontent-%COMP%]{text-align:center}.header[_ngcontent-%COMP%]{margin-bottom:var(--spacing-xl)}.header[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.header[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{position:relative}.header[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{border-bottom:1px solid var(--border-colour);top:50%;position:absolute;width:100%}.header[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{font-size:2em;position:relative}.header[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{margin-top:var(--spacing)}"],changeDetection:0}),t}()},"4e/d":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("uCWR");function r(t){return function(e){var n=new s(t),i=e.lift(n);return n.caught=i}}var s=function(){function t(e){C(this,t),this.selector=e}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new u(t,this.selector,this.caught))}}]),t}(),u=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,t)).selector=i,o.caught=r,o}return w(n,[{key:"error",value:function(t){if(!this.isStopped){var e;try{e=this.selector(t,this.caught)}catch(s){return void o(h(n.prototype),"error",this).call(this,s)}this._unsubscribeAndRecycle();var r=new i.a(this);this.add(r);var a=Object(i.c)(e,r);a!==r&&this.add(a)}}}]),n}(i.b)},"4f+B":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("ZCEf"),r=n("Qkwj"),o=n("FpF2"),a=n("XQte"),s=n("LqyJ"),c=function(){function t(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var n=null!=e&&void 0!==e.get(i.default.TRY_HARDER),o=null!=e&&void 0!==e.get(i.default.PURE_BARCODE),s=this.image,c=s.getHeight(),u=s.getWidth(),l=Math.floor(3*c/(4*t.MAX_MODULES));(lh[2]&&(f+=g-h[2]-l,b=u-1)}p=0,h[0]=0,h[1]=0,h[2]=0,h[3]=0,h[4]=0}else h[0]=h[2],h[1]=h[3],h[2]=h[4],h[3]=1,h[4]=0,p=3;else h[++p]++;else h[p]++;t.foundPatternCross(h)&&!0===this.handlePossibleCenter(h,f,u,o)&&(l=h[0],this.hasSkipped&&(d=this.haveMultiplyConfirmedCenters()))}var m=this.selectBestPatterns();return r.default.orderBestPatterns(m),new a.default(m)},t.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},t.foundPatternCross=function(t){for(var e=0,n=0;n<5;n++){var i=t[n];if(0===i)return!1;e+=i}if(e<7)return!1;var r=e/7,o=r/2;return Math.abs(r-t[0])=a&&n>=a&&s.get(n-a,e-a);)o[2]++,a++;if(e=a&&n>=a&&!s.get(n-a,e-a)&&o[1]<=i;)o[1]++,a++;if(ei)return!1;for(;e>=a&&n>=a&&s.get(n-a,e-a)&&o[0]<=i;)o[0]++,a++;if(o[0]>i)return!1;var c=s.getHeight(),u=s.getWidth();for(a=1;e+a=c||n+a>=u)return!1;for(;e+a=c||n+a>=u||o[3]>=i)return!1;for(;e+a=i)&&Math.abs(o[0]+o[1]+o[2]+o[3]+o[4]-r)<2*r&&t.foundPatternCross(o)},t.prototype.crossCheckVertical=function(e,n,i,r){for(var o=this.image,a=o.getHeight(),s=this.getCrossCheckStateCount(),c=e;c>=0&&o.get(n,c);)s[2]++,c--;if(c<0)return NaN;for(;c>=0&&!o.get(n,c)&&s[1]<=i;)s[1]++,c--;if(c<0||s[1]>i)return NaN;for(;c>=0&&o.get(n,c)&&s[0]<=i;)s[0]++,c--;if(s[0]>i)return NaN;for(c=e+1;c=i)return NaN;for(;c=i||5*Math.abs(s[0]+s[1]+s[2]+s[3]+s[4]-r)>=2*r?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.crossCheckHorizontal=function(e,n,i,r){for(var o=this.image,a=o.getWidth(),s=this.getCrossCheckStateCount(),c=e;c>=0&&o.get(c,n);)s[2]++,c--;if(c<0)return NaN;for(;c>=0&&!o.get(c,n)&&s[1]<=i;)s[1]++,c--;if(c<0||s[1]>i)return NaN;for(;c>=0&&o.get(c,n)&&s[0]<=i;)s[0]++,c--;if(s[0]>i)return NaN;for(c=e+1;c=i)return NaN;for(;c=i||5*Math.abs(s[0]+s[1]+s[2]+s[3]+s[4]-r)>=r?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.handlePossibleCenter=function(e,n,i,r){var a=e[0]+e[1]+e[2]+e[3]+e[4],s=t.centerFromEnd(e,i),c=this.crossCheckVertical(n,Math.floor(s),e[2],a);if(!isNaN(c)&&(s=this.crossCheckHorizontal(Math.floor(s),Math.floor(c),e[2],a),!isNaN(s)&&(!r||this.crossCheckDiagonal(Math.floor(c),Math.floor(s),e[2],a)))){for(var u=a/7,l=!1,d=this.possibleCenters,h=0,f=d.length;h=t.CENTER_QUORUM){if(null!=e)return this.hasSkipped=!0,Math.floor((Math.abs(e.getX()-r.getX())-Math.abs(e.getY()-r.getY()))/2);e=r}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){for(var e=0,n=0,i=this.possibleCenters.length,r=0,o=this.possibleCenters;r=t.CENTER_QUORUM&&(e++,n+=l.getEstimatedModuleSize());if(e<3)return!1;for(var a=n/i,s=0,c=0,u=this.possibleCenters;c3){for(var i=0,r=0,o=0,a=this.possibleCenters;or?1:0}));for(var l=Math.max(.2*e,u),d=0;d3;d++)Math.abs(n[d].getEstimatedModuleSize()-e)>l&&(n.splice(d,1),d--)}if(n.length>3){i=0;for(var h=0,f=n;hr?-1:0}return n.getCount()-t.getCount()})),n.splice(3)}return[n[0],n[1],n[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}();e.default=c},"4f9k":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("4Pxi"),r=n("ZCEf"),o=n("KFdt"),a=n("xSUO"),s=n("q+cW"),c=n("8AhB"),u=n("Rby2"),l=n("L20P"),d=n("LqyJ");e.default=function(){function t(){this.decoder=new c.default}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,n){var s,c;if(null!=n&&void 0!==n.get(r.default.PURE_BARCODE)){var d=t.extractPureBits(e.getBlackMatrix());s=this.decoder.decodeBitMatrix(d,n),c=t.NO_POINTS}else{var h=new l.default(e.getBlackMatrix()).detect(n);s=this.decoder.decodeBitMatrix(h.getBits(),n),c=h.getPoints()}s.getOther()instanceof u.default&&s.getOther().applyMirroredCorrection(c);var f=new o.default(s.getText(),s.getRawBytes(),void 0,c,i.default.QR_CODE,void 0),p=s.getByteSegments();null!==p&&f.putMetadata(a.default.BYTE_SEGMENTS,p);var b=s.getECLevel();return null!==b&&f.putMetadata(a.default.ERROR_CORRECTION_LEVEL,b),s.hasStructuredAppend()&&(f.putMetadata(a.default.STRUCTURED_APPEND_SEQUENCE,s.getStructuredAppendSequenceNumber()),f.putMetadata(a.default.STRUCTURED_APPEND_PARITY,s.getStructuredAppendParity())),f},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),n=t.getBottomRightOnBit();if(null===e||null===n)throw new d.default;var i=this.moduleSize(e,t),r=e[1],o=n[1],a=e[0],c=n[0];if(a>=c||r>=o)throw new d.default;if(o-r!=c-a&&(c=a+(o-r))>=t.getWidth())throw new d.default;var u=Math.round((c-a+1)/i),l=Math.round((o-r+1)/i);if(u<=0||l<=0)throw new d.default;if(l!==u)throw new d.default;var h=Math.floor(i/2);r+=h;var f=(a+=h)+Math.floor((u-1)*i)-c;if(f>0){if(f>h)throw new d.default;a-=f}var p=r+Math.floor((l-1)*i)-o;if(p>0){if(p>h)throw new d.default;r-=p}for(var b=new s.default(u,l),g=0;g0&&0===this.dimension)&&(e=!0),this._value=t,this.elemRef.nativeElement.innerHTML=t,e&&this.calculateDimension()}},{key:"value",get:function(){return this._value}}]),n}(Y);return t.\u0275fac=function(e){return new(e||t)(h.Ob(h.l),h.Ob(h.G),h.Ob(h.h))},t.\u0275dir=h.Jb({type:t,selectors:[["","ngxSliderLabel",""]],features:[h.zb]}),t}(),X=function t(){C(this,t),this.selected=!1,this.style={},this.tooltip=null,this.tooltipPlacement=null,this.value=null,this.valueTooltip=null,this.valueTooltipPlacement=null,this.legend=null},J=function t(){C(this,t),this.active=!1,this.value=0,this.difference=0,this.position=0,this.lowLimit=0,this.highLimit=0},tt=function(){function t(){C(this,t)}return w(t,null,[{key:"compare",value:function(t,e){return!(q.isNullOrUndefined(t)&&q.isNullOrUndefined(e)||q.isNullOrUndefined(t)!==q.isNullOrUndefined(e)||t.value!==e.value||t.highValue!==e.highValue)}}]),t}(),et=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,null,[{key:"compare",value:function(t,e){return!(q.isNullOrUndefined(t)&&q.isNullOrUndefined(e)||q.isNullOrUndefined(t)!==q.isNullOrUndefined(e)||t.value!==e.value||t.highValue!==e.highValue||t.forceChange!==e.forceChange)}}]),n}(tt),nt={provide:f.m,useExisting:Object(h.V)((function(){return it})),multi:!0},it=function(){var t=function(){function t(e,n,r,o){C(this,t),this.renderer=e,this.elementRef=n,this.changeDetectionRef=r,this.zone=o,this.value=null,this.valueChange=new h.o,this.highValue=null,this.highValueChange=new h.o,this.options=new z,this.userChangeStart=new h.o,this.userChange=new h.o,this.userChangeEnd=new h.o,this.initHasRun=!1,this.inputModelChangeSubject=new i.b,this.inputModelChangeSubscription=null,this.outputModelChangeSubject=new i.b,this.outputModelChangeSubscription=null,this.viewLowValue=null,this.viewHighValue=null,this.viewOptions=new z,this.handleHalfDimension=0,this.maxHandlePosition=0,this.currentTrackingPointer=null,this.currentFocusPointer=null,this.firstKeyDown=!1,this.touchId=null,this.dragging=new J,this.sliderElementVerticalClass=!1,this.sliderElementAnimateClass=!1,this.sliderElementDisabledAttr=null,this.barStyle={},this.minPointerStyle={},this.maxPointerStyle={},this.fullBarTransparentClass=!1,this.selectionBarDraggableClass=!1,this.ticksUnderValuesClass=!1,this.intermediateTicks=!1,this.ticks=[],this.eventListenerHelper=null,this.onMoveEventListener=null,this.onEndEventListener=null,this.moving=!1,this.resizeObserver=null,this.onTouchedCallback=null,this.onChangeCallback=null,this.eventListenerHelper=new G(this.renderer)}return w(t,[{key:"ngOnInit",value:function(){this.viewOptions=new z,Object.assign(this.viewOptions,this.options),this.updateDisabledState(),this.updateVerticalState()}},{key:"ngAfterViewInit",value:function(){this.applyOptions(),this.subscribeInputModelChangeSubject(this.viewOptions.inputEventsInterval),this.subscribeOutputModelChangeSubject(this.viewOptions.outputEventsInterval),this.renormaliseModelValues(),this.viewLowValue=this.modelValueToViewValue(this.value),this.viewHighValue=this.range?this.modelValueToViewValue(this.highValue):null,this.updateVerticalState(),this.manageElementsStyle(),this.updateDisabledState(),this.calculateViewDimensions(),this.addAccessibility(),this.updateCeilLabel(),this.updateFloorLabel(),this.initHandles(),this.manageEventsBindings(),this.subscribeResizeObserver(),this.initHasRun=!0,this.isRefDestroyed()||this.changeDetectionRef.detectChanges()}},{key:"ngOnChanges",value:function(t){q.isNullOrUndefined(t.options)||this.onChangeOptions(),q.isNullOrUndefined(t.value)&&q.isNullOrUndefined(t.highValue)||this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!1})}},{key:"ngOnDestroy",value:function(){this.unbindEvents(),this.unsubscribeResizeObserver(),this.unsubscribeInputModelChangeSubject(),this.unsubscribeOutputModelChangeSubject(),this.unsubscribeManualRefresh(),this.unsubscribeTriggerFocus()}},{key:"writeValue",value:function(t){t instanceof Array?(this.value=t[0],this.highValue=t[1]):this.value=t,this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!1})}},{key:"registerOnChange",value:function(t){this.onChangeCallback=t}},{key:"registerOnTouched",value:function(t){this.onTouchedCallback=t}},{key:"setDisabledState",value:function(t){this.viewOptions.disabled=t,this.updateDisabledState()}},{key:"onResize",value:function(t){this.calculateViewDimensionsAndDetectChanges()}},{key:"subscribeInputModelChangeSubject",value:function(t){var e=this;this.inputModelChangeSubscription=this.inputModelChangeSubject.pipe(Object(s.a)(et.compare),Object(u.a)((function(t){return!t.forceChange&&!t.internalChange})),q.isNullOrUndefined(t)?Object(o.a)((function(){})):Object(r.a)(t,void 0,{leading:!0,trailing:!0})).subscribe((function(t){return e.applyInputModelChange(t)}))}},{key:"subscribeOutputModelChangeSubject",value:function(t){var e=this;this.outputModelChangeSubscription=this.outputModelChangeSubject.pipe(Object(s.a)(et.compare),q.isNullOrUndefined(t)?Object(o.a)((function(){})):Object(r.a)(t,void 0,{leading:!0,trailing:!0})).subscribe((function(t){return e.publishOutputModelChange(t)}))}},{key:"subscribeResizeObserver",value:function(){var t=this;$.isResizeObserverAvailable()&&(this.resizeObserver=new ResizeObserver((function(){return t.calculateViewDimensionsAndDetectChanges()})),this.resizeObserver.observe(this.elementRef.nativeElement))}},{key:"unsubscribeResizeObserver",value:function(){$.isResizeObserverAvailable()&&null!==this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"unsubscribeOnMove",value:function(){q.isNullOrUndefined(this.onMoveEventListener)||(this.eventListenerHelper.detachEventListener(this.onMoveEventListener),this.onMoveEventListener=null)}},{key:"unsubscribeOnEnd",value:function(){q.isNullOrUndefined(this.onEndEventListener)||(this.eventListenerHelper.detachEventListener(this.onEndEventListener),this.onEndEventListener=null)}},{key:"unsubscribeInputModelChangeSubject",value:function(){q.isNullOrUndefined(this.inputModelChangeSubscription)||(this.inputModelChangeSubscription.unsubscribe(),this.inputModelChangeSubscription=null)}},{key:"unsubscribeOutputModelChangeSubject",value:function(){q.isNullOrUndefined(this.outputModelChangeSubscription)||(this.outputModelChangeSubscription.unsubscribe(),this.outputModelChangeSubscription=null)}},{key:"unsubscribeManualRefresh",value:function(){q.isNullOrUndefined(this.manualRefreshSubscription)||(this.manualRefreshSubscription.unsubscribe(),this.manualRefreshSubscription=null)}},{key:"unsubscribeTriggerFocus",value:function(){q.isNullOrUndefined(this.triggerFocusSubscription)||(this.triggerFocusSubscription.unsubscribe(),this.triggerFocusSubscription=null)}},{key:"getPointerElement",value:function(t){return t===V.Min?this.minHandleElement:t===V.Max?this.maxHandleElement:null}},{key:"getCurrentTrackingValue",value:function(){return this.currentTrackingPointer===V.Min?this.viewLowValue:this.currentTrackingPointer===V.Max?this.viewHighValue:null}},{key:"modelValueToViewValue",value:function(t){return q.isNullOrUndefined(t)?NaN:q.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray?+t:q.findStepIndex(+t,this.viewOptions.stepsArray)}},{key:"viewValueToModelValue",value:function(t){return q.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray?t:this.getStepValue(t)}},{key:"getStepValue",value:function(t){var e=this.viewOptions.stepsArray[t];return q.isNullOrUndefined(e)?NaN:e.value}},{key:"applyViewChange",value:function(){this.value=this.viewValueToModelValue(this.viewLowValue),this.range&&(this.highValue=this.viewValueToModelValue(this.viewHighValue)),this.outputModelChangeSubject.next({value:this.value,highValue:this.highValue,userEventInitiated:!0,forceChange:!1}),this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!0})}},{key:"applyInputModelChange",value:function(t){var e=this.normaliseModelValues(t),n=!tt.compare(t,e);n&&(this.value=e.value,this.highValue=e.highValue),this.viewLowValue=this.modelValueToViewValue(e.value),this.viewHighValue=this.range?this.modelValueToViewValue(e.highValue):null,this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.range&&this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateSelectionBar(),this.updateTicksScale(),this.updateAriaAttributes(),this.range&&this.updateCombinedLabel(),this.outputModelChangeSubject.next({value:e.value,highValue:e.highValue,forceChange:n,userEventInitiated:!1})}},{key:"publishOutputModelChange",value:function(t){var e=this,n=function(){e.valueChange.emit(t.value),e.range&&e.highValueChange.emit(t.highValue),q.isNullOrUndefined(e.onChangeCallback)||e.onChangeCallback(e.range?[t.value,t.highValue]:t.value),q.isNullOrUndefined(e.onTouchedCallback)||e.onTouchedCallback(e.range?[t.value,t.highValue]:t.value)};t.userEventInitiated?(n(),this.userChange.emit(this.getChangeContext())):setTimeout((function(){n()}))}},{key:"normaliseModelValues",value:function(t){var e=new tt;if(e.value=t.value,e.highValue=t.highValue,!q.isNullOrUndefined(this.viewOptions.stepsArray)){if(this.viewOptions.enforceStepsArray){var n=q.findStepIndex(e.value,this.viewOptions.stepsArray);if(e.value=this.viewOptions.stepsArray[n].value,this.range){var i=q.findStepIndex(e.highValue,this.viewOptions.stepsArray);e.highValue=this.viewOptions.stepsArray[i].value}}return e}if(this.viewOptions.enforceStep&&(e.value=this.roundStep(e.value),this.range&&(e.highValue=this.roundStep(e.highValue))),this.viewOptions.enforceRange&&(e.value=Q.clampToRange(e.value,this.viewOptions.floor,this.viewOptions.ceil),this.range&&(e.highValue=Q.clampToRange(e.highValue,this.viewOptions.floor,this.viewOptions.ceil)),this.range&&t.value>t.highValue))if(this.viewOptions.noSwitching)e.value=e.highValue;else{var r=t.value;e.value=t.highValue,e.highValue=r}return e}},{key:"renormaliseModelValues",value:function(){var t={value:this.value,highValue:this.highValue},e=this.normaliseModelValues(t);tt.compare(e,t)||(this.value=e.value,this.highValue=e.highValue,this.outputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!0,userEventInitiated:!1}))}},{key:"onChangeOptions",value:function(){if(this.initHasRun){var t=this.viewOptions.inputEventsInterval,e=this.viewOptions.outputEventsInterval,n=this.getOptionsInfluencingEventBindings(this.viewOptions);this.applyOptions();var i=this.getOptionsInfluencingEventBindings(this.viewOptions),r=!q.areArraysEqual(n,i);t!==this.viewOptions.inputEventsInterval&&(this.unsubscribeInputModelChangeSubject(),this.subscribeInputModelChangeSubject(this.viewOptions.inputEventsInterval)),e!==this.viewOptions.outputEventsInterval&&(this.unsubscribeInputModelChangeSubject(),this.subscribeInputModelChangeSubject(this.viewOptions.outputEventsInterval)),this.renormaliseModelValues(),this.viewLowValue=this.modelValueToViewValue(this.value),this.viewHighValue=this.range?this.modelValueToViewValue(this.highValue):null,this.resetSlider(r)}}},{key:"applyOptions",value:function(){if(this.viewOptions=new z,Object.assign(this.viewOptions,this.options),this.viewOptions.draggableRange=this.range&&this.viewOptions.draggableRange,this.viewOptions.draggableRangeOnly=this.range&&this.viewOptions.draggableRangeOnly,this.viewOptions.draggableRangeOnly&&(this.viewOptions.draggableRange=!0),this.viewOptions.showTicks=this.viewOptions.showTicks||this.viewOptions.showTicksValues||!q.isNullOrUndefined(this.viewOptions.ticksArray),!this.viewOptions.showTicks||q.isNullOrUndefined(this.viewOptions.tickStep)&&q.isNullOrUndefined(this.viewOptions.ticksArray)||(this.intermediateTicks=!0),this.viewOptions.showSelectionBar=this.viewOptions.showSelectionBar||this.viewOptions.showSelectionBarEnd||!q.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue),q.isNullOrUndefined(this.viewOptions.stepsArray)?this.applyFloorCeilOptions():this.applyStepsArrayOptions(),q.isNullOrUndefined(this.viewOptions.combineLabels)&&(this.viewOptions.combineLabels=function(t,e){return t+" - "+e}),this.viewOptions.logScale&&0===this.viewOptions.floor)throw Error("Can't use floor=0 with logarithmic scale")}},{key:"applyStepsArrayOptions",value:function(){var t=this;this.viewOptions.floor=0,this.viewOptions.ceil=this.viewOptions.stepsArray.length-1,this.viewOptions.step=1,q.isNullOrUndefined(this.viewOptions.translate)&&(this.viewOptions.translate=function(e){return String(t.viewOptions.bindIndexForStepsArray?t.getStepValue(e):e)}),this.viewOptions.getLegend=function(e){return t.viewOptions.stepsArray[e].legend}}},{key:"applyFloorCeilOptions",value:function(){if(q.isNullOrUndefined(this.viewOptions.step)?this.viewOptions.step=1:(this.viewOptions.step=+this.viewOptions.step,this.viewOptions.step<=0&&(this.viewOptions.step=1)),q.isNullOrUndefined(this.viewOptions.ceil)||q.isNullOrUndefined(this.viewOptions.floor))throw Error("floor and ceil options must be supplied");this.viewOptions.ceil=+this.viewOptions.ceil,this.viewOptions.floor=+this.viewOptions.floor,q.isNullOrUndefined(this.viewOptions.translate)&&(this.viewOptions.translate=function(t){return String(t)})}},{key:"resetSlider",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.manageElementsStyle(),this.addAccessibility(),this.updateCeilLabel(),this.updateFloorLabel(),t&&(this.unbindEvents(),this.manageEventsBindings()),this.updateDisabledState(),this.calculateViewDimensions(),this.refocusPointerIfNeeded()}},{key:"focusPointer",value:function(t){t!==V.Min&&t!==V.Max&&(t=V.Min),t===V.Min?this.minHandleElement.focus():this.range&&t===V.Max&&this.maxHandleElement.focus()}},{key:"refocusPointerIfNeeded",value:function(){q.isNullOrUndefined(this.currentFocusPointer)||(this.onPointerFocus(this.currentFocusPointer),this.getPointerElement(this.currentFocusPointer).focus())}},{key:"manageElementsStyle",value:function(){var t=this;this.updateScale(),this.floorLabelElement.setAlwaysHide(this.viewOptions.showTicksValues||this.viewOptions.hideLimitLabels),this.ceilLabelElement.setAlwaysHide(this.viewOptions.showTicksValues||this.viewOptions.hideLimitLabels);var e=this.viewOptions.showTicksValues&&!this.intermediateTicks;this.minHandleLabelElement.setAlwaysHide(e||this.viewOptions.hidePointerLabels),this.maxHandleLabelElement.setAlwaysHide(e||!this.range||this.viewOptions.hidePointerLabels),this.combinedLabelElement.setAlwaysHide(e||!this.range||this.viewOptions.hidePointerLabels),this.selectionBarElement.setAlwaysHide(!this.range&&!this.viewOptions.showSelectionBar),this.leftOuterSelectionBarElement.setAlwaysHide(!this.range||!this.viewOptions.showOuterSelectionBars),this.rightOuterSelectionBarElement.setAlwaysHide(!this.range||!this.viewOptions.showOuterSelectionBars),this.fullBarTransparentClass=this.range&&this.viewOptions.showOuterSelectionBars,this.selectionBarDraggableClass=this.viewOptions.draggableRange&&!this.viewOptions.onlyBindHandles,this.ticksUnderValuesClass=this.intermediateTicks&&this.options.showTicksValues,this.sliderElementVerticalClass!==this.viewOptions.vertical&&(this.updateVerticalState(),setTimeout((function(){t.resetSlider()}))),this.sliderElementAnimateClass!==this.viewOptions.animate&&setTimeout((function(){t.sliderElementAnimateClass=t.viewOptions.animate}))}},{key:"manageEventsBindings",value:function(){this.viewOptions.disabled||this.viewOptions.readOnly?this.unbindEvents():this.bindEvents()}},{key:"updateDisabledState",value:function(){this.sliderElementDisabledAttr=this.viewOptions.disabled?"disabled":null}},{key:"updateVerticalState",value:function(){this.sliderElementVerticalClass=this.viewOptions.vertical;var t,e=p(this.getAllSliderElements());try{for(e.s();!(t=e.n()).done;){var n=t.value;q.isNullOrUndefined(n)||n.setVertical(this.viewOptions.vertical)}}catch(i){e.e(i)}finally{e.f()}}},{key:"updateScale",value:function(){var t,e=p(this.getAllSliderElements());try{for(e.s();!(t=e.n()).done;){t.value.setScale(this.viewOptions.scale)}}catch(n){e.e(n)}finally{e.f()}}},{key:"getAllSliderElements",value:function(){return[this.leftOuterSelectionBarElement,this.rightOuterSelectionBarElement,this.fullBarElement,this.selectionBarElement,this.minHandleElement,this.maxHandleElement,this.floorLabelElement,this.ceilLabelElement,this.minHandleLabelElement,this.maxHandleLabelElement,this.combinedLabelElement,this.ticksElement]}},{key:"initHandles",value:function(){this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.range&&this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateSelectionBar(),this.range&&this.updateCombinedLabel(),this.updateTicksScale()}},{key:"addAccessibility",value:function(){this.updateAriaAttributes(),this.minHandleElement.role="slider",this.minHandleElement.tabindex=!this.viewOptions.keyboardSupport||this.viewOptions.readOnly||this.viewOptions.disabled?"":"0",this.minHandleElement.ariaOrientation=this.viewOptions.vertical?"vertical":"horizontal",q.isNullOrUndefined(this.viewOptions.ariaLabel)?q.isNullOrUndefined(this.viewOptions.ariaLabelledBy)||(this.minHandleElement.ariaLabelledBy=this.viewOptions.ariaLabelledBy):this.minHandleElement.ariaLabel=this.viewOptions.ariaLabel,this.range&&(this.maxHandleElement.role="slider",this.maxHandleElement.tabindex=!this.viewOptions.keyboardSupport||this.viewOptions.readOnly||this.viewOptions.disabled?"":"0",this.maxHandleElement.ariaOrientation=this.viewOptions.vertical?"vertical":"horizontal",q.isNullOrUndefined(this.viewOptions.ariaLabelHigh)?q.isNullOrUndefined(this.viewOptions.ariaLabelledByHigh)||(this.maxHandleElement.ariaLabelledBy=this.viewOptions.ariaLabelledByHigh):this.maxHandleElement.ariaLabel=this.viewOptions.ariaLabelHigh)}},{key:"updateAriaAttributes",value:function(){this.minHandleElement.ariaValueNow=(+this.value).toString(),this.minHandleElement.ariaValueText=this.viewOptions.translate(+this.value,B.Low),this.minHandleElement.ariaValueMin=this.viewOptions.floor.toString(),this.minHandleElement.ariaValueMax=this.viewOptions.ceil.toString(),this.range&&(this.maxHandleElement.ariaValueNow=(+this.highValue).toString(),this.maxHandleElement.ariaValueText=this.viewOptions.translate(+this.highValue,B.High),this.maxHandleElement.ariaValueMin=this.viewOptions.floor.toString(),this.maxHandleElement.ariaValueMax=this.viewOptions.ceil.toString())}},{key:"calculateViewDimensions",value:function(){q.isNullOrUndefined(this.viewOptions.handleDimension)?this.minHandleElement.calculateDimension():this.minHandleElement.setDimension(this.viewOptions.handleDimension);var t=this.minHandleElement.dimension;this.handleHalfDimension=t/2,q.isNullOrUndefined(this.viewOptions.barDimension)?this.fullBarElement.calculateDimension():this.fullBarElement.setDimension(this.viewOptions.barDimension),this.maxHandlePosition=this.fullBarElement.dimension-t,this.initHasRun&&(this.updateFloorLabel(),this.updateCeilLabel(),this.initHandles())}},{key:"calculateViewDimensionsAndDetectChanges",value:function(){this.calculateViewDimensions(),this.isRefDestroyed()||this.changeDetectionRef.detectChanges()}},{key:"isRefDestroyed",value:function(){return this.changeDetectionRef.destroyed}},{key:"updateTicksScale",value:function(){var t=this;if(this.viewOptions.showTicks){var e=q.isNullOrUndefined(this.viewOptions.ticksArray)?this.getTicksArray():this.viewOptions.ticksArray,n=this.viewOptions.vertical?"translateY":"translateX";this.viewOptions.rightToLeft&&e.reverse();var i=q.isNullOrUndefined(this.viewOptions.tickValueStep)?q.isNullOrUndefined(this.viewOptions.tickStep)?this.viewOptions.step:this.viewOptions.tickStep:this.viewOptions.tickValueStep,r=e.map((function(e){var r=t.valueToPosition(e);t.viewOptions.vertical&&(r=t.maxHandlePosition-r);var o=n+"("+Math.round(r)+"px)",a=new X;if(a.selected=t.isTickSelected(e),a.style={"-webkit-transform":o,"-moz-transform":o,"-o-transform":o,"-ms-transform":o,transform:o},a.selected&&!q.isNullOrUndefined(t.viewOptions.getSelectionBarColor)&&(a.style["background-color"]=t.getSelectionBarColor()),a.selected||q.isNullOrUndefined(t.viewOptions.getTickColor)||(a.style["background-color"]=t.getTickColor(e)),q.isNullOrUndefined(t.viewOptions.ticksTooltip)||(a.tooltip=t.viewOptions.ticksTooltip(e),a.tooltipPlacement=t.viewOptions.vertical?"right":"top"),t.viewOptions.showTicksValues&&!q.isNullOrUndefined(i)&&Q.isModuloWithinPrecisionLimit(e,i,t.viewOptions.precisionLimit)&&(a.value=t.getDisplayValue(e,B.TickValue),q.isNullOrUndefined(t.viewOptions.ticksValuesTooltip)||(a.valueTooltip=t.viewOptions.ticksValuesTooltip(e),a.valueTooltipPlacement=t.viewOptions.vertical?"right":"top")),!q.isNullOrUndefined(t.viewOptions.getLegend)){var s=t.viewOptions.getLegend(e);q.isNullOrUndefined(s)||(a.legend=s)}return a}));if(q.isNullOrUndefined(this.ticks)||this.ticks.length!==r.length)this.ticks=r;else for(var o=0;o=this.viewLowValue)return!0}else if(this.viewOptions.showSelectionBar&&t<=this.viewLowValue)return!0}else{var e=this.viewOptions.showSelectionBarFromValue;if(this.viewLowValue>e&&t>=e&&t<=this.viewLowValue)return!0;if(this.viewLowValue=this.viewLowValue)return!0}return!!(this.range&&t>=this.viewLowValue&&t<=this.viewHighValue)}},{key:"updateFloorLabel",value:function(){this.floorLabelElement.alwaysHide||(this.floorLabelElement.setValue(this.getDisplayValue(this.viewOptions.floor,B.Floor)),this.floorLabelElement.calculateDimension(),this.floorLabelElement.setPosition(this.viewOptions.rightToLeft?this.fullBarElement.dimension-this.floorLabelElement.dimension:0))}},{key:"updateCeilLabel",value:function(){this.ceilLabelElement.alwaysHide||(this.ceilLabelElement.setValue(this.getDisplayValue(this.viewOptions.ceil,B.Ceil)),this.ceilLabelElement.calculateDimension(),this.ceilLabelElement.setPosition(this.viewOptions.rightToLeft?0:this.fullBarElement.dimension-this.ceilLabelElement.dimension))}},{key:"updateHandles",value:function(t,e){t===V.Min?this.updateLowHandle(e):t===V.Max&&this.updateHighHandle(e),this.updateSelectionBar(),this.updateTicksScale(),this.range&&this.updateCombinedLabel()}},{key:"getHandleLabelPos",value:function(t,e){var n=t===V.Min?this.minHandleLabelElement.dimension:this.maxHandleLabelElement.dimension,i=e-n/2+this.handleHalfDimension,r=this.fullBarElement.dimension-n;return this.viewOptions.boundPointerLabels?this.viewOptions.rightToLeft&&t===V.Min||!this.viewOptions.rightToLeft&&t===V.Max?Math.min(i,r):Math.min(Math.max(i,0),r):i}},{key:"updateLowHandle",value:function(t){this.minHandleElement.setPosition(t),this.minHandleLabelElement.setValue(this.getDisplayValue(this.viewLowValue,B.Low)),this.minHandleLabelElement.setPosition(this.getHandleLabelPos(V.Min,t)),q.isNullOrUndefined(this.viewOptions.getPointerColor)||(this.minPointerStyle={backgroundColor:this.getPointerColor(V.Min)}),this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}},{key:"updateHighHandle",value:function(t){this.maxHandleElement.setPosition(t),this.maxHandleLabelElement.setValue(this.getDisplayValue(this.viewHighValue,B.High)),this.maxHandleLabelElement.setPosition(this.getHandleLabelPos(V.Max,t)),q.isNullOrUndefined(this.viewOptions.getPointerColor)||(this.maxPointerStyle={backgroundColor:this.getPointerColor(V.Max)}),this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}},{key:"updateFloorAndCeilLabelsVisibility",value:function(){if(!this.viewOptions.hidePointerLabels){var t=!1,e=!1,n=this.isLabelBelowFloorLabel(this.minHandleLabelElement),i=this.isLabelAboveCeilLabel(this.minHandleLabelElement),r=this.isLabelAboveCeilLabel(this.maxHandleLabelElement),o=this.isLabelBelowFloorLabel(this.combinedLabelElement),a=this.isLabelAboveCeilLabel(this.combinedLabelElement);if(n?(t=!0,this.floorLabelElement.hide()):(t=!1,this.floorLabelElement.show()),i?(e=!0,this.ceilLabelElement.hide()):(e=!1,this.ceilLabelElement.show()),this.range){var s=this.combinedLabelElement.isVisible()?a:r,c=this.combinedLabelElement.isVisible()?o:n;s?this.ceilLabelElement.hide():e||this.ceilLabelElement.show(),c?this.floorLabelElement.hide():t||this.floorLabelElement.show()}}}},{key:"isLabelBelowFloorLabel",value:function(t){var e=t.position,n=this.floorLabelElement.position;return this.viewOptions.rightToLeft?e+t.dimension>=n-2:e<=n+this.floorLabelElement.dimension+2}},{key:"isLabelAboveCeilLabel",value:function(t){var e=t.position,n=this.ceilLabelElement.position;return this.viewOptions.rightToLeft?e<=n+this.ceilLabelElement.dimension+2:e+t.dimension>=n-2}},{key:"updateSelectionBar",value:function(){var t=0,e=0,n=this.viewOptions.rightToLeft?!this.viewOptions.showSelectionBarEnd:this.viewOptions.showSelectionBarEnd,i=this.viewOptions.rightToLeft?this.maxHandleElement.position+this.handleHalfDimension:this.minHandleElement.position+this.handleHalfDimension;if(this.range)e=Math.abs(this.maxHandleElement.position-this.minHandleElement.position),t=i;else if(q.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue))n?(e=Math.ceil(Math.abs(this.maxHandlePosition-this.minHandleElement.position)+this.handleHalfDimension),t=Math.floor(this.minHandleElement.position+this.handleHalfDimension)):(e=this.minHandleElement.position+this.handleHalfDimension,t=0);else{var r=this.viewOptions.showSelectionBarFromValue,o=this.valueToPosition(r);(this.viewOptions.rightToLeft?this.viewLowValue<=r:this.viewLowValue>r)?(e=this.minHandleElement.position-o,t=o+this.handleHalfDimension):(e=o-this.minHandleElement.position,t=this.minHandleElement.position+this.handleHalfDimension)}if(this.selectionBarElement.setDimension(e),this.selectionBarElement.setPosition(t),this.range&&this.viewOptions.showOuterSelectionBars&&(this.viewOptions.rightToLeft?(this.rightOuterSelectionBarElement.setDimension(t),this.rightOuterSelectionBarElement.setPosition(0),this.fullBarElement.calculateDimension(),this.leftOuterSelectionBarElement.setDimension(this.fullBarElement.dimension-(t+e)),this.leftOuterSelectionBarElement.setPosition(t+e)):(this.leftOuterSelectionBarElement.setDimension(t),this.leftOuterSelectionBarElement.setPosition(0),this.fullBarElement.calculateDimension(),this.rightOuterSelectionBarElement.setDimension(this.fullBarElement.dimension-(t+e)),this.rightOuterSelectionBarElement.setPosition(t+e))),q.isNullOrUndefined(this.viewOptions.getSelectionBarColor)){if(!q.isNullOrUndefined(this.viewOptions.selectionBarGradient)){var a=q.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue)?0:this.valueToPosition(this.viewOptions.showSelectionBarFromValue),s=a-t>0&&!n||a-t<=0&&n;this.barStyle={backgroundImage:"linear-gradient(to "+(this.viewOptions.vertical?s?"bottom":"top":s?"left":"right")+", "+this.viewOptions.selectionBarGradient.from+" 0%,"+this.viewOptions.selectionBarGradient.to+" 100%)"},this.viewOptions.vertical?(this.barStyle.backgroundPosition="center "+(a+e+t+(s?-this.handleHalfDimension:0))+"px",this.barStyle.backgroundSize="100% "+(this.fullBarElement.dimension-this.handleHalfDimension)+"px"):(this.barStyle.backgroundPosition=a-t+(s?this.handleHalfDimension:0)+"px center",this.barStyle.backgroundSize=this.fullBarElement.dimension-this.handleHalfDimension+"px 100%")}}else{var c=this.getSelectionBarColor();this.barStyle={backgroundColor:c}}}},{key:"getSelectionBarColor",value:function(){return this.range?this.viewOptions.getSelectionBarColor(this.value,this.highValue):this.viewOptions.getSelectionBarColor(this.value)}},{key:"getPointerColor",value:function(t){return this.viewOptions.getPointerColor(t===V.Max?this.highValue:this.value,t)}},{key:"getTickColor",value:function(t){return this.viewOptions.getTickColor(t)}},{key:"updateCombinedLabel",value:function(){if(this.viewOptions.rightToLeft?this.minHandleLabelElement.position-this.minHandleLabelElement.dimension-10<=this.maxHandleLabelElement.position:this.minHandleLabelElement.position+this.minHandleLabelElement.dimension+10>=this.maxHandleLabelElement.position){var t=this.getDisplayValue(this.viewLowValue,B.Low),e=this.getDisplayValue(this.viewHighValue,B.High),n=this.viewOptions.rightToLeft?this.viewOptions.combineLabels(e,t):this.viewOptions.combineLabels(t,e);this.combinedLabelElement.setValue(n);var i=this.viewOptions.boundPointerLabels?Math.min(Math.max(this.selectionBarElement.position+this.selectionBarElement.dimension/2-this.combinedLabelElement.dimension/2,0),this.fullBarElement.dimension-this.combinedLabelElement.dimension):this.selectionBarElement.position+this.selectionBarElement.dimension/2-this.combinedLabelElement.dimension/2;this.combinedLabelElement.setPosition(i),this.minHandleLabelElement.hide(),this.maxHandleLabelElement.hide(),this.combinedLabelElement.show()}else this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.maxHandleLabelElement.show(),this.minHandleLabelElement.show(),this.combinedLabelElement.hide();this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}},{key:"getDisplayValue",value:function(t,e){return q.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray||(t=this.getStepValue(t)),this.viewOptions.translate(t,e)}},{key:"roundStep",value:function(t,e){var n=q.isNullOrUndefined(e)?this.viewOptions.step:e,i=Q.roundToPrecisionLimit((t-this.viewOptions.floor)/n,this.viewOptions.precisionLimit);return i=Math.round(i)*n,Q.roundToPrecisionLimit(this.viewOptions.floor+i,this.viewOptions.precisionLimit)}},{key:"valueToPosition",value:function(t){var e=q.linearValueToPosition;q.isNullOrUndefined(this.viewOptions.customValueToPosition)?this.viewOptions.logScale&&(e=q.logValueToPosition):e=this.viewOptions.customValueToPosition;var n=e(t=Q.clampToRange(t,this.viewOptions.floor,this.viewOptions.ceil),this.viewOptions.floor,this.viewOptions.ceil);return q.isNullOrUndefined(n)&&(n=0),this.viewOptions.rightToLeft&&(n=1-n),n*this.maxHandlePosition}},{key:"positionToValue",value:function(t){var e=t/this.maxHandlePosition;this.viewOptions.rightToLeft&&(e=1-e);var n=q.linearPositionToValue;q.isNullOrUndefined(this.viewOptions.customPositionToValue)?this.viewOptions.logScale&&(n=q.logPositionToValue):n=this.viewOptions.customPositionToValue;var i=n(e,this.viewOptions.floor,this.viewOptions.ceil);return q.isNullOrUndefined(i)?0:i}},{key:"getEventXY",value:function(t,e){if(t instanceof MouseEvent)return this.viewOptions.vertical?t.clientY:t.clientX;var n=0,i=t.touches;if(!q.isNullOrUndefined(e))for(var r=0;ri?V.Max:this.viewOptions.rightToLeft?e>this.minHandleElement.position?V.Min:V.Max:e=this.maxHandlePosition?o=this.viewOptions.rightToLeft?this.viewOptions.floor:this.viewOptions.ceil:(o=this.positionToValue(a),o=e&&!q.isNullOrUndefined(this.viewOptions.tickStep)?this.roundStep(o,this.viewOptions.tickStep):this.roundStep(o)),this.positionTrackingHandle(o)}},{key:"onEnd",value:function(t){$.isTouchEvent(t)&&t.changedTouches[0].identifier!==this.touchId||(this.moving=!1,this.viewOptions.animate&&(this.sliderElementAnimateClass=!0),this.touchId=null,this.viewOptions.keyboardSupport||(this.minHandleElement.active=!1,this.maxHandleElement.active=!1,this.currentTrackingPointer=null),this.dragging.active=!1,this.unsubscribeOnMove(),this.unsubscribeOnEnd(),this.userChangeEnd.emit(this.getChangeContext()))}},{key:"onPointerFocus",value:function(t){var e=this,n=this.getPointerElement(t);n.on("blur",(function(){return e.onPointerBlur(n)})),n.on("keydown",(function(t){return e.onKeyboardEvent(t)})),n.on("keyup",(function(){return e.onKeyUp()})),n.active=!0,this.currentTrackingPointer=t,this.currentFocusPointer=t,this.firstKeyDown=!0}},{key:"onKeyUp",value:function(){this.firstKeyDown=!0,this.userChangeEnd.emit(this.getChangeContext())}},{key:"onPointerBlur",value:function(t){t.off("blur"),t.off("keydown"),t.off("keyup"),t.active=!1,q.isNullOrUndefined(this.touchId)&&(this.currentTrackingPointer=null,this.currentFocusPointer=null)}},{key:"getKeyActions",value:function(t){var e=this.viewOptions.ceil-this.viewOptions.floor,n=t+this.viewOptions.step,i=t-this.viewOptions.step,r=t+e/10,o=t-e/10;this.viewOptions.reversedControls&&(n=t-this.viewOptions.step,i=t+this.viewOptions.step,r=t-e/10,o=t+e/10);var a={UP:n,DOWN:i,LEFT:i,RIGHT:n,PAGEUP:r,PAGEDOWN:o,HOME:this.viewOptions.reversedControls?this.viewOptions.ceil:this.viewOptions.floor,END:this.viewOptions.reversedControls?this.viewOptions.floor:this.viewOptions.ceil};return this.viewOptions.rightToLeft&&(a.LEFT=n,a.RIGHT=i,this.viewOptions.vertical&&(a.UP=i,a.DOWN=n)),a}},{key:"onKeyboardEvent",value:function(t){var e=this.getCurrentTrackingValue(),n=q.isNullOrUndefined(t.keyCode)?t.which:t.keyCode,i=this.getKeyActions(e)[{38:"UP",40:"DOWN",37:"LEFT",39:"RIGHT",33:"PAGEUP",34:"PAGEDOWN",36:"HOME",35:"END"}[n]];if(!q.isNullOrUndefined(i)&&!q.isNullOrUndefined(this.currentTrackingPointer)){t.preventDefault(),this.firstKeyDown&&(this.firstKeyDown=!1,this.userChangeStart.emit(this.getChangeContext()));var r=Q.clampToRange(i,this.viewOptions.floor,this.viewOptions.ceil),o=this.roundStep(r);if(this.viewOptions.draggableRangeOnly){var a,s,c=this.viewHighValue-this.viewLowValue;this.currentTrackingPointer===V.Min?(a=o,(s=o+c)>this.viewOptions.ceil&&(a=(s=this.viewOptions.ceil)-c)):this.currentTrackingPointer===V.Max&&(s=o,(a=o-c)=this.maxHandlePosition-e;if(o<=n){if(0===i.position)return;a=this.getMinValue(o,!0,!1),s=this.getMaxValue(o,!0,!1)}else if(c){if(r.position===this.maxHandlePosition)return;s=this.getMaxValue(o,!0,!0),a=this.getMinValue(o,!0,!0)}else a=this.getMinValue(o,!1,!1),s=this.getMaxValue(o,!1,!1);this.positionTrackingBar(a,s)}},{key:"positionTrackingBar",value:function(t,e){!q.isNullOrUndefined(this.viewOptions.minLimit)&&tthis.viewOptions.maxLimit&&(t=Q.roundToPrecisionLimit((e=this.viewOptions.maxLimit)-this.dragging.difference,this.viewOptions.precisionLimit)),this.viewLowValue=t,this.viewHighValue=e,this.applyViewChange(),this.updateHandles(V.Min,this.valueToPosition(t)),this.updateHandles(V.Max,this.valueToPosition(e))}},{key:"positionTrackingHandle",value:function(t){t=this.applyMinMaxLimit(t),this.range&&(this.viewOptions.pushRange?t=this.applyPushRange(t):(this.viewOptions.noSwitching&&(this.currentTrackingPointer===V.Min&&t>this.viewHighValue?t=this.applyMinMaxRange(this.viewHighValue):this.currentTrackingPointer===V.Max&&tthis.viewHighValue?(this.viewLowValue=this.viewHighValue,this.applyViewChange(),this.updateHandles(V.Min,this.maxHandleElement.position),this.updateAriaAttributes(),this.currentTrackingPointer=V.Max,this.minHandleElement.active=!1,this.maxHandleElement.active=!0,this.viewOptions.keyboardSupport&&this.maxHandleElement.focus()):this.currentTrackingPointer===V.Max&&tthis.viewOptions.maxLimit?this.viewOptions.maxLimit:t}},{key:"applyMinMaxRange",value:function(t){var e=Math.abs(t-(this.currentTrackingPointer===V.Min?this.viewHighValue:this.viewLowValue));if(!q.isNullOrUndefined(this.viewOptions.minRange)&&ethis.viewOptions.maxRange){if(this.currentTrackingPointer===V.Min)return Q.roundToPrecisionLimit(this.viewHighValue-this.viewOptions.maxRange,this.viewOptions.precisionLimit);if(this.currentTrackingPointer===V.Max)return Q.roundToPrecisionLimit(this.viewLowValue+this.viewOptions.maxRange,this.viewOptions.precisionLimit)}return t}},{key:"applyPushRange",value:function(t){var e=this.currentTrackingPointer===V.Min?this.viewHighValue-t:t-this.viewLowValue,n=q.isNullOrUndefined(this.viewOptions.minRange)?this.viewOptions.step:this.viewOptions.minRange,i=this.viewOptions.maxRange;return ei&&(this.currentTrackingPointer===V.Min?(this.viewHighValue=Q.roundToPrecisionLimit(t+i,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(V.Max,this.valueToPosition(this.viewHighValue))):this.currentTrackingPointer===V.Max&&(this.viewLowValue=Q.roundToPrecisionLimit(t-i,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(V.Min,this.valueToPosition(this.viewLowValue))),this.updateAriaAttributes()),t}},{key:"getChangeContext",value:function(){var t=new H;return t.pointerType=this.currentTrackingPointer,t.value=+this.value,this.range&&(t.highValue=+this.highValue),t}},{key:"manualRefresh",set:function(t){var e=this;this.unsubscribeManualRefresh(),this.manualRefreshSubscription=t.subscribe((function(){setTimeout((function(){return e.calculateViewDimensionsAndDetectChanges()}))}))}},{key:"triggerFocus",set:function(t){var e=this;this.unsubscribeTriggerFocus(),this.triggerFocusSubscription=t.subscribe((function(t){e.focusPointer(t)}))}},{key:"range",get:function(){return!q.isNullOrUndefined(this.value)&&!q.isNullOrUndefined(this.highValue)}},{key:"showTicks",get:function(){return this.viewOptions.showTicks}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Ob(h.G),h.Ob(h.l),h.Ob(h.h),h.Ob(h.B))},t.\u0275cmp=h.Ib({type:t,selectors:[["ngx-slider"]],contentQueries:function(t,e,n){var i;1&t&&h.Hb(n,g,!0),2&t&&h.zc(i=h.cc())&&(e.tooltipTemplate=i.first)},viewQuery:function(t,e){var n;1&t&&(h.Wc(m,!0,Y),h.Wc(v,!0,Y),h.Wc(y,!0,Y),h.Wc(_,!0,Y),h.Wc(O,!0,K),h.Wc(k,!0,K),h.Wc(T,!0,Z),h.Wc(S,!0,Z),h.Wc(E,!0,Z),h.Wc(x,!0,Z),h.Wc(P,!0,Z),h.Wc(A,!0,Y)),2&t&&(h.zc(n=h.cc())&&(e.leftOuterSelectionBarElement=n.first),h.zc(n=h.cc())&&(e.rightOuterSelectionBarElement=n.first),h.zc(n=h.cc())&&(e.fullBarElement=n.first),h.zc(n=h.cc())&&(e.selectionBarElement=n.first),h.zc(n=h.cc())&&(e.minHandleElement=n.first),h.zc(n=h.cc())&&(e.maxHandleElement=n.first),h.zc(n=h.cc())&&(e.floorLabelElement=n.first),h.zc(n=h.cc())&&(e.ceilLabelElement=n.first),h.zc(n=h.cc())&&(e.minHandleLabelElement=n.first),h.zc(n=h.cc())&&(e.maxHandleLabelElement=n.first),h.zc(n=h.cc())&&(e.combinedLabelElement=n.first),h.zc(n=h.cc())&&(e.ticksElement=n.first))},hostAttrs:[1,"ngx-slider"],hostVars:5,hostBindings:function(t,e){1&t&&h.bc("resize",(function(t){return e.onResize(t)}),!1,h.Dc),2&t&&(h.Db("disabled",e.sliderElementDisabledAttr),h.Gb("vertical",e.sliderElementVerticalClass)("animate",e.sliderElementAnimateClass))},inputs:{value:"value",highValue:"highValue",options:"options",manualRefresh:"manualRefresh",triggerFocus:"triggerFocus"},outputs:{valueChange:"valueChange",highValueChange:"highValueChange",userChangeStart:"userChangeStart",userChange:"userChange",userChangeEnd:"userChangeEnd"},features:[h.Bb([nt]),h.Ab],decls:29,vars:13,consts:[["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-left-out-selection"],["leftOuterSelectionBar",""],[1,"ngx-slider-span","ngx-slider-bar"],["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-right-out-selection"],["rightOuterSelectionBar",""],["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-full-bar"],["fullBar",""],["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-selection-bar"],["selectionBar",""],[1,"ngx-slider-span","ngx-slider-bar","ngx-slider-selection",3,"ngStyle"],["ngxSliderHandle","",1,"ngx-slider-span","ngx-slider-pointer","ngx-slider-pointer-min",3,"ngStyle"],["minHandle",""],["ngxSliderHandle","",1,"ngx-slider-span","ngx-slider-pointer","ngx-slider-pointer-max",3,"ngStyle"],["maxHandle",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-limit","ngx-slider-floor"],["floorLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-limit","ngx-slider-ceil"],["ceilLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-model-value"],["minHandleLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-model-high"],["maxHandleLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-combined"],["combinedLabel",""],["ngxSliderElement","",1,"ngx-slider-ticks",3,"hidden"],["ticksElement",""],["class","ngx-slider-tick",3,"ngClass","ngStyle",4,"ngFor","ngForOf"],[1,"ngx-slider-tick",3,"ngClass","ngStyle"],[3,"template","tooltip","placement"],["class","ngx-slider-span ngx-slider-tick-value",3,"template","tooltip","placement","content",4,"ngIf"],["class","ngx-slider-span ngx-slider-tick-legend",3,"innerHTML",4,"ngIf"],[1,"ngx-slider-span","ngx-slider-tick-value",3,"template","tooltip","placement","content"],[1,"ngx-slider-span","ngx-slider-tick-legend",3,"innerHTML"]],template:function(t,e){1&t&&(h.Ub(0,"span",0,1),h.Pb(2,"span",2),h.Tb(),h.Ub(3,"span",3,4),h.Pb(5,"span",2),h.Tb(),h.Ub(6,"span",5,6),h.Pb(8,"span",2),h.Tb(),h.Ub(9,"span",7,8),h.Pb(11,"span",9),h.Tb(),h.Pb(12,"span",10,11),h.Pb(14,"span",12,13),h.Pb(16,"span",14,15),h.Pb(18,"span",16,17),h.Pb(20,"span",18,19),h.Pb(22,"span",20,21),h.Pb(24,"span",22,23),h.Ub(26,"span",24,25),h.Oc(28,R,4,9,"span",26),h.Tb()),2&t&&(h.Cb(6),h.Gb("ngx-slider-transparent",e.fullBarTransparentClass),h.Cb(3),h.Gb("ngx-slider-draggable",e.selectionBarDraggableClass),h.Cb(2),h.mc("ngStyle",e.barStyle),h.Cb(1),h.mc("ngStyle",e.minPointerStyle),h.Cb(2),h.Lc("display",e.range?"inherit":"none"),h.mc("ngStyle",e.maxPointerStyle),h.Cb(12),h.Gb("ngx-slider-ticks-values-under",e.ticksUnderValuesClass),h.mc("hidden",!e.showTicks),h.Cb(2),h.mc("ngForOf",e.ticks))},directives:function(){return[Y,b.o,K,Z,b.m,b.l,rt,b.n]},styles:[".ngx-slider{display:inline-block;position:relative;height:4px;width:100%;margin:35px 0 15px;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:pan-y} .ngx-slider.with-legend{margin-bottom:40px} .ngx-slider[disabled]{cursor:not-allowed} .ngx-slider[disabled] .ngx-slider-pointer{cursor:not-allowed;background-color:#d8e0f3} .ngx-slider[disabled] .ngx-slider-draggable{cursor:not-allowed} .ngx-slider[disabled] .ngx-slider-selection{background:#8b91a2} .ngx-slider[disabled] .ngx-slider-tick{cursor:not-allowed} .ngx-slider[disabled] .ngx-slider-tick.ngx-slider-selected{background:#8b91a2} .ngx-slider .ngx-slider-span{white-space:nowrap;position:absolute;display:inline-block} .ngx-slider .ngx-slider-base{width:100%;height:100%;padding:0} .ngx-slider .ngx-slider-bar-wrapper{left:0;box-sizing:border-box;margin-top:-16px;padding-top:16px;width:100%;height:32px;z-index:1} .ngx-slider .ngx-slider-draggable{cursor:move} .ngx-slider .ngx-slider-bar{left:0;width:100%;height:4px;z-index:1;background:#d8e0f3;border-radius:2px} .ngx-slider .ngx-slider-bar-wrapper.ngx-slider-transparent .ngx-slider-bar{background:0 0} .ngx-slider .ngx-slider-bar-wrapper.ngx-slider-left-out-selection .ngx-slider-bar{background:#df002d} .ngx-slider .ngx-slider-bar-wrapper.ngx-slider-right-out-selection .ngx-slider-bar{background:#03a688} .ngx-slider .ngx-slider-selection{z-index:2;background:#0db9f0;border-radius:2px} .ngx-slider .ngx-slider-pointer{cursor:pointer;width:32px;height:32px;top:-14px;background-color:#0db9f0;z-index:3;border-radius:16px} .ngx-slider .ngx-slider-pointer:after{content:'';width:8px;height:8px;position:absolute;top:12px;left:12px;border-radius:4px;background:#fff} .ngx-slider .ngx-slider-pointer:hover:after{background-color:#fff} .ngx-slider .ngx-slider-pointer.ngx-slider-active{z-index:4} .ngx-slider .ngx-slider-pointer.ngx-slider-active:after{background-color:#451aff} .ngx-slider .ngx-slider-bubble{cursor:default;bottom:16px;padding:1px 3px;color:#55637d;font-size:16px} .ngx-slider .ngx-slider-bubble.ngx-slider-limit{color:#55637d} .ngx-slider .ngx-slider-ticks{box-sizing:border-box;width:100%;height:0;position:absolute;left:0;top:-3px;margin:0;z-index:1;list-style:none} .ngx-slider .ngx-slider-ticks-values-under .ngx-slider-tick-value{top:auto;bottom:-36px} .ngx-slider .ngx-slider-tick{text-align:center;cursor:pointer;width:10px;height:10px;background:#d8e0f3;border-radius:50%;position:absolute;top:0;left:0;margin-left:11px} .ngx-slider .ngx-slider-tick.ngx-slider-selected{background:#0db9f0} .ngx-slider .ngx-slider-tick-value{position:absolute;top:-34px;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)} .ngx-slider .ngx-slider-tick-legend{position:absolute;top:24px;-webkit-transform:translate(-50%,0);transform:translate(-50%,0);max-width:50px;white-space:normal} .ngx-slider.vertical{position:relative;width:4px;height:100%;margin:0 20px;padding:0;vertical-align:baseline;touch-action:pan-x} .ngx-slider.vertical .ngx-slider-base{width:100%;height:100%;padding:0} .ngx-slider.vertical .ngx-slider-bar-wrapper{top:auto;left:0;margin:0 0 0 -16px;padding:0 0 0 16px;height:100%;width:32px} .ngx-slider.vertical .ngx-slider-bar{bottom:0;left:auto;width:4px;height:100%} .ngx-slider.vertical .ngx-slider-pointer{left:-14px!important;top:auto;bottom:0} .ngx-slider.vertical .ngx-slider-bubble{left:16px!important;bottom:0} .ngx-slider.vertical .ngx-slider-ticks{height:100%;width:0;left:-3px;top:0;z-index:1} .ngx-slider.vertical .ngx-slider-tick{vertical-align:middle;margin-left:auto;margin-top:11px} .ngx-slider.vertical .ngx-slider-tick-value{left:24px;top:auto;-webkit-transform:translate(0,-28%);transform:translate(0,-28%)} .ngx-slider.vertical .ngx-slider-tick-legend{top:auto;right:24px;-webkit-transform:translate(0,-28%);transform:translate(0,-28%);max-width:none;white-space:nowrap} .ngx-slider.vertical .ngx-slider-ticks-values-under .ngx-slider-tick-value{bottom:auto;left:auto;right:24px} .ngx-slider *{transition:none} .ngx-slider.animate .ngx-slider-bar-wrapper{transition:.3s linear} .ngx-slider.animate .ngx-slider-selection{transition:background-color .3s linear} .ngx-slider.animate .ngx-slider-pointer{transition:.3s linear} .ngx-slider.animate .ngx-slider-bubble{transition:.3s linear} .ngx-slider.animate .ngx-slider-bubble.ngx-slider-limit{transition:opacity .3s linear} .ngx-slider.animate .ngx-slider-bubble.ngx-slider-combined{transition:opacity .3s linear} .ngx-slider.animate .ngx-slider-tick{transition:background-color .3s linear}"]}),t}(),rt=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=h.Ib({type:t,selectors:[["ngx-slider-tooltip-wrapper"]],inputs:{template:"template",tooltip:"tooltip",placement:"placement",content:"content"},decls:2,vars:2,consts:[[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ngx-slider-inner-tooltip"]],template:function(t,e){1&t&&(h.Oc(0,U,2,6,"ng-container",0),h.Oc(1,F,3,3,"ng-container",0)),2&t&&(h.mc("ngIf",e.template),h.Cb(1),h.mc("ngIf",!e.template))},directives:[b.n,b.s],styles:[".ngx-slider-inner-tooltip[_ngcontent-%COMP%]{height:100%}"]}),t}(),ot=function(){var t=function t(){C(this,t)};return t.\u0275mod=h.Mb({type:t}),t.\u0275inj=h.Lb({factory:function(e){return new(e||t)},imports:[[b.c]]}),t}()},"4hXt":function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var i=n("kZht"),r=n("Rjzq"),o=n("aaFr"),a=n("ROO/"),s=n("aDqW"),c=n("1etq"),u=n("An66"),l=n("NxuZ"),d=n("icqo"),h=["orderTypeToggle"],f=["triggerBtn"];function p(t,e){1&t&&(i.Sb(0),i.Qc(1),i.gc(2,"translate"),i.Rb()),2&t&&(i.Cb(1),i.Sc(" ",i.hc(2,1,"LABEL.STOP_LOSS")," "))}function b(t,e){1&t&&(i.Sb(0),i.Qc(1),i.gc(2,"translate"),i.Rb()),2&t&&(i.Cb(1),i.Sc(" ",i.hc(2,1,"LABEL.TAKE_PROFIT")," "))}function g(t,e){1&t&&(i.Sb(0),i.Qc(1),i.gc(2,"translate"),i.Rb()),2&t&&(i.Cb(1),i.Sc(" ",i.hc(2,1,"LABEL.TRIGGER_ENTRY")," "))}function m(t,e){1&t&&(i.Sb(0),i.Qc(1),i.gc(2,"translate"),i.Rb()),2&t&&(i.Cb(1),i.Rc(i.hc(2,1,"LABEL.ADVANCED")))}var v=function(){var t=function(){function t(e){C(this,t),this.keybinds=e,this.isFlexMarket=!1,this.orderType="limit",this.changeOrderType=new i.o,this.openCalculator=new i.o,this.lastTrigger="stop"}return w(t,[{key:"ngAfterViewInit",value:function(){this.setupKeybinds()}},{key:"ngOnDestroy",value:function(){this.keybinds.dispose()}},{key:"setupKeybinds",value:function(){var t=this;this.keybinds.addBind("shift+l",(function(){t.onChangeOrderType("limit")})),this.keybinds.addBind("shift+m",(function(){t.onChangeOrderType("market")})),this.keybinds.register()}},{key:"onChangeOrderType",value:function(t){this.changeOrderType.emit(t),"limit"!==t&&"market"!==t&&(this.lastTrigger=t)}},{key:"isLimitOrder",get:function(){return"limit"===this.orderType}},{key:"isMarketOrder",get:function(){return"market"===this.orderType}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(r.a,2))},t.\u0275cmp=i.Ib({type:t,selectors:[["order-type-toggle"]],viewQuery:function(t,e){var n;1&t&&(i.Wc(h,!0),i.Wc(f,!0)),2&t&&(i.zc(n=i.cc())&&(e.orderTypeToggle=n.first),i.zc(n=i.cc())&&(e.triggerBtn=n.first))},inputs:{isFlexMarket:"isFlexMarket",orderType:"orderType",displayTooltips:"displayTooltips"},outputs:{changeOrderType:"changeOrderType",openCalculator:"openCalculator"},features:[i.Bb([r.a])],decls:27,vars:11,consts:[["orderTypeMenu","sbMenu"],["sb-menu-item","","type","button",3,"click"],["translate",""],[1,"tabs"],[1,"tab",3,"click"],["subheading","","translate",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["subheading","",1,"tab"],["icon","chevron-down","size","lg",3,"sbMenuTriggerFor"]],template:function(t,e){if(1&t&&(i.Ub(0,"sb-menu",null,0),i.Ub(2,"button",1),i.bc("click",(function(){return e.onChangeOrderType("stop")})),i.Ub(3,"span",2),i.Qc(4,"LABEL.STOP_LOSS"),i.Tb(),i.Tb(),i.Ub(5,"button",1),i.bc("click",(function(){return e.onChangeOrderType("take_profit")})),i.Ub(6,"span",2),i.Qc(7,"LABEL.TAKE_PROFIT"),i.Tb(),i.Tb(),i.Ub(8,"button",1),i.bc("click",(function(){return e.onChangeOrderType("trigger_entry")})),i.Ub(9,"span",2),i.Qc(10,"LABEL.TRIGGER_ENTRY"),i.Tb(),i.Tb(),i.Tb(),i.Ub(11,"div",3),i.Ub(12,"div",4),i.bc("click",(function(){return e.onChangeOrderType("limit")})),i.Ub(13,"p",5),i.Qc(14,"BUTTON.LIMIT_ORDER_SHORT"),i.Tb(),i.Tb(),i.Ub(15,"div",4),i.bc("click",(function(){return e.onChangeOrderType("market")})),i.Ub(16,"p",5),i.Qc(17,"BUTTON.MARKET_ORDER_SHORT"),i.Tb(),i.Tb(),i.Ub(18,"div",4),i.bc("click",(function(){return e.onChangeOrderType(e.lastTrigger)})),i.Ub(19,"p",5),i.Sb(20,6),i.Oc(21,p,3,3,"ng-container",7),i.Oc(22,b,3,3,"ng-container",7),i.Oc(23,g,3,3,"ng-container",7),i.Oc(24,m,3,3,"ng-container",8),i.Rb(),i.Tb(),i.Tb(),i.Ub(25,"div",9),i.Pb(26,"fa-icon",10),i.Tb(),i.Tb()),2&t){var n=i.Ac(1);i.Cb(12),i.Gb("active","limit"===e.orderType),i.Cb(3),i.Gb("active","market"===e.orderType),i.Cb(3),i.Gb("active",!e.isLimitOrder&&!e.isMarketOrder),i.Cb(2),i.mc("ngSwitch",e.lastTrigger),i.Cb(1),i.mc("ngSwitchCase","stop"),i.Cb(1),i.mc("ngSwitchCase","take_profit"),i.Cb(1),i.mc("ngSwitchCase","trigger_entry"),i.Cb(3),i.mc("sbMenuTriggerFor",n)}},directives:[o.a,a.a,s.a,c.a,u.p,u.q,u.r,l.b,d.b],pipes:[s.d],styles:[".calculator[_ngcontent-%COMP%]{align-self:center;cursor:pointer;font-size:24px;margin-left:var(--spacing);margin-bottom:var(--spacing)}.order-toggle[_ngcontent-%COMP%]{display:flex;flex-direction:row}.order-toggle[_ngcontent-%COMP%] mat-button-toggle[_ngcontent-%COMP%]{flex:1}.tabs[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;margin-bottom:var(--spacing);cursor:pointer;border-bottom:1px solid var(--border-colour)}.tabs[_ngcontent-%COMP%] .tab[_ngcontent-%COMP%]{padding:4px 8px 6px}.tabs[_ngcontent-%COMP%] .tab.active[_ngcontent-%COMP%]{border-bottom:2px solid var(--input-colour)}"],changeDetection:0}),t}()},"4x5s":function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("J180"),a=n("4f9k");e.BrowserQRCodeReader=function(t){function e(e){return void 0===e&&(e=500),t.call(this,new a.default,e)||this}return r(e,t),e}(o.BrowserCodeReader)},"5AUt":function(t,e,n){"use strict";n.r(e),n.d(e,"OrderCalculatorsComponent",(function(){return m}));var i=n("mcff"),r=n("zqNl"),o=n("sq1e"),a=n("+Px6"),s=n("R1aX"),c=n("J/3c"),u=n("kZht"),l=n("rfPA"),d=n("bBQR"),h=n("rEzU"),f=n("RnHX"),p=n("IwOb"),b=n("aDqW"),g=n("An66"),m=function(){var t=function(){function t(e,n){C(this,t),this.inputs=e,this.store=n,this.classification$=this.store.pipe(Object(r.m)(s.c)),this.markets$=this.store.pipe(Object(r.m)(a.f)),this.selectedMarket$=this.store.pipe(Object(r.m)(a.n)),this.wallets$=this.store.pipe(Object(r.m)(c.h))}return w(t,[{key:"ngOnInit",value:function(){"liquidation"===this.inputs.calculator&&(this.tabs.selectedIndex=1)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Ob(i.a),u.Ob(r.b))},t.\u0275cmp=u.Ib({type:t,selectors:[["order-calculators"]],viewQuery:function(t,e){var n;1&t&&u.Jc(o.c,!0),2&t&&u.zc(n=u.cc())&&(e.tabs=n.first)},decls:14,vars:28,consts:[["heading","HEADING.CALCULATORS",3,"padding"],[1,"tabs"],[3,"label"],[3,"mid","markets","selectedMarket"],[3,"mid","markets","selectedMarket","classification","wallets"]],template:function(t,e){1&t&&(u.Ub(0,"pro-dialog",0),u.Ub(1,"mat-tab-group",1),u.Ub(2,"mat-tab",2),u.gc(3,"translate"),u.Pb(4,"profit-loss-calculator",3),u.gc(5,"async"),u.gc(6,"async"),u.Tb(),u.Ub(7,"mat-tab",2),u.gc(8,"translate"),u.Pb(9,"liquidation-calculator",4),u.gc(10,"async"),u.gc(11,"async"),u.gc(12,"async"),u.gc(13,"async"),u.Tb(),u.Tb(),u.Tb()),2&t&&(u.mc("padding",!1),u.Cb(1),u.mc("@.disabled",!0),u.Cb(1),u.mc("label",u.hc(3,12,"LABEL.PROFIT_AND_LOSS")),u.Cb(2),u.mc("mid",e.inputs.mid)("markets",u.hc(5,14,e.markets$))("selectedMarket",u.hc(6,16,e.selectedMarket$)),u.Cb(3),u.mc("label",u.hc(8,18,"LABEL.LIQUIDATION")),u.Cb(2),u.mc("mid",e.inputs.mid)("markets",u.hc(10,20,e.markets$))("selectedMarket",u.hc(11,22,e.selectedMarket$))("classification",u.hc(12,24,e.classification$))("wallets",u.hc(13,26,e.wallets$)))},directives:[l.a,d.a,o.c,o.a,h.a,f.a,p.a],pipes:[b.d,g.b],styles:[".tabs[_ngcontent-%COMP%]{width:550px}@media (max-width:599px){.tabs[_ngcontent-%COMP%]{width:100%}}"],changeDetection:0}),t}()},"5E2i":function(t,e,n){"use strict";function i(t){return t}n.d(e,"a",(function(){return i}))},"5GZx":function(t,e,n){"use strict";n.d(e,"a",(function(){return J})),n.d(e,"b",(function(){return X})),n.d(e,"c",(function(){return Y})),n.d(e,"d",(function(){return M})),n.d(e,"e",(function(){return F})),n.d(e,"f",(function(){return et}));var i=n("VbQ3"),r=n("kZht"),s=n("An66"),u=n("5XID"),l=n("vE5V"),d=n("ZtZA"),f=n("O1jd"),b=n("ZTXN"),g=n("bwdy"),v=n("g6G6"),y=n("J+dc"),_=n("kuMc"),O=n("B8NW"),k=n("Hq54"),T=function(){function t(e,n){C(this,t),this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=n}return w(t,[{key:"attach",value:function(){}},{key:"enable",value:function(){if(this._canBeEnabled()){var t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=Object(u.d)(-this._previousScrollPosition.left),t.style.top=Object(u.d)(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}},{key:"disable",value:function(){if(this._isEnabled){var t=this._document.documentElement,e=t.style,n=this._document.body.style,i=e.scrollBehavior||"",r=n.scrollBehavior||"";this._isEnabled=!1,e.left=this._previousHTMLStyles.left,e.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),e.scrollBehavior=n.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),e.scrollBehavior=i,n.scrollBehavior=r}}},{key:"_canBeEnabled",value:function(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}}]),t}(),S=function(){function t(e,n,i,r){var o=this;C(this,t),this._scrollDispatcher=e,this._ngZone=n,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=function(){o.disable(),o._overlayRef.hasAttached()&&o._ngZone.run((function(){return o._overlayRef.detach()}))}}return w(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe((function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()}))):this._scrollSubscription=e.subscribe(this._detach)}}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),E=function(){function t(){C(this,t)}return w(t,[{key:"enable",value:function(){}},{key:"disable",value:function(){}},{key:"attach",value:function(){}}]),t}();function x(t,e){return e.some((function(e){return t.bottome.bottom||t.righte.right}))}function P(t,e){return e.some((function(e){return t.tope.bottom||t.lefte.right}))}var A=function(){function t(e,n,i,r){C(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this._config=r,this._scrollSubscription=null}return w(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe((function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),n=t._viewportRuler.getViewportSize(),i=n.width,r=n.height;x(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(t.disable(),t._ngZone.run((function(){return t._overlayRef.detach()})))}})))}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),I=function(){var t=function t(e,n,i,r){var o=this;C(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this.noop=function(){return new E},this.close=function(t){return new S(o._scrollDispatcher,o._ngZone,o._viewportRuler,t)},this.block=function(){return new T(o._viewportRuler,o._document)},this.reposition=function(t){return new A(o._scrollDispatcher,o._viewportRuler,o._ngZone,t)},this._document=r};return t.\u0275fac=function(e){return new(e||t)(r.Yb(i.f),r.Yb(i.h),r.Yb(r.B),r.Yb(s.d))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(i.f),Object(r.Yb)(i.h),Object(r.Yb)(r.B),Object(r.Yb)(s.d))},token:t,providedIn:"root"}),t}(),M=function t(e){if(C(this,t),this.scrollStrategy=new E,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e)for(var n=0,i=Object.keys(e);n-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(s.d))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(s.d))},token:t,providedIn:"root"}),t}(),L=function(){var t=function(t){a(n,t);var e=c(n);function n(t){var i;return C(this,n),(i=e.call(this,t))._keydownListener=function(t){for(var e=i._attachedOverlays,n=e.length-1;n>-1;n--)if(e[n]._keydownEvents.observers.length>0){e[n]._keydownEvents.next(t);break}},i}return w(n,[{key:"add",value:function(t){o(h(n.prototype),"add",this).call(this,t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}]),n}(j);return t.\u0275fac=function(e){return new(e||t)(r.Yb(s.d))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(s.d))},token:t,providedIn:"root"}),t}(),N=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t))._platform=i,r._cursorStyleIsSet=!1,r._clickListener=function(t){for(var e=t.composedPath?t.composedPath()[0]:t.target,n=r._attachedOverlays.slice(),i=n.length-1;i>-1;i--){var o=n[i];if(!(o._outsidePointerEvents.observers.length<1)&&o.hasAttached()){if(o.overlayElement.contains(e))break;o._outsidePointerEvents.next(t)}}},r}return w(n,[{key:"add",value:function(t){o(h(n.prototype),"add",this).call(this,t),this._isAttached||(this._document.body.addEventListener("click",this._clickListener,!0),this._document.body.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=this._document.body.style.cursor,this._document.body.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("click",this._clickListener,!0),this._document.body.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}}]),n}(j);return t.\u0275fac=function(e){return new(e||t)(r.Yb(s.d),r.Yb(f.a))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(s.d),Object(r.Yb)(f.a))},token:t,providedIn:"root"}),t}(),U=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine),F=function(){var t=function(){function t(e,n){C(this,t),this._platform=n,this._document=e}return w(t,[{key:"ngOnDestroy",value:function(){var t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}},{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){var t=this._platform?this._platform.isBrowser:"undefined"!=typeof window;if(t||U)for(var e=this._document.querySelectorAll('.cdk-overlay-container[platform="server"], .cdk-overlay-container[platform="test"]'),n=0;nf&&(f=m,h=g)}}catch(v){b.e(v)}finally{b.f()}return this._isPushed=!1,void this._applyPosition(h.position,h.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(t.position,t.originPoint);this._applyPosition(t.position,t.originPoint)}}},{key:"detach",value:function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}},{key:"dispose",value:function(){this._isDisposed||(this._boundingBox&&H(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove("cdk-overlay-connected-position-bounding-box"),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}},{key:"reapplyLastPosition",value:function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}},{key:"withScrollableContainers",value:function(t){return this._scrollables=t,this}},{key:"withPositions",value:function(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}},{key:"withViewportMargin",value:function(t){return this._viewportMargin=t,this}},{key:"withFlexibleDimensions",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hasFlexibleDimensions=t,this}},{key:"withGrowAfterOpen",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._growAfterOpen=t,this}},{key:"withPush",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._canPush=t,this}},{key:"withLockedPosition",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._positionLocked=t,this}},{key:"setOrigin",value:function(t){return this._origin=t,this}},{key:"withDefaultOffsetX",value:function(t){return this._offsetX=t,this}},{key:"withDefaultOffsetY",value:function(t){return this._offsetY=t,this}},{key:"withTransformOriginOn",value:function(t){return this._transformOriginSelector=t,this}},{key:"_getOriginPoint",value:function(t,e){var n;if("center"==e.originX)n=t.left+t.width/2;else{var i=this._isRtl()?t.right:t.left,r=this._isRtl()?t.left:t.right;n="start"==e.originX?i:r}return{x:n,y:"center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}}},{key:"_getOverlayPoint",value:function(t,e,n){var i,r;return i="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,r="center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height,{x:t.x+i,y:t.y+r}}},{key:"_getOverlayFit",value:function(t,e,n,i){var r=t.x,o=t.y,a=this._getOffset(i,"x"),s=this._getOffset(i,"y");a&&(r+=a),s&&(o+=s);var c=0-o,u=o+e.height-n.height,l=this._subtractOverflows(e.width,0-r,r+e.width-n.width),d=this._subtractOverflows(e.height,c,u),h=l*d;return{visibleArea:h,isCompletelyWithinViewport:e.width*e.height===h,fitsInViewportVertically:d===e.height,fitsInViewportHorizontally:l==e.width}}},{key:"_canFitWithFlexibleDimensions",value:function(t,e,n){if(this._hasFlexibleDimensions){var i=n.bottom-e.y,r=n.right-e.x,o=q(this._overlayRef.getConfig().minHeight),a=q(this._overlayRef.getConfig().minWidth),s=t.fitsInViewportHorizontally||null!=a&&a<=r;return(t.fitsInViewportVertically||null!=o&&o<=i)&&s}return!1}},{key:"_pushOverlayOnScreen",value:function(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};var i,r,o=this._viewportRect,a=Math.max(t.x+e.width-o.width,0),s=Math.max(t.y+e.height-o.height,0),c=Math.max(o.top-n.top-t.y,0),u=Math.max(o.left-n.left-t.x,0);return i=e.width<=o.width?u||-a:t.xd&&!this._isInitialRender&&!this._growAfterOpen&&(i=t.y-d/2)}if("end"===e.overlayX&&!u||"start"===e.overlayX&&u)s=c.width-t.x+this._viewportMargin,o=t.x-this._viewportMargin;else if("start"===e.overlayX&&!u||"end"===e.overlayX&&u)a=t.x,o=c.right-t.x;else{var h=Math.min(c.right-t.x+c.left,t.x),f=this._lastBoundingBoxSize.width;o=2*h,a=t.x-h,o>f&&!this._isInitialRender&&!this._growAfterOpen&&(a=t.x-f/2)}return{top:i,left:a,bottom:r,right:s,width:o,height:n}}},{key:"_setBoundingBoxStyles",value:function(t,e){var n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{var r=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;i.height=Object(u.d)(n.height),i.top=Object(u.d)(n.top),i.bottom=Object(u.d)(n.bottom),i.width=Object(u.d)(n.width),i.left=Object(u.d)(n.left),i.right=Object(u.d)(n.right),i.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",i.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",r&&(i.maxHeight=Object(u.d)(r)),o&&(i.maxWidth=Object(u.d)(o))}this._lastBoundingBoxSize=n,H(this._boundingBox.style,i)}},{key:"_resetBoundingBoxStyles",value:function(){H(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}},{key:"_resetOverlayElementStyles",value:function(){H(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}},{key:"_setOverlayElementStyles",value:function(t,e){var n={},i=this._hasExactPosition(),r=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(i){var a=this._viewportRuler.getViewportScrollPosition();H(n,this._getExactOverlayY(e,t,a)),H(n,this._getExactOverlayX(e,t,a))}else n.position="static";var s="",c=this._getOffset(e,"x"),l=this._getOffset(e,"y");c&&(s+="translateX(".concat(c,"px) ")),l&&(s+="translateY(".concat(l,"px)")),n.transform=s.trim(),o.maxHeight&&(i?n.maxHeight=Object(u.d)(o.maxHeight):r&&(n.maxHeight="")),o.maxWidth&&(i?n.maxWidth=Object(u.d)(o.maxWidth):r&&(n.maxWidth="")),H(this._pane.style,n)}},{key:"_getExactOverlayY",value:function(t,e,n){var i={top:"",bottom:""},r=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n));var o=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return r.y-=o,"bottom"===t.overlayY?i.bottom=this._document.documentElement.clientHeight-(r.y+this._overlayRect.height)+"px":i.top=Object(u.d)(r.y),i}},{key:"_getExactOverlayX",value:function(t,e,n){var i={left:"",right:""},r=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n)),"right"===(this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?i.right=this._document.documentElement.clientWidth-(r.x+this._overlayRect.width)+"px":i.left=Object(u.d)(r.x),i}},{key:"_getScrollVisibility",value:function(){var t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map((function(t){return t.getElementRef().nativeElement.getBoundingClientRect()}));return{isOriginClipped:P(t,n),isOriginOutsideView:x(t,n),isOverlayClipped:P(e,n),isOverlayOutsideView:x(e,n)}}},{key:"_subtractOverflows",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:"";return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}},{key:"left",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}},{key:"bottom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}},{key:"right",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}},{key:"width",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}},{key:"height",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}},{key:"centerHorizontally",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.left(t),this._justifyContent="center",this}},{key:"centerVertically",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.top(t),this._alignItems="center",this}},{key:"apply",value:function(){if(this._overlayRef&&this._overlayRef.hasAttached()){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),i=n.width,r=n.height,o=n.maxWidth,a=n.maxHeight,s=!("100%"!==i&&"100vw"!==i||o&&"100%"!==o&&"100vw"!==o),c=!("100%"!==r&&"100vh"!==r||a&&"100%"!==a&&"100vh"!==a);t.position=this._cssPosition,t.marginLeft=s?"0":this._leftOffset,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,s?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=c?"flex-start":this._alignItems}}},{key:"dispose",value:function(){if(!this._isDisposed&&this._overlayRef){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove("cdk-global-overlay-wrapper"),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}}]),t}(),W=function(){var t=function(){function t(e,n,i,r){C(this,t),this._viewportRuler=e,this._document=n,this._platform=i,this._overlayContainer=r}return w(t,[{key:"global",value:function(){return new Q}},{key:"connectedTo",value:function(t,e,n){return new $(e,n,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}},{key:"flexibleConnectedTo",value:function(t){return new V(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(i.h),r.Yb(s.d),r.Yb(f.a),r.Yb(F))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(i.h),Object(r.Yb)(s.d),Object(r.Yb)(f.a),Object(r.Yb)(F))},token:t,providedIn:"root"}),t}(),G=0,Y=function(){var t=function(){function t(e,n,i,r,o,a,s,c,u,l,d){C(this,t),this.scrollStrategies=e,this._overlayContainer=n,this._componentFactoryResolver=i,this._positionBuilder=r,this._keyboardDispatcher=o,this._injector=a,this._ngZone=s,this._document=c,this._directionality=u,this._location=l,this._outsideClickDispatcher=d}return w(t,[{key:"create",value:function(t){var e=this._createHostElement(),n=this._createPaneElement(e),i=this._createPortalOutlet(n),r=new M(t);return r.direction=r.direction||this._directionality.value,new B(i,e,n,r,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}},{key:"position",value:function(){return this._positionBuilder}},{key:"_createPaneElement",value:function(t){var e=this._document.createElement("div");return e.id="cdk-overlay-"+G++,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}},{key:"_createHostElement",value:function(){var t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}},{key:"_createPortalOutlet",value:function(t){return this._appRef||(this._appRef=this._injector.get(r.g)),new d.e(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(I),r.Yb(F),r.Yb(r.j),r.Yb(W),r.Yb(L),r.Yb(r.t),r.Yb(r.B),r.Yb(s.d),r.Yb(l.b),r.Yb(s.j),r.Yb(N))},t.\u0275prov=r.Kb({token:t,factory:t.\u0275fac}),t}(),K=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Z=new r.s("cdk-connected-overlay-scroll-strategy"),X=function(){var t=function t(e){C(this,t),this.elementRef=e};return t.\u0275fac=function(e){return new(e||t)(r.Ob(r.l))},t.\u0275dir=r.Jb({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),t}(),J=function(){var t=function(){function t(e,n,i,o,a){C(this,t),this._overlay=e,this._dir=a,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=g.a.EMPTY,this._attachSubscription=g.a.EMPTY,this._detachSubscription=g.a.EMPTY,this._positionSubscription=g.a.EMPTY,this.viewportMargin=0,this.open=!1,this.backdropClick=new r.o,this.positionChange=new r.o,this.attach=new r.o,this.detach=new r.o,this.overlayKeydown=new r.o,this.overlayOutsideClick=new r.o,this._templatePortal=new d.h(n,i),this._scrollStrategyFactory=o,this.scrollStrategy=this._scrollStrategyFactory()}return w(t,[{key:"ngOnDestroy",value:function(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}},{key:"ngOnChanges",value:function(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}},{key:"_createOverlay",value:function(){var t=this;this.positions&&this.positions.length||(this.positions=K);var e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe((function(){return t.attach.emit()})),this._detachSubscription=e.detachments().subscribe((function(){return t.detach.emit()})),e.keydownEvents().subscribe((function(e){t.overlayKeydown.next(e),e.keyCode!==k.f||Object(k.r)(e)||(e.preventDefault(),t._detachOverlay())})),this._overlayRef.outsidePointerEvents().subscribe((function(e){t.overlayOutsideClick.next(e)}))}},{key:"_buildConfig",value:function(){var t=this._position=this.positionStrategy||this._createPositionStrategy(),e=new M({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(e.width=this.width),(this.height||0===this.height)&&(e.height=this.height),(this.minWidth||0===this.minWidth)&&(e.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),this.panelClass&&(e.panelClass=this.panelClass),e}},{key:"_updatePositionStrategy",value:function(t){var e=this,n=this.positions.map((function(t){return{originX:t.originX,originY:t.originY,overlayX:t.overlayX,overlayY:t.overlayY,offsetX:t.offsetX||e.offsetX,offsetY:t.offsetY||e.offsetY,panelClass:t.panelClass||void 0}}));return t.setOrigin(this.origin.elementRef).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}},{key:"_createPositionStrategy",value:function(){var t=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(t),t}},{key:"_attachOverlay",value:function(){var t=this;this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe((function(e){t.backdropClick.emit(e)})):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(Object(O.a)((function(){return t.positionChange.observers.length>0}))).subscribe((function(e){t.positionChange.emit(e),0===t.positionChange.observers.length&&t._positionSubscription.unsubscribe()})))}},{key:"_detachOverlay",value:function(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}},{key:"offsetX",get:function(){return this._offsetX},set:function(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}},{key:"offsetY",get:function(){return this._offsetY},set:function(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=Object(u.c)(t)}},{key:"lockPosition",get:function(){return this._lockPosition},set:function(t){this._lockPosition=Object(u.c)(t)}},{key:"flexibleDimensions",get:function(){return this._flexibleDimensions},set:function(t){this._flexibleDimensions=Object(u.c)(t)}},{key:"growAfterOpen",get:function(){return this._growAfterOpen},set:function(t){this._growAfterOpen=Object(u.c)(t)}},{key:"push",get:function(){return this._push},set:function(t){this._push=Object(u.c)(t)}},{key:"overlayRef",get:function(){return this._overlayRef}},{key:"dir",get:function(){return this._dir?this._dir.value:"ltr"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(Y),r.Ob(r.N),r.Ob(r.R),r.Ob(Z),r.Ob(l.b,8))},t.\u0275dir=r.Jb({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],open:["cdkConnectedOverlayOpen","open"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"],positions:["cdkConnectedOverlayPositions","positions"],origin:["cdkConnectedOverlayOrigin","origin"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[r.Ab]}),t}(),tt={provide:Z,deps:[Y],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},et=function(){var t=function t(){C(this,t)};return t.\u0275mod=r.Mb({type:t}),t.\u0275inj=r.Lb({factory:function(e){return new(e||t)},providers:[Y,tt],imports:[[l.a,d.g,i.g],i.g]}),t}()},"5JSY":function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return d}));var i=n("zqNl"),r=n("p5wL"),o=n("0YqF"),a=n("644g"),s=Object(i.i)({platform:"kraken"},Object(i.k)(o.a,(function(t,e){var n=e.platform;return Object(r.b)(n,t,"platform")})));function c(t,e){return s(t,e)}var u=Object(i.h)("env"),l=Object(i.j)(u,(function(t){return t.platform})),d=Object(i.j)(l,(function(t){return Object(a.a)(t)}))},"5OId":function(t,e){var n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";e.KANJI=new RegExp(n,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(i,"g"),e.NUMERIC=new RegExp("[0-9]+","g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var r=new RegExp("^"+n+"$"),o=new RegExp("^[0-9]+$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return r.test(t)},e.testNumeric=function(t){return o.test(t)},e.testAlphanumeric=function(t){return a.test(t)}},"5OT+":function(t,e,n){"use strict";var i=n("pPqe");n.d(e,"a",(function(){return i.a}));var r=n("zho4");n.d(e,"b",(function(){return r.a}));var o=n("y1fC");n.d(e,"c",(function(){return o.a})),n.d(e,"e",(function(){return o.b}));var a=n("o09O");n.d(e,"d",(function(){return a.a}))},"5XID":function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return r})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return u})),n.d(e,"f",(function(){return o}));var i=n("kZht");function r(t){return null!=t&&""+t!="false"}function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return a(t)?Number(t):e}function a(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function s(t){return Array.isArray(t)?t:[t]}function c(t){return null==t?"":"string"==typeof t?t:t+"px"}function u(t){return t instanceof i.l?t.nativeElement:t}},"5a6m":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("3as9"),r=n("kZht"),o={browser:[[/(KrakenFutures)\/([0-9._-]+)/i],[[i.UAParser.BROWSER.NAME,"Kraken Futures App"],i.UAParser.BROWSER.VERSION]]},a=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){var e=new i.UAParser(t,o).getResult(),n=e.os,r=e.browser;return"".concat(n.name," / ").concat(r.name)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=r.Nb({name:"userAgent",type:t,pure:!0}),t}()},"5uDM":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("cJ9h");function r(t,e){return Object(i.a)(t,e,1)}},"5uGe":function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var i=n("IJgj"),r=n("rWo0"),s=n("bwdy"),u=n("25CY"),d=n("HgnN"),f=n("i9P/"),p=function(t){a(n,t);var e=c(n);function n(t,i,o){var a;switch(C(this,n),(a=e.call(this)).syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=r.a;break;case 1:if(!t){a.destination=r.a;break}if("object"==typeof t){t instanceof n?(a.syncErrorThrowable=t.syncErrorThrowable,a.destination=t,t.add(l(a))):(a.syncErrorThrowable=!0,a.destination=new b(l(a),t));break}default:a.syncErrorThrowable=!0,a.destination=new b(l(a),t,i,o)}return a}return w(n,[{key:u.a,value:function(){return this}},{key:"next",value:function(t){this.isStopped||this._next(t)}},{key:"error",value:function(t){this.isStopped||(this.isStopped=!0,this._error(t))}},{key:"complete",value:function(){this.isStopped||(this.isStopped=!0,this._complete())}},{key:"unsubscribe",value:function(){this.closed||(this.isStopped=!0,o(h(n.prototype),"unsubscribe",this).call(this))}},{key:"_next",value:function(t){this.destination.next(t)}},{key:"_error",value:function(t){this.destination.error(t),this.unsubscribe()}},{key:"_complete",value:function(){this.destination.complete(),this.unsubscribe()}},{key:"_unsubscribeAndRecycle",value:function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}],[{key:"create",value:function(t,e,i){var r=new n(t,e,i);return r.syncErrorThrowable=!1,r}}]),n}(s.a),b=function(t){a(n,t);var e=c(n);function n(t,o,a,s){var c,u;C(this,n),(c=e.call(this))._parentSubscriber=t;var d=l(c);return Object(i.a)(o)?u=o:o&&(u=o.next,a=o.error,s=o.complete,o!==r.a&&(d=Object.create(o),Object(i.a)(d.unsubscribe)&&c.add(d.unsubscribe.bind(d)),d.unsubscribe=c.unsubscribe.bind(l(c)))),c._context=d,c._next=u,c._error=a,c._complete=s,c}return w(n,[{key:"next",value:function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;d.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}},{key:"error",value:function(t){if(!this.isStopped){var e=this._parentSubscriber,n=d.a.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):Object(f.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(f.a)(t)}}}},{key:"complete",value:function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};d.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}},{key:"__tryOrUnsub",value:function(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),d.a.useDeprecatedSynchronousErrorHandling)throw n;Object(f.a)(n)}}},{key:"__tryOrSetError",value:function(t,e,n){if(!d.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(i){return d.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(Object(f.a)(i),!0)}return!1}},{key:"_unsubscribe",value:function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}]),n}(p)},"644g":function(t,e,n){"use strict";function i(t){return"cf"===t?"Crypto Facilities":"Kraken Futures"}n.d(e,"a",(function(){return i}))},"67SP":function(t,e,n){"use strict";var i=n("B9MG"),r=(o.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(e){return!1}}())?2147483647:1073741823;function o(t,e,n){return o.TYPED_ARRAY_SUPPORT||this instanceof o?"number"==typeof t?c(this,t):function(t,e,n,i){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,i){if(n<0||e.byteLength=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|t}function s(t,e){var n;return o.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(e)).__proto__=o.prototype:(null===(n=t)&&(n=new o(e)),n.length=e),n}function c(t,e){var n=s(t,e<0?0:0|a(e));if(!o.TYPED_ARRAY_SUPPORT)for(var i=0;i55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.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;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function d(t){return o.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:l(t).length)}o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),o.prototype.write=function(t,e,n){void 0===e||void 0===n&&"string"==typeof e?(n=this.length,e=0):isFinite(e)&&(e|=0,isFinite(n)?n|=0:n=void 0);var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,n,i){return function(t,e,n,i){for(var r=0;r=e.length||r>=t.length);++r)e[r+n]=t[r];return r}(l(e,t.length-n),t,n,i)}(this,t,e,n)},o.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--r)t[r+e]=this[r+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(r=e;r=10&&(s|=1<<1-u),1!==u&&(a=t.getNextSet(a),a=t.getNextUnset(a))}if(2!==n.length)throw new c.default;if(parseInt(n.toString())%4!==s)throw new c.default;return a},t.parseExtensionString=function(t){return 2!==t.length?null:new Map([[s.default.ISSUE_NUMBER,parseInt(t)]])},t}()},"6BNo":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n}return w(t,[{key:"ngOnInit",value:function(){this.renderer.addClass(this.element.nativeElement,"global__text--nobr")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","nobr",""]]}),t}()},"6D9M":function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n("zqNl"),r=n("J/3c"),o=n("lE9u"),a=n("rxqU"),s=n("kZht"),c=n("bv5E"),u=n("An66"),l=function(){var t=function(){function t(e){C(this,t),this.store=e,this.availableTransferPreferences$=this.store.pipe(Object(i.m)(r.b)),this.defaultTransferPreference$=this.store.pipe(Object(i.m)(a.u))}return w(t,[{key:"changeTransferPreference",value:function(t){this.store.dispatch(Object(o.d)({transferPreference:t}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Ob(i.b))},t.\u0275cmp=s.Ib({type:t,selectors:[["transfer-preference"]],decls:3,vars:6,consts:[[3,"availablePreferences","defaultTransferPreference","changeTransferPreference"]],template:function(t,e){1&t&&(s.Ub(0,"inbound-transfer-dropdown",0),s.bc("changeTransferPreference",(function(t){return e.changeTransferPreference(t)})),s.gc(1,"async"),s.gc(2,"async"),s.Tb()),2&t&&s.mc("availablePreferences",s.hc(1,2,e.availableTransferPreferences$))("defaultTransferPreference",s.hc(2,4,e.defaultTransferPreference$))},directives:[c.a],pipes:[u.b],styles:[""],changeDetection:0}),t}()},"6NrZ":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"d",(function(){return c}));var i=n("YzTY"),r={draggable:{enabled:!0,dragHandleClass:"draggable",ignoreContent:!0,start:function(){return s()},stop:function(){return c()}},resizable:{enabled:!0,start:function(){return s()},stop:function(){return c()}},gridType:n("lw+r").a.VerticalFixed,outerMargin:!1,displayGrid:"none",fixedColWidth:100,fixedRowHeight:50,disableScrollHorizontal:!0,pushItems:!0,pushDirections:{south:!0,east:!1,west:!1,north:!1},pushResizeItems:!1,swap:!1,compactType:"compactUp"},o=[{id:i.a.ORDER_FORM,cols:4,rows:10,y:0,x:0,component:"order-form",componentName:"Order Form",minItemCols:4,minItemRows:6},{id:i.a.MARKET_CHART,cols:10,rows:10,y:0,x:0,component:"market-chart",componentName:"Market Chart",minItemCols:6,minItemRows:6},{id:i.a.ACCOUNT_ACTIVITY,cols:15,rows:8,y:0,x:0,component:"account-activity",componentName:"Activity",minItemCols:10,minItemRows:4},{id:i.a.ORDERBOOK,cols:5,rows:8,y:0,x:0,component:"orderbook",componentName:"Orderbook",minItemCols:4,minItemRows:4},{id:i.a.TRADE_HISTORY,cols:5,rows:8,y:0,x:0,component:"trade-history",componentName:"Trade History",minItemCols:4,minItemRows:4},{id:i.a.PAIR_WALLET,cols:4,rows:6,y:0,x:0,component:"pair-wallet",componentName:"Pair Wallet",minItemCols:2,minItemRows:2},{id:i.a.DEPTH_CHART,cols:4,rows:6,y:0,x:0,component:"depth-chart",componentName:"Depth Chart",minItemCols:4,minItemRows:4},{id:i.a.MARKET_PREVIEWS,cols:15,rows:6,y:0,x:0,component:"market-previews",componentName:"Market Previews",minItemCols:6,minItemRows:6},{id:i.a.MARKET_DETAILS,cols:4,rows:6,y:0,x:0,component:"market-details",componentName:"Market Details",minItemCols:2,minItemRows:2}],a=[{id:i.a.ORDER_FORM,cols:4,rows:10,y:0,x:0,component:"order-form",componentName:"Order Form",minItemCols:4,minItemRows:6},{id:i.a.MARKET_CHART,cols:11,rows:10,y:0,x:4,component:"market-chart",componentName:"Market Chart",minItemCols:6,minItemRows:6},{id:i.a.ACCOUNT_ACTIVITY,cols:15,rows:6,y:10,x:0,component:"account-activity",componentName:"Trades",minItemCols:10,minItemRows:4},{id:i.a.ORDERBOOK,cols:5,rows:8,y:0,x:15,component:"orderbook",componentName:"Orderbook",minItemCols:4,minItemRows:4},{id:i.a.TRADE_HISTORY,cols:5,rows:8,y:8,x:15,component:"trade-history",componentName:"Trade History",minItemCols:4,minItemRows:4}];function s(){var t=document.getElementById("market-chart");t&&(t.style.pointerEvents="none")}function c(){var t=document.getElementById("market-chart");t&&(t.style.pointerEvents="initial")}},"6Oco":function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var i=n("IdLP"),r=new i.a((function(t){return t.complete()}));function o(t){return t?function(t){return new i.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):r}},"6neU":function(t,e,n){"use strict";n.d(e,"a",(function(){return St}));var i=n("D57K"),r=n("zqNl"),o=n("3kIJ"),a=n("w0kG"),s=n("xVbo"),c=n("jOdJ"),u=n("3mST"),l=n("gxtV"),d=n("8lHc"),h=n("VmIW"),f=n("KQpv"),p=n.n(f),b=n("lx5p"),g=n("Ee7O"),v=n("i67J"),y=n("CW1w"),_=n("NloN"),O=n("l5Az"),k=n("1u95"),T=n("KyJX"),S=n("h3eB"),E=n("R1aX"),x=n("+Px6"),P=n("qAYy"),A=n("rxqU"),I=n("ylpo"),M=n("kZht"),D=n("An66"),R=n("NxuZ"),j=n("1etq"),L=n("Eu46"),N=n("TMzY"),U=n("anSm"),F=n("yvKM"),B=n("LBlH"),z=n("y1fC"),V=n("pPqe"),H=n("EmXI"),q=n("Tcl6"),$=n("o09O"),Q=n("1eaT"),W=n("aDqW"),G=n("+I9z"),Y=n("UDV5"),K=n("1o0v"),Z=n("8spT"),X=n("scAs"),J=n("WYJo"),tt=n("LbKT"),et=n("hCLc"),nt=n("3W1Y"),it=n("DpwM"),rt=n("rUBT"),ot=n("fvDn");function at(t,e){1&t&&(M.Ub(0,"section",2),M.Pb(1,"fa-icon",3),M.Ub(2,"h2",4),M.Qc(3),M.gc(4,"translate"),M.Tb(),M.Tb()),2&t&&(M.Cb(3),M.Sc("",M.hc(4,1,"DASHBOARD.AUTHMASK"),"."))}function st(t,e){1&t&&(M.Ub(0,"mat-checkbox",50),M.Qc(1),M.gc(2,"translate"),M.Tb()),2&t&&(M.Cb(1),M.Sc(" ",M.hc(2,1,"BUTTON.MAKER_ONLY")," "))}function ct(t,e){if(1&t){var n=M.Vb();M.Ub(0,"div",44),M.Ub(1,"mat-radio-group",45),M.bc("change",(function(){M.Ec(n);var t=M.fc().ngIf;return M.fc(2).adjustTriggerInputs(t.selectedMarket,t.selectedTicker)})),M.Ub(2,"mat-radio-button",46),M.Qc(3),M.gc(4,"translate"),M.Tb(),M.Ub(5,"mat-radio-button",47),M.Qc(6),M.gc(7,"translate"),M.Tb(),M.Tb(),M.Ub(8,"div",48),M.Oc(9,st,3,3,"mat-checkbox",49),M.Tb(),M.Tb()}if(2&t){var i=M.fc(3);M.Cb(3),M.Sc(" ",M.hc(4,3,"BUTTON.LIMIT_ORDER")," "),M.Cb(3),M.Sc(" ",M.hc(7,5,"BUTTON.MARKET_ORDER")," "),M.Cb(3),M.mc("ngIf","limit"===i.mainForm.controls.type.value)}}function ut(t,e){if(1&t){var n=M.Vb();M.Ub(0,"mat-form-field",19),M.Ub(1,"mat-label"),M.Qc(2),M.gc(3,"translate"),M.Tb(),M.Ub(4,"input",51),M.bc("input",(function(){M.Ec(n);var t=M.fc().ngIf;return M.fc(2).adjustTriggerInputs(t.selectedMarket,t.selectedTicker)})),M.Tb(),M.Ub(5,"span",35),M.Qc(6),M.gc(7,"quote"),M.Tb(),M.Tb()}if(2&t){var i=M.fc().ngIf,r=M.fc(2);M.Lc("flex",1),M.Cb(2),M.Rc(M.hc(3,5,"FORM.LIMIT_PRICE")),M.Cb(2),M.mc("step",r.tickSize(i.selectedMarket)),M.Cb(2),M.Rc(M.hc(7,7,null==i.selectedMarket?null:i.selectedMarket.symbol))}}function lt(t,e){1&t&&(M.Ub(0,"span",25),M.Qc(1," LABEL.BUY_MARGIN_REQ "),M.Tb())}function dt(t,e){1&t&&(M.Ub(0,"span",25),M.Qc(1," LABEL.SELL_MARGIN_REQ "),M.Tb())}function ht(t,e){if(1&t&&(M.Ub(0,"div",44),M.Ub(1,"mat-radio-group",52),M.Ub(2,"mat-radio-button",53),M.Qc(3),M.gc(4,"translate"),M.Tb(),M.Ub(5,"mat-radio-button",54),M.Qc(6),M.gc(7,"translate"),M.Tb(),M.Tb(),M.Ub(8,"mat-label",55),M.Qc(9),M.gc(10,"uppercase"),M.gc(11,"translate"),M.Tb(),M.Ub(12,"mat-radio-group",56),M.Ub(13,"mat-radio-button",57),M.Ub(14,"p",58),M.gc(15,"translate"),M.Qc(16),M.gc(17,"translate"),M.Tb(),M.Tb(),M.Ub(18,"mat-radio-button",59),M.Ub(19,"p",58),M.gc(20,"translate"),M.Qc(21),M.gc(22,"translate"),M.Tb(),M.Tb(),M.Ub(23,"mat-radio-button",60),M.Ub(24,"p",58),M.gc(25,"translate"),M.Qc(26),M.gc(27,"translate"),M.Tb(),M.Tb(),M.Tb(),M.Tb()),2&t){var n=M.fc(3);M.Cb(3),M.Sc(" ",M.hc(4,9,"BUTTON.ORDER_TAKE_PROFIT_LIMIT")," "),M.Cb(3),M.Sc(" ",M.hc(7,11,"BUTTON.ORDER_TAKE_PROFIT_MARKET")," "),M.Cb(3),M.Sc("",M.hc(10,13,M.hc(11,15,"FORM.TRIGGER_SIGNAL")),":"),M.Cb(5),M.mc("matTooltip",M.hc(15,17,n.exitTriggerTooltipText.last)),M.Cb(2),M.Sc(" ",M.hc(17,19,"BUTTON.LAST")," "),M.Cb(3),M.mc("matTooltip",M.hc(20,21,n.exitTriggerTooltipText.mark)),M.Cb(2),M.Sc(" ",M.hc(22,23,"BUTTON.MARK")," "),M.Cb(3),M.mc("matTooltip",M.hc(25,25,n.exitTriggerTooltipText.spot)),M.Cb(2),M.Sc(" ",M.hc(27,27,"BUTTON.INDEX")," ")}}function ft(t,e){1&t&&(M.Ub(0,"p",61),M.Qc(1),M.gc(2,"translate"),M.Tb()),2&t&&(M.Cb(1),M.Sc(" ",M.hc(2,1,"LABEL.EXIT_ENTRY_INVALID")," "))}function pt(t,e){if(1&t&&(M.Ub(0,"mat-form-field",19),M.Ub(1,"mat-label"),M.Qc(2),M.gc(3,"translate"),M.Tb(),M.Pb(4,"input",62),M.Ub(5,"span",35),M.Qc(6),M.gc(7,"cryptoAbbreviation"),M.gc(8,"quote"),M.Tb(),M.Tb()),2&t){var n=M.fc().ngIf,i=M.fc(2);M.Cb(2),M.Rc(M.hc(3,3,"FORM.LIMIT_PRICE")),M.Cb(2),M.mc("step",i.tickSize(n.selectedMarket)),M.Cb(2),M.Rc(M.hc(7,5,M.hc(8,7,null==n.selectedMarket?null:n.selectedMarket.symbol)))}}function bt(t,e){if(1&t&&(M.Ub(0,"nutritional-info"),M.Ub(1,"span"),M.Qc(2),M.gc(3,"translate"),M.Tb(),M.Ub(4,"span",63),M.Pb(5,"ghost-trail",26),M.gc(6,"cryptoPrecise"),M.gc(7,"base"),M.gc(8,"cryptoAbbreviation"),M.gc(9,"base"),M.Qc(10),M.Pb(11,"ghost-trail",26),M.gc(12,"cryptoPrecise"),M.gc(13,"quote"),M.gc(14,"cryptoAbbreviation"),M.gc(15,"quote"),M.Tb(),M.Tb()),2&t){var n=M.fc().ngIf,i=M.fc(2);M.Cb(2),M.Sc(" ",M.hc(3,7,"LABEL.EXIT_PNL")," "),M.Cb(2),M.mc("pnl",i.profitAsBase(n.selectedMarket,n.selectedTicker)),M.Cb(1),M.pc("content","",M.ic(6,9,i.profitAsBase(n.selectedMarket,n.selectedTicker),M.hc(7,12,null==n.selectedMarket?null:n.selectedMarket.symbol))," ",M.hc(8,14,M.hc(9,16,n.selectedMarket.symbol)),""),M.Cb(5),M.Sc(" "," / "," "),M.Cb(1),M.pc("content","",M.ic(12,18,i.profitAsQuote(n.selectedMarket,n.selectedTicker),M.hc(13,21,null==n.selectedMarket?null:n.selectedMarket.symbol))," ",M.hc(14,23,M.hc(15,25,n.selectedMarket.symbol)),"")}}function gt(t,e){if(1&t&&(M.Ub(0,"div",44),M.Ub(1,"mat-radio-group",52),M.Ub(2,"mat-radio-button",64),M.Qc(3),M.gc(4,"translate"),M.Tb(),M.Ub(5,"mat-radio-button",65),M.Qc(6),M.gc(7,"translate"),M.Tb(),M.Tb(),M.Ub(8,"mat-label",55),M.Qc(9),M.gc(10,"uppercase"),M.gc(11,"translate"),M.Tb(),M.Ub(12,"mat-radio-group",56),M.Ub(13,"mat-radio-button",57),M.Ub(14,"p",58),M.gc(15,"translate"),M.Qc(16),M.gc(17,"translate"),M.Tb(),M.Tb(),M.Ub(18,"mat-radio-button",59),M.Ub(19,"p",58),M.gc(20,"translate"),M.Qc(21),M.gc(22,"translate"),M.Tb(),M.Tb(),M.Ub(23,"mat-radio-button",60),M.Ub(24,"p",58),M.gc(25,"translate"),M.Qc(26),M.gc(27,"translate"),M.Tb(),M.Tb(),M.Tb(),M.Tb()),2&t){var n=M.fc(3);M.Cb(3),M.Sc(" ",M.hc(4,9,"BUTTON.ORDER_STOP_LOSS_LIMIT")," "),M.Cb(3),M.Sc(" ",M.hc(7,11,"BUTTON.ORDER_STOP_LOSS_MARKET")," "),M.Cb(3),M.Sc("",M.hc(10,13,M.hc(11,15,"FORM.TRIGGER_SIGNAL")),":"),M.Cb(5),M.mc("matTooltip",M.hc(15,17,n.stopTriggerTooltipText.last)),M.Cb(2),M.Sc(" ",M.hc(17,19,"BUTTON.LAST")," "),M.Cb(3),M.mc("matTooltip",M.hc(20,21,n.stopTriggerTooltipText.mark)),M.Cb(2),M.Sc(" ",M.hc(22,23,"BUTTON.MARK")," "),M.Cb(3),M.mc("matTooltip",M.hc(25,25,n.stopTriggerTooltipText.spot)),M.Cb(2),M.Sc(" ",M.hc(27,27,"BUTTON.INDEX")," ")}}function mt(t,e){1&t&&(M.Ub(0,"p",61),M.Qc(1),M.gc(2,"translate"),M.Tb()),2&t&&(M.Cb(1),M.Sc(" ",M.hc(2,1,"LABEL.STOP_ENTRY_INVALID")," "))}function vt(t,e){if(1&t&&(M.Ub(0,"mat-form-field",19),M.Ub(1,"mat-label"),M.Qc(2),M.gc(3,"translate"),M.Tb(),M.Pb(4,"input",62),M.Ub(5,"span",35),M.Qc(6),M.gc(7,"cryptoAbbreviation"),M.gc(8,"quote"),M.Tb(),M.Tb()),2&t){var n=M.fc().ngIf,i=M.fc(2);M.Cb(2),M.Rc(M.hc(3,3,"FORM.LIMIT_PRICE")),M.Cb(2),M.mc("step",i.tickSize(n.selectedMarket)),M.Cb(2),M.Rc(M.hc(7,5,M.hc(8,7,null==n.selectedMarket?null:n.selectedMarket.symbol)))}}function yt(t,e){if(1&t&&(M.Ub(0,"nutritional-info"),M.Ub(1,"span"),M.Qc(2),M.gc(3,"translate"),M.Tb(),M.Ub(4,"span",63),M.Pb(5,"ghost-trail",26),M.gc(6,"cryptoPrecise"),M.gc(7,"base"),M.gc(8,"cryptoAbbreviation"),M.gc(9,"base"),M.Qc(10),M.Pb(11,"ghost-trail",26),M.gc(12,"cryptoPrecise"),M.gc(13,"quote"),M.gc(14,"cryptoAbbreviation"),M.gc(15,"quote"),M.Tb(),M.Tb()),2&t){var n=M.fc().ngIf,i=M.fc(2);M.Cb(2),M.Sc(" ",M.hc(3,7,"LABEL.STOP_PNL")," "),M.Cb(2),M.mc("pnl",i.lossBase(n.selectedMarket,n.selectedTicker)),M.Cb(1),M.pc("content","",M.ic(6,9,i.lossBase(n.selectedMarket,n.selectedTicker),M.hc(7,12,null==n.selectedMarket?null:n.selectedMarket.symbol))," ",M.hc(8,14,M.hc(9,16,n.selectedMarket.symbol)),""),M.Cb(5),M.Sc(" "," / "," "),M.Cb(1),M.pc("content","",M.ic(12,18,i.lossQuote(n.selectedMarket,n.selectedTicker),M.hc(13,21,null==n.selectedMarket?null:n.selectedMarket.symbol))," ",M.hc(14,23,M.hc(15,25,n.selectedMarket.symbol)),"")}}var _t=function(){return{horizontal:675,vertical:600}};function Ot(t,e){if(1&t){var n=M.Vb();M.Ub(0,"section",7),M.Ub(1,"section",8),M.Ub(2,"mat-button-toggle-group",9,10),M.Ub(4,"mat-button-toggle",11),M.bc("click",(function(){M.Ec(n);var t=e.ngIf;return M.fc(2).changeSide("buy",t.selectedMarket,t.selectedTicker)})),M.Qc(5),M.gc(6,"translate"),M.Tb(),M.Ub(7,"mat-button-toggle",12),M.bc("click",(function(){M.Ec(n);var t=e.ngIf;return M.fc(2).changeSide("sell",t.selectedMarket,t.selectedTicker)})),M.Qc(8),M.gc(9,"translate"),M.Tb(),M.Tb(),M.Tb(),M.Ub(10,"section",13),M.Ub(11,"form",14),M.Ub(12,"sb-popper",15,16),M.Oc(14,ct,10,7,"div",17),M.Tb(),M.Ub(15,"section",18),M.Ub(16,"mat-form-field",19),M.Ub(17,"mat-label"),M.Qc(18),M.gc(19,"translate"),M.Tb(),M.Ub(20,"input",20,21),M.bc("focus",(function(){return M.Ec(n),M.fc(2).onSizeFocus()})),M.Tb(),M.Tb(),M.Oc(22,ut,8,9,"mat-form-field",22),M.Ub(23,"div",23),M.Ub(24,"fa-icon",24),M.bc("click",(function(){return M.Ec(n),M.Ac(13).dispose()})),M.Tb(),M.Tb(),M.Tb(),M.Ub(25,"nutritional-info"),M.Ub(26,"span",25),M.Qc(27," LABEL.ORDER_VALUE "),M.Tb(),M.Ub(28,"span"),M.Pb(29,"ghost-trail",26),M.gc(30,"cryptoPrecise"),M.gc(31,"base"),M.gc(32,"cryptoAbbreviation"),M.gc(33,"base"),M.Qc(34),M.Pb(35,"ghost-trail",26),M.gc(36,"cryptoPrecise"),M.gc(37,"quote"),M.gc(38,"cryptoAbbreviation"),M.gc(39,"quote"),M.Tb(),M.Tb(),M.Ub(40,"nutritional-info"),M.Oc(41,lt,2,0,"span",27),M.Oc(42,dt,2,0,"span",27),M.Ub(43,"span"),M.Pb(44,"ghost-trail",26),M.gc(45,"cryptoPrecise"),M.gc(46,"base"),M.gc(47,"cryptoAbbreviation"),M.gc(48,"base"),M.Qc(49),M.Pb(50,"ghost-trail",26),M.gc(51,"cryptoPrecise"),M.gc(52,"quote"),M.gc(53,"cryptoAbbreviation"),M.gc(54,"quote"),M.Tb(),M.Tb(),M.Tb(),M.Ub(55,"form",28),M.Ub(56,"sb-popper",15,29),M.Oc(58,ht,28,29,"div",17),M.Tb(),M.Ub(59,"div",30),M.Ub(60,"span"),M.Ub(61,"mat-checkbox",31),M.Qc(62),M.gc(63,"translate"),M.Tb(),M.Tb(),M.Ub(64,"span",32),M.Ub(65,"span",33),M.Qc(66),M.gc(67,"translate"),M.Tb(),M.Qc(68),M.gc(69,"uppercase"),M.Tb(),M.Tb(),M.Ub(70,"div",32),M.Ub(71,"section",18),M.Ub(72,"mat-form-field",19),M.Ub(73,"mat-label"),M.Qc(74),M.gc(75,"translate"),M.Tb(),M.Ub(76,"input",34),M.bc("input",(function(t){M.Ec(n);var i=e.ngIf;return M.fc(2).changePercentage(t.target.value,"gain",i.selectedTicker)})),M.Tb(),M.Ub(77,"span",35),M.Qc(78),M.gc(79,"cryptoAbbreviation"),M.gc(80,"quote"),M.Tb(),M.Tb(),M.Ub(81,"mat-form-field",19),M.Ub(82,"mat-label"),M.Qc(83),M.gc(84,"translate"),M.Tb(),M.Ub(85,"input",36),M.bc("input",(function(t){M.Ec(n);var i=e.ngIf;return M.fc(2).changePrice(t.target.value,"exitPrice",i.selectedMarket,i.selectedTicker)})),M.Tb(),M.Ub(86,"span",35),M.Qc(87,"%"),M.Tb(),M.Tb(),M.Ub(88,"div",23),M.Pb(89,"fa-icon",37),M.Tb(),M.Tb(),M.Oc(90,ft,3,3,"p",38),M.Oc(91,pt,9,9,"mat-form-field",39),M.Oc(92,bt,16,27,"nutritional-info",40),M.Tb(),M.Tb(),M.Ub(93,"form",28),M.Ub(94,"sb-popper",15,41),M.Oc(96,gt,28,29,"div",17),M.Tb(),M.Ub(97,"div",30),M.Ub(98,"span"),M.Ub(99,"mat-checkbox",31),M.Qc(100),M.gc(101,"translate"),M.Tb(),M.Tb(),M.Ub(102,"span",32),M.Ub(103,"span",33),M.Qc(104),M.gc(105,"translate"),M.Tb(),M.Qc(106),M.gc(107,"uppercase"),M.Tb(),M.Tb(),M.Ub(108,"div",32),M.Ub(109,"section",18),M.Ub(110,"mat-form-field",19),M.Ub(111,"mat-label"),M.Qc(112),M.gc(113,"translate"),M.Tb(),M.Ub(114,"input",42),M.bc("input",(function(t){M.Ec(n);var i=e.ngIf;return M.fc(2).changePercentage(t.target.value,"loss",i.selectedTicker)})),M.Tb(),M.Ub(115,"span",35),M.Qc(116),M.gc(117,"cryptoAbbreviation"),M.gc(118,"quote"),M.Tb(),M.Tb(),M.Ub(119,"mat-form-field",19),M.Ub(120,"mat-label"),M.Qc(121),M.gc(122,"translate"),M.Tb(),M.Ub(123,"input",43),M.bc("input",(function(t){M.Ec(n);var i=e.ngIf;return M.fc(2).changePrice(t.target.value,"stopPrice",i.selectedMarket,i.selectedTicker)})),M.Tb(),M.Ub(124,"span",35),M.Qc(125,"%"),M.Tb(),M.Tb(),M.Ub(126,"div",23),M.Pb(127,"fa-icon",37),M.Tb(),M.Tb(),M.Oc(128,mt,3,3,"p",38),M.Oc(129,vt,9,9,"mat-form-field",39),M.Oc(130,yt,16,27,"nutritional-info",40),M.Tb(),M.Tb(),M.Tb(),M.Tb()}if(2&t){var i=e.ngIf,r=M.Ac(13),o=M.Ac(57),a=M.Ac(95),s=M.fc(2);M.mc("breakpoints",M.qc(131,_t)),M.Cb(2),M.mc("value",s.side),M.Cb(3),M.Sc(" ",M.hc(6,61,"BUTTON.LONG")," "),M.Cb(3),M.Sc(" ",M.hc(9,63,"BUTTON.SHORT")," "),M.Cb(3),M.mc("formGroup",s.mainForm),M.Cb(1),M.mc("sbPopperBackdropClass","transparent"),M.Cb(4),M.Lc("flex",1),M.Cb(2),M.Rc(M.hc(19,65,"FORM.QUANTITY")),M.Cb(4),M.mc("ngIf","limit"===s.mainForm.controls.type.value),M.Cb(2),M.mc("sbTriggerFor",r),M.Cb(5),M.pc("content","",M.ic(30,67,s.orderValueBase(i.selectedMarket,i.selectedTicker),M.hc(31,70,null==i.selectedMarket?null:i.selectedMarket.symbol))," ",M.hc(32,72,M.hc(33,74,null==i.selectedMarket?null:i.selectedMarket.symbol)),""),M.Cb(5),M.Sc(" "," / "," "),M.Cb(1),M.pc("content","",M.ic(36,76,s.orderValueQuote(i.selectedMarket),M.hc(37,79,null==i.selectedMarket?null:i.selectedMarket.symbol))," ",M.hc(38,81,M.hc(39,83,null==i.selectedMarket?null:i.selectedMarket.symbol)),""),M.Cb(6),M.mc("ngIf","buy"===s.side),M.Cb(1),M.mc("ngIf","sell"===s.side),M.Cb(2),M.pc("content","",M.ic(45,85,i.initialMargin[s.side],M.hc(46,88,null==i.selectedMarket?null:i.selectedMarket.symbol))," ",M.hc(47,90,M.hc(48,92,null==i.selectedMarket?null:i.selectedMarket.symbol)),""),M.Cb(5),M.Sc(" "," / "," "),M.Cb(1),M.pc("content","",M.ic(51,94,s.marginAsQuote(i.initialMargin[s.side],i.selectedMarket,i.selectedTicker),M.hc(52,97,null==i.selectedMarket?null:i.selectedMarket.symbol)),"\n ",M.hc(53,99,M.hc(54,101,null==i.selectedMarket?null:i.selectedMarket.symbol)),""),M.Cb(5),M.mc("formGroup",s.takeProfitForm),M.Cb(1),M.mc("sbPopperBackdropClass","transparent"),M.Cb(6),M.Sc(" ",M.hc(63,103,"LABEL.TAKE_PROFIT")," "),M.Cb(2),M.mc("hidden",!s.isTakeProfitEnabled),M.Cb(2),M.Sc("",M.hc(67,105,"LABEL.TRIGGER_SIGNAL"),":"),M.Cb(2),M.Sc(" ",M.hc(69,107,s.exitTriggerSignal)," "),M.Cb(2),M.mc("hidden",!s.isTakeProfitEnabled),M.Cb(2),M.Lc("flex",1),M.Cb(2),M.Rc(M.hc(75,109,"FORM.EXIT_PRICE")),M.Cb(2),M.mc("step",s.tickSize(i.selectedMarket)),M.Cb(2),M.Rc(M.hc(79,111,M.hc(80,113,null==i.selectedMarket?null:i.selectedMarket.symbol))),M.Cb(3),M.Lc("flex",.4),M.Cb(2),M.Rc(M.hc(84,115,"LABEL.GAIN")),M.Cb(6),M.mc("sbTriggerFor",o),M.Cb(1),M.mc("ngIf",s.takeProfitForm.get("exitPrice").invalid),M.Cb(1),M.mc("ngIf","take_profit|limit"===s.takeProfitForm.controls.type.value),M.Cb(1),M.mc("ngIf",s.validExit),M.Cb(1),M.mc("formGroup",s.stopLossForm),M.Cb(1),M.mc("sbPopperBackdropClass","transparent"),M.Cb(6),M.Sc(" ",M.hc(101,117,"LABEL.STOP_LOSS")," "),M.Cb(2),M.mc("hidden",!s.isStopEnabled),M.Cb(2),M.Sc("",M.hc(105,119,"LABEL.TRIGGER_SIGNAL"),":"),M.Cb(2),M.Sc(" ",M.hc(107,121,s.stopTriggerSignal)," "),M.Cb(2),M.mc("hidden",!s.isStopEnabled),M.Cb(2),M.Lc("flex",1),M.Cb(2),M.Rc(M.hc(113,123,"FORM.STOP_PRICE")),M.Cb(2),M.mc("step",s.tickSize(i.selectedMarket)),M.Cb(2),M.Rc(M.hc(117,125,M.hc(118,127,null==i.selectedMarket?null:i.selectedMarket.symbol))),M.Cb(3),M.Lc("flex",.4),M.Cb(2),M.Rc(M.hc(122,129,"LABEL.LOSS")),M.Cb(6),M.mc("sbTriggerFor",a),M.Cb(1),M.mc("ngIf",s.stopLossForm.get("stopPrice").invalid),M.Cb(1),M.mc("ngIf","stop|limit"===s.stopLossForm.controls.type.value),M.Cb(1),M.mc("ngIf",s.validStop)}}function kt(t,e){if(1&t){var n=M.Vb();M.Ub(0,"div",66),M.Ub(1,"button",67),M.bc("click",(function(){M.Ec(n);var t=e.ngLet;return M.fc(2).submit(t)})),M.Qc(2),M.gc(3,"translate"),M.Tb(),M.Ub(4,"small",68),M.bc("click",(function(){return M.Ec(n),M.fc(2).showMobileDefault()})),M.Pb(5,"fa-icon",69),M.Qc(6),M.gc(7,"translate"),M.Tb(),M.Tb()}if(2&t){var i=M.fc(2);M.Cb(1),M.mc("disabled",i.formInvalid),M.Cb(1),M.Sc(" ",M.hc(3,3,"BUTTON.SUBMIT_ORDERS")," "),M.Cb(4),M.Sc(" ",M.hc(7,5,"LABEL.USE_DEFAULT_ORDER_FORM")," ")}}var wt=function(t,e,n,i){return{selectedMarket:t,selectedTicker:e,initialMargin:n,userVerification:i}};function Ct(t,e){if(1&t&&(M.Sb(0),M.Oc(1,Ot,131,132,"section",5),M.gc(2,"async"),M.gc(3,"async"),M.gc(4,"async"),M.gc(5,"async"),M.Oc(6,kt,8,7,"div",6),M.gc(7,"async"),M.Rb()),2&t){var n=M.fc();M.Cb(1),M.mc("ngIf",M.uc(12,wt,M.hc(2,2,n.selectedMarket$),M.hc(3,4,n.selectedTicker$),M.hc(4,6,n.initialMargin$),M.hc(5,8,n.userVerification$))),M.Cb(5),M.mc("ngLet",M.hc(7,10,n.selectedMarket$))}}var Tt=p()("trace:app:order-form"),St=function(){var t=function(){function t(e,n,i){C(this,t),this.store=e,this.formBuilder=n,this.trade=i,this.side="buy",this.options=this.refreshSavedOptions(),this.userData$=this.store.pipe(Object(r.m)(A.a)),this.userSignedIn$=this.store.pipe(Object(r.m)(A.m)),this.initialMargin$=this.store.pipe(Object(r.m)(T.b)),this.userVerification$=this.store.pipe(Object(r.m)(E.f)),this.selectedMarket$=this.store.pipe(Object(r.m)(x.n)),this.selectedTicker$=this.store.pipe(Object(r.m)(P.p))}return w(t,[{key:"ngOnInit",value:function(){var t=this;this.mainForm=this.buildMainForm(),this.takeProfitForm=this.buildTakeProfitForm(),this.stopLossForm=this.buildStopLossForm(),this.mainForm.valueChanges.subscribe((function(e){var n=Object.assign({},t.options);h.Maybe.fromNull(e.makerOnly).forEach((function(t){return n.makerOnly=t})),Tt("saving form options (bracket)",n),Object(_.c)(I.b,n),t.refreshSavedOptions()})),this.takeProfitForm.valueChanges.subscribe((function(e){var n=Object.assign({},t.options);h.Maybe.fromNull(e.triggerSignal).forEach((function(t){return n.triggerSignalExit=t})),Tt("saving form options (bracket)",n),Object(_.c)(I.b,n),t.refreshSavedOptions()})),this.stopLossForm.valueChanges.subscribe((function(e){var n=Object.assign({},t.options);h.Maybe.fromNull(e.triggerSignal).forEach((function(t){return n.triggerSignalStop=t})),Tt("saving form options (bracket)",n),Object(_.c)(I.b,n),t.refreshSavedOptions()})),this.getInitialMargin(),this.trade.orderFormPriceUpdated$.pipe(Object(a.a)(this.selectedMarket$,this.selectedTicker$),Object(s.a)((function(t){var e=m(t,3),n=e[0],i=e[1];e[2];return!!n&&!!i})),Object(l.b)(this),Object(c.a)()).subscribe((function(e){var n,i,r,o,a,s,c,u=m(e,3),l=u[0],d=u[1],h=u[2],f=Object(b.I)(d.tickSize)(l);null===(n=t.mainForm.get("limitPrice"))||void 0===n||n.setValue(f),null===(i=t.stopLossForm.get("limitPrice"))||void 0===i||i.setValue(f),null===(r=t.stopLossForm.get("stopPrice"))||void 0===r||r.setValue(f),null===(o=t.takeProfitForm.get("limitPrice"))||void 0===o||o.setValue(f),null===(a=t.takeProfitForm.get("exitPrice"))||void 0===a||a.setValue(f),t.changePercentage(null===(s=t.stopLossForm.get("stopPrice"))||void 0===s?void 0:s.value,"loss",h),t.changePercentage(null===(c=t.takeProfitForm.get("exitPrice"))||void 0===c?void 0:c.value,"gain",h)})),this.trade.orderFormPriceUpdated$.pipe(Object(a.a)(this.selectedMarket$,this.selectedTicker$),Object(s.a)((function(t){var e=m(t,3),n=e[0],i=e[1];e[2];return!!n&&!!i})),Object(l.b)(this),Object(u.a)(1)).subscribe((function(e){var n,i,r,o=m(e,3),a=o[0],s=o[1],c=o[2],u=Object(b.I)(s.tickSize)(a);null===(n=t.mainForm.get("limitPrice"))||void 0===n||n.setValue(u),t.changePrice(null===(i=t.stopLossForm.get("loss"))||void 0===i?void 0:i.value,"stopPrice",s,c),t.changePrice(null===(r=t.takeProfitForm.get("gain"))||void 0===r?void 0:r.value,"exitPrice",s,c)})),this.selectedTicker$.subscribe((function(e){t.currentBidAsk={bid:null==e?void 0:e.bid,ask:null==e?void 0:e.ask}})),this.trade.orderFormQuantityUpdated$.pipe(Object(v.g)(),Object(l.b)(this)).subscribe((function(e){var n;null===(n=t.mainForm.get("size"))||void 0===n||n.setValue(e)})),this.mainForm.controls.type.valueChanges.pipe(Object(l.b)(this)).subscribe((function(e){if("limit"===e){var n=new o.e(0,[o.x.required,o.x.min(1e-9)]);t.mainForm.addControl("limitPrice",n)}else t.mainForm.removeControl("limitPrice")}))}},{key:"getInitialMargin",value:function(){var t=this;Object(d.a)(500,1500).pipe(Object(a.a)(this.userSignedIn$),Object(a.a)(this.selectedMarket$),Object(s.a)((function(t){var e=m(t,2),n=m(e[0],2),i=(n[0],n[1]);e[1];return i})),Object(s.a)((function(e){var n=m(e,2),i=m(n[0],2);i[0],i[1],n[1];return t.mainForm&&t.mainForm.get("size").value>0&&(!t.mainForm.get("limitPrice")||t.mainForm.get("limitPrice").value>0)})),Object(s.a)((function(t){var e=m(t,2),n=m(e[0],2),i=(n[0],n[1],e[1]);return!!i&&!i.symbol.startsWith("S")})),Object(l.b)(this)).subscribe((function(e){var n=m(e,2),i=m(n[0],2),r=(i[0],i[1],n[1]),o=Object.assign({symbol:r.symbol.toUpperCase(),orderType:t.mainForm.get("type").value},t.mainForm.value);t.store.dispatch(Object(k.a)({order:o}))}))}},{key:"stopPriceValidator",value:function(t){var e,n=this.currentBidAsk?"buy"===this.side?this.currentBidAsk.ask:this.currentBidAsk.bid:0,i=this.isLimitBracket?null===(e=this.mainForm.get("limitPrice"))||void 0===e?void 0:e.value:n;return"buy"===this.side?t.value<=i&&t.value<=n?null:{stopInvalidWithEntry:!0}:t.value>=i&&t.value>=n?null:{stopInvalidWithEntry:!0}}},{key:"exitPriceValidator",value:function(t){var e,n=this.currentBidAsk?"buy"===this.side?this.currentBidAsk.ask:this.currentBidAsk.bid:0,i=this.isLimitBracket?null===(e=this.mainForm.get("limitPrice"))||void 0===e?void 0:e.value:n;return"buy"===this.side?t.value>=i&&t.value>=n?null:{stopInvalidWithEntry:!0}:t.value<=i&&t.value<=n?null:{stopInvalidWithEntry:!0}}},{key:"buildMainForm",value:function(){return this.formBuilder.group({type:["limit",[o.x.required]],size:[0,[o.x.required,o.x.min(1e-9)]],limitPrice:[0,[o.x.required,o.x.min(1e-9)]],makerOnly:[this.options.makerOnly,[o.x.required]]})}},{key:"buildTakeProfitForm",value:function(){return this.formBuilder.group({enabled:[!0,[o.x.required]],type:["take_profit|market",[o.x.required]],limitPrice:[0,[o.x.required]],exitPrice:[0,[o.x.required,o.x.min(1e-9),this.exitPriceValidator.bind(this)]],gain:[0,[o.x.min(1e-9)]],triggerSignal:[this.options.triggerSignalExit,[o.x.required]]})}},{key:"buildStopLossForm",value:function(){return this.formBuilder.group({enabled:[!0,[o.x.required]],type:["stop|market",[o.x.required]],limitPrice:[0,[o.x.required]],stopPrice:[0,[o.x.required,o.x.min(1e-9),this.stopPriceValidator.bind(this)]],loss:[0,[o.x.min(1e-9)]],triggerSignal:[this.options.triggerSignalStop,[o.x.required]]})}},{key:"submit",value:function(t){var e={side:this.side,symbol:t.symbol.toUpperCase(),orderType:"limit"===this.mainForm.value.type&&this.mainForm.value.makerOnly?"post":this.mainForm.value.type,size:this.mainForm.value.size,limitPrice:"limit"===this.mainForm.value.type?this.mainForm.value.limitPrice:void 0,reduceOnly:!1,quantityType:"base",margin:!1},n=this.isTakeProfitEnabled?{side:"buy"===this.side?"sell":"buy",symbol:t.symbol.toUpperCase(),orderType:this.takeProfitForm.value.type.split("|")[0],size:this.mainForm.value.size,limitPrice:"take_profit|limit"===this.takeProfitForm.value.type?this.takeProfitForm.value.limitPrice:void 0,stopPrice:this.takeProfitForm.value.exitPrice,reduceOnly:!0,quantityType:"base",margin:!1,triggerSignal:this.takeProfitForm.value.triggerSignal}:void 0,i=this.isStopEnabled?{side:"buy"===this.side?"sell":"buy",symbol:t.symbol.toUpperCase(),orderType:this.stopLossForm.value.type.split("|")[0],size:this.mainForm.value.size,limitPrice:"stop|limit"===this.stopLossForm.value.type?this.stopLossForm.value.limitPrice:void 0,stopPrice:this.stopLossForm.value.stopPrice,reduceOnly:!0,quantityType:"base",margin:!1,triggerSignal:this.stopLossForm.value.triggerSignal}:void 0;this.store.dispatch(Object(S.n)({mainOrder:e,stopLoss:i,takeProfit:n}))}},{key:"orderValueBase",value:function(t,e){var n,i,r=null===(n=this.mainForm.get("type"))||void 0===n?void 0:n.value,o=null===(i=this.mainForm.get("size"))||void 0===i?void 0:i.value;if(t){var a=o*t.contractSize,s="limit"===r?this.mainForm.get("limitPrice").value:this.marketPrice(e);if("futures_inverse"===t.type)return a/s||0;if("futures_vanilla"===t.type)return a*s||0}return 0}},{key:"orderValueQuote",value:function(t){return this.mainForm.get("size").value*t.contractSize}},{key:"marketPrice",value:function(t){return"buy"===this.side?t.ask:t.bid}},{key:"profitAsBase",value:function(t,e){var n,i,r,o=null===(n=this.mainForm.get("size"))||void 0===n?void 0:n.value,a=this.isLimitBracket?null===(i=this.mainForm.get("limitPrice"))||void 0===i?void 0:i.value:this.marketPrice(e),s=null===(r=this.takeProfitForm.get("exitPrice"))||void 0===r?void 0:r.value,c="futures_inverse"===t.type,u="buy"===this.side?"long":"short";return Object(y.f)({entry:a,exit:s,isInverse:c,quantity:o,side:u})}},{key:"profitAsQuote",value:function(t,e){var n,i=null===(n=this.takeProfitForm.get("exitPrice"))||void 0===n?void 0:n.value,r="futures_inverse"===t.type,o=this.profitAsBase(t,e);return Object(y.a)(o,i,r)}},{key:"lossBase",value:function(t,e){var n,i,r,o=null===(n=this.mainForm.get("size"))||void 0===n?void 0:n.value,a=this.isLimitBracket?null===(i=this.mainForm.get("limitPrice"))||void 0===i?void 0:i.value:this.marketPrice(e),s=null===(r=this.stopLossForm.get("stopPrice"))||void 0===r?void 0:r.value,c="futures_inverse"===t.type,u="buy"===this.side?"long":"short";return Object(y.f)({entry:a,exit:s,isInverse:c,quantity:o,side:u})}},{key:"lossQuote",value:function(t,e){var n,i=null===(n=this.stopLossForm.get("stopPrice"))||void 0===n?void 0:n.value,r="futures_inverse"===t.type,o=this.lossBase(t,e);return Object(y.a)(o,i,r)}},{key:"adjustTriggerInputs",value:function(t,e){var n,i,r=null===(n=this.takeProfitForm.get("gain"))||void 0===n?void 0:n.value,o=null===(i=this.stopLossForm.get("loss"))||void 0===i?void 0:i.value;this.changePrice(r,"exitPrice",t,e),this.changePrice(o,"stopPrice",t,e)}},{key:"changeSide",value:function(t,e,n){var i,r;this.side=t,this.changePrice(null===(i=this.stopLossForm.get("loss"))||void 0===i?void 0:i.value,"stopPrice",e,n),this.changePrice(null===(r=this.takeProfitForm.get("gain"))||void 0===r?void 0:r.value,"exitPrice",e,n)}},{key:"changePrice",value:function(t,e,n,i){var r,o,a,s="limit"===(null===(r=this.mainForm.get("type"))||void 0===r?void 0:r.value)?this.mainForm.get("limitPrice").value:this.marketPrice(i);if("stopPrice"!==e)if("exitPrice"!==e);else{var c=t/100,u=s+c*s,l=s-c*s,d="buy"===this.side?u:l,h=Object(b.I)(n.tickSize)(d);null===(a=this.takeProfitForm.get(e))||void 0===a||a.setValue(h)}else{var f=t/100,p=s-f*s,g=s+f*s,m="buy"===this.side?p:g,v=Object(b.I)(n.tickSize)(m);null===(o=this.stopLossForm.get(e))||void 0===o||o.setValue(v)}}},{key:"changePercentage",value:function(t,e,n){var i,r,o,a=this.isLimitBracket?null===(i=this.mainForm.get("limitPrice"))||void 0===i?void 0:i.value:this.marketPrice(n);if("loss"===e){var s=("buy"===this.side?a-t:t-a)/a*100;null===(r=this.stopLossForm.get(e))||void 0===r||r.setValue(s.toFixed(2))}else{var c=("buy"===this.side?t-a:a-t)/a*100;null===(o=this.takeProfitForm.get(e))||void 0===o||o.setValue(c.toFixed(2))}}},{key:"refreshSavedOptions",value:function(){var t={makerOnly:!1,triggerSignalStop:"mark",triggerSignalExit:"mark"},e=Object(_.b)(I.b,void 0);if(e){Tt("loading saved options",e);var n=Object.assign(Object.assign({},t),e);return this.options=n,n}return Tt("loading default options"),this.options=t,t}},{key:"onSizeFocus",value:function(){var t=this.mainForm.get("size");0===t.value&&t.setValue("")}},{key:"marginAsQuote",value:function(t,e,n){var i,r=this.isLimitBracket?null===(i=this.mainForm.get("limitPrice"))||void 0===i?void 0:i.value:this.marketPrice(n);return Object(y.a)(t,r,"futures_inverse"===e.type)}},{key:"tickSize",value:function(t){return t?t.tickSize:1}},{key:"showMobileDefault",value:function(){Object(_.c)(I.n,"default")}},{key:"isLimitBracket",get:function(){return!!this.mainForm&&"limit"===this.mainForm.get("type").value}},{key:"isMarketBracket",get:function(){return!!this.mainForm&&"market"===this.mainForm.get("type").value}},{key:"exitTriggerSignal",get:function(){return this.takeProfitForm.get("triggerSignal").value}},{key:"stopTriggerSignal",get:function(){return this.stopLossForm.get("triggerSignal").value}},{key:"validStop",get:function(){var t;return(null===(t=this.stopLossForm.get("stopPrice"))||void 0===t?void 0:t.value)>0}},{key:"validExit",get:function(){var t;return(null===(t=this.takeProfitForm.get("exitPrice"))||void 0===t?void 0:t.value)>0}},{key:"formInvalid",get:function(){return this.isStopEnabled&&this.isTakeProfitEnabled?this.mainForm.invalid||this.stopLossForm.invalid||this.takeProfitForm.invalid:this.isStopEnabled?this.mainForm.invalid||this.stopLossForm.invalid:this.isTakeProfitEnabled?this.mainForm.invalid||this.takeProfitForm.invalid:this.mainForm.invalid}},{key:"stopTriggerTooltipText",get:function(){return{last:"TOOLTIP.STOP_LAST",mark:"TOOLTIP.STOP_MARK",spot:"TOOLTIP.STOP_INDEX"}}},{key:"exitTriggerTooltipText",get:function(){return{last:"TOOLTIP.TAKE_PROFIT_LAST",mark:"TOOLTIP.TAKE_PROFIT_MARK",spot:"TOOLTIP.TAKE_PROFIT_INDEX"}}},{key:"isStopEnabled",get:function(){return this.stopLossForm.get("enabled").value}},{key:"isTakeProfitEnabled",get:function(){return this.takeProfitForm.get("enabled").value}}]),t}();return t.\u0275fac=function(e){return new(e||t)(M.Ob(r.b),M.Ob(o.d),M.Ob(O.a))},t.\u0275cmp=M.Ib({type:t,selectors:[["bracket-order-form"]],viewQuery:function(t,e){var n;1&t&&(M.Jc(g.a,!0),M.Jc(g.a,!0),M.Jc(g.a,!0)),2&t&&(M.zc(n=M.cc())&&(e.mainOrderOptions=n.first),M.zc(n=M.cc())&&(e.takeProfitOptions=n.first),M.zc(n=M.cc())&&(e.stopLossOptions=n.first))},decls:4,vars:4,consts:[["authMask",""],[4,"ngIf","ngIfElse"],[1,"global__auth-mask"],["icon","stop","size","2x"],["subheading","",1,"global__text--warn"],["orientation","","class","bracket-order","body","",3,"breakpoints",4,"ngIf"],["class","submit",4,"ngLet"],["orientation","","body","",1,"bracket-order",3,"breakpoints"],[1,"side-toggle"],[3,"value"],["orderSideToggle",""],["value","buy",1,"long",3,"click"],["value","sell",1,"short",3,"click"],[1,"orders"],["body","",3,"formGroup"],["sbPlacement","bottomEnd",3,"sbPopperBackdropClass"],["mainOrderOptions",""],["class","options-popper",4,"sbContent"],[1,"input-row"],["color","accent","appearance","fill"],["autocomplete","off","type","number","formControlName","size","matInput","","min","0","step","1",3,"focus"],["quantityField",""],["color","accent","appearance","fill",3,"flex",4,"ngIf"],[1,"options"],["icon","cog","size","2x",3,"sbTriggerFor","click"],["translate",""],[3,"content"],["translate","",4,"ngIf"],["body","",1,"trigger",3,"formGroup"],["takeProfitOptions",""],["body","",1,"title"],["formControlName","enabled",1,"no-border"],[3,"hidden"],["ghost",""],["autocomplete","off","type","number","formControlName","exitPrice","matInput","",3,"step","input"],["matSuffix",""],["autocomplete","off","type","number","formControlName","gain","matInput","","min","0",3,"input"],["icon","cog","size","2x",3,"sbTriggerFor"],["class","global__text--warn",4,"ngIf"],["color","accent","appearance","fill",4,"ngIf"],[4,"ngIf"],["stopLossOptions",""],["autocomplete","off","type","number","formControlName","stopPrice","matInput","",3,"step","input"],["autocomplete","off","type","number","formControlName","loss","matInput","","min","0",3,"input"],[1,"options-popper"],["formControlName","type",3,"change"],["value","limit"],["value","market"],[1,"checkboxes"],["formControlName","makerOnly",4,"ngIf"],["formControlName","makerOnly"],["autocomplete","off","type","number","formControlName","limitPrice","matInput","",3,"step","input"],["formControlName","type"],["value","take_profit|limit"],["value","take_profit|market"],["body","","ghost","","bold",""],["formControlName","triggerSignal"],["value","last",1,"global__text--tooltip"],["matTooltipShowDelay","600",3,"matTooltip"],["value","mark",1,"global__text--tooltip"],["value","spot",1,"global__text--tooltip"],[1,"global__text--warn"],["autocomplete","off","type","number","formControlName","limitPrice","matInput","",3,"step"],[3,"pnl"],["value","stop|limit"],["value","stop|market"],[1,"submit"],["mat-raised-button","",3,"disabled","click"],["caption","",1,"global__text--link","default-order",3,"click"],["icon","exchange","size","lg"]],template:function(t,e){if(1&t&&(M.Oc(0,at,5,3,"ng-template",null,0,M.Pc),M.Oc(2,Ct,8,17,"ng-container",1),M.gc(3,"async")),2&t){var n=M.Ac(1);M.Cb(2),M.mc("ngIf",M.hc(3,2,e.userSignedIn$))("ngIfElse",n)}},directives:[D.n,R.b,j.a,L.a,N.a,U.a,F.b,F.a,o.z,o.p,o.h,B.a,z.a,V.a,H.c,H.f,o.s,o.c,q.b,o.o,o.g,$.a,Q.a,W.a,G.a,Y.a,K.a,H.h,Z.b,Z.a,X.a,J.a,tt.a,et.b,nt.a],pipes:[D.b,W.d,it.b,rt.a,ot.a,rt.f,D.x],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;justify-content:space-evenly;position:relative;max-width:100%}.bracket-order[_ngcontent-%COMP%]{height:calc(100% - 60px);padding-top:var(--spacing);overflow:overlay;background:var(--card-colour)}@media (max-width:1024px){.bracket-order[_ngcontent-%COMP%]{width:98vw}}.title[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}.options[_ngcontent-%COMP%], .title[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.options[_ngcontent-%COMP%]{margin-left:var(--spacing);align-self:center;cursor:pointer}.options-popper[_ngcontent-%COMP%]{padding:var(--spacing)}.options-popper[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{padding:var(--spacing) 0}.options-popper[_ngcontent-%COMP%] mat-radio-button[_ngcontent-%COMP%]{margin-right:var(--spacing)}form[_ngcontent-%COMP%]{border-bottom:1px solid var(--border-colour);min-width:0;padding:var(--spacing) 0}[orientation=horizontal][_ngcontent-%COMP%] form.trigger[_ngcontent-%COMP%]{border-left:1px solid var(--border-colour)}form[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%] .input-row[_ngcontent-%COMP%]{display:flex;flex-direction:row}form[_ngcontent-%COMP%] .input-row[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{min-width:0}form[_ngcontent-%COMP%] .input-row[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]:not(:first-child){padding-left:var(--spacing)}@media (max-width:599px){form[_ngcontent-%COMP%] .input-row[_ngcontent-%COMP%]{width:91vw}}[orientation=horizontal][_ngcontent-%COMP%] .orders[_ngcontent-%COMP%]{display:flex;flex-direction:row}[orientation=horizontal][_ngcontent-%COMP%] .orders[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}.submit[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:var(--spacing);background:var(--card-colour)}.submit[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{padding-top:var(--spacing);text-align:right}.submit[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1}.checkboxes[_ngcontent-%COMP%], mat-radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;padding-bottom:var(--spacing)}.checkboxes[_ngcontent-%COMP%] .mat-checkbox-layout, mat-radio-group[_ngcontent-%COMP%] .mat-checkbox-layout{border-bottom:none!important}.mat-button-toggle-checked.long[_ngcontent-%COMP%]{background:var(--g300)}.mat-button-toggle-checked.short[_ngcontent-%COMP%]{background:var(--r300)}@media (min-width:1025px){.default-order[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),t=Object(i.d)([Object(l.a)()],t)}()},"6oIa":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("ZCEf"),r=n("4Pxi"),o=n("4f9k"),a=n("uepk"),s=n("ldwH"),c=n("LqyJ"),u=n("35XV");e.default=function(){function t(){}return t.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},t.prototype.decodeWithState=function(t){return null==this.readers&&this.setHints(null),this.decodeInternal(t)},t.prototype.setHints=function(t){this.hints=t;var e=null!=t&&void 0!==t.get(i.default.TRY_HARDER),n=null==t?null:t.get(i.default.POSSIBLE_FORMATS),c=new Array;if(null!=n){var u=n.some((function(t){return t===r.default.UPC_A||t===r.default.UPC_E||t===r.default.EAN_13||t===r.default.EAN_8||t===r.default.CODABAR||t===r.default.CODE_39||t===r.default.CODE_93||t===r.default.CODE_128||t===r.default.ITF||t===r.default.RSS_14||t===r.default.RSS_EXPANDED}));u&&!e&&c.push(new a.default(t)),n.includes(r.default.QR_CODE)&&c.push(new o.default),n.includes(r.default.DATA_MATRIX)&&c.push(new s.default),u&&e&&c.push(new a.default(t))}0===c.length&&(e||c.push(new a.default(t)),c.push(new o.default),c.push(new s.default),e&&c.push(new a.default(t))),this.readers=c},t.prototype.reset=function(){if(null!==this.readers)for(var t=0,e=this.readers;t0){var i=t.slice(0,e),r=i.toLowerCase(),o=t.slice(e+1).trim();n.maybeSetNormalizedName(i,r),n.headers.has(r)?n.headers.get(r).push(o):n.headers.set(r,[o])}}))}:function(){n.headers=new Map,Object.keys(e).forEach((function(t){var i=e[t],r=t.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(n.headers.set(r,i),n.maybeSetNormalizedName(t,r))}))}:this.headers=new Map}return w(t,[{key:"has",value:function(t){return this.init(),this.headers.has(t.toLowerCase())}},{key:"get",value:function(t){this.init();var e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}},{key:"keys",value:function(){return this.init(),Array.from(this.normalizedNames.values())}},{key:"getAll",value:function(t){return this.init(),this.headers.get(t.toLowerCase())||null}},{key:"append",value:function(t,e){return this.clone({name:t,value:e,op:"a"})}},{key:"set",value:function(t,e){return this.clone({name:t,value:e,op:"s"})}},{key:"delete",value:function(t,e){return this.clone({name:t,value:e,op:"d"})}},{key:"maybeSetNormalizedName",value:function(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}},{key:"init",value:function(){var e=this;this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach((function(t){return e.applyUpdate(t)})),this.lazyUpdate=null))}},{key:"copyFrom",value:function(t){var e=this;t.init(),Array.from(t.headers.keys()).forEach((function(n){e.headers.set(n,t.headers.get(n)),e.normalizedNames.set(n,t.normalizedNames.get(n))}))}},{key:"clone",value:function(e){var n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n}},{key:"applyUpdate",value:function(t){var e=t.name.toLowerCase();switch(t.op){case"a":case"s":var n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);var i=("a"===t.op?this.headers.get(e):void 0)||[];i.push.apply(i,b(n)),this.headers.set(e,i);break;case"d":var r=t.value;if(r){var o=this.headers.get(e);if(!o)return;0===(o=o.filter((function(t){return-1===r.indexOf(t)}))).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}else this.headers.delete(e),this.normalizedNames.delete(e)}}},{key:"forEach",value:function(t){var e=this;this.init(),Array.from(this.normalizedNames.keys()).forEach((function(n){return t(e.normalizedNames.get(n),e.headers.get(n))}))}}]),t}(),g=function(){function t(){C(this,t)}return w(t,[{key:"encodeKey",value:function(t){return v(t)}},{key:"encodeValue",value:function(t){return v(t)}},{key:"decodeKey",value:function(t){return decodeURIComponent(t)}},{key:"decodeValue",value:function(t){return decodeURIComponent(t)}}]),t}();function v(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var y=function(){function t(){var e,n,i,r=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(C(this,t),this.updates=null,this.cloneFrom=null,this.encoder=o.encoder||new g,o.fromString){if(o.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=(e=o.fromString,n=this.encoder,i=new Map,e.length>0&&e.split("&").forEach((function(t){var e=t.indexOf("="),r=m(-1==e?[n.decodeKey(t),""]:[n.decodeKey(t.slice(0,e)),n.decodeValue(t.slice(e+1))],2),o=r[0],a=r[1],s=i.get(o)||[];s.push(a),i.set(o,s)})),i)}else o.fromObject?(this.map=new Map,Object.keys(o.fromObject).forEach((function(t){var e=o.fromObject[t];r.map.set(t,Array.isArray(e)?e:[e])}))):this.map=null}return w(t,[{key:"has",value:function(t){return this.init(),this.map.has(t)}},{key:"get",value:function(t){this.init();var e=this.map.get(t);return e?e[0]:null}},{key:"getAll",value:function(t){return this.init(),this.map.get(t)||null}},{key:"keys",value:function(){return this.init(),Array.from(this.map.keys())}},{key:"append",value:function(t,e){return this.clone({param:t,value:e,op:"a"})}},{key:"set",value:function(t,e){return this.clone({param:t,value:e,op:"s"})}},{key:"delete",value:function(t,e){return this.clone({param:t,value:e,op:"d"})}},{key:"toString",value:function(){var t=this;return this.init(),this.keys().map((function(e){var n=t.encoder.encodeKey(e);return t.map.get(e).map((function(e){return n+"="+t.encoder.encodeValue(e)})).join("&")})).filter((function(t){return""!==t})).join("&")}},{key:"clone",value:function(e){var n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([e]),n}},{key:"init",value:function(){var t=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach((function(e){return t.map.set(e,t.cloneFrom.map.get(e))})),this.updates.forEach((function(e){switch(e.op){case"a":case"s":var n=("a"===e.op?t.map.get(e.param):void 0)||[];n.push(e.value),t.map.set(e.param,n);break;case"d":if(void 0===e.value){t.map.delete(e.param);break}var i=t.map.get(e.param)||[],r=i.indexOf(e.value);-1!==r&&i.splice(r,1),i.length>0?t.map.set(e.param,i):t.map.delete(e.param)}})),this.cloneFrom=this.updates=null)}}]),t}();function _(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function O(t){return"undefined"!=typeof Blob&&t instanceof Blob}function k(t){return"undefined"!=typeof FormData&&t instanceof FormData}var T=function(){function t(e,n,i,r){var o;if(C(this,t),this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.params&&(this.params=o.params)),this.headers||(this.headers=new p),this.params){var a=this.params.toString();if(0===a.length)this.urlWithParams=n;else{var s=n.indexOf("?");this.urlWithParams=n+(-1===s?"?":s0&&void 0!==arguments[0]?arguments[0]:{},n=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=void 0!==e.body?e.body:this.body,a=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,s=void 0!==e.reportProgress?e.reportProgress:this.reportProgress,c=e.headers||this.headers,u=e.params||this.params;return void 0!==e.setHeaders&&(c=Object.keys(e.setHeaders).reduce((function(t,n){return t.set(n,e.setHeaders[n])}),c)),e.setParams&&(u=Object.keys(e.setParams).reduce((function(t,n){return t.set(n,e.setParams[n])}),u)),new t(n,i,o,{params:u,headers:c,reportProgress:s,responseType:r,withCredentials:a})}}]),t}(),S=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({}),E=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";C(this,t),this.headers=e.headers||new p,this.status=void 0!==e.status?e.status:n,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300},x=function(t){a(n,t);var e=c(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return C(this,n),(t=e.call(this,i)).type=S.ResponseHeader,t}return w(n,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}]),n}(E),P=function(t){a(n,t);var e=c(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return C(this,n),(t=e.call(this,i)).type=S.Response,t.body=void 0!==i.body?i.body:null,t}return w(n,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}]),n}(E),A=function(t){a(n,t);var e=c(n);function n(t){var i;return C(this,n),(i=e.call(this,t,0,"Unknown Error")).name="HttpErrorResponse",i.ok=!1,i.message=i.status>=200&&i.status<300?"Http failure during parsing for "+(t.url||"(unknown url)"):"Http failure response for ".concat(t.url||"(unknown url)",": ").concat(t.status," ").concat(t.statusText),i.error=t.error||null,i}return n}(E);function I(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}var M=function(){var t=function(){function t(e){C(this,t),this.handler=e}return w(t,[{key:"request",value:function(t,e){var n,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t instanceof T)n=t;else{var a=void 0;a=o.headers instanceof p?o.headers:new p(o.headers);var c=void 0;o.params&&(c=o.params instanceof y?o.params:new y({fromObject:o.params})),n=new T(t,e,void 0!==o.body?o.body:null,{headers:a,params:c,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials})}var d=Object(r.a)(n).pipe(Object(s.a)((function(t){return i.handler.handle(t)})));if(t instanceof T||"events"===o.observe)return d;var h=d.pipe(Object(u.a)((function(t){return t instanceof P})));switch(o.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return h.pipe(Object(l.a)((function(t){if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body})));case"blob":return h.pipe(Object(l.a)((function(t){if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body})));case"text":return h.pipe(Object(l.a)((function(t){if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body})));case"json":default:return h.pipe(Object(l.a)((function(t){return t.body})))}case"response":return h;default:throw new Error("Unreachable: unhandled observe type ".concat(o.observe,"}"))}}},{key:"delete",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("DELETE",t,e)}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("GET",t,e)}},{key:"head",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("HEAD",t,e)}},{key:"jsonp",value:function(t,e){return this.request("JSONP",t,{params:(new y).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}},{key:"options",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("OPTIONS",t,e)}},{key:"patch",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PATCH",t,I(n,e))}},{key:"post",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",t,I(n,e))}},{key:"put",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",t,I(n,e))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(h))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),D=function(){function t(e,n){C(this,t),this.next=e,this.interceptor=n}return w(t,[{key:"handle",value:function(t){return this.interceptor.intercept(t,this.next)}}]),t}(),R=new i.s("HTTP_INTERCEPTORS"),j=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"intercept",value:function(t,e){return e.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),L=/^\)\]\}',?\n/,N=function t(){C(this,t)},U=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"build",value:function(){return new XMLHttpRequest}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),F=function(){var t=function(){function t(e){C(this,t),this.xhrFactory=e}return w(t,[{key:"handle",value:function(t){var e=this;if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new o.a((function(n){var i=e.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((function(t,e){return i.setRequestHeader(t,e.join(","))})),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){var r=t.detectContentTypeHeader();null!==r&&i.setRequestHeader("Content-Type",r)}if(t.responseType){var o=t.responseType.toLowerCase();i.responseType="json"!==o?o:"text"}var a=t.serializeBody(),s=null,c=function(){if(null!==s)return s;var e=1223===i.status?204:i.status,n=i.statusText||"OK",r=new p(i.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return s=new x({headers:r,status:e,statusText:n,url:o})},u=function(){var e=c(),r=e.headers,o=e.status,a=e.statusText,s=e.url,u=null;204!==o&&(u=void 0===i.response?i.responseText:i.response),0===o&&(o=u?200:0);var l=o>=200&&o<300;if("json"===t.responseType&&"string"==typeof u){var d=u;u=u.replace(L,"");try{u=""!==u?JSON.parse(u):null}catch(h){u=d,l&&(l=!1,u={error:h,text:u})}}l?(n.next(new P({body:u,headers:r,status:o,statusText:a,url:s||void 0})),n.complete()):n.error(new A({error:u,headers:r,status:o,statusText:a,url:s||void 0}))},l=function(t){var e=c().url,r=new A({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:e||void 0});n.error(r)},d=!1,h=function(e){d||(n.next(c()),d=!0);var r={type:S.DownloadProgress,loaded:e.loaded};e.lengthComputable&&(r.total=e.total),"text"===t.responseType&&i.responseText&&(r.partialText=i.responseText),n.next(r)},f=function(t){var e={type:S.UploadProgress,loaded:t.loaded};t.lengthComputable&&(e.total=t.total),n.next(e)};return i.addEventListener("load",u),i.addEventListener("error",l),t.reportProgress&&(i.addEventListener("progress",h),null!==a&&i.upload&&i.upload.addEventListener("progress",f)),i.send(a),n.next({type:S.Sent}),function(){i.removeEventListener("error",l),i.removeEventListener("load",u),t.reportProgress&&(i.removeEventListener("progress",h),null!==a&&i.upload&&i.upload.removeEventListener("progress",f)),i.readyState!==i.DONE&&i.abort()}}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(N))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),B=new i.s("XSRF_COOKIE_NAME"),z=new i.s("XSRF_HEADER_NAME"),V=function t(){C(this,t)},H=function(){var t=function(){function t(e,n,i){C(this,t),this.doc=e,this.platform=n,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return w(t,[{key:"getToken",value:function(){if("server"===this.platform)return null;var t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Object(d.D)(t,this.cookieName),this.lastCookieString=t),this.lastToken}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(d.d),i.Yb(i.D),i.Yb(B))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),q=function(){var t=function(){function t(e,n){C(this,t),this.tokenService=e,this.headerName=n}return w(t,[{key:"intercept",value:function(t,e){var n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);var i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(V),i.Yb(z))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),$=function(){var t=function(){function t(e,n){C(this,t),this.backend=e,this.injector=n,this.chain=null}return w(t,[{key:"handle",value:function(t){if(null===this.chain){var e=this.injector.get(R,[]);this.chain=e.reduceRight((function(t,e){return new D(t,e)}),this.backend)}return this.chain.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(f),i.Yb(i.t))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),Q=function(){var t=function(){function t(){C(this,t)}return w(t,null,[{key:"disable",value:function(){return{ngModule:t,providers:[{provide:q,useClass:j}]}}},{key:"withOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:t,providers:[e.cookieName?{provide:B,useValue:e.cookieName}:[],e.headerName?{provide:z,useValue:e.headerName}:[]]}}}]),t}();return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},providers:[q,{provide:R,useExisting:q,multi:!0},{provide:V,useClass:H},{provide:B,useValue:"XSRF-TOKEN"},{provide:z,useValue:"X-XSRF-TOKEN"}]}),t}(),W=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},providers:[M,{provide:h,useClass:$},F,{provide:f,useExisting:F},U,{provide:N,useExisting:U}],imports:[[Q.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t}()},"71O4":function(t,e,n){t.exports=n.p+"depth-chart-es5.0eeaef0c266b62986895.worker.js"},"7J2L":function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n("zqNl"),r=n("5JSY"),o=n("YtkY"),a=n("kZht"),s=n("Eu46"),c=n("An66");function u(t,e){if(1&t&&(a.Ub(0,"section",1),a.Pb(1,"img",2),a.Tb()),2&t){var n=e.ngLet;a.Cb(1),a.mc("src",n,a.Gc)}}var l=function(){var t=function t(e){C(this,t),this.store=e,this.loaderUrl$=this.store.pipe(Object(i.m)(r.a),Object(o.a)((function(t){return"assets/images/".concat(t,"/loader.svg")})))};return t.\u0275fac=function(e){return new(e||t)(a.Ob(i.b))},t.\u0275cmp=a.Ib({type:t,selectors:[["kraken-loading"]],decls:2,vars:3,consts:[["class","global__loading-spinner",4,"ngLet"],[1,"global__loading-spinner"],["alt","Loader",3,"src"]],template:function(t,e){1&t&&(a.Oc(0,u,2,1,"section",0),a.gc(1,"async")),2&t&&a.mc("ngLet",a.hc(1,1,e.loaderUrl$))},directives:[s.a],pipes:[c.b],styles:["[_nghost-%COMP%]{display:inline-block;height:var(--loader-size,100%);width:var(--loader-size,100%)}img[_ngcontent-%COMP%]{display:block;height:auto;max-width:100%;max-height:100%;color:var(--text-color)}"],changeDetection:0}),t}()},"7KkP":function(t,e,n){"use strict";n.d(e,"k",(function(){return c})),n.d(e,"i",(function(){return u})),n.d(e,"j",(function(){return l})),n.d(e,"h",(function(){return h})),n.d(e,"b",(function(){return f})),n.d(e,"a",(function(){return p})),n.d(e,"c",(function(){return b})),n.d(e,"d",(function(){return g})),n.d(e,"e",(function(){return m})),n.d(e,"f",(function(){return v})),n.d(e,"g",(function(){return y}));var i=n("TYVA"),r=n("Gbfs"),o=n("CW1w"),a=n("vYTc");function s(t){return Object.assign(Object.assign({},t),{instrument:t.instrument.toUpperCase()})}function c(t){return t.map(s).map(_)}function u(t){return Object.assign(Object.assign({},t),{instrument:t.instrument.toUpperCase()})}function l(t){return t.map(u)}function d(t){return Object.assign(Object.assign({},t),{instrument:t.instrument.toUpperCase()})}function h(t){return t.map(d)}function f(t,e){return function(n){var a,s,c=Object(i.u)(n.instrument),u=c.collateral,l=c.inverse,d=c.parts,h="flex"===d.family,f=t.get(d.currencies.base),p=t.get(d.currencies.quote),b=h?f:Object.assign(Object.assign({},r.a),{name:d.currencies.quote}),g=h?p:t.get(u),m="order"===e.trading?b:g,v=Object(o.d)(n.filled,null!==(a=n.limit_price)&&void 0!==a?a:n.stop_price,l),y="order"===e.trading?n.filled:v,_=Object(o.d)(n.qty,null!==(s=n.limit_price)&&void 0!==s?s:n.stop_price,l),O={notionalFilled:v,displayFilled:y,notionalQty:_,displayQty:"order"===e.trading?n.qty:_,orderAsset:b,notionalAsset:g,tradingDisplayAsset:m};return Object.assign(Object.assign({},n),O)}}function p(t,e){return function(n){var a=Object(i.u)(n.instrument),s=a.collateral,c=a.inverse,u=a.parts,l="flex"===u.family,d=t.get(u.currencies.base),h=t.get(u.currencies.quote),f=l?d:r.a,p=l?h:t.get(s),b="order"===e.trading?f:p,g=Object(o.d)(n.qty,n.price,c),m={notionalQty:g,displayQty:"order"===e.trading?n.qty:g,orderAsset:f,notionalAsset:p,tradingDisplayAsset:b};return Object.assign(Object.assign({},n),m)}}function b(t,e){return function(n){var a=Object(i.u)(n.instrument),s=a.collateral,c=a.traded,u=a.inverse,l=a.parts,d="flex"===l.family,h=t.get(l.currencies.base),f=t.get(l.currencies.quote),p=d?h:Object.assign(Object.assign({},r.a),{name:l.currencies.quote}),b=d?f:t.get(s),g="order"===e.trading?p:b,m=t.get(s),v=t.get(c),y="face"===e.wallet?m:v,_=Object(o.d)(n.balance,n.mark_price,u),O="order"===e.trading?Math.abs(n.balance):_,k=d?n.pnl/n.mark_price:n.pnl*n.mark_price,w=n.unrealized_funding?n.unrealized_funding*n.mark_price:void 0,C={notionalSize:_,displaySize:O,marketPnl:k,displayPnl:"face"===e.wallet?n.pnl:k,orderAsset:p,notionalAsset:b,tradingDisplayAsset:g,marketUnrealizedFunding:w,displayUnrealizedFunding:"face"===e.wallet?n.unrealized_funding:w,faceAsset:m,marketAsset:v,walletDisplayAsset:y};return Object.assign(Object.assign({},n),C)}}function g(t,e,n){return function(i){return Object.assign(Object.assign({},i),{leveragePref:t.get(i.instrument)||{symbol:n,cross:!0},pnlPref:e.get(i.instrument)||{symbol:n,pnlCurrency:"USD"}})}}function m(t){return function(e){var n=Object(i.u)(e.product_id).inverse,r=Object(o.d)(e.volume,Object(a.j)(e),n),s={notionalVolume:r,displayVolume:"order"===t.trading?e.volume:r};return Object.assign(Object.assign({},e),s)}}function v(t,e){return function(n){var a=Object(i.u)(n.product_id),s=a.collateral,c=a.inverse,u=a.parts,l=Object(o.d)(n.volume,n.markPrice,c),d="order"===e.trading?n.volume:l,h=Object(o.d)(n.openInterest,n.markPrice,c),f="order"===e.trading?n.openInterest:h,p="flex"===u.family,b=t.get(u.currencies.base),g=t.get(u.currencies.quote),m=p?b:r.a,v=p?g:t.get(s),y={notionalVolume:l,displayVolume:d,notionalOpenInterest:h,displayOpenInterest:f,orderAsset:m,notionalAsset:v,tradingDisplayAsset:"order"===e.trading?m:v};return Object.assign(Object.assign({},n),y)}}function y(t,e){return function(n){var i=Object(o.d)(n.qty,n.price,e),r={notionalQty:i,displayQty:"order"===t.trading?n.qty:i};return Object.assign(Object.assign({},n),r)}}function _(t){var e=(t.mark_price-t.entry_price)/t.entry_price;return Object.assign(Object.assign({},t),{change:e})}},"7SLS":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("5uGe");function r(t){return function(e){return e.lift(new o(t))}}var o=function(){function t(e){C(this,t),this.value=e}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new s(t,this.value))}}]),t}(),s=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t)).value=i,r}return w(n,[{key:"_next",value:function(t){this.destination.next(this.value)}}]),n}(i.a)},"7UDb":function(t,e,n){"use strict";n.d(e,"a",(function(){return m})),n.d(e,"b",(function(){return v}));var i=n("6uGs"),r=n("6Oco"),o=n("uJYd"),a=n("ob6c"),s=n("8j5Y"),c=n("TLy2"),u=n("4e/d"),l=n("XcTA"),d=n("kZht"),h=n("zqNl"),f=n("aDqW"),p=function(){},g=function(){return r.a},m={headers:new i.c({"Content-Type":"application/json"}),withCredentials:!0},v=function(){var t=function(){function t(e,n,i){C(this,t),this.store=e,this.actions$=n,this.translate=i}return w(t,[{key:"errorSnackbarAction",value:function(t,e){var n=this.translate.instant("ERROR."+e.toUpperCase()),i="UNKNOWN";console.log(t);try{i=t.errors[0].code.toString()}catch(s){}try{i=t.error.toString().toUpperCase()}catch(c){}var r=this.translate.instant("ERROR_CODE."+i),a=l.a.get(i.toString());return a?Object(o.k)(r,n,a):Object(o.l)(r,n)}},{key:"createApiEffect",value:function(t){var e=this,n=t.apiStream,i=t.tapPre,r=void 0===i?p:i,l=t.tapPost,d=void 0===l?p:l,h=t.loading,f=t.onSuccess,m=void 0===f?g:f,v=t.errSnackbarMsg,y=void 0===v?"UNKNOWN":v,_=t.onError,O=void 0===_?g:_,k=Array.isArray(t.ofType)?t.ofType:[t.ofType],w=h?function(){return e.store.dispatch(Object(o.a)(h))}:p,C=h?function(){return e.store.dispatch(Object(o.n)(h))}:p,T=y?function(t){return e.store.dispatch(e.errorSnackbarAction(t,y))}:p;return Object(a.d)((function(){return e.actions$.pipe(Object(a.e).apply(void 0,b(k)),Object(s.a)((function(t){w(),r(t)})),Object(c.a)((function(t){return n(t).pipe(Object(s.a)((function(t){return d(t)})),Object(c.a)((function(t){return m(t)})),Object(s.a)(C,C,C),Object(u.a)((function(t){return"error"in t&&T(t.error),O(t)})))})))}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Yb(h.b),d.Yb(a.a),d.Yb(f.e))},t.\u0275prov=d.Kb({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},"7erP":function(t,e,n){"use strict";n.d(e,"a",(function(){return L}));var i=n("3kIJ"),r=n("pjhv"),o=n("lE9u"),a=n("uJYd"),s=n("MUfl"),c=n("kZht"),u=n("zqNl"),l=n("An66"),d=n("anSm"),h=n("EmXI"),f=n("Tcl6"),p=n("hCLc"),b=n("yPvj"),g=n("1eaT"),m=n("aDqW"),v=n("+I9z"),y=n("NxuZ"),_=n("8spT"),O=n("DpwM"),k=n("P0Um");function T(t,e){1&t&&(c.Sb(0),c.Ub(1,"mat-label",12),c.Qc(2),c.gc(3,"uppercase"),c.gc(4,"translate"),c.Tb(),c.Ub(5,"p",13),c.Qc(6,"DIALOG.CRYPTO_WITHDRAWAL.DESCRIPTION"),c.Tb(),c.Rb()),2&t&&(c.Cb(2),c.Sc(" ",c.hc(3,1,c.hc(4,3,"DIALOG.CRYPTO_WITHDRAWAL.HEADING"))," "))}function S(t,e){1&t&&(c.Sb(0),c.Ub(1,"mat-label",12),c.Qc(2),c.gc(3,"uppercase"),c.gc(4,"translate"),c.Tb(),c.Ub(5,"p",13),c.Qc(6,"DIALOG.CRYPTO_WITHDRAWAL.CONTENT.NETWORK_FEE"),c.Tb(),c.Rb()),2&t&&(c.Cb(2),c.Sc(" ",c.hc(3,1,c.hc(4,3,"LABEL.WITHDRAWAL_FEE"))," "))}function E(t,e){if(1&t&&(c.Ub(0,"mat-form-field",14),c.Ub(1,"mat-label",9),c.Qc(2,"FORM.FROM"),c.Tb(),c.Pb(3,"input",15),c.gc(4,"walletName"),c.gc(5,"walletType"),c.Pb(6,"fa-icon",16),c.Tb()),2&t){var n=c.fc(2);c.Cb(3),c.mc("value",c.hc(4,1,n.selected.name)+" "+c.hc(5,3,n.selected.type)+" Wallet")}}function x(t,e){1&t&&(c.Ub(0,"mat-form-field",14),c.Ub(1,"mat-label",9),c.Qc(2,"FORM.TO"),c.Tb(),c.Pb(3,"input",17),c.Pb(4,"fa-icon",16),c.Tb())}function P(t,e){1&t&&(c.Ub(0,"mat-form-field",14),c.Ub(1,"mat-label"),c.Qc(2),c.gc(3,"translate"),c.Tb(),c.Pb(4,"input",18),c.Tb()),2&t&&(c.Cb(2),c.Sc("",c.hc(3,1,"FORM.RECIPIENT_ADDRESS"),":"))}function A(t,e){1&t&&(c.Ub(0,"mat-form-field",14),c.Ub(1,"mat-label"),c.Qc(2),c.gc(3,"translate"),c.Tb(),c.Pb(4,"input",19),c.Tb()),2&t&&(c.Cb(2),c.Sc("",c.hc(3,1,"FORM.DESTINATION_TAG"),":"))}function I(t,e){1&t&&(c.Ub(0,"mat-radio-group",20),c.Ub(1,"mat-radio-button",21),c.Qc(2),c.gc(3,"translate"),c.Tb(),c.Ub(4,"mat-radio-button",22),c.Qc(5),c.gc(6,"translate"),c.Tb(),c.Ub(7,"mat-radio-button",23),c.Qc(8),c.gc(9,"translate"),c.Tb(),c.Tb()),2&t&&(c.Cb(2),c.Sc(" ",c.hc(3,3,"DIALOG.CRYPTO_WITHDRAWAL.CONTENT.HIGH_PRIORITY")," "),c.Cb(3),c.Sc(" ",c.hc(6,5,"DIALOG.CRYPTO_WITHDRAWAL.CONTENT.MED_PRIORITY")," "),c.Cb(3),c.Sc(" ",c.hc(9,7,"DIALOG.CRYPTO_WITHDRAWAL.CONTENT.LOW_PRIORITY")," "))}function M(t,e){1&t&&(c.Sb(0),c.Qc(1),c.gc(2,"translate"),c.Rb()),2&t&&(c.Cb(1),c.Rc(c.hc(2,1,"BUTTON.WITHDRAW_TO_KRAKEN")))}function D(t,e){1&t&&(c.Sb(0),c.Qc(1),c.gc(2,"translate"),c.Rb()),2&t&&(c.Cb(1),c.Rc(c.hc(2,1,"BUTTON.SUBMIT_WITHDRAWAL")))}function R(t,e){if(1&t){var n=c.Vb();c.Sb(0),c.Ub(1,"form",1),c.bc("ngSubmit",(function(){return c.Ec(n),c.fc().submitWithdrawal()})),c.Oc(2,T,7,5,"ng-container",0),c.Oc(3,S,7,5,"ng-container",0),c.Oc(4,E,7,5,"mat-form-field",2),c.Oc(5,x,5,0,"mat-form-field",2),c.Oc(6,P,5,3,"mat-form-field",2),c.Oc(7,A,5,3,"mat-form-field",2),c.Ub(8,"mat-form-field",3),c.Ub(9,"mat-label"),c.Qc(10),c.gc(11,"translate"),c.Tb(),c.Pb(12,"input",4),c.Ub(13,"button",5),c.bc("click",(function(){return c.Ec(n),c.fc().setAmount(1)})),c.Qc(14),c.gc(15,"uppercase"),c.gc(16,"translate"),c.Tb(),c.Pb(17,"market-icon",6),c.Tb(),c.Oc(18,I,10,9,"mat-radio-group",7),c.Ub(19,"div",8),c.Ub(20,"nutritional-info"),c.Ub(21,"span",9),c.Qc(22,"LABEL.BALANCE"),c.Tb(),c.Pb(23,"ghost-trail",10),c.gc(24,"cryptoPrecise"),c.Tb(),c.Tb(),c.Ub(25,"button",11),c.Oc(26,M,3,3,"ng-container",0),c.Oc(27,D,3,3,"ng-container",0),c.Tb(),c.Tb(),c.Rb()}if(2&t){var i=c.fc();c.Cb(1),c.mc("formGroup",i.form),c.Cb(1),c.mc("ngIf",i.userDetails.external),c.Cb(1),c.mc("ngIf",!i.userDetails.external),c.Cb(1),c.mc("ngIf",i.userDetails.external&&i.withdrawEnabled),c.Cb(1),c.mc("ngIf",i.userDetails.external),c.Cb(1),c.mc("ngIf",!i.userDetails.external),c.Cb(1),c.mc("ngIf",!i.userDetails.external&&"XRP"===i.selected.currency),c.Cb(3),c.Sc("",c.hc(11,15,"FORM.AMOUNT"),":"),c.Cb(4),c.Sc(" ",c.hc(15,17,c.hc(16,19,"BUTTON.MAX"))," "),c.Cb(3),c.mc("base",i.selected.currency),c.Cb(1),c.mc("ngIf",!i.userDetails.external&&"XRP"!==i.selected.currency),c.Cb(5),c.mc("content",c.ic(24,21,i.balance,i.selected.currency)),c.Cb(2),c.mc("disabled",i.form.invalid),c.Cb(1),c.mc("ngIf",i.userDetails.external),c.Cb(1),c.mc("ngIf",!i.userDetails.external)}}function j(t,e){1&t&&(c.Sb(0),c.Ub(1,"p",13),c.Qc(2,"LABEL.SUBACCOUNT_WITHDRAW"),c.Tb(),c.Rb())}var L=function(){var t=function(){function t(e,n,i){C(this,t),this.store=e,this.formBuilder=n,this.feature=i}return w(t,[{key:"ngOnInit",value:function(){this.form=this.formBuilder.group({amount:[0,[i.x.required,i.x.min(1e-12),i.x.pattern("^(?!0$).*")]],from:"",recipient:"",calculation:"high",destination:""}),this.checkWithdrawalDialog()}},{key:"checkWithdrawalDialog",value:function(){"mtf"===this.userDetails.platformName&&"EUR"===this.selected.currency&&(this.store.dispatch(Object(a.c)()),this.store.dispatch(Object(a.g)({name:"fiat-withdraw",inputs:{wallet:this.selected}})))}},{key:"setAmount",value:function(t){var e=Object(r.b)(this.selected.currency,!0),n=Math.pow(10,e),i=Math.min(this.balance*t,this.balance),o=Math.floor(i*n)/n;this.form.get("amount").setValue(o)}},{key:"transformSCWalletName",value:function(t){return t.toLowerCase().replace("f-","fi_").replace(":","")}},{key:"submitWithdrawal",value:function(){if(this.userDetails.external)if(this.withdrawEnabled){var t="flex"===this.selected.type?"flex":"futures"===this.selected.type?this.transformSCWalletName(this.selected.name):"cash";this.store.dispatch(Object(o.B)({amount:this.form.get("amount").value,currency:this.selected.currency,source:t}))}else this.store.dispatch(Object(o.B)({amount:this.form.get("amount").value,currency:this.selected.currency}));else this.store.dispatch("XRP"===this.selected.currency?Object(o.z)({amount:this.form.get("amount").value,currency:this.selected.currency,targetAddress:"".concat(this.form.get("recipient").value,"&dt=").concat(this.form.get("destination").value)}):Object(o.z)({amount:this.form.get("amount").value,currency:this.selected.currency,targetAddress:this.form.get("recipient").value,feeType:this.form.get("calculation").value}))}},{key:"amount",get:function(){var t;return null===(t=this.form.get("amount"))||void 0===t?void 0:t.value}},{key:"balance",get:function(){return"holding"===this.selected.type?this.selected.balance:this.selected.am}},{key:"withdrawEnabled",get:function(){return this.feature.isEnabled("transferDestination")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Ob(u.b),c.Ob(i.d),c.Ob(s.a))},t.\u0275cmp=c.Ib({type:t,selectors:[["crypto-withdraw-form"]],inputs:{selected:"selected",isSubAccount:"isSubAccount",userDetails:"userDetails"},decls:2,vars:2,consts:[[4,"ngIf"],["body","",3,"formGroup","ngSubmit"],["color","accent","appearance","fill",4,"ngIf"],["color","accent","appearance","fill",1,"market-form","no-padding"],["matInput","","formControlName","amount","required","","type","number","min","0","inputmode","numeric","autocomplete","off"],["matSuffix","","mat-raised-button","","body","","type","button",1,"mat-small-button",3,"click"],["matSuffix","",1,"form-icon",3,"base"],["formControlName","calculation",4,"ngIf"],[1,"balance-info"],["translate",""],[3,"content"],["mat-raised-button","",1,"submit",3,"disabled"],[1,"global__text","global__text--bold","global__text--ghost"],["body","","translate",""],["color","accent","appearance","fill"],["disabled","","matInput","","required","","type","text",3,"value"],["matSuffix","","icon","kraken",1,"form-icon"],["disabled","","matInput","","required","","type","text","value","Kraken Spot Wallet"],["matInput","","required","","type","text","formControlName","recipient"],["matInput","","type","text","formControlName","destination"],["formControlName","calculation"],["value","high"],["value","medium"],["value","low"]],template:function(t,e){1&t&&(c.Oc(0,R,28,24,"ng-container",0),c.Oc(1,j,3,0,"ng-container",0)),2&t&&(c.mc("ngIf",!e.isSubAccount),c.Cb(1),c.mc("ngIf",e.isSubAccount))},directives:[l.n,i.z,i.p,d.a,i.h,h.c,h.f,f.b,i.c,i.s,i.o,i.g,i.v,p.b,h.h,b.a,g.a,m.a,v.a,y.b,_.b,_.a],pipes:[m.d,l.x,O.b,k.a,k.b],styles:["form[_ngcontent-%COMP%] > mat-label[_ngcontent-%COMP%]{display:block;margin-bottom:var(--spacing)}form[_ngcontent-%COMP%] > mat-form-field[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%] > mat-form-field[_ngcontent-%COMP%]:first-of-type, form[_ngcontent-%COMP%] > mat-radio-group[_ngcontent-%COMP%]{margin-top:var(--spacing)}form[_ngcontent-%COMP%] > mat-radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column}form[_ngcontent-%COMP%] .submit[_ngcontent-%COMP%]{width:100%;margin-top:var(--spacing)}"],changeDetection:0}),t}()},"7fYw":function(t,e,n){"use strict";n.r(e),n.d(e,"MarketsOverviewComponent",(function(){return y}));var i=n("zqNl"),r=n("0tVE"),o=n("+Px6"),a=n("qAYy"),s=n("rxqU"),c=n("sxqi"),u=n("kZht"),l=n("mcff"),d=n("Asjx"),h=n("rfPA"),f=n("bBQR"),p=n("sq1e"),b=n("rEzU"),g=n("HeQ8"),m=n("aDqW"),v=n("An66"),y=function(){var t=function(){function t(e,n,r,c){C(this,t),this.store=e,this.dialogRef=n,this.market=r,this.breakpointObserver=c,this.favorites$=this.store.pipe(Object(i.m)(s.p)),this.assets$=this.store.pipe(Object(i.m)(o.d)),this.partitionedAssets$=this.store.pipe(Object(i.m)(o.c)),this.futuresTickers$=this.store.pipe(Object(i.m)(a.i)),this.flexTickers$=this.store.pipe(Object(i.m)(a.h))}return w(t,[{key:"changeSelectedTicker",value:function(t){this.market.navigateToMarket(t),this.dialogRef.close()}},{key:"addFavorite",value:function(t){this.store.dispatch(Object(r.d)({marketDescriptor:t}))}},{key:"removeFavorite",value:function(t){this.store.dispatch(Object(r.v)({marketDescriptor:t}))}},{key:"isHandset",get:function(){return this.breakpointObserver.isMatched("(max-width: 599px)")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Ob(i.b),u.Ob(l.d),u.Ob(c.a),u.Ob(d.a))},t.\u0275cmp=u.Ib({type:t,selectors:[["markets-overview"]],decls:12,vars:20,consts:[["heading","HEADING.MARKETS",3,"padding"],["dynamicHeight",""],[3,"label"],[3,"tickers","favorites","selectTicker","addFavorite","removeFavorite"]],template:function(t,e){1&t&&(u.Ub(0,"pro-dialog",0),u.Ub(1,"mat-tab-group",1),u.Ub(2,"mat-tab",2),u.gc(3,"translate"),u.Ub(4,"markets-overview-futures",3),u.bc("selectTicker",(function(t){return e.changeSelectedTicker(t)}))("addFavorite",(function(t){return e.addFavorite(t)}))("removeFavorite",(function(t){return e.removeFavorite(t)})),u.gc(5,"async"),u.gc(6,"async"),u.Tb(),u.Tb(),u.Ub(7,"mat-tab",2),u.gc(8,"translate"),u.Ub(9,"markets-overview-futures",3),u.bc("selectTicker",(function(t){return e.changeSelectedTicker(t)}))("addFavorite",(function(t){return e.addFavorite(t)}))("removeFavorite",(function(t){return e.removeFavorite(t)})),u.gc(10,"async"),u.gc(11,"async"),u.Tb(),u.Tb(),u.Tb(),u.Tb()),2&t&&(u.mc("padding",!1),u.Cb(1),u.mc("@.disabled",!0),u.Cb(1),u.mc("label",u.hc(3,8,"Single Collateral")),u.Cb(2),u.mc("tickers",u.hc(5,10,e.futuresTickers$))("favorites",u.hc(6,12,e.favorites$)),u.Cb(3),u.mc("label",u.hc(8,14,"Multi Collateral")),u.Cb(2),u.mc("tickers",u.hc(10,16,e.flexTickers$))("favorites",u.hc(11,18,e.favorites$)))},directives:[h.a,f.a,p.c,p.a,b.a,g.a],pipes:[m.d,v.b],encapsulation:2,changeDetection:0}),t}()},"7ntQ":function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("JHA6"),r=n("i7Dj"),o=n("ZTXN");function a(){return new o.b}function s(){return function(t){return Object(r.a)()(Object(i.a)(a)(t))}}},"807T":function(t,e,n){"use strict";n.d(e,"a",(function(){return Ot})),n.d(e,"b",(function(){return Et})),n.d(e,"c",(function(){return At})),n.d(e,"d",(function(){return Pt}));var i=n("jL3B"),r=n("5GZx"),s=n("ZtZA"),u=n("An66"),d=n("kZht"),f=n("hCLc"),p=n("mcff"),b=n("VbQ3"),g=n("pTnX"),m=n("ZTXN"),v=n("bwdy"),y=n("g6G6"),_=n("ROBh"),O=n("Hq54"),k=n("vE5V"),T=n("J+dc"),S=n("jIqt"),E=n("xVbo"),x=n("5XID"),P=n("+6xv"),A=n("3kIJ"),I=n("EmXI"),M=n("Tcl6"),D=["mat-calendar-body",""];function R(t,e){if(1&t&&(d.Ub(0,"tr",2),d.Ub(1,"td",3),d.Qc(2),d.Tb(),d.Tb()),2&t){var n=d.fc();d.Cb(1),d.Lc("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),d.Db("colspan",n.numCols),d.Cb(1),d.Sc(" ",n.label," ")}}function j(t,e){if(1&t&&(d.Ub(0,"td",7),d.Qc(1),d.Tb()),2&t){var n=d.fc(2);d.Lc("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),d.Db("colspan",n._firstRowOffset),d.Cb(1),d.Sc(" ",n._firstRowOffset>=n.labelMinRequiredCells?n.label:""," ")}}function L(t,e){if(1&t){var n=d.Vb();d.Ub(0,"td",8),d.bc("click",(function(t){d.Ec(n);var i=e.$implicit;return d.fc(2)._cellClicked(i,t)})),d.Ub(1,"div",9),d.Qc(2),d.Tb(),d.Pb(3,"div",10),d.Tb()}if(2&t){var i=e.$implicit,r=e.index,o=d.fc().index,a=d.fc();d.Lc("width",a._cellWidth)("padding-top",a._cellPadding)("padding-bottom",a._cellPadding),d.Gb("mat-calendar-body-disabled",!i.enabled)("mat-calendar-body-active",a._isActiveCell(o,r))("mat-calendar-body-range-start",a._isRangeStart(i.compareValue))("mat-calendar-body-range-end",a._isRangeEnd(i.compareValue))("mat-calendar-body-in-range",a._isInRange(i.compareValue))("mat-calendar-body-comparison-bridge-start",a._isComparisonBridgeStart(i.compareValue,o,r))("mat-calendar-body-comparison-bridge-end",a._isComparisonBridgeEnd(i.compareValue,o,r))("mat-calendar-body-comparison-start",a._isComparisonStart(i.compareValue))("mat-calendar-body-comparison-end",a._isComparisonEnd(i.compareValue))("mat-calendar-body-in-comparison-range",a._isInComparisonRange(i.compareValue))("mat-calendar-body-preview-start",a._isPreviewStart(i.compareValue))("mat-calendar-body-preview-end",a._isPreviewEnd(i.compareValue))("mat-calendar-body-in-preview",a._isInPreview(i.compareValue)),d.mc("ngClass",i.cssClasses)("tabindex",a._isActiveCell(o,r)?0:-1),d.Db("data-mat-row",o)("data-mat-col",r)("aria-label",i.ariaLabel)("aria-disabled",!i.enabled||null)("aria-selected",a._isSelected(i.compareValue)),d.Cb(1),d.Gb("mat-calendar-body-selected",a._isSelected(i.compareValue))("mat-calendar-body-comparison-identical",a._isComparisonIdentical(i.compareValue))("mat-calendar-body-today",a.todayValue===i.compareValue),d.Cb(1),d.Sc(" ",i.displayValue," ")}}function N(t,e){if(1&t&&(d.Ub(0,"tr",4),d.Oc(1,j,2,6,"td",5),d.Oc(2,L,4,46,"td",6),d.Tb()),2&t){var n=e.$implicit,i=e.index,r=d.fc();d.Cb(1),d.mc("ngIf",0===i&&r._firstRowOffset),d.Cb(1),d.mc("ngForOf",n)}}function U(t,e){if(1&t&&(d.Ub(0,"th",5),d.Qc(1),d.Tb()),2&t){var n=e.$implicit;d.Db("aria-label",n.long),d.Cb(1),d.Rc(n.narrow)}}var F=["*"];function B(t,e){}function z(t,e){if(1&t){var n=d.Vb();d.Ub(0,"mat-month-view",5),d.bc("activeDateChange",(function(t){return d.Ec(n),d.fc().activeDate=t}))("_userSelection",(function(t){return d.Ec(n),d.fc()._dateSelected(t)})),d.Tb()}if(2&t){var i=d.fc();d.mc("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)("comparisonStart",i.comparisonStart)("comparisonEnd",i.comparisonEnd)}}function V(t,e){if(1&t){var n=d.Vb();d.Ub(0,"mat-year-view",6),d.bc("activeDateChange",(function(t){return d.Ec(n),d.fc().activeDate=t}))("monthSelected",(function(t){return d.Ec(n),d.fc()._monthSelectedInYearView(t)}))("selectedChange",(function(t){return d.Ec(n),d.fc()._goToDateInView(t,"month")})),d.Tb()}if(2&t){var i=d.fc();d.mc("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)}}function H(t,e){if(1&t){var n=d.Vb();d.Ub(0,"mat-multi-year-view",7),d.bc("activeDateChange",(function(t){return d.Ec(n),d.fc().activeDate=t}))("yearSelected",(function(t){return d.Ec(n),d.fc()._yearSelectedInMultiYearView(t)}))("selectedChange",(function(t){return d.Ec(n),d.fc()._goToDateInView(t,"year")})),d.Tb()}if(2&t){var i=d.fc();d.mc("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)}}var q=["button"];function $(t,e){1&t&&(d.ec(),d.Ub(0,"svg",3),d.Pb(1,"path",4),d.Tb())}var Q=[[["","matDatepickerToggleIcon",""]]],W=["[matDatepickerToggleIcon]"],G=function(){var t=function(){function t(){C(this,t),this.changes=new m.b,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}return w(t,[{key:"formatYearRange",value:function(t,e){return"".concat(t," \u2013 ").concat(e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(d.Kb)({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Y=function t(e,n,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,s=arguments.length>6?arguments[6]:void 0;C(this,t),this.value=e,this.displayValue=n,this.ariaLabel=i,this.enabled=r,this.cssClasses=o,this.compareValue=a,this.rawValue=s},K=function(){var t=function(){function t(e,n){var i=this;C(this,t),this._elementRef=e,this._ngZone=n,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new d.o,this.previewChange=new d.o,this._enterHandler=function(t){if(i._skipNextFocus&&"focus"===t.type)i._skipNextFocus=!1;else if(t.target&&i.isRange){var e=i._getCellFromElement(t.target);e&&i._ngZone.run((function(){return i.previewChange.emit({value:e.enabled?e:null,event:t})}))}},this._leaveHandler=function(t){null!==i.previewEnd&&i.isRange&&t.target&&Z(t.target)&&i._ngZone.run((function(){return i.previewChange.emit({value:null,event:t})}))},n.runOutsideAngular((function(){var t=e.nativeElement;t.addEventListener("mouseenter",i._enterHandler,!0),t.addEventListener("focus",i._enterHandler,!0),t.addEventListener("mouseleave",i._leaveHandler,!0),t.addEventListener("blur",i._leaveHandler,!0)}))}return w(t,[{key:"_cellClicked",value:function(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})}},{key:"_isSelected",value:function(t){return this.startValue===t||this.endValue===t}},{key:"ngOnChanges",value:function(t){var e=t.numCols,n=this.rows,i=this.numCols;(t.rows||e)&&(this._firstRowOffset=n&&n.length&&n[0].length?i-n[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/i+"%"),!e&&this._cellWidth||(this._cellWidth=100/i+"%")}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)}},{key:"_isActiveCell",value:function(t,e){var n=t*this.numCols+e;return t&&(n-=this._firstRowOffset),n==this.activeCell}},{key:"_focusActiveCell",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._ngZone.runOutsideAngular((function(){t._ngZone.onStable.pipe(Object(T.a)(1)).subscribe((function(){var n=t._elementRef.nativeElement.querySelector(".mat-calendar-body-active");n&&(e||(t._skipNextFocus=!0),n.focus())}))}))}},{key:"_isRangeStart",value:function(t){return X(t,this.startValue,this.endValue)}},{key:"_isRangeEnd",value:function(t){return J(t,this.startValue,this.endValue)}},{key:"_isInRange",value:function(t){return tt(t,this.startValue,this.endValue,this.isRange)}},{key:"_isComparisonStart",value:function(t){return X(t,this.comparisonStart,this.comparisonEnd)}},{key:"_isComparisonBridgeStart",value:function(t,e,n){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;var i=this.rows[e][n-1];if(!i){var r=this.rows[e-1];i=r&&r[r.length-1]}return i&&!this._isRangeEnd(i.compareValue)}},{key:"_isComparisonBridgeEnd",value:function(t,e,n){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;var i=this.rows[e][n+1];if(!i){var r=this.rows[e+1];i=r&&r[0]}return i&&!this._isRangeStart(i.compareValue)}},{key:"_isComparisonEnd",value:function(t){return J(t,this.comparisonStart,this.comparisonEnd)}},{key:"_isInComparisonRange",value:function(t){return tt(t,this.comparisonStart,this.comparisonEnd,this.isRange)}},{key:"_isComparisonIdentical",value:function(t){return this.comparisonStart===this.comparisonEnd&&t===this.comparisonStart}},{key:"_isPreviewStart",value:function(t){return X(t,this.previewStart,this.previewEnd)}},{key:"_isPreviewEnd",value:function(t){return J(t,this.previewStart,this.previewEnd)}},{key:"_isInPreview",value:function(t){return tt(t,this.previewStart,this.previewEnd,this.isRange)}},{key:"_getCellFromElement",value:function(t){var e;if(Z(t)?e=t:Z(t.parentNode)&&(e=t.parentNode),e){var n=e.getAttribute("data-mat-row"),i=e.getAttribute("data-mat-col");if(n&&i)return this.rows[parseInt(n)][parseInt(i)]}return null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Ob(d.l),d.Ob(d.B))},t.\u0275cmp=d.Ib({type:t,selectors:[["","mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["matCalendarBody"],features:[d.Ab],attrs:D,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(t,e){1&t&&(d.Oc(0,R,3,6,"tr",0),d.Oc(1,N,3,2,"tr",1)),2&t&&(d.mc("ngIf",e._firstRowOffset.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n'],encapsulation:2,changeDetection:0}),t}();function Z(t){return"TD"===t.nodeName}function X(t,e,n){return null!==n&&e!==n&&t=e&&t===n}function tt(t,e,n,i){return i&&null!==e&&null!==n&&e!==n&&t>=e&&t<=n}var et=function t(e,n){C(this,t),this.start=e,this.end=n},nt=function(){var t=function(){function t(e,n){C(this,t),this.selection=e,this._adapter=n,this._selectionChanged=new m.b,this.selectionChanged=this._selectionChanged,this.selection=e}return w(t,[{key:"updateSelection",value:function(t,e){this.selection=t,this._selectionChanged.next({selection:t,source:e})}},{key:"ngOnDestroy",value:function(){this._selectionChanged.complete()}},{key:"_isValidDateInstance",value:function(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Ob(void 0),d.Ob(g.c))},t.\u0275dir=d.Jb({type:t}),t}(),it=function(){var t=function(t){a(n,t);var e=c(n);function n(t){return C(this,n),e.call(this,null,t)}return w(n,[{key:"add",value:function(t){o(h(n.prototype),"updateSelection",this).call(this,t,this)}},{key:"isValid",value:function(){return null!=this.selection&&this._isValidDateInstance(this.selection)}},{key:"isComplete",value:function(){return null!=this.selection}}]),n}(nt);return t.\u0275fac=function(e){return new(e||t)(d.Yb(g.c))},t.\u0275prov=d.Kb({token:t,factory:t.\u0275fac}),t}(),rt={provide:nt,deps:[[new d.C,new d.L,nt],g.c],useFactory:function(t,e){return t||new it(e)}},ot=new d.s("MAT_DATE_RANGE_SELECTION_STRATEGY"),at=function(){var t=function(){function t(e,n,i,r,o){C(this,t),this._changeDetectorRef=e,this._dateFormats=n,this._dateAdapter=i,this._dir=r,this._rangeStrategy=o,this._rerenderSubscription=v.a.EMPTY,this.selectedChange=new d.o,this._userSelection=new d.o,this.activeDateChange=new d.o,this._activeDate=this._dateAdapter.today()}return w(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Object(S.a)(null)).subscribe((function(){return t._init()}))}},{key:"ngOnChanges",value:function(t){var e=t.comparisonStart||t.comparisonEnd;e&&!e.firstChange&&this._setRanges(this.selected)}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_dateSelected",value:function(t){var e,n,i=t.value,r=this._dateAdapter.getYear(this.activeDate),o=this._dateAdapter.getMonth(this.activeDate),a=this._dateAdapter.createDate(r,o,i);this._selected instanceof et?(e=this._getDateInCurrentMonth(this._selected.start),n=this._getDateInCurrentMonth(this._selected.end)):e=n=this._getDateInCurrentMonth(this._selected),e===i&&n===i||this.selectedChange.emit(a),this._userSelection.emit({value:a,event:t.event})}},{key:"_handleCalendarBodyKeydown",value:function(t){var e=this._activeDate,n=this._isRtl();switch(t.keyCode){case O.h:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?1:-1);break;case O.l:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?-1:1);break;case O.o:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case O.c:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case O.g:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case O.d:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case O.k:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case O.j:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case O.e:case O.m:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case O.f:return void(null!=this._previewEnd&&(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}},{key:"_init",value:function(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}},{key:"_focusActiveCell",value:function(t){this._matCalendarBody._focusActiveCell(t)}},{key:"_previewChanged",value:function(t){var e=t.event,n=t.value;if(this._rangeStrategy){var i=this._rangeStrategy.createPreview(n?n.rawValue:null,this.selected,e);this._previewStart=this._getCellCompareValue(i.start),this._previewEnd=this._getCellCompareValue(i.end),this._changeDetectorRef.detectChanges()}}},{key:"_initWeekdays",value:function(){var t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow"),n=this._dateAdapter.getDayOfWeekNames("long").map((function(t,n){return{long:t,narrow:e[n]}}));this._weekdays=n.slice(t).concat(n.slice(0,t))}},{key:"_createWeekCells",value:function(){var t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(var n=0,i=this._firstWeekOffset;n=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}},{key:"_getDateInCurrentMonth",value:function(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}},{key:"_hasSameMonthAndYear",value:function(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))}},{key:"_getCellCompareValue",value:function(t){if(t){var e=this._dateAdapter.getYear(t),n=this._dateAdapter.getMonth(t),i=this._dateAdapter.getDate(t);return new Date(e,n,i).getTime()}return null}},{key:"_isRtl",value:function(){return this._dir&&"rtl"===this._dir.value}},{key:"_setRanges",value:function(t){t instanceof et?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}},{key:"activeDate",get:function(){return this._activeDate},set:function(t){var e=this._activeDate,n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()}},{key:"selected",get:function(){return this._selected},set:function(t){this._selected=t instanceof et?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}},{key:"minDate",get:function(){return this._minDate},set:function(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}},{key:"maxDate",get:function(){return this._maxDate},set:function(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Ob(d.h),d.Ob(g.e,8),d.Ob(g.c,8),d.Ob(k.b,8),d.Ob(ot,8))},t.\u0275cmp=d.Ib({type:t,selectors:[["mat-month-view"]],viewQuery:function(t,e){var n;1&t&&d.Wc(K,!0),2&t&&d.zc(n=d.cc())&&(e._matCalendarBody=n.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[d.Ab],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(t,e){1&t&&(d.Ub(0,"table",0),d.Ub(1,"thead",1),d.Ub(2,"tr"),d.Oc(3,U,2,2,"th",2),d.Tb(),d.Ub(4,"tr"),d.Pb(5,"th",3),d.Tb(),d.Tb(),d.Ub(6,"tbody",4),d.bc("selectedValueChange",(function(t){return e._dateSelected(t)}))("previewChange",(function(t){return e._previewChanged(t)}))("keydown",(function(t){return e._handleCalendarBodyKeydown(t)})),d.Tb(),d.Tb()),2&t&&(d.Cb(3),d.mc("ngForOf",e._weekdays),d.Cb(3),d.mc("label",e._monthLabel)("rows",e._weeks)("todayValue",e._todayDate)("startValue",e._rangeStart)("endValue",e._rangeEnd)("comparisonStart",e._comparisonRangeStart)("comparisonEnd",e._comparisonRangeEnd)("previewStart",e._previewStart)("previewEnd",e._previewEnd)("isRange",e._isRange)("labelMinRequiredCells",3)("activeCell",e._dateAdapter.getDate(e.activeDate)-1))},directives:[u.m,K],encapsulation:2,changeDetection:0}),t}(),st=function(){var t=function(){function t(e,n,i){C(this,t),this._changeDetectorRef=e,this._dateAdapter=n,this._dir=i,this._rerenderSubscription=v.a.EMPTY,this.selectedChange=new d.o,this.yearSelected=new d.o,this.activeDateChange=new d.o,this._activeDate=this._dateAdapter.today()}return w(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Object(S.a)(null)).subscribe((function(){return t._init()}))}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_init",value:function(){var t=this;this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());var e=this._dateAdapter.getYear(this._activeDate)-ut(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(var n=0,i=[];n<24;n++)i.push(e+n),4==i.length&&(this._years.push(i.map((function(e){return t._createCellForYear(e)}))),i=[]);this._changeDetectorRef.markForCheck()}},{key:"_yearSelected",value:function(t){var e=t.value;this.yearSelected.emit(this._dateAdapter.createDate(e,0,1));var n=this._dateAdapter.getMonth(this.activeDate),i=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,n,1));this.selectedChange.emit(this._dateAdapter.createDate(e,n,Math.min(this._dateAdapter.getDate(this.activeDate),i)))}},{key:"_handleCalendarBodyKeydown",value:function(t){var e=this._activeDate,n=this._isRtl();switch(t.keyCode){case O.h:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,n?1:-1);break;case O.l:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,n?-1:1);break;case O.o:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case O.c:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case O.g:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-ut(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case O.d:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-ut(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case O.k:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-240:-24);break;case O.j:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?240:24);break;case O.e:case O.m:this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}},{key:"_getActiveCell",value:function(){return ut(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}},{key:"_focusActiveCell",value:function(){this._matCalendarBody._focusActiveCell()}},{key:"_createCellForYear",value:function(t){var e=this._dateAdapter.createDate(t,0,1),n=this._dateAdapter.getYearName(e),i=this.dateClass?this.dateClass(e,"multi-year"):void 0;return new Y(t,n,n,this._shouldEnableYear(t),i)}},{key:"_shouldEnableYear",value:function(t){if(null==t||this.maxDate&&t>this._dateAdapter.getYear(this.maxDate)||this.minDate&&tn||t===n&&e>i}return!1}},{key:"_isYearAndMonthBeforeMinDate",value:function(t,e){if(this.minDate){var n=this._dateAdapter.getYear(this.minDate),i=this._dateAdapter.getMonth(this.minDate);return t enter",Object(P.e)("120ms cubic-bezier(0, 0, 0.2, 1)",Object(P.l)({opacity:1,transform:"scale(1, 1)"}))),Object(P.m)("* => void",Object(P.e)("100ms linear",Object(P.l)({opacity:0})))]),fadeInCalendar:Object(P.n)("fadeInCalendar",[Object(P.k)("void",Object(P.l)({opacity:0})),Object(P.k)("enter",Object(P.l)({opacity:1})),Object(P.m)("void => *",Object(P.e)("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},bt=0,gt=new d.s("mat-datepicker-scroll-strategy"),mt={provide:gt,deps:[r.c],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},vt=Object(g.w)((function t(e){C(this,t),this._elementRef=e})),yt=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a){var s;return C(this,n),(s=e.call(this,t))._changeDetectorRef=i,s._model=r,s._dateAdapter=o,s._rangeSelectionStrategy=a,s._subscriptions=new v.a,s._animationState="enter",s._animationDone=new m.b,s}return w(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._changeDetectorRef&&this._subscriptions.add(this.datepicker._stateChanges.subscribe((function(){t._changeDetectorRef.markForCheck()}))),this._calendar.focusActiveCell()}},{key:"ngOnDestroy",value:function(){this._subscriptions.unsubscribe(),this._animationDone.complete()}},{key:"_handleUserSelection",value:function(t){if(this._model&&this._dateAdapter){var e=this._model.selection,n=t.value,i=e instanceof et;if(i&&this._rangeSelectionStrategy){var r=this._rangeSelectionStrategy.selectionFinished(n,e,t.event);this._model.updateSelection(r,this)}else!n||!i&&this._dateAdapter.sameDate(n,e)||this._model.add(n)}this._model&&!this._model.isComplete()||this.datepicker.close()}},{key:"_startExitAnimation",value:function(){this._animationState="void",this._changeDetectorRef&&this._changeDetectorRef.markForCheck()}},{key:"_getSelected",value:function(){return this._model?this._model.selection:null}}]),n}(vt);return t.\u0275fac=function(e){return new(e||t)(d.Ob(d.l),d.Ob(d.h),d.Ob(nt),d.Ob(g.c),d.Ob(ot,8))},t.\u0275cmp=d.Ib({type:t,selectors:[["mat-datepicker-content"]],viewQuery:function(t,e){var n;1&t&&d.Wc(ft,!0),2&t&&d.zc(n=d.cc())&&(e._calendar=n.first)},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,e){1&t&&d.Mc("@transformPanel.done",(function(){return e._animationDone.next()})),2&t&&(d.Nc("@transformPanel",e._animationState),d.Gb("mat-datepicker-content-touch",e.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[d.zb],decls:1,vars:13,consts:[["cdkTrapFocus","",3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","yearSelected","monthSelected","_userSelection"]],template:function(t,e){1&t&&(d.Ub(0,"mat-calendar",0),d.bc("yearSelected",(function(t){return e.datepicker._selectYear(t)}))("monthSelected",(function(t){return e.datepicker._selectMonth(t)}))("_userSelection",(function(t){return e._handleUserSelection(t)})),d.Tb()),2&t&&d.mc("id",e.datepicker.id)("ngClass",e.datepicker.panelClass)("startAt",e.datepicker.startAt)("startView",e.datepicker.startView)("minDate",e.datepicker._getMinDate())("maxDate",e.datepicker._getMaxDate())("dateFilter",e.datepicker._getDateFilter())("headerComponent",e.datepicker.calendarHeaderComponent)("selected",e._getSelected())("dateClass",e.datepicker.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("@fadeInCalendar","enter")},directives:[ft,i.f,u.l],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}\n"],encapsulation:2,data:{animation:[pt.transformPanel,pt.fadeInCalendar]},changeDetection:0}),t}(),_t=function(){var t=function(){function t(e,n,i,r,o,a,s,c,u){C(this,t),this._dialog=e,this._overlay=n,this._ngZone=i,this._viewContainerRef=r,this._dateAdapter=a,this._dir=s,this._document=c,this._model=u,this._inputStateChanges=v.a.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this.yearSelected=new d.o,this.monthSelected=new d.o,this.openedStream=new d.o,this.closedStream=new d.o,this._opened=!1,this.id="mat-datepicker-"+bt++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=this.id+"-backdrop",this._stateChanges=new m.b,this._scrollStrategy=o}return w(t,[{key:"_getMinDate",value:function(){return this._datepickerInput&&this._datepickerInput.min}},{key:"_getMaxDate",value:function(){return this._datepickerInput&&this._datepickerInput.max}},{key:"_getDateFilter",value:function(){return this._datepickerInput&&this._datepickerInput.dateFilter}},{key:"ngOnChanges",value:function(t){var e=t.xPosition||t.yPosition;e&&!e.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)}},{key:"ngOnDestroy",value:function(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this._stateChanges.complete()}},{key:"select",value:function(t){this._model.add(t)}},{key:"_selectYear",value:function(t){this.yearSelected.emit(t)}},{key:"_selectMonth",value:function(t){this.monthSelected.emit(t)}},{key:"_registerInput",value:function(t){var e=this;return this._inputStateChanges.unsubscribe(),this._datepickerInput=t,this._inputStateChanges=t._stateChanges.subscribe((function(){return e._stateChanges.next(void 0)})),this._model}},{key:"open",value:function(){this._opened||this.disabled||(this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit())}},{key:"close",value:function(){var t=this;if(this._opened){if(this._popupComponentRef&&this._popupRef){var e=this._popupComponentRef.instance;e._startExitAnimation(),e._animationDone.pipe(Object(T.a)(1)).subscribe((function(){return t._destroyPopup()}))}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);var n=function(){t._opened&&(t._opened=!1,t.closedStream.emit(),t._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(n)):n()}}},{key:"_openAsDialog",value:function(){var t=this;this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(yt,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:["cdk-overlay-dark-backdrop",this._backdropHarnessClass],width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!0,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe((function(){return t.close()})),this._forwardContentValues(this._dialogRef.componentInstance)}},{key:"_openAsPopup",value:function(){var t=this,e=new s.d(yt,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(e),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(Object(T.a)(1)).subscribe((function(){t._popupRef.updatePosition()}))}},{key:"_forwardContentValues",value:function(t){t.datepicker=this,t.color=this.color}},{key:"_createPopup",value:function(){var t=this,e=this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new r.d({positionStrategy:this._setConnectedPositions(e),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),Object(y.a)(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(Object(E.a)((function(e){return e.keyCode===O.f||t._datepickerInput&&e.altKey&&e.keyCode===O.o})))).subscribe((function(e){e&&e.preventDefault(),t.close()}))}},{key:"_destroyPopup",value:function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)}},{key:"_setConnectedPositions",value:function(t){var e="end"===this.xPosition?"end":"start",n="start"===e?"end":"start",i="above"===this.yPosition?"bottom":"top",r="top"===i?"bottom":"top";return t.withPositions([{originX:e,originY:r,overlayX:e,overlayY:i},{originX:e,originY:i,overlayX:e,overlayY:r},{originX:n,originY:r,overlayX:n,overlayY:i},{originX:n,originY:i,overlayX:n,overlayY:r}])}},{key:"startAt",get:function(){return this._startAt||(this._datepickerInput?this._datepickerInput.getStartValue():null)},set:function(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}},{key:"color",get:function(){return this._color||(this._datepickerInput?this._datepickerInput.getThemePalette():void 0)},set:function(t){this._color=t}},{key:"touchUi",get:function(){return this._touchUi},set:function(t){this._touchUi=Object(x.c)(t)}},{key:"disabled",get:function(){return void 0===this._disabled&&this._datepickerInput?this._datepickerInput.disabled:!!this._disabled},set:function(t){var e=Object(x.c)(t);e!==this._disabled&&(this._disabled=e,this._stateChanges.next(void 0))}},{key:"opened",get:function(){return this._opened},set:function(t){Object(x.c)(t)?this.open():this.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Ob(p.b),d.Ob(r.c),d.Ob(d.B),d.Ob(d.R),d.Ob(gt),d.Ob(g.c,8),d.Ob(k.b,8),d.Ob(u.d,8),d.Ob(nt))},t.\u0275dir=d.Jb({type:t,inputs:{startView:"startView",xPosition:"xPosition",yPosition:"yPosition",startAt:"startAt",color:"color",touchUi:"touchUi",disabled:"disabled",opened:"opened",calendarHeaderComponent:"calendarHeaderComponent",panelClass:"panelClass",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",openedStream:"opened",closedStream:"closed"},features:[d.Ab]}),t}(),Ot=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(_t);return t.\u0275fac=function(e){return kt(e||t)},t.\u0275cmp=d.Ib({type:t,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[d.Bb([rt]),d.zb],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t}(),kt=d.Wb(Ot),wt=function t(e,n){C(this,t),this.target=e,this.targetElement=n,this.value=this.target.value},Ct=function(){var t=function(){function t(e,n,i){var r=this;C(this,t),this._elementRef=e,this._dateAdapter=n,this._dateFormats=i,this.dateChange=new d.o,this.dateInput=new d.o,this._valueChange=new d.o,this._stateChanges=new m.b,this._onTouched=function(){},this._validatorOnChange=function(){},this._cvaOnChange=function(){},this._valueChangesSubscription=v.a.EMPTY,this._localeSubscription=v.a.EMPTY,this._parseValidator=function(){return r._lastValueValid?null:{matDatepickerParse:{text:r._elementRef.nativeElement.value}}},this._filterValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getDateFilter();return n&&e&&!n(e)?{matDatepickerFilter:!0}:null},this._minValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getMinDate();return!n||!e||r._dateAdapter.compareDate(n,e)<=0?null:{matDatepickerMin:{min:n,actual:e}}},this._maxValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getMaxDate();return!n||!e||r._dateAdapter.compareDate(n,e)>=0?null:{matDatepickerMax:{max:n,actual:e}}},this._lastValueValid=!1,this._localeSubscription=n.localeChanges.subscribe((function(){r.value=r.value}))}return w(t,[{key:"_getValidators",value:function(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}},{key:"_registerModel",value:function(t){var e=this;this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe((function(t){if(t.source!==e){var n=e._getValueFromModel(t.selection);e._lastValueValid=e._isValidValue(n),e._cvaOnChange(n),e._onTouched(),e._formatValue(n),e._canEmitChangeEvent(t)&&(e.dateInput.emit(new wt(e,e._elementRef.nativeElement)),e.dateChange.emit(new wt(e,e._elementRef.nativeElement))),e._outsideValueChanged&&e._outsideValueChanged()}}))}},{key:"ngAfterViewInit",value:function(){this._isInitialized=!0}},{key:"ngOnChanges",value:function(){this._stateChanges.next(void 0)}},{key:"ngOnDestroy",value:function(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this._stateChanges.complete()}},{key:"registerOnValidatorChange",value:function(t){this._validatorOnChange=t}},{key:"validate",value:function(t){return this._validator?this._validator(t):null}},{key:"writeValue",value:function(t){this.value=t}},{key:"registerOnChange",value:function(t){this._cvaOnChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t}},{key:"_onKeydown",value:function(t){t.altKey&&t.keyCode===O.c&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),t.preventDefault())}},{key:"_onInput",value:function(t){var e=this._lastValueValid,n=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(n),n=this._dateAdapter.getValidDateOrNull(n),this._dateAdapter.sameDate(n,this.value)?(t&&!this.value&&this._cvaOnChange(n),e!==this._lastValueValid&&this._validatorOnChange()):(this._assignValue(n),this._cvaOnChange(n),this._valueChange.emit(n),this.dateInput.emit(new wt(this,this._elementRef.nativeElement)))}},{key:"_onChange",value:function(){this.dateChange.emit(new wt(this,this._elementRef.nativeElement))}},{key:"_onBlur",value:function(){this.value&&this._formatValue(this.value),this._onTouched()}},{key:"_formatValue",value:function(t){this._elementRef.nativeElement.value=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):""}},{key:"_assignValue",value:function(t){this._model?(this._assignValueToModel(t),this._pendingValue=null):this._pendingValue=t}},{key:"_isValidValue",value:function(t){return!t||this._dateAdapter.isValid(t)}},{key:"_parentDisabled",value:function(){return!1}},{key:"value",get:function(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue},set:function(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=this._isValidValue(t),t=this._dateAdapter.getValidDateOrNull(t);var e=this.value;this._assignValue(t),this._formatValue(t),this._dateAdapter.sameDate(e,t)||this._valueChange.emit(t)}},{key:"disabled",get:function(){return!!this._disabled||this._parentDisabled()},set:function(t){var e=Object(x.c)(t),n=this._elementRef.nativeElement;this._disabled!==e&&(this._disabled=e,this._stateChanges.next(void 0)),e&&this._isInitialized&&n.blur&&n.blur()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Ob(d.l),d.Ob(g.c,8),d.Ob(g.e,8))},t.\u0275dir=d.Jb({type:t,inputs:{value:"value",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[d.Ab]}),t}(),Tt={provide:A.m,useExisting:Object(d.V)((function(){return Et})),multi:!0},St={provide:A.l,useExisting:Object(d.V)((function(){return Et})),multi:!0},Et=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,a){var s,c;return C(this,n),(c=e.call(this,t,i,r))._formField=a,c._validator=A.x.compose(o((s=l(c),h(n.prototype)),"_getValidators",s).call(s)),c}return w(n,[{key:"getConnectedOverlayOrigin",value:function(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}},{key:"getThemePalette",value:function(){return this._formField?this._formField.color:void 0}},{key:"getStartValue",value:function(){return this.value}},{key:"getPopupConnectionElementRef",value:function(){return this.getConnectedOverlayOrigin()}},{key:"_openPopup",value:function(){this._datepicker&&this._datepicker.open()}},{key:"_getValueFromModel",value:function(t){return t}},{key:"_assignValueToModel",value:function(t){this._model&&this._model.updateSelection(t,this)}},{key:"_getMinDate",value:function(){return this._min}},{key:"_getMaxDate",value:function(){return this._max}},{key:"_getDateFilter",value:function(){return this._dateFilter}},{key:"_canEmitChangeEvent",value:function(){return!0}},{key:"matDatepicker",set:function(t){t&&(this._datepicker=t,this._registerModel(t._registerInput(this)))}},{key:"min",get:function(){return this._min},set:function(t){this._min=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()}},{key:"max",get:function(){return this._max},set:function(t){this._max=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()}},{key:"dateFilter",get:function(){return this._dateFilter},set:function(t){this._dateFilter=t,this._validatorOnChange()}}]),n}(Ct);return t.\u0275fac=function(e){return new(e||t)(d.Ob(d.l),d.Ob(g.c,8),d.Ob(g.e,8),d.Ob(I.a,8))},t.\u0275dir=d.Jb({type:t,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(t,e){1&t&&d.bc("input",(function(t){return e._onInput(t.target.value)}))("change",(function(){return e._onChange()}))("blur",(function(){return e._onBlur()}))("keydown",(function(t){return e._onKeydown(t)})),2&t&&(d.Xb("disabled",e.disabled),d.Db("aria-haspopup",e._datepicker?"dialog":null)("aria-owns",(null==e._datepicker?null:e._datepicker.opened)&&e._datepicker.id||null)("min",e.min?e._dateAdapter.toIso8601(e.min):null)("max",e.max?e._dateAdapter.toIso8601(e.max):null)("data-mat-calendar",e._datepicker?e._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:["matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],features:[d.Bb([Tt,St,{provide:M.a,useExisting:t}]),d.zb]}),t}(),xt=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=d.Jb({type:t,selectors:[["","matDatepickerToggleIcon",""]]}),t}(),Pt=function(){var t=function(){function t(e,n,i){C(this,t),this._intl=e,this._changeDetectorRef=n,this._stateChanges=v.a.EMPTY;var r=Number(i);this.tabIndex=r||0===r?r:null}return w(t,[{key:"ngOnChanges",value:function(t){t.datepicker&&this._watchStateChanges()}},{key:"ngOnDestroy",value:function(){this._stateChanges.unsubscribe()}},{key:"ngAfterContentInit",value:function(){this._watchStateChanges()}},{key:"_open",value:function(t){this.datepicker&&!this.disabled&&(this.datepicker.open(),t.stopPropagation())}},{key:"_watchStateChanges",value:function(){var t=this,e=this.datepicker?this.datepicker._stateChanges:Object(_.a)(),n=this.datepicker&&this.datepicker._datepickerInput?this.datepicker._datepickerInput._stateChanges:Object(_.a)(),i=this.datepicker?Object(y.a)(this.datepicker.openedStream,this.datepicker.closedStream):Object(_.a)();this._stateChanges.unsubscribe(),this._stateChanges=Object(y.a)(this._intl.changes,e,n,i).subscribe((function(){return t._changeDetectorRef.markForCheck()}))}},{key:"disabled",get:function(){return void 0===this._disabled&&this.datepicker?this.datepicker.disabled:!!this._disabled},set:function(t){this._disabled=Object(x.c)(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Ob(G),d.Ob(d.h),d.Zb("tabindex"))},t.\u0275cmp=d.Ib({type:t,selectors:[["mat-datepicker-toggle"]],contentQueries:function(t,e,n){var i;1&t&&d.Hb(n,xt,!0),2&t&&d.zc(i=d.cc())&&(e._customIcon=i.first)},viewQuery:function(t,e){var n;1&t&&d.Wc(q,!0),2&t&&d.zc(n=d.cc())&&(e._button=n.first)},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(t,e){1&t&&d.bc("focus",(function(){return e._button.focus()})),2&t&&(d.Db("tabindex",e.disabled?null:-1)("data-mat-calendar",e.datepicker?e.datepicker.id:null),d.Gb("mat-datepicker-toggle-active",e.datepicker&&e.datepicker.opened)("mat-accent",e.datepicker&&"accent"===e.datepicker.color)("mat-warn",e.datepicker&&"warn"===e.datepicker.color))},inputs:{tabIndex:"tabIndex",disabled:"disabled",datepicker:["for","datepicker"],disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],features:[d.Ab],ngContentSelectors:W,decls:4,vars:6,consts:[["mat-icon-button","","type","button",3,"disabled","disableRipple","click"],["button",""],["class","mat-datepicker-toggle-default-icon","viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",4,"ngIf"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(t,e){1&t&&(d.lc(Q),d.Ub(0,"button",0,1),d.bc("click",(function(t){return e._open(t)})),d.Oc(2,$,2,0,"svg",2),d.kc(3),d.Tb()),2&t&&(d.mc("disabled",e.disabled)("disableRipple",e.disableRipple),d.Db("aria-haspopup",e.datepicker?"dialog":null)("aria-label",e._intl.openCalendarLabel)("tabindex",e.disabled?-1:e.tabIndex),d.Cb(2),d.mc("ngIf",!e._customIcon))},directives:[f.b,u.n],styles:[".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),t}(),At=function(){var t=function t(){C(this,t)};return t.\u0275mod=d.Mb({type:t}),t.\u0275inj=d.Lb({factory:function(e){return new(e||t)},providers:[G,mt],imports:[[u.c,f.c,p.c,r.f,i.a,s.g],b.c]}),t}()},"87BI":function(t,e,n){"use strict";n.r(e),n.d(e,"FiatDepositDetailsComponent",(function(){return O}));var i=n("zqNl"),r=n("J/3c"),o=n("lE9u"),a=n("kZht"),s=n("rfPA"),c=n("bBQR"),u=n("An66"),l=n("yPvj"),d=n("anSm"),h=n("aDqW"),f=n("1eaT"),p=n("scAs"),b=n("B6Vo"),g=n("YC1o"),m=n("NxuZ"),v=n("7J2L");function y(t,e){if(1&t&&(a.Sb(0),a.Ub(1,"section"),a.Ub(2,"div",3),a.Pb(3,"market-icon",4),a.Ub(4,"p",5),a.Qc(5,"DIALOG.FIAT_DEPOSIT.DESCRIPTION"),a.Tb(),a.Tb(),a.Ub(6,"nutritional-info"),a.Ub(7,"span"),a.Qc(8),a.gc(9,"translate"),a.Tb(),a.Ub(10,"span"),a.Qc(11),a.Tb(),a.Tb(),a.Ub(12,"nutritional-info"),a.Ub(13,"span"),a.Qc(14),a.gc(15,"translate"),a.Tb(),a.Ub(16,"span"),a.Qc(17),a.Tb(),a.Tb(),a.Ub(18,"nutritional-info"),a.Ub(19,"span"),a.Qc(20),a.gc(21,"translate"),a.Tb(),a.Ub(22,"span"),a.Qc(23),a.Tb(),a.Tb(),a.Ub(24,"nutritional-info"),a.Ub(25,"span"),a.Qc(26),a.gc(27,"translate"),a.Tb(),a.Ub(28,"span"),a.Qc(29),a.Tb(),a.Tb(),a.Ub(30,"nutritional-info"),a.Ub(31,"span"),a.Qc(32),a.gc(33,"translate"),a.Tb(),a.Ub(34,"span"),a.Qc(35),a.Tb(),a.Tb(),a.Ub(36,"nutritional-info"),a.Ub(37,"span"),a.Qc(38),a.gc(39,"translate"),a.Tb(),a.Ub(40,"span"),a.Qc(41),a.Tb(),a.Tb(),a.Ub(42,"nutritional-info"),a.Ub(43,"span"),a.Qc(44),a.gc(45,"translate"),a.Tb(),a.Ub(46,"span"),a.Qc(47),a.Tb(),a.Tb(),a.Ub(48,"nutritional-info"),a.Ub(49,"span"),a.Qc(50),a.gc(51,"translate"),a.Tb(),a.Ub(52,"span",6),a.Pb(53,"fa-icon",7),a.Qc(54),a.Tb(),a.Tb(),a.Ub(55,"p",8),a.Pb(56,"fa-icon",9),a.Qc(57),a.gc(58,"translate"),a.Tb(),a.Tb(),a.Rb()),2&t){var n=e.ngIf;a.Cb(3),a.mc("base","eur"),a.Cb(5),a.Rc(a.hc(9,19,"LABEL.BENEFICIARY_NAME")),a.Cb(3),a.Sc(" ",n.beneficiaryName," "),a.Cb(3),a.Rc(a.hc(15,21,"LABEL.ACCOUNT_NUMBER")),a.Cb(3),a.Sc(" ",n.accountNumber," "),a.Cb(3),a.Rc(a.hc(21,23,"LABEL.SORT_CODE")),a.Cb(3),a.Sc(" ",n.sortCode," "),a.Cb(3),a.Rc(a.hc(27,25,"LABEL.IBAN")),a.Cb(3),a.Sc(" ",n.iban," "),a.Cb(3),a.Rc(a.hc(33,27,"LABEL.BIC_SWIFT")),a.Cb(3),a.Sc(" ",n.bicSwift," "),a.Cb(3),a.Rc(a.hc(39,29,"LABEL.ADDRESS")),a.Cb(3),a.Sc(" ",n.address," "),a.Cb(3),a.Rc(a.hc(45,31,"LABEL.CURRENCY_UNIT")),a.Cb(3),a.Sc(" ",n.currencyUnit," "),a.Cb(3),a.Rc(a.hc(51,33,"LABEL.DEPOSIT_REF")),a.Cb(2),a.mc("clipboard",n.depositReference),a.Cb(2),a.Sc(" ",n.depositReference," "),a.Cb(3),a.Sc(" ",a.hc(58,35,"DIALOG.FIAT_DEPOSIT.REFERENCE_WARNING")," ")}}function _(t,e){1&t&&a.Pb(0,"kraken-loading")}var O=function(){var t=function(){function t(e){C(this,t),this.store=e,this.fiatDepositAddress$=this.store.pipe(Object(i.m)(r.c))}return w(t,[{key:"ngOnInit",value:function(){this.store.dispatch(Object(o.k)())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(i.b))},t.\u0275cmp=a.Ib({type:t,selectors:[["fiat-deposit-details"]],decls:5,vars:4,consts:[["heading","HEADING.DEPOSIT_DETAILS"],[4,"ngIf","ngIfElse"],["loading",""],[1,"header"],[3,"base"],["body","","translate",""],["bold","","sbTooltip","TOOLTIP.COPY_REFERENCE",1,"global__text--accent","copy-ref",3,"clipboard"],["icon","copy","size","lg"],["body","",1,"global__text--warn"],["icon","warning","size","2x",1,"warning-ref"]],template:function(t,e){if(1&t&&(a.Ub(0,"pro-dialog",0),a.Oc(1,y,59,37,"ng-container",1),a.gc(2,"async"),a.Tb(),a.Oc(3,_,1,0,"ng-template",null,2,a.Pc)),2&t){var n=a.Ac(4);a.Cb(1),a.mc("ngIf",a.hc(2,2,e.fiatDepositAddress$))("ngIfElse",n)}},directives:[s.a,c.a,u.n,l.a,d.a,h.a,f.a,p.a,b.a,g.a,m.b,v.a],pipes:[u.b,h.d],styles:[".header[_ngcontent-%COMP%]{text-align:center;margin-bottom:var(--spacing)}.header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:var(--spacing-l) 0}.header[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{font-size:3em}.warning-ref[_ngcontent-%COMP%]{margin-right:var(--spacing-s);vertical-align:middle}.copy-ref[_ngcontent-%COMP%]{cursor:pointer}"],changeDetection:0}),t}()},"8AhB":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("q+cW"),r=n("vI0g"),o=n("oCyE"),a=n("pAln"),s=n("Rby2"),c=n("mQN4"),u=n("wjKt"),l=n("sPys");e.default=function(){function t(){this.rsDecoder=new o.default(r.default.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(i.default.parseFromBooleanArray(t),e)},t.prototype.decodeBitMatrix=function(t,e){var n=new a.default(t),i=null;try{return this.decodeBitMatrixParser(n,e)}catch(o){i=o}try{n.remask(),n.setMirror(!0),n.readVersion(),n.readFormatInformation(),n.mirror();var r=this.decodeBitMatrixParser(n,e);return r.setOther(new s.default(!0)),r}catch(o){if(null!==i)throw i;throw o}},t.prototype.decodeBitMatrixParser=function(t,e){for(var n=t.readVersion(),i=t.readFormatInformation().getErrorCorrectionLevel(),r=t.readCodewords(),o=c.default.getDataBlocks(r,n,i),a=0,s=0,l=o;s0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,s=-1;return Object(o.a)(e)?s=Number(e)<1?1:Number(e):Object(a.a)(e)&&(n=e),Object(a.a)(n)||(n=r.a),new i.a((function(e){var i=Object(o.a)(t)?t:+t-n.now();return n.schedule(c,i,{index:0,period:s,subscriber:e})}))}function c(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}},"8spT":function(t,e,n){"use strict";n.d(e,"a",(function(){return E})),n.d(e,"b",(function(){return O})),n.d(e,"c",(function(){return x}));var i=n("kZht"),r=n("pTnX"),o=n("jL3B"),s=n("5XID"),u=n("sBeF"),l=n("3kIJ"),d=n("FxgA"),h=["input"],f=function(){return{enterDuration:150}},p=["*"],b=new i.s("mat-radio-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}}),g=0,m={provide:l.m,useExisting:Object(i.V)((function(){return O})),multi:!0},v=function t(e,n){C(this,t),this.source=e,this.value=n},y=new i.s("MatRadioGroup"),_=function(){var t=function(){function t(e){C(this,t),this._changeDetector=e,this._value=null,this._name="mat-radio-group-"+g++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=function(){},this.onTouched=function(){},this.change=new i.o}return w(t,[{key:"_checkSelectedRadioButton",value:function(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}},{key:"ngAfterContentInit",value:function(){this._isInitialized=!0}},{key:"_touch",value:function(){this.onTouched&&this.onTouched()}},{key:"_updateRadioButtonNames",value:function(){var t=this;this._radios&&this._radios.forEach((function(e){e.name=t.name,e._markForCheck()}))}},{key:"_updateSelectedRadioFromValue",value:function(){var t=this;this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach((function(e){e.checked=t.value===e.value,e.checked&&(t._selected=e)})))}},{key:"_emitChangeEvent",value:function(){this._isInitialized&&this.change.emit(new v(this._selected,this._value))}},{key:"_markRadiosForCheck",value:function(){this._radios&&this._radios.forEach((function(t){return t._markForCheck()}))}},{key:"writeValue",value:function(t){this.value=t,this._changeDetector.markForCheck()}},{key:"registerOnChange",value:function(t){this._controlValueAccessorChangeFn=t}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetector.markForCheck()}},{key:"name",get:function(){return this._name},set:function(t){this._name=t,this._updateRadioButtonNames()}},{key:"labelPosition",get:function(){return this._labelPosition},set:function(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()}},{key:"value",get:function(){return this._value},set:function(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}},{key:"selected",get:function(){return this._selected},set:function(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(s.c)(t),this._markRadiosForCheck()}},{key:"required",get:function(){return this._required},set:function(t){this._required=Object(s.c)(t),this._markRadiosForCheck()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.h))},t.\u0275dir=i.Jb({type:t,inputs:{name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"}}),t}(),O=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(_);return t.\u0275fac=function(e){return k(e||t)},t.\u0275dir=i.Jb({type:t,selectors:[["mat-radio-group"]],contentQueries:function(t,e,n){var r;1&t&&i.Hb(n,E,!0),2&t&&i.zc(r=i.cc())&&(e._radios=r)},hostAttrs:["role","radiogroup",1,"mat-radio-group"],exportAs:["matRadioGroup"],features:[i.Bb([m,{provide:y,useExisting:t}]),i.zb]}),t}(),k=i.Wb(O),T=Object(r.x)(Object(r.B)((function t(e){C(this,t),this._elementRef=e}))),S=function(){var t=function(t){a(n,t);var e=c(n);function n(t,r,o,a,s,c,u){var l;return C(this,n),(l=e.call(this,r))._changeDetector=o,l._focusMonitor=a,l._radioDispatcher=s,l._animationMode=c,l._providerOverride=u,l._uniqueId="mat-radio-"+ ++g,l.id=l._uniqueId,l.change=new i.o,l._checked=!1,l._value=null,l._removeUniqueSelectionListener=function(){},l.radioGroup=t,l._removeUniqueSelectionListener=s.listen((function(t,e){t!==l.id&&e===l.name&&(l.checked=!1)})),l}return w(n,[{key:"focus",value:function(t){this._focusMonitor.focusVia(this._inputElement,"keyboard",t)}},{key:"_markForCheck",value:function(){this._changeDetector.markForCheck()}},{key:"ngOnInit",value:function(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.name=this.radioGroup.name)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){!e&&t.radioGroup&&t.radioGroup._touch()}))}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}},{key:"_emitChangeEvent",value:function(){this.change.emit(new v(this,this._value))}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_onInputClick",value:function(t){t.stopPropagation()}},{key:"_onInputChange",value:function(t){t.stopPropagation();var e=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),e&&this.radioGroup._emitChangeEvent())}},{key:"_setDisabled",value:function(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}},{key:"checked",get:function(){return this._checked},set:function(t){var e=Object(s.c)(t);this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}},{key:"value",get:function(){return this._value},set:function(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}},{key:"labelPosition",get:function(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"},set:function(t){this._labelPosition=t}},{key:"disabled",get:function(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled},set:function(t){this._setDisabled(Object(s.c)(t))}},{key:"required",get:function(){return this._required||this.radioGroup&&this.radioGroup.required},set:function(t){this._required=Object(s.c)(t)}},{key:"color",get:function(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"},set:function(t){this._color=t}},{key:"inputId",get:function(){return(this.id||this._uniqueId)+"-input"}}]),n}(T);return t.\u0275fac=function(e){return new(e||t)(i.Ob(_),i.Ob(i.l),i.Ob(i.h),i.Ob(o.h),i.Ob(u.d),i.Ob(String),i.Ob(void 0))},t.\u0275dir=i.Jb({type:t,viewQuery:function(t,e){var n;1&t&&i.Wc(h,!0),2&t&&i.zc(n=i.cc())&&(e._inputElement=n.first)},inputs:{id:"id",checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{change:"change"},features:[i.zb]}),t}(),E=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a,s,c){return C(this,n),e.call(this,t,i,r,o,a,s,c)}return n}(S);return t.\u0275fac=function(e){return new(e||t)(i.Ob(y,8),i.Ob(i.l),i.Ob(i.h),i.Ob(o.h),i.Ob(u.d),i.Ob(d.a,8),i.Ob(b,8))},t.\u0275cmp=i.Ib({type:t,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(t,e){1&t&&i.bc("focus",(function(){return e._inputElement.nativeElement.focus()})),2&t&&(i.Db("tabindex",-1)("id",e.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),i.Gb("mat-radio-checked",e.checked)("mat-radio-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-primary","primary"===e.color)("mat-accent","accent"===e.color)("mat-warn","warn"===e.color))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[i.zb],ngContentSelectors:p,decls:13,vars:19,consts:[[1,"mat-radio-label"],["label",""],[1,"mat-radio-container"],[1,"mat-radio-outer-circle"],[1,"mat-radio-inner-circle"],["type","radio",1,"mat-radio-input","cdk-visually-hidden",3,"id","checked","disabled","tabIndex","required","change","click"],["input",""],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mat-radio-label-content"],[2,"display","none"]],template:function(t,e){if(1&t&&(i.lc(),i.Ub(0,"label",0,1),i.Ub(2,"div",2),i.Pb(3,"div",3),i.Pb(4,"div",4),i.Ub(5,"input",5,6),i.bc("change",(function(t){return e._onInputChange(t)}))("click",(function(t){return e._onInputClick(t)})),i.Tb(),i.Ub(7,"div",7),i.Pb(8,"div",8),i.Tb(),i.Tb(),i.Ub(9,"div",9),i.Ub(10,"span",10),i.Qc(11,"\xa0"),i.Tb(),i.kc(12),i.Tb(),i.Tb()),2&t){var n=i.Ac(1);i.Db("for",e.inputId),i.Cb(5),i.mc("id",e.inputId)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex)("required",e.required),i.Db("name",e.name)("value",e.value)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-describedby",e.ariaDescribedby),i.Cb(2),i.mc("matRippleTrigger",n)("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",i.qc(18,f)),i.Cb(2),i.Gb("mat-radio-label-before","before"==e.labelPosition)}},directives:[r.r],styles:[".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"],encapsulation:2,changeDetection:0}),t}(),x=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},imports:[[r.s,r.j],r.j]}),t}()},"8vcT":function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.default=((i={})[i.ERROR_CORRECTION=0]="ERROR_CORRECTION",i[i.CHARACTER_SET=1]="CHARACTER_SET",i[i.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",i[i.MIN_SIZE=3]="MIN_SIZE",i[i.MAX_SIZE=4]="MAX_SIZE",i[i.MARGIN=5]="MARGIN",i[i.PDF417_COMPACT=6]="PDF417_COMPACT",i[i.PDF417_COMPACTION=7]="PDF417_COMPACTION",i[i.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",i[i.AZTEC_LAYERS=9]="AZTEC_LAYERS",i[i.QR_VERSION=10]="QR_VERSION",i)},"94ty":function(t,e,n){"use strict";n.d(e,"u",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"f",(function(){return a})),n.d(e,"C",(function(){return s})),n.d(e,"D",(function(){return c})),n.d(e,"l",(function(){return u})),n.d(e,"B",(function(){return l})),n.d(e,"t",(function(){return d})),n.d(e,"i",(function(){return h})),n.d(e,"d",(function(){return f})),n.d(e,"c",(function(){return p})),n.d(e,"b",(function(){return b})),n.d(e,"j",(function(){return g})),n.d(e,"n",(function(){return m})),n.d(e,"y",(function(){return v})),n.d(e,"m",(function(){return y})),n.d(e,"p",(function(){return _})),n.d(e,"k",(function(){return O})),n.d(e,"r",(function(){return k})),n.d(e,"o",(function(){return w})),n.d(e,"e",(function(){return C})),n.d(e,"w",(function(){return T})),n.d(e,"x",(function(){return S})),n.d(e,"A",(function(){return E})),n.d(e,"z",(function(){return x})),n.d(e,"s",(function(){return P})),n.d(e,"v",(function(){return A})),n.d(e,"h",(function(){return I})),n.d(e,"g",(function(){return M})),n.d(e,"q",(function(){return D}));var i=n("zqNl"),r=Object(i.g)("Reset Auth State"),o="Sign In",a=Object(i.g)("Check Session",Object(i.l)()),s=Object(i.g)("Sign Up",Object(i.l)()),c=Object(i.g)("Signed In"),u=Object(i.g)("Demo Sign In",Object(i.l)()),l=Object(i.g)("Sign Out",Object(i.l)()),d=Object(i.g)("Request Reset Password",Object(i.l)()),h=Object(i.g)("Request Reset Confirm",Object(i.l)()),f=Object(i.g)("Change Password",Object(i.l)()),p=Object(i.g)("Activate User",Object(i.l)()),b=Object(i.g)("Activate TOTP Auth",Object(i.l)()),g=Object(i.g)("Deactivate TOTP Auth",Object(i.l)()),m=Object(i.g)("Get Hardware Auth Devices"),v=Object(i.g)("Set Hardware Auth Devices",Object(i.l)()),y=Object(i.g)("Deregister Hardware Auth Devices",Object(i.l)()),_=Object(i.g)("Get Active Sessions"),O=Object(i.g)("Delete Session",Object(i.l)()),k=Object(i.g)("Replenish Session"),w=Object(i.g)("Fetch Account Default Session Length"),C=Object(i.g)("Change Session Length",Object(i.l)()),T=Object(i.g)("Set Active Sessions",Object(i.l)()),S=Object(i.g)("Set Default Session Length",Object(i.l)()),E=Object(i.g)("Set Mobile QR Code",Object(i.l)()),x=Object(i.g)("Set Mobile Confirmation Code",Object(i.l)()),P=Object(i.g)("Request Mobile Token",Object(i.l)()),A=Object(i.g)("Scan Mobile Token",Object(i.l)()),I=Object(i.g)("Confirm Mobile Session",Object(i.l)()),M=Object(i.g)("Check Status Mobile Token",Object(i.l)()),D=Object(i.g)("Password compromised",Object(i.l)())},"98H0":function(t,e,n){"use strict";n.r(e),n.d(e,"PasswordResetConfirmComponent",(function(){return A}));var i=n("D57K"),r=n("3kIJ"),o=n("mcff"),a=n("gxtV"),s=n("zqNl"),c=n("94ty"),u=n("9Ccw"),l=n("bjK4"),d=n("jIqt"),h=n("Ohay"),f=n("kZht"),p=n("rfPA"),b=n("bBQR"),g=n("afE0"),m=n("An66"),v=n("anSm"),y=n("eGwX"),_=n("TzY9"),O=n("hCLc"),k=n("scAs"),T=n("i9Na"),S=n("UDV5"),E=n("aDqW");function x(t,e){1&t&&(f.Ub(0,"div",9),f.Ub(1,"p",10),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Ub(4,"p",11),f.Qc(5),f.gc(6,"translate"),f.Tb(),f.Ub(7,"p",12),f.Pb(8,"markdown",13),f.gc(9,"translate"),f.Tb(),f.Tb()),2&t&&(f.Cb(2),f.Sc(" ",f.hc(3,3,"ERROR.PASSWORD_COMPROMISED")," "),f.Cb(3),f.Sc(" ",f.hc(6,5,"SUPPORT.HAVE_I_BEEN_PWNED")," "),f.Cb(3),f.mc("data",f.hc(9,7,"SUPPORT.PWNED_URL")))}function P(t,e){1&t&&(f.Ub(0,"mat-checkbox",14),f.Qc(1),f.gc(2,"translate"),f.Tb()),2&t&&(f.Cb(1),f.Sc(" ",f.hc(2,1,"FORM.USE_COMPROMISED_PASSWORD_CONFIRM")," "))}var A=function(){var t=function(){function t(e,n,i){C(this,t),this.inputs=e,this.store=n,this.formBuilder=i,this.isPasswordCompromised=!1,this.loading$=this.store.pipe(Object(s.m)(l.m,{filter:c.i.type})),this.passwordCompromised$=this.store.select(u.h)}return w(t,[{key:"ngOnInit",value:function(){var t=this;this.form=this.buildForm(),this.passwordCompromised$.pipe(Object(d.a)(!1),Object(h.a)(),Object(a.b)(this)).subscribe((function(e){var n,i;t.isPasswordCompromised=e,e?null===(i=t.form.get("allowPwnedPassword"))||void 0===i||i.enable():null===(n=t.form.get("allowPwnedPassword"))||void 0===n||n.disable()}))}},{key:"ngOnDestroy",value:function(){this.reset()}},{key:"buildForm",value:function(){return this.formBuilder.group({code:[this.inputs.code],password:["",[r.x.required]],otp:[""],allowPwnedPassword:[!1,[r.x.requiredTrue]]})}},{key:"submitForm",value:function(){var t={code:this.form.value.code,newPassword:this.form.value.password,newPasswordVerify:this.form.value.password,allowPwned:this.isPasswordCompromised,totp:this.form.value.otp?this.form.value.otp:void 0};this.store.dispatch(Object(c.i)(t))}},{key:"updatePassword",value:function(t){this.store.dispatch(Object(c.q)({passwordCompromised:!1})),this.form.get("password").setValue(t)}},{key:"reset",value:function(){var t=this;this.form.reset(),Object.keys(this.form.controls).forEach((function(e){return t.form.get(e).setErrors(null)})),this.store.dispatch(Object(c.q)({passwordCompromised:!1}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(f.Ob(o.a),f.Ob(s.b),f.Ob(r.d))},t.\u0275cmp=f.Ib({type:t,selectors:[["password-reset-confirm"]],decls:15,vars:17,consts:[["heading","DIALOG.RESET_PASSWORD.TITLE",3,"loading"],[1,"password-reset"],["icon","shield-full"],["class","warning",4,"ngIf"],["body","",3,"formGroup","ngSubmit"],[3,"passwordUpdate"],[3,"form"],["class","no-border","formControlName","allowPwnedPassword",4,"ngIf"],["mat-raised-button","","color","positive",3,"disabled"],[1,"warning"],["body","","bold","",1,"global__text--warn"],["body","","bold",""],["body",""],[3,"data"],["formControlName","allowPwnedPassword",1,"no-border"]],template:function(t,e){1&t&&(f.Ub(0,"pro-dialog",0),f.gc(1,"async"),f.Ub(2,"div",1),f.Pb(3,"dialog-badge",2),f.Oc(4,x,10,9,"div",3),f.gc(5,"async"),f.Ub(6,"form",4),f.bc("ngSubmit",(function(){return e.submitForm()})),f.Ub(7,"input-password-confirm",5),f.bc("passwordUpdate",(function(t){return e.updatePassword(t)})),f.Tb(),f.Pb(8,"input-otp-entry",6),f.Oc(9,P,3,3,"mat-checkbox",7),f.gc(10,"async"),f.Ub(11,"button",8),f.gc(12,"async"),f.Qc(13),f.gc(14,"translate"),f.Tb(),f.Tb(),f.Tb(),f.Tb()),2&t&&(f.mc("loading",f.hc(1,7,e.loading$)),f.Cb(4),f.mc("ngIf",f.hc(5,9,e.passwordCompromised$)),f.Cb(2),f.mc("formGroup",e.form),f.Cb(2),f.mc("form",e.form),f.Cb(1),f.mc("ngIf",f.hc(10,11,e.passwordCompromised$)),f.Cb(2),f.mc("disabled",e.form.invalid||f.hc(12,13,e.loading$)),f.Cb(2),f.Sc(" ",f.hc(14,15,"BUTTON.SET_NEW_PASSWORD")," "))},directives:[p.a,b.a,g.a,m.n,r.z,r.p,v.a,r.h,y.a,_.a,O.b,k.a,T.a,S.a,r.o,r.g],pipes:[m.b,E.d],styles:[".password-reset[_ngcontent-%COMP%]{width:40ch;text-align:center}.password-reset[_ngcontent-%COMP%] dialog-badge[_ngcontent-%COMP%]{margin-bottom:var(--spacing-l)}.password-reset[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{border:solid var(--warn-colour);text-align:center;padding:var(--spacing);margin:var(--spacing) 0}.password-reset[_ngcontent-%COMP%] form[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{margin-top:var(--spacing)}.password-reset[_ngcontent-%COMP%] > button[_ngcontent-%COMP%], .password-reset[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.password-reset[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .password-reset[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.password-reset[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:var(--spacing) 0;width:100%}markdown[_ngcontent-%COMP%] a{color:var(--link-colour)}"],changeDetection:0}),t=Object(i.d)([Object(a.a)()],t)}()},"9BXW":function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var i=n("vYTc"),r=n("kZht"),o=n("1etq"),a=n("yPvj"),s=n("1o0v"),c=n("za3o"),u=n("BeMo"),l=n("anSm"),d=n("LbKT"),h=n("An66"),f=n("rUBT"),p=n("aDqW"),b=n("DpwM"),g=n("FUqb");function m(t,e){if(1&t&&r.Pb(0,"div",10),2&t){var n=r.fc();r.Lc("transform","scaleX("+n.ticker.volumeQuote/n.maxVol+")")}}var v=function(){var t=function t(){C(this,t),this.mid=i.j};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Ib({type:t,selectors:[["market-preview-compact"]],inputs:{ticker:"ticker",maxVol:"maxVol"},decls:21,vars:23,consts:[["subheading","",1,"grid-min-1","gap-m","vcenter","symbol"],[3,"pair"],[1,"pair"],["ghost","","capitalize","",1,"maturity"],[3,"market"],["body","",1,"price"],[1,"mid"],[1,"amount"],["pnlZero","",1,"change",3,"pnl"],["class","volprop",3,"transform",4,"ngIf"],[1,"volprop"]],template:function(t,e){1&t&&(r.Ub(0,"h2",0),r.Pb(1,"market-icon",1),r.Ub(2,"div"),r.Ub(3,"div",2),r.Qc(4),r.gc(5,"pair"),r.Tb(),r.Ub(6,"div",3),r.Qc(7),r.gc(8,"translate"),r.gc(9,"maturityMonth"),r.Tb(),r.Tb(),r.Tb(),r.Pb(10,"sparkline",4),r.Ub(11,"div",5),r.Ub(12,"div",6),r.Ub(13,"span",7),r.Qc(14),r.gc(15,"sato"),r.Tb(),r.Tb(),r.Ub(16,"div",8),r.Qc(17),r.gc(18,"change"),r.gc(19,"percent"),r.Tb(),r.Tb(),r.Oc(20,m,1,2,"div",9)),2&t&&(r.Cb(1),r.mc("pair",e.ticker.pair),r.Cb(3),r.Rc(r.hc(5,8,e.ticker.product_id)),r.Cb(3),r.Sc(" ",r.hc(8,10,r.ic(9,12,e.ticker.product_id,"short")||"")," "),r.Cb(3),r.mc("market",e.ticker.product_id),r.Cb(4),r.Rc(r.ic(15,15,e.mid(e.ticker),e.ticker)),r.Cb(2),r.mc("pnl",e.ticker.change/100),r.Cb(1),r.Sc(" ",r.hc(18,18,r.ic(19,20,e.ticker.change/100,"1.2-2"))," "),r.Cb(3),r.mc("ngIf",e.maxVol))},directives:[o.a,a.a,s.a,c.a,u.a,l.a,d.a,h.n],pipes:[f.e,p.d,f.d,b.c,g.b,h.u],styles:['[_nghost-%COMP%]{display:grid;grid-template:"symbol spark price" auto "volprop volprop volprop" auto/5fr 4fr 4fr;gap:var(--spacing-s) var(--spacing);align-items:center;padding:var(--spacing-s)}[_nghost-%COMP%]:hover{background-color:rgba(var(--text-colour-rgb),.1);cursor:pointer}.price[_ngcontent-%COMP%], .symbol[_ngcontent-%COMP%], .volprop[_ngcontent-%COMP%], .volume[_ngcontent-%COMP%]{z-index:1}.symbol[_ngcontent-%COMP%]{grid-area:symbol}.symbol[_ngcontent-%COMP%] .pair[_ngcontent-%COMP%]{color:var(--symbol-color,var(--text-colour))}.symbol[_ngcontent-%COMP%] .maturity[_ngcontent-%COMP%]{margin-top:var(--spacing-s);font-size:.8em}.price[_ngcontent-%COMP%]{grid-area:price;text-align:right}.price[_ngcontent-%COMP%] .mid[_ngcontent-%COMP%]{margin-bottom:var(--spacing-s)}.price[_ngcontent-%COMP%] .mid[_ngcontent-%COMP%] .amount[_ngcontent-%COMP%]{font-size:1.25em}.volprop[_ngcontent-%COMP%]{grid-area:volprop;height:2px;background-color:var(--b300);transform-origin:bottom left}sparkline[_ngcontent-%COMP%]{grid-area:spark}'],changeDetection:0}),t}()},"9Ccw":function(t,e,n){"use strict";n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return f})),n.d(e,"j",(function(){return p})),n.d(e,"i",(function(){return b})),n.d(e,"f",(function(){return g})),n.d(e,"g",(function(){return m})),n.d(e,"e",(function(){return v})),n.d(e,"h",(function(){return y})),n.d(e,"a",(function(){return _})),n.d(e,"b",(function(){return O}));var i=n("zqNl"),r=n("VmIW"),o=n("9hG1"),a=n("p5wL"),s=n("94ty"),c=n("rxqU"),u={sessions:[],devices:[],tokenLifespan:0,mtrQrCode:Object(r.None)(),mtrConfirmation:Object(r.None)(),passwordCompromised:!1},l=Object(i.i)(u,Object(i.k)(s.u,(function(){return u})),Object(i.k)(s.y,(function(t,e){var n=e.devices;return Object(a.b)(n,t,"devices")})),Object(i.k)(s.w,(function(t,e){var n=e.sessions;return Object(a.b)(n.filter((function(t){return null===t.revokedAt})),t,"sessions")})),Object(i.k)(s.x,(function(t,e){var n=e.lifespan;return Object(a.b)(n,t,"tokenLifespan")})),Object(i.k)(s.A,(function(t,e){var n=e.qr,i=r.Maybe.fromNull(n).map((function(t){return[t,o.DateTime.local()]}));return Object(a.b)(i,t,"mtrQrCode")})),Object(i.k)(s.z,(function(t,e){var n=e.code;return Object(a.b)(r.Maybe.fromNull(n),t,"mtrConfirmation")})),Object(i.k)(s.q,(function(t,e){var n=e.passwordCompromised;return Object(a.b)(n,t,"passwordCompromised")})));function d(t,e){return l(t,e)}var h=Object(i.h)("authentication"),f=Object(i.j)(c.i,(function(t){var e,n;return null!==(n=null===(e=t.summary)||void 0===e?void 0:e.mfa_priority)&&void 0!==n?n:[]})),p=Object(i.j)(h,(function(t){return t.tokenLifespan})),b=Object(i.j)(h,(function(t){return t.sessions})),g=Object(i.j)(h,(function(t){return t.devices})),m=Object(i.j)(h,(function(t){return t.mtrQrCode})),v=Object(i.j)(h,(function(t){return t.mtrConfirmation})),y=Object(i.j)(h,(function(t){return t.passwordCompromised})),_=Object(i.j)(f,(function(t){return t.length>0})),O=Object(i.j)(f,_,(function(t){return t.includes("totp")}));Object(i.j)(f,(function(t){return t.includes("fido2")}))},"9GlW":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){function t(t,e,n,i,r,o,a,s,c){this.a11=t,this.a21=e,this.a31=n,this.a12=i,this.a22=r,this.a32=o,this.a13=a,this.a23=s,this.a33=c}return t.quadrilateralToQuadrilateral=function(e,n,i,r,o,a,s,c,u,l,d,h,f,p,b,g){var m=t.quadrilateralToSquare(e,n,i,r,o,a,s,c);return t.squareToQuadrilateral(u,l,d,h,f,p,b,g).times(m)},t.prototype.transformPoints=function(t){for(var e=t.length,n=this.a11,i=this.a12,r=this.a13,o=this.a21,a=this.a22,s=this.a23,c=this.a31,u=this.a32,l=this.a33,d=0;d=0}(e)||(t[e.config.name]=e)},b=function(t,e){return(b=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 g(t,e){function n(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function m(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(e){o(e)}}function s(t){try{c(i.throw(t))}catch(e){o(e)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function v(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=0?n.split(",")[1]:n},[4,this.dbRequest("put",[l])];case 5:return d.sent(),[2,{uri:l.path}]}}))}))},e.prototype.appendFile=function(t){return m(this,void 0,void 0,(function(){var e,n,i,r,o,a,s,c;return v(this,(function(u){switch(u.label){case 0:return e=this.getPath(t.directory,t.path),n=t.data,i=e.substr(0,e.lastIndexOf("/")),r=Date.now(),o=r,[4,this.dbRequest("get",[e])];case 1:if((a=u.sent())&&"directory"===a.type)throw"The supplied path is a directory.";return[4,this.dbRequest("get",[i])];case 2:return void 0!==u.sent()?[3,4]:(s=i.indexOf("/",1),c=-1!==s?i.substr(s):"/",[4,this.mkdir({path:c,directory:t.directory,recursive:!0})]);case 3:u.sent(),u.label=4;case 4:return void 0!==a&&(n=a.content+n,o=a.ctime),[4,this.dbRequest("put",[{path:e,folder:i,type:"file",size:n.length,ctime:o,mtime:r,content:n}])];case 5:return u.sent(),[2,{}]}}))}))},e.prototype.deleteFile=function(t){return m(this,void 0,void 0,(function(){var e;return v(this,(function(n){switch(n.label){case 0:return e=this.getPath(t.directory,t.path),[4,this.dbRequest("get",[e])];case 1:if(void 0===n.sent())throw Error("File does not exist.");return[4,this.dbIndexRequest("by_folder","getAllKeys",[IDBKeyRange.only(e)])];case 2:if(0!==n.sent().length)throw Error("Folder is not empty.");return[4,this.dbRequest("delete",[e])];case 3:return n.sent(),[2,{}]}}))}))},e.prototype.mkdir=function(t){return m(this,void 0,void 0,(function(){var e,n,i,r,o,a,s,c;return v(this,(function(u){switch(u.label){case 0:return e=this.getPath(t.directory,t.path),n=t.recursive,i=e.substr(0,e.lastIndexOf("/")),r=(e.match(/\//g)||[]).length,[4,this.dbRequest("get",[i])];case 1:return o=u.sent(),[4,this.dbRequest("get",[e])];case 2:if(a=u.sent(),1===r)throw Error("Cannot create Root directory");if(void 0!==a)throw Error("Current directory does already exist.");if(!n&&2!==r&&void 0===o)throw Error("Parent directory must exist");return n&&2!==r&&void 0===o?(s=i.substr(i.indexOf("/",1)),[4,this.mkdir({path:s,directory:t.directory,recursive:n})]):[3,4];case 3:u.sent(),u.label=4;case 4:return c=Date.now(),[4,this.dbRequest("put",[{path:e,folder:i,type:"directory",size:0,ctime:c,mtime:c}])];case 5:return u.sent(),[2,{}]}}))}))},e.prototype.rmdir=function(t){return m(this,void 0,void 0,(function(){var e,n,i,r,o,a,s,c,u;return v(this,(function(l){switch(l.label){case 0:return i=t.recursive,r=this.getPath(n=t.directory,e=t.path),[4,this.dbRequest("get",[r])];case 1:if(void 0===(o=l.sent()))throw Error("Folder does not exist.");if("directory"!==o.type)throw Error("Requested path is not a directory");return[4,this.readdir({path:e,directory:n})];case 2:if(0!==(a=l.sent()).files.length&&!i)throw Error("Folder is not empty");s=0,c=a.files,l.label=3;case 3:return s0?[4,this.stat({path:l,directory:o})]:[3,5];case 4:if("directory"!==O.sent().type)throw new Error("Parent directory of the to path is a file");O.label=5;case 5:return[3,6];case 6:if(c&&"directory"===c.type)throw new Error("Cannot overwrite a directory with a file");return[4,this.stat({path:i,directory:r})];case 7:switch(d=O.sent(),h=function(t,e,n){return m(_,void 0,void 0,(function(){var i,r;return v(this,(function(a){switch(a.label){case 0:return i=this.getPath(o,t),[4,this.dbRequest("get",[i])];case 1:return(r=a.sent()).ctime=e,r.mtime=n,[4,this.dbRequest("put",[r])];case 2:return a.sent(),[2]}}))}))},d.type){case"file":return[3,8];case"directory":return[3,15]}return[3,28];case 8:return[4,this.readFile({path:i,directory:r})];case 9:return f=O.sent(),e?[4,this.deleteFile({path:i,directory:r})]:[3,11];case 10:O.sent(),O.label=11;case 11:return[4,this.writeFile({path:n,directory:o,data:f.data})];case 12:return O.sent(),e?[4,h(n,d.ctime,d.mtime)]:[3,14];case 13:O.sent(),O.label=14;case 14:return[2,{}];case 15:if(c)throw Error("Cannot move a directory over an existing object");O.label=16;case 16:return O.trys.push([16,20,,21]),[4,this.mkdir({path:n,directory:o,recursive:!1})];case 17:return O.sent(),e?[4,h(n,d.ctime,d.mtime)]:[3,19];case 18:O.sent(),O.label=19;case 19:return[3,21];case 20:return O.sent(),[3,21];case 21:return[4,this.readdir({path:i,directory:r})];case 22:p=O.sent().files,b=0,g=p,O.label=23;case 23:return bt.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[e++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(e=t[Symbol.iterator]()).next.bind(e)}Object.defineProperty(e,"__esModule",{value:!0});var f=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e}(l(Error)),p=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return o(e,t),e}(f),b=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return o(e,t),e}(f),g=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return o(e,t),e}(f),m=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e}(f),v=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return o(e,t),e}(f),y=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e}(f),_=function(t){function e(){return t.call(this,"Zone is an abstract class")||this}return o(e,t),e}(f),O="numeric",k="short",w="long",C={year:O,month:O,day:O},T={year:O,month:k,day:O},S={year:O,month:k,day:O,weekday:k},E={year:O,month:w,day:O},x={year:O,month:w,day:O,weekday:w},P={hour:O,minute:O},A={hour:O,minute:O,second:O},I={hour:O,minute:O,second:O,timeZoneName:k},M={hour:O,minute:O,second:O,timeZoneName:w},D={hour:O,minute:O,hour12:!1},R={hour:O,minute:O,second:O,hour12:!1},j={hour:O,minute:O,second:O,hour12:!1,timeZoneName:k},L={hour:O,minute:O,second:O,hour12:!1,timeZoneName:w},N={year:O,month:O,day:O,hour:O,minute:O},U={year:O,month:O,day:O,hour:O,minute:O,second:O},F={year:O,month:k,day:O,hour:O,minute:O},B={year:O,month:k,day:O,hour:O,minute:O,second:O},z={year:O,month:k,day:O,weekday:k,hour:O,minute:O},V={year:O,month:w,day:O,hour:O,minute:O,timeZoneName:k},H={year:O,month:w,day:O,hour:O,minute:O,second:O,timeZoneName:k},q={year:O,month:w,day:O,weekday:w,hour:O,minute:O,timeZoneName:w},$={year:O,month:w,day:O,weekday:w,hour:O,minute:O,second:O,timeZoneName:w};function Q(t){return void 0===t}function W(t){return"number"==typeof t}function G(t){return"number"==typeof t&&t%1==0}function Y(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(t){return!1}}function K(){return!Q(Intl.DateTimeFormat.prototype.formatToParts)}function Z(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function X(t,e,n){if(0!==t.length)return t.reduce((function(t,i){var r=[e(i),i];return t&&n(t[0],r[0])===t[0]?t:r}),null)[1]}function J(t,e){return e.reduce((function(e,n){return e[n]=t[n],e}),{})}function tt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function et(t,e,n){return G(t)&&t>=e&&t<=n}function nt(t,e){return void 0===e&&(e=2),t.toString().length=0&&(e=new Date(e)).setUTCFullYear(e.getUTCFullYear()-1900),+e}function lt(t){var e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,n=t-1,i=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===e||3===i?53:52}function dt(t){return t>99?t:t>60?1900+t:2e3+t}function ht(t,e,n,i){void 0===i&&(i=null);var r=new Date(t),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);var a=Object.assign({timeZoneName:e},o),s=Y();if(s&&K()){var c=new Intl.DateTimeFormat(n,a).formatToParts(r).find((function(t){return"timezonename"===t.type.toLowerCase()}));return c?c.value:null}if(s){var u=new Intl.DateTimeFormat(n,o).format(r);return new Intl.DateTimeFormat(n,a).format(r).substring(u.length).replace(/^[, \u200e]+/,"")}return null}function ft(t,e){var n=parseInt(t,10);Number.isNaN(n)&&(n=0);var i=parseInt(e,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function pt(t){var e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new y("Invalid unit value "+t);return e}function bt(t,e,n){var i={};for(var r in t)if(tt(t,r)){if(n.indexOf(r)>=0)continue;var o=t[r];if(null==o)continue;i[e(r)]=pt(o)}return i}function gt(t,e){var n=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),r=t>=0?"+":"-";switch(e){case"short":return""+r+nt(n,2)+":"+nt(i,2);case"narrow":return""+r+n+(i>0?":"+i:"");case"techie":return""+r+nt(n,2)+nt(i,2);default:throw new RangeError("Value format "+e+" is out of range for property format")}}function mt(t){return J(t,["hour","minute","second","millisecond"])}var vt=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function yt(t){return JSON.stringify(t,Object.keys(t).sort())}var _t=["January","February","March","April","May","June","July","August","September","October","November","December"],Ot=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],kt=["J","F","M","A","M","J","J","A","S","O","N","D"];function wt(t){switch(t){case"narrow":return kt;case"short":return Ot;case"long":return _t;case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Ct=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Tt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],St=["M","T","W","T","F","S","S"];function Et(t){switch(t){case"narrow":return St;case"short":return Tt;case"long":return Ct;case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var xt=["AM","PM"],Pt=["Before Christ","Anno Domini"],At=["BC","AD"],It=["B","A"];function Mt(t){switch(t){case"narrow":return It;case"short":return At;case"long":return Pt;default:return null}}function Dt(t,e){for(var n,i="",r=h(t);!(n=r()).done;){var o=n.value;i+=o.literal?o.val:e(o.val)}return i}var Rt={D:C,DD:T,DDD:E,DDDD:x,t:P,tt:A,ttt:I,tttt:M,T:D,TT:R,TTT:j,TTTT:L,f:N,ff:F,fff:V,ffff:q,F:U,FF:B,FFF:H,FFFF:$},jt=function(){function t(t,e){this.opts=e,this.loc=t,this.systemLoc=null}t.create=function(e,n){return void 0===n&&(n={}),new t(e,n)},t.parseFormat=function(t){for(var e=null,n="",i=!1,r=[],o=0;o0&&r.push({literal:i,val:n}),e=null,n="",i=!i):i||a===e?n+=a:(n.length>0&&r.push({literal:!1,val:n}),n=a,e=a)}return n.length>0&&r.push({literal:i,val:n}),r},t.macroTokenToFormatOpts=function(t){return Rt[t]};var e=t.prototype;return e.formatWithSystemDefault=function(t,e){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,Object.assign({},this.opts,e)).format()},e.formatDateTime=function(t,e){return void 0===e&&(e={}),this.loc.dtFormatter(t,Object.assign({},this.opts,e)).format()},e.formatDateTimeParts=function(t,e){return void 0===e&&(e={}),this.loc.dtFormatter(t,Object.assign({},this.opts,e)).formatToParts()},e.resolvedOptions=function(t,e){return void 0===e&&(e={}),this.loc.dtFormatter(t,Object.assign({},this.opts,e)).resolvedOptions()},e.num=function(t,e){if(void 0===e&&(e=0),this.opts.forceSimple)return nt(t,e);var n=Object.assign({},this.opts);return e>0&&(n.padTo=e),this.loc.numberFormatter(n).format(t)},e.formatDateTimeFromString=function(e,n){var i=this,r="en"===this.loc.listingMode(),o=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&K(),a=function(t,n){return i.loc.extract(e,t,n)},s=function(t){return e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):""},c=function(t,n){return r?function(t,e){return wt(e)[t.month-1]}(e,t):a(n?{month:t}:{month:t,day:"numeric"},"month")},u=function(t,n){return r?function(t,e){return Et(e)[t.weekday-1]}(e,t):a(n?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday")},l=function(t){return r?function(t,e){return Mt(e)[t.year<0?0:1]}(e,t):a({era:t},"era")};return Dt(t.parseFormat(n),(function(n){switch(n){case"S":return i.num(e.millisecond);case"u":case"SSS":return i.num(e.millisecond,3);case"s":return i.num(e.second);case"ss":return i.num(e.second,2);case"m":return i.num(e.minute);case"mm":return i.num(e.minute,2);case"h":return i.num(e.hour%12==0?12:e.hour%12);case"hh":return i.num(e.hour%12==0?12:e.hour%12,2);case"H":return i.num(e.hour);case"HH":return i.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:i.opts.allowZ});case"ZZ":return s({format:"short",allowZ:i.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:i.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:i.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:i.loc.locale});case"z":return e.zoneName;case"a":return r?function(t){return xt[t.hour<12?0:1]}(e):a({hour:"numeric",hour12:!0},"dayperiod");case"d":return o?a({day:"numeric"},"day"):i.num(e.day);case"dd":return o?a({day:"2-digit"},"day"):i.num(e.day,2);case"c":return i.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return i.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return o?a({month:"numeric",day:"numeric"},"month"):i.num(e.month);case"LL":return o?a({month:"2-digit",day:"numeric"},"month"):i.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return o?a({month:"numeric"},"month"):i.num(e.month);case"MM":return o?a({month:"2-digit"},"month"):i.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return o?a({year:"numeric"},"year"):i.num(e.year);case"yy":return o?a({year:"2-digit"},"year"):i.num(e.year.toString().slice(-2),2);case"yyyy":return o?a({year:"numeric"},"year"):i.num(e.year,4);case"yyyyyy":return o?a({year:"numeric"},"year"):i.num(e.year,6);case"G":return l("short");case"GG":return l("long");case"GGGGG":return l("narrow");case"kk":return i.num(e.weekYear.toString().slice(-2),2);case"kkkk":return i.num(e.weekYear,4);case"W":return i.num(e.weekNumber);case"WW":return i.num(e.weekNumber,2);case"o":return i.num(e.ordinal);case"ooo":return i.num(e.ordinal,3);case"q":return i.num(e.quarter);case"qq":return i.num(e.quarter,2);case"X":return i.num(Math.floor(e.ts/1e3));case"x":return i.num(e.ts);default:return function(n){var r=t.macroTokenToFormatOpts(n);return r?i.formatWithSystemDefault(e,r):n}(n)}}))},e.formatDurationFromString=function(e,n){var i,r=this,o=function(t){switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},a=t.parseFormat(n),s=a.reduce((function(t,e){return e.literal?t:t.concat(e.val)}),[]),c=e.shiftTo.apply(e,s.map(o).filter((function(t){return t})));return Dt(a,(i=c,function(t){var e=o(t);return e?r.num(i.get(e),t.length):t}))},t}(),Lt=function(){function t(t,e){this.reason=t,this.explanation=e}return t.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},t}(),Nt=function(){function t(){}var e=t.prototype;return e.offsetName=function(t,e){throw new _},e.formatOffset=function(t,e){throw new _},e.offset=function(t){throw new _},e.equals=function(t){throw new _},r(t,[{key:"type",get:function(){throw new _}},{key:"name",get:function(){throw new _}},{key:"universal",get:function(){throw new _}},{key:"isValid",get:function(){throw new _}}]),t}(),Ut=null,Ft=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.offsetName=function(t,e){return ht(t,e.format,e.locale)},n.formatOffset=function(t,e){return gt(this.offset(t),e)},n.offset=function(t){return-new Date(t).getTimezoneOffset()},n.equals=function(t){return"local"===t.type},r(e,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return Y()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Ut&&(Ut=new e),Ut}}]),e}(Nt),Bt=RegExp("^"+vt.source+"$"),zt={},Vt={year:0,month:1,day:2,hour:3,minute:4,second:5},Ht={},qt=function(t){function e(n){var i;return(i=t.call(this)||this).zoneName=n,i.valid=e.isValidZone(n),i}o(e,t),e.create=function(t){return Ht[t]||(Ht[t]=new e(t)),Ht[t]},e.resetCache=function(){Ht={},zt={}},e.isValidSpecifier=function(t){return!(!t||!t.match(Bt))},e.isValidZone=function(t){try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(e){return!1}},e.parseGMTOffset=function(t){if(t){var e=t.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(e)return-60*parseInt(e[1])}return null};var n=e.prototype;return n.offsetName=function(t,e){return ht(t,e.format,e.locale,this.name)},n.formatOffset=function(t,e){return gt(this.offset(t),e)},n.offset=function(t){var e,n=new Date(t),i=(zt[e=this.name]||(zt[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),zt[e]),r=i.formatToParts?function(t,e){for(var n=t.formatToParts(e),i=[],r=0;r=0?s:1e3+s))/6e4},n.equals=function(t){return"iana"===t.type&&t.name===this.name},r(e,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),e}(Nt),$t=null,Qt=function(t){function e(e){var n;return(n=t.call(this)||this).fixed=e,n}o(e,t),e.instance=function(t){return 0===t?e.utcInstance:new e(t)},e.parseSpecifier=function(t){if(t){var n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new e(ft(n[1],n[2]))}return null},r(e,null,[{key:"utcInstance",get:function(){return null===$t&&($t=new e(0)),$t}}]);var n=e.prototype;return n.offsetName=function(){return this.name},n.formatOffset=function(t,e){return gt(this.fixed,e)},n.offset=function(){return this.fixed},n.equals=function(t){return"fixed"===t.type&&t.fixed===this.fixed},r(e,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+gt(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),e}(Nt),Wt=function(t){function e(e){var n;return(n=t.call(this)||this).zoneName=e,n}o(e,t);var n=e.prototype;return n.offsetName=function(){return null},n.formatOffset=function(){return""},n.offset=function(){return NaN},n.equals=function(){return!1},r(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Nt);function Gt(t,e){var n;if(Q(t)||null===t)return e;if(t instanceof Nt)return t;if("string"==typeof t){var i=t.toLowerCase();return"local"===i?e:"utc"===i||"gmt"===i?Qt.utcInstance:null!=(n=qt.parseGMTOffset(t))?Qt.instance(n):qt.isValidSpecifier(i)?qt.create(t):Qt.parseSpecifier(i)||new Wt(t)}return W(t)?Qt.instance(t):"object"==typeof t&&t.offset&&"number"==typeof t.offset?t:new Wt(t)}var Yt=function(){return Date.now()},Kt=null,Zt=null,Xt=null,Jt=null,te=!1,ee=function(){function t(){}return t.resetCaches=function(){de.resetCache(),qt.resetCache()},r(t,null,[{key:"now",get:function(){return Yt},set:function(t){Yt=t}},{key:"defaultZoneName",get:function(){return t.defaultZone.name},set:function(t){Kt=t?Gt(t):null}},{key:"defaultZone",get:function(){return Kt||Ft.instance}},{key:"defaultLocale",get:function(){return Zt},set:function(t){Zt=t}},{key:"defaultNumberingSystem",get:function(){return Xt},set:function(t){Xt=t}},{key:"defaultOutputCalendar",get:function(){return Jt},set:function(t){Jt=t}},{key:"throwOnInvalid",get:function(){return te},set:function(t){te=t}}]),t}(),ne={};function ie(t,e){void 0===e&&(e={});var n=JSON.stringify([t,e]),i=ne[n];return i||(i=new Intl.DateTimeFormat(t,e),ne[n]=i),i}var re={},oe={},ae=null;function se(t,e,n,i,r){var o=t.listingMode(n);return"error"===o?null:"en"===o?i(e):r(e)}var ce=function(){function t(t,e,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!e&&Y()){var i={useGrouping:!1};n.padTo>0&&(i.minimumIntegerDigits=n.padTo),this.inf=function(t,e){void 0===e&&(e={});var n=JSON.stringify([t,e]),i=re[n];return i||(i=new Intl.NumberFormat(t,e),re[n]=i),i}(t,i)}}return t.prototype.format=function(t){if(this.inf){var e=this.floor?Math.floor(t):t;return this.inf.format(e)}return nt(this.floor?Math.floor(t):ot(t,3),this.padTo)},t}(),ue=function(){function t(t,e,n){var i;if(this.opts=n,this.hasIntl=Y(),t.zone.universal&&this.hasIntl?(i="UTC",this.dt=n.timeZoneName||0===t.offset?t:oi.fromMillis(t.ts+60*t.offset*1e3)):"local"===t.zone.type?this.dt=t:(this.dt=t,i=t.zone.name),this.hasIntl){var r=Object.assign({},this.opts);i&&(r.timeZone=i),this.dtf=ie(e,r)}}var e=t.prototype;return e.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var t=function(t){switch(yt(J(t,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case yt(C):return"M/d/yyyy";case yt(T):return"LLL d, yyyy";case yt(S):return"EEE, LLL d, yyyy";case yt(E):return"LLLL d, yyyy";case yt(x):return"EEEE, LLLL d, yyyy";case yt(P):return"h:mm a";case yt(A):return"h:mm:ss a";case yt(I):case yt(M):return"h:mm a";case yt(D):return"HH:mm";case yt(R):return"HH:mm:ss";case yt(j):case yt(L):return"HH:mm";case yt(N):return"M/d/yyyy, h:mm a";case yt(F):return"LLL d, yyyy, h:mm a";case yt(V):return"LLLL d, yyyy, h:mm a";case yt(q):return"EEEE, LLLL d, yyyy, h:mm a";case yt(U):return"M/d/yyyy, h:mm:ss a";case yt(B):return"LLL d, yyyy, h:mm:ss a";case yt(z):return"EEE, d LLL yyyy, h:mm a";case yt(H):return"LLLL d, yyyy, h:mm:ss a";case yt($):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return"EEEE, LLLL d, yyyy, h:mm a"}}(this.opts),e=de.create("en-US");return jt.create(e).formatDateTimeFromString(this.dt,t)},e.formatToParts=function(){return this.hasIntl&&K()?this.dtf.formatToParts(this.dt.toJSDate()):[]},e.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},t}(),le=function(){function t(t,e,n){this.opts=Object.assign({style:"long"},n),!e&&Z()&&(this.rtf=function(t,e){void 0===e&&(e={});var n=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i=0||(r[n]=t[n]);return r}(e,["base"]),i=JSON.stringify([t,n]),r=oe[i];return r||(r=new Intl.RelativeTimeFormat(t,e),oe[i]=r),r}(t,n))}var e=t.prototype;return e.format=function(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,n,i){void 0===n&&(n="always"),void 0===i&&(i=!1);var r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(t);if("auto"===n&&o){var a="days"===t;switch(e){case 1:return a?"tomorrow":"next "+r[t][0];case-1:return a?"yesterday":"last "+r[t][0];case 0:return a?"today":"this "+r[t][0]}}var s=Object.is(e,-0)||e<0,c=Math.abs(e),u=1===c,l=r[t],d=i?u?l[1]:l[2]||l[1]:u?r[t][0]:t;return s?c+" "+d+" ago":"in "+c+" "+d}(e,t,this.opts.numeric,"long"!==this.opts.style)},e.formatToParts=function(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]},t}(),de=function(){function t(t,e,n,i){var r=function(t){var e=t.indexOf("-u-");if(-1===e)return[t];var n,i=t.substring(0,e);try{n=ie(t).resolvedOptions()}catch(r){n=ie(i).resolvedOptions()}return[i,n.numberingSystem,n.calendar]}(t),o=r[1],a=r[2];this.locale=r[0],this.numberingSystem=e||o||null,this.outputCalendar=n||a||null,this.intl=function(t,e,n){return Y()?n||e?(t+="-u",n&&(t+="-ca-"+n),e&&(t+="-nu-"+e),t):t:[]}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}t.fromOpts=function(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},t.create=function(e,n,i,r){void 0===r&&(r=!1);var o=e||ee.defaultLocale;return new t(o||(r?"en-US":function(){if(ae)return ae;if(Y()){var t=(new Intl.DateTimeFormat).resolvedOptions().locale;return ae=t&&"und"!==t?t:"en-US"}return ae="en-US"}()),n||ee.defaultNumberingSystem,i||ee.defaultOutputCalendar,o)},t.resetCache=function(){ae=null,ne={},re={},oe={}},t.fromObject=function(e){var n=void 0===e?{}:e;return t.create(n.locale,n.numberingSystem,n.outputCalendar)};var e=t.prototype;return e.listingMode=function(t){void 0===t&&(t=!0);var e=Y()&&K(),n=this.isEnglish(),i=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e||n&&i||t?!e||n&&i?"en":"intl":"error"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(t){return void 0===t&&(t={}),this.clone(Object.assign({},t,{defaultToEN:!0}))},e.redefaultToSystem=function(t){return void 0===t&&(t={}),this.clone(Object.assign({},t,{defaultToEN:!1}))},e.months=function(t,e,n){var i=this;return void 0===e&&(e=!1),void 0===n&&(n=!0),se(this,t,n,wt,(function(){var n=e?{month:t,day:"numeric"}:{month:t},r=e?"format":"standalone";return i.monthsCache[r][t]||(i.monthsCache[r][t]=function(t){for(var e=[],n=1;n<=12;n++){var i=oi.utc(2016,n,1);e.push(t(i))}return e}((function(t){return i.extract(t,n,"month")}))),i.monthsCache[r][t]}))},e.weekdays=function(t,e,n){var i=this;return void 0===e&&(e=!1),void 0===n&&(n=!0),se(this,t,n,Et,(function(){var n=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},r=e?"format":"standalone";return i.weekdaysCache[r][t]||(i.weekdaysCache[r][t]=function(t){for(var e=[],n=1;n<=7;n++){var i=oi.utc(2016,11,13+n);e.push(t(i))}return e}((function(t){return i.extract(t,n,"weekday")}))),i.weekdaysCache[r][t]}))},e.meridiems=function(t){var e=this;return void 0===t&&(t=!0),se(this,void 0,t,(function(){return xt}),(function(){if(!e.meridiemCache){var t={hour:"numeric",hour12:!0};e.meridiemCache=[oi.utc(2016,11,13,9),oi.utc(2016,11,13,19)].map((function(n){return e.extract(n,t,"dayperiod")}))}return e.meridiemCache}))},e.eras=function(t,e){var n=this;return void 0===e&&(e=!0),se(this,t,e,Mt,(function(){var e={era:t};return n.eraCache[t]||(n.eraCache[t]=[oi.utc(-40,1,1),oi.utc(2017,1,1)].map((function(t){return n.extract(t,e,"era")}))),n.eraCache[t]}))},e.extract=function(t,e,n){var i=this.dtFormatter(t,e).formatToParts().find((function(t){return t.type.toLowerCase()===n}));return i?i.value:null},e.numberFormatter=function(t){return void 0===t&&(t={}),new ce(this.intl,t.forceSimple||this.fastNumbers,t)},e.dtFormatter=function(t,e){return void 0===e&&(e={}),new ue(t,this.intl,e)},e.relFormatter=function(t){return void 0===t&&(t={}),new le(this.intl,this.isEnglish(),t)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Y()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar},r(t,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=(!this.numberingSystem||"latn"===this.numberingSystem)&&("latn"===this.numberingSystem||!this.locale||this.locale.startsWith("en")||Y()&&"latn"===new Intl.DateTimeFormat(this.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),t}();function he(){for(var t=arguments.length,e=new Array(t),n=0;n1?e-1:0),i=1;i3?Ct.indexOf(t)+1:Tt.indexOf(t)+1),s}var De=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Re(t){var e,n=t[8],i=t[9],r=t[10],o=t[11],a=Me(t[1],t[4],t[3],t[2],t[5],t[6],t[7]);return e=n?Ie[n]:i?0:ft(r,o),[a,new Qt(e)]}var je=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Le=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ne=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ue(t){return[Me(t[1],t[4],t[3],t[2],t[5],t[6],t[7]),Qt.utcInstance]}function Fe(t){return[Me(t[1],t[7],t[2],t[3],t[4],t[5],t[6]),Qt.utcInstance]}var Be=he(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ye),ze=he(/(\d{4})-?W(\d\d)(?:-?(\d))?/,ye),Ve=he(/(\d{4})-?(\d{3})/,ye),He=he(ve),qe=fe(Te,Se,Ee),$e=fe(_e,Se,Ee),Qe=fe(Oe,Se),We=fe(Se,Ee),Ge=he(/(\d{4})-(\d\d)-(\d\d)/,we),Ye=he(ke),Ke=fe(Te,Se,Ee,xe),Ze=fe(Se,Ee,xe),Xe={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Je=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Xe),tn=Object.assign({years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:30.436875/7,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Xe),en=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],nn=en.slice(0).reverse();function rn(t,e,n){void 0===n&&(n=!1);var i={values:n?e.values:Object.assign({},t.values,e.values||{}),loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy};return new an(i)}function on(t,e,n,i,r){var o=t[r][n],a=e[n]/o,s=Math.sign(a)!==Math.sign(i[r])&&0!==i[r]&&Math.abs(a)<=1?function(t){return t<0?Math.floor(t):Math.ceil(t)}(a):Math.trunc(a);i[r]+=s,e[n]-=s*o}var an=function(){function t(t){var e="longterm"===t.conversionAccuracy||!1;this.values=t.values,this.loc=t.loc||de.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=e?tn:Je,this.isLuxonDuration=!0}t.fromMillis=function(e,n){return t.fromObject(Object.assign({milliseconds:e},n))},t.fromObject=function(e){if(null==e||"object"!=typeof e)throw new y("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new t({values:bt(e,t.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:de.fromObject(e),conversionAccuracy:e.conversionAccuracy})},t.fromISO=function(e,n){var i=function(t){return pe(t,[Pe,Ae])}(e)[0];if(i){var r=Object.assign(i,n);return t.fromObject(r)}return t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.invalid=function(e,n){if(void 0===n&&(n=null),!e)throw new y("need to specify a reason the Duration is invalid");var i=e instanceof Lt?e:new Lt(e,n);if(ee.throwOnInvalid)throw new g(i);return new t({invalid:i})},t.normalizeUnit=function(t){var e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t?t.toLowerCase():t];if(!e)throw new v(t);return e},t.isDuration=function(t){return t&&t.isLuxonDuration||!1};var e=t.prototype;return e.toFormat=function(t,e){void 0===e&&(e={});var n=Object.assign({},e,{floor:!1!==e.round&&!1!==e.floor});return this.isValid?jt.create(this.loc,n).formatDurationFromString(this,t):"Invalid Duration"},e.toObject=function(t){if(void 0===t&&(t={}),!this.isValid)return{};var e=Object.assign({},this.values);return t.includeConfig&&(e.conversionAccuracy=this.conversionAccuracy,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e},e.toISO=function(){if(!this.isValid)return null;var t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=ot(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.valueOf=function(){return this.as("milliseconds")},e.plus=function(t){if(!this.isValid)return this;for(var e,n=sn(t),i={},r=h(en);!(e=r()).done;){var o=e.value;(tt(n.values,o)||tt(this.values,o))&&(i[o]=n.get(o)+this.get(o))}return rn(this,{values:i},!0)},e.minus=function(t){if(!this.isValid)return this;var e=sn(t);return this.plus(e.negate())},e.mapUnits=function(t){if(!this.isValid)return this;for(var e={},n=0,i=Object.keys(this.values);n=0){r=l;var d=0;for(var f in s)d+=this.matrix[f][l]*s[f],s[f]=0;W(c[l])&&(d+=c[l]);var p=Math.trunc(d);for(var b in a[l]=p,s[l]=d-p,c)en.indexOf(b)>en.indexOf(l)&&on(this.matrix,c,b,a,l)}else W(c[l])&&(s[l]=c[l])}for(var g in s)0!==s[g]&&(a[r]+=g===r?s[g]:s[g]/this.matrix[r][g]);return rn(this,{values:a},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var t={},e=0,n=Object.keys(this.values);et},e.isBefore=function(t){return!!this.isValid&&this.e<=t},e.contains=function(t){return!!this.isValid&&this.s<=t&&this.e>t},e.set=function(e){var n=void 0===e?{}:e;return this.isValid?t.fromDateTimes(n.start||this.s,n.end||this.e):this},e.splitAt=function(){var e=this;if(!this.isValid)return[];for(var n=arguments.length,i=new Array(n),r=0;r+this.e?this.e:u;a.push(t.fromDateTimes(s,l)),s=l,c+=1}return a},e.splitBy=function(e){var n=sn(e);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var i,r,o=this.s,a=[];o+this.e?this.e:i)),o=r;return a},e.divideEqually=function(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]},e.overlaps=function(t){return this.e>t.s&&this.s=t.e},e.equals=function(t){return!(!this.isValid||!t.isValid)&&this.s.equals(t.s)&&this.e.equals(t.e)},e.intersection=function(e){if(!this.isValid)return this;var n=this.s>e.s?this.s:e.s,i=this.ei?null:t.fromDateTimes(n,i)},e.union=function(e){return this.isValid?t.fromDateTimes(this.se.e?this.e:e.e):this},t.merge=function(t){var e=t.sort((function(t,e){return t.s-e.s})).reduce((function(t,e){var n=t[0],i=t[1];return i?i.overlaps(e)||i.abutsStart(e)?[n,i.union(e)]:[n.concat([i]),e]:[n,e]}),[[],null]),n=e[0],i=e[1];return i&&n.push(i),n},t.xor=function(e){for(var n,i,r=null,o=0,a=[],s=e.map((function(t){return[{time:t.s,type:"s"},{time:t.e,type:"e"}]})),c=h((n=Array.prototype).concat.apply(n,s).sort((function(t,e){return t.time-e.time})));!(i=c()).done;){var u=i.value;1===(o+="s"===u.type?1:-1)?r=u.time:(r&&+r!=+u.time&&a.push(t.fromDateTimes(r,u.time)),r=null)}return t.merge(a)},e.difference=function(){for(var e=this,n=arguments.length,i=new Array(n),r=0;r=a&&i<=o[1]&&(e+=i-a)}}return parseInt(e,10)}return e}(t[0]))}}}var vn="( |"+String.fromCharCode(160)+")",yn=new RegExp(vn,"g");function _n(t){return t.replace(/\./g,"\\.?").replace(yn,vn)}function On(t){return t.replace(/\./g,"").replace(yn," ").toLowerCase()}function kn(t,e){return null===t?null:{regex:RegExp(t.map(_n).join("|")),deser:function(n){var i=n[0];return t.findIndex((function(t){return On(i)===On(t)}))+e}}}function wn(t,e){return{regex:t,deser:function(t){return ft(t[1],t[2])},groups:e}}function Cn(t){return{regex:t,deser:function(t){return t[0]}}}var Tn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}},Sn=null;function En(t,e,n){var i=function(t,e){var n;return(n=Array.prototype).concat.apply(n,t.map((function(t){return function(t,e){if(t.literal)return t;var n=jt.macroTokenToFormatOpts(t.val);if(!n)return t;var i=jt.create(e,n).formatDateTimeParts((Sn||(Sn=oi.fromMillis(1555555555555)),Sn)).map((function(t){return function(t,e,n){var i=t.type;if("literal"===i)return{literal:!0,val:t.value};var r=Tn[i];return"object"==typeof r&&(r=r[n[i]]),r?{literal:!1,val:r}:void 0}(t,0,n)}));return i.includes(void 0)?t:i}(t,e)})))}(jt.parseFormat(n),t),r=i.map((function(e){return n=e,r=gn(i=t),o=gn(i,"{2}"),a=gn(i,"{3}"),s=gn(i,"{4}"),c=gn(i,"{6}"),u=gn(i,"{1,2}"),l=gn(i,"{1,3}"),d=gn(i,"{1,6}"),h=gn(i,"{1,9}"),f=gn(i,"{2,4}"),p=gn(i,"{4,6}"),b=function(t){return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(t){return t[0]},literal:!0};var e},(g=function(t){if(n.literal)return b(t);switch(t.val){case"G":return kn(i.eras("short",!1),0);case"GG":return kn(i.eras("long",!1),0);case"y":return mn(d);case"yy":return mn(f,dt);case"yyyy":return mn(s);case"yyyyy":return mn(p);case"yyyyyy":return mn(c);case"M":return mn(u);case"MM":return mn(o);case"MMM":return kn(i.months("short",!0,!1),1);case"MMMM":return kn(i.months("long",!0,!1),1);case"L":return mn(u);case"LL":return mn(o);case"LLL":return kn(i.months("short",!1,!1),1);case"LLLL":return kn(i.months("long",!1,!1),1);case"d":return mn(u);case"dd":return mn(o);case"o":return mn(l);case"ooo":return mn(a);case"HH":return mn(o);case"H":return mn(u);case"hh":return mn(o);case"h":return mn(u);case"mm":return mn(o);case"m":case"q":return mn(u);case"qq":return mn(o);case"s":return mn(u);case"ss":return mn(o);case"S":return mn(l);case"SSS":return mn(a);case"u":return Cn(h);case"a":return kn(i.meridiems(),0);case"kkkk":return mn(s);case"kk":return mn(f,dt);case"W":return mn(u);case"WW":return mn(o);case"E":case"c":return mn(r);case"EEE":return kn(i.weekdays("short",!1,!1),1);case"EEEE":return kn(i.weekdays("long",!1,!1),1);case"ccc":return kn(i.weekdays("short",!0,!1),1);case"cccc":return kn(i.weekdays("long",!0,!1),1);case"Z":case"ZZ":return wn(new RegExp("([+-]"+u.source+")(?::("+o.source+"))?"),2);case"ZZZ":return wn(new RegExp("([+-]"+u.source+")("+o.source+")?"),2);case"z":return Cn(/[a-z_+-/]{1,256}?/i);default:return b(t)}}(n)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"}).token=n,g;var n,i,r,o,a,s,c,u,l,d,h,f,p,b,g})),o=r.find((function(t){return t.invalidReason}));if(o)return{input:e,tokens:i,invalidReason:o.invalidReason};var a=function(t){return["^"+t.map((function(t){return t.regex})).reduce((function(t,e){return t+"("+e.source+")"}),"")+"$",t]}(r),s=a[1],c=RegExp(a[0],"i"),u=function(t,e,n){var i=t.match(e);if(i){var r={},o=1;for(var a in n)if(tt(n,a)){var s=n[a],c=s.groups?s.groups+1:1;!s.literal&&s.token&&(r[s.token.val[0]]=s.deser(i.slice(o,o+c))),o+=c}return[i,r]}return[i,{}]}(e,c,s),l=u[0],d=u[1],h=d?function(t){var e;return e=Q(t.Z)?Q(t.z)?null:qt.create(t.z):new Qt(t.Z),Q(t.q)||(t.M=3*(t.q-1)+1),Q(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),Q(t.u)||(t.S=rt(t.u)),[Object.keys(t).reduce((function(e,n){var i=function(t){switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return i&&(e[i]=t[n]),e}),{}),e]}(d):[null,null],f=h[0],p=h[1];if(tt(d,"a")&&tt(d,"H"))throw new m("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:c,rawMatches:l,matches:d,result:f,zone:p}}var xn=[0,31,59,90,120,151,181,212,243,273,304,334],Pn=[0,31,60,91,121,152,182,213,244,274,305,335];function An(t,e){return new Lt("unit out of range","you specified "+e+" (of type "+typeof e+") as a "+t+", which is invalid")}function In(t,e,n){var i=new Date(Date.UTC(t,e-1,n)).getUTCDay();return 0===i?7:i}function Mn(t,e,n){return n+(at(t)?Pn:xn)[e-1]}function Dn(t,e){var n=at(t)?Pn:xn,i=n.findIndex((function(t){return tlt(n)?(e=n+1,s=1):e=n,Object.assign({weekYear:e,weekNumber:s,weekday:a},mt(t))}function jn(t){var e,n=t.weekYear,i=t.weekNumber,r=t.weekday,o=In(n,1,4),a=st(n),s=7*i+r-o-3;s<1?s+=st(e=n-1):s>a?(e=n+1,s-=st(n)):e=n;var c=Dn(e,s);return Object.assign({year:e,month:c.month,day:c.day},mt(t))}function Ln(t){var e=t.year,n=Mn(e,t.month,t.day);return Object.assign({year:e,ordinal:n},mt(t))}function Nn(t){var e=t.year,n=Dn(e,t.ordinal);return Object.assign({year:e,month:n.month,day:n.day},mt(t))}function Un(t){var e=G(t.year),n=et(t.month,1,12),i=et(t.day,1,ct(t.year,t.month));return e?n?!i&&An("day",t.day):An("month",t.month):An("year",t.year)}function Fn(t){var e=t.hour,n=t.minute,i=t.second,r=t.millisecond,o=et(e,0,23)||24===e&&0===n&&0===i&&0===r,a=et(n,0,59),s=et(i,0,59),c=et(r,0,999);return o?a?s?!c&&An("millisecond",r):An("second",i):An("minute",n):An("hour",e)}function Bn(t){return new Lt("unsupported zone",'the zone "'+t.name+'" is not supported')}function zn(t){return null===t.weekData&&(t.weekData=Rn(t.c)),t.weekData}function Vn(t,e){var n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new oi(Object.assign({},n,e,{old:n}))}function Hn(t,e,n){var i=t-60*e*1e3,r=n.offset(i);if(e===r)return[i,e];var o=n.offset(i-=60*(r-e)*1e3);return r===o?[i,r]:[t-60*Math.min(r,o)*1e3,Math.max(r,o)]}function qn(t,e){var n=new Date(t+=60*e*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function $n(t,e,n){return Hn(ut(t),e,n)}function Qn(t,e){var n=t.o,i=t.c.year+Math.trunc(e.years),r=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),o=Object.assign({},t.c,{year:i,month:r,day:Math.min(t.c.day,ct(i,r))+Math.trunc(e.days)+7*Math.trunc(e.weeks)}),a=an.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),s=Hn(ut(o),n,t.zone),c=s[0],u=s[1];return 0!==a&&(u=t.zone.offset(c+=a)),{ts:c,o:u}}function Wn(t,e,n,i,r){var o=n.setZone,a=n.zone;if(t&&0!==Object.keys(t).length){var s=oi.fromObject(Object.assign(t,n,{zone:e||a,setZone:void 0}));return o?s:s.setZone(a)}return oi.invalid(new Lt("unparsable",'the input "'+r+"\" can't be parsed as "+i))}function Gn(t,e,n){return void 0===n&&(n=!0),t.isValid?jt.create(de.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Yn(t,e){var n=e.suppressSeconds,i=e.suppressMilliseconds,r=e.includeOffset,o=e.includeZone,a=void 0!==o&&o,s=e.spaceZone,c=e.format,u=void 0===c?"extended":c,l="basic"===u?"HHmm":"HH:mm";return void 0!==n&&n&&0===t.second&&0===t.millisecond||(l+="basic"===u?"ss":":ss",void 0!==i&&i&&0===t.millisecond||(l+=".SSS")),(a||r)&&void 0!==s&&s&&(l+=" "),a?l+="z":r&&(l+="basic"===u?"ZZZ":"ZZ"),Gn(t,l)}var Kn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Zn={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Xn={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Jn=["year","month","day","hour","minute","second","millisecond"],ti=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ei=["year","ordinal","hour","minute","second","millisecond"];function ni(t){var e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new v(t);return e}function ii(t,e){for(var n,i=h(Jn);!(n=i()).done;){var r=n.value;Q(t[r])&&(t[r]=Kn[r])}var o=Un(t)||Fn(t);if(o)return oi.invalid(o);var a=ee.now(),s=$n(t,e.offset(a),e);return new oi({ts:s[0],zone:e,o:s[1]})}function ri(t,e,n){var i=!!Q(n.round)||n.round,r=function(t,r){return t=ot(t,i||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(t,r)},o=function(i){return n.calendary?e.hasSame(t,i)?0:e.startOf(i).diff(t.startOf(i),i).get(i):e.diff(t,i).get(i)};if(n.unit)return r(o(n.unit),n.unit);for(var a,s=h(n.units);!(a=s()).done;){var c=a.value,u=o(c);if(Math.abs(u)>=1)return r(u,c)}return r(0,n.units[n.units.length-1])}var oi=function(){function t(t){var e=t.zone||ee.defaultZone,n=t.invalid||(Number.isNaN(t.ts)?new Lt("invalid input"):null)||(e.isValid?null:Bn(e));this.ts=Q(t.ts)?ee.now():t.ts;var i=null,r=null;if(!n)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e)){var o=[t.old.c,t.old.o];i=o[0],r=o[1]}else{var a=e.offset(this.ts);i=qn(this.ts,a),i=(n=Number.isNaN(i.year)?new Lt("invalid input"):null)?null:i,r=n?null:a}this._zone=e,this.loc=t.loc||de.create(),this.invalid=n,this.weekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}t.local=function(e,n,i,r,o,a,s){return Q(e)?new t({ts:ee.now()}):ii({year:e,month:n,day:i,hour:r,minute:o,second:a,millisecond:s},ee.defaultZone)},t.utc=function(e,n,i,r,o,a,s){return Q(e)?new t({ts:ee.now(),zone:Qt.utcInstance}):ii({year:e,month:n,day:i,hour:r,minute:o,second:a,millisecond:s},Qt.utcInstance)},t.fromJSDate=function(e,n){void 0===n&&(n={});var i="[object Date]"===Object.prototype.toString.call(e)?e.valueOf():NaN;if(Number.isNaN(i))return t.invalid("invalid input");var r=Gt(n.zone,ee.defaultZone);return r.isValid?new t({ts:i,zone:r,loc:de.fromObject(n)}):t.invalid(Bn(r))},t.fromMillis=function(e,n){if(void 0===n&&(n={}),W(e))return e<-864e13||e>864e13?t.invalid("Timestamp out of range"):new t({ts:e,zone:Gt(n.zone,ee.defaultZone),loc:de.fromObject(n)});throw new y("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},t.fromSeconds=function(e,n){if(void 0===n&&(n={}),W(e))return new t({ts:1e3*e,zone:Gt(n.zone,ee.defaultZone),loc:de.fromObject(n)});throw new y("fromSeconds requires a numerical input")},t.fromObject=function(e){var n=Gt(e.zone,ee.defaultZone);if(!n.isValid)return t.invalid(Bn(n));var i=ee.now(),r=n.offset(i),o=bt(e,ni,["zone","locale","outputCalendar","numberingSystem"]),a=!Q(o.ordinal),s=!Q(o.year),c=!Q(o.month)||!Q(o.day),u=s||c,l=o.weekYear||o.weekNumber,d=de.fromObject(e);if((u||a)&&l)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&a)throw new m("Can't mix ordinal dates with month/day");var f,p,b=l||o.weekday&&!u,g=qn(i,r);b?(f=ti,p=Zn,g=Rn(g)):a?(f=ei,p=Xn,g=Ln(g)):(f=Jn,p=Kn);for(var v,y=!1,_=h(f);!(v=_()).done;){var O=v.value;Q(o[O])?o[O]=y?p[O]:g[O]:y=!0}var k=(b?function(t){var e=G(t.weekYear),n=et(t.weekNumber,1,lt(t.weekYear)),i=et(t.weekday,1,7);return e?n?!i&&An("weekday",t.weekday):An("week",t.week):An("weekYear",t.weekYear)}(o):a?function(t){var e=G(t.year),n=et(t.ordinal,1,st(t.year));return e?!n&&An("ordinal",t.ordinal):An("year",t.year)}(o):Un(o))||Fn(o);if(k)return t.invalid(k);var w=$n(b?jn(o):a?Nn(o):o,r,n),C=new t({ts:w[0],zone:n,o:w[1],loc:d});return o.weekday&&u&&e.weekday!==C.weekday?t.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+C.toISO()):C},t.fromISO=function(t,e){void 0===e&&(e={});var n=function(t){return pe(t,[Be,qe],[ze,$e],[Ve,Qe],[He,We])}(t);return Wn(n[0],n[1],e,"ISO 8601",t)},t.fromRFC2822=function(t,e){void 0===e&&(e={});var n=function(t){return pe(function(t){return t.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[De,Re])}(t);return Wn(n[0],n[1],e,"RFC 2822",t)},t.fromHTTP=function(t,e){void 0===e&&(e={});var n=function(t){return pe(t,[je,Ue],[Le,Ue],[Ne,Fe])}(t);return Wn(n[0],n[1],e,"HTTP",e)},t.fromFormat=function(e,n,i){if(void 0===i&&(i={}),Q(e)||Q(n))throw new y("fromFormat requires an input string and a format");var r,o=i.locale,a=i.numberingSystem,s=[(r=En(de.fromOpts({locale:void 0===o?null:o,numberingSystem:void 0===a?null:a,defaultToEN:!0}),e,n)).result,r.zone,r.invalidReason],c=s[0],u=s[1],l=s[2];return l?t.invalid(l):Wn(c,u,i,"format "+n,e)},t.fromString=function(e,n,i){return void 0===i&&(i={}),t.fromFormat(e,n,i)},t.fromSQL=function(t,e){void 0===e&&(e={});var n=function(t){return pe(t,[Ge,Ke],[Ye,Ze])}(t);return Wn(n[0],n[1],e,"SQL",t)},t.invalid=function(e,n){if(void 0===n&&(n=null),!e)throw new y("need to specify a reason the DateTime is invalid");var i=e instanceof Lt?e:new Lt(e,n);if(ee.throwOnInvalid)throw new p(i);return new t({invalid:i})},t.isDateTime=function(t){return t&&t.isLuxonDateTime||!1};var e=t.prototype;return e.get=function(t){return this[t]},e.resolvedLocaleOpts=function(t){void 0===t&&(t={});var e=jt.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(t,e){return void 0===t&&(t=0),void 0===e&&(e={}),this.setZone(Qt.instance(t),e)},e.toLocal=function(){return this.setZone(ee.defaultZone)},e.setZone=function(e,n){var i=void 0===n?{}:n,r=i.keepLocalTime,o=void 0!==r&&r,a=i.keepCalendarTime,s=void 0!==a&&a;if((e=Gt(e,ee.defaultZone)).equals(this.zone))return this;if(e.isValid){var c=this.ts;if(o||s){var u=e.offset(this.ts);c=$n(this.toObject(),u,e)[0]}return Vn(this,{ts:c,zone:e})}return t.invalid(Bn(e))},e.reconfigure=function(t){var e=void 0===t?{}:t;return Vn(this,{loc:this.loc.clone({locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.outputCalendar})})},e.setLocale=function(t){return this.reconfigure({locale:t})},e.set=function(t){if(!this.isValid)return this;var e,n=bt(t,ni,[]);Q(n.weekYear)&&Q(n.weekNumber)&&Q(n.weekday)?Q(n.ordinal)?(e=Object.assign(this.toObject(),n),Q(n.day)&&(e.day=Math.min(ct(e.year,e.month),e.day))):e=Nn(Object.assign(Ln(this.c),n)):e=jn(Object.assign(Rn(this.c),n));var i=$n(e,this.o,this.zone);return Vn(this,{ts:i[0],o:i[1]})},e.plus=function(t){return this.isValid?Vn(this,Qn(this,sn(t))):this},e.minus=function(t){return this.isValid?Vn(this,Qn(this,sn(t).negate())):this},e.startOf=function(t){if(!this.isValid)return this;var e={},n=an.normalizeUnit(t);switch(n){case"years":e.month=1;case"quarters":case"months":e.day=1;case"weeks":case"days":e.hour=0;case"hours":e.minute=0;case"minutes":e.second=0;case"seconds":e.millisecond=0}if("weeks"===n&&(e.weekday=1),"quarters"===n){var i=Math.ceil(this.month/3);e.month=3*(i-1)+1}return this.set(e)},e.endOf=function(t){var e;return this.isValid?this.plus((e={},e[t]=1,e)).startOf(t).minus(1):this},e.toFormat=function(t,e){return void 0===e&&(e={}),this.isValid?jt.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):"Invalid DateTime"},e.toLocaleString=function(t){return void 0===t&&(t=C),this.isValid?jt.create(this.loc.clone(t),t).formatDateTime(this):"Invalid DateTime"},e.toLocaleParts=function(t){return void 0===t&&(t={}),this.isValid?jt.create(this.loc.clone(t),t).formatDateTimeParts(this):[]},e.toISO=function(t){return void 0===t&&(t={}),this.isValid?this.toISODate(t)+"T"+this.toISOTime(t):null},e.toISODate=function(t){var e=(void 0===t?{}:t).format,n="basic"===(void 0===e?"extended":e)?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),Gn(this,n)},e.toISOWeekDate=function(){return Gn(this,"kkkk-'W'WW-c")},e.toISOTime=function(t){var e=void 0===t?{}:t,n=e.suppressMilliseconds,i=e.suppressSeconds,r=e.includeOffset,o=e.format;return Yn(this,{suppressSeconds:void 0!==i&&i,suppressMilliseconds:void 0!==n&&n,includeOffset:void 0===r||r,format:void 0===o?"extended":o})},e.toRFC2822=function(){return Gn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return Gn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return Gn(this,"yyyy-MM-dd")},e.toSQLTime=function(t){var e=void 0===t?{}:t,n=e.includeOffset,i=e.includeZone;return Yn(this,{includeOffset:void 0===n||n,includeZone:void 0!==i&&i,spaceZone:!0})},e.toSQL=function(t){return void 0===t&&(t={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(t):null},e.toString=function(){return this.isValid?this.toISO():"Invalid DateTime"},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(t){if(void 0===t&&(t={}),!this.isValid)return{};var e=Object.assign({},this.c);return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(t,e,n){if(void 0===e&&(e="milliseconds"),void 0===n&&(n={}),!this.isValid||!t.isValid)return an.invalid(this.invalid||t.invalid,"created by diffing an invalid DateTime");var i,r=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),o=(i=e,Array.isArray(i)?i:[i]).map(an.normalizeUnit),a=t.valueOf()>this.valueOf(),s=function(t,e,n,i){var r,o=function(t,e,n){for(var i,r,o={},a=0,s=[["years",function(t,e){return e.year-t.year}],["months",function(t,e){return e.month-t.month+12*(e.year-t.year)}],["weeks",function(t,e){var n=hn(t,e);return(n-n%7)/7}],["days",hn]];a=0){var d;i=u;var h,f=l(t,e);(r=t.plus(((d={})[u]=f,d)))>e?(t=t.plus(((h={})[u]=f-1,h)),f-=1):t=r,o[u]=f}}return[t,o,r,i]}(t,e,n),a=o[0],s=o[1],c=o[2],u=o[3],l=e-a,d=n.filter((function(t){return["hours","minutes","seconds","milliseconds"].indexOf(t)>=0}));0===d.length&&(c0?(h=an.fromMillis(l,i)).shiftTo.apply(h,d).plus(f):f}(a?this:t,a?t:this,o,r);return a?s.negate():s},e.diffNow=function(e,n){return void 0===e&&(e="milliseconds"),void 0===n&&(n={}),this.diff(t.local(),e,n)},e.until=function(t){return this.isValid?ln.fromDateTimes(this,t):this},e.hasSame=function(t,e){if(!this.isValid)return!1;if("millisecond"===e)return this.valueOf()===t.valueOf();var n=t.valueOf();return this.startOf(e)<=n&&n<=this.endOf(e)},e.equals=function(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)},e.toRelative=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var n=e.base||t.fromObject({zone:this.zone});return ri(n,this.plus(e.padding?thisthis.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return at(this.year)}},{key:"daysInMonth",get:function(){return ct(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?st(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?lt(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return C}},{key:"DATE_MED",get:function(){return T}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return S}},{key:"DATE_FULL",get:function(){return E}},{key:"DATE_HUGE",get:function(){return x}},{key:"TIME_SIMPLE",get:function(){return P}},{key:"TIME_WITH_SECONDS",get:function(){return A}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return I}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return M}},{key:"TIME_24_SIMPLE",get:function(){return D}},{key:"TIME_24_WITH_SECONDS",get:function(){return R}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return j}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return L}},{key:"DATETIME_SHORT",get:function(){return N}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return U}},{key:"DATETIME_MED",get:function(){return F}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return B}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return z}},{key:"DATETIME_FULL",get:function(){return V}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return H}},{key:"DATETIME_HUGE",get:function(){return q}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return $}}]),t}();function ai(t){if(oi.isDateTime(t))return t;if(t&&t.valueOf&&W(t.valueOf()))return oi.fromJSDate(t);if(t&&"object"==typeof t)return oi.fromObject(t);throw new y("Unknown datetime argument: "+t+", of type "+typeof t)}e.DateTime=oi,e.Duration=an,e.FixedOffsetZone=Qt,e.IANAZone=qt,e.Info=dn,e.Interval=ln,e.InvalidZone=Wt,e.LocalZone=Ft,e.Settings=ee,e.Zone=Nt},A2S1:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return u}));var i=n("5uGe"),r=n("ryP2");function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(n){return n.lift(new s(t,e))}}var s=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;C(this,t),this.scheduler=e,this.delay=n}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))}}]),t}(),u=function(t){a(n,t);var e=c(n);function n(t,i){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return C(this,n),(r=e.call(this,t)).scheduler=i,r.delay=o,r}return w(n,[{key:"scheduleMessage",value:function(t){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new l(t,this.destination)))}},{key:"_next",value:function(t){this.scheduleMessage(r.a.createNext(t))}},{key:"_error",value:function(t){this.scheduleMessage(r.a.createError(t)),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleMessage(r.a.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()}}]),n}(i.a),l=function t(e,n){C(this,t),this.notification=e,this.destination=n}},A9Vm:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}));var i=n("TYVA"),r=n("kZht"),o=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){try{return Object(i.k)(t)}catch(e){return t}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=r.Nb({name:"pairBase",type:t,pure:!0}),t}(),a=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){try{return Object(i.l)(t)}catch(e){return t}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=r.Nb({name:"pairQuote",type:t,pure:!0}),t}()},"AD/o":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n}return w(t,[{key:"ngOnChanges",value:function(){this.renderer.addClass(this.element.nativeElement,"global__flash")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","flash",""]],inputs:{flash:"flash"},features:[i.Ab]}),t}()},AdKB:function(t,e,n){"use strict";n.d(e,"a",(function(){return de}));var i=n("kZht"),r=n("9baa"),o=n("zqNl"),a=n("YtkY"),s=n("xVbo"),c=n("YzTY"),u=n("94ty"),l=n("uJYd"),d=n("yN5A"),h=n("0tVE"),f=n("lE9u"),p=n("sXtk"),b=n("bjK4"),g=n("UbJG"),m=n("+Px6"),v=n("qAYy"),y=n("rxqU"),_=n("J/3c"),O=n("MUfl"),k=n("sxqi"),T=n("i67J"),S=n("vYTc"),E=n("YyhG"),x=(n("Ee7O"),n("Aey0")),P=n("6NrZ"),A=n("Asjx"),I=n("1VvW"),M=n("Eu46"),D=n("LBlH"),R=n("y1fC"),j=n("pPqe"),L=n("aaFr"),N=n("MqcE"),U=n("YC1o"),F=n("An66"),B=n("ROO/"),z=n("8EXQ"),V=n("icqo"),H=n("TADc"),q=n("hCLc"),$=n("anSm"),Q=n("B6Vo"),W=n("zho4"),G=n("o09O"),Y=n("NxuZ"),K=n("1etq"),Z=n("SAoO"),X=n("rEzU"),J=n("ykds"),tt=n("AsU5"),et=n("ENxB"),nt=n("HHCP"),it=n("oiza"),rt=n("1o0v"),ot=n("m6an"),at=n("8spT"),st=n("UDV5"),ct=n("OwpI"),ut=n("bo+2"),lt=n("yPvj"),dt=n("w2Kr"),ht=n("aDqW"),ft=n("DpwM"),pt=n("e7kw"),bt=n("P0Um"),gt=["workspaceTourPopper"],mt=["tabsTourPopper"],vt=["workspaceRef"],yt=["tourPositionRef"];function _t(t,e){if(1&t&&(i.Ub(0,"section",46),i.Qc(1),i.gc(2,"translate"),i.gc(3,"async"),i.Tb()),2&t){var n=i.fc(2);i.Cb(1),i.Sc(" ",i.hc(2,1,i.hc(3,3,n.pageTitle$)||"")," ")}}function Ot(t,e){1&t&&(i.Ub(0,"a",52),i.Pb(1,"fa-icon",49),i.Qc(2," Multi-Collateral Futures "),i.Pb(3,"pill",53),i.Tb()),2&t&&(i.Cb(3),i.mc("label","New"))}function kt(t,e){if(1&t&&(i.Sb(0),i.Ub(1,"div",47),i.Ub(2,"a",48),i.Pb(3,"fa-icon",49),i.Qc(4," Holding Wallets "),i.Tb(),i.Ub(5,"a",50),i.Pb(6,"fa-icon",49),i.Qc(7," Single Collateral Futures "),i.Tb(),i.Oc(8,Ot,4,1,"a",51),i.gc(9,"async"),i.Tb(),i.Rb()),2&t){var n=i.fc(2);i.Cb(8),i.mc("ngIf",i.hc(9,1,n.flexEnabled$))}}function wt(t,e){if(1&t){var n=i.Vb();i.Ub(0,"fa-icon",56),i.bc("click",(function(){i.Ec(n);var t=e.ngLet,r=i.fc(2).ngLet;return i.fc().updateFavorite(r,t)})),i.Tb()}2&t&&i.mc("icon",e.ngLet?"star-filled":"star-unfilled")}function Ct(t,e){1&t&&i.Pb(0,"flex-position")}function Tt(t,e){if(1&t&&(i.Sb(0),i.Ub(1,"section",54),i.Oc(2,wt,1,1,"fa-icon",55),i.gc(3,"async"),i.Pb(4,"market-dropdowns"),i.Oc(5,Ct,1,0,"flex-position",23),i.gc(6,"async"),i.Tb(),i.Rb()),2&t){var n=i.fc(2);i.Cb(2),i.mc("ngLet",i.hc(3,2,n.isSelectedTickerFavorite$)),i.Cb(3),i.mc("ngIf",n.email&&i.hc(6,4,n.isFlexMarket$))}}function St(t,e){1&t&&(i.Sb(0),i.Pb(1,"dlt-banner"),i.Rb())}function Et(t,e){1&t&&i.Pb(0,"fusion-banner")}function xt(t,e){if(1&t&&(i.Ub(0,"div",57),i.Ub(1,"div",58),i.Pb(2,"fa-icon",59),i.Ub(3,"div",60),i.Qc(4),i.gc(5,"translate"),i.Tb(),i.Ub(6,"div"),i.Qc(7),i.gc(8,"crypto"),i.gc(9,"async"),i.Tb(),i.Tb(),i.Tb()),2&t){var n=i.fc(2),r=i.Ac(54);i.Cb(1),i.mc("sbTooltip",r),i.Cb(3),i.Rc(i.hc(5,3,"LABEL.TOTAL_EQUITY")),i.Cb(3),i.Sc("$",i.ic(8,5,i.hc(9,8,n.totalEquity$),"USD")," USD")}}function Pt(t,e){1&t&&(i.Sb(0),i.Ub(1,"div",61),i.Ub(2,"span",62),i.Qc(3),i.gc(4,"translate"),i.Tb(),i.Tb(),i.Rb()),2&t&&(i.Cb(3),i.Rc(i.hc(4,1,"LOADING.USER")))}function At(t,e){1&t&&i.Pb(0,"div",33)}function It(t,e){1&t&&i.Qb(0)}function Mt(t,e){if(1&t&&i.Oc(0,It,1,0,"ng-container",63),2&t){i.fc();var n=i.Ac(26),r=i.Ac(28),o=i.fc();i.mc("ngIf",o.email)("ngIfThen",n)("ngIfElse",r)}}function Dt(t,e){if(1&t&&(i.Ub(0,"button",65),i.Pb(1,"fa-icon",66),i.Qc(2),i.Pb(3,"fa-icon",40),i.Tb()),2&t){i.fc(3);var n=i.Ac(6);i.mc("sbMenuTriggerFor",n),i.Cb(2),i.Sc(" "," "," ")}}function Rt(t,e){if(1&t&&i.Oc(0,Dt,4,2,"button",64),2&t){var n=i.fc(2);i.mc("ngIf",n.email)}}function jt(t,e){if(1&t){var n=i.Vb();i.Ub(0,"button",69),i.bc("click",(function(){return i.Ec(n),i.fc(3).signUp()})),i.Qc(1),i.gc(2,"translate"),i.Tb()}2&t&&(i.Cb(1),i.Sc(" ",i.hc(2,1,"BUTTON.SIGNUP")," "))}function Lt(t,e){if(1&t){var n=i.Vb();i.Oc(0,jt,3,3,"button",67),i.Ub(1,"button",68),i.bc("click",(function(){return i.Ec(n),i.fc(2).signIn()})),i.Qc(2),i.gc(3,"translate"),i.Tb()}if(2&t){var r=i.fc(2);i.mc("ngIf",!r.isMobile),i.Cb(2),i.Sc(" ",i.hc(3,2,"BUTTON.SIGNIN")," ")}}function Nt(t,e){1&t&&(i.Ub(0,"div",70),i.Pb(1,"market-bar"),i.Tb())}var Ut=function(t){return{"is-trading":t}};function Ft(t,e){if(1&t&&(i.Ub(0,"section",30),i.Ub(1,"div",31),i.Oc(2,_t,4,5,"section",32),i.Oc(3,kt,10,3,"ng-container",23),i.Oc(4,Tt,7,6,"ng-container",23),i.Pb(5,"div",33),i.Oc(6,St,2,0,"ng-container",34),i.gc(7,"async"),i.Oc(8,Et,1,0,"ng-template",null,35,i.Pc),i.Pb(10,"sb-divider",36),i.Oc(11,xt,10,10,"div",37),i.gc(12,"async"),i.Pb(13,"sb-divider",36),i.Ub(14,"button",38),i.Pb(15,"fa-icon",39),i.Qc(16),i.Pb(17,"fa-icon",40),i.Tb(),i.Pb(18,"sb-divider",36),i.Oc(19,Pt,5,3,"ng-container",34),i.gc(20,"async"),i.Oc(21,At,1,0,"ng-template",null,41,i.Pc),i.Oc(23,Mt,1,3,"ng-template",null,42,i.Pc),i.Oc(25,Rt,1,1,"ng-template",null,43,i.Pc),i.Oc(27,Lt,4,4,"ng-template",null,44,i.Pc),i.Tb(),i.Oc(29,Nt,2,0,"div",45),i.Tb()),2&t){var n=e.ngLet,r=i.Ac(9),o=i.Ac(24),a=i.fc(),s=i.Ac(3);i.mc("ngClass",i.rc(18,Ut,a.isTrading)),i.Cb(2),i.mc("ngIf",!a.isTrading),i.Cb(1),i.mc("ngIf",a.isWallets),i.Cb(1),i.mc("ngIf",a.isTrading),i.Cb(2),i.mc("ngIf",i.hc(7,12,a.isDltAccount$))("ngIfElse",r),i.Cb(5),i.mc("ngIf",a.email&&i.hc(12,14,a.displayEquity$)),i.Cb(3),i.mc("sbTriggerFor",s),i.Cb(2),i.Sc(" "," "," "),i.Cb(3),i.mc("ngIf",i.hc(20,16,a.userDetailsLoading$))("ngIfElse",o),i.Cb(10),i.mc("ngIf",n&&a.isTrading)}}function Bt(t,e){if(1&t){var n=i.Vb();i.Ub(0,"mat-checkbox",80),i.bc("change",(function(t){i.Ec(n);var r=e.$implicit;return i.fc(4).toggleComponent(t.checked,r)})),i.Qc(1),i.Tb()}if(2&t){var r=e.$implicit,o=i.fc(4);i.mc("checked",o.isUsedComponent(r)),i.Cb(1),i.Rc(r.componentName)}}function zt(t,e){if(1&t){var n=i.Vb();i.Sb(0),i.Ub(1,"div",76),i.Oc(2,Bt,2,2,"mat-checkbox",77),i.Tb(),i.Ub(3,"button",78),i.bc("click",(function(){return i.Ec(n),i.fc(3).resetGrid()})),i.Qc(4,"Reset"),i.Tb(),i.Ub(5,"button",78),i.bc("click",(function(){return i.Ec(n),i.fc(3).toggleLayoutLock()})),i.Pb(6,"fa-icon",79),i.Qc(7),i.Tb(),i.Rb()}if(2&t){var r=i.fc(3);i.Cb(2),i.mc("ngForOf",r.allGridComponents),i.Cb(4),i.mc("icon",r.layoutUnlocked?"unlock":"lock"),i.Cb(1),i.Sc(" Layout: ",r.layoutUnlocked?"Unlocked":"Locked"," ")}}function Vt(t,e){if(1&t){var n=i.Vb();i.Ub(0,"div",87),i.Ub(1,"button",88),i.bc("click",(function(){i.Ec(n);var t=e.$implicit;return i.fc(4).setLayout(t.id)})),i.Qc(2),i.gc(3,"translate"),i.Tb(),i.Ub(4,"button",89),i.bc("click",(function(){i.Ec(n);var t=e.$implicit;return i.fc(4).openWorkspaceInTab(t.id)})),i.Tb(),i.Ub(5,"button",90),i.bc("click",(function(){i.Ec(n);var t=e.$implicit;return i.fc(4).renameWorkspace(t)})),i.Tb(),i.Ub(6,"button",91),i.bc("click",(function(){i.Ec(n);var t=e.$implicit;return i.fc(4).duplicateWorkspace(t)})),i.Tb(),i.Pb(7,"button",92),i.Ub(8,"button",93),i.bc("click",(function(){i.Ec(n);var t=e.$implicit;return i.fc(4).deleteWorkspace(t)})),i.Tb(),i.Tb()}if(2&t){var r=e.$implicit,o=i.fc(4);i.Cb(1),i.mc("sbIconColor","var(--brand)"),i.Cb(1),i.Sc(" ","WORKSPACE.__DEFAULT__"===r.name?i.hc(3,8,"WORKSPACE.__DEFAULT__"):r.name," "),i.Cb(2),i.mc("sbTooltip","TOOLTIP.WORKSPACE_NEW_TAB"),i.Cb(1),i.mc("sbTooltip","BUTTON.RENAME"),i.Cb(1),i.mc("sbTooltip","BUTTON.DUPLICATE"),i.Cb(1),i.mc("sbTooltip","BUTTON.SHARE")("clipboard",o.encodeLayout(r)),i.Cb(1),i.mc("sbTooltip","BUTTON.DELETE")}}function Ht(t,e){if(1&t){var n=i.Vb();i.Ub(0,"button",94),i.bc("click",(function(){return i.Ec(n),i.fc(4).createLayout()})),i.Qc(1),i.gc(2,"translate"),i.Tb()}2&t&&(i.mc("sbIconColor","var(--brand)"),i.Cb(1),i.Sc(" ",i.hc(2,2,"LABEL.CREATE_WORKSPACE")," "))}function qt(t,e){if(1&t){var n=i.Vb();i.Sb(0),i.Oc(1,Vt,9,10,"div",81),i.gc(2,"async"),i.Ub(3,"div",82,83),i.Oc(5,Ht,3,4,"button",84),i.gc(6,"async"),i.Ub(7,"button",85),i.bc("click",(function(){return i.Ec(n),i.fc(3).loadLayout()})),i.Qc(8),i.gc(9,"translate"),i.Tb(),i.Ub(10,"button",86),i.bc("click",(function(){return i.Ec(n),i.fc(3).resetLayout()})),i.Qc(11),i.gc(12,"translate"),i.Tb(),i.Tb(),i.Rb()}if(2&t){var r,o=i.fc(3);i.Cb(1),i.mc("ngForOf",i.hc(2,6,o.customLayouts$)),i.Cb(4),i.mc("ngIf",(null==(r=i.hc(6,8,o.customLayouts$))?null:r.length)<6),i.Cb(2),i.mc("sbIconColor","var(--brand)"),i.Cb(1),i.Sc(" ",i.hc(9,10,"BUTTON.LOAD")," "),i.Cb(2),i.mc("sbIconColor","var(--brand)"),i.Cb(1),i.Sc(" ",i.hc(12,12,"BUTTON.RESET")," ")}}function $t(t,e){if(1&t){var n=i.Vb();i.Sb(0),i.Ub(1,"mat-radio-group",73),i.bc("change",(function(t){return i.Ec(n),i.fc(2).setWorkspaceType(t)})),i.Ub(2,"mat-radio-button",74),i.Qc(3," Workspaces "),i.Tb(),i.Ub(4,"mat-radio-button",75),i.Qc(5," Draggable "),i.Tb(),i.Tb(),i.Oc(6,zt,8,3,"ng-container",23),i.Oc(7,qt,13,14,"ng-container",23),i.Rb()}if(2&t){var r=e.ngLet;i.Cb(1),i.mc("value",r),i.Cb(5),i.mc("ngIf","draggable"===r),i.Cb(1),i.mc("ngIf","workspaces"===r)}}function Qt(t,e){if(1&t&&(i.Ub(0,"div",71),i.Oc(1,$t,8,3,"ng-container",72),i.gc(2,"async"),i.Tb()),2&t){var n=i.fc();i.Cb(1),i.mc("ngLet",i.hc(2,1,n.layoutType$))}}function Wt(t,e){if(1&t){var n=i.Vb();i.Ub(0,"button",95),i.bc("click",(function(){return i.Ec(n),i.fc().addMoney()})),i.Qc(1),i.gc(2,"translate"),i.Tb()}2&t&&(i.Cb(1),i.Sc(" ",i.hc(2,1,"NAV.ADD_MONEY")," "))}function Gt(t,e){if(1&t&&(i.Ub(0,"button",96),i.Qc(1),i.gc(2,"translate"),i.Tb()),2&t){var n=i.fc();i.mc("sbIconColor","NONE"===n.userTier||"FAILED"===n.userTier&&"NONE"===n.userClassification?"var(--warn-colour)":void 0),i.Cb(1),i.Sc(" ",i.hc(2,2,"NAV.VERIFICATION")," ")}}function Yt(t,e){1&t&&(i.Ub(0,"button",97),i.Qc(1),i.gc(2,"translate"),i.Tb()),2&t&&(i.Cb(1),i.Sc(" ",i.hc(2,1,"NAV.SUBACCOUNTS")," "))}function Kt(t,e){if(1&t){var n=i.Vb();i.Ub(0,"button",98),i.Ub(1,"language-menu",99),i.bc("updateLanguage",(function(t){return i.Ec(n),i.fc().updateLanguage$.emit(t)})),i.Qc(2),i.gc(3,"translate"),i.Tb(),i.Tb()}if(2&t){var r=i.fc();i.Cb(1),i.mc("currentLanguage",r.currentLanguage),i.Cb(1),i.Tc(" ",i.hc(3,3,"LABEL.SELECT_LANGUAGE")," (",r.currentLanguage,") ")}}function Zt(t,e){if(1&t){var n=i.Vb();i.Ub(0,"button",100),i.bc("click",(function(){return i.Ec(n),i.fc().openDemo()})),i.Qc(1),i.gc(2,"translate"),i.Tb()}2&t&&(i.Cb(1),i.Sc(" ",i.hc(2,1,"LABEL.GOTO_DEMO")," "))}function Xt(t,e){if(1&t&&(i.Ub(0,"button",101),i.Qc(1),i.gc(2,"translate"),i.Tb()),2&t){i.fc();var n=i.Ac(50);i.mc("sbMenuTriggerFor",n),i.Cb(1),i.Sc(" ",i.hc(2,2,"NAV.EXTERNAL_RESOURCES")," ")}}function Jt(t,e){if(1&t){var n=i.Vb();i.Ub(0,"button",95),i.bc("click",(function(){return i.Ec(n),i.fc().addMoney()})),i.Qc(1),i.gc(2,"translate"),i.Tb()}2&t&&(i.Cb(1),i.Sc(" ",i.hc(2,1,"NAV.ADD_MONEY")," "))}function te(t,e){if(1&t){var n=i.Vb();i.Ub(0,"button",19),i.bc("click",(function(){return i.Ec(n),i.fc().restartPlatform$.emit()})),i.Qc(1),i.gc(2,"translate"),i.Tb()}2&t&&(i.Cb(1),i.Sc(" ",i.hc(2,1,"BUTTON.RESTART")," "))}function ee(t,e){if(1&t&&(i.Ub(0,"a",103),i.gc(1,"supportArticle"),i.gc(2,"supportCategory"),i.Qc(3),i.gc(4,"translate"),i.Tb()),2&t){var n=e.$implicit;i.mc("href",n.supportArticle?i.hc(1,2,n.supportArticle):n.supportCategory?i.hc(2,4,n.supportCategory):n.url,i.Gc),i.Cb(3),i.Sc(" ",i.hc(4,6,n.name)," ")}}function ne(t,e){if(1&t&&(i.Sb(0),i.Oc(1,ee,5,8,"a",102),i.Rb()),2&t){var n=e.ngIf;i.Cb(1),i.mc("ngForOf",n)}}function ie(t,e){if(1&t&&(i.Sb(0),i.Ub(1,"span",107),i.Qc(2),i.gc(3,"translate"),i.Tb(),i.Ub(4,"span",108),i.Qc(5),i.gc(6,"crypto"),i.gc(7,"async"),i.Tb(),i.Ub(8,"span",107),i.Qc(9),i.gc(10,"translate"),i.Tb(),i.Ub(11,"span",108),i.Qc(12),i.gc(13,"crypto"),i.gc(14,"async"),i.Tb(),i.Rb()),2&t){var n=i.fc(2);i.Cb(2),i.Sc("",i.hc(3,4,"Single Collateral Futures"),":"),i.Cb(3),i.Sc("$",i.ic(6,6,i.hc(7,9,n.futuresEquity$),"USD")," USD"),i.Cb(4),i.Sc("",i.hc(10,11,"Multi-Collateral Futures"),":"),i.Cb(3),i.Sc("$",i.ic(13,13,i.hc(14,16,n.flexEquity$),"USD")," USD")}}function re(t,e){if(1&t&&(i.Ub(0,"span",107),i.Qc(1),i.gc(2,"translate"),i.Tb(),i.Ub(3,"span",108),i.Qc(4),i.gc(5,"crypto"),i.gc(6,"async"),i.Tb()),2&t){var n=i.fc(2);i.Cb(1),i.Sc("",i.hc(2,2,"LABEL.EQUITY_CLASS_FUTURES"),":"),i.Cb(3),i.Sc("$",i.ic(5,4,i.hc(6,7,n.futuresEquity$),"USD")," USD")}}function oe(t,e){if(1&t&&(i.Ub(0,"div",113),i.Pb(1,"market-icon",114),i.Ub(2,"span"),i.Qc(3),i.gc(4,"walletName"),i.Tb(),i.Ub(5,"span",108),i.Qc(6),i.gc(7,"crypto"),i.Tb(),i.Tb()),2&t){var n=e.$implicit;i.Cb(1),i.mc("base",n.name),i.Cb(2),i.Rc(i.hc(4,3,n.name)),i.Cb(3),i.Sc(" $",i.ic(7,5,n.totalNotional,"USD")," USD")}}function ae(t,e){if(1&t&&(i.Ub(0,"div",111),i.Oc(1,oe,8,8,"div",112),i.Tb()),2&t){var n=e.ngIf;i.Cb(1),i.mc("ngForOf",n)("ngForTrackField","asset")}}function se(t,e){if(1&t&&(i.Sb(0),i.Oc(1,ae,2,2,"div",110),i.gc(2,"async"),i.Rb()),2&t){var n=i.fc(2);i.Cb(1),i.mc("ngIf",i.hc(2,1,n.holdingWalletsWithTotalEquity$))}}function ce(t,e){if(1&t&&(i.Ub(0,"div",104),i.Ub(1,"h2",105),i.Qc(2),i.gc(3,"translate"),i.Tb(),i.Ub(4,"div",106),i.Ub(5,"span",107),i.Qc(6),i.gc(7,"translate"),i.Tb(),i.Ub(8,"span",108),i.Qc(9),i.gc(10,"crypto"),i.gc(11,"async"),i.Tb(),i.Ub(12,"span",107),i.Qc(13),i.gc(14,"translate"),i.Tb(),i.Ub(15,"span",108),i.Qc(16),i.gc(17,"crypto"),i.gc(18,"async"),i.Tb(),i.Oc(19,ie,15,18,"ng-container",34),i.Oc(20,re,7,9,"ng-template",null,109,i.Pc),i.Tb(),i.Oc(22,se,3,3,"ng-container",23),i.Tb()),2&t){var n=i.Ac(21),r=i.fc();i.Cb(2),i.Sc("",i.hc(3,8,"HEADING.EQUITY_BREAKDOWN"),":"),i.Cb(4),i.Sc("",i.hc(7,10,"LABEL.TOTAL_EQUITY"),":"),i.Cb(3),i.Sc("$",i.ic(10,12,i.hc(11,15,r.totalEquity$),"USD")," USD"),i.Cb(4),i.Sc("",i.hc(14,17,"LABEL.EQUITY_CLASS_HOLDING"),":"),i.Cb(3),i.Sc("$",i.ic(17,19,i.hc(18,22,r.holdingEquity$),"USD")," USD"),i.Cb(3),i.mc("ngIf",r.feature.isEnabled("flex"))("ngIfElse",n),i.Cb(3),i.mc("ngIf",!r.feature.isEnabled("flex"))}}function ue(t,e){if(1&t){var n=i.Vb();i.Ub(0,"tour-step",115),i.bc("dispose",(function(){return i.Ec(n),i.fc(),i.Ac(56).dispose()}))("nextEvent",(function(){return i.Ec(n),i.fc().tourOnNextWorkspace()})),i.Ub(1,"p",116),i.Qc(2,"TOUR.WORKSPACES.1"),i.Tb(),i.Tb()}2&t&&i.mc("title","LABEL.WORKSPACES")("nextRouteTo","/futures")}function le(t,e){if(1&t){var n=i.Vb();i.Ub(0,"tour-step",117),i.bc("dispose",(function(){return i.Ec(n),i.fc(),i.Ac(59).dispose()}))("nextEvent",(function(){return i.Ec(n),i.fc().openTabSettings()}))("previousEvent",(function(){return i.Ec(n),i.fc().tourOnNextWorkspace()})),i.Ub(1,"p",116),i.Qc(2,"TOUR.WORKSPACES.4"),i.Tb(),i.Tb()}2&t&&i.mc("title","HEADING.RESPONSIVE_COMPONENTS")("nextRouteTo","/futures")("image","tabs")}var de=function(){var t=function(){function t(e,n,r,s,u,l,d,f){C(this,t),this.env=e,this.feature=n,this.store=r,this.market=s,this.breakpointObserver=u,this.router=l,this.activatedRoute=d,this.layout=f,this.encodeLayout=c.f,this.isDltAccount$=this.store.pipe(Object(o.m)(y.k)),this.customLayouts$=this.store.pipe(Object(o.m)(g.f)),this.workspaceName$=this.store.pipe(Object(o.m)(g.c)),this.pageTitle$=this.store.pipe(Object(o.m)(b.h)),this.subaccounts$=this.store.pipe(Object(o.m)(y.t)),this.externalNav$=this.store.pipe(Object(o.m)(b.c)),this.selectedMarketSymbol$=this.store.pipe(Object(o.m)(m.r)),this.selectedTicker$=this.store.pipe(Object(o.m)(v.p)),this.isAlt$=this.store.pipe(Object(o.m)(b.l)),this.holdingEquity$=this.store.pipe(Object(o.m)(_.k)),this.futuresEquity$=this.store.pipe(Object(o.m)(_.i)),this.flexEquity$=this.store.pipe(Object(o.m)(_.g)),this.totalEquity$=this.store.pipe(Object(o.m)(_.p)),this.displayEquity$=this.store.pipe(Object(o.m)(y.a),Object(a.a)((function(t){var e;return null===(e=t.equityShown)||void 0===e||e}))),this.layoutType$=this.store.pipe(Object(o.m)(b.e)),this.userDetailsLoading$=this.store.pipe(Object(o.m)(b.m,{filter:h.l.type})),this.userFeeVolume$=this.store.pipe(Object(o.m)(y.x)),this.holdingWalletsWithTotalEquity$=this.store.pipe(Object(o.m)(_.s)),this.displayTooltips$=this.store.pipe(Object(o.m)(y.y)),this.marketPosition$=this.store.pipe(Object(o.m)(E.g)),this.tour$=this.store.pipe(Object(o.m)(b.k)),this.leveragePrefs$=this.store.pipe(Object(o.m)(m.o)),this.pnlPrefs$=this.store.pipe(Object(o.m)(m.q)),this.isFlexMarket$=this.store.pipe(Object(o.m)(m.a)),this.isSelectedTickerFavorite$=this.store.pipe(Object(o.m)(v.b)),this.flexEnabled$=this.store.pipe(Object(o.m)(_.f)),this.toggleNavDrawer$=new i.o,this.restartPlatform$=new i.o,this.updateLanguage$=new i.o}return w(t,[{key:"ngAfterViewInit",value:function(){var t=this;this.tour$.pipe(Object(s.a)((function(t){return t.inProgress})),Object(s.a)((function(t){return"workspaces"===t.type})),Object(s.a)((function(t){return 1===t.step||4===t.step}))).subscribe((function(e){var n=e.step;1===n?(t.workspaceRef.nativeElement.click(),t.workspaceTourPopper.componentTrigger(t.tourPositionRef,"bottomStart")):4===n&&t.tabsTourPopper.centerTrigger()}))}},{key:"openMarketSelector",value:function(){this.store.dispatch(Object(l.g)({name:"markets-overview"}))}},{key:"loadLayout",value:function(){this.store.dispatch(Object(l.g)({name:"layout-loader"}))}},{key:"resetLayout",value:function(){this.store.dispatch(Object(d.i)())}},{key:"duplicateWorkspace",value:function(t){var e={type:t.type,name:t.name+" (Copy)",panels:t.panels};this.store.dispatch(Object(d.c)({config:e}))}},{key:"deleteWorkspace",value:function(t){var e=t.id;this.store.dispatch(Object(d.e)({id:e}))}},{key:"renameWorkspace",value:function(t){var e=t.id,n=t.name;this.store.dispatch(Object(l.g)({name:"rename-layout",inputs:{id:e,currentName:n}}))}},{key:"setLayout",value:function(t){this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{workspace:t},queryParamsHandling:"merge"})}},{key:"createLayout",value:function(){this.store.dispatch(Object(l.g)({name:"create-layout"}))}},{key:"openWorkspaceInTab",value:function(t){window.open("".concat(window.location.href.split("?")[0],"?workspace=").concat(t))}},{key:"openAppStore",value:function(t){window.open("ios"===t?"https://apps.apple.com/us/app/kraken-futures/id1475904904?ls=1":"https://play.google.com/store/apps/details?id=com.krakenfutures","_blank")}},{key:"openDemo",value:function(){window.open("https://demo-futures.kraken.com","_blank","noopener")}},{key:"signUp",value:function(){this.env.demo?this.store.dispatch(Object(l.g)({name:"sign-up-demo"})):window.open(this.env.urls.externalSignUp,"_blank","noopener")}},{key:"signIn",value:function(){this.store.dispatch(this.isNative||this.isMobile?Object(l.g)({name:"mobile-login-info"}):Object(l.g)({name:"sign-in"}))}},{key:"signOut",value:function(){this.store.dispatch(Object(u.B)({source:"self"}))}},{key:"openCalculators",value:function(t){var e=this;this.store.pipe(Object(T.n)(v.p)).subscribe((function(n){var i=Math.round(Object(S.j)(n));e.store.dispatch(Object(l.g)({name:"order-calculators",inputs:{mid:i,calculator:t}}))}))}},{key:"addMoney",value:function(){this.store.dispatch(Object(f.a)())}},{key:"tourOnNextWorkspace",value:function(){this.store.dispatch(Object(l.g)({name:"create-layout"}))}},{key:"openTabSettings",value:function(){this.store.dispatch(Object(l.g)({name:"tab-settings"}))}},{key:"openFeeScheduleDialog",value:function(){this.store.dispatch(Object(l.g)({name:"fee-schedule"}))}},{key:"lvg",value:function(t){return t.cross?"CROSS":"ISOLATED: ".concat(t.maxLeverage,"x")}},{key:"updateFavorite",value:function(t,e){var n=Object(S.i)(t);this.store.dispatch(e?Object(h.v)({marketDescriptor:n}):Object(h.d)({marketDescriptor:n}))}},{key:"toggleLayoutLock",value:function(){this.layout.toggleLayoutLock()}},{key:"resetGrid",value:function(){this.layout.resetLayout()}},{key:"isUsedComponent",value:function(t){return this.gridComponents.map((function(t){return t.id})).includes(t.id)}},{key:"setWorkspaceType",value:function(t){var e=t.value;this.store.dispatch(Object(l.u)({layout:e}))}},{key:"toggleComponent",value:function(t,e){t?this.layout.pushItem(e):this.layout.removeItem(e)}},{key:"multipleLocales",get:function(){return this.env.locales.length>1}},{key:"isTrading",get:function(){return this.market.currentMarketClass().isSome()}},{key:"isWallets",get:function(){return this.router.url.includes("wallets")}},{key:"isMobile",get:function(){return this.isNative||this.breakpointObserver.isMatched("(max-width: 599px)")}},{key:"isNative",get:function(){var t;return null!==(t=r.a.isNative)&&void 0!==t&&t}},{key:"hasLanguages",get:function(){return this.env.locales.length>1}},{key:"isSmallDesktop",get:function(){return this.breakpointObserver.isMatched("(max-width: 1024px)")}},{key:"layoutUnlocked",get:function(){var t;return null===(t=this.layout.options.draggable)||void 0===t?void 0:t.enabled}},{key:"gridComponents",get:function(){return this.layout.currentLayoutItems}},{key:"allGridComponents",get:function(){return P.c}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(p.a),i.Ob(O.a),i.Ob(o.b),i.Ob(k.a),i.Ob(A.a),i.Ob(I.d),i.Ob(I.a),i.Ob(x.a))},t.\u0275cmp=i.Ib({type:t,selectors:[["app-toolbar"]],viewQuery:function(t,e){var n;1&t&&(i.Jc(gt,!0),i.Jc(mt,!0),i.Jc(vt,!0),i.Wc(yt,!0)),2&t&&(i.zc(n=i.cc())&&(e.workspaceTourPopper=n.first),i.zc(n=i.cc())&&(e.tabsTourPopper=n.first),i.zc(n=i.cc())&&(e.workspaceRef=n.first),i.zc(n=i.cc())&&(e.tourPositionRef=n.first))},inputs:{email:"email",isAffiliate:"isAffiliate",userTier:"userTier",userClassification:"userClassification",currentLanguage:"currentLanguage",userDetails:"userDetails"},outputs:{toggleNavDrawer$:"toggleNavDrawer",restartPlatform$:"restartPlatform",updateLanguage$:"updateLanguage"},decls:61,vars:45,consts:[["class","toolbar",3,"ngClass",4,"ngLet"],["sbPlacement","bottomEnd"],["workspacePopper",""],["class","workspace-menu",4,"sbContent"],["desktopMenu","sbMenu"],["sb-menu-heading","",1,"menu-email",3,"clipboard"],["sb-menu-item","","sbIcon","deposit",3,"click",4,"ngIf"],["sb-menu-item","","sbIcon","cog","routerLink","/settings"],["sb-menu-item","","sbIcon","shield-secure","routerLink","/verification",3,"sbIconColor",4,"ngIf"],["sb-menu-item","","sbIcon","user-group","routerLink","/subaccounts",4,"ngIf"],["sb-menu-item","","sbIcon","language","type","button",4,"ngIf"],["sb-menu-item","","sbIcon","game-controller",3,"click",4,"ngIf"],["sb-menu-item","","sbIcon","spanner",3,"sbMenuTriggerFor"],["sb-menu-item","","sbIcon","book",3,"sbMenuTriggerFor",4,"ngIf"],["sb-menu-item","","sbIcon","refresh",3,"click",4,"ngIf"],["sb-menu-item","","sbIcon","close-medium",3,"click"],["layoutOptions",""],["sb-menu-heading",""],["sb-menu-item","","sbIcon","file",3,"click"],["sb-menu-item","","sbIcon","refresh",3,"click"],["toolsMenu","sbMenu"],["sb-menu-item","","sbIcon","calculator",3,"click"],["resourcesMenu","sbMenu"],[4,"ngIf"],["equityBreakdown",""],["sbPlacement","topStart"],["workspaceTourPopper",""],[3,"title","nextRouteTo","dispose","nextEvent",4,"sbContent"],["tabsTourPopper",""],[3,"title","nextRouteTo","image","dispose","nextEvent","previousEvent",4,"sbContent"],[1,"toolbar",3,"ngClass"],[1,"main"],["class","global__text title",4,"ngIf"],[1,"spacer"],[4,"ngIf","ngIfElse"],["fusionBanner",""],["vertical",""],["class","total-equity",4,"ngIf"],["body","","mat-button","","sbTooltip","TOOLTIP.MANAGE_WORKSPACES","sbTooltipPlacement","bottom","sbDelay","200",1,"menu","workspace-btn",3,"sbTriggerFor"],["icon","grid","size","lg"],["icon","chevron-down","size","lg"],["spacer",""],["notLoadingUser",""],["signedIn",""],["notSignedIn",""],["class","ticker-details",4,"ngIf"],[1,"global__text","title"],[1,"wallet-types"],["routerLink","/wallets/holding","routerLinkActive","active","subheading","",1,"wallet-type"],["icon","wallet"],["routerLink","/wallets/single-collateral","routerLinkActive","active","subheading","",1,"wallet-type"],["routerLink","/wallets/multi-collateral","routerLinkActive","active","class","wallet-type","subheading","",4,"ngIf"],["routerLink","/wallets/multi-collateral","routerLinkActive","active","subheading","",1,"wallet-type"],[3,"label"],[1,"market-details"],["class","favorite","size","2x",3,"icon","click",4,"ngLet"],["size","2x",1,"favorite",3,"icon","click"],[1,"total-equity"],["body","","sbTooltipPlacement","bottom",1,"grid-tri-left","gap-s-m","vcenter",3,"sbTooltip"],["icon","wallet","size","2x"],["uppercase","","ghost",""],[1,"loading-user"],["body",""],[4,"ngIf","ngIfThen","ngIfElse"],["body","","class","menu","mat-button","",3,"sbMenuTriggerFor",4,"ngIf"],["body","","mat-button","",1,"menu",3,"sbMenuTriggerFor"],["icon","user-full","size","lg"],["class","signup","body","","mat-button","",3,"click",4,"ngIf"],["body","","mat-raised-button","",3,"click"],["body","","mat-button","",1,"signup",3,"click"],[1,"ticker-details"],[1,"workspace-menu"],[4,"ngLet"],["body","",3,"value","change"],["value","workspaces"],["value","draggable"],[1,"grid-components"],["class","no-border",3,"checked","change",4,"ngFor","ngForOf"],["mat-button","",3,"click"],["size","lg",1,"lock-icon",3,"icon"],[1,"no-border",3,"checked","change"],["class","workspace-item",4,"ngFor","ngForOf"],[1,"workspace-actions"],["tourPositionRef",""],["sb-menu-item","","sbIcon","circle-plus",3,"sbIconColor","click",4,"ngIf"],["sb-menu-item","","sbIcon","file",3,"sbIconColor","click"],["sb-menu-item","","sbIcon","refresh",3,"sbIconColor","click"],[1,"workspace-item"],["sb-menu-item","","sbIcon","grid",3,"sbIconColor","click"],["sb-menu-item","","sbIcon","external-link","sbTooltipPlacement","bottom",3,"sbTooltip","click"],["sb-menu-item","","sbIcon","edit","sbTooltipPlacement","bottom",3,"sbTooltip","click"],["sb-menu-item","","sbIcon","duplicate","sbTooltipPlacement","bottom",3,"sbTooltip","click"],["sb-menu-item","","sbIcon","share-ios","sbTooltipPlacement","bottom","clipboardSuccessMsg","SNACKBAR.LAYOUT_COPIED",3,"sbTooltip","clipboard"],["sb-menu-item","","sbIcon","close","sbIconColor","var(--warn-colour)","sbTooltipPlacement","bottom",3,"sbTooltip","click"],["sb-menu-item","","sbIcon","circle-plus",3,"sbIconColor","click"],["sb-menu-item","","sbIcon","deposit",3,"click"],["sb-menu-item","","sbIcon","shield-secure","routerLink","/verification",3,"sbIconColor"],["sb-menu-item","","sbIcon","user-group","routerLink","/subaccounts"],["sb-menu-item","","sbIcon","language","type","button"],[3,"currentLanguage","updateLanguage"],["sb-menu-item","","sbIcon","game-controller",3,"click"],["sb-menu-item","","sbIcon","book",3,"sbMenuTriggerFor"],["sb-menu-item","","sbIcon","external-link","target","_blank",3,"href",4,"ngFor","ngForOf"],["sb-menu-item","","sbIcon","external-link","target","_blank",3,"href"],[1,"equities"],["subheading","","ghost",""],["body","",1,"equity-classes"],["label",""],[1,"value"],["noFlex",""],["body","","class","equities",4,"ngIf"],["body","",1,"equities"],["body","","class","grid-tri-left gap-s-m vcenter crypto",4,"ngFor","ngForOf","ngForTrackField"],["body","",1,"grid-tri-left","gap-s-m","vcenter","crypto"],[3,"base"],[3,"title","nextRouteTo","dispose","nextEvent"],["subheading","","translate",""],[3,"title","nextRouteTo","image","dispose","nextEvent","previousEvent"]],template:function(t,e){if(1&t&&(i.Oc(0,Ft,30,20,"section",0),i.gc(1,"async"),i.Ub(2,"sb-popper",1,2),i.Oc(4,Qt,3,3,"div",3),i.Tb(),i.Ub(5,"sb-menu",null,4),i.Ub(7,"p",5),i.Qc(8),i.Tb(),i.Oc(9,Wt,3,3,"button",6),i.Ub(10,"button",7),i.Qc(11),i.gc(12,"translate"),i.Tb(),i.Oc(13,Gt,3,4,"button",8),i.Oc(14,Yt,3,3,"button",9),i.gc(15,"async"),i.Oc(16,Kt,4,5,"button",10),i.Pb(17,"mat-divider"),i.Oc(18,Zt,3,3,"button",11),i.Ub(19,"button",12),i.Qc(20),i.gc(21,"translate"),i.Tb(),i.Oc(22,Xt,3,4,"button",13),i.gc(23,"async"),i.Oc(24,Jt,3,3,"button",6),i.Pb(25,"mat-divider"),i.Oc(26,te,3,3,"button",14),i.Ub(27,"button",15),i.bc("click",(function(){return e.signOut()})),i.Qc(28),i.gc(29,"translate"),i.Tb(),i.Tb(),i.Ub(30,"sb-menu",null,16),i.Ub(32,"p",17),i.Qc(33),i.gc(34,"translate"),i.Tb(),i.Ub(35,"button",18),i.bc("click",(function(){return e.loadLayout()})),i.Qc(36),i.gc(37,"translate"),i.Tb(),i.Ub(38,"button",19),i.bc("click",(function(){return e.resetLayout()})),i.Qc(39),i.gc(40,"translate"),i.Tb(),i.Tb(),i.Ub(41,"sb-menu",null,20),i.Ub(43,"button",21),i.bc("click",(function(){return e.openCalculators("pnl")})),i.Qc(44),i.gc(45,"translate"),i.Tb(),i.Ub(46,"button",21),i.bc("click",(function(){return e.openCalculators("liquidation")})),i.Qc(47),i.gc(48,"translate"),i.Tb(),i.Tb(),i.Ub(49,"sb-menu",null,22),i.Oc(51,ne,2,1,"ng-container",23),i.gc(52,"async"),i.Tb(),i.Oc(53,ce,23,24,"ng-template",null,24,i.Pc),i.Ub(55,"sb-popper",25,26),i.Oc(57,ue,3,2,"tour-step",27),i.Tb(),i.Ub(58,"sb-popper",25,28),i.Oc(60,le,3,3,"tour-step",29),i.Tb()),2&t){var n,r=i.Ac(42);i.mc("ngLet",i.hc(1,21,e.selectedTicker$)),i.Cb(7),i.mc("clipboard",e.email),i.Cb(1),i.Rc(e.email),i.Cb(1),i.mc("ngIf",e.env.demo&&e.email),i.Cb(2),i.Sc(" ",i.hc(12,23,"NAV.SETTINGS")," "),i.Cb(2),i.mc("ngIf",!(null!=e.userDetails&&e.userDetails.external)),i.Cb(1),i.mc("ngIf",null==(n=i.hc(15,25,e.subaccounts$))?null:n.length),i.Cb(2),i.mc("ngIf",e.isMobile),i.Cb(2),i.mc("ngIf",!e.env.demo),i.Cb(1),i.mc("sbMenuTriggerFor",r),i.Cb(1),i.Sc(" ",i.hc(21,27,"LABEL.TOOLS")," "),i.Cb(2),i.mc("ngIf",i.hc(23,29,e.externalNav$)),i.Cb(2),i.mc("ngIf",e.env.demo&&e.email),i.Cb(2),i.mc("ngIf",e.isNative||e.isMobile),i.Cb(2),i.Sc(" ",i.hc(29,31,"BUTTON.SIGNOUT")," "),i.Cb(5),i.Sc(" ",i.hc(34,33,"HEADING.LAYOUT_ACTIONS")," "),i.Cb(3),i.Sc(" ",i.hc(37,35,"BUTTON.LOAD")," "),i.Cb(3),i.Sc(" ",i.hc(40,37,"BUTTON.RESET")," "),i.Cb(5),i.Sc(" ",i.hc(45,39,"LABEL.PNL_CALCULATOR")," "),i.Cb(3),i.Sc(" ",i.hc(48,41,"LABEL.LIQUIDATION_CALCULATOR")," "),i.Cb(4),i.mc("ngIf",i.hc(52,43,e.externalNav$))}},directives:[M.a,D.a,R.a,j.a,L.a,N.a,U.a,F.n,B.a,I.e,z.a,V.b,F.l,H.a,q.b,$.a,Q.a,W.a,G.a,Y.b,I.g,I.f,K.a,Z.a,X.a,J.a,tt.a,et.a,nt.a,it.a,rt.a,ot.a,at.b,at.a,F.m,st.a,ct.a,ut.b,lt.a,dt.a,ht.a],pipes:[F.b,ht.d,ft.a,pt.a,pt.b,bt.a],styles:["fa-icon[_ngcontent-%COMP%]{color:var(--icon-colour)!important}.toolbar[_ngcontent-%COMP%]{max-height:46px;min-height:46px;padding:0 var(--spacing);background-color:var(--toolbar-colour);border:1px solid var(--border-colour);border-radius:var(--bdrs)}@media (min-width:1025px){.toolbar.is-trading[_ngcontent-%COMP%]{max-height:100px;min-height:100px}}.ticker-details[_ngcontent-%COMP%]{padding-top:var(--spacing-s);margin-top:var(--spacing-s);border-top:1px solid var(--border-colour);display:flex;width:100%;justify-content:space-between}@media (max-width:1024px){.ticker-details[_ngcontent-%COMP%]{display:none}}.main[_ngcontent-%COMP%]{justify-content:space-between;max-height:46px;min-height:46px}.main[_ngcontent-%COMP%], .main[_ngcontent-%COMP%] > section[_ngcontent-%COMP%]{display:flex;align-items:center}@media (max-width:1024px){.main[_ngcontent-%COMP%] > mat-menu[_ngcontent-%COMP%]{display:none!important}}market-dropdowns[_ngcontent-%COMP%]{margin-left:calc(var(--spacing) * -.5);margin-right:var(--spacing)}.market-details[_ngcontent-%COMP%]{flex-direction:row;flex:1}.market-details[_ngcontent-%COMP%] .action-detail[_ngcontent-%COMP%]{background:var(--form-input-colour);border-radius:var(--bdrs);padding:var(--spacing-xs) var(--spacing);cursor:pointer}.market-details[_ngcontent-%COMP%] position-summary[_ngcontent-%COMP%]{display:none}@media (min-width:1640px){.market-details[_ngcontent-%COMP%] position-summary[_ngcontent-%COMP%]{display:block}}.workspaces[_ngcontent-%COMP%]{display:flex;flex-direction:row;padding-right:var(--spacing-l);cursor:pointer}.workspaces[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-left:var(--spacing-l);font-size:12px;align-self:center}@media (min-width:1025px) and (max-width:1366px){.workspaces[_ngcontent-%COMP%] .workspace-label[_ngcontent-%COMP%]{display:none!important}}@media (min-width:1367px) and (max-width:1440px){.workspaces[_ngcontent-%COMP%] .workspace-label[_ngcontent-%COMP%]{display:none!important}}@media (min-width:1441px){.workspaces[_ngcontent-%COMP%] .workspace-label[_ngcontent-%COMP%]{display:none!important}}@media (max-width:1024px){.workspace-btn[_ngcontent-%COMP%], .workspaces[_ngcontent-%COMP%]{display:none!important}}.workspace-header[_ngcontent-%COMP%]{margin:var(--spacing) 0 0 var(--spacing)}.workspace-item[_ngcontent-%COMP%]{border-bottom:1px solid var(--border-colour);display:flex;flex-direction:row;padding:var(--spacing-xs)}.workspace-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:first-child{width:100%}.workspace-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}.workspace-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:var(--spacing-xs)}.tabs[_ngcontent-%COMP%]{height:100%;flex:1;margin:0 var(--spacing)}@media (max-width:1024px){.tabs[_ngcontent-%COMP%]{display:none!important}}.tabs__selector[_ngcontent-%COMP%]{flex:1}.tabs__selector[_ngcontent-%COMP%], .tabs__selector[_ngcontent-%COMP%] .tab[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center}.tabs__selector[_ngcontent-%COMP%] .tab[_ngcontent-%COMP%]{cursor:pointer;padding:0 var(--spacing);border-bottom:2px solid transparent}.tabs__selector[_ngcontent-%COMP%] .tab[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--input-colour);margin-top:2px;font-size:14px}.tabs__selector[_ngcontent-%COMP%] .tab[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-top:2px;margin-left:var(--spacing-s)}.tabs__selector[_ngcontent-%COMP%] .tab[_ngcontent-%COMP%] + .tab[_ngcontent-%COMP%]{margin-left:var(--spacing)}.tabs__selector[_ngcontent-%COMP%] .tab.active[_ngcontent-%COMP%]{border-bottom:2px solid var(--icon-colour);cursor:default}.tabs__selector[_ngcontent-%COMP%] .tab.active[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:700}.tabs__selector[_ngcontent-%COMP%] .tab.show-number[_ngcontent-%COMP%]{position:relative}.tabs__selector[_ngcontent-%COMP%] .tab.show-number[_ngcontent-%COMP%]:after{content:attr(data-layout-number);display:inline-block;position:absolute;bottom:0;right:0;padding:var(--spacing);font-family:var(--typeface);font-size:.8em;line-height:.5;color:var(--text-colour);border:1px solid var(--border-colour);border-radius:var(--bdrs);background-color:rgba(0,0,0,.8)}.tabs__selector[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{cursor:pointer;color:var(--icon-colour)}.tabs__selector[_ngcontent-%COMP%] > fa-icon[_ngcontent-%COMP%]{margin-left:var(--spacing)}.tabs__options[_ngcontent-%COMP%]{cursor:pointer}.spacer[_ngcontent-%COMP%]{flex-grow:1}@media (max-width:1024px){.spacer[_ngcontent-%COMP%]{display:none}}.total-equity[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;margin-right:var(--spacing)}.total-equity[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:var(--spacing);cursor:default}@media (max-width:1024px){.total-equity[_ngcontent-%COMP%]{display:none}}.equities[_ngcontent-%COMP%], .equities[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.equities[_ngcontent-%COMP%] .equity-classes[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-s) var(--spacing);align-items:baseline;padding-bottom:var(--spacing)}.equities[_ngcontent-%COMP%] .equity-classes[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:1.2em;text-align:right}.equities[_ngcontent-%COMP%] .crypto[_ngcontent-%COMP%]{padding:var(--spacing) 0;vertical-align:middle}.equities[_ngcontent-%COMP%] .crypto[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{font-size:24px}.equities[_ngcontent-%COMP%] .crypto[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:1.2em}@media (max-width:1024px){button[_ngcontent-%COMP%]:not(div.mat-menu-content > button).desktop-only[_ngcontent-%COMP%]{display:none}}@media (min-width:1025px){button[_ngcontent-%COMP%]:not(div.mat-menu-content > button).mobile-only[_ngcontent-%COMP%]{display:none}}.drawer[_ngcontent-%COMP%]{display:none}@media (max-width:1024px){.drawer[_ngcontent-%COMP%]{display:block}}.logo[_ngcontent-%COMP%]{display:block;height:22px;position:relative}.logo--mobile[_ngcontent-%COMP%]{display:none}@media (max-width:1024px){.logo--desktop[_ngcontent-%COMP%]{display:none}.logo--mobile[_ngcontent-%COMP%]{display:block}}@media (max-width:1024px){fusion-banner[_ngcontent-%COMP%]{display:none!important}}nav-link[_ngcontent-%COMP%], nav[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:flex}nav-link[_ngcontent-%COMP%]{border-bottom:2px solid transparent;align-items:center;cursor:pointer;height:43px;padding:0 var(--spacing);opacity:.7}nav-link[_ngcontent-%COMP%]:focus{outline:none}nav-link--active[_ngcontent-%COMP%]{color:var(--text-colour);border-bottom-color:currentColor;font-weight:400;cursor:default;opacity:1}nav-link[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{top:0!important}@media (max-width:1024px){nav[_ngcontent-%COMP%]{display:none!important}}nav-mobile[_ngcontent-%COMP%]{display:none!important}@media (max-width:1024px){nav-mobile[_ngcontent-%COMP%]{display:flex!important}}.menu[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-1px!important;top:-3px!important}@media (max-width:599px){.menu[_ngcontent-%COMP%]{text-align:right;padding-right:0}}.add-money[_ngcontent-%COMP%]{margin:0 var(--spacing)}@media (max-width:599px){.add-money[_ngcontent-%COMP%], .apps[_ngcontent-%COMP%], .email-label[_ngcontent-%COMP%]{display:none!important}}@media (max-width:599px){.signup[_ngcontent-%COMP%]{padding:0!important}}.loading-user[_ngcontent-%COMP%]{margin:0 var(--spacing)}@media (max-width:1024px){.platform-link[_ngcontent-%COMP%], .reset-layouts[_ngcontent-%COMP%], sb-divider[_ngcontent-%COMP%]{display:none!important}}@media (min-width:1367px) and (max-width:1440px){.email-label[_ngcontent-%COMP%], .server-time[_ngcontent-%COMP%]{display:none}}@media (min-width:1025px) and (max-width:1366px){.email-label[_ngcontent-%COMP%], .server-time[_ngcontent-%COMP%]{display:none}}.wallet-types[_ngcontent-%COMP%]{display:flex;flex-direction:row}@media (max-width:1024px){.wallet-types[_ngcontent-%COMP%]{display:none}}.wallet-types[_ngcontent-%COMP%] .wallet-type[_ngcontent-%COMP%]{margin:0 var(--spacing);padding:13px 13px 10px;cursor:pointer;color:var(--ghost-colour)!important}.wallet-types[_ngcontent-%COMP%] .wallet-type[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--ghost-colour)!important;margin-right:var(--spacing-s);top:1px;position:relative}.wallet-types[_ngcontent-%COMP%] .wallet-type[_ngcontent-%COMP%]:first-child{margin-left:var(--spacing-xl)}.wallet-types[_ngcontent-%COMP%] .wallet-type.active[_ngcontent-%COMP%]{border-bottom:2px solid var(--input-colour)}.wallet-types[_ngcontent-%COMP%] .wallet-type.active[_ngcontent-%COMP%], .wallet-types[_ngcontent-%COMP%] .wallet-type.active[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--input-colour)!important}.wallet-types[_ngcontent-%COMP%] .wallet-type.disabled[_ngcontent-%COMP%]{cursor:not-allowed}.favorite[_ngcontent-%COMP%]{cursor:pointer;margin-right:var(--spacing)}@media (max-width:1024px){.favorite[_ngcontent-%COMP%]{display:none}}.market-details[_ngcontent-%COMP%]{display:flex;width:100%}flex-position[_ngcontent-%COMP%]{margin:0 var(--spacing)}@media (max-width:1024px){flex-position[_ngcontent-%COMP%]{display:none}}.grid-components[_ngcontent-%COMP%], .workspace-menu[_ngcontent-%COMP%]{padding:var(--spacing)}.workspace-menu[_ngcontent-%COMP%]{width:400px}.workspace-menu[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{padding:var(--spacing)}.workspace-menu[_ngcontent-%COMP%] mat-radio-button[_ngcontent-%COMP%]:first-child{margin-right:var(--spacing)}.lock-icon[_ngcontent-%COMP%]{vertical-align:baseline!important}"],changeDetection:0}),t}()},Aey0:function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n("kZht"),r=n("KQpv"),o=n.n(r),a=n("yN5A"),s=n("ylpo"),c=n("NloN"),u=n("6NrZ"),l=n("zqNl"),d=o()("app:service:layout"),h=function(){var t=function(){function t(e){C(this,t),this.store=e,this.openPicker$=new i.o,this.setOriginal()}return w(t,[{key:"setOriginal",value:function(){this.options=Object(c.b)(s.i,u.b),this.currentLayoutItems=Object(c.b)(s.h,u.a),this.originalLayoutItems=u.a.map((function(t){return Object.assign({},t)})),this.options.draggable=Object.assign(Object.assign({},this.options.draggable),{start:function(){return Object(u.e)()},stop:function(){return Object(u.d)()}}),this.options.resizable=Object.assign(Object.assign({},this.options.resizable),{start:function(){return Object(u.e)()},stop:function(){return Object(u.d)()}})}},{key:"saveLayout",value:function(){Object(c.c)(s.i,this.options),Object(c.c)(s.h,this.currentLayoutItems)}},{key:"optionsChanged",value:function(){var t;(null===(t=this.options.api)||void 0===t?void 0:t.optionsChanged)&&this.options.api.optionsChanged()}},{key:"pushItem",value:function(t){this.currentLayoutItems.push(t),this.optionsChanged()}},{key:"removeItem",value:function(t){this.currentLayoutItems=this.currentLayoutItems.filter((function(e){return e.id!==t.id})),this.options=u.b,this.optionsChanged()}},{key:"resetLayout",value:function(){this.currentLayoutItems=this.originalLayoutItems.map((function(t){return Object.assign({},t)})),this.optionsChanged()}},{key:"toggleLayoutLock",value:function(){var t=this.gridUnlocked;this.options=Object.assign(Object.assign({},this.options),{draggable:Object.assign(Object.assign({},this.options.draggable),{enabled:!t,dragHandleClass:"draggable",ignoreContent:!0,start:function(){return Object(u.e)()},stop:function(){return Object(u.d)()}}),resizable:Object.assign(Object.assign({},this.options.resizable),{enabled:!t,start:function(){return Object(u.e)()},stop:function(){return Object(u.d)()}}),editEnabled:!t})}},{key:"goToIdx",value:function(t){var e=Object(c.b)(s.v,[]),n=Math.min(t,e.length-1);d("going to layout idx",n),this.store.dispatch(Object(a.j)({id:e[n].id}))}},{key:"gridUnlocked",get:function(){var t;return(null===(t=this.options.draggable)||void 0===t?void 0:t.enabled)||!1}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(l.b))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},AlFj:function(t,e,n){"use strict";n.r(e),n.d(e,"WalletTransactionComponent",(function(){return ct}));var i=n("D57K"),r=n("3kIJ"),o=n("mcff"),a=n("gxtV"),s=n("zqNl"),c=n("C05f"),u=n("QQZH"),l=n("YtkY"),d=n("w0kG"),h=n("xVbo"),f=n("i67J"),p=n("rxqU"),b=n("J/3c"),g=n("sXtk"),v=n("R1aX"),y=n("MUfl"),_=n("uJYd"),O=n("bjK4"),k=n("nXdR"),T=n("qAYy"),S=n("+Px6"),E=n("+axt"),x=n("lE9u"),P=n("kZht"),A=n("rfPA"),I=n("bBQR"),M=n("anSm"),D=n("EmXI"),R=n("aDqW"),j=n("IOEv"),L=n("An66"),N=n("yPvj"),U=n("yvKM"),F=n("LBlH"),B=n("y1fC"),z=n("pPqe"),V=n("pTnX"),H=n("pbVI"),q=n("7erP"),$=n("2YH/"),Q=n("ka3Y"),W=n("w2Kr"),G=n("1etq"),Y=n("fvDn"),K=["depositTourPopper"],Z=["transferTourPopper"],X=["tourPositionRef"];function J(t,e){if(1&t&&(P.Ub(0,"mat-option",22),P.Qc(1),P.gc(2,"cryptoName"),P.gc(3,"cryptoAbbreviation"),P.Tb()),2&t){var n=e.$implicit;P.mc("value",n),P.Cb(1),P.Tc(" ",P.hc(2,3,n)," (",P.hc(3,5,n),") ")}}function tt(t,e){if(1&t){var n=P.Vb();P.Ub(0,"mat-button-toggle",23),P.bc("click",(function(){return P.Ec(n),P.fc().type="crypto-transfer"})),P.Qc(1),P.gc(2,"translate"),P.Tb()}2&t&&(P.Cb(1),P.Sc(" ",P.hc(2,1,"WALLETS.FUTURES.TRANSFER")," "))}function et(t,e){if(1&t){var n=P.Vb();P.Ub(0,"mat-button-toggle",24),P.bc("click",(function(){return P.Ec(n),P.fc().type="subaccount-transfer"})),P.Qc(1),P.gc(2,"translate"),P.Tb()}2&t&&(P.Cb(1),P.Sc(" ",P.hc(2,1,"WALLETS.FUTURES.SUBACCOUNT_TRANSFER")," "))}function nt(t,e){if(1&t&&(P.Pb(0,"crypto-deposit-form",25),P.gc(1,"async"),P.gc(2,"async")),2&t){var n=P.fc();P.mc("selected",P.hc(1,2,n.initialHolding$))("userDetails",P.hc(2,4,n.userDetails$))}}function it(t,e){if(1&t&&(P.Pb(0,"crypto-withdraw-form",26),P.gc(1,"async"),P.gc(2,"async"),P.gc(3,"async")),2&t){var n=P.fc();P.mc("selected",n.withdrawEnabled?n.inputs.originWallet:P.hc(1,3,n.initialHolding$))("userDetails",P.hc(2,5,n.userDetails$))("isSubAccount",P.hc(3,7,n.isSubAccount$))}}function rt(t,e){if(1&t&&(P.Pb(0,"crypto-transfer-form",27),P.gc(1,"async"),P.gc(2,"async"),P.gc(3,"async"),P.gc(4,"async"),P.gc(5,"async"),P.gc(6,"async"),P.gc(7,"async")),2&t){var n=P.fc();P.mc("selected",P.hc(1,7,n.initial$))("wallets",P.hc(2,9,n.wallets$))("flexEnabled",P.hc(3,11,n.flexEnabled$))("price",P.hc(4,13,n.initialPrice$))("ticker",P.hc(5,15,n.initialTicker$))("market",P.hc(6,17,n.initialMarket$))("loading",P.hc(7,19,n.loading$))}}function ot(t,e){if(1&t&&(P.Pb(0,"subaccount-transfer-form",28),P.gc(1,"async"),P.gc(2,"async"),P.gc(3,"async"),P.gc(4,"async"),P.gc(5,"async"),P.gc(6,"async"),P.gc(7,"async"),P.gc(8,"async")),2&t){var n=P.fc();P.mc("uid",P.hc(1,9,n.uid$))("selectedSub",n.inputs.subAccount)("selected",P.hc(2,11,n.initial$))("wallets",P.hc(3,13,n.wallets$))("subAccounts",P.hc(4,15,n.subaccounts$))("email",P.hc(5,17,n.email$))("ticker",P.hc(6,19,n.initialTicker$))("market",P.hc(7,21,n.initialMarket$))("flexEnabled",P.hc(8,23,n.flexEnabled$))}}function at(t,e){if(1&t){var n=P.Vb();P.Ub(0,"tour-step",29),P.bc("nextEvent",(function(){return P.Ec(n),P.fc().closeDialog()}))("previousEvent",(function(){return P.Ec(n),P.fc().closeDialog()}))("dispose",(function(){return P.Ec(n),P.fc(),P.Ac(27).dispose()})),P.Ub(1,"p",30),P.Qc(2,"TOUR.WALLETS.DEPOSIT.1"),P.Tb(),P.Tb()}2&t&&P.mc("title","HEADING.DEPOSITING_FUNDS")}function st(t,e){if(1&t){var n=P.Vb();P.Ub(0,"tour-step",29),P.bc("nextEvent",(function(){return P.Ec(n),P.fc().closeDialog()}))("previousEvent",(function(){return P.Ec(n),P.fc().closeDialog()}))("dispose",(function(){return P.Ec(n),P.fc(),P.Ac(30).dispose()})),P.Ub(1,"p",30),P.Qc(2,"TOUR.WALLETS.TRANSFER.1"),P.Tb(),P.Tb()}2&t&&P.mc("title","HEADING.TRANSFERRING_BETWEEN")}var ct=function(){var t=function(){function t(e,n,i,r,o){C(this,t),this.inputs=e,this.store=n,this.formBuilder=i,this.env=r,this.feature=o,this.type=this.inputs.type,this.loading$=this.store.pipe(Object(s.m)(O.m,{filter:x.y.type})),this.initial$=new c.a(this.inputs.originWallet),this.initialHolding$=new u.a(1),this.wallets$=this.store.pipe(Object(s.m)(b.r)),this.holdingWallets$=this.store.pipe(Object(s.m)(b.m)),this.assets$=this.holdingWallets$.pipe(Object(l.a)((function(t){return t.keySeq().toArray().sort(k.m)}))),this.externalUser$=this.store.pipe(Object(s.m)(p.l)),this.userDetails$=this.store.pipe(Object(s.m)(p.d)),this.subaccounts$=this.store.pipe(Object(s.m)(p.t)),this.isSubAccount$=this.store.pipe(Object(s.m)(p.n)),this.uid$=this.store.pipe(Object(s.m)(p.j)),this.email$=this.store.pipe(Object(s.m)(p.e)),this.flexEnabled$=this.store.pipe(Object(s.m)(b.f)),this.userVerification$=this.store.pipe(Object(s.m)(v.f)),this.futuresMarkets$=this.store.pipe(Object(s.m)(S.f)),this.tickers$=this.store.pipe(Object(s.m)(T.g)),this.tour$=this.store.pipe(Object(s.m)(O.k)),this.prices$=this.store.pipe(Object(s.m)(E.a)),this.initialPrice$=this.initialHolding$.pipe(Object(d.a)(this.prices$),Object(l.a)((function(t){var e,n=m(t,2),i=n[0];return null===(e=n[1].get(i.currency))||void 0===e?void 0:e.price}))),this.initialTicker$=this.initialHolding$.pipe(Object(d.a)(this.tickers$),Object(l.a)((function(t){var e=m(t,2),n=e[0];return e[1].get("PI_".concat(n.currency,"USD"))}))),this.initialMarket$=this.initialHolding$.pipe(Object(d.a)(this.futuresMarkets$),Object(l.a)((function(t){var e=m(t,2),n=e[0];return e[1].get("PI_".concat(n.currency,"USD"))})))}return w(t,[{key:"ngOnInit",value:function(){var t=this,e=this.inputs.originWallet.currency,n="BTC"===e?"XBT":e;this.form=this.formBuilder.group({asset:[n,r.x.required]}),this.holdingWallets$.pipe(Object(f.h)(),Object(a.b)(this)).subscribe((function(e){t.initialHolding$.next(e.get(n))}))}},{key:"ngAfterViewInit",value:function(){var t=this;this.tour$.pipe(Object(a.b)(this),Object(h.a)((function(t){return t.inProgress})),Object(h.a)((function(t){return"wallets"===t.type})),Object(h.a)((function(t){var e=t.step;return 2===e||4===e}))).subscribe((function(e){var n=e.step;2===n?t.depositTourPopper.componentTrigger(t.tourPositionRef,"centerEnd"):4===n&&t.transferTourPopper.componentTrigger(t.tourPositionRef,"centerEnd")}))}},{key:"setInitial",value:function(t){var e=this;this.holdingWallets$.pipe(Object(f.h)(),Object(a.b)(this)).subscribe((function(n){e.initial$.next(n.get(t)),e.initialHolding$.next(n.get(t))}))}},{key:"closeDialog",value:function(){this.store.dispatch(Object(_.c)())}},{key:"changeTab",value:function(t){(!this.demo||"withdraw"!==t&&"deposit"!==t)&&(this.type=t)}},{key:"demo",get:function(){return this.env.demo}},{key:"withdrawEnabled",get:function(){return this.feature.isEnabled("transferDestination")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(P.Ob(o.a),P.Ob(s.b),P.Ob(r.d),P.Ob(g.a),P.Ob(y.a))},t.\u0275cmp=P.Ib({type:t,selectors:[["wallet-transaction"]],viewQuery:function(t,e){var n;1&t&&(P.Jc(K,!0),P.Jc(Z,!0),P.Jc(X,!0)),2&t&&(P.zc(n=P.cc())&&(e.depositTourPopper=n.first),P.zc(n=P.cc())&&(e.transferTourPopper=n.first),P.zc(n=P.cc())&&(e.tourPositionRef=n.first))},decls:32,vars:25,consts:[["heading","LABEL.FUNDS_TRANSFER",3,"loading"],["body","",3,"formGroup"],["color","accent","appearance","fill",1,"asset-select"],["translate",""],["matNativeControl","","formControlName","asset",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf"],["matPrefix","",1,"form-icon",3,"base"],["body","",3,"value"],["value","deposit","translate","",3,"disabled","click"],["value","withdraw","translate","",3,"disabled","click"],["value","crypto-transfer","translate","",3,"click",4,"ngIf"],["value","subaccount-transfer","translate","",3,"click",4,"ngIf"],[1,"transaction-form"],["tourPositionRef",""],[3,"selected","userDetails",4,"ngIf"],[3,"selected","userDetails","isSubAccount",4,"ngIf"],[3,"selected","wallets","flexEnabled","price","ticker","market","loading",4,"ngIf"],[3,"uid","selectedSub","selected","wallets","subAccounts","email","ticker","market","flexEnabled",4,"ngIf"],["sbPlacement","topStart"],["depositTourPopper",""],[3,"title","nextEvent","previousEvent","dispose",4,"sbContent"],["transferTourPopper",""],[3,"value"],["value","crypto-transfer","translate","",3,"click"],["value","subaccount-transfer","translate","",3,"click"],[3,"selected","userDetails"],[3,"selected","userDetails","isSubAccount"],[3,"selected","wallets","flexEnabled","price","ticker","market","loading"],[3,"uid","selectedSub","selected","wallets","subAccounts","email","ticker","market","flexEnabled"],[3,"title","nextEvent","previousEvent","dispose"],["subheading","","translate",""]],template:function(t,e){var n;1&t&&(P.Ub(0,"pro-dialog",0),P.gc(1,"async"),P.Ub(2,"form",1),P.Ub(3,"mat-form-field",2),P.Ub(4,"mat-label",3),P.Qc(5,"LABEL.ASSET"),P.Tb(),P.Ub(6,"mat-select",4),P.bc("selectionChange",(function(t){return e.setInitial(t.value)})),P.Oc(7,J,4,7,"mat-option",5),P.gc(8,"async"),P.Tb(),P.Pb(9,"market-icon",6),P.gc(10,"async"),P.Tb(),P.Tb(),P.Ub(11,"mat-button-toggle-group",7),P.Ub(12,"mat-button-toggle",8),P.bc("click",(function(){return e.changeTab("deposit")})),P.Qc(13),P.gc(14,"translate"),P.Tb(),P.Ub(15,"mat-button-toggle",9),P.bc("click",(function(){return e.changeTab("withdraw")})),P.Qc(16),P.gc(17,"translate"),P.Tb(),P.Oc(18,tt,3,3,"mat-button-toggle",10),P.Oc(19,et,3,3,"mat-button-toggle",11),P.Tb(),P.Ub(20,"div",12,13),P.Oc(22,nt,3,6,"crypto-deposit-form",14),P.Oc(23,it,4,9,"crypto-withdraw-form",15),P.Oc(24,rt,8,21,"crypto-transfer-form",16),P.Oc(25,ot,9,25,"subaccount-transfer-form",17),P.Tb(),P.Tb(),P.Ub(26,"sb-popper",18,19),P.Oc(28,at,3,1,"tour-step",20),P.Tb(),P.Ub(29,"sb-popper",18,21),P.Oc(31,st,3,1,"tour-step",20),P.Tb()),2&t&&(P.mc("loading",P.hc(1,15,e.loading$)),P.Cb(2),P.mc("formGroup",e.form),P.Cb(5),P.mc("ngForOf",P.hc(8,17,e.assets$)),P.Cb(2),P.mc("base",null==(n=P.hc(10,19,e.initial$))?null:n.currency),P.Cb(2),P.mc("value",e.type),P.Cb(1),P.mc("disabled",e.demo),P.Cb(1),P.Sc(" ",P.hc(14,21,"WALLETS.FUTURES.DEPOSIT")," "),P.Cb(2),P.mc("disabled",e.demo),P.Cb(1),P.Sc(" ",P.hc(17,23,"WALLETS.FUTURES.WITHDRAWAL")," "),P.Cb(2),P.mc("ngIf",!e.inputs.subAccount),P.Cb(1),P.mc("ngIf",e.inputs.subAccount),P.Cb(3),P.mc("ngIf","deposit"===e.type),P.Cb(1),P.mc("ngIf","withdraw"===e.type),P.Cb(1),P.mc("ngIf","crypto-transfer"===e.type),P.Cb(1),P.mc("ngIf","subaccount-transfer"===e.type))},directives:[A.a,I.a,r.z,r.p,M.a,r.h,D.c,D.f,R.a,j.a,r.o,r.g,L.m,N.a,D.g,U.b,U.a,L.n,F.a,B.a,z.a,V.n,H.a,q.a,$.a,Q.a,W.a,G.a],pipes:[L.b,R.d,Y.b,Y.a],styles:["[_nghost-%COMP%]{display:block;width:520px}@media (max-width:1024px){[_nghost-%COMP%]{height:100%;width:100%}}.asset-select[_ngcontent-%COMP%]{width:100%}.transaction-form[_ngcontent-%COMP%]{margin-top:var(--spacing)}"],changeDetection:0}),t=Object(i.d)([Object(a.a)()],t)}()},Amke:function(t,e,n){var i=n("yBEi"),r=i.getBCHDigit(1335);e.getEncodedBits=function(t,e){for(var n=t.bit<<3|e,o=n<<10;i.getBCHDigit(o)-r>=0;)o^=1335<0&&void 0!==arguments[0]&&arguments[0],e=this._platformLocation.pathname+k(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?"".concat(e).concat(n):e}},{key:"pushState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+k(i));this._platformLocation.pushState(t,e,r)}},{key:"replaceState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+k(i));this._platformLocation.replaceState(t,e,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(T);return t.\u0275fac=function(e){return new(e||t)(i.Yb(h),i.Yb(E,8))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),P=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this))._platformLocation=t,r._baseHref="",null!=i&&(r._baseHref=i),r}return w(n,[{key:"onPopState",value:function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"path",value:function(){var t=this._platformLocation.hash;return null==t&&(t="#"),t.length>0?t.substring(1):t}},{key:"prepareExternalUrl",value:function(t){var e=_(this._baseHref,t);return e.length>0?"#"+e:e}},{key:"pushState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+k(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(t,e,r)}},{key:"replaceState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+k(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(T);return t.\u0275fac=function(e){return new(e||t)(i.Yb(h),i.Yb(E,8))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),A=function(){var t=function(){function t(e,n){var r=this;C(this,t),this._subject=new i.o,this._urlChangeListeners=[],this._platformStrategy=e;var o=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=O(M(o)),this._platformStrategy.onPopState((function(t){r._subject.emit({url:r.path(!0),pop:!0,state:t.state,type:t.type})}))}return w(t,[{key:"path",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.normalize(this._platformStrategy.path(t))}},{key:"getState",value:function(){return this._platformLocation.getState()}},{key:"isCurrentPathEqualTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.path()==this.normalize(t+k(e))}},{key:"normalize",value:function(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,M(e)))}},{key:"prepareExternalUrl",value:function(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}},{key:"go",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+k(e)),n)}},{key:"replaceState",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+k(e)),n)}},{key:"forward",value:function(){this._platformStrategy.forward()}},{key:"back",value:function(){this._platformStrategy.back()}},{key:"onUrlChange",value:function(t){var e=this;this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe((function(t){e._notifyUrlChangeListeners(t.url,t.state)})))}},{key:"_notifyUrlChangeListeners",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;this._urlChangeListeners.forEach((function(n){return n(t,e)}))}},{key:"subscribe",value:function(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(T),i.Yb(h))},t.normalizeQueryParams=k,t.joinWithSlash=_,t.stripTrailingSlash=O,t.\u0275prov=Object(i.Kb)({factory:I,token:t,providedIn:"root"}),t}();function I(){return new A(Object(i.Yb)(T),Object(i.Yb)(h))}function M(t){return t.replace(/\/index.html$/,"")}var D=function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t}({}),R=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),j=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}({}),L=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}({}),N=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}({}),U=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}({});function F(t,e){return Q(Object(i.mb)(t)[i.cb.DateFormat],e)}function B(t,e){return Q(Object(i.mb)(t)[i.cb.TimeFormat],e)}function z(t,e){return Q(Object(i.mb)(t)[i.cb.DateTimeFormat],e)}function V(t,e){var n=Object(i.mb)(t),r=n[i.cb.NumberSymbols][e];if(void 0===r){if(e===U.CurrencyDecimal)return n[i.cb.NumberSymbols][U.Decimal];if(e===U.CurrencyGroup)return n[i.cb.NumberSymbols][U.Group]}return r}function H(t,e){return Object(i.mb)(t)[i.cb.NumberFormats][e]}var q=i.pb;function $(t){if(!t[i.cb.ExtraData])throw new Error('Missing extra locale data for the locale "'.concat(t[i.cb.LocaleId],'". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.'))}function Q(t,e){for(var n=e;n>-1;n--)if(void 0!==t[n])return t[n];throw new Error("Locale data API: locale data undefined")}function W(t){var e=m(t.split(":"),2);return{hours:+e[0],minutes:+e[1]}}var G=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Y={},K=/((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,Z=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}({}),X=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}({}),J=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}({});function tt(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,(function(t,n){return null!=e&&n in e?e[n]:t}))),t}function et(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,o="";(t<0||r&&t<=0)&&(r?t=1-t:(t=-t,o=n));for(var a=String(t);a.length2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return function(o,a){var s,c=function(t,e){switch(t){case X.FullYear:return e.getFullYear();case X.Month:return e.getMonth();case X.Date:return e.getDate();case X.Hours:return e.getHours();case X.Minutes:return e.getMinutes();case X.Seconds:return e.getSeconds();case X.FractionalSeconds:return e.getMilliseconds();case X.Day:return e.getDay();default:throw new Error('Unknown DateType value "'.concat(t,'".'))}}(t,o);if((n>0||c>-n)&&(c+=n),t===X.Hours)0===c&&-12===n&&(c=12);else if(t===X.FractionalSeconds)return s=e,et(c,3).substr(0,s);var u=V(a,U.MinusSign);return et(c,e,u,i,r)}}function it(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:j.Format,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(o,a){return function(t,e,n,r,o,a){switch(n){case J.Months:return function(t,e,n){var r=Object(i.mb)(t),o=Q([r[i.cb.MonthsFormat],r[i.cb.MonthsStandalone]],e);return Q(o,n)}(e,o,r)[t.getMonth()];case J.Days:return function(t,e,n){var r=Object(i.mb)(t),o=Q([r[i.cb.DaysFormat],r[i.cb.DaysStandalone]],e);return Q(o,n)}(e,o,r)[t.getDay()];case J.DayPeriods:var s=t.getHours(),c=t.getMinutes();if(a){var u=function(t){var e=Object(i.mb)(t);return $(e),(e[i.cb.ExtraData][2]||[]).map((function(t){return"string"==typeof t?W(t):[W(t[0]),W(t[1])]}))}(e),l=function(t,e,n){var r=Object(i.mb)(t);$(r);var o=Q([r[i.cb.ExtraData][0],r[i.cb.ExtraData][1]],e)||[];return Q(o,n)||[]}(e,o,r),d=u.findIndex((function(t){if(Array.isArray(t)){var e=m(t,2),n=e[0],i=e[1],r=s>=n.hours&&c>=n.minutes,o=s0?Math.floor(r/60):Math.ceil(r/60);switch(t){case Z.Short:return(r>=0?"+":"")+et(a,2,o)+et(Math.abs(r%60),2,o);case Z.ShortGMT:return"GMT"+(r>=0?"+":"")+et(a,1,o);case Z.Long:return"GMT"+(r>=0?"+":"")+et(a,2,o)+":"+et(Math.abs(r%60),2,o);case Z.Extended:return 0===i?"Z":(r>=0?"+":"")+et(a,2,o)+":"+et(Math.abs(r%60),2,o);default:throw new Error('Unknown zone width "'.concat(t,'"'))}}}function ot(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n,i){var r,o,a,s;if(e){var c=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,u=n.getDate();r=1+Math.floor((u+c)/7)}else{var l=(s=n,new Date(s.getFullYear(),s.getMonth(),s.getDate()+(4-s.getDay()))),d=(o=l.getFullYear(),a=new Date(o,0,1).getDay(),new Date(o,0,1+(a<=4?4:11)-a)),h=l.getTime()-d.getTime();r=1+Math.round(h/6048e5)}return et(r,t,V(i,U.MinusSign))}}var at={};function st(t,e){t=t.replace(/:/g,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function ct(t){return t instanceof Date&&!isNaN(t.valueOf())}var ut=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function lt(t,e,n,i,r,o){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s="",c=!1;if(isFinite(t)){var u=function(t){var e,n,i,r,o,a=Math.abs(t)+"",s=0;for((n=a.indexOf("."))>-1&&(a=a.replace(".","")),(i=a.search(/e/i))>0?(n<0&&(n=i),n+=+a.slice(i+1),a=a.substring(0,i)):n<0&&(n=a.length),i=0;"0"===a.charAt(i);i++);if(i===(o=a.length))e=[0],n=1;else{for(o--;"0"===a.charAt(o);)o--;for(n-=i,e=[],r=0;i<=o;i++,r++)e[r]=Number(a.charAt(i))}return n>22&&(e=e.splice(0,21),s=n-1,n=1),{digits:e,exponent:s,integerLen:n}}(t);a&&(u=function(t){if(0===t.digits[0])return t;var e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(u));var l=e.minInt,d=e.minFrac,h=e.maxFrac;if(o){var f=o.match(ut);if(null===f)throw new Error(o+" is not a valid digit info");var p=f[1],b=f[3],g=f[5];null!=p&&(l=ht(p)),null!=b&&(d=ht(b)),null!=g?h=ht(g):null!=b&&d>h&&(h=d)}!function(t,e,n){if(e>n)throw new Error("The minimum number of digits after fraction (".concat(e,") is higher than the maximum (").concat(n,")."));var i=t.digits,r=i.length-t.integerLen,o=Math.min(Math.max(e,r),n),a=o+t.integerLen,s=i[a];if(a>0){i.splice(Math.max(t.integerLen,a));for(var c=a;c=5)if(a-1<0){for(var l=0;l>a;l--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[a-1]++;for(;r=h?i.pop():d=!1),e>=10?1:0}),0);f&&(i.unshift(f),t.integerLen++)}(u,d,h);var m=u.digits,v=u.integerLen,y=u.exponent,_=[];for(c=m.every((function(t){return!t}));v0?_=m.splice(v,m.length):(_=m,m=[0]);var O=[];for(m.length>=e.lgSize&&O.unshift(m.splice(-e.lgSize,m.length).join(""));m.length>e.gSize;)O.unshift(m.splice(-e.gSize,m.length).join(""));m.length&&O.unshift(m.join("")),s=O.join(V(n,i)),_.length&&(s+=V(n,r)+_.join("")),y&&(s+=V(n,U.Exponential)+"+"+y)}else s=V(n,U.Infinity);return s=t<0&&!c?e.negPre+s+e.negSuf:e.posPre+s+e.posSuf}function dt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(";"),r=i[0],o=i[1],a=-1!==r.indexOf(".")?r.split("."):[r.substring(0,r.lastIndexOf("0")+1),r.substring(r.lastIndexOf("0")+1)],s=a[0],c=a[1]||"";n.posPre=s.substr(0,s.indexOf("#"));for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:"mediumDate",r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;if(null==e||""===e||e!=e)return null;try{return function(t,e,n,r){var o=function(t){if(ct(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){t=t.trim();var e,n=parseFloat(t);if(!isNaN(t-n))return new Date(n);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){var i=m(t.split("-").map((function(t){return+t})),3),r=i[0],o=i[1],a=i[2];return new Date(r,o-1,a)}if(e=t.match(G))return function(t){var e=new Date(0),n=0,i=0,r=t[8]?e.setUTCFullYear:e.setFullYear,o=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),i=Number(t[9]+t[11])),r.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));var a=Number(t[4]||0)-n,s=Number(t[5]||0)-i,c=Number(t[6]||0),u=Math.round(1e3*parseFloat("0."+(t[7]||0)));return o.call(e,a,s,c,u),e}(e)}var s=new Date(t);if(!ct(s))throw new Error('Unable to convert "'.concat(t,'" into a date'));return s}(t);e=function t(e,n){var r=function(t){return Object(i.mb)(t)[i.cb.LocaleId]}(e);if(Y[r]=Y[r]||{},Y[r][n])return Y[r][n];var o="";switch(n){case"shortDate":o=F(e,N.Short);break;case"mediumDate":o=F(e,N.Medium);break;case"longDate":o=F(e,N.Long);break;case"fullDate":o=F(e,N.Full);break;case"shortTime":o=B(e,N.Short);break;case"mediumTime":o=B(e,N.Medium);break;case"longTime":o=B(e,N.Long);break;case"fullTime":o=B(e,N.Full);break;case"short":var a=t(e,"shortTime"),s=t(e,"shortDate");o=tt(z(e,N.Short),[a,s]);break;case"medium":var c=t(e,"mediumTime"),u=t(e,"mediumDate");o=tt(z(e,N.Medium),[c,u]);break;case"long":var l=t(e,"longTime"),d=t(e,"longDate");o=tt(z(e,N.Long),[l,d]);break;case"full":var h=t(e,"fullTime"),f=t(e,"fullDate");o=tt(z(e,N.Full),[h,f])}return o&&(Y[r][n]=o),o}(n,e)||e;for(var a,s=[];e;){if(!(a=K.exec(e))){s.push(e);break}var c=(s=s.concat(a.slice(1))).pop();if(!c)break;e=c}var u=o.getTimezoneOffset();r&&(u=st(r,u),o=function(t,e,n){var i=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(st(e,i)-i))}(o,r));var l="";return s.forEach((function(t){var e=function(t){if(at[t])return at[t];var e;switch(t){case"G":case"GG":case"GGG":e=it(J.Eras,L.Abbreviated);break;case"GGGG":e=it(J.Eras,L.Wide);break;case"GGGGG":e=it(J.Eras,L.Narrow);break;case"y":e=nt(X.FullYear,1,0,!1,!0);break;case"yy":e=nt(X.FullYear,2,0,!0,!0);break;case"yyy":e=nt(X.FullYear,3,0,!1,!0);break;case"yyyy":e=nt(X.FullYear,4,0,!1,!0);break;case"M":case"L":e=nt(X.Month,1,1);break;case"MM":case"LL":e=nt(X.Month,2,1);break;case"MMM":e=it(J.Months,L.Abbreviated);break;case"MMMM":e=it(J.Months,L.Wide);break;case"MMMMM":e=it(J.Months,L.Narrow);break;case"LLL":e=it(J.Months,L.Abbreviated,j.Standalone);break;case"LLLL":e=it(J.Months,L.Wide,j.Standalone);break;case"LLLLL":e=it(J.Months,L.Narrow,j.Standalone);break;case"w":e=ot(1);break;case"ww":e=ot(2);break;case"W":e=ot(1,!0);break;case"d":e=nt(X.Date,1);break;case"dd":e=nt(X.Date,2);break;case"E":case"EE":case"EEE":e=it(J.Days,L.Abbreviated);break;case"EEEE":e=it(J.Days,L.Wide);break;case"EEEEE":e=it(J.Days,L.Narrow);break;case"EEEEEE":e=it(J.Days,L.Short);break;case"a":case"aa":case"aaa":e=it(J.DayPeriods,L.Abbreviated);break;case"aaaa":e=it(J.DayPeriods,L.Wide);break;case"aaaaa":e=it(J.DayPeriods,L.Narrow);break;case"b":case"bb":case"bbb":e=it(J.DayPeriods,L.Abbreviated,j.Standalone,!0);break;case"bbbb":e=it(J.DayPeriods,L.Wide,j.Standalone,!0);break;case"bbbbb":e=it(J.DayPeriods,L.Narrow,j.Standalone,!0);break;case"B":case"BB":case"BBB":e=it(J.DayPeriods,L.Abbreviated,j.Format,!0);break;case"BBBB":e=it(J.DayPeriods,L.Wide,j.Format,!0);break;case"BBBBB":e=it(J.DayPeriods,L.Narrow,j.Format,!0);break;case"h":e=nt(X.Hours,1,-12);break;case"hh":e=nt(X.Hours,2,-12);break;case"H":e=nt(X.Hours,1);break;case"HH":e=nt(X.Hours,2);break;case"m":e=nt(X.Minutes,1);break;case"mm":e=nt(X.Minutes,2);break;case"s":e=nt(X.Seconds,1);break;case"ss":e=nt(X.Seconds,2);break;case"S":e=nt(X.FractionalSeconds,1);break;case"SS":e=nt(X.FractionalSeconds,2);break;case"SSS":e=nt(X.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=rt(Z.Short);break;case"ZZZZZ":e=rt(Z.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=rt(Z.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=rt(Z.Long);break;default:return null}return at[t]=e,e}(t);l+=e?e(o,n,u):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")})),l}(e,n,o||this.locale,r)}catch(a){throw Pt(t,a.message)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.w))},t.\u0275pipe=i.Nb({name:"date",type:t,pure:!0}),t}(),Ut=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){return JSON.stringify(t,null,2)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Nb({name:"json",type:t,pure:!1}),t}(),Ft=function(){var t=function(){function t(e){C(this,t),this._locale=e}return w(t,[{key:"transform",value:function(e,n,i){if(zt(e))return null;i=i||this._locale;try{return function(t,e,n){return lt(t,dt(H(e,D.Decimal),V(e,U.MinusSign)),e,U.Group,U.Decimal,n)}(Vt(e),i,n)}catch(r){throw Pt(t,r.message)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.w))},t.\u0275pipe=i.Nb({name:"number",type:t,pure:!0}),t}(),Bt=function(){var t=function(){function t(e){C(this,t),this._locale=e}return w(t,[{key:"transform",value:function(e,n,i){if(zt(e))return null;i=i||this._locale;try{return function(t,e,n){return lt(t,dt(H(e,D.Percent),V(e,U.MinusSign)),e,U.Group,U.Decimal,n,!0).replace(new RegExp("%","g"),V(e,U.PercentSign))}(Vt(e),i,n)}catch(r){throw Pt(t,r.message)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.w))},t.\u0275pipe=i.Nb({name:"percent",type:t,pure:!0}),t}();function zt(t){return null==t||""===t||t!=t}function Vt(t){if("string"==typeof t&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if("number"!=typeof t)throw new Error(t+" is not a number");return t}var Ht=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},providers:[{provide:ft,useClass:pt}]}),t}(),qt="browser";function $t(t){return t===qt}var Qt=function(){var t=function t(){C(this,t)};return t.\u0275prov=Object(i.Kb)({token:t,providedIn:"root",factory:function(){return new Wt(Object(i.Yb)(d),window,Object(i.Yb)(i.n))}}),t}(),Wt=function(){function t(e,n,i){C(this,t),this.document=e,this.window=n,this.errorHandler=i,this.offset=function(){return[0,0]}}return w(t,[{key:"setOffset",value:function(t){this.offset=Array.isArray(t)?function(){return t}:t}},{key:"getScrollPosition",value:function(){return this.supportsScrolling()?[this.window.scrollX,this.window.scrollY]:[0,0]}},{key:"scrollToPosition",value:function(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}},{key:"scrollToAnchor",value:function(t){if(this.supportsScrolling()){var e=this.document.getElementById(t)||this.document.getElementsByName(t)[0];e&&this.scrollToElement(e)}}},{key:"setHistoryScrollRestoration",value:function(t){if(this.supportScrollRestoration()){var e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}},{key:"scrollToElement",value:function(t){var e=t.getBoundingClientRect(),n=e.left+this.window.pageXOffset,i=e.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(n-r[0],i-r[1])}},{key:"supportScrollRestoration",value:function(){try{if(!this.window||!this.window.scrollTo)return!1;var t=Gt(this.window.history)||Gt(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(e){return!1}}},{key:"supportsScrolling",value:function(){try{return!!this.window.scrollTo}catch(t){return!1}}}]),t}();function Gt(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}},AsU5:function(t,e,n){"use strict";n.d(e,"a",(function(){return F}));var i=n("i67J"),r=n("zqNl"),o=n("uJYd"),a=n("+Px6"),s=n("qAYy"),c=n("YyhG"),u=n("J/3c"),l=n("HM3f"),d=n("YtkY"),h=n("kZht"),f=n("An66"),p=n("hCLc"),b=n("1etq"),g=n("B6Vo"),v=n("zho4"),y=n("NxuZ"),_=n("anSm"),O=n("1o0v"),k=n("HyYW"),T=n("TADc"),S=n("LbKT"),E=n("+I9z"),x=n("7J2L"),P=n("aDqW"),A=n("rqGg"),I=n("DpwM");function M(t,e){if(1&t&&(h.Ub(0,"section",15),h.Ub(1,"div",16),h.Ub(2,"p",8),h.Qc(3),h.gc(4,"uppercase"),h.gc(5,"translate"),h.Tb(),h.Ub(6,"p",9),h.Qc(7),h.gc(8,"percent"),h.Tb(),h.Tb(),h.Ub(9,"div",17),h.Ub(10,"div",18),h.Ub(11,"div",19),h.gc(12,"percent"),h.Tb(),h.Ub(13,"div",20),h.gc(14,"percent"),h.Tb(),h.Tb(),h.Tb(),h.Tb()),2&t){var n=h.fc(2).ngIf,i=h.fc();h.Cb(3),h.Sc(" ",h.hc(4,6,h.hc(5,8,"Health"))," "),h.Cb(4),h.Sc(" ",h.hc(8,10,i.ratioClamped(n.marginRatio))," "),h.Cb(4),h.Lc("width",h.hc(12,12,1)),h.Cb(2),h.Lc("width",h.hc(14,14,1-i.ratioClamped(n.marginRatio)))}}var D=function(){return[250,100]};function R(t,e){if(1&t){var n=h.Vb();h.Ub(0,"section",21),h.bc("click",(function(){h.Ec(n);var t=h.fc(2).ngIf;return h.fc().viewDetailed(t.position)})),h.Pb(1,"fa-icon",22),h.gc(2,"translate"),h.Ub(3,"div",23),h.Ub(4,"p",24),h.Qc(5),h.gc(6,"uppercase"),h.gc(7,"translate"),h.Tb(),h.Ub(8,"p",9),h.Pb(9,"ghost-trail",25),h.gc(10,"asset"),h.Tb(),h.Ub(11,"p",26),h.Qc(12),h.gc(13,"sato"),h.Ub(14,"span",27),h.Qc(15),h.gc(16,"asset"),h.Tb(),h.Tb(),h.Tb(),h.Tb()}if(2&t){var i=h.fc(2).ngIf;h.Cb(1),h.mc("sbTooltip",h.hc(2,9,"BUTTON.VIEW_MORE_DETAILS"))("sbDelay",h.qc(23,D)),h.Cb(3),h.mc("pnl",i.position.balance),h.Cb(1),h.Sc(" ",h.hc(6,11,h.hc(7,13,i.position.balance>0?"BUTTON.LONG":"BUTTON.SHORT"))," "),h.Cb(4),h.pc("content","\n ",i.position.displaySize,"\n ",h.hc(10,15,i.position.tradingDisplayAsset),""),h.Cb(2),h.mc("pnl",i.position.pnl),h.Cb(1),h.Sc(" ",h.jc(13,17,i.position.pnl,i.position.walletDisplayAsset,"full")," "),h.Cb(3),h.Rc(h.hc(16,21,i.position.walletDisplayAsset))}}function j(t,e){if(1&t){var n=h.Vb();h.Ub(0,"section",3),h.Ub(1,"button",4),h.bc("click",(function(){return h.Ec(n),h.fc(2).openFlexPrefDialog()})),h.Ub(2,"span"),h.Qc(3),h.gc(4,"uppercase"),h.Tb(),h.Pb(5,"fa-icon",5),h.Tb(),h.Ub(6,"section",6),h.Ub(7,"div",7),h.Ub(8,"p",8),h.Qc(9),h.gc(10,"uppercase"),h.gc(11,"translate"),h.Tb(),h.Ub(12,"p",9),h.Qc(13),h.gc(14,"number"),h.Tb(),h.Tb(),h.Pb(15,"gauge",10),h.Ub(16,"div",11),h.Ub(17,"p",8),h.Qc(18),h.gc(19,"uppercase"),h.Tb(),h.Ub(20,"p",9),h.Qc(21),h.Tb(),h.Tb(),h.Tb(),h.Pb(22,"sb-divider",12),h.Oc(23,M,15,16,"section",13),h.Oc(24,R,17,24,"section",14),h.Tb()}if(2&t){var i=h.fc().ngIf,r=h.fc();h.Cb(1),h.mc("sbTooltip","Edit Multi-Collateral Preferences")("sbDelay",h.qc(21,D)),h.Cb(2),h.Sc(" ",h.hc(4,10,r.lvg(i.selectedMarketLvgPrefs))," "),h.Cb(6),h.Rc(h.hc(10,12,h.hc(11,14,"COLUMN.LVG"))),h.Cb(4),h.Rc(h.ic(14,16,i.selectedMarketLvg,"1.2-2")+"x"),h.Cb(2),h.mc("value",i.lvgBarWidth||0),h.Cb(3),h.Rc(h.hc(19,19,"Profit")),h.Cb(3),h.Rc(i.selectedMarketPnlPrefs.pnlCurrency),h.Cb(2),h.mc("ngIf",i.position||i.selectedMarketLvgPrefs.cross&&i.crossFlexPositionOpen),h.Cb(1),h.mc("ngIf",i.position)}}function L(t,e){if(1&t&&(h.Sb(0),h.Oc(1,j,25,22,"section",2),h.Rb()),2&t){var n=e.ngIf;h.fc();var i=h.Ac(11);h.Cb(1),h.mc("ngIf",n.flexWallet)("ngIfElse",i)}}function N(t,e){1&t&&h.Pb(0,"kraken-loading")}var U=function(t,e,n,i,r,o,a,s,c){return{position:t,marginRatio:e,flexWallet:n,crossFlexPositionOpen:i,selectedMarket:r,selectedMarketPnlPrefs:o,selectedMarketLvgPrefs:a,selectedMarketLvg:s,lvgBarWidth:c}},F=function(){var t=function(){function t(e){C(this,t),this.store=e,this.selectedMarketPosition$=this.store.pipe(Object(r.m)(c.g)),this.instruments$=this.store.pipe(Object(r.m)(a.f)),this.flexWallet$=this.store.pipe(Object(r.m)(u.l)),this.crossFlexPositionOpen$=this.store.pipe(Object(r.m)(c.a)),this.marginRatio$=this.store.pipe(Object(r.m)(c.p)),this.selectedMarket$=this.store.pipe(Object(r.m)(a.n)),this.selectedMarketPnlPrefs$=this.store.pipe(Object(r.m)(a.q)),this.selectedMarketLvgPrefs$=this.store.pipe(Object(r.m)(a.o)),this.selectedMarketLvg$=this.store.pipe(Object(r.m)(c.q)),this.tickerLvg$=this.store.pipe(Object(r.m)(s.q)),this.lvgBarWidth$=Object(l.a)([this.tickerLvg$,this.selectedMarketLvg$]).pipe(Object(d.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return i&&Math.min(100,Math.max(i/n*100,0))})))}return w(t,[{key:"openDetailsDialog",value:function(t){var e=this;this.instruments$.pipe(Object(i.h)()).subscribe((function(n){var i=n.get(t.instrument);e.store.dispatch(Object(o.g)({name:"position-details",inputs:{position:t,instrument:i}}))}))}},{key:"openFlexPrefDialog",value:function(){this.store.dispatch(Object(o.g)({name:"flex-prefs"}))}},{key:"lvg",value:function(t){return(null==t?void 0:t.cross)?"Cross":"Isolated"}},{key:"ratioClamped",value:function(t){return Math.max(0,Math.min(t,1))}},{key:"getRiskLabel",value:function(t){return t>=15?"High":t>=5?"Medium":"Low"}},{key:"getRiskBackground",value:function(t){return t>=15?"var(--warn-colour)":t>=5?"var(--y200)":"var(--accent-colour)"}},{key:"getHealthBackground",value:function(t){return t<=.5?"var(--warn-colour)":t<=.75?"var(--y200)":"var(--accent-colour)"}},{key:"viewDetailed",value:function(t){var e=this;this.instruments$.pipe(Object(i.h)()).subscribe((function(n){var i=n.get(t.instrument);e.store.dispatch(Object(o.g)({name:"position-details",inputs:{position:t,instrument:i}}))}))}},{key:"gaugeLabelFn",get:function(){return function(t){return t+"x"}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Ob(r.b))},t.\u0275cmp=h.Ib({type:t,selectors:[["flex-position"]],decls:12,vars:29,consts:[[4,"ngIf"],["loading",""],["class","flex-position",4,"ngIf","ngIfElse"],[1,"flex-position"],["subheading","","mat-button","",1,"pref",3,"sbTooltip","sbDelay","click"],["icon","chevron-down","size","lg"],[1,"gauge"],[1,"gauge-detail"],["body","","ghost",""],["body",""],[3,"value"],[1,"profit"],["vertical",""],["class","bar",4,"ngIf"],["class","position",3,"click",4,"ngIf"],[1,"bar"],[1,"detail"],[1,"bar-container"],[1,"progress-bar"],[1,"progress-fill"],[1,"progress-dark-fill"],[1,"position",3,"click"],["icon","file",3,"sbTooltip","sbDelay"],[1,"position-detail"],["body","",3,"pnl"],[3,"content"],["body","","pnlZero","",3,"pnl"],["ghost",""]],template:function(t,e){1&t&&(h.Oc(0,L,2,2,"ng-container",0),h.gc(1,"async"),h.gc(2,"async"),h.gc(3,"async"),h.gc(4,"async"),h.gc(5,"async"),h.gc(6,"async"),h.gc(7,"async"),h.gc(8,"async"),h.gc(9,"async"),h.Oc(10,N,1,0,"ng-template",null,1,h.Pc)),2&t&&h.mc("ngIf",h.yc(19,U,[h.hc(1,1,e.selectedMarketPosition$),h.hc(2,3,e.marginRatio$),h.hc(3,5,e.flexWallet$),h.hc(4,7,e.crossFlexPositionOpen$),h.hc(5,9,e.selectedMarket$),h.hc(6,11,e.selectedMarketPnlPrefs$),h.hc(7,13,e.selectedMarketLvgPrefs$),h.hc(8,15,e.selectedMarketLvg$),h.hc(9,17,e.lvgBarWidth$)]))},directives:[f.n,p.b,b.a,g.a,v.a,y.b,_.a,O.a,k.a,T.a,S.a,E.a,x.a],pipes:[f.b,f.x,P.d,f.f,f.u,A.a,I.c],styles:[".flex-position[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}.bar[_ngcontent-%COMP%]{display:flex;position:relative;border-radius:var(--bdrs);flex:1;flex-direction:column;margin-right:var(--spacing-l);align-self:center;width:150px;margin-left:var(--spacing-l)}.bar[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{padding-right:var(--spacing-s);vertical-align:middle}.progress-bar[_ngcontent-%COMP%]{max-height:16px;flex:1;align-self:center;width:100%;margin:var(--spacing-xs) 0;border:1px solid var(--i400);padding:2px;border-radius:4px;position:relative}.progress-fill[_ngcontent-%COMP%]{background:linear-gradient(90deg,#e2444d,#d1a91c 50%,#6ec877);position:relative;height:10px;border-radius:2px}.progress-dark-fill[_ngcontent-%COMP%]{background:var(--toolbar-colour);height:10px;position:absolute;right:1px;top:2px}.detail[_ngcontent-%COMP%]{flex-direction:row;justify-content:space-between}.detail[_ngcontent-%COMP%], .gauge[_ngcontent-%COMP%]{display:flex;align-items:center}.gauge[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--spacing)}.gauge[_ngcontent-%COMP%] gauge[_ngcontent-%COMP%]{margin-left:var(--spacing);width:50px}.gauge[_ngcontent-%COMP%] .gauge-detail[_ngcontent-%COMP%]{margin-right:var(--spacing)}.bar-container[_ngcontent-%COMP%]{align-items:center;display:flex}.bar-container[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}sb-divider[_ngcontent-%COMP%]{margin:0 var(--spacing)}fa-icon[_ngcontent-%COMP%]{color:var(--icon-colour)}.pref[_ngcontent-%COMP%]{margin-right:var(--spacing)}.profit[_ngcontent-%COMP%]{text-align:right;margin-left:var(--spacing)}.position[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer}.position[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--spacing)}"],changeDetection:0}),t}()},Asjx:function(t,e,n){"use strict";n.d(e,"a",(function(){return _})),n.d(e,"b",(function(){return k}));var i,r=n("kZht"),o=n("5XID"),a=n("ZTXN"),s=n("HM3f"),c=n("qZtG"),u=n("IdLP"),l=n("J+dc"),d=n("3mST"),h=n("mWib"),f=n("YtkY"),p=n("jIqt"),b=n("kuMc"),g=n("O1jd"),m=new Set,v=function(){var t=function(){function t(e){C(this,t),this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):y}return w(t,[{key:"matchMedia",value:function(t){return this._platform.WEBKIT&&function(t){if(!m.has(t))try{i||((i=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(i)),i.sheet&&(i.sheet.insertRule("@media ".concat(t," {.fx-query-test{ }}"),0),m.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(g.a))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(g.a))},token:t,providedIn:"root"}),t}();function y(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var _=function(){var t=function(){function t(e,n){C(this,t),this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new a.b}return w(t,[{key:"ngOnDestroy",value:function(){this._destroySubject.next(),this._destroySubject.complete()}},{key:"isMatched",value:function(t){var e=this;return O(Object(o.b)(t)).some((function(t){return e._registerQuery(t).mql.matches}))}},{key:"observe",value:function(t){var e=this,n=O(Object(o.b)(t)).map((function(t){return e._registerQuery(t).observable})),i=Object(s.a)(n);return(i=Object(c.a)(i.pipe(Object(l.a)(1)),i.pipe(Object(d.a)(1),Object(h.a)(0)))).pipe(Object(f.a)((function(t){var e={matches:!1,breakpoints:{}};return t.forEach((function(t){var n=t.matches,i=t.query;e.matches=e.matches||n,e.breakpoints[i]=n})),e})))}},{key:"_registerQuery",value:function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var n=this._mediaMatcher.matchMedia(t),i={observable:new u.a((function(t){var i=function(n){return e._zone.run((function(){return t.next(n)}))};return n.addListener(i),function(){n.removeListener(i)}})).pipe(Object(p.a)(n),Object(f.a)((function(e){var n=e.matches;return{query:t,matches:n}})),Object(b.a)(this._destroySubject)),mql:n};return this._queries.set(t,i),i}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(v),r.Yb(r.B))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(v),Object(r.Yb)(r.B))},token:t,providedIn:"root"}),t}();function O(t){return t.map((function(t){return t.split(",")})).reduce((function(t,e){return t.concat(e)})).map((function(t){return t.trim()}))}var k={XSmall:"(max-width: 599.99px)",Small:"(min-width: 600px) and (max-width: 959.99px)",Medium:"(min-width: 960px) and (max-width: 1279.99px)",Large:"(min-width: 1280px) and (max-width: 1919.99px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.99px) and (orientation: portrait), (max-width: 959.99px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.99px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.99px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"}},AytR:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r}));var i={production:!0},r=[]},B59i:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return o}));var i=function(){return[1,2,3,5,10,25,50]},r=function(){return[1,2,5,10,16.66,25,50]},o=function(t,e,n){return e&&void 0!==e.leverage&&e.leverageSlider&&!n?{buy:t.buy*r().slice().reverse()[e.leverage],sell:t.sell*r().slice().reverse()[e.leverage]}:t}},B6Vo:function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var i=n("D57K"),r=n("ZtZA"),o=n("gxtV"),a=n("KQpv"),s=n.n(a),c=n("5OT+"),u=n("TNp2"),l=n("Cc4E"),d=n("kZht"),h=n("5GZx"),f=n("jL3B"),p=s()("trace:sb:directive:tooltip"),b=function(){var t=function(){function t(e,n,i,r,o,a,s,c,u){C(this,t),this.vcr=e,this.element=n,this.injector=i,this.overlay=r,this.focusMonitor=o,this.ngZone=a,this.placement=s,this.delay=c,this.disabled=u,this.listeners=new Map}return w(t,[{key:"ngOnInit",value:function(){this.setupPointerEvents(),this.setupFocusMonitor()}},{key:"ngOnDestroy",value:function(){var t;this.teardownPointerEvents(),this.focusMonitor.stopMonitoring(this.element),this.detachCurrent(),null===(t=this.overlayRef)||void 0===t||t.dispose()}},{key:"show",value:function(t){var e,n,i,o,a,s,c,l=this;if(p("attempt to show with delay",t),(null===(e=this.disabled)||void 0===e?void 0:e.disabled)||!this.content||(null===(n=this.instance)||void 0===n?void 0:n.isVisible))p("will not show",this.content,null===(i=this.instance)||void 0===i?void 0:i.isVisible,null===(o=this.instance)||void 0===o?void 0:o.showDelayId,null===(a=this.instance)||void 0===a?void 0:a.hideDelayId);else{var d=this.createOverlay();this.detachCurrent(),this.portal=null!==(s=this.portal)&&void 0!==s?s:new r.d(u.a,this.vcr,this.injector),this.instance=d.attach(this.portal).instance,this.instance.afterHidden.subscribe((function(){return l.detachCurrent()})),this.instance.content=this.content,this.instance.markForCheck(),this.instance.show(null!=t?t:null===(c=this.delay)||void 0===c?void 0:c.startDelay)}}},{key:"hide",value:function(t){var e,n;p("hiding with delay",t),null===(e=this.instance)||void 0===e||e.hide(null!=t?t:null===(n=this.delay)||void 0===n?void 0:n.endDelay)}},{key:"setupFocusMonitor",value:function(){var t=this;this.focusMonitor.monitor(this.element).pipe(Object(o.b)(this)).subscribe((function(e){e?"keyboard"===e&&t.ngZone.run((function(){return t.show()})):t.ngZone.run((function(){return t.hide(0)}))}))}},{key:"setupPointerEvents",value:function(){var t=this;this.listeners.set("mouseenter",(function(){return t.show()})),this.listeners.set("mouseleave",(function(){return t.hide()})),this.listeners.forEach((function(e,n){t.element.nativeElement.addEventListener(n,e,{passive:!0})}))}},{key:"teardownPointerEvents",value:function(){var t=this;this.listeners.forEach((function(e,n){t.element.nativeElement.removeEventListener(n,e)})),this.listeners.clear()}},{key:"handleKeydown",value:function(t){var e;(null===(e=this.instance)||void 0===e?void 0:e.isVisible)&&"Escape"===t.key&&!function(t,e){return t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}(t)&&(t.preventDefault(),t.stopPropagation(),this.hide(0))}},{key:"detachCurrent",value:function(){var t;p("detaching from overlay",this.overlayRef),null===(t=this.overlayRef)||void 0===t||t.detach(),this.instance=void 0}},{key:"createOverlay",value:function(){var t,e;if(this.overlayRef)return this.overlayRef;var n=null!==(e=null===(t=this.placement)||void 0===t?void 0:t.connectedPositions())&&void 0!==e?e:c.c.bottomThenTop,i=this.overlay.position().flexibleConnectedTo(this.element).withPositions(n).withViewportMargin(8).withFlexibleDimensions(!1).withPush(!0);return this.overlayRef=this.overlay.create({hasBackdrop:!1,positionStrategy:i}),this.overlayRef}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Ob(d.R),d.Ob(d.l),d.Ob(d.t),d.Ob(h.c),d.Ob(f.h),d.Ob(d.B),d.Ob(c.c,9),d.Ob(c.b,9),d.Ob(l.a,9))},t.\u0275dir=d.Jb({type:t,selectors:[["","sbTooltip",""]],hostBindings:function(t,e){1&t&&d.bc("keydown",(function(t){return e.handleKeydown(t)}))},inputs:{content:["sbTooltip","content"]},exportAs:["sbTooltip"]}),t=Object(i.d)([Object(o.a)()],t)}()},B6ip:function(t,e,n){"use strict";n.r(e),n.d(e,"AssignmentDisclaimerComponent",(function(){return k}));var i,r,o=n("zqNl"),a=n("1ONQ"),s=n("AytR"),c=n("kZht"),u=["ar","de","en","es","fr","he","it","ja","ko","nl","pl","pt","ru","tr","uk","vi","zh"],l=["wsHealth"],d=["PF_PEPEUSD","PF_SHIBUSD","PF_BONKUSD"],h="futures.kraken.com",f=((i=function(){function t(){C(this,t),this.platform="kraken",this.appVersion="v5.19.0",this.urls={rest:"https://".concat(h,"/derivatives/api/v4"),websocket:"wss://".concat(h,"/ws/v1"),auth:"https://".concat(h,"/api/auth/v1"),health:"https://".concat(h,"/api/health/v1"),healthWs:"wss://".concat(h,"/ws/health"),history:"https://".concat(h,"/api/history/v2"),base:"https://".concat(h,"/"),support:"https://support.kraken.com",externalSignIn:"https://www.kraken.com/login-futures",externalSignUp:"https://www.kraken.com/sign-up",fusion:"https://pro.kraken.com/app/trade/futures-btc-usd-perp#dialog/sign-in?utm_source=KF&utm_medium=banner&utm_campaign=pro_futures_launch&utm_content=banner"},this.demo=!1,this.locales=u,this.featuresEnabled=l,this.hiddenMarkets=d}return w(t,[{key:"production",get:function(){return s.b.production}},{key:"localDev",get:function(){return!s.b.production}}]),t}()).\u0275fac=function(t){return new(t||i)},i.\u0275prov=c.Kb({token:i,factory:i.\u0275fac,providedIn:"root"}),i),p=n("rxqU"),b=n("rfPA"),g=n("bBQR"),m=n("1etq"),v=n("anSm"),y=n("UDV5"),_=n("hCLc"),O=n("e7kw"),k=((r=function(){function t(e,n){C(this,t),this.store=e,this.envService=n,this.isExternalUser$=this.store.pipe(Object(o.m)(p.l))}return w(t,[{key:"acceptDisclaimer",value:function(){this.store.dispatch(Object(a.a)())}},{key:"isCF",get:function(){return"cf"===this.envService.platform}}]),t}()).\u0275fac=function(t){return new(t||r)(c.Ob(o.b),c.Ob(f))},r.\u0275cmp=c.Ib({type:r,selectors:[["assignment-disclaimer"]],decls:32,vars:14,consts:[["heading","Assignment Program Disclaimer"],[1,"assignment-disclaimer"],["subheading",""],["body",""],["body","","target","_blank",1,"global__text--link",3,"href"],["required","",1,"global__text","global__text-body","no-border"],["checkbox",""],["mat-raised-button","",3,"disabled","click"]],template:function(t,e){if(1&t&&(c.Ub(0,"pro-dialog",0),c.Ub(1,"section",1),c.Ub(2,"p",2),c.Qc(3,"Please confirm that you have understood the following:"),c.Tb(),c.Ub(4,"p",3),c.Qc(5," The Position Assignment System (PAS) is not a risk-free proposition, and you should fully familiarize yourself with the associated risks before participating. "),c.Tb(),c.Ub(6,"p",3),c.Qc(7,"Please therefore read the following documentation carefully:"),c.Tb(),c.Ub(8,"ul"),c.Ub(9,"li"),c.Ub(10,"a",4),c.gc(11,"supportArticle"),c.Qc(12," - Position assignment system description "),c.Tb(),c.Tb(),c.Ub(13,"li"),c.Ub(14,"a",4),c.gc(15,"supportArticle"),c.Qc(16," - Position assignment example "),c.Tb(),c.Tb(),c.Ub(17,"li"),c.Ub(18,"a",4),c.gc(19,"supportArticle"),c.Qc(20," - Manage your position assignment program preferences - Single-Collateral Future "),c.Tb(),c.Tb(),c.Ub(21,"li"),c.Ub(22,"a",4),c.gc(23,"supportArticle"),c.Qc(24," - Manage your position assignment program preferences - Multi-Collateral Futures "),c.Tb(),c.Tb(),c.Tb(),c.Ub(25,"p",3),c.Qc(26),c.Tb(),c.Ub(27,"mat-checkbox",5,6),c.Qc(29," I have read and understood the above material and disclaimer and proceed at my own risk. "),c.Tb(),c.Ub(30,"button",7),c.bc("click",(function(){return e.acceptDisclaimer()})),c.Qc(31," Accept "),c.Tb(),c.Tb(),c.Tb()),2&t){var n=c.Ac(28);c.Cb(10),c.mc("href",c.hc(11,6,360022631692),c.Gc),c.Cb(4),c.mc("href",c.hc(15,8,360022835231),c.Gc),c.Cb(4),c.mc("href",c.hc(19,10,360028245092),c.Gc),c.Cb(4),c.mc("href",c.hc(23,12,4819410136340),c.Gc),c.Cb(4),c.Sc(" ",e.isCF?"Crypto Facilities":"Kraken Futures"," takes no responsibility for any losses resulting from participation in the PAS under any circumstances. "),c.Cb(4),c.mc("disabled",!n.checked)}},directives:[b.a,g.a,m.a,v.a,y.a,_.b],pipes:[O.a],styles:[".assignment-disclaimer[_ngcontent-%COMP%]{width:600px}@media (max-width:599px){.assignment-disclaimer[_ngcontent-%COMP%]{width:100%}}.assignment-disclaimer[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .assignment-disclaimer[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.assignment-disclaimer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:var(--spacing)}"],changeDetection:0}),r)},B8NW:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("5uGe");function r(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){return n.lift(new o(t,e))}}var o=function(){function t(e,n){C(this,t),this.predicate=e,this.inclusive=n}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new s(t,this.predicate,this.inclusive))}}]),t}(),s=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,t)).predicate=i,o.inclusive=r,o.index=0,o}return w(n,[{key:"_next",value:function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(i){return void n.error(i)}this.nextOrComplete(t,e)}},{key:"nextOrComplete",value:function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())}}]),n}(i.a)},B9MG:function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},BeMo:function(t,e,n){"use strict";n.d(e,"a",(function(){return R}));var i=n("D57K"),r=n("gxtV"),o=n("KQpv"),a=n.n(o),s=n("og7C"),c=n("C05f"),u=n("8lHc"),l=n("YtkY"),d=n("wqq/"),h=n("Qbn9"),f=a()("lib:charts:sparklines");function p(t){return 0===t.length?"#67c570":t[t.length-1][1]2&&void 0!==arguments[2]&&arguments[2];if(0===t.length)return f("no candles for",e),"M0,50H300";var i=t.map((function(t){return t[1]})),r=Math.max.apply(Math,b(i)),o=Math.min.apply(Math,b(i)),a=r-o;return 0===a?"M0,50H300":(n?"L":"M")+t.map((function(t,e){var n=m(t,2),i=300*n[0]+0,r=function(t){return 100-(t-o)/a*100+0}(n[1]);return 0===e?"0,"+r.toFixed(1):"".concat(i.toFixed(1),",").concat(r.toFixed(1))})).join("L")+"H300"}var v=n("CLaS"),y=n("kZht"),_=n("An66"),O=n("7J2L"),k=n("NxuZ");function T(t,e){if(1&t&&(y.ec(),y.Pb(0,"path",8),y.gc(1,"async"),y.gc(2,"async")),2&t){var n=y.fc(2);y.Lc("opacity",.2),y.Db("d",y.hc(1,4,n.fillData$))("fill",y.hc(2,6,n.pathColor$))}}function S(t,e){if(1&t&&(y.Ub(0,"div",4),y.ec(),y.Ub(1,"svg",5),y.Oc(2,T,3,8,"path",6),y.Pb(3,"path",7),y.gc(4,"async"),y.gc(5,"async"),y.Tb(),y.Tb()),2&t){var n=y.fc();y.Cb(2),y.mc("ngIf",n._filled),y.Cb(1),y.Db("d",y.hc(4,3,n.pathData$))("stroke",y.hc(5,5,n.pathColor$))}}function E(t,e){1&t&&(y.Ub(0,"div",9),y.Pb(1,"kraken-loading"),y.Tb())}function x(t,e){1&t&&(y.Ub(0,"div",10),y.Pb(1,"fa-icon",11),y.Tb())}var P,A=a()("app:sparkline"),I=a()("trace:app:sparkline"),M=30*h.e,D=Object(s.b)().asMutable(),R=((P=function(){function t(e){var n=this;C(this,t),this.chart=e,this._filled=!1,this.state$=new c.a("loading"),this.candlesData$=new c.a([]),this.candles$=this.candlesData$.asObservable(),this.pathData$=this.candles$.pipe(Object(l.a)((function(t){return g(t,n.market)})),Object(d.a)(1)),this.fillData$=this.candles$.pipe(Object(l.a)((function(t){return function(t,e){return 0===t.length?(f("no candles for",e),"M0,50H300L300,100H0z"):"M0,100"+g(t,e,!0)+"L300,100z"}(t,n.market)})),Object(d.a)(1)),this.pathColor$=this.candles$.pipe(Object(l.a)(p),Object(d.a)(1))}return w(t,[{key:"ngOnChanges",value:function(t){var e;(null===(e=t.market)||void 0===e?void 0:e.currentValue)&&!t.market.firstChange&&this.fetchCandles()}},{key:"ngAfterViewInit",value:function(){this.startFetchCandlesTimer()}},{key:"ngOnDestroy",value:function(){}},{key:"startFetchCandlesTimer",value:function(){var t=this;Object(u.a)(0,M).pipe(Object(r.b)(this)).subscribe((function(e){t.fetchCandles(0===e)}))}},{key:"fetchCandles",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(void 0!==this.market){var n=this.market;if(D.has(this.market)){var i=D.get(this.market),r=m(i,2),o=r[0],a=r[1];if(Date.now()-o1&&void 0!==arguments[1]?arguments[1]:i.a,n=Object(r.a)(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new l(n,e))}}var l=function(){function t(e,n){C(this,t),this.delay=e,this.scheduler=n}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new d(t,this.delay,this.scheduler))}}]),t}(),d=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,t)).delay=i,o.scheduler=r,o.queue=[],o.active=!1,o.errored=!1,o}return w(n,[{key:"_schedule",value:function(t){this.active=!0,this.destination.add(t.schedule(n.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}},{key:"scheduleNotification",value:function(t){if(!0!==this.errored){var e=this.scheduler,n=new h(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}}},{key:"_next",value:function(t){this.scheduleNotification(s.a.createNext(t))}},{key:"_error",value:function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleNotification(s.a.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var o=Math.max(0,n[0].time-i.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1}}]),n}(o.a),h=function t(e,n){C(this,t),this.time=e,this.notification=n}},C05f:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("ZTXN"),r=n("MiDb"),s=function(t){a(n,t);var e=c(n);function n(t){var i;return C(this,n),(i=e.call(this))._value=t,i}return w(n,[{key:"_subscribe",value:function(t){var e=o(h(n.prototype),"_subscribe",this).call(this,t);return e&&!e.closed&&t.next(this._value),e}},{key:"getValue",value:function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new r.a;return this._value}},{key:"next",value:function(t){o(h(n.prototype),"next",this).call(this,this._value=t)}},{key:"value",get:function(){return this.getValue()}}]),n}(i.b)},CLaS:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n("YtkY"),r=n("sXtk"),o=n("7UDb"),a=n("kZht"),s=n("6uGs"),c=function(){var t=function(){function t(e,n){C(this,t),this.http=e,this.env=n}return w(t,[{key:"fetchCandles",value:function(t){var e=t.type,n=t.symbol,r=t.resolution,a=m(t.period,2),s=a[0],c=a[1],u=new URL("".concat(this.env.urls.rest,"/charts/").concat(e,"/").concat(n,"/").concat(r));return u.searchParams.set("from",s.toString()),u.searchParams.set("to",c.toString()),this.http.get(u.href,o.a).pipe(Object(i.a)((function(t){return t.candles.map((function(t){return{open:Number(t.open),high:Number(t.high),low:Number(t.low),close:Number(t.close),volume:Number(t.volume),time:t.time}}))})))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Yb(s.a),a.Yb(r.a))},t.\u0275prov=a.Kb({token:t,factory:t.\u0275fac}),t}()},CW1w:function(t,e,n){"use strict";function i(t,e,n){return n?t*e:t/e}function r(t,e,n){var i=Math.abs(t);return n?i/e:i*e}function o(t){var e=t.entry,n=t.exit,i=t.isInverse,r=t.quantity,o="long"===t.side?r:-r;return i?(1/e-1/n)*o:(n-e)*o}function a(t,e){return t+e}function s(t,e){return(e-t)/t}function c(t,e){return e>0?t/e:0}n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return r})),n.d(e,"f",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"c",(function(){return c}))},Cc4E:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Jb({type:t,selectors:[["","sbDisabled",""]],inputs:{disabled:["sbDisabled","disabled"]},exportAs:["sbDisabled"]}),t}()},CfRh:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("sXtk"),r=n("kZht"),o=n("NxuZ"),a=function(){var t=function(){function t(e){C(this,t),this.env=e}return w(t,[{key:"liqPriceFaq",get:function(){return"kraken"===this.env.platform?"https://support.kraken.com/hc/en-us/articles/4402283092244-Liquidation-FAQ":"https://support.cryptofacilities.com/hc/en-us/articles/4402649576337-Liquidation-FAQ"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(i.a))},t.\u0275cmp=r.Ib({type:t,selectors:[["liq-price-faq"]],decls:2,vars:1,consts:[["target","_blank",1,"global__text--link",3,"href","click"],["icon","external-link","size","lg"]],template:function(t,e){1&t&&(r.Ub(0,"a",0),r.bc("click",(function(t){return t.stopPropagation()})),r.Pb(1,"fa-icon",1),r.Tb()),2&t&&r.mc("href",e.liqPriceFaq,r.Gc)},directives:[o.b],styles:[""],changeDetection:0}),t}()},Cucx:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("gCmX"),r=function(){function t(){}return t.installed=function(){return!0===Object(i.a)(this.pluginRef)},t.getPlugin=function(){return"undefined"!=typeof window?function(t,e){for(var n=e.split("."),i=t,r=0;r=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function s(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(e){o(e)}}function s(t){try{c(i.throw(t))}catch(e){o(e)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function c(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function u(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},"DG/E":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=function(){var t=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.now;C(this,t),this.SchedulerAction=e,this.now=n}return w(t,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,t).schedule(n,e)}}]),t}();return t.now=function(){return Date.now()},t}(),r=function(t){a(n,t);var e=c(n);function n(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.now;return C(this,n),(r=e.call(this,t,(function(){return n.delegate&&n.delegate!==l(r)?n.delegate.now():o()}))).actions=[],r.active=!1,r.scheduled=void 0,r}return w(n,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(t,e,i):o(h(n.prototype),"schedule",this).call(this,t,e,i)}},{key:"flush",value: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}}}}]),n}(i)},DTJn:function(t,e,n){"use strict";n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return l})),n.d(e,"a",(function(){return h}));var i,r,o,a=n("kZht"),s=["*"],c=((i=function t(){C(this,t)}).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=a.Ib({type:i,selectors:[["sb-table"]],ngContentSelectors:s,decls:2,vars:0,consts:[[1,"table"]],template:function(t,e){1&t&&(a.lc(),a.Ub(0,"div",0),a.kc(1),a.Tb())},styles:[".table[_ngcontent-%COMP%]{height:100%}"],changeDetection:0}),i),u=["*"],l=((r=function t(){C(this,t),this.header=!1,this.height=25}).\u0275fac=function(t){return new(t||r)},r.\u0275cmp=a.Ib({type:r,selectors:[["sb-table-row"]],inputs:{header:"header",height:"height"},ngContentSelectors:u,decls:2,vars:4,consts:[[1,"table-row"]],template:function(t,e){1&t&&(a.lc(),a.Ub(0,"div",0),a.kc(1),a.Tb()),2&t&&(a.Lc("height",e.height,"px"),a.Gb("header",e.header))},styles:["[_nghost-%COMP%]{display:block}.table-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border-colour-dark)}.table-row.header[_ngcontent-%COMP%] *{color:var(--ghost-colour);text-transform:uppercase;cursor:default}"],changeDetection:0}),r),d=["*"],h=((o=function t(){C(this,t),this.align="left",this.whiteSpace=!1}).\u0275fac=function(t){return new(t||o)},o.\u0275cmp=a.Ib({type:o,selectors:[["sb-table-cell"]],inputs:{align:"align",whiteSpace:"whiteSpace"},ngContentSelectors:d,decls:2,vars:4,template:function(t,e){1&t&&(a.lc(),a.Ub(0,"div"),a.kc(1),a.Tb()),2&t&&a.Lc("text-align",e.align)("white-space",e.whiteSpace)},styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 var(--spacing-s)}[_nghost-%COMP%], [_nghost-%COMP%] > div[_ngcontent-%COMP%]{flex:1}"],changeDetection:0}),o)},DduF:function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var i=n("9hG1"),r=n("TYVA"),o=n("Tjvn"),a=n("kZht"),s=n("i9Na"),c=n("1etq"),u=n("An66"),l=n("anSm"),d=n("scAs"),h=n("NxuZ"),f=n("aDqW");function p(t,e){if(1&t&&(a.Ub(0,"div",9),a.Pb(1,"fa-icon",10),a.Ub(2,"p",11),a.Qc(3),a.Tb(),a.Tb()),2&t){var n=a.fc();a.Cb(3),a.Rc(n.notificationCountdown)}}function b(t,e){if(1&t&&(a.Ub(0,"p",11),a.Qc(1),a.gc(2,"translate"),a.Ub(3,"span",7),a.Qc(4),a.Tb(),a.Tb()),2&t){var n=a.fc();a.Cb(1),a.Sc(" ",a.hc(2,2,"LABEL.EFFECTIVE_TIME"),": "),a.Cb(3),a.Rc(n.notificationDate)}}var g=/(((https?:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/,m=function(){var t=function(){function t(e){C(this,t),e.renderer.link=o.a}return w(t,[{key:"notificationCountdown",get:function(){return Object(r.h)(this.notification.effective_time)}},{key:"notificationTitle",get:function(){return this.notification.type.split("_").join(" ")}},{key:"notificationDate",get:function(){return i.DateTime.fromMillis(this.notification.effective_time).toFormat("HH:mm")}},{key:"notificationMsg",get:function(){return this.notification.note.split(" ").map((function(t){return t.match(g)?'').concat(t,""):t})).join(" ")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(s.c))},t.\u0275cmp=a.Ib({type:t,selectors:[["notification"]],inputs:{notification:"notification"},decls:13,vars:9,consts:[[1,"notification"],[1,"notification__title"],["subheading",""],["class","notification__title-expiry",4,"ngIf"],["body","","markdown","",1,"notification__msg",3,"data"],[1,"notification__info"],["body","",1,"notification__info-priority"],["bold",""],["body","",4,"ngIf"],[1,"notification__title-expiry"],["icon","clock"],["body",""]],template:function(t,e){1&t&&(a.Ub(0,"section",0),a.Ub(1,"section",1),a.Ub(2,"p",2),a.Qc(3),a.Tb(),a.Oc(4,p,4,1,"div",3),a.Tb(),a.Pb(5,"section",4),a.Ub(6,"section",5),a.Ub(7,"p",6),a.Qc(8),a.gc(9,"translate"),a.Ub(10,"span",7),a.Qc(11),a.Tb(),a.Tb(),a.Oc(12,b,5,4,"p",8),a.Tb(),a.Tb()),2&t&&(a.Db("priority",e.notification.priority),a.Cb(3),a.Rc(e.notificationTitle),a.Cb(1),a.mc("ngIf",e.notification.effective_time),a.Cb(1),a.mc("data",e.notificationMsg),a.Cb(3),a.Sc(" ",a.hc(9,7,"LABEL.PRIORITY"),": "),a.Cb(3),a.Rc(e.notification.priority),a.Cb(1),a.mc("ngIf",e.notification.effective_time))},directives:[c.a,u.n,l.a,s.a,d.a,h.b],pipes:[f.d],styles:["[_nghost-%COMP%]{display:block;margin-bottom:var(--spacing)}.notification[_ngcontent-%COMP%]{padding:var(--spacing)}.notification[_ngcontent-%COMP%] + .system-notifications__item[_ngcontent-%COMP%]{margin-top:5px}.notification[priority=high][_ngcontent-%COMP%]{background:rgba(var(--warn-colour-rgb),.6);border-left:5px solid var(--warn-colour)}.notification[priority=medium][_ngcontent-%COMP%]{background:rgba(var(--accent-colour-rgb),.6);border-left:5px solid var(--accent-colour)}.notification[priority=low][_ngcontent-%COMP%]{background:rgba(var(--border-colour-rgb),.6);border-left:5px solid var(--border-colour)}.notification__msg[_ngcontent-%COMP%]{margin-bottom:var(--spacing-l)}.notification__msg[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{word-break:break-word!important}.notification__title[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;margin-bottom:var(--spacing)}.notification__title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]:first-letter{text-transform:capitalize}.notification__title-expiry[_ngcontent-%COMP%]{align-items:center;color:var(--text-colour);display:flex}.notification__title-expiry[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;height:20px;width:20px;margin-right:var(--spacing-s)}.notification__info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:first-child{margin-bottom:var(--spacing-s)}.notification__info-priority[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-transform:capitalize}"],changeDetection:0}),t}()},Dm6q:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("kZht"),r=n("hCLc"),o=n("aDqW"),a=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"reload",value:function(){var t=new URL(window.location.href);t.searchParams.set("cacheBuster",Math.random().toString()),window.location.href=t.toString()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["update-banner"]],decls:6,vars:6,consts:[[1,"global__text","global__text--body"],["mat-raised-button","",1,"global_text","global_text--body",3,"click"]],template:function(t,e){1&t&&(i.Ub(0,"p",0),i.Qc(1),i.gc(2,"translate"),i.Tb(),i.Ub(3,"button",1),i.bc("click",(function(){return e.reload()})),i.Qc(4),i.gc(5,"translate"),i.Tb()),2&t&&(i.Cb(1),i.Rc(i.hc(2,2,"LABEL.UPDATE_AVAILABLE")),i.Cb(3),i.Sc(" ",i.hc(5,4,"LABEL.UPDATE_NOW"),"\n"))},directives:[r.b],pipes:[o.d],styles:["[_nghost-%COMP%]{display:contents}button[_ngcontent-%COMP%]{margin-left:var(--spacing);overflow:hidden;text-overflow:ellipsis}"],changeDetection:0}),t}()},DpwM:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return h}));var i=n("KQpv"),r=n.n(i),o=n("pjhv"),a=n("kZht"),s=n("An66"),c=function(){var t=function(){function t(e){C(this,t),this.decimalPipe=e}return w(t,[{key:"transform",value:function(t,e){var n=Object(o.a)(e,!1);return this.decimalPipe.transform(t,n)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(s.f))},t.\u0275pipe=a.Nb({name:"crypto",type:t,pure:!0}),t}(),u=function(){var t=function(){function t(e){C(this,t),this.decimalPipe=e}return w(t,[{key:"transform",value:function(t,e){var n=Object(o.a)(e,!0);return this.decimalPipe.transform(t,n)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(s.f))},t.\u0275pipe=a.Nb({name:"cryptoPrecise",type:t,pure:!0}),t}(),l=r()("app:pipe:crypto"),d=function(){var t=function(){function t(e){C(this,t),this.decimalPipe=e}return w(t,[{key:"transform",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"short";return null==t?null:null!=e&&"numericFormat"in e?this.decimalPipe.transform(t,"full"===n?e.numericFormat.full:e.numericFormat.short):(l("no formatting available for value",t,e),this.decimalPipe.transform(t,"1.2-12"))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(s.f))},t.\u0275pipe=a.Nb({name:"sato",type:t,pure:!0}),t}(),h=function(){var t=function(){function t(e){C(this,t),this.decimalPipe=e}return w(t,[{key:"transform",value:function(t,e){return null==t?null:null!=e&&"numericFormat"in e?this.decimalPipe.transform(t,"1.".concat(null==e?void 0:e.contractValueTradePrecision,"-").concat(null==e?void 0:e.contractValueTradePrecision)):(l("no formatting available for value",t,e),this.decimalPipe.transform(t,"1.2-12"))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(s.f))},t.\u0275pipe=a.Nb({name:"satoSize",type:t,pure:!0}),t}()},ECQc:function(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(i){return n}}},ENSU:function(t,e,n){"use strict";n.d(e,"a",(function(){return V})),n.d(e,"b",(function(){return L})),n.d(e,"c",(function(){return q})),n.d(e,"d",(function(){return B})),n.d(e,"e",(function(){return S}));var i,r=n("An66"),s=n("kZht"),u=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,[{key:"getProperty",value:function(t,e){return t[e]}},{key:"log",value:function(t){window.console&&window.console.log&&window.console.log(t)}},{key:"logGroup",value:function(t){window.console&&window.console.group&&window.console.group(t)}},{key:"logGroupEnd",value:function(){window.console&&window.console.groupEnd&&window.console.groupEnd()}},{key:"onAndCancel",value:function(t,e,n){return t.addEventListener(e,n,!1),function(){t.removeEventListener(e,n,!1)}}},{key:"dispatchEvent",value:function(t,e){t.dispatchEvent(e)}},{key:"remove",value:function(t){return t.parentNode&&t.parentNode.removeChild(t),t}},{key:"getValue",value:function(t){return t.value}},{key:"createElement",value:function(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}},{key:"createHtmlDocument",value:function(){return document.implementation.createHTMLDocument("fakeTitle")}},{key:"getDefaultDocument",value:function(){return document}},{key:"isElementNode",value:function(t){return t.nodeType===Node.ELEMENT_NODE}},{key:"isShadowRoot",value:function(t){return t instanceof DocumentFragment}},{key:"getGlobalEventTarget",value:function(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}},{key:"getHistory",value:function(){return window.history}},{key:"getLocation",value:function(){return window.location}},{key:"getBaseHref",value:function(t){var e,n=l||(l=document.querySelector("base"))?l.getAttribute("href"):null;return null==n?null:(e=n,i||(i=document.createElement("a")),i.setAttribute("href",e),"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname)}},{key:"resetBaseElement",value:function(){l=null}},{key:"getUserAgent",value:function(){return window.navigator.userAgent}},{key:"performanceNow",value:function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}},{key:"supportsCookies",value:function(){return!0}},{key:"getCookie",value:function(t){return Object(r.D)(document.cookie,t)}}],[{key:"makeCurrent",value:function(){Object(r.E)(new n)}}]),n}(function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.call(this)}return w(n,[{key:"supportsDOMEvents",value:function(){return!0}}]),n}(r.A)),l=null,d=new s.s("TRANSITION_ID"),f=[{provide:s.d,useFactory:function(t,e,n){return function(){n.get(s.e).donePromise.then((function(){var n=Object(r.C)();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter((function(e){return e.getAttribute("ng-transition")===t})).forEach((function(t){return n.remove(t)}))}))}},deps:[d,r.d,s.t],multi:!0}],p=function(){function t(){C(this,t)}return w(t,[{key:"addToWindow",value:function(t){s.rb.getAngularTestability=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},s.rb.getAllAngularTestabilities=function(){return t.getAllTestabilities()},s.rb.getAllAngularRootElements=function(){return t.getAllRootElements()},s.rb.frameworkStabilizers||(s.rb.frameworkStabilizers=[]),s.rb.frameworkStabilizers.push((function(t){var e=s.rb.getAllAngularTestabilities(),n=e.length,i=!1,r=function(e){i=i||e,0==--n&&t(i)};e.forEach((function(t){t.whenStable(r)}))}))}},{key:"findTestabilityInTree",value:function(t,e,n){if(null==e)return null;var i=t.getTestability(e);return null!=i?i:n?Object(r.C)().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}],[{key:"init",value:function(){Object(s.Z)(new t)}}]),t}(),b=new s.s("EventManagerPlugins"),g=function(){var t=function(){function t(e,n){var i=this;C(this,t),this._zone=n,this._eventNameToPlugin=new Map,e.forEach((function(t){return t.manager=i})),this._plugins=e.slice().reverse()}return w(t,[{key:"addEventListener",value:function(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}},{key:"addGlobalEventListener",value:function(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}},{key:"getZone",value:function(){return this._zone}},{key:"_findPluginFor",value:function(t){var e=this._eventNameToPlugin.get(t);if(e)return e;for(var n=this._plugins,i=0;i-1&&(e.splice(n,1),o+=t+".")})),o+=r,0!=e.length||0===r.length)return null;var a={};return a.domEventName=i,a.fullKey=o,a}},{key:"getEventFullKey",value:function(t){var e="",n=function(t){var e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&D.hasOwnProperty(e)&&(e=D[e]))}return M[e]||e}(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),I.forEach((function(i){i!=n&&(0,R[i])(t)&&(e+=i+".")})),e+=n}},{key:"eventCallback",value:function(t,e,i){return function(r){n.getEventFullKey(r)===t&&i.runGuarded((function(){return e(r)}))}}},{key:"_normalizeKey",value:function(t){switch(t){case"esc":return"escape";default:return t}}}]),n}(m);return t.\u0275fac=function(e){return new(e||t)(s.Yb(r.d))},t.\u0275prov=s.Kb({token:t,factory:t.\u0275fac}),t}(),L=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(s.Kb)({factory:function(){return Object(s.Yb)(U)},token:t,providedIn:"root"}),t}();function N(t){return new U(t.get(r.d))}var U=function(){var t=function(t){a(n,t);var e=c(n);function n(t){var i;return C(this,n),(i=e.call(this))._doc=t,i}return w(n,[{key:"sanitize",value:function(t,e){if(null==e)return null;switch(t){case s.K.NONE:return e;case s.K.HTML:return Object(s.gb)(e,"HTML")?Object(s.yb)(e):Object(s.eb)(this._doc,String(e));case s.K.STYLE:return Object(s.gb)(e,"Style")?Object(s.yb)(e):e;case s.K.SCRIPT:if(Object(s.gb)(e,"Script"))return Object(s.yb)(e);throw new Error("unsafe value used in a script context");case s.K.URL:return Object(s.qb)(e),Object(s.gb)(e,"URL")?Object(s.yb)(e):Object(s.fb)(String(e));case s.K.RESOURCE_URL:if(Object(s.gb)(e,"ResourceURL"))return Object(s.yb)(e);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext ".concat(t," (see http://g.co/ng/security#xss)"))}}},{key:"bypassSecurityTrustHtml",value:function(t){return Object(s.hb)(t)}},{key:"bypassSecurityTrustStyle",value:function(t){return Object(s.kb)(t)}},{key:"bypassSecurityTrustScript",value:function(t){return Object(s.jb)(t)}},{key:"bypassSecurityTrustUrl",value:function(t){return Object(s.lb)(t)}},{key:"bypassSecurityTrustResourceUrl",value:function(t){return Object(s.ib)(t)}}]),n}(L);return t.\u0275fac=function(e){return new(e||t)(s.Yb(r.d))},t.\u0275prov=Object(s.Kb)({factory:function(){return N(Object(s.Yb)(s.p))},token:t,providedIn:"root"}),t}(),F=[{provide:s.D,useValue:r.B},{provide:s.E,useValue:function(){u.makeCurrent(),p.init()},multi:!0},{provide:r.d,useFactory:function(){return Object(s.wb)(document),document},deps:[]}],B=Object(s.T)(s.Y,"browser",F),z=[[],{provide:s.bb,useValue:"root"},{provide:s.n,useFactory:function(){return new s.n},deps:[]},{provide:b,useClass:A,multi:!0,deps:[r.d,s.B,s.D]},{provide:b,useClass:j,multi:!0,deps:[r.d]},[],{provide:S,useClass:S,deps:[g,y,s.c]},{provide:s.H,useExisting:S},{provide:v,useExisting:y},{provide:y,useClass:y,deps:[r.d]},{provide:s.O,useClass:s.O,deps:[s.B]},{provide:g,useClass:g,deps:[b,s.B]},[]],V=function(){var t=function(){function t(e){if(C(this,t),e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return w(t,null,[{key:"withServerTransition",value:function(e){return{ngModule:t,providers:[{provide:s.c,useValue:e.appId},{provide:d,useExisting:s.c},f]}}}]),t}();return t.\u0275mod=s.Mb({type:t}),t.\u0275inj=s.Lb({factory:function(e){return new(e||t)(s.Yb(t,12))},providers:z,imports:[r.c,s.f]}),t}();function H(){return new q(Object(s.Yb)(r.d))}var q=function(){var t=function(){function t(e){C(this,t),this._doc=e}return w(t,[{key:"getTitle",value:function(){return this._doc.title}},{key:"setTitle",value:function(t){this._doc.title=t||""}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Yb(r.d))},t.\u0275prov=Object(s.Kb)({factory:H,token:t,providedIn:"root"}),t}();"undefined"!=typeof window&&window},ENxB:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n("sXtk"),r=n("MUfl"),o=n("kZht"),a=n("An66"),s=n("hCLc"),c=n("B6Vo"),u=n("NxuZ");function l(t,e){if(1&t&&(o.Ub(0,"a",1),o.Ub(1,"button",2),o.Ub(2,"span",3),o.Pb(3,"fa-icon",4),o.Qc(4," You must remediate or lose access to derivatives "),o.Tb(),o.Tb(),o.Tb()),2&t){var n=o.fc();o.mc("href",n.fusionUrl,o.Gc)}}var d=function(){var t=function(){function t(e,n){C(this,t),this.featureService=e,this.env=n}return w(t,[{key:"isDltBannerEnabled",get:function(){return this.featureService.isEnabled("dltBanners")}},{key:"fusionUrl",get:function(){return this.env.urls.fusion}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Ob(r.a),o.Ob(i.a))},t.\u0275cmp=o.Ib({type:t,selectors:[["dlt-banner"]],decls:1,vars:1,consts:[[3,"href",4,"ngIf"],[3,"href"],["type","button","mat-raised-button","","color","warn","sbTooltip","Action required for Derivatives traders. In order to continue derivatives trading, clients in Germany need to provide additional information to re-verify their accounts by September 24, 2024."],[1,"banner-label"],["icon","warning","size","lg"]],template:function(t,e){1&t&&o.Oc(0,l,5,1,"a",0),2&t&&o.mc("ngIf",e.isDltBannerEnabled)},directives:[a.n,s.b,c.a,u.b],styles:[".banner-label[_ngcontent-%COMP%]{display:flex}.banner-label[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--spacing-s)}"],changeDetection:0}),t}()},EWqr:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t,i)).scheduler=t,r.work=i,r.pending=!1,r}return w(n,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}},{key:"requestAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(t.flush.bind(t,this),n)}},{key:"recycleAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}},{key:"execute",value: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))}},{key:"_execute",value:function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}},{key:"_unsubscribe",value:function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}]),n}(function(t){a(n,t);var e=c(n);function n(t,i){return C(this,n),e.call(this)}return w(n,[{key:"schedule",value:function(t){return this}}]),n}(n("bwdy").a))},EZWv:function(t,e,n){"use strict";n.d(e,"a",(function(){return E})),n.d(e,"b",(function(){return x}));var i=n("An66"),r=n("kZht"),o=n("hCLc"),s=n("IOEv"),l=n("WYJo"),d=n("5XID"),h=n("ZTXN"),f=n("pTnX"),p=n("EmXI");function b(t,e){if(1&t&&(r.Ub(0,"mat-option",19),r.Qc(1),r.Tb()),2&t){var n=e.$implicit;r.mc("value",n),r.Cb(1),r.Sc(" ",n," ")}}function g(t,e){if(1&t){var n=r.Vb();r.Ub(0,"mat-form-field",16),r.Ub(1,"mat-select",17),r.bc("selectionChange",(function(t){return r.Ec(n),r.fc(2)._changePageSize(t.value)})),r.Oc(2,b,2,2,"mat-option",18),r.Tb(),r.Tb()}if(2&t){var i=r.fc(2);r.mc("appearance",i._formFieldAppearance)("color",i.color),r.Cb(1),r.mc("value",i.pageSize)("disabled",i.disabled)("aria-label",i._intl.itemsPerPageLabel),r.Cb(1),r.mc("ngForOf",i._displayedPageSizeOptions)}}function m(t,e){if(1&t&&(r.Ub(0,"div",20),r.Qc(1),r.Tb()),2&t){var n=r.fc(2);r.Cb(1),r.Rc(n.pageSize)}}function v(t,e){if(1&t&&(r.Ub(0,"div",12),r.Ub(1,"div",13),r.Qc(2),r.Tb(),r.Oc(3,g,3,6,"mat-form-field",14),r.Oc(4,m,2,1,"div",15),r.Tb()),2&t){var n=r.fc();r.Cb(2),r.Sc(" ",n._intl.itemsPerPageLabel," "),r.Cb(1),r.mc("ngIf",n._displayedPageSizeOptions.length>1),r.Cb(1),r.mc("ngIf",n._displayedPageSizeOptions.length<=1)}}function y(t,e){if(1&t){var n=r.Vb();r.Ub(0,"button",21),r.bc("click",(function(){return r.Ec(n),r.fc().firstPage()})),r.ec(),r.Ub(1,"svg",7),r.Pb(2,"path",22),r.Tb(),r.Tb()}if(2&t){var i=r.fc();r.mc("matTooltip",i._intl.firstPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),r.Db("aria-label",i._intl.firstPageLabel)}}function _(t,e){if(1&t){var n=r.Vb();r.ec(),r.dc(),r.Ub(0,"button",23),r.bc("click",(function(){return r.Ec(n),r.fc().lastPage()})),r.ec(),r.Ub(1,"svg",7),r.Pb(2,"path",24),r.Tb(),r.Tb()}if(2&t){var i=r.fc();r.mc("matTooltip",i._intl.lastPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),r.Db("aria-label",i._intl.lastPageLabel)}}var O=function(){var t=function t(){C(this,t),this.changes=new h.b,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=function(t,e,n){if(0==n||0==e)return"0 of "+n;var i=t*e;return"".concat(i+1," \u2013 ").concat(i<(n=Math.max(n,0))?Math.min(i+e,n):i+e," of ").concat(n)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Kb)({factory:function(){return new t},token:t,providedIn:"root"}),t}(),k={provide:O,deps:[[new r.C,new r.L,O]],useFactory:function(t){return t||new O}},T=new r.s("MAT_PAGINATOR_DEFAULT_OPTIONS"),S=Object(f.y)(Object(f.A)((function t(){C(this,t)}))),E=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,o){var a;if(C(this,n),(a=e.call(this))._intl=t,a._changeDetectorRef=i,a._pageIndex=0,a._length=0,a._pageSizeOptions=[],a._hidePageSize=!1,a._showFirstLastButtons=!1,a.page=new r.o,a._intlChanges=t.changes.subscribe((function(){return a._changeDetectorRef.markForCheck()})),o){var s=o.pageSize,c=o.pageSizeOptions,l=o.hidePageSize,d=o.showFirstLastButtons,h=o.formFieldAppearance;null!=s&&(a._pageSize=s),null!=c&&(a._pageSizeOptions=c),null!=l&&(a._hidePageSize=l),null!=d&&(a._showFirstLastButtons=d),null!=h&&(a._formFieldAppearance=h)}return u(a)}return w(n,[{key:"ngOnInit",value:function(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}},{key:"ngOnDestroy",value:function(){this._intlChanges.unsubscribe()}},{key:"nextPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex++,this._emitPageEvent(t)}}},{key:"previousPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex--,this._emitPageEvent(t)}}},{key:"firstPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}}},{key:"lastPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}}},{key:"hasPreviousPage",value:function(){return this.pageIndex>=1&&0!=this.pageSize}},{key:"hasNextPage",value:function(){var t=this.getNumberOfPages()-1;return this.pageIndex enter",[Object(v.l)({opacity:0,transform:"translateY(-100%)"}),Object(v.e)("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},q=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=o.Jb({type:t}),t}(),$=new o.s("MatHint"),Q=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=o.Jb({type:t,selectors:[["mat-label"]]}),t}(),W=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=o.Jb({type:t,selectors:[["mat-placeholder"]]}),t}(),G=new o.s("MatPrefix"),Y=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=o.Jb({type:t,selectors:[["","matPrefix",""]],features:[o.Bb([{provide:G,useExisting:t}])]}),t}(),K=new o.s("MatSuffix"),Z=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=o.Jb({type:t,selectors:[["","matSuffix",""]],features:[o.Bb([{provide:K,useExisting:t}])]}),t}(),X=0,J=Object(s.w)((function t(e){C(this,t),this._elementRef=e}),"primary"),tt=new o.s("MAT_FORM_FIELD_DEFAULT_OPTIONS"),et=new o.s("MatFormField"),nt=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a,s,c,u){var l;return C(this,n),(l=e.call(this,t))._elementRef=t,l._changeDetectorRef=i,l._dir=o,l._defaults=a,l._platform=s,l._ngZone=c,l._outlineGapCalculationNeededImmediately=!1,l._outlineGapCalculationNeededOnStable=!1,l._destroyed=new d.b,l._showAlwaysAnimate=!1,l._subscriptAnimationState="",l._hintLabel="",l._hintLabelId="mat-hint-"+X++,l._labelId="mat-form-field-label-"+X++,l._labelOptions=r||{},l.floatLabel=l._getDefaultFloatLabelState(),l._animationsEnabled="NoopAnimations"!==u,l.appearance=a&&a.appearance?a.appearance:"legacy",l._hideRequiredMarker=!(!a||null==a.hideRequiredMarker)&&a.hideRequiredMarker,l}return w(n,[{key:"_shouldAlwaysFloat",value:function(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}},{key:"_canLabelFloat",value:function(){return"never"!==this.floatLabel}},{key:"getLabelId",value:function(){return this._hasFloatingLabel()?this._labelId:null}},{key:"getConnectedOverlayOrigin",value:function(){return this._connectionContainerRef||this._elementRef}},{key:"ngAfterContentInit",value:function(){var t=this;this._validateControlChild();var e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-"+e.controlType),e.stateChanges.pipe(Object(p.a)(null)).subscribe((function(){t._validatePlaceholders(),t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()})),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(Object(g.a)(this._destroyed)).subscribe((function(){return t._changeDetectorRef.markForCheck()})),this._ngZone.runOutsideAngular((function(){t._ngZone.onStable.pipe(Object(g.a)(t._destroyed)).subscribe((function(){t._outlineGapCalculationNeededOnStable&&t.updateOutlineGap()}))})),Object(h.a)(this._prefixChildren.changes,this._suffixChildren.changes).subscribe((function(){t._outlineGapCalculationNeededOnStable=!0,t._changeDetectorRef.markForCheck()})),this._hintChildren.changes.pipe(Object(p.a)(null)).subscribe((function(){t._processHints(),t._changeDetectorRef.markForCheck()})),this._errorChildren.changes.pipe(Object(p.a)(null)).subscribe((function(){t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()})),this._dir&&this._dir.change.pipe(Object(g.a)(this._destroyed)).subscribe((function(){"function"==typeof requestAnimationFrame?t._ngZone.runOutsideAngular((function(){requestAnimationFrame((function(){return t.updateOutlineGap()}))})):t.updateOutlineGap()}))}},{key:"ngAfterContentChecked",value:function(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}},{key:"ngAfterViewInit",value:function(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete()}},{key:"_shouldForward",value:function(t){var e=this._control?this._control.ngControl:null;return e&&e[t]}},{key:"_hasPlaceholder",value:function(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}},{key:"_hasLabel",value:function(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}},{key:"_shouldLabelFloat",value:function(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}},{key:"_hideControlPlaceholder",value:function(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}},{key:"_hasFloatingLabel",value:function(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}},{key:"_getDisplayedMessages",value:function(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}},{key:"_animateAndLockLabel",value:function(){var t=this;this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,Object(f.a)(this._label.nativeElement,"transitionend").pipe(Object(m.a)(1)).subscribe((function(){t._showAlwaysAnimate=!1}))),this.floatLabel="always",this._changeDetectorRef.markForCheck())}},{key:"_validatePlaceholders",value:function(){}},{key:"_processHints",value:function(){this._validateHints(),this._syncDescribedByIds()}},{key:"_validateHints",value:function(){}},{key:"_getDefaultFloatLabelState",value:function(){return this._defaults&&this._defaults.floatLabel||this._labelOptions.float||"auto"}},{key:"_syncDescribedByIds",value:function(){if(this._control){var t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push.apply(t,b(this._control.userAriaDescribedBy.split(" "))),"hint"===this._getDisplayedMessages()){var e=this._hintChildren?this._hintChildren.find((function(t){return"start"===t.align})):null,n=this._hintChildren?this._hintChildren.find((function(t){return"end"===t.align})):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),n&&t.push(n.id)}else this._errorChildren&&t.push.apply(t,b(this._errorChildren.map((function(t){return t.id}))));this._control.setDescribedByIds(t)}}},{key:"_validateControlChild",value:function(){}},{key:"updateOutlineGap",value:function(){var t=this._label?this._label.nativeElement:null;if("outline"===this.appearance&&t&&t.children.length&&t.textContent.trim()&&this._platform.isBrowser)if(this._isAttachedToDOM()){var e=0,n=0,i=this._connectionContainerRef.nativeElement,r=i.querySelectorAll(".mat-form-field-outline-start"),o=i.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){var a=i.getBoundingClientRect();if(0===a.width&&0===a.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);for(var s=this._getStartEnd(a),c=t.children,u=this._getStartEnd(c[0].getBoundingClientRect()),l=0,d=0;d0?.75*l+10:0}for(var h=0;h0?"BUTTON.LONG":"BUTTON.SHORT"}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["open-positions-mobile"]],inputs:{position:"position"},outputs:{selectTicker:"selectTicker",marketClose:"marketClose",limitClose:"limitClose",viewDetailed:"viewDetailed"},decls:72,vars:86,consts:[[1,"card",3,"click"],[1,"row"],["subheading",""],[3,"pair"],["body","",1,"buttons"],["icon","file","size","2x",1,"info-button",3,"click"],["icon","close-position","primary","","size","2x",1,"limit-button",3,"matTooltip","click"],["icon","circle-minus","primary","","size","2x",1,"market-button",3,"matTooltip","click"],[1,"block-cell"],["body","","ghost","","uppercase",""],["body",""],[3,"content"],["ghost",""],["body","","mono",""],["body","",1,"row"],[3,"ngClass"],["body","","bold","","ghost","","uppercase","","sbTooltip","TOOLTIP.LIQ_PRICE",3,"sbDelay"],[4,"ngIf","ngIfElse"],["naLiq",""],["mono",""],["tooltip","","sbTooltip","TOOLTIP.NA_LIQ_PRICE",3,"sbDelay"]],template:function(t,e){if(1&t&&(i.Ub(0,"div",0),i.bc("click",(function(){return e.selectTicker.emit({symbol:e.position.instrument,replaceUrl:!1})})),i.Ub(1,"div",1),i.Ub(2,"div",2),i.Pb(3,"market-icon",3),i.gc(4,"pair"),i.Qc(5),i.gc(6,"uppercase"),i.gc(7,"contractFamily"),i.gc(8,"pair"),i.gc(9,"translate"),i.gc(10,"maturityMonth"),i.Tb(),i.Ub(11,"div",4),i.Ub(12,"fa-icon",5),i.bc("click",(function(t){return e.viewDetailed.emit({position:e.position}),t.stopPropagation()})),i.Tb(),i.Ub(13,"fa-icon",6),i.bc("click",(function(t){return e.limitClose.emit({position:e.position}),t.stopPropagation()})),i.gc(14,"translate"),i.Tb(),i.Ub(15,"fa-icon",7),i.bc("click",(function(t){return e.marketClose.emit({position:e.position}),t.stopPropagation()})),i.gc(16,"translate"),i.Tb(),i.Tb(),i.Tb(),i.Ub(17,"div",1),i.Ub(18,"div",8),i.Ub(19,"span",9),i.Qc(20),i.gc(21,"translate"),i.Tb(),i.Ub(22,"span",10),i.Ub(23,"span"),i.Ub(24,"span"),i.Qc(25),i.gc(26,"translate"),i.Tb(),i.Pb(27,"ghost-trail",11),i.Tb(),i.Ub(28,"span",12),i.Qc(29),i.gc(30,"asset"),i.Tb(),i.Tb(),i.Tb(),i.Ub(31,"div",8),i.Ub(32,"span",9),i.Qc(33),i.gc(34,"translate"),i.gc(35,"translate"),i.Tb(),i.Ub(36,"span"),i.Ub(37,"span",13),i.Qc(38),i.gc(39,"sato"),i.Ub(40,"span",12),i.Qc(41),i.gc(42,"quote"),i.Tb(),i.Tb(),i.Ub(43,"span",13),i.Qc(44),i.gc(45,"sato"),i.Ub(46,"span",12),i.Qc(47),i.gc(48,"quote"),i.Tb(),i.Tb(),i.Tb(),i.Tb(),i.Tb(),i.Ub(49,"div",14),i.Ub(50,"div",8),i.Ub(51,"span",9),i.Qc(52),i.gc(53,"translate"),i.gc(54,"translate"),i.Tb(),i.Ub(55,"span",10),i.Qc(56),i.gc(57,"sato"),i.Ub(58,"span",12),i.Qc(59),i.gc(60,"asset"),i.Tb(),i.Ub(61,"span",15),i.Qc(62),i.gc(63,"percent"),i.Tb(),i.Tb(),i.Tb(),i.Ub(64,"div",8),i.Ub(65,"span",16),i.Qc(66),i.gc(67,"translate"),i.Pb(68,"liq-price-faq"),i.Tb(),i.Oc(69,T,8,7,"ng-container",17),i.Oc(70,E,2,2,"ng-template",null,18,i.Pc),i.Tb(),i.Tb(),i.Tb()),2&t){var n=i.Ac(71);i.Cb(3),i.mc("pair",i.hc(4,30,e.position.instrument)),i.Cb(2),i.Uc(" ",i.hc(6,32,i.hc(7,34,e.position.instrument))," ",i.hc(8,36,e.position.instrument)," ",i.hc(9,38,i.ic(10,40,e.position.instrument,"short")),". "),i.Cb(8),i.mc("matTooltip",i.hc(14,43,"DIALOG.CONFIRM_CLOSE_AT_PRICE.TITLE")),i.Cb(2),i.mc("matTooltip",i.hc(16,45,"DIALOG.CONFIRM_CLOSE_POSITION.TITLE")),i.Cb(5),i.Sc(" ",i.hc(21,47,"COLUMN.SIZE")," "),i.Cb(4),i.Gb("global__text--accent",e.position.balance>0)("global__text--warn",e.position.balance<0),i.Cb(1),i.Sc(" ",i.hc(26,49,e.position.balance>0?"BUTTON.LONG":"BUTTON.SHORT")," "),i.Cb(2),i.nc("content",e.position.displaySize),i.Cb(2),i.Rc(i.hc(30,51,e.position.tradingDisplayAsset)),i.Cb(4),i.Tc(" ",i.hc(34,53,"COLUMN.ENTRY")," / ",i.hc(35,55,"COLUMN.MARK_PRICE")," "),i.Cb(5),i.Sc(" ",i.ic(39,57,e.position.entry_price,e.position)," "),i.Cb(3),i.Rc(i.hc(42,60,e.position.instrument)),i.Cb(3),i.Sc(" ",i.ic(45,62,e.position.mark_price,e.position)," "),i.Cb(3),i.Rc(i.hc(48,65,e.position.instrument)),i.Cb(5),i.Tc(" ",i.hc(53,67,"COLUMN.PROFIT_LOSS")," / ",i.hc(54,69,"COLUMN.ROE")," "),i.Cb(4),i.Sc(" ",i.jc(57,71,e.position.pnl,e.position.walletDisplayAsset,"full")," "),i.Cb(3),i.Rc(i.hc(60,75,e.position.walletDisplayAsset)),i.Cb(2),i.mc("ngClass",i.sc(82,x,100*e.position.return_on_equity>0,100*e.position.return_on_equity<0)),i.Cb(1),i.Sc(" (",i.ic(63,77,e.position.return_on_equity,"1.2-2"),") "),i.Cb(3),i.mc("sbDelay",i.qc(85,S)),i.Cb(1),i.Sc(" ",i.hc(67,80,"COLUMN.EST_LIQ_PRICE")," "),i.Cb(3),i.mc("ngIf",e.position.liquidation_threshold>0)("ngIfElse",n)}},directives:[r.a,o.a,a.a,s.b,c.a,u.a,l.a,d.a,h.a,f.l,p.a,b.a,g.a,m.a,f.n,v.a],pipes:[y.e,f.x,y.c,_.d,y.d,O.a,k.c,y.f,f.u],styles:["market-icon[_ngcontent-%COMP%]{font-size:20px}[_nghost-%COMP%]{display:block;border-bottom:1px solid var(--border-colour);margin-bottom:var(--spacing);padding-bottom:var(--spacing)}market-icon[_ngcontent-%COMP%]{margin-right:var(--spacing-s);vertical-align:middle}.row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 var(--spacing-s)}.row[_ngcontent-%COMP%] + .row[_ngcontent-%COMP%]{margin-top:var(--spacing)}.buttons[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{cursor:pointer}.buttons[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]:not(:last-of-type){margin-right:var(--spacing)}.buttons[_ngcontent-%COMP%] .copy-button[_ngcontent-%COMP%], .buttons[_ngcontent-%COMP%] .edit-button[_ngcontent-%COMP%], .buttons[_ngcontent-%COMP%] .info-button[_ngcontent-%COMP%], .buttons[_ngcontent-%COMP%] .limit-button[_ngcontent-%COMP%], .buttons[_ngcontent-%COMP%] .market-button[_ngcontent-%COMP%]{color:var(--brand)}.buttons[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{color:var(--warn-colour)}.type-cell[_ngcontent-%COMP%]{display:flex;align-items:center;flex:0.5}.direction-cell[_ngcontent-%COMP%], .size-cell[_ngcontent-%COMP%]{display:flex;align-items:center;flex:0.25}.price-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:right;flex:0.5}.price-cell[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-of-type{margin-bottom:var(--spacing-s)}.progress-cell[_ngcontent-%COMP%]{text-align:right;flex:0.75}.progress-cell[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-of-type{margin-bottom:var(--spacing-s)}.block-cell[_ngcontent-%COMP%]:nth-of-type(2n) > span[_ngcontent-%COMP%]{text-align:right}.block-cell[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:block}.block-cell[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:first-of-type{margin-bottom:var(--spacing-s)}"],changeDetection:0}),t}()},Eu46:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("kZht"),r=function t(){C(this,t),this.$implicit=null,this.ngLet=null},o=function(){var t=function(){function t(e,n){C(this,t),this.vcr=e,this.templateRef=n,this.context=new r}return w(t,[{key:"ngOnInit",value:function(){this.vcr.createEmbeddedView(this.templateRef,this.context)}},{key:"ngLet",set:function(t){this.context.$implicit=this.context.ngLet=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.R),i.Ob(i.N))},t.\u0275dir=i.Jb({type:t,selectors:[["","ngLet",""]],inputs:{ngLet:"ngLet"}}),t}()},EzKQ:function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var i=n("D57K"),r=n("gxtV"),o=n("zqNl"),a=n("xVbo"),s=n("bjK4"),c=n("0tVE"),u=n("rxqU"),l=n("kZht"),d=n("LBlH"),h=n("y1fC"),f=n("pPqe"),p=n("w2Kr"),b=n("1etq"),g=n("aDqW"),m=["tourStep"];function v(t,e){if(1&t){var n=l.Vb();l.Ub(0,"tour-step",6),l.bc("dispose",(function(){return l.Ec(n),l.fc().disposePopper(1)})),l.Ub(1,"p",7),l.Qc(2,"TOUR.TRADING.ORDERBOOK.1"),l.Tb(),l.Pb(3,"br"),l.Ub(4,"p",7),l.Qc(5,"TOUR.TRADING.ORDERBOOK.2"),l.Tb(),l.Tb()}2&t&&l.mc("image","orderbook")("title","HEADING.ORDERBOOK")("nextRouteTo","/futures")("videoUrl","https://www.youtube.com/watch?v=wBJffX1LAiY")("minHeight","300px")}function y(t,e){if(1&t){var n=l.Vb();l.Ub(0,"tour-step",8),l.bc("dispose",(function(){return l.Ec(n),l.fc().disposePopper(2)})),l.Ub(1,"p",7),l.Qc(2,"TOUR.TRADING.HISTORY.1"),l.Tb(),l.Tb()}2&t&&l.mc("image","history")("title","HEADING.TRADE_HISTORY")("minHeight","300px")}function _(t,e){if(1&t){var n=l.Vb();l.Ub(0,"tour-step",8),l.bc("dispose",(function(){return l.Ec(n),l.fc().disposePopper(3)})),l.Ub(1,"p",7),l.Qc(2,"TOUR.TRADING.CHART.1"),l.Tb(),l.Pb(3,"br"),l.Ub(4,"p",7),l.Qc(5,"TOUR.TRADING.CHART.2"),l.Tb(),l.Tb()}2&t&&l.mc("image","chart")("title","HEADING.MARKET_CHART")("minHeight","300px")}function O(t,e){if(1&t){var n=l.Vb();l.Ub(0,"tour-step",8),l.bc("dispose",(function(){return l.Ec(n),l.fc().disposePopper(4)})),l.Ub(1,"p",7),l.Qc(2,"TOUR.TRADING.ORDER_FORM.1"),l.Tb(),l.Pb(3,"br"),l.Ub(4,"p",7),l.Qc(5,"TOUR.TRADING.ORDER_FORM.2"),l.Tb(),l.Tb()}2&t&&l.mc("image","form")("title","HEADING.ORDER_FORM")("minHeight","300px")}function k(t,e){if(1&t){var n=l.Vb();l.Ub(0,"tour-step",9),l.bc("dispose",(function(){return l.Ec(n),l.fc().disposePopper(5)})),l.Ub(1,"p",7),l.Qc(2,"TOUR.TRADING.MARKET_ORDER.1"),l.Tb(),l.Pb(3,"br"),l.Ub(4,"p",7),l.Qc(5,"TOUR.TRADING.MARKET_ORDER.2"),l.Tb(),l.Tb()}2&t&&l.mc("image","market")("title","BUTTON.MARKET_ORDER")("videoUrl","https://www.youtube.com/watch?v=wBJffX1LAiY")("minHeight","300px")}function T(t,e){if(1&t){var n=l.Vb();l.Ub(0,"tour-step",9),l.bc("dispose",(function(){return l.Ec(n),l.fc().disposePopper(6)})),l.Ub(1,"p",7),l.Qc(2,"TOUR.TRADING.LIMIT_ORDER.1"),l.Tb(),l.Pb(3,"br"),l.Ub(4,"p",7),l.Qc(5,"TOUR.TRADING.LIMIT_ORDER.2"),l.Tb(),l.Tb()}2&t&&l.mc("image","form")("title","BUTTON.LIMIT_ORDER")("videoUrl","https://www.youtube.com/watch?v=wBJffX1LAiY")("minHeight","300px")}function S(t,e){if(1&t){var n=l.Vb();l.Ub(0,"tour-step",8),l.bc("dispose",(function(){return l.Ec(n),l.fc().disposePopper(7)})),l.Ub(1,"p",7),l.Qc(2,"TOUR.TRADING.OPEN_POSITIONS.1"),l.Tb(),l.Tb()}2&t&&l.mc("image","positions")("title","HEADING.OPEN_POSITIONS")("minHeight","300px")}var E=function(){var t=function(){function t(e){C(this,t),this.store=e,this.tour$=this.store.pipe(Object(o.m)(s.k)),this.quantityUnits$=this.store.pipe(Object(o.m)(u.r))}return w(t,[{key:"ngAfterViewInit",value:function(){var t=this;this.tour$.pipe(Object(r.b)(this),Object(a.a)((function(t){return t.inProgress})),Object(a.a)((function(t){return"trading-dashboard"===t.type})),Object(a.a)((function(t){var e=t.step;return e>0&&e<8}))).subscribe((function(e){var n=e.step;t.steps.toArray()[n-1].centerTrigger()}))}},{key:"disposePopper",value:function(t){this.steps.toArray()[t-1].dispose()}},{key:"toggleUnit",value:function(t){this.store.dispatch(Object(c.D)({trading:t}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(l.Ob(o.b))},t.\u0275cmp=l.Ib({type:t,selectors:[["trading-tour"]],viewQuery:function(t,e){var n;1&t&&l.Wc(m,!0),2&t&&l.zc(n=l.cc())&&(e.steps=n)},decls:21,vars:0,consts:[["sbPlacement","topStart"],["tourStep",""],[3,"image","title","nextRouteTo","videoUrl","minHeight","dispose",4,"sbContent"],[3,"image","title","minHeight","dispose",4,"sbContent"],["sbPlacement","centerEnd"],[3,"image","title","videoUrl","minHeight","dispose",4,"sbContent"],[3,"image","title","nextRouteTo","videoUrl","minHeight","dispose"],["subheading","","translate",""],[3,"image","title","minHeight","dispose"],[3,"image","title","videoUrl","minHeight","dispose"]],template:function(t,e){1&t&&(l.Ub(0,"sb-popper",0,1),l.Oc(2,v,6,5,"tour-step",2),l.Tb(),l.Ub(3,"sb-popper",0,1),l.Oc(5,y,3,3,"tour-step",3),l.Tb(),l.Ub(6,"sb-popper",0,1),l.Oc(8,_,6,3,"tour-step",3),l.Tb(),l.Ub(9,"sb-popper",4,1),l.Oc(11,O,6,3,"tour-step",3),l.Tb(),l.Ub(12,"sb-popper",0,1),l.Oc(14,k,6,4,"tour-step",5),l.Tb(),l.Ub(15,"sb-popper",0,1),l.Oc(17,T,6,4,"tour-step",5),l.Tb(),l.Ub(18,"sb-popper",0,1),l.Oc(20,S,3,3,"tour-step",3),l.Tb())},directives:[d.a,h.a,f.a,p.a,b.a,g.a],styles:[""],changeDetection:0}),t=Object(i.d)([Object(r.a)()],t)}()},"F+Yz":function(t,e,n){"use strict";n.d(e,"a",(function(){return P}));var i=n("kZht"),r=n("An66"),o=n("yPvj"),a=n("1etq"),s=n("anSm"),c=n("1o0v"),u=n("aDqW"),l=n("chaP"),d=n("BeMo"),h=n("LbKT"),f=n("+e22"),p=n("7J2L"),b=n("rUBT"),g=n("DpwM"),m=n("Knqz"),v=n("rqGg"),y=n("FUqb");function _(t,e){if(1&t&&(i.Sb(0),i.Ub(1,"p",7),i.Qc(2,"LABEL.PREMIUM"),i.Tb(),i.Ub(3,"p",19),i.Qc(4),i.gc(5,"change"),i.gc(6,"number"),i.Tb(),i.Rb()),2&t){var n=i.fc(2);i.Cb(3),i.mc("pnl",n.ticker.premium),i.Cb(1),i.Sc("",i.hc(5,2,i.ic(6,4,n.ticker.premium,"1.1-1")),"%")}}function O(t,e){if(1&t&&(i.Ub(0,"p",7),i.Qc(1,"COLUMN.CHANGE"),i.Tb(),i.Ub(2,"p",8),i.Pb(3,"change",20),i.Tb()),2&t){var n=i.fc(2);i.Cb(3),i.mc("value",n.ticker.change)}}function k(t,e){if(1&t&&(i.Sb(0),i.Qc(1),i.gc(2,"percent"),i.gc(3,"translate"),i.Rb()),2&t){var n=i.fc(2);i.Cb(1),i.Tc(" ",i.ic(2,2,n.ticker.relative_funding_rate,"1.4-4")," / ",i.hc(3,5,"UNIT.HOUR_SHORT")," ")}}var w=function(t){return{days:t}};function T(t,e){if(1&t&&(i.Qc(0),i.gc(1,"translate"),i.gc(2,"date")),2&t){var n=i.fc(2);i.Sc(" ",n.isAlt?i.ic(1,1,"UNIT.X_DAYS",i.rc(7,w,n.ticker.dtm)):i.ic(2,4,n.ticker.maturityTime,"dd/MMM/yyyy")," ")}}var S=function(t){return{flex:t}};function E(t,e){if(1&t&&(i.Sb(0),i.Ub(1,"div",2),i.Pb(2,"market-icon",3),i.gc(3,"base"),i.Ub(4,"div",4),i.Qc(5),i.gc(6,"pair"),i.Tb(),i.Ub(7,"div",5),i.Qc(8),i.gc(9,"translate"),i.gc(10,"maturityMonth"),i.Tb(),i.Tb(),i.Ub(11,"div",6),i.Ub(12,"p",7),i.Qc(13,"LABEL.MARK_PRICE"),i.Tb(),i.Ub(14,"p",8),i.Qc(15),i.gc(16,"sato"),i.Tb(),i.Tb(),i.Ub(17,"div",9),i.Ub(18,"p",7),i.Qc(19,"LABEL.24H_VOLUME"),i.Tb(),i.Ub(20,"p",8),i.Qc(21),i.gc(22,"humanNumber"),i.gc(23,"asset"),i.Tb(),i.Tb(),i.Ub(24,"div",10),i.Oc(25,_,7,7,"ng-container",0),i.Oc(26,O,4,1,"ng-template",null,11,i.Pc),i.Tb(),i.Ub(28,"div",12),i.Ub(29,"p",7),i.Qc(30,"LABEL.OPEN_INTEREST"),i.Tb(),i.Ub(31,"p",8),i.Qc(32),i.gc(33,"humanNumber"),i.gc(34,"asset"),i.Tb(),i.Tb(),i.Ub(35,"div",13),i.Ub(36,"p",14),i.Qc(37),i.gc(38,"translate"),i.Tb(),i.Ub(39,"p",8),i.Oc(40,k,4,7,"ng-container",0),i.Oc(41,T,3,9,"ng-template",null,15,i.Pc),i.Tb(),i.Tb(),i.Ub(43,"div",16),i.Pb(44,"sparkline",17),i.Tb(),i.Pb(45,"div",18),i.Rb()),2&t){var n=i.Ac(27),r=i.Ac(42),o=i.fc();i.Cb(2),i.mc("base",i.hc(3,18,o.ticker.product_id)),i.Cb(3),i.Sc(" ",i.hc(6,20,o.ticker.pair)," "),i.Cb(3),i.Sc(" ",i.hc(9,22,i.hc(10,24,o.ticker.product_id))," "),i.Cb(7),i.Sc(" ",i.ic(16,26,o.ticker.markPrice,o.ticker)," "),i.Cb(6),i.Uc(" ",i.hc(22,29,o.ticker.displayVolume)," "," "," ",i.hc(23,31,o.ticker.tradingDisplayAsset)," "),i.Cb(4),i.mc("ngIf",o.isAlt)("ngIfElse",n),i.Cb(7),i.Uc(" ",i.hc(33,33,o.ticker.displayOpenInterest)," "," "," ",i.hc(34,35,o.ticker.tradingDisplayAsset)," "),i.Cb(5),i.Sc(" ",i.hc(38,37,"perpetual"===o.ticker.tag?"LABEL.FUNDING_RATE":o.isAlt?"LABEL.DAYS_TO_MATURITY":"LABEL.MATURITY_DATE")," "),i.Cb(3),i.mc("ngIf","perpetual"===o.ticker.tag)("ngIfElse",r),i.Cb(3),i.mc("ngClass",i.rc(39,S,o.isFlex)),i.Cb(1),i.mc("market",o.ticker.product_id),i.Cb(1),i.mc("ngClass",i.rc(41,S,o.isFlex))}}function x(t,e){1&t&&(i.Ub(0,"div",21),i.Pb(1,"kraken-loading"),i.Tb())}var P=function(){var t=function t(){C(this,t),this.isAlt=!1,this.isFlex=!1};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["market-picker-preview"]],inputs:{ticker:"ticker",isAlt:"isAlt",isFlex:"isFlex"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"market"],[3,"base"],["subheading","",1,"pair"],["body","","ghost","",1,"maturity"],[1,"price-1"],["body","","translate","",1,"label"],["body","","mono",""],[1,"stat-1"],[1,"price-2"],["change",""],[1,"stat-2"],[1,"stat-3"],["body","",1,"label"],["fixed",""],[1,"spark",3,"ngClass"],["filled","",3,"market"],[1,"fade",3,"ngClass"],["body","","mono","",3,"pnl"],[3,"value"],[1,"loading"]],template:function(t,e){if(1&t&&(i.Oc(0,E,46,43,"ng-container",0),i.Oc(1,x,2,0,"ng-template",null,1,i.Pc)),2&t){var n=i.Ac(2);i.mc("ngIf",e.ticker)("ngIfElse",n)}},directives:[r.n,o.a,a.a,s.a,c.a,u.a,l.a,r.l,d.a,h.a,f.a,p.a],pipes:[b.a,b.e,u.d,b.d,g.c,m.a,v.a,y.b,r.f,r.u,r.e],styles:['[_nghost-%COMP%]{display:grid;grid-template:"market price-1" auto "stat-1 price-2" auto "stat-2 stat-3" auto ". ." 1fr "spark spark" auto/min-content auto;gap:var(--spacing);align-items:center}.label[_ngcontent-%COMP%]{margin-bottom:var(--spacing-s);color:var(--ghost-colour);font-size:10px}.market[_ngcontent-%COMP%]{grid-area:market;display:grid;grid-template:"icon pair " auto "icon maturity" auto/min-content 1fr;gap:var(--spacing-s) var(--spacing);align-items:center;white-space:nowrap}.market[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{grid-area:icon;font-size:32px}.market[_ngcontent-%COMP%] .pair[_ngcontent-%COMP%]{grid-area:pair}.market[_ngcontent-%COMP%] .maturity[_ngcontent-%COMP%]{grid-area:maturity}.price-1[_ngcontent-%COMP%], .price-2[_ngcontent-%COMP%], .stat-3[_ngcontent-%COMP%]{text-align:right}.price-1[_ngcontent-%COMP%]{grid-area:price-1}.price-2[_ngcontent-%COMP%]{grid-area:price-2}.stat-1[_ngcontent-%COMP%]{grid-area:stat-1}.stat-2[_ngcontent-%COMP%]{grid-area:stat-2}.stat-3[_ngcontent-%COMP%]{grid-area:stat-3}.fade[_ngcontent-%COMP%], .spark[_ngcontent-%COMP%]{grid-area:spark;margin:0 calc(var(--spacing) * -1);z-index:-1;transform:translateY(-32px)}.fade.flex[_ngcontent-%COMP%], .spark.flex[_ngcontent-%COMP%]{transform:none}.fade[_ngcontent-%COMP%]{width:calc(100% + 2 * var(--spacing));height:100%;z-index:2;background-image:linear-gradient(0deg,rgba(0,0,0,.5),transparent);mix-blend-mode:overlay;pointer-events:none}.fade.flex[_ngcontent-%COMP%]{transform:none}.loading[_ngcontent-%COMP%]{grid-area:1/1/-1/-1}'],changeDetection:0}),t}()},F6wS:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return u}));var i=n("FxgA"),r=n("pTnX"),o=n("kZht"),a=["*",[["mat-card-footer"]]],s=["*","mat-card-footer"],c=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=o.Jb({type:t,selectors:[["mat-card-content"],["","mat-card-content",""],["","matCardContent",""]],hostAttrs:[1,"mat-card-content"]}),t}(),u=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=o.Jb({type:t,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-card-title"]}),t}(),l=function(){var t=function t(e){C(this,t),this._animationMode=e};return t.\u0275fac=function(e){return new(e||t)(o.Ob(i.a,8))},t.\u0275cmp=o.Ib({type:t,selectors:[["mat-card"]],hostAttrs:[1,"mat-card","mat-focus-indicator"],hostVars:2,hostBindings:function(t,e){2&t&&o.Gb("_mat-animation-noopable","NoopAnimations"===e._animationMode)},exportAs:["matCard"],ngContentSelectors:s,decls:2,vars:0,template:function(t,e){1&t&&(o.lc(a),o.kc(0),o.kc(1,1))},styles:[".mat-card{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:block;position:relative;padding:16px;border-radius:4px}._mat-animation-noopable.mat-card{transition:none;animation:none}.mat-card .mat-divider-horizontal{position:absolute;left:0;width:100%}[dir=rtl] .mat-card .mat-divider-horizontal{left:auto;right:0}.mat-card .mat-divider-horizontal.mat-divider-inset{position:static;margin:0}[dir=rtl] .mat-card .mat-divider-horizontal.mat-divider-inset{margin-right:0}.cdk-high-contrast-active .mat-card{outline:solid 1px}.mat-card-actions,.mat-card-subtitle,.mat-card-content{display:block;margin-bottom:16px}.mat-card-title{display:block;margin-bottom:8px}.mat-card-actions{margin-left:-8px;margin-right:-8px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 32px);margin:0 -16px 16px -16px}.mat-card-footer{display:block;margin:0 -16px -16px -16px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button,.mat-card-actions .mat-stroked-button{margin:0 8px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header .mat-card-title{margin-bottom:12px}.mat-card-header-text{margin:0 16px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;object-fit:cover}.mat-card-title-group{display:flex;justify-content:space-between}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-title-group>.mat-card-xl-image{margin:-8px 0 8px}@media(max-width: 599px){.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}}.mat-card>:first-child,.mat-card-content>:first-child{margin-top:0}.mat-card>:last-child:not(.mat-card-footer),.mat-card-content>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-16px;border-top-left-radius:inherit;border-top-right-radius:inherit}.mat-card>.mat-card-actions:last-child{margin-bottom:-8px;padding-bottom:0}.mat-card-actions .mat-button:first-child,.mat-card-actions .mat-raised-button:first-child,.mat-card-actions .mat-stroked-button:first-child{margin-left:0;margin-right:0}.mat-card-title:not(:first-child),.mat-card-subtitle:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}\n"],encapsulation:2,changeDetection:0}),t}(),d=function(){var t=function t(){C(this,t)};return t.\u0275mod=o.Mb({type:t}),t.\u0275inj=o.Lb({factory:function(e){return new(e||t)},imports:[[r.j],r.j]}),t}()},FEHI:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("ekTi"),r=n("oznm"),o=e.ErrorCorrectionLevelValues=function(t){return t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H",t}(e.ErrorCorrectionLevelValues||{});e.default=function(){function t(e,n,i){this.value=e,this.stringValue=n,this.bits=i,t.FOR_BITS.set(i,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new i.default(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){return e instanceof t&&this.value===e.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new r.default;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(o.L,"L",1),t.M=new t(o.M,"M",0),t.Q=new t(o.Q,"Q",3),t.H=new t(o.H,"H",2),t}()},FQF6:function(t,e,n){"use strict";n.d(e,"a",(function(){return I}));var i=n("zqNl"),r=n("uJYd"),o=n("J/3c"),a=n("nXdR"),s=n("YtkY"),c=n("i67J"),u=n("kZht"),l=n("An66"),d=n("anSm"),h=n("1o0v"),f=n("aDqW"),p=n("1etq"),b=n("LbKT"),g=n("yPvj"),m=n("chaP"),v=n("B6Vo"),y=n("+I9z"),_=n("NxuZ"),O=n("7J2L"),k=n("P0Um"),T=n("DpwM");function S(t,e){if(1&t){var n=u.Vb();u.Ub(0,"div",10),u.Ub(1,"div",11),u.Pb(2,"market-icon",12),u.Tb(),u.Ub(3,"p",13),u.Qc(4),u.gc(5,"walletName"),u.Tb(),u.Ub(6,"div",14),u.gc(7,"translate"),u.Pb(8,"ghost-trail",15),u.gc(9,"cryptoPrecise"),u.Ub(10,"span",16),u.Qc(11),u.Tb(),u.Tb(),u.Ub(12,"div",17),u.gc(13,"translate"),u.Qc(14),u.gc(15,"crypto"),u.Ub(16,"span",16),u.Qc(17,"USD"),u.Tb(),u.Tb(),u.Ub(18,"div",18),u.Ub(19,"fa-icon",19),u.bc("click",(function(){u.Ec(n);var t=e.$implicit;return u.fc(3).transfer(t)})),u.Tb(),u.Tb(),u.Tb()}if(2&t){var i=e.$implicit;u.Cb(2),u.mc("base",i.currency),u.Cb(2),u.Rc(u.hc(5,7,i.currency)),u.Cb(2),u.mc("sbTooltip",u.hc(7,9,"WALLETS.TRADING.AVAILABLE_MARGIN")),u.Cb(2),u.nc("content",u.ic(9,11,i.balance,i.currency)),u.Cb(3),u.Rc(i.currency),u.Cb(1),u.mc("sbTooltip",u.hc(13,14,"LABEL.COLLATERAL_VALUE")),u.Cb(2),u.Sc(" ",u.ic(15,16,i.cv,"usd")," ")}}function E(t,e){if(1&t&&(u.Sb(0),u.Ub(1,"section",4),u.Ub(2,"span"),u.Ub(3,"p",5),u.Qc(4,"LABEL.PORTFOLIO_VALUE"),u.Tb(),u.Ub(5,"p",6),u.Qc(6),u.gc(7,"number"),u.Ub(8,"span",7),u.Qc(9,"USD"),u.Tb(),u.Tb(),u.Tb(),u.Tb(),u.Ub(10,"section",4),u.Ub(11,"span"),u.Ub(12,"p",5),u.Qc(13,"LABEL.BALANCE"),u.Tb(),u.Ub(14,"p",6),u.Qc(15),u.gc(16,"number"),u.Ub(17,"span",7),u.Qc(18,"USD"),u.Tb(),u.Tb(),u.Tb(),u.Ub(19,"span"),u.Ub(20,"p",5),u.Qc(21,"LABEL.PNL"),u.Tb(),u.Ub(22,"span",8),u.Qc(23),u.gc(24,"number"),u.Ub(25,"span",7),u.Qc(26,"USD"),u.Tb(),u.Tb(),u.Tb(),u.Tb(),u.Ub(27,"section"),u.Oc(28,S,20,19,"div",9),u.Tb(),u.Rb()),2&t){var n=u.fc().ngIf;u.Cb(6),u.Sc("",u.hc(7,5,n.wallet.pv)," "),u.Cb(9),u.Sc("",u.hc(16,7,n.wallet.balance)," "),u.Cb(7),u.mc("pnl",n.wallet.pnl),u.Cb(1),u.Sc("",u.ic(24,9,n.wallet.pnl,"1.2-2")," "),u.Cb(5),u.mc("ngForOf",n.currencies)}}function x(t,e){if(1&t&&(u.Ub(0,"section",2),u.Oc(1,E,29,12,"ng-container",3),u.Tb()),2&t){var n=e.ngIf;u.fc();var i=u.Ac(4);u.Cb(1),u.mc("ngIf",n.wallet&&n.currencies)("ngIfElse",i)}}function P(t,e){1&t&&u.Pb(0,"kraken-loading")}var A=function(t,e){return{wallet:t,currencies:e}},I=function(){var t=function(){function t(e){C(this,t),this.store=e,this.holdingWallets$=this.store.pipe(Object(i.m)(o.j)),this.flexWallet$=this.store.pipe(Object(i.m)(o.l)),this.flexCurrencies$=this.flexWallet$.pipe(Object(s.a)((function(t){var e;return null===(e=null==t?void 0:t.flexAssets)||void 0===e?void 0:e.valueSeq().toArray().sort(a.n)})))}return w(t,[{key:"transfer",value:function(t){var e=this;this.holdingWallets$.pipe(Object(c.h)()).subscribe((function(n){var i=n.find((function(e){return e.currency===(null==t?void 0:t.currency)}));e.store.dispatch(Object(r.g)({name:"wallet-transaction",inputs:{type:"crypto-transfer",originWallet:i||t}}))}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Ob(i.b))},t.\u0275cmp=u.Ib({type:t,selectors:[["flex-wallet"]],decls:5,vars:8,consts:[["class","flex-wallet",4,"ngIf"],["loading",""],[1,"flex-wallet"],[4,"ngIf","ngIfElse"],[1,"heading"],["body","","ghost","","translate",""],["subheading",""],["ghost",""],["subheading","",3,"pnl"],["class","wallet",4,"ngFor","ngForOf"],[1,"wallet"],[1,"icon"],[1,"icon",3,"base"],["body","",1,"name"],["body","","mono","",1,"balance",3,"sbTooltip"],[3,"content"],["ghost","",1,"unit"],["body","","ghost","","mono","",1,"notional",3,"sbTooltip"],[1,"transfer"],["icon","transfer","size","2x",3,"click"]],template:function(t,e){1&t&&(u.Oc(0,x,2,2,"section",0),u.gc(1,"async"),u.gc(2,"async"),u.Oc(3,P,1,0,"ng-template",null,1,u.Pc)),2&t&&u.mc("ngIf",u.sc(5,A,u.hc(1,1,e.flexWallet$),u.hc(2,3,e.flexCurrencies$)))},directives:[l.n,d.a,h.a,f.a,p.a,b.a,l.m,g.a,m.a,v.a,y.a,_.b,O.a],pipes:[l.b,l.f,k.a,f.d,T.b,T.a],styles:['.flex-wallet[_ngcontent-%COMP%]{padding:var(--spacing)}.heading[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;padding-bottom:var(--spacing-s);border-bottom:1px solid var(--border-colour);margin-bottom:var(--spacing-s);position:sticky;top:0;background:var(--card-colour);z-index:10}.wallet[_ngcontent-%COMP%]{display:grid;grid-template:"icon name balance transfer" 16px "icon name notional transfer"/25px 1fr;padding:var(--spacing-xs) 0;gap:0 var(--spacing-xs)}.wallet[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;align-self:center}.wallet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;align-self:center}.wallet[_ngcontent-%COMP%] .balance[_ngcontent-%COMP%]{grid-area:balance;display:flex;flex-direction:row;text-align:right;justify-content:flex-end}.wallet[_ngcontent-%COMP%] .transfer[_ngcontent-%COMP%]{grid-area:transfer;align-self:center}.wallet[_ngcontent-%COMP%] .transfer[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{cursor:pointer;color:var(--brand)}.wallet[_ngcontent-%COMP%] .currency[_ngcontent-%COMP%]{grid-area:currency}.wallet[_ngcontent-%COMP%] .notional[_ngcontent-%COMP%]{grid-area:notional;display:flex;flex-direction:row;text-align:right;justify-content:flex-end}market-icon[_ngcontent-%COMP%]{font-size:20px}.unit[_ngcontent-%COMP%]{text-transform:uppercase;margin-left:var(--spacing-s)}'],changeDetection:0}),t}()},FTWg:function(t,e,n){"use strict";n.d(e,"a",(function(){return P}));var i=n("3kIJ"),r=n("YzTY"),o=n("yN5A"),a=n("kZht"),s=n("zqNl"),c=n("mcff"),u=n("anSm"),l=n("An66"),d=n("EmXI"),h=n("Tcl6"),f=n("hCLc"),p=n("scAs"),g=n("NxuZ"),m=n("WYJo"),v=n("aDqW");function y(t,e){if(1&t){var n=a.Vb();a.Ub(0,"div",11),a.bc("dragstart",(function(t){a.Ec(n);var i=e.$implicit;return a.fc().dragstartTab(t,i)}))("dragend",(function(){return a.Ec(n),a.fc().dragging=!1})),a.Ub(1,"span"),a.Pb(2,"fa-icon",12),a.Qc(3),a.gc(4,"uppercase"),a.gc(5,"translate"),a.Tb(),a.Tb()}if(2&t){var i=e.$implicit,r=a.fc();a.mc("hidden",r.usedComponent(i)),a.Cb(3),a.Sc(" ",a.hc(4,2,a.hc(5,4,"HEADING."+r.CID[i]))," ")}}var _=function(t,e){return{selected:t,taken:e}},O=function(t){return{"grid-area":t}};function k(t,e){if(1&t){var n=a.Vb();a.Ub(0,"section",13),a.bc("mousedown",(function(){a.Ec(n);var t=e.$implicit,i=a.fc();return i.gridMouseDown=!0,i.selectGridCell(t)}))("mouseup",(function(){a.Ec(n);var t=e.$implicit,i=a.fc();return i.gridMouseDown=!1,i.selectGridCell(t),i.saveArea()}))("mouseover",(function(){a.Ec(n);var t=e.$implicit;return a.fc().selectGridCell(t)})),a.Tb()}if(2&t){var i=e.$implicit,r=a.fc();a.Lc("cursor",r.gridMouseDown?"grabbing":"grab"),a.mc("ngClass",a.sc(4,_,r.isSelected(i),r.isTaken(i)))("ngStyle",a.rc(7,O,r.getCellGridArea(i)))}}function T(t,e){if(1&t){var n=a.Vb();a.Ub(0,"div",19),a.bc("dragstart",(function(t){a.Ec(n);var i=e.$implicit;return a.fc(2).dragstartTab(t,i)}))("dragend",(function(t){a.Ec(n);var i=e.$implicit,r=a.fc().$implicit;return a.fc().dragendTab(t,i,r.id)})),a.Ub(1,"span"),a.Pb(2,"fa-icon",12),a.Qc(3),a.gc(4,"uppercase"),a.gc(5,"translate"),a.Tb(),a.Tb()}if(2&t){var i=e.$implicit,r=a.fc(2);a.Cb(3),a.Sc(" ",a.hc(4,1,a.hc(5,3,"HEADING."+r.CID[i]))," ")}}var S=function(t,e){return{valid:t,invalid:e}};function E(t,e){if(1&t){var n=a.Vb();a.Ub(0,"section",14),a.bc("dragover",(function(t){return a.Ec(n),a.fc().dragoverTab(t)}))("drop",(function(t){a.Ec(n);var i=e.$implicit;return a.fc().dropTab(t,i.id)})),a.Ub(1,"div",15),a.Ub(2,"fa-icon",16),a.bc("click",(function(){a.Ec(n);var t=e.index;return a.fc().deleteSelection(t)})),a.gc(3,"translate"),a.Tb(),a.Tb(),a.Ub(4,"div",17),a.Oc(5,T,6,5,"div",18),a.Tb(),a.Tb()}if(2&t){var i=e.$implicit,r=a.fc();a.mc("ngStyle",a.rc(6,O,r.getSelectionGridArea(i.cells)))("ngClass",a.sc(8,S,r.selectionValid(i)&&r.dragging,!r.selectionValid(i)&&r.dragging)),a.Cb(2),a.mc("matTooltip",a.hc(3,4,"BUTTON.DELETE")),a.Cb(3),a.mc("ngForOf",i.components)}}var x=[r.a.BRACKET_ORDER,r.a.ACCOUNT_ACTIVITY],P=function(){var t=function(){function t(e,n,i){C(this,t),this.store=e,this.fb=n,this.dialog=i,this.form=this.buildForm(),this.gridCells=["00","01","02","03","04","10","11","12","13","14","20","21","22","23","24","30","31","32","33","34","40","41","42","43","44"],this.gridSelections=[],this.currentlySelected=[],this.dragging=!1,this.gridMouseDown=!1,this.CID=r.a,this.components=r.i}return w(t,[{key:"buildForm",value:function(){return this.fb.group({type:["custom",[i.x.required]],name:["",[i.x.required]]})}},{key:"selectGridCell",value:function(t){var e=this;if(!this.isTaken(t)&&this.gridMouseDown)if(this.currentlySelected.length){if(this.start===t)return this.start="",void(this.currentlySelected=[]);this.currentlySelected=[],this.end=t,this.gridCells.forEach((function(t){var n=t[0],i=t[1];(e.end[1]>=e.start[1]?i<=e.end[1]&&i>=e.start[1]:i>=e.end[1]&&i<=e.start[1])&&(e.end[0]>=e.start[0]?n<=e.end[0]&&n>=e.start[0]:n>=e.end[0]&&n<=e.start[0])&&e.currentlySelected.push("".concat(n).concat(i))}))}else this.currentlySelected=[t],this.start=t}},{key:"isSelected",value:function(t){return this.currentlySelected.some((function(e,n){return e===t}))}},{key:"isTaken",value:function(t){return this.gridSelections.some((function(e){return e.cells.includes(t)}))}},{key:"reset",value:function(){this.gridSelections=[],this.resetSelected()}},{key:"resetSelected",value:function(){this.currentlySelected=[],this.start="",this.end=""}},{key:"deleteSelection",value:function(t){this.gridSelections.splice(t,1),this.resetSelected()}},{key:"isLastInSelected",value:function(t){return this.currentlySelected[this.currentlySelected.length-1]===t}},{key:"saveArea",value:function(){this.currentlySelected.length&&(this.gridSelections.push({id:this.currentlySelected[0],cells:this.currentlySelected,components:[]}),this.resetSelected())}},{key:"getSelectionGridArea",value:function(t){var e=t[0],n=t[t.length-1],i=Number(e[0]),r=Number(e[1]);return"".concat(i+1," / ").concat(r+1," / span ").concat(Number(n[0])-i+1," / span ").concat(Number(n[1])-r+1)}},{key:"getCellGridArea",value:function(t){return"".concat(Number(t[0])+1," / ").concat(Number(t[1])+1)}},{key:"createLayout",value:function(){var t,e={};this.gridSelections.forEach((function(t){var n=t.cells[0],i=t.cells[t.cells.length-1],r=Number(n[0]),o=Number(n[1]),a=Number(i[0]),s=Number(i[1]);e["c".concat(r).concat(o)]={components:t.components,size:[2*(s-o+1),2*(a-r+1)]}})),this.store.dispatch(Object(o.c)({config:{name:this.form.get("name").value||"Custom",type:"custom",panels:e}})),null===(t=this.dialog)||void 0===t||t.close()}},{key:"dragstartTab",value:function(t,e){this.draggingComponent=this.components[e],this.dragging=!0,t.dataTransfer.setData("text/plain",JSON.stringify(e)),t.dataTransfer.dropEffect="move"}},{key:"dragendTab",value:function(t,e,n){this.draggingComponent=void 0,this.dragging=!1;var i=this.gridSelections.findIndex((function(t){return t.id===n})),r=this.gridSelections[i];if(r){var o=r.components.findIndex((function(t){return t===e.id})),a=r.components;a.splice(o,1),-1!==o&&(this.gridSelections[i]=Object.assign(Object.assign({},r),{components:a}))}}},{key:"dragoverTab",value:function(t){t.preventDefault(),t.dataTransfer.dropEffect="move"}},{key:"dropTab",value:function(t,e){var n=JSON.parse(t.dataTransfer.getData("text/plain")),i=this.gridSelections.findIndex((function(t){return t.id===e})),r=this.gridSelections[i].components.includes(n),o=this.gridSelections[i],a=o.cells[0],s=o.cells[o.cells.length-1],c=Number(a[0]),u=Number(a[1]),l=2*(Number(s[0])-c+1),d=2*(Number(s[1])-u+1),h=this.components[Number(n)];this.draggingComponent=void 0,this.dragging=!1,(null==h?void 0:h.lowerBounds)&&((null==h?void 0:h.lowerBounds[0])>d||(null==h?void 0:h.lowerBounds[1])>l)||(null==h?void 0:h.upperBounds)&&((null==h?void 0:h.upperBounds[0])a||(null==s?void 0:s.lowerBounds[1])>o)||(null==s?void 0:s.upperBounds)&&((null==s?void 0:s.upperBounds[0])=0?"+"+t:t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Nb({name:"change",type:t,pure:!0}),t}(),o=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){return t>0?"arrow-small-up":"arrow-small-down"}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Nb({name:"changeIcon",type:t,pure:!0}),t}()},FoZF:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("w6/c");e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.default)},FpF2:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("Qkwj");e.default=function(t){function e(e,n,i,r){var o=t.call(this,e,n)||this;return o.estimatedModuleSize=i,o.count=r,void 0===r&&(o.count=1),o}return r(e,t),e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(t,e,n){if(Math.abs(e-this.getY())<=t&&Math.abs(n-this.getX())<=t){var i=Math.abs(t-this.estimatedModuleSize);return i<=1||i<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,n,i){var r=this.count+1;return new e((this.count*this.getX()+n)/r,(this.count*this.getY()+t)/r,(this.count*this.estimatedModuleSize+i)/r,r)},e}(o.default)},FxgA:function(t,e,n){"use strict";n.d(e,"a",(function(){return Ae})),n.d(e,"b",(function(){return Me}));var i=n("kZht"),r=n("ENSU"),s=n("+6xv");function u(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function l(t){switch(t.length){case 0:return new s.d;case 1:return t[0];default:return new s.o(t)}}function d(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=[],c=[],u=-1,l=null;if(i.forEach((function(t){var n=t.offset,i=n==u,d=i&&l||{};Object.keys(t).forEach((function(n){var i=n,c=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,a),c){case s.p:c=r[n];break;case s.a:c=o[n];break;default:c=e.normalizeStyleValue(n,i,c,a)}d[i]=c})),i||c.push(d),l=d,u=n})),a.length){var d="\n - ";throw new Error("Unable to animate due to the following errors:".concat(d).concat(a.join(d)))}return c}function f(t,e,n,i){switch(e){case"start":t.onStart((function(){return i(n&&g(n,"start",t))}));break;case"done":t.onDone((function(){return i(n&&g(n,"done",t))}));break;case"destroy":t.onDestroy((function(){return i(n&&g(n,"destroy",t))}))}}function g(t,e,n){var i=n.totalTime,r=v(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),o=t._data;return null!=o&&(r._data=o),r}function v(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6?arguments[6]:void 0;return{element:t,triggerName:e,fromState:n,toState:i,phaseName:r,totalTime:o,disabled:!!a}}function y(t,e,n){var i;return t instanceof Map?(i=t.get(e))||t.set(e,i=n):(i=t[e])||(i=t[e]=n),i}function _(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var O=function(t,e){return!1},k=function(t,e){return!1},T=function(t,e,n){return[]},S=u();(S||"undefined"!=typeof Element)&&(O=function(t,e){return t.contains(e)},k=function(){if(S||Element.prototype.matches)return function(t,e){return t.matches(e)};var t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?function(t,n){return e.apply(t,[n])}:k}(),T=function(t,e,n){var i=[];if(n)i.push.apply(i,b(t.querySelectorAll(e)));else{var r=t.querySelector(e);r&&i.push(r)}return i});var E=null,x=!1;function P(t){E||(E=("undefined"!=typeof document?document.body:null)||{},x=!!E.style&&"WebkitAppearance"in E.style);var e=!0;return E.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(!(e=t in E.style)&&x)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in E.style),e}var A=k,I=O,M=T;function D(t){var e={};return Object.keys(t).forEach((function(n){var i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]})),e}var R,j=((R=function(){function t(){C(this,t)}return w(t,[{key:"validateStyleProperty",value:function(t){return P(t)}},{key:"matchesElement",value:function(t,e){return A(t,e)}},{key:"containsElement",value:function(t,e){return I(t,e)}},{key:"query",value:function(t,e,n){return M(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return n||""}},{key:"animate",value:function(t,e,n,i,r){return new s.d(n,i)}}]),t}()).\u0275fac=function(t){return new(t||R)},R.\u0275prov=i.Kb({token:R,factory:R.\u0275fac}),R),L=function(){var t=function t(){C(this,t)};return t.NOOP=new j,t}();function N(t){if("number"==typeof t)return t;var e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:U(parseFloat(e[1]),e[2])}function U(t,e){switch(e){case"s":return 1e3*t;default:return t}}function F(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){var i,r=0,o="";if("string"==typeof t){var a=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return e.push('The provided timing value "'.concat(t,'" is invalid.')),{duration:0,delay:0,easing:""};i=U(parseFloat(a[1]),a[2]);var s=a[3];null!=s&&(r=U(parseFloat(s),a[4]));var c=a[5];c&&(o=c)}else i=t;if(!n){var u=!1,l=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),u=!0),r<0&&(e.push("Delay values below 0 are not allowed for this animation step."),u=!0),u&&e.splice(l,0,'The provided timing value "'.concat(t,'" is invalid.'))}return{duration:i,delay:r,easing:o}}(t,e,n)}function B(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).forEach((function(n){e[n]=t[n]})),e}function z(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e)for(var i in t)n[i]=t[i];else B(t,n);return n}function V(t,e,n){return n?e+":"+n+";":""}function H(t){for(var e="",n=0;n *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e) *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}var r=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push('The provided transition expression "'.concat(t,'" is not supported')),e;var o=r[1],a=r[2],s=r[3];e.push(ot(o,s)),"<"!=a[0]||"*"==o&&"*"==s||e.push(ot(s,o))}(t,r,i)})):r.push(n),r),animation:o,queryCount:e.queryCount,depCount:e.depCount,options:dt(t.options)}}},{key:"visitSequence",value:function(t,e){var n=this;return{type:2,steps:t.steps.map((function(t){return et(n,t,e)})),options:dt(t.options)}}},{key:"visitGroup",value:function(t,e){var n=this,i=e.currentTime,r=0,o=t.steps.map((function(t){e.currentTime=i;var o=et(n,t,e);return r=Math.max(r,e.currentTime),o}));return e.currentTime=r,{type:3,steps:o,options:dt(t.options)}}},{key:"visitAnimate",value:function(t,e){var n,i=function(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return ht(F(t,e).duration,0,"");var i=t;if(i.split(/\s+/).some((function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)}))){var r=ht(0,0,"");return r.dynamic=!0,r.strValue=i,r}return ht((n=n||F(i,e)).duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;var r=t.styles?t.styles:Object(s.l)({});if(5==r.type)n=this.visitKeyframes(r,e);else{var o=t.styles,a=!1;if(!o){a=!0;var c={};i.easing&&(c.easing=i.easing),o=Object(s.l)(c)}e.currentTime+=i.duration+i.delay;var u=this.visitStyle(o,e);u.isEmptyStep=a,n=u}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}},{key:"visitStyle",value:function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}},{key:"_makeStyleAst",value:function(t,e){var n=[];Array.isArray(t.styles)?t.styles.forEach((function(t){"string"==typeof t?t==s.a?n.push(t):e.errors.push("The provided style string value ".concat(t," is not allowed.")):n.push(t)})):n.push(t.styles);var i=!1,r=null;return n.forEach((function(t){if(lt(t)){var e=t,n=e.easing;if(n&&(r=n,delete e.easing),!i)for(var o in e)if(e[o].toString().indexOf("{{")>=0){i=!0;break}}})),{type:6,styles:n,easing:r,offset:t.offset,containsDynamicStyles:i,options:null}}},{key:"_validateStyleAst",value:function(t,e){var n=this,i=e.currentAnimateTimings,r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach((function(t){"string"!=typeof t&&Object.keys(t).forEach((function(i){if(n._driver.validateStyleProperty(i)){var a,s,c,u,l,d=e.collectedStyles[e.currentQuerySelector],h=d[i],f=!0;h&&(o!=r&&o>=h.startTime&&r<=h.endTime&&(e.errors.push('The CSS property "'.concat(i,'" that exists between the times of "').concat(h.startTime,'ms" and "').concat(h.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(o,'ms" and "').concat(r,'ms"')),f=!1),o=h.startTime),f&&(d[i]={startTime:o,endTime:r}),e.options&&(a=t[i],s=e.options,c=e.errors,u=s.params||{},(l=G(a)).length&&l.forEach((function(t){u.hasOwnProperty(t)||c.push("Unable to resolve the local animation param ".concat(t," in the given list of values"))})))}else e.errors.push('The provided animation property "'.concat(i,'" is not a supported CSS property for animations'))}))}))}},{key:"visitKeyframes",value:function(t,e){var n=this,i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;var r=0,o=[],a=!1,s=!1,c=0,u=t.steps.map((function(t){var i=n._makeStyleAst(t,e),u=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach((function(t){if(lt(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}}));else if(lt(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(i.styles),l=0;return null!=u&&(r++,l=i.offset=u),s=s||l<0||l>1,a=a||l0&&r0?r==h?1:d*r:o[r],s=a*b;e.currentTime=f+p.delay+s,p.duration=s,n._validateStyleAst(t,e),t.offset=a,i.styles.push(t)})),i}},{key:"visitReference",value:function(t,e){return{type:8,animation:et(this,Q(t.animation),e),options:dt(t.options)}}},{key:"visitAnimateChild",value:function(t,e){return e.depCount++,{type:9,options:dt(t.options)}}},{key:"visitAnimateRef",value:function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:dt(t.options)}}},{key:"visitQuery",value:function(t,e){var n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;var r=m(function(t){var e=!!t.split(/\s*,\s*/).find((function(t){return":self"==t}));return e&&(t=t.replace(at,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,(function(t){return".ng-trigger-"+t.substr(1)})).replace(/:animating/g,".ng-animating"),e]}(t.selector),2),o=r[0],a=r[1];e.currentQuerySelector=n.length?n+" "+o:o,y(e.collectedStyles,e.currentQuerySelector,{});var s=et(this,Q(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:a,animation:s,originalSelector:t.selector,options:dt(t.options)}}},{key:"visitStagger",value:function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:F(t.timings,e.errors,!0);return{type:12,animation:et(this,Q(t.animation),e),timings:n,options:null}}}]),t}(),ut=function t(e){C(this,t),this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function lt(t){return!Array.isArray(t)&&"object"==typeof t}function dt(t){var e;return t?(t=B(t)).params&&(t.params=(e=t.params)?B(e):null):t={},t}function ht(t,e,n){return{duration:t,delay:e,easing:n}}function ft(t,e,n,i,r,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:a,subTimeline:s}}var pt=function(){function t(){C(this,t),this._map=new Map}return w(t,[{key:"consume",value:function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e}},{key:"append",value:function(t,e){var n,i=this._map.get(t);i||this._map.set(t,i=[]),(n=i).push.apply(n,b(e))}},{key:"has",value:function(t){return this._map.has(t)}},{key:"clear",value:function(){this._map.clear()}}]),t}(),bt=new RegExp(":enter","g"),gt=new RegExp(":leave","g");function mt(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new vt).buildKeyframes(t,e,n,i,r,o,a,s,c,u)}var vt=function(){function t(){C(this,t)}return w(t,[{key:"buildKeyframes",value:function(t,e,n,i,r,o,a,s,c){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];c=c||new pt;var l=new _t(t,e,c,i,r,u,[]);l.options=s,l.currentTimeline.setStyles([o],null,l.errors,s),et(this,n,l);var d=l.timelines.filter((function(t){return t.containsAnimation()}));if(d.length&&Object.keys(a).length){var h=d[d.length-1];h.allowOnlyTimelineStyles()||h.setStyles([a],null,l.errors,s)}return d.length?d.map((function(t){return t.buildKeyframes()})):[ft(e,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(t,e){}},{key:"visitState",value:function(t,e){}},{key:"visitTransition",value:function(t,e){}},{key:"visitAnimateChild",value:function(t,e){var n=e.subInstructions.consume(e.element);if(n){var i=e.createSubContext(t.options),r=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,i,i.options);r!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t}},{key:"visitAnimateRef",value:function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}},{key:"_visitSubInstructions",value:function(t,e,n){var i=e.currentTimeline.currentTime,r=null!=n.duration?N(n.duration):null,o=null!=n.delay?N(n.delay):null;return 0!==r&&t.forEach((function(t){var n=e.appendInstructionToTimeline(t,r,o);i=Math.max(i,n.duration+n.delay)})),i}},{key:"visitReference",value:function(t,e){e.updateOptions(t.options,!0),et(this,t.animation,e),e.previousNode=t}},{key:"visitSequence",value:function(t,e){var n=this,i=e.subContextCount,r=e,o=t.options;if(o&&(o.params||o.delay)&&((r=e.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=yt);var a=N(o.delay);r.delayNextStep(a)}t.steps.length&&(t.steps.forEach((function(t){return et(n,t,r)})),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}},{key:"visitGroup",value:function(t,e){var n=this,i=[],r=e.currentTimeline.currentTime,o=t.options&&t.options.delay?N(t.options.delay):0;t.steps.forEach((function(a){var s=e.createSubContext(t.options);o&&s.delayNextStep(o),et(n,a,s),r=Math.max(r,s.currentTimeline.currentTime),i.push(s.currentTimeline)})),i.forEach((function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)})),e.transformIntoNewTimeline(r),e.previousNode=t}},{key:"_visitTiming",value:function(t,e){if(t.dynamic){var n=t.strValue;return F(e.params?Y(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}},{key:"visitAnimate",value:function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());var r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}},{key:"visitStyle",value:function(t,e){var n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();var r=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(r):n.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t}},{key:"visitKeyframes",value:function(t,e){var n=e.currentAnimateTimings,i=e.currentTimeline.duration,r=n.duration,o=e.createSubContext().currentTimeline;o.easing=n.easing,t.styles.forEach((function(t){o.forwardTime((t.offset||0)*r),o.setStyles(t.styles,t.easing,e.errors,e.options),o.applyStylesToKeyframe()})),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(i+r),e.previousNode=t}},{key:"visitQuery",value:function(t,e){var n=this,i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?N(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=yt);var a=i,s=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=s.length;var c=null;s.forEach((function(i,r){e.currentQueryIndex=r;var s=e.createSubContext(t.options,i);o&&s.delayNextStep(o),i===e.element&&(c=s.currentTimeline),et(n,t.animation,s),s.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,s.currentTimeline.currentTime)})),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),c&&(e.currentTimeline.mergeTimelineCollectedStyles(c),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}},{key:"visitStagger",value:function(t,e){var n=e.parentContext,i=e.currentTimeline,r=t.timings,o=Math.abs(r.duration),a=o*(e.currentQueryTotal-1),s=o*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":s=a-s;break;case"full":s=n.currentStaggerTime}var c=e.currentTimeline;s&&c.delayNextStep(s);var u=c.currentTime;et(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)}}]),t}(),yt={},_t=function(){function t(e,n,i,r,o,a,s,c){C(this,t),this._driver=e,this.element=n,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=a,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=yt,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new Ot(this._driver,n,0),s.push(this.currentTimeline)}return w(t,[{key:"updateOptions",value:function(t,e){var n=this;if(t){var i=t,r=this.options;null!=i.duration&&(r.duration=N(i.duration)),null!=i.delay&&(r.delay=N(i.delay));var o=i.params;if(o){var a=r.params;a||(a=this.options.params={}),Object.keys(o).forEach((function(t){e&&a.hasOwnProperty(t)||(a[t]=Y(o[t],a,n.errors))}))}}}},{key:"_copyOptions",value:function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach((function(t){n[t]=e[t]}))}}return t}},{key:"createSubContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=n||this.element,o=new t(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}},{key:"transformIntoNewTimeline",value:function(t){return this.previousNode=yt,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(t,e,n){var i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},r=new kt(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(r),i}},{key:"incrementTime",value:function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}},{key:"delayNextStep",value:function(t){t>0&&this.currentTimeline.delayNextStep(t)}},{key:"invokeQuery",value:function(t,e,n,i,r,o){var a=[];if(i&&a.push(this.element),t.length>0){t=(t=t.replace(bt,"."+this._enterClassName)).replace(gt,"."+this._leaveClassName);var s=this._driver.query(this.element,t,1!=n);0!==n&&(s=n<0?s.slice(s.length+n,s.length):s.slice(0,n)),a.push.apply(a,b(s))}return r||0!=a.length||o.push('`query("'.concat(e,'")` returned zero elements. (Use `query("').concat(e,'", { optional: true })` if you wish to allow this.)')),a}},{key:"params",get:function(){return this.options.params}}]),t}(),Ot=function(){function t(e,n,i,r){C(this,t),this._driver=e,this.element=n,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}return w(t,[{key:"containsAnimation",value:function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}},{key:"getCurrentStyleProperties",value:function(){return Object.keys(this._currentKeyframe)}},{key:"delayNextStep",value:function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}},{key:"fork",value:function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)}},{key:"_loadKeyframe",value:function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}},{key:"forwardFrame",value:function(){this.duration+=1,this._loadKeyframe()}},{key:"forwardTime",value:function(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}},{key:"_updateStyle",value:function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(t){var e=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach((function(t){e._backFill[t]=e._globalTimelineStyles[t]||s.a,e._currentKeyframe[t]=s.a})),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(t,e,n,i){var r=this;e&&(this._previousKeyframe.easing=e);var o=i&&i.params||{},a=function(t,e){var n,i={};return t.forEach((function(t){"*"===t?(n=n||Object.keys(e)).forEach((function(t){i[t]=s.a})):z(t,!1,i)})),i}(t,this._globalTimelineStyles);Object.keys(a).forEach((function(t){var e=Y(a[t],o,n);r._pendingStyles[t]=e,r._localTimelineStyles.hasOwnProperty(t)||(r._backFill[t]=r._globalTimelineStyles.hasOwnProperty(t)?r._globalTimelineStyles[t]:s.a),r._updateStyle(t,e)}))}},{key:"applyStylesToKeyframe",value:function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach((function(n){t._currentKeyframe[n]=e[n]})),Object.keys(this._localTimelineStyles).forEach((function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])})))}},{key:"snapshotCurrentStyles",value:function(){var t=this;Object.keys(this._localTimelineStyles).forEach((function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)}))}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"mergeTimelineCollectedStyles",value:function(t){var e=this;Object.keys(t._styleSummary).forEach((function(n){var i=e._styleSummary[n],r=t._styleSummary[n];(!i||r.time>i.time)&&e._updateStyle(n,r.value)}))}},{key:"buildKeyframes",value:function(){var t=this;this.applyStylesToKeyframe();var e=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration,r=[];this._keyframes.forEach((function(o,a){var c=z(o,!0);Object.keys(c).forEach((function(t){var i=c[t];i==s.p?e.add(t):i==s.a&&n.add(t)})),i||(c.offset=a/t.duration),r.push(c)}));var o=e.size?K(e.values()):[],a=n.size?K(n.values()):[];if(i){var c=r[0],u=B(c);c.offset=0,u.offset=1,r=[c,u]}return ft(this.element,r,o,a,this.duration,this.startTime,this.easing,!1)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"properties",get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t}}]),t}(),kt=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a,s){var c,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return C(this,n),(c=e.call(this,t,i,s.delay)).element=i,c.keyframes=r,c.preStyleProps=o,c.postStyleProps=a,c._stretchStartingKeyframe=u,c.timings={duration:s.duration,delay:s.delay,easing:s.easing},c}return w(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var t=this.keyframes,e=this.timings,n=e.delay,i=e.duration,r=e.easing;if(this._stretchStartingKeyframe&&n){var o=[],a=i+n,s=n/a,c=z(t[0],!1);c.offset=0,o.push(c);var u=z(t[0],!1);u.offset=wt(s),o.push(u);for(var l=t.length-1,d=1;d<=l;d++){var h=z(t[d],!1);h.offset=wt((n+h.offset*i)/a),o.push(h)}i=a,n=0,r="",t=o}return ft(this.element,t,this.preStyleProps,this.postStyleProps,i,n,r,!0)}}]),n}(Ot);function wt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Math.pow(10,e-1);return Math.round(t*n)/n}var Ct,Tt,St=function t(){C(this,t)},Et=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,[{key:"normalizePropertyName",value:function(t,e){return X(t)}},{key:"normalizeStyleValue",value:function(t,e,n,i){var r="",o=n.toString().trim();if(xt[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&i.push("Please provide a CSS unit value for ".concat(t,":").concat(n))}return o+r}}]),n}(St),xt=(Ct="width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","),Tt={},Ct.forEach((function(t){return Tt[t]=!0})),Tt);function Pt(t,e,n,i,r,o,a,s,c,u,l,d,h){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:o,toState:i,toStyles:a,timelines:s,queriedElements:c,preStyleProps:u,postStyleProps:l,totalTime:d,errors:h}}var At={},It=function(){function t(e,n,i){C(this,t),this._triggerName=e,this.ast=n,this._stateStyles=i}return w(t,[{key:"match",value:function(t,e,n,i){return function(t,e,n,i,r){return t.some((function(t){return t(e,n,i,r)}))}(this.ast.matchers,t,e,n,i)}},{key:"buildStyles",value:function(t,e,n){var i=this._stateStyles["*"],r=this._stateStyles[t],o=i?i.buildStyles(e,n):{};return r?r.buildStyles(e,n):o}},{key:"build",value:function(t,e,n,i,r,o,a,s,c,u){var l=[],d=this.ast.options&&this.ast.options.params||At,h=this.buildStyles(n,a&&a.params||At,l),f=s&&s.params||At,p=this.buildStyles(i,f,l),b=new Set,g=new Map,m=new Map,v="void"===i,_={params:Object.assign(Object.assign({},d),f)},O=u?[]:mt(t,e,this.ast.animation,r,o,h,p,_,c,l),k=0;if(O.forEach((function(t){k=Math.max(t.duration+t.delay,k)})),l.length)return Pt(e,this._triggerName,n,i,v,h,p,[],[],g,m,k,l);O.forEach((function(t){var n=t.element,i=y(g,n,{});t.preStyleProps.forEach((function(t){return i[t]=!0}));var r=y(m,n,{});t.postStyleProps.forEach((function(t){return r[t]=!0})),n!==e&&b.add(n)}));var w=K(b.values());return Pt(e,this._triggerName,n,i,v,h,p,O,w,g,m,k)}}]),t}(),Mt=function(){function t(e,n){C(this,t),this.styles=e,this.defaultParams=n}return w(t,[{key:"buildStyles",value:function(t,e){var n={},i=B(this.defaultParams);return Object.keys(t).forEach((function(e){var n=t[e];null!=n&&(i[e]=n)})),this.styles.styles.forEach((function(t){if("string"!=typeof t){var r=t;Object.keys(r).forEach((function(t){var o=r[t];o.length>1&&(o=Y(o,i,e)),n[t]=o}))}})),n}}]),t}(),Dt=function(){function t(e,n){var i=this;C(this,t),this.name=e,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach((function(t){i.states[t.name]=new Mt(t.style,t.options&&t.options.params||{})})),Rt(this.states,"true","1"),Rt(this.states,"false","0"),n.transitions.forEach((function(t){i.transitionFactories.push(new It(e,t,i.states))})),this.fallbackTransition=new It(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},this.states)}return w(t,[{key:"matchTransition",value:function(t,e,n,i){return this.transitionFactories.find((function(r){return r.match(t,e,n,i)}))||null}},{key:"matchStyles",value:function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}},{key:"containsQueries",get:function(){return this.ast.queryCount>0}}]),t}();function Rt(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var jt=new pt,Lt=function(){function t(e,n,i){C(this,t),this.bodyNode=e,this._driver=n,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}return w(t,[{key:"register",value:function(t,e){var n=[],i=st(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=i}},{key:"_buildPlayer",value:function(t,e,n){var i=t.element,r=d(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,r,t.duration,t.delay,t.easing,[],!0)}},{key:"create",value:function(t,e){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[],a=this._animations[t],c=new Map;if(a?(n=mt(this._driver,e,a,"ng-enter","ng-leave",{},{},r,jt,o)).forEach((function(t){var e=y(c,t.element,{});t.postStyleProps.forEach((function(t){return e[t]=null}))})):(o.push("The requested animation doesn't exist or has already been destroyed"),n=[]),o.length)throw new Error("Unable to create the animation due to the following errors: "+o.join("\n"));c.forEach((function(t,e){Object.keys(t).forEach((function(n){t[n]=i._driver.computeStyle(e,n,s.a)}))}));var u=l(n.map((function(t){var e=c.get(t.element);return i._buildPlayer(t,{},e)})));return this._playersById[t]=u,u.onDestroy((function(){return i.destroy(t)})),this.players.push(u),u}},{key:"destroy",value:function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}},{key:"_getPlayer",value:function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e}},{key:"listen",value:function(t,e,n,i){var r=v(e,"","","");return f(this._getPlayer(t),n,r,i),function(){}}},{key:"command",value:function(t,e,n,i){if("register"!=n)if("create"!=n){var r=this._getPlayer(t);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}else this.create(t,e,i[0]||{});else this.register(t,i[0])}}]),t}(),Nt=[],Ut={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Ft={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Bt=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";C(this,t),this.namespaceId=n;var i,r=e&&e.hasOwnProperty("value");if(this.value=null!=(i=r?e.value:e)?i:null,r){var o=B(e);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}return w(t,[{key:"absorbOptions",value:function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach((function(t){null==n[t]&&(n[t]=e[t])}))}}},{key:"params",get:function(){return this.options.params}}]),t}(),zt=new Bt("void"),Vt=function(){function t(e,n,i){C(this,t),this.id=e,this.hostElement=n,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Yt(n,this._hostClassName)}return w(t,[{key:"listen",value:function(t,e,n,i){var r,o=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'.concat(n,'" because the animation trigger "').concat(e,"\" doesn't exist!"));if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'.concat(e,'" because the provided event is undefined!'));if("start"!=(r=n)&&"done"!=r)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(e,'" is not supported!'));var a=y(this._elementListeners,t,[]),s={name:e,phase:n,callback:i};a.push(s);var c=y(this._engine.statesByElement,t,{});return c.hasOwnProperty(e)||(Yt(t,"ng-trigger"),Yt(t,"ng-trigger-"+e),c[e]=zt),function(){o._engine.afterFlush((function(){var t=a.indexOf(s);t>=0&&a.splice(t,1),o._triggers[e]||delete c[e]}))}}},{key:"register",value:function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}},{key:"_getTrigger",value:function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'.concat(t,'" has not been registered!'));return e}},{key:"trigger",value:function(t,e,n){var i=this,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this._getTrigger(e),a=new qt(this.id,e,t),s=this._engine.statesByElement.get(t);s||(Yt(t,"ng-trigger"),Yt(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,s={}));var c=s[e],u=new Bt(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&c&&u.absorbOptions(c.options),s[e]=u,c||(c=zt),"void"===u.value||c.value!==u.value){var l=y(this._engine.playersByElement,t,[]);l.forEach((function(t){t.namespaceId==i.id&&t.triggerName==e&&t.queued&&t.destroy()}));var d=o.matchTransition(c.value,u.value,t,u.params),h=!1;if(!d){if(!r)return;d=o.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:d,fromState:c,toState:u,player:a,isFallbackTransition:h}),h||(Yt(t,"ng-animate-queued"),a.onStart((function(){Kt(t,"ng-animate-queued")}))),a.onDone((function(){var e=i.players.indexOf(a);e>=0&&i.players.splice(e,1);var n=i._engine.playersByElement.get(t);if(n){var r=n.indexOf(a);r>=0&&n.splice(r,1)}})),this.players.push(a),l.push(a),a}if(!function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(var r=0;r=0){for(var i=!1,r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}},{key:"register",value:function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}},{key:"registerTrigger",value:function(t,e,n){var i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}},{key:"destroy",value:function(t,e){var n=this;if(t){var i=this._fetchNamespace(t);this.afterFlush((function(){n.namespacesByHostElement.delete(i.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(i);e>=0&&n._namespaceList.splice(e,1)})),this.afterFlushAnimationsDone((function(){return i.destroy(e)}))}}},{key:"_fetchNamespace",value:function(t){return this._namespaceLookup[t]}},{key:"fetchNamespacesByElement",value:function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var i=Object.keys(n),r=0;r=0&&this.collectedLeaveElements.splice(o,1)}if(t){var a=this._fetchNamespace(t);a&&a.insertNode(e,n)}i&&this.collectEnterElement(e)}}},{key:"collectEnterElement",value:function(t){this.collectedEnterElements.push(t)}},{key:"markElementAsDisabled",value:function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Yt(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Kt(t,"ng-animate-disabled"))}},{key:"removeNode",value:function(t,e,n,i){if($t(e)){var r=t?this._fetchNamespace(t):null;if(r?r.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){var o=this.namespacesByHostElement.get(e);o&&o.id!==t&&o.removeNode(e,i)}}else this._onRemovalComplete(e,i)}},{key:"markElementAsRemoved",value:function(t,e,n,i){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(t,e,n,i,r){return $t(e)?this._fetchNamespace(t).listen(e,n,i,r):function(){}}},{key:"_buildInstruction",value:function(t,e,n,i,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,r)}},{key:"destroyInnerAnimations",value:function(t){var e=this,n=this.driver.query(t,".ng-trigger",!0);n.forEach((function(t){return e.destroyActiveAnimationsForElement(t)})),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,".ng-animating",!0)).forEach((function(t){return e.finishActiveQueriedAnimationOnElement(t)}))}},{key:"destroyActiveAnimationsForElement",value:function(t){var e=this.playersByElement.get(t);e&&e.forEach((function(t){t.queued?t.markedForDestroy=!0:t.destroy()}))}},{key:"finishActiveQueriedAnimationOnElement",value:function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach((function(t){return t.finish()}))}},{key:"whenRenderingDone",value:function(){var t=this;return new Promise((function(e){if(t.players.length)return l(t.players).onDone((function(){return e()}));e()}))}},{key:"processLeaveNode",value:function(t){var e=this,n=t.__ng_removed;if(n&&n.setForRemoval){if(t.__ng_removed=Ut,n.namespaceId){this.destroyInnerAnimations(t);var i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach((function(t){e.markElementAsDisabled(t,!1)}))}},{key:"flush",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((function(e,n){return t._balanceNamespaceList(e,n)})),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var i=0;i=0;A--)this._namespaceList[A].drainQueuedTransitions(e).forEach((function(t){var e=t.player,o=t.element;if(x.push(e),n.collectedEnterElements.length){var s=o.__ng_removed;if(s&&s.setForMove)return void e.destroy()}var l=!f||!n.driver.containsElement(f,o),h=S.get(o),p=m.get(o),b=n._buildInstruction(t,i,p,h,l);if(b.errors&&b.errors.length)P.push(b);else{if(l)return e.onStart((function(){return $(o,b.fromStyles)})),e.onDestroy((function(){return q(o,b.toStyles)})),void r.push(e);if(t.isFallbackTransition)return e.onStart((function(){return $(o,b.fromStyles)})),e.onDestroy((function(){return q(o,b.toStyles)})),void r.push(e);b.timelines.forEach((function(t){return t.stretchStartingKeyframe=!0})),i.append(o,b.timelines),a.push({instruction:b,player:e,element:o}),b.queriedElements.forEach((function(t){return y(c,t,[]).push(e)})),b.preStyleProps.forEach((function(t,e){var n=Object.keys(t);if(n.length){var i=u.get(e);i||u.set(e,i=new Set),n.forEach((function(t){return i.add(t)}))}})),b.postStyleProps.forEach((function(t,e){var n=Object.keys(t),i=d.get(e);i||d.set(e,i=new Set),n.forEach((function(t){return i.add(t)}))}))}}));if(P.length){var I=[];P.forEach((function(t){I.push("@".concat(t.triggerName," has failed due to:\n")),t.errors.forEach((function(t){return I.push("- ".concat(t,"\n"))}))})),x.forEach((function(t){return t.destroy()})),this.reportError(I)}var M=new Map,D=new Map;a.forEach((function(t){var e=t.element;i.has(e)&&(D.set(e,e),n._beforeAnimationBuild(t.player.namespaceId,t.instruction,M))})),r.forEach((function(t){var e=t.element;n._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach((function(t){y(M,e,[]).push(t),t.destroy()}))}));var R=_.filter((function(t){return Xt(t,u,d)})),j=new Map;Wt(j,this.driver,k,d,s.a).forEach((function(t){Xt(t,u,d)&&R.push(t)}));var L=new Map;g.forEach((function(t,e){Wt(L,n.driver,new Set(t),u,s.p)})),R.forEach((function(t){var e=j.get(t),n=L.get(t);j.set(t,Object.assign(Object.assign({},e),n))}));var N=[],U=[],F={};a.forEach((function(t){var e=t.element,a=t.player,s=t.instruction;if(i.has(e)){if(h.has(e))return a.onDestroy((function(){return q(e,s.toStyles)})),a.disabled=!0,a.overrideTotalTime(s.totalTime),void r.push(a);var c=F;if(D.size>1){for(var u=e,d=[];u=u.parentNode;){var f=D.get(u);if(f){c=f;break}d.push(u)}d.forEach((function(t){return D.set(t,c)}))}var p=n._buildAnimation(a.namespaceId,s,M,o,L,j);if(a.setRealPlayer(p),c===F)N.push(a);else{var b=n.playersByElement.get(c);b&&b.length&&(a.parentPlayer=l(b)),r.push(a)}}else $(e,s.fromStyles),a.onDestroy((function(){return q(e,s.toStyles)})),U.push(a),h.has(e)&&r.push(a)})),U.forEach((function(t){var e=o.get(t.element);if(e&&e.length){var n=l(e);t.setRealPlayer(n)}})),r.forEach((function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()}));for(var B=0;B<_.length;B++){var z=_[B],V=z.__ng_removed;if(Kt(z,"ng-leave"),!V||!V.hasAnimation){var H=[];if(c.size){var Q=c.get(z);Q&&Q.length&&H.push.apply(H,b(Q));for(var W=this.driver.query(z,".ng-animating",!0),G=0;G0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new s.d(t.duration,t.delay)}},{key:"queuedPlayers",get:function(){var t=[];return this._namespaceList.forEach((function(e){e.players.forEach((function(e){e.queued&&t.push(e)}))})),t}}]),t}(),qt=function(){function t(e,n,i){C(this,t),this.namespaceId=e,this.triggerName=n,this.element=i,this._player=new s.d,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return w(t,[{key:"setRealPlayer",value:function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach((function(n){e._queuedCallbacks[n].forEach((function(e){return f(t,n,void 0,e)}))})),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(t){this.totalTime=t}},{key:"syncPlayerEvents",value:function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart((function(){return n.triggerCallback("start")})),t.onDone((function(){return e.finish()})),t.onDestroy((function(){return e.destroy()}))}},{key:"_queueEvent",value:function(t,e){y(this._queuedCallbacks,t,[]).push(e)}},{key:"onDone",value:function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}},{key:"onStart",value:function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}},{key:"onDestroy",value:function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}},{key:"init",value:function(){this._player.init()}},{key:"hasStarted",value:function(){return!this.queued&&this._player.hasStarted()}},{key:"play",value:function(){!this.queued&&this._player.play()}},{key:"pause",value:function(){!this.queued&&this._player.pause()}},{key:"restart",value:function(){!this.queued&&this._player.restart()}},{key:"finish",value:function(){this._player.finish()}},{key:"destroy",value:function(){this.destroyed=!0,this._player.destroy()}},{key:"reset",value:function(){!this.queued&&this._player.reset()}},{key:"setPosition",value:function(t){this.queued||this._player.setPosition(t)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)}}]),t}();function $t(t){return t&&1===t.nodeType}function Qt(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function Wt(t,e,n,i,r){var o=[];n.forEach((function(t){return o.push(Qt(t))}));var a=[];i.forEach((function(n,i){var o={};n.forEach((function(t){var n=o[t]=e.computeStyle(i,t,r);n&&0!=n.length||(i.__ng_removed=Ft,a.push(i))})),t.set(i,o)}));var s=0;return n.forEach((function(t){return Qt(t,o[s++])})),a}function Gt(t,e){var n=new Map;if(t.forEach((function(t){return n.set(t,[])})),0==e.length)return n;var i=new Set(e),r=new Map;return e.forEach((function(t){var e=function t(e){if(!e)return 1;var o=r.get(e);if(o)return o;var a=e.parentNode;return o=n.has(a)?a:i.has(a)?1:t(a),r.set(e,o),o}(t);1!==e&&n.get(e).push(t)})),n}function Yt(t,e){if(t.classList)t.classList.add(e);else{var n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function Kt(t,e){if(t.classList)t.classList.remove(e);else{var n=t.$$classes;n&&delete n[e]}}function Zt(t,e,n){l(n).onDone((function(){return t.processLeaveNode(e)}))}function Xt(t,e,n){var i=n.get(t);if(!i)return!1;var r=e.get(t);return r?i.forEach((function(t){return r.add(t)})):e.set(t,i),n.delete(t),!0}var Jt=function(){function t(e,n,i){var r=this;C(this,t),this.bodyNode=e,this._driver=n,this._triggerCache={},this.onRemovalComplete=function(t,e){},this._transitionEngine=new Ht(e,n,i),this._timelineEngine=new Lt(e,n,i),this._transitionEngine.onRemovalComplete=function(t,e){return r.onRemovalComplete(t,e)}}return w(t,[{key:"registerTrigger",value:function(t,e,n,i,r){var o=t+"-"+i,a=this._triggerCache[o];if(!a){var s=[],c=st(this._driver,r,s);if(s.length)throw new Error('The animation trigger "'.concat(i,'" has failed to build due to the following errors:\n - ').concat(s.join("\n - ")));a=function(t,e){return new Dt(t,e)}(i,c),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(e,i,a)}},{key:"register",value:function(t,e){this._transitionEngine.register(t,e)}},{key:"destroy",value:function(t,e){this._transitionEngine.destroy(t,e)}},{key:"onInsert",value:function(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)}},{key:"onRemove",value:function(t,e,n,i){this._transitionEngine.removeNode(t,e,i||!1,n)}},{key:"disableAnimations",value:function(t,e){this._transitionEngine.markElementAsDisabled(t,e)}},{key:"process",value:function(t,e,n,i){if("@"==n.charAt(0)){var r=m(_(n),2),o=r[0],a=r[1];this._timelineEngine.command(o,e,a,i)}else this._transitionEngine.trigger(t,e,n,i)}},{key:"listen",value:function(t,e,n,i,r){if("@"==n.charAt(0)){var o=m(_(n),2),a=o[0],s=o[1];return this._timelineEngine.listen(a,e,s,r)}return this._transitionEngine.listen(t,e,n,i,r)}},{key:"flush",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(t)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}}]),t}();function te(t,e){var n=null,i=null;return Array.isArray(e)&&e.length?(n=ne(e[0]),e.length>1&&(i=ne(e[e.length-1]))):e&&(n=ne(e)),n||i?new ee(t,n,i):null}var ee=function(){var t=function(){function t(e,n,i){C(this,t),this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;var r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}return w(t,[{key:"start",value:function(){this._state<1&&(this._startStyles&&q(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(q(this._element,this._initialStyles),this._endStyles&&(q(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&($(this._element,this._startStyles),this._endStyles=null),this._endStyles&&($(this._element,this._endStyles),this._endStyles=null),q(this._element,this._initialStyles),this._state=3)}}]),t}();return t.initialStylesByElement=new WeakMap,t}();function ne(t){for(var e=null,n=Object.keys(t),i=0;i=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),ce(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var t,e,n,i;this._destroyed||(this._destroyed=!0,this.finish(),t=this._element,e=this._name,n=le(t,"").split(","),(i=se(n,e))>=0&&(n.splice(i,1),ue(t,"",n.join(","))))}}]),t}();function oe(t,e,n){ue(t,"PlayState",n,ae(t,e))}function ae(t,e){var n=le(t,"");return n.indexOf(",")>0?se(n.split(","),e):se([n],e)}function se(t,e){for(var n=0;n=0)return n;return-1}function ce(t,e,n){n?t.removeEventListener("animationend",e):t.addEventListener("animationend",e)}function ue(t,e,n,i){var r="animation"+e;if(null!=i){var o=t.style[r];if(o.length){var a=o.split(",");a[i]=n,n=a.join(",")}}t.style[r]=n}function le(t,e){return t.style["animation"+e]}var de=function(){function t(e,n,i,r,o,a,s,c){C(this,t),this.element=e,this.keyframes=n,this.animationName=i,this._duration=r,this._delay=o,this._finalStyles=s,this._specialStyles=c,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=a||"linear",this.totalTime=r+o,this._buildStyler()}return w(t,[{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"destroy",value:function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach((function(t){return t()})),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach((function(t){return t()})),this._onStartFns=[]}},{key:"finish",value:function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}},{key:"setPosition",value:function(t){this._styler.setPosition(t)}},{key:"getPosition",value:function(){return this._styler.getPosition()}},{key:"hasStarted",value:function(){return this._state>=2}},{key:"init",value:function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}},{key:"play",value:function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}},{key:"pause",value:function(){this.init(),this._styler.pause()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"reset",value:function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}},{key:"_buildStyler",value:function(){var t=this;this._styler=new re(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",(function(){return t.finish()}))}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}},{key:"beforeDestroy",value:function(){var t=this;this.init();var e={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach((function(i){"offset"!=i&&(e[i]=n?t._finalStyles[i]:nt(t.element,i))}))}this.currentSnapshot=e}}]),t}(),he=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this)).element=t,r._startingStyles={},r.__initialized=!1,r._styles=D(i),r}return w(n,[{key:"init",value:function(){var t=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach((function(e){t._startingStyles[e]=t.element.style[e]})),o(h(n.prototype),"init",this).call(this))}},{key:"play",value:function(){var t=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach((function(e){return t.element.style.setProperty(e,t._styles[e])})),o(h(n.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var t=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach((function(e){var n=t._startingStyles[e];n?t.element.style.setProperty(e,n):t.element.style.removeProperty(e)})),this._startingStyles=null,o(h(n.prototype),"destroy",this).call(this))}}]),n}(s.d),fe=function(){function t(){C(this,t),this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return w(t,[{key:"validateStyleProperty",value:function(t){return P(t)}},{key:"matchesElement",value:function(t,e){return A(t,e)}},{key:"containsElement",value:function(t,e){return I(t,e)}},{key:"query",value:function(t,e,n){return M(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"buildKeyframeElement",value:function(t,e,n){n=n.map((function(t){return D(t)}));var i="@keyframes ".concat(e," {\n"),r="";n.forEach((function(t){r=" ";var e=parseFloat(t.offset);i+="".concat(r).concat(100*e,"% {\n"),r+=" ",Object.keys(t).forEach((function(e){var n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+="".concat(r,"animation-timing-function: ").concat(n,";\n")));default:return void(i+="".concat(r).concat(e,": ").concat(n,";\n"))}})),i+=r+"}\n"})),i+="}\n";var o=document.createElement("style");return o.innerHTML=i,o}},{key:"animate",value:function(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=arguments.length>6?arguments[6]:void 0;a&&this._notifyFaultyScrubber();var s=o.filter((function(t){return t instanceof de})),c={};J(n,i)&&s.forEach((function(t){var e=t.currentSnapshot;Object.keys(e).forEach((function(t){return c[t]=e[t]}))}));var u=function(t){var e={};return t&&(Array.isArray(t)?t:[t]).forEach((function(t){Object.keys(t).forEach((function(n){"offset"!=n&&"easing"!=n&&(e[n]=t[n])}))})),e}(e=tt(t,e,c));if(0==n)return new he(t,u);var l="gen_css_kf_"+this._count++,d=this.buildKeyframeElement(t,l,e);document.querySelector("head").appendChild(d);var h=te(t,e),f=new de(t,e,l,n,i,r,u,h);return f.onDestroy((function(){var t;(t=d).parentNode.removeChild(t)})),f}},{key:"_notifyFaultyScrubber",value:function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}]),t}(),pe=function(){function t(e,n,i,r){C(this,t),this.element=e,this.keyframes=n,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}return w(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",(function(){return t._onFinish()}))}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(t,e,n){return t.animate(e,n)}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach((function(t){return t()})),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}},{key:"pause",value:function(){this.init(),this.domPlayer.pause()}},{key:"finish",value:function(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}},{key:"reset",value:function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"_resetDomPlayerState",value:function(){this.domPlayer&&this.domPlayer.cancel()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"hasStarted",value:function(){return this._started}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach((function(t){return t()})),this._onDestroyFns=[])}},{key:"setPosition",value:function(t){this.domPlayer.currentTime=t*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"beforeDestroy",value:function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach((function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:nt(t.element,n))})),this.currentSnapshot=e}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}},{key:"totalTime",get:function(){return this._delay+this._duration}}]),t}(),be=function(){function t(){C(this,t),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(ge().toString()),this._cssKeyframesDriver=new fe}return w(t,[{key:"validateStyleProperty",value:function(t){return P(t)}},{key:"matchesElement",value:function(t,e){return A(t,e)}},{key:"containsElement",value:function(t,e){return I(t,e)}},{key:"query",value:function(t,e,n){return M(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"overrideWebAnimationsSupport",value:function(t){this._isNativeImpl=t}},{key:"animate",value:function(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=arguments.length>6?arguments[6]:void 0;if(!a&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,r,o);var s={duration:n,delay:i,fill:0==i?"both":"forwards"};r&&(s.easing=r);var c={},u=o.filter((function(t){return t instanceof pe}));J(n,i)&&u.forEach((function(t){var e=t.currentSnapshot;Object.keys(e).forEach((function(t){return c[t]=e[t]}))}));var l=te(t,e=tt(t,e=e.map((function(t){return z(t,!1)})),c));return new pe(t,e,s,l)}}]),t}();function ge(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var me,ve=n("An66"),ye=((me=function(t){a(n,t);var e=c(n);function n(t,r){var o;return C(this,n),(o=e.call(this))._nextAnimationId=0,o._renderer=t.createRenderer(r.body,{id:"0",encapsulation:i.S.None,styles:[],data:{animation:[]}}),o}return w(n,[{key:"build",value:function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?Object(s.j)(t):t;return ke(this._renderer,null,e,"register",[n]),new _e(e,this._renderer)}}]),n}(s.b)).\u0275fac=function(t){return new(t||me)(i.Yb(i.H),i.Yb(ve.d))},me.\u0275prov=i.Kb({token:me,factory:me.\u0275fac}),me),_e=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this))._id=t,r._renderer=i,r}return w(n,[{key:"create",value:function(t,e){return new Oe(this._id,t,e||{},this._renderer)}}]),n}(s.c),Oe=function(){function t(e,n,i,r){C(this,t),this.id=e,this.element=n,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}return w(t,[{key:"_listen",value:function(t,e){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(t),e)}},{key:"_command",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i=0&&t0}))}},{key:"filteredTickers",get:function(){if(!this.tickers)return{};if(!this.filterFavorites)return this.tickers;var t=this.favorites;return Object(r.b)(this.tickers).map((function(e){return e.filter((function(e){return t.includes(Object(a.i)(e))}))})).filter((function(t){return t.length>0})).toObject()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["markets-overview-futures"]],inputs:{tickers:"tickers",favorites:"favorites",filterFavorites:"filterFavorites"},outputs:{selectTicker$:"selectTicker",addFavorite$:"addFavorite",removeFavorite$:"removeFavorite"},decls:3,vars:1,consts:[["class","tickers",4,"ngIf"],["noItems",""],[1,"tickers"],[4,"ngFor","ngForOf"],["subheading","",1,"base"],[3,"base"],["ghost",""],["selectable","","class","contract",3,"click",4,"ngFor","ngForOf","ngForTrackField"],["selectable","",1,"contract",3,"click"],["body","",1,"contract-tag"],[3,"pair"],[4,"ngIf","ngIfElse"],["standardTag",""],[1,"contract-detail","contract-maturity"],["caption",""],["body",""],[1,"contract-detail","contract-dtm"],[1,"contract-detail","contract-mid"],["body","","mono",""],[1,"contract-detail","contract-premium"],["body","","mono","","pnl","ticker.premium"],[1,"contract-detail","contract-volume"],["body","","ghost","",1,"contract-detail","contract-favorite",3,"click"],["size","2x",3,"icon"],["fixed",""],["label",""],["body","",1,"global__text--warn"]],template:function(t,e){1&t&&(i.Oc(0,D,2,1,"div",0),i.Oc(1,R,3,3,"ng-template",null,1,i.Pc)),2&t&&i.mc("ngIf",e.tickers)},directives:[s.n,s.m,c.a,u.a,l.a,d.b,h.a,f.a,p.a,b.a,g.a,m.b,v.a],pipes:[y.b,_.d,s.e,O.c,s.f,k.b,T.d],styles:["[_nghost-%COMP%]{display:flex;margin:var(--spacing);height:35em;max-height:100%}@media (max-width:599px){[_nghost-%COMP%]{height:40em}}.currencies[_ngcontent-%COMP%]{align-self:flex-start;background-color:var(--card-colour);border:1px solid var(--border-colour);border-left:0;margin-right:var(--spacing-l)}.currencies[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{align-items:center;border-left:solid var(--border-colour) var(--spacing-s);cursor:pointer;display:flex;padding:var(--spacing);width:250px}.currencies[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:not(:last-of-type){border-bottom:1px solid var(--border-colour)}.currencies[_ngcontent-%COMP%] li[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{margin-right:var(--spacing)}.currency--active[_ngcontent-%COMP%]{border-left:solid var(--icon-colour) var(--spacing-s)!important;color:var(--icon-colour)}.tickers[_ngcontent-%COMP%]{overflow:auto}@media (max-width:599px){.tickers[_ngcontent-%COMP%]{width:100%}}.base[_ngcontent-%COMP%]{padding:var(--spacing) 0}.base[_ngcontent-%COMP%]:not(:first-of-type){margin-top:var(--spacing);border-top:1px solid var(--border-colour)}.contract[_ngcontent-%COMP%]{display:flex;align-items:center;padding:var(--spacing-s)}.contract[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-transform:capitalize}.contract-detail[_ngcontent-%COMP%]{margin-left:var(--spacing-l);min-width:50px}.contract-detail[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:block;margin-bottom:var(--spacing-s);color:var(--ghost-colour)}.contract-favorite[_ngcontent-%COMP%]{color:var(--brand)!important}.contract-tag[_ngcontent-%COMP%]{width:17ch;white-space:nowrap;text-transform:capitalize}.contract-maturity[_ngcontent-%COMP%]{width:12ch}.contract-dtm[_ngcontent-%COMP%]{width:6ch}.contract-mid[_ngcontent-%COMP%]{width:9ch}.contract-premium[_ngcontent-%COMP%]{width:6ch}.contract-volume[_ngcontent-%COMP%]{width:10ch}@media (max-width:599px){.currencies[_ngcontent-%COMP%]{display:none}.contract-dtm[_ngcontent-%COMP%], .contract-favorite[_ngcontent-%COMP%], .contract-maturity[_ngcontent-%COMP%], .contract-premium[_ngcontent-%COMP%]{display:none!important}}"],changeDetection:0}),t}()},HgnN:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=!1,r={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 i&&console.log("RxJS: Back to a better error behavior. Thank you. <3");i=t},get useDeprecatedSynchronousErrorHandling(){return i}}},HnIH:function(t,e,n){var i=n("yBEi").getSymbolSize;e.getPositions=function(t){var e=i(t);return[[0,0],[e-7,0],[0,e-7]]}},Hq54:function(t,e,n){"use strict";n.d(e,"a",(function(){return v})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return b})),n.d(e,"d",(function(){return l})),n.d(e,"e",(function(){return o})),n.d(e,"f",(function(){return a})),n.d(e,"g",(function(){return d})),n.d(e,"h",(function(){return h})),n.d(e,"i",(function(){return m})),n.d(e,"j",(function(){return u})),n.d(e,"k",(function(){return c})),n.d(e,"l",(function(){return p})),n.d(e,"m",(function(){return s})),n.d(e,"n",(function(){return r})),n.d(e,"o",(function(){return f})),n.d(e,"p",(function(){return y})),n.d(e,"q",(function(){return g})),n.d(e,"r",(function(){return _}));var i=8,r=9,o=13,a=27,s=32,c=33,u=34,l=35,d=36,h=37,f=38,p=39,b=40,g=48,m=57,v=65,y=90;function _(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i1e-6)if(Math.abs(d*c-u*l)>1e-6&&o){var f=n-a,p=r-s,b=c*c+u*u,g=f*f+p*p,m=Math.sqrt(b),v=Math.sqrt(h),y=o*Math.tan((i-Math.acos((b+h-g)/(2*m*v)))/2),_=y/v,O=y/m;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(e+_*d)),this._+="A"+o+","+o+",0,0,"+ +(d*f>l*p)+","+(this._x1=t+O*c)+","+(this._y1=e+O*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,a,s,c){t=+t,e=+e,c=!!c;var u=(n=+n)*Math.cos(a),l=n*Math.sin(a),d=t+u,h=e+l,f=1^c,p=c?a-s:s-a;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+d+","+h:(Math.abs(this._x1-d)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+d+","+h),n&&(p<0&&(p=p%r+r),p>o?this._+="A"+n+","+n+",0,1,"+f+","+(t-u)+","+(e-l)+"A"+n+","+n+",0,1,"+f+","+(this._x1=d)+","+(this._y1=h):p>1e-6&&(this._+="A"+n+","+n+",0,"+ +(p>=i)+","+f+","+(this._x1=t+n*Math.cos(s))+","+(this._y1=e+n*Math.sin(s))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var c=s,u=function(t){return function(){return t}},l=Math.abs,d=Math.atan2,h=Math.cos,f=Math.max,p=Math.min,b=Math.sin,g=Math.sqrt,m=Math.PI,v=m/2,y=2*m;function _(t){return t>1?0:t<-1?m:Math.acos(t)}function O(t){return t>=1?v:t<=-1?-v:Math.asin(t)}function k(t){return t.innerRadius}function T(t){return t.outerRadius}function S(t){return t.startAngle}function E(t){return t.endAngle}function x(t){return t&&t.padAngle}function P(t,e,n,i,r,o,a,s){var c=n-t,u=i-e,l=a-r,d=s-o,h=d*c-l*u;if(!(h*h<1e-12))return[t+(h=(l*(e-o)-d*(t-r))/h)*c,e+h*u]}function A(t,e,n,i,r,o,a){var s=t-n,c=e-i,u=(a?o:-o)/g(s*s+c*c),l=u*c,d=-u*s,h=t+l,p=e+d,b=n+l,m=i+d,v=(h+b)/2,y=(p+m)/2,_=b-h,O=m-p,k=_*_+O*O,w=r-o,C=h*m-b*p,T=(O<0?-1:1)*g(f(0,w*w*k-C*C)),S=(C*O-_*T)/k,E=(-C*_-O*T)/k,x=(C*O+_*T)/k,P=(-C*_+O*T)/k,A=S-v,I=E-y,M=x-v,D=P-y;return A*A+I*I>M*M+D*D&&(S=x,E=P),{cx:S,cy:E,x01:-l,y01:-d,x11:S*(r/w-1),y11:E*(r/w-1)}}var I=Math.sqrt(50),M=Math.sqrt(10),D=Math.sqrt(2);function R(t,e,n){var i=(e-t)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=I?10:o>=M?5:o>=D?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=I?10:o>=M?5:o>=D?2:1)}var j=function(t,e){return te?1:t>=e?0:NaN},L=function(t){var e=t,n=t;function i(t,e,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i>>1;n(t[o],e)<0?i=o+1:r=o}return i}return 1===t.length&&(e=function(e,n){return t(e)-n},n=function(t){return function(e,n){return j(t(e),n)}}(t)),{left:i,center:function(t,n,r,o){null==r&&(r=0),null==o&&(o=t.length);var a=i(t,n,r,o-1);return a>r&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,e,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i>>1;n(t[o],e)>0?r=o:i=o+1}return i}}},N=L(j).right;L((function(t){return null===t?NaN:+t}));var U=N,F=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function B(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function z(){}var V=1/.7,H="\\s*([+-]?\\d+)\\s*",q="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Q=/^#([0-9a-f]{3,8})$/,W=new RegExp("^rgb\\("+[H,H,H]+"\\)$"),G=new RegExp("^rgb\\("+[$,$,$]+"\\)$"),Y=new RegExp("^rgba\\("+[H,H,H,q]+"\\)$"),K=new RegExp("^rgba\\("+[$,$,$,q]+"\\)$"),Z=new RegExp("^hsl\\("+[q,$,$]+"\\)$"),X=new RegExp("^hsla\\("+[q,$,$,q]+"\\)$"),J={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function tt(){return this.rgb().formatHex()}function et(){return this.rgb().formatRgb()}function nt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Q.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?it(e):3===n?new st(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=W.exec(t))?new st(e[1],e[2],e[3],1):(e=G.exec(t))?new st(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Y.exec(t))?rt(e[1],e[2],e[3],e[4]):(e=K.exec(t))?rt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Z.exec(t))?dt(e[1],e[2]/100,e[3]/100,1):(e=X.exec(t))?dt(e[1],e[2]/100,e[3]/100,e[4]):J.hasOwnProperty(t)?it(J[t]):"transparent"===t?new st(NaN,NaN,NaN,0):null}function it(t){return new st(t>>16&255,t>>8&255,255&t,1)}function rt(t,e,n,i){return i<=0&&(t=e=n=NaN),new st(t,e,n,i)}function ot(t){return t instanceof z||(t=nt(t)),t?new st((t=t.rgb()).r,t.g,t.b,t.opacity):new st}function at(t,e,n,i){return 1===arguments.length?ot(t):new st(t,e,n,null==i?1:i)}function st(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function ct(){return"#"+lt(this.r)+lt(this.g)+lt(this.b)}function ut(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function lt(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function dt(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ft(t,e,n,i)}function ht(t){if(t instanceof ft)return new ft(t.h,t.s,t.l,t.opacity);if(t instanceof z||(t=nt(t)),!t)return new ft;if(t instanceof ft)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),a=NaN,s=o-r,c=(o+r)/2;return s?(a=e===o?(n-i)/s+6*(n0&&c<1?0:a,new ft(a,s,c,t.opacity)}function ft(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function pt(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function bt(t,e,n,i,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*i+a*r)/6}F(z,nt,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:tt,formatHex:tt,formatHsl:function(){return ht(this).formatHsl()},formatRgb:et,toString:et}),F(st,at,B(z,{brighter:function(t){return t=null==t?V:Math.pow(V,t),new st(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new st(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ct,formatHex:ct,formatRgb:ut,toString:ut})),F(ft,(function(t,e,n,i){return 1===arguments.length?ht(t):new ft(t,e,n,null==i?1:i)}),B(z,{brighter:function(t){return t=null==t?V:Math.pow(V,t),new ft(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ft(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new st(pt(t>=240?t-240:t+120,r,i),pt(t,r,i),pt(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var gt=function(t){return function(){return t}};function mt(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):gt(isNaN(t)?e:t)}var vt=function t(e){var n=function(t){return 1==(t=+t)?mt:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):gt(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=at(t)).r,(e=at(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),a=mt(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function yt(t){return function(e){var n,i,r=e.length,o=new Array(r),a=new Array(r),s=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],o=t[i+1];return bt((n-i/e)*e,i>0?t[i-1]:2*r-o,r,o,io&&(r=e.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,c.push({i:a,x:wt(n,i)})),o=St.lastIndex;return o(e=a[c-1])&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),i=c>2?jt:Rt,r=o=null,d}function d(e){return null==e||isNaN(e=+e)?n:(r||(r=i(a.map(t),s,c)))(t(u(e)))}return d.invert=function(n){return u(e((o||(o=i(s,a.map(t),wt)))(n)))},d.domain=function(t){return arguments.length?(a=Array.from(t,At),l()):a.slice()},d.range=function(t){return arguments.length?(s=Array.from(t),l()):s.slice()},d.rangeRound=function(t){return s=Array.from(t),c=Pt,l()},d.clamp=function(t){return arguments.length?(u=!!t||Mt,l()):u!==Mt},d.interpolate=function(t){return arguments.length?(c=t,l()):c},d.unknown=function(t){return arguments.length?(n=t,d):n},function(n,i){return t=n,e=i,l()}}()(Mt,Mt)}function Ut(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Ft=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bt(t){if(!(e=Ft.exec(t)))throw new Error("invalid format: "+t);var e;return new zt({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function zt(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Vt(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}Bt.prototype=zt.prototype,zt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ht,qt,$t,Qt,Wt=function(t){return(t=Vt(Math.abs(t)))?t[1]:NaN},Gt=function(t,e){var n=Vt(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")},Yt={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Gt(100*t,e)},r:Gt,s:function(t,e){var n=Vt(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(Ht=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Vt(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Kt=function(t){return t},Zt=Array.prototype.map,Xt=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function Jt(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var i,r,o,a,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((i=e0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(r=Math.ceil(e-t+1));++s=I?r*=10:o>=M?r*=5:o>=D&&(r*=2),e0;){if((r=R(c,u,n))===i)return o[a]=c,o[s]=u,e(o);if(r>0)c=Math.floor(c/r)*r,u=Math.ceil(u/r)*r;else{if(!(r<0))break;c=Math.ceil(c*r)/r,u=Math.floor(u*r)/r}i=r}return t},t}function te(){var t=Nt();return t.copy=function(){return Lt(t,te())},Ut.apply(t,arguments),Jt(t)}qt=function(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?Kt:(e=Zt.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,o=[],a=0,s=e[0],c=0;r>0&&s>0&&(c+s+1>i&&(s=Math.max(1,i-c)),o.push(t.substring(r-=s,r+s)),!((c+=s+1)>i));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Kt:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Zt.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"\u2212":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function d(t){var e=(t=Bt(t)).fill,n=t.align,d=t.sign,h=t.symbol,f=t.zero,p=t.width,b=t.comma,g=t.precision,m=t.trim,v=t.type;"n"===v?(b=!0,v="g"):Yt[v]||(void 0===g&&(g=12),m=!0,v="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var y="$"===h?r:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===h?o:/[%p]/.test(v)?c:"",O=Yt[v],k=/[defgprs%]/.test(v);function w(t){var r,o,c,h=y,w=_;if("c"===v)w=O(t)+w,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:O(Math.abs(t),g),m&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),C&&0==+t&&"+"!==d&&(C=!1),h=(C?"("===d?d:u:"-"===d||"("===d?"":d)+h,w=("s"===v?Xt[8+Ht/3]:"")+w+(C&&"("===d?")":""),k)for(r=-1,o=t.length;++r(c=t.charCodeAt(r))||c>57){w=(46===c?a+t.slice(r+1):t.slice(r))+w,t=t.slice(0,r);break}}b&&!f&&(t=i(t,1/0));var T=h.length+t.length+w.length,S=T>1)+h+t+w+S.slice(T);break;default:t=S+h+t+w}return s(t)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),w.toString=function(){return t+""},w}return{format:d,formatPrefix:function(t,e){var n=d(((t=Bt(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Wt(e)/3))),r=Math.pow(10,-i),o=Xt[8+i/3];return function(t){return n(r*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),$t=qt.format,Qt=qt.formatPrefix;var ee,ne=n("kZht"),ie=((ee=function(){function t(){C(this,t),this.value=0,this.min=1,this.max=100,this.ARC_START_ANGLE=-Math.PI/2,this.ARC_END_ANGLE=Math.PI/2,this.ARC_INNER_RADIUS=.75,this.ARC_OUTER_RADIUS=1,this.ARC_CORNER_RADIUS=1,this.arc={innerRadius:this.ARC_INNER_RADIUS,outerRadius:this.ARC_OUTER_RADIUS,startAngle:this.ARC_START_ANGLE,endAngle:this.ARC_END_ANGLE,cornerRadius:this.ARC_CORNER_RADIUS},this.arcFn=function(){var t=k,e=T,n=u(0),i=null,r=S,o=E,a=x,s=null;function f(){var u,f,k=+t.apply(this,arguments),w=+e.apply(this,arguments),C=r.apply(this,arguments)-v,T=o.apply(this,arguments)-v,S=l(T-C),E=T>C;if(s||(s=u=c()),w1e-12)if(S>y-1e-12)s.moveTo(w*h(C),w*b(C)),s.arc(0,0,w,C,T,!E),k>1e-12&&(s.moveTo(k*h(T),k*b(T)),s.arc(0,0,k,T,C,E));else{var x,I,M=C,D=T,R=C,j=T,L=S,N=S,U=a.apply(this,arguments)/2,F=U>1e-12&&(i?+i.apply(this,arguments):g(k*k+w*w)),B=p(l(w-k)/2,+n.apply(this,arguments)),z=B,V=B;if(F>1e-12){var H=O(F/k*b(U)),q=O(F/w*b(U));(L-=2*H)>1e-12?(R+=H*=E?1:-1,j-=H):(L=0,R=j=(C+T)/2),(N-=2*q)>1e-12?(M+=q*=E?1:-1,D-=q):(N=0,M=D=(C+T)/2)}var $=w*h(M),Q=w*b(M),W=k*h(j),G=k*b(j);if(B>1e-12){var Y,K=w*h(D),Z=w*b(D),X=k*h(R),J=k*b(R);if(S1e-12?V>1e-12?(x=A(X,J,$,Q,w,V,E),I=A(K,Z,W,G,w,V,E),s.moveTo(x.cx+x.x01,x.cy+x.y01),V1e-12&&L>1e-12?z>1e-12?(x=A(W,G,K,Z,k,-z,E),I=A($,Q,X,J,k,-z,E),s.lineTo(x.cx+x.x01,x.cy+x.y01),z1&&void 0!==arguments[1]?arguments[1]:10;return[Math.cos(t-Math.PI/2)*e,Math.sin(t-Math.PI/2)*e]}}return w(t,[{key:"angleScale",get:function(){return te().domain([0,1]).range([-Math.PI/2,Math.PI/2]).clamp(!0)}},{key:"angle",get:function(){return this.angleScale(this.percent)}},{key:"percentScale",get:function(){return te().domain([this.min,this.max]).range([0,1])}},{key:"percent",get:function(){return this.percentScale(this.value)}},{key:"pointerAngleTransform",get:function(){return"rotate(".concat(this.angle*(180/Math.PI),") translate(-0.15, -1.25)")}},{key:"viewBox",get:function(){return[-1,-1,2,1].join(" ")}},{key:"backgroundArc",get:function(){return this.arcFn(this.arc)}}]),t}()).\u0275fac=function(t){return new(t||ee)},ee.\u0275cmp=ne.Ib({type:ee,selectors:[["gauge"]],inputs:{value:"value",min:"min",max:"max"},decls:10,vars:13,consts:[["id","testGradient"]],template:function(t,e){1&t&&(ne.ec(),ne.Ub(0,"svg"),ne.Ub(1,"defs"),ne.Ub(2,"linearGradient",0),ne.Pb(3,"stop"),ne.Pb(4,"stop"),ne.Pb(5,"stop"),ne.Tb(),ne.Tb(),ne.Pb(6,"path"),ne.Ub(7,"g"),ne.Pb(8,"path"),ne.Pb(9,"path"),ne.Tb(),ne.Tb()),2&t&&(ne.Db("viewBox",e.viewBox),ne.Cb(3),ne.Db("offset","0%")("stop-color","#6ec877"),ne.Cb(1),ne.Db("offset","50%")("stop-color","#d1a91c"),ne.Cb(1),ne.Db("offset","100%")("stop-color","#e2444d"),ne.Cb(1),ne.Db("d",e.backgroundArc)("fill","url(#testGradient)"),ne.Cb(1),ne.Db("transform",e.pointerAngleTransform)("fill","var(--text-colour)"),ne.Cb(1),ne.Db("d","M0.143123 0.3125L0.180213 1.2491C0.180213 1.2491 0.216505 1.2491 0.111797 1.2491C0.114232 1.17814 0.143123 0.3125 0.143123 0.3125Z"),ne.Cb(1),ne.Db("d","M0.234222 1.24911C0.234222 1.29574 0.196082 1.33354 0.149033 1.33354C0.101984 1.33354 0.0638428 1.29574 0.0638428 1.24911C0.0638428 1.20247 0.101984 1.16467 0.149033 1.16467C0.196082 1.16467 0.234222 1.20247 0.234222 1.24911Z"))},styles:["[_nghost-%COMP%], svg[_ngcontent-%COMP%]{width:100%}svg[_ngcontent-%COMP%]{overflow:visible}"],changeDetection:0}),ee)},"I1e+":function(t,e,n){"use strict";n.r(e),n.d(e,"RecertifyAlgoComponent",(function(){return v}));var i=n("3kIJ"),r=n("mcff"),o=n("0tVE"),a=n("kZht"),s=n("zqNl"),c=n("rfPA"),u=n("bBQR"),l=n("anSm"),d=n("1etq"),h=n("An66"),f=n("aDqW"),p=n("UDV5"),b=n("hCLc"),g=n("1o0v");function m(t,e){if(1&t&&(a.Ub(0,"p",13),a.Qc(1),a.Tb()),2&t){var n=a.fc();a.Cb(1),a.Rc(n.inputs.algo.label)}}var v=function(){var t=function(){function t(e,n,i){C(this,t),this.inputs=e,this.store=n,this.formBuilder=i,this.form=this.buildForm}return w(t,[{key:"submitForm",value:function(){var t=this;this.store.dispatch(Object(o.L)({id:this.inputs.algo.algoId})),this.form.reset(),Object.keys(this.form.controls).forEach((function(e){return t.form.get(e).setErrors(null)}))}},{key:"buildForm",get:function(){return this.formBuilder.group({conformanceTested:[!1,[i.x.requiredTrue]],pretradeRisk:[!1,[i.x.requiredTrue]],shutOff:[!1,[i.x.requiredTrue]],materialChange:[!1,[i.x.requiredTrue]]})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(r.a),a.Ob(s.b),a.Ob(i.d))},t.\u0275cmp=a.Ib({type:t,selectors:[["recertify-algo"]],decls:25,vars:19,consts:[["heading","HEADING.RECERTIFY_ALGO"],["body","",3,"formGroup","ngSubmit"],[1,"algo"],["subheading",""],["subheading","","ghost","","body","",4,"ngIf"],[1,"terms"],["body","","translate",""],[1,"checkboxes"],["formControlName","conformanceTested","required","",1,"no-border"],["formControlName","pretradeRisk","required","",1,"no-border"],["formControlName","shutOff","required","",1,"no-border"],["formControlName","materialChange","required","",1,"no-border"],["mat-raised-button","","body","",3,"disabled"],["subheading","","ghost","","body",""]],template:function(t,e){1&t&&(a.Ub(0,"pro-dialog",0),a.Ub(1,"form",1),a.bc("ngSubmit",(function(){return e.submitForm()})),a.Ub(2,"div",2),a.Ub(3,"p",3),a.Qc(4),a.Tb(),a.Oc(5,m,2,1,"p",4),a.Tb(),a.Ub(6,"section",5),a.Ub(7,"p",6),a.Qc(8,"ALGOIDS.SELF_CERTIFICATION"),a.Tb(),a.Ub(9,"section",7),a.Ub(10,"mat-checkbox",8),a.Qc(11),a.gc(12,"translate"),a.Tb(),a.Ub(13,"mat-checkbox",9),a.Qc(14),a.gc(15,"translate"),a.Tb(),a.Ub(16,"mat-checkbox",10),a.Qc(17),a.gc(18,"translate"),a.Tb(),a.Ub(19,"mat-checkbox",11),a.Qc(20),a.gc(21,"translate"),a.Tb(),a.Tb(),a.Tb(),a.Ub(22,"button",12),a.Qc(23),a.gc(24,"translate"),a.Tb(),a.Tb(),a.Tb()),2&t&&(a.Cb(1),a.mc("formGroup",e.form),a.Cb(3),a.Rc(e.inputs.algo.algoId),a.Cb(1),a.mc("ngIf",e.inputs.algo.label),a.Cb(6),a.Sc(" ",a.hc(12,9,"ALGOIDS.CONFORMANCE_TESTED")," "),a.Cb(3),a.Sc(" ",a.hc(15,11,"ALGOIDS.PRETRADE_RISK")," "),a.Cb(3),a.Sc(" ",a.hc(18,13,"ALGOIDS.SHUT_OFF")," "),a.Cb(3),a.Sc(" ",a.hc(21,15,"ALGOIDS.MATERIAL_CHANGE")," "),a.Cb(2),a.mc("disabled",e.form.invalid),a.Cb(1),a.Sc(" ",a.hc(24,17,"BUTTON.RECERTIFY_ALGO")," "))},directives:[c.a,u.a,i.z,i.p,l.a,i.h,d.a,h.n,f.a,p.a,p.c,i.o,i.g,i.v,b.b,g.a],pipes:[f.d],styles:[".terms[_ngcontent-%COMP%]{margin:var(--spacing) 0}.terms[_ngcontent-%COMP%] .checkboxes[_ngcontent-%COMP%]{margin:var(--spacing) 0 var(--spacing) var(--spacing)}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:500px}@media (max-width:1024px){form[_ngcontent-%COMP%]{width:100%}}h2[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.algo[_ngcontent-%COMP%]{background:var(--border-colour);padding:var(--spacing);border-radius:var(--bdrs);align-self:center;margin-bottom:var(--spacing-l)}"],changeDetection:0}),t}()},I2Ru:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n("YtkY"),r=n("i67J"),o=n("rxqU"),a=n("kZht"),s=n("1VvW"),c=n("zqNl"),u=function(){var t=function(){function t(e,n){C(this,t),this.router=e,this.store=n,this.userDetails$=this.store.pipe(Object(r.n)(o.d))}return w(t,[{key:"canActivate",value:function(t,e){var n=this;return this.userDetails$.pipe(Object(i.a)((function(e){return e.platformName===t.data.platform||(n.router.navigate(["/futures"]),!1)})))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Yb(s.d),a.Yb(c.b))},t.\u0275prov=a.Kb({token:t,factory:t.\u0275fac}),t}()},IJgj:function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.d(e,"a",(function(){return i}))},IOEv:function(t,e,n){"use strict";n.d(e,"a",(function(){return Y})),n.d(e,"b",(function(){return K}));var i=n("5GZx"),r=n("An66"),o=n("kZht"),s=n("pTnX"),u=n("EmXI"),d=n("VbQ3"),h=n("jL3B"),f=n("vE5V"),p=n("5XID"),g=n("sBeF"),m=n("Hq54"),v=n("3kIJ"),y=n("ZTXN"),_=n("i9xl"),O=n("g6G6"),k=n("jIqt"),T=n("TLy2"),S=n("J+dc"),E=n("xVbo"),x=n("YtkY"),P=n("Ohay"),A=n("kuMc"),I=n("+6xv"),M=["trigger"],D=["panel"];function R(t,e){if(1&t&&(o.Ub(0,"span",8),o.Qc(1),o.Tb()),2&t){var n=o.fc();o.Cb(1),o.Rc(n.placeholder||"\xa0")}}function j(t,e){if(1&t&&(o.Ub(0,"span"),o.Qc(1),o.Tb()),2&t){var n=o.fc(2);o.Cb(1),o.Rc(n.triggerValue||"\xa0")}}function L(t,e){1&t&&o.kc(0,0,["*ngSwitchCase","true"])}function N(t,e){if(1&t&&(o.Ub(0,"span",9),o.Oc(1,j,2,1,"span",10),o.Oc(2,L,1,0,"ng-content",11),o.Tb()),2&t){var n=o.fc();o.mc("ngSwitch",!!n.customTrigger),o.Cb(2),o.mc("ngSwitchCase",!0)}}function U(t,e){if(1&t){var n=o.Vb();o.Ub(0,"div",12),o.Ub(1,"div",13,14),o.bc("@transformPanel.done",(function(t){return o.Ec(n),o.fc()._panelDoneAnimatingStream.next(t.toState)}))("keydown",(function(t){return o.Ec(n),o.fc()._handleKeydown(t)})),o.kc(3,1),o.Tb(),o.Tb()}if(2&t){var i=o.fc();o.mc("@transformPanelWrap",void 0),o.Cb(1),o.Fb("mat-select-panel ",i._getPanelTheme(),""),o.Lc("transform-origin",i._transformOrigin)("font-size",i._triggerFontSize,"px"),o.mc("ngClass",i.panelClass)("@transformPanel",i.multiple?"showing-multiple":"showing"),o.Db("id",i.id+"-panel")("aria-multiselectable",i.multiple)("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby())}}var F=[[["mat-select-trigger"]],"*"],B=["mat-select-trigger","*"],z={transformPanelWrap:Object(I.n)("transformPanelWrap",[Object(I.m)("* => void",Object(I.i)("@transformPanel",[Object(I.f)()],{optional:!0}))]),transformPanel:Object(I.n)("transformPanel",[Object(I.k)("void",Object(I.l)({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),Object(I.k)("showing",Object(I.l)({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),Object(I.k)("showing-multiple",Object(I.l)({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),Object(I.m)("void => *",Object(I.e)("120ms cubic-bezier(0, 0, 0.2, 1)")),Object(I.m)("* => void",Object(I.e)("100ms 25ms linear",Object(I.l)({opacity:0})))])},V=0,H=new o.s("mat-select-scroll-strategy"),q=new o.s("MAT_SELECT_CONFIG"),$={provide:H,deps:[i.c],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},Q=function t(e,n){C(this,t),this.source=e,this.value=n},W=Object(s.x)(Object(s.B)(Object(s.y)(Object(s.z)((function t(e,n,i,r,o){C(this,t),this._elementRef=e,this._defaultErrorStateMatcher=n,this._parentForm=i,this._parentFormGroup=r,this.ngControl=o}))))),G=new o.s("MatSelectTrigger"),Y=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,a,s,c,u,d,h,f,p,g,m,v){var w;return C(this,n),(w=e.call(this,s,a,u,d,f))._viewportRuler=t,w._changeDetectorRef=i,w._ngZone=r,w._dir=c,w._parentFormField=h,w.ngControl=f,w._liveAnnouncer=m,w._panelOpen=!1,w._required=!1,w._scrollTop=0,w._multiple=!1,w._compareWith=function(t,e){return t===e},w._uid="mat-select-"+V++,w._triggerAriaLabelledBy=null,w._destroy=new y.b,w._triggerFontSize=0,w._onChange=function(){},w._onTouched=function(){},w._valueId="mat-select-value-"+V++,w._transformOrigin="top",w._panelDoneAnimatingStream=new y.b,w._offsetY=0,w._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],w._disableOptionCentering=!1,w._focused=!1,w.controlType="mat-select",w.ariaLabel="",w.optionSelectionChanges=Object(_.a)((function(){var t=w.options;return t?t.changes.pipe(Object(k.a)(t),Object(T.a)((function(){return Object(O.a).apply(void 0,b(t.map((function(t){return t.onSelectionChange}))))}))):w._ngZone.onStable.pipe(Object(S.a)(1),Object(T.a)((function(){return w.optionSelectionChanges})))})),w.openedChange=new o.o,w._openedStream=w.openedChange.pipe(Object(E.a)((function(t){return t})),Object(x.a)((function(){}))),w._closedStream=w.openedChange.pipe(Object(E.a)((function(t){return!t})),Object(x.a)((function(){}))),w.selectionChange=new o.o,w.valueChange=new o.o,w.ngControl&&(w.ngControl.valueAccessor=l(w)),w._scrollStrategyFactory=g,w._scrollStrategy=w._scrollStrategyFactory(),w.tabIndex=parseInt(p)||0,w.id=w.id,v&&(null!=v.disableOptionCentering&&(w.disableOptionCentering=v.disableOptionCentering),null!=v.typeaheadDebounceInterval&&(w.typeaheadDebounceInterval=v.typeaheadDebounceInterval)),w}return w(n,[{key:"ngOnInit",value:function(){var t=this;this._selectionModel=new g.c(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Object(P.a)(),Object(A.a)(this._destroy)).subscribe((function(){t.panelOpen?(t._scrollTop=0,t.openedChange.emit(!0)):(t.openedChange.emit(!1),t.overlayDir.offsetX=0,t._changeDetectorRef.markForCheck())})),this._viewportRuler.change().pipe(Object(A.a)(this._destroy)).subscribe((function(){t._panelOpen&&(t._triggerRect=t.trigger.nativeElement.getBoundingClientRect(),t._changeDetectorRef.markForCheck())}))}},{key:"ngAfterContentInit",value:function(){var t=this;this._initKeyManager(),this._selectionModel.changed.pipe(Object(A.a)(this._destroy)).subscribe((function(t){t.added.forEach((function(t){return t.select()})),t.removed.forEach((function(t){return t.deselect()}))})),this.options.changes.pipe(Object(k.a)(null),Object(A.a)(this._destroy)).subscribe((function(){t._resetOptions(),t._initializeSelection()}))}},{key:"ngDoCheck",value:function(){var t=this._getTriggerAriaLabelledby();if(t!==this._triggerAriaLabelledBy){var e=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?e.setAttribute("aria-labelledby",t):e.removeAttribute("aria-labelledby")}this.ngControl&&this.updateErrorState()}},{key:"ngOnChanges",value:function(t){t.disabled&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}},{key:"ngOnDestroy",value:function(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}},{key:"toggle",value:function(){this.panelOpen?this.close():this.open()}},{key:"open",value:function(){var t=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._calculateOverlayPosition(),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.pipe(Object(S.a)(1)).subscribe((function(){t._triggerFontSize&&t.overlayDir.overlayRef&&t.overlayDir.overlayRef.overlayElement&&(t.overlayDir.overlayRef.overlayElement.style.fontSize=t._triggerFontSize+"px")})))}},{key:"close",value:function(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}},{key:"writeValue",value:function(t){this.value=t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_isRtl",value:function(){return!!this._dir&&"rtl"===this._dir.value}},{key:"_handleKeydown",value:function(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}},{key:"_handleClosedKeydown",value:function(t){var e=t.keyCode,n=e===m.c||e===m.o||e===m.h||e===m.l,i=e===m.e||e===m.m,r=this._keyManager;if(!r.isTyping()&&i&&!Object(m.r)(t)||(this.multiple||t.altKey)&&n)t.preventDefault(),this.open();else if(!this.multiple){var o=this.selected;r.onKeydown(t);var a=this.selected;a&&o!==a&&this._liveAnnouncer.announce(a.viewValue,1e4)}}},{key:"_handleOpenKeydown",value:function(t){var e=this._keyManager,n=t.keyCode,i=n===m.c||n===m.o,r=e.isTyping();if(i&&t.altKey)t.preventDefault(),this.close();else if(r||n!==m.e&&n!==m.m||!e.activeItem||Object(m.r)(t))if(!r&&this._multiple&&n===m.a&&t.ctrlKey){t.preventDefault();var o=this.options.some((function(t){return!t.disabled&&!t.selected}));this.options.forEach((function(t){t.disabled||(o?t.select():t.deselect())}))}else{var a=e.activeItemIndex;e.onKeydown(t),this._multiple&&i&&t.shiftKey&&e.activeItem&&e.activeItemIndex!==a&&e.activeItem._selectViaInteraction()}else t.preventDefault(),e.activeItem._selectViaInteraction()}},{key:"_onFocus",value:function(){this.disabled||(this._focused=!0,this.stateChanges.next())}},{key:"_onBlur",value:function(){this._focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}},{key:"_onAttached",value:function(){var t=this;this.overlayDir.positionChange.pipe(Object(S.a)(1)).subscribe((function(){t._changeDetectorRef.detectChanges(),t._calculateOverlayOffsetX(),t.panel.nativeElement.scrollTop=t._scrollTop}))}},{key:"_getPanelTheme",value:function(){return this._parentFormField?"mat-"+this._parentFormField.color:""}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then((function(){t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value),t.stateChanges.next()}))}},{key:"_setSelectionByValue",value:function(t){var e=this;if(this.multiple&&t)Array.isArray(t),this._selectionModel.clear(),t.forEach((function(t){return e._selectValue(t)})),this._sortValues();else{this._selectionModel.clear();var n=this._selectValue(t);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}},{key:"_selectValue",value:function(t){var e=this,n=this.options.find((function(n){try{return null!=n.value&&e._compareWith(n.value,t)}catch(i){return!1}}));return n&&this._selectionModel.select(n),n}},{key:"_initKeyManager",value:function(){var t=this;this._keyManager=new h.b(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Object(A.a)(this._destroy)).subscribe((function(){t.panelOpen&&(!t.multiple&&t._keyManager.activeItem&&t._keyManager.activeItem._selectViaInteraction(),t.focus(),t.close())})),this._keyManager.change.pipe(Object(A.a)(this._destroy)).subscribe((function(){t._panelOpen&&t.panel?t._scrollActiveOptionIntoView():t._panelOpen||t.multiple||!t._keyManager.activeItem||t._keyManager.activeItem._selectViaInteraction()}))}},{key:"_resetOptions",value:function(){var t=this,e=Object(O.a)(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Object(A.a)(e)).subscribe((function(e){t._onSelect(e.source,e.isUserInput),e.isUserInput&&!t.multiple&&t._panelOpen&&(t.close(),t.focus())})),Object(O.a).apply(void 0,b(this.options.map((function(t){return t._stateChanges})))).pipe(Object(A.a)(e)).subscribe((function(){t._changeDetectorRef.markForCheck(),t.stateChanges.next()}))}},{key:"_onSelect",value:function(t,e){var n=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(n!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),e&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),e&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),n!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;if(this.multiple){var e=this.options.toArray();this._selectionModel.sort((function(n,i){return t.sortComparator?t.sortComparator(n,i,e):e.indexOf(n)-e.indexOf(i)})),this.stateChanges.next()}}},{key:"_propagateChanges",value:function(t){var e;e=this.multiple?this.selected.map((function(t){return t.value})):this.selected?this.selected.value:t,this._value=e,this.valueChange.emit(e),this._onChange(e),this.selectionChange.emit(new Q(this,e)),this._changeDetectorRef.markForCheck()}},{key:"_highlightCorrectOption",value:function(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}},{key:"_scrollActiveOptionIntoView",value:function(){var t=this._keyManager.activeItemIndex||0,e=Object(s.u)(t,this.options,this.optionGroups),n=this._getItemHeight();this.panel.nativeElement.scrollTop=Object(s.v)((t+e)*n,n,this.panel.nativeElement.scrollTop,256)}},{key:"focus",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_getOptionIndex",value:function(t){return this.options.reduce((function(e,n,i){return void 0!==e?e:t===n?i:void 0}),void 0)}},{key:"_calculateOverlayPosition",value:function(){var t=this._getItemHeight(),e=this._getItemCount(),n=Math.min(e*t,256),i=e*t-n,r=this.empty?0:this._getOptionIndex(this._selectionModel.selected[0]);r+=Object(s.u)(r,this.options,this.optionGroups);var o=n/2;this._scrollTop=this._calculateOverlayScroll(r,o,i),this._offsetY=this._calculateOverlayOffsetY(r,o,i),this._checkOverlayWithinViewport(i)}},{key:"_calculateOverlayScroll",value:function(t,e,n){var i=this._getItemHeight();return Math.min(Math.max(0,i*t-e+i/2),n)}},{key:"_getPanelAriaLabelledby",value:function(){if(this.ariaLabel)return null;var t=this._getLabelId();return this.ariaLabelledby?t+" "+this.ariaLabelledby:t}},{key:"_getAriaActiveDescendant",value:function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}},{key:"_getLabelId",value:function(){var t;return(null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId())||""}},{key:"_calculateOverlayOffsetX",value:function(){var t,e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this._isRtl(),r=this.multiple?56:32;if(this.multiple)t=40;else{var o=this._selectionModel.selected[0]||this.options.first;t=o&&o.group?32:16}i||(t*=-1);var a=0-(e.left+t-(i?r:0)),s=e.right+t-n.width+(i?0:r);a>0?t+=a+8:s>0&&(t-=s+8),this.overlayDir.offsetX=Math.round(t),this.overlayDir.overlayRef.updatePosition()}},{key:"_calculateOverlayOffsetY",value:function(t,e,n){var i,r=this._getItemHeight(),o=(r-this._triggerRect.height)/2,a=Math.floor(256/r);return this._disableOptionCentering?0:(i=0===this._scrollTop?t*r:this._scrollTop===n?(t-(this._getItemCount()-a))*r+(r-(this._getItemCount()*r-256)%r):e-r/2,Math.round(-1*i-o))}},{key:"_checkOverlayWithinViewport",value:function(t){var e=this._getItemHeight(),n=this._viewportRuler.getViewportSize(),i=this._triggerRect.top-8,r=n.height-this._triggerRect.bottom-8,o=Math.abs(this._offsetY),a=Math.min(this._getItemCount()*e,256)-o-this._triggerRect.height;a>r?this._adjustPanelUp(a,r):o>i?this._adjustPanelDown(o,i,t):this._transformOrigin=this._getOriginBasedOnOption()}},{key:"_adjustPanelUp",value:function(t,e){var n=Math.round(t-e);this._scrollTop-=n,this._offsetY-=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}},{key:"_adjustPanelDown",value:function(t,e,n){var i=Math.round(t-e);if(this._scrollTop+=i,this._offsetY+=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=n)return this._scrollTop=n,this._offsetY=0,void(this._transformOrigin="50% top 0px")}},{key:"_getOriginBasedOnOption",value:function(){var t=this._getItemHeight(),e=(t-this._triggerRect.height)/2;return"50% ".concat(Math.abs(this._offsetY)-e+t/2,"px 0px")}},{key:"_getItemCount",value:function(){return this.options.length+this.optionGroups.length}},{key:"_getItemHeight",value:function(){return 3*this._triggerFontSize}},{key:"_getTriggerAriaLabelledby",value:function(){if(this.ariaLabel)return null;var t=this._getLabelId()+" "+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"onContainerClick",value:function(){this.focus(),this.open()}},{key:"focused",get:function(){return this._focused||this._panelOpen}},{key:"placeholder",get:function(){return this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"required",get:function(){return this._required},set:function(t){this._required=Object(p.c)(t),this.stateChanges.next()}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=Object(p.c)(t)}},{key:"disableOptionCentering",get:function(){return this._disableOptionCentering},set:function(t){this._disableOptionCentering=Object(p.c)(t)}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){t!==this._value&&(this.options&&this._setSelectionByValue(t),this._value=t)}},{key:"typeaheadDebounceInterval",get:function(){return this._typeaheadDebounceInterval},set:function(t){this._typeaheadDebounceInterval=Object(p.f)(t)}},{key:"id",get:function(){return this._id},set:function(t){this._id=t||this._uid,this.stateChanges.next()}},{key:"panelOpen",get:function(){return this._panelOpen}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"triggerValue",get:function(){if(this.empty)return"";if(this._multiple){var t=this._selectionModel.selected.map((function(t){return t.viewValue}));return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}},{key:"empty",get:function(){return!this._selectionModel||this._selectionModel.isEmpty()}},{key:"shouldLabelFloat",get:function(){return this._panelOpen||!this.empty}}]),n}(W);return t.\u0275fac=function(e){return new(e||t)(o.Ob(d.h),o.Ob(o.h),o.Ob(o.B),o.Ob(s.d),o.Ob(o.l),o.Ob(f.b,8),o.Ob(v.q,8),o.Ob(v.h,8),o.Ob(u.a,8),o.Ob(v.n,10),o.Zb("tabindex"),o.Ob(H),o.Ob(h.k),o.Ob(q,8))},t.\u0275cmp=o.Ib({type:t,selectors:[["mat-select"]],contentQueries:function(t,e,n){var i;1&t&&(o.Hb(n,G,!0),o.Hb(n,s.n,!0),o.Hb(n,s.g,!0)),2&t&&(o.zc(i=o.cc())&&(e.customTrigger=i.first),o.zc(i=o.cc())&&(e.options=i),o.zc(i=o.cc())&&(e.optionGroups=i))},viewQuery:function(t,e){var n;1&t&&(o.Wc(M,!0),o.Wc(D,!0),o.Wc(i.a,!0)),2&t&&(o.zc(n=o.cc())&&(e.trigger=n.first),o.zc(n=o.cc())&&(e.panel=n.first),o.zc(n=o.cc())&&(e.overlayDir=n.first))},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:20,hostBindings:function(t,e){1&t&&o.bc("keydown",(function(t){return e._handleKeydown(t)}))("focus",(function(){return e._onFocus()}))("blur",(function(){return e._onBlur()})),2&t&&(o.Db("id",e.id)("tabindex",e.tabIndex)("aria-controls",e.panelOpen?e.id+"-panel":null)("aria-expanded",e.panelOpen)("aria-label",e.ariaLabel||null)("aria-required",e.required.toString())("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-describedby",e._ariaDescribedby||null)("aria-activedescendant",e._getAriaActiveDescendant()),o.Gb("mat-select-disabled",e.disabled)("mat-select-invalid",e.errorState)("mat-select-required",e.required)("mat-select-empty",e.empty)("mat-select-multiple",e.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],id:"id",disableOptionCentering:"disableOptionCentering",typeaheadDebounceInterval:"typeaheadDebounceInterval",placeholder:"placeholder",required:"required",multiple:"multiple",compareWith:"compareWith",value:"value",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[o.Bb([{provide:u.d,useExisting:t},{provide:s.h,useExisting:t}]),o.zb,o.Ab],ngContentSelectors:B,decls:9,vars:10,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder"],[1,"mat-select-value-text",3,"ngSwitch"],[4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,e){if(1&t&&(o.lc(F),o.Ub(0,"div",0,1),o.bc("click",(function(){return e.toggle()})),o.Ub(3,"div",2),o.Oc(4,R,2,1,"span",3),o.Oc(5,N,3,2,"span",4),o.Tb(),o.Ub(6,"div",5),o.Pb(7,"div",6),o.Tb(),o.Tb(),o.Oc(8,U,4,14,"ng-template",7),o.bc("backdropClick",(function(){return e.close()}))("attach",(function(){return e._onAttached()}))("detach",(function(){return e.close()}))),2&t){var n=o.Ac(1);o.Cb(3),o.mc("ngSwitch",e.empty),o.Db("id",e._valueId),o.Cb(1),o.mc("ngSwitchCase",!0),o.Cb(1),o.mc("ngSwitchCase",!1),o.Cb(3),o.mc("cdkConnectedOverlayScrollStrategy",e._scrollStrategy)("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",e.panelOpen)("cdkConnectedOverlayPositions",e._positions)("cdkConnectedOverlayMinWidth",null==e._triggerRect?null:e._triggerRect.width)("cdkConnectedOverlayOffsetY",e._offsetY)}},directives:[i.b,r.p,r.q,i.a,r.r,r.l],styles:[".mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}\n"],encapsulation:2,data:{animation:[z.transformPanelWrap,z.transformPanel]},changeDetection:0}),t}(),K=function(){var t=function t(){C(this,t)};return t.\u0275mod=o.Mb({type:t}),t.\u0275inj=o.Lb({factory:function(e){return new(e||t)},providers:[$],imports:[[r.c,i.f,s.o,s.j],d.c,u.e,s.o,s.j]}),t}()},IdLP:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i,r=n("5uGe"),o=n("25CY"),a=n("rWo0"),s=n("qEfY"),c=n("Ti3e"),u=n("HgnN"),l=((i=function(){function t(e){C(this,t),this._isScalar=!1,e&&(this._subscribe=e)}return w(t,[{key:"lift",value:function(e){var n=new t;return n.source=this,n.operator=e,n}},{key:"subscribe",value:function(t,e,n){var i=this.operator,s=function(t,e,n){if(t){if(t instanceof r.a)return t;if(t[o.a])return t[o.a]()}return t||e||n?new r.a(t,e,n):new r.a(a.a)}(t,e,n);if(s.add(i?i.call(s,this.source):this.source||u.a.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),u.a.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}},{key:"_trySubscribe",value:function(t){try{return this._subscribe(t)}catch(e){u.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.a?i:null}return!0}(t)?t.error(e):console.warn(e)}}},{key:"forEach",value:function(t,e){var n=this;return new(e=d(e))((function(e,i){var r;r=n.subscribe((function(e){try{t(e)}catch(n){i(n),r&&r.unsubscribe()}}),i,e)}))}},{key:"_subscribe",value:function(t){var e=this.source;return e&&e.subscribe(t)}},{key:s.a,value:function(){return this}},{key:"pipe",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n>\n"),t.toString()},t.prototype.setMode=function(t){this.mode=t},t.prototype.setECLevel=function(t){this.ecLevel=t},t.prototype.setVersion=function(t){this.version=t},t.prototype.setMaskPattern=function(t){this.maskPattern=t},t.prototype.setMatrix=function(t){this.matrix=t},t.isValidMaskPattern=function(e){return e>=0&&e=t.contracts)if(e===n.length-1)a+=o*t.maintenanceMargin;else{var i=n[e+1].contracts-t.contracts;o=0:this.liquidationPrice>e}},{key:"displayLiquidation",get:function(){var t=this.form.get("entryPrice").value,e=this.form.get("quantity").value;return 0!==this.form.get("margin").value&&0!==t&&0!==e}},{key:"pairBase",get:function(){var t=this.form.get("pair").value;return Object(r.k)(t)}},{key:"pairQuote",get:function(){var t=this.form.get("pair").value;return Object(r.l)(t)}},{key:"unitBase",get:function(){return this.isInverse?this.pairBase:this.pairQuote}}]),t}()).\u0275fac=function(t){return new(t||k)(c.Ob(i.d))},k.\u0275cmp=c.Ib({type:k,selectors:[["liquidation-calculator"]],inputs:{classification:"classification",mid:"mid",markets:"markets",selectedMarket:"selectedMarket",wallets:"wallets"},features:[c.Ab],decls:63,vars:49,consts:[[1,"disclaimer","global__text","global__text-body"],[1,"form"],["body","",3,"formGroup"],["color","accent","appearance","fill"],["matNativeControl","","formControlName","pair"],[3,"value",4,"ngFor","ngForOf"],["matNativeControl","","formControlName","direction"],["value","long","translate",""],["value","short","translate",""],["type","number","formControlName","entryPrice","matInput","","min","0"],["type","number","formControlName","quantity","matInput","","min","0"],["type","number","formControlName","margin","matInput","","min","0"],["body","",1,"form-results"],[1,"form-result"],["mono",""],["class","form-result",4,"ngIf"],[3,"value"],["mono","",1,"global__text--warn"],[1,"global__text--accent"]],template:function(t,e){1&t&&(c.Ub(0,"p",0),c.Qc(1),c.gc(2,"translate"),c.Tb(),c.Ub(3,"p",0),c.Qc(4," These calculators apply to Single-collateral contracts only.\n"),c.Tb(),c.Ub(5,"section",1),c.Ub(6,"form",2),c.Ub(7,"mat-form-field",3),c.Ub(8,"mat-label"),c.Qc(9),c.gc(10,"translate"),c.Tb(),c.Ub(11,"mat-select",4),c.Oc(12,y,3,4,"mat-option",5),c.Tb(),c.Tb(),c.Ub(13,"mat-form-field",3),c.Ub(14,"mat-label"),c.Qc(15),c.gc(16,"translate"),c.Tb(),c.Ub(17,"mat-select",6),c.Ub(18,"mat-option",7),c.Qc(19,"BUTTON.LONG"),c.Tb(),c.Ub(20,"mat-option",8),c.Qc(21,"BUTTON.SHORT"),c.Tb(),c.Tb(),c.Tb(),c.Ub(22,"mat-form-field",3),c.Ub(23,"mat-label"),c.Qc(24),c.gc(25,"translate"),c.Tb(),c.Pb(26,"input",9),c.Tb(),c.Ub(27,"mat-form-field",3),c.Ub(28,"mat-label"),c.Qc(29),c.gc(30,"translate"),c.Tb(),c.Pb(31,"input",10),c.Tb(),c.Ub(32,"mat-form-field",3),c.Ub(33,"mat-label"),c.Qc(34),c.gc(35,"translate"),c.Tb(),c.Pb(36,"input",11),c.Tb(),c.Tb(),c.Ub(37,"section",12),c.Ub(38,"section",13),c.Ub(39,"p"),c.Qc(40),c.gc(41,"translate"),c.Tb(),c.Ub(42,"strong",14),c.Qc(43),c.gc(44,"cryptoPrecise"),c.gc(45,"cryptoAbbreviation"),c.Tb(),c.Tb(),c.Ub(46,"section",13),c.Ub(47,"p"),c.Qc(48),c.gc(49,"translate"),c.Tb(),c.Ub(50,"strong",14),c.Qc(51),c.gc(52,"percent"),c.Tb(),c.Tb(),c.Ub(53,"section",13),c.Ub(54,"p"),c.Qc(55),c.gc(56,"translate"),c.Tb(),c.Ub(57,"strong",14),c.Qc(58),c.gc(59,"cryptoPrecise"),c.gc(60,"cryptoAbbreviation"),c.Tb(),c.Tb(),c.Oc(61,_,8,10,"section",15),c.Oc(62,O,4,3,"section",15),c.Tb(),c.Tb()),2&t&&(c.Cb(1),c.Sc(" ",c.hc(2,18,"DASHBOARD.LIQIDATION_CALCULATOR_DISCLAIMER"),"\n"),c.Cb(5),c.mc("formGroup",e.form),c.Cb(3),c.Rc(c.hc(10,20,"FORM.CONTRACT_TYPE")),c.Cb(3),c.mc("ngForOf",e.uniquePairs),c.Cb(3),c.Rc(c.hc(16,22,"COLUMN.DIRECTION")),c.Cb(9),c.Sc("",c.hc(25,24,"FORM.ENTRY_PRICE"),":"),c.Cb(5),c.Sc("",c.hc(30,26,"FORM.QUANTITY"),":"),c.Cb(5),c.Sc("",c.hc(35,28,"LABEL.MARGIN_HELD"),":"),c.Cb(6),c.Sc("",c.hc(41,30,"LABEL.CONTRACT_NOTIONAL_VALUE"),":"),c.Cb(3),c.Tc("",c.ic(44,32,e.notionalValue,e.unitBase)," ",c.hc(45,35,e.unitBase),""),c.Cb(5),c.Sc("",c.hc(49,37,"LABEL.MARGIN_PERC_OF_POS"),":"),c.Cb(3),c.Rc(c.ic(52,39,e.marginPercentage,"1.2-2")),c.Cb(4),c.Sc("",c.hc(56,42,"LABEL.MAINTENANCE_MARGIN_REQUIREMENT"),":"),c.Cb(3),c.Tc("",c.ic(59,44,e.marginRequirement,e.unitBase)," ",c.hc(60,47,e.unitBase),""),c.Cb(3),c.mc("ngIf",e.liquidationPossible&&e.displayLiquidation),c.Cb(1),c.mc("ngIf",!e.liquidationPossible))},directives:[i.z,i.p,u.a,i.h,l.c,l.f,d.a,i.o,i.g,h.m,f.n,p.a,i.s,i.c,b.b,g.a,h.n],pipes:[p.d,m.b,v.a,h.u,m.c],styles:["[_nghost-%COMP%]{display:block;padding:var(--spacing)}.disclaimer[_ngcontent-%COMP%]{border-bottom:2px solid var(--border-colour);padding-bottom:var(--spacing);margin-bottom:var(--spacing)}.form[_ngcontent-%COMP%]{display:flex}@media (max-width:599px){.form[_ngcontent-%COMP%]{flex-direction:column}}.form-results[_ngcontent-%COMP%], .form[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{flex:0.3;margin-right:var(--spacing)}.form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.form-results[_ngcontent-%COMP%]{flex:0.7}.form-result[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between}.form-result[_ngcontent-%COMP%]:not(:last-of-type){margin-bottom:6px}.form-result[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{white-space:nowrap}"],changeDetection:0}),k)},"J+dc":function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("5uGe"),r=n("PNff"),o=n("6Oco");function s(t){return function(e){return 0===t?Object(o.b)():e.lift(new u(t))}}var u=function(){function t(e){if(C(this,t),this.total=e,this.total<0)throw new r.a}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new l(t,this.total))}}]),t}(),l=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t)).total=i,r.count=0,r}return w(n,[{key:"_next",value:function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}]),n}(i.a)},"J/3c":function(t,e,n){"use strict";n.d(e,"a",(function(){return v})),n.d(e,"r",(function(){return y})),n.d(e,"b",(function(){return _})),n.d(e,"f",(function(){return O})),n.d(e,"m",(function(){return C})),n.d(e,"l",(function(){return T})),n.d(e,"q",(function(){return S})),n.d(e,"c",(function(){return E})),n.d(e,"d",(function(){return x})),n.d(e,"k",(function(){return P})),n.d(e,"i",(function(){return A})),n.d(e,"g",(function(){return I})),n.d(e,"p",(function(){return M})),n.d(e,"j",(function(){return D})),n.d(e,"h",(function(){return R})),n.d(e,"s",(function(){return L})),n.d(e,"o",(function(){return U})),n.d(e,"n",(function(){return B})),n.d(e,"e",(function(){return z}));var i=n("zqNl"),r=n("og7C"),o=n("p5wL"),a=n("TYVA"),s=n("lE9u"),c=n("+Px6"),u=n("nXdR"),l=n("VmIW"),d=n("lx5p"),h=n("+axt"),f=n("rxqU"),p=n("5JSY"),b=n("vYTc"),g={margin:Object(r.b)(),futures:Object(r.b)(),holding:Object(r.b)(),flex:void 0,funding:{depositDetails:{},fiatDepositBankDetails:void 0,fiatWithdrawalBankDetails:void 0},authenticated:{marginWallets:[],tradeables:[],flexibleFutures:!1},availableTransferPreferences:[]},m=Object(i.i)(g,Object(i.k)(s.q,(function(){return g})),Object(i.k)(s.w,(function(t,e){var n,i,r,o,a=Object.assign(Object.assign({},t),{holding:t.holding.merge(e.holding),futures:t.futures.merge(e.futures),margin:t.margin.merge(e.margin),flex:e.flex});return(null===(n=e.flex)||void 0===n?void 0:n.flexAssets)&&(null===(i=t.flex)||void 0===i?void 0:i.flexAssets)&&(a.flex=Object.assign(Object.assign({},e.flex),{flexAssets:null===(o=null===(r=t.flex)||void 0===r?void 0:r.flexAssets)||void 0===o?void 0:o.merge(e.flex.flexAssets)})),a})),Object(i.k)(s.t,(function(t,e){return Object(o.b)(e,t,"funding","depositDetails")})),Object(i.k)(s.u,(function(t,e){return Object(o.b)(e,t,"funding","fiatDepositBankDetails")})),Object(i.k)(s.v,(function(t,e){var n=e.addresses;return Object(o.b)(n,t,"funding","fiatWithdrawalBankDetails")})),Object(i.k)(s.r,(function(t,e){var n=e.authenticatedWallets;return Object(o.b)(n,t,"authenticated")})),Object(i.k)(s.s,(function(t,e){var n=e.availableTransferPreferences;return Object(o.b)(n,t,"availableTransferPreferences")})));function v(t,e){return m(t,e)}var y=Object(i.h)("wallets"),_=Object(i.j)(y,(function(t){return t.availableTransferPreferences})),O=Object(i.j)(y,f.m,p.a,(function(t,e,n){return!e&&"kraken"===n||t.authenticated.flexibleFutures})),k=Object(i.j)(y,(function(t){return t.margin})),w=Object(i.j)(y,(function(t){return t.futures})),C=Object(i.j)(y,(function(t){return t.holding})),T=Object(i.j)(y,(function(t){return t.flex})),S=Object(i.j)(y,(function(t){return t.funding})),E=Object(i.j)(y,(function(t){return t.funding.fiatDepositBankDetails})),x=Object(i.j)(y,(function(t){return t.funding.fiatWithdrawalBankDetails})),P=Object(i.j)(h.a,C,(function(t,e){return e.map((function(e){return Object(u.g)(t,e)})).reduce((function(t,e){return t+e}),0)})),A=Object(i.j)(h.a,w,(function(t,e){return e.map((function(e){return Object(u.e)(t,e)})).reduce((function(t,e){return t+e}),0)})),I=Object(i.j)(T,(function(t){return(null==t?void 0:t.pv)||0})),M=Object(i.j)(P,A,I,(function(t,e,n){return t+e+n})),D=Object(i.j)(c.d,h.a,M,C,(function(t,e,n,i){return Object(u.b)(i,e,n,t)})),R=Object(i.j)(c.d,h.a,M,w,(function(t,e,n,i){return Object(u.b)(i,e,n,t)})),j=Object(i.j)(c.d,h.a,M,k,(function(t,e,n,i){return Object(u.b)(i,e,n,t)})),L=Object(i.j)(D,R,j,(function(t,e,n){return t.map((function(t){var i=e.filter((function(e){return e.asset===t.asset})).map((function(t){return t.notional})).reduce((function(t,e){return t+e}),0),r=n.filter((function(e){return e.asset===t.asset})).map((function(t){return t.notional})).reduce((function(t,e){return t+e}),0);return Object.assign(Object.assign({},t),{totalNotional:t.notional+i+r})})).sortBy((function(t){return t.totalNotional}),d.i).valueSeq()})),N=Object(i.j)(c.n,D,(function(t,e){return Object(u.c)(e,t)})),U=Object(i.j)(N,(function(t){return l.Maybe.fromUndefined(t.first())})),F=Object(i.j)(c.n,R,(function(t,e){return Object(u.c)(e,t)})),B=(Object(i.j)(h.a,N,(function(t,e){return e.map((function(e){return Object(u.g)(t,e)})).reduce((function(t,e){return t+e}),0)})),Object(i.j)(h.a,F,(function(t,e){return e.map((function(e){return Object(u.e)(t,e)})).reduce((function(t,e){return t+e}),0)})),Object(i.j)(c.r,R,T,(function(t,e,n){return Object(b.a)(t)?n:e.find((function(e){var n;return(null===(n=Object(u.f)(e.name).orUndefined())||void 0===n?void 0:n.replace("XBT","BTC"))===Object(a.j)(t).toUpperCase()}))}))),z=(Object(i.j)(k,w,C,(function(t,e,n){return n.merge(e).merge(t)})),Object(i.j)(T,f.c,(function(t,e){var n;return null===(n=null==t?void 0:t.flexAssets)||void 0===n?void 0:n.keySeq().toArray().map((function(e){var n,i;return(null===(i=null===(n=null==t?void 0:t.flexAssets)||void 0===n?void 0:n.get(e))||void 0===i?void 0:i.currency)||""})).filter((function(t){return"IE"!==e&&"BE"!==e||"WIF"!==t}))})))},J180:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(e){o(e)}}function s(t){try{c(i.throw(t))}catch(e){o(e)}}function c(t){t.done?r(t.value):new n((function(e){e(t.value)})).then(a,s)}c((i=i.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]0&&!t.paused&&!t.ended&&t.readyState>2},t.prototype.tryPlayVideo=function(t){return i(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:if(this.isVideoPlaying(t))return console.warn("Trying to play video that is already playing."),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.play()];case 2:return e.sent(),[3,4];case 3:return e.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}}))}))},t.prototype.getMediaElement=function(t,e){var n=document.getElementById(t);if(!n)throw new o.default("element with id '"+t+"' not found");if(n.nodeName.toLowerCase()!==e.toLowerCase())throw new o.default("element with id '"+t+"' must be an "+e+" element");return n},t.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new o.default("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},t.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new o.default("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},t.prototype.decodeFromVideoContinuously=function(t,e,n){if(void 0===t&&void 0===e)throw new o.default("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,n):this.decodeFromVideoElementContinuously(t,n)},t.prototype.decodeFromImageElement=function(t){if(!t)throw new o.default("An image element must be provided.");this.reset();var e=this.prepareImageElement(t);return this.imageElement=e,this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e)},t.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},t.prototype.decodeFromVideoElementContinuously=function(t,e){var n=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(n,e)},t.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new o.default("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e,e},t.prototype.decodeFromImageUrl=function(t){if(!t)throw new o.default("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var n=this._decodeOnLoadImage(e);return e.src=t,n},t.prototype.decodeFromVideoUrl=function(t){if(!t)throw new o.default("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),n=this.decodeFromVideoElement(e);return e.src=t,n},t.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new o.default("An URL must be provided.");this.reset();var n=this.prepareVideoElement(),i=this.decodeFromVideoElementContinuously(n,e);return n.src=t,i},t.prototype._decodeOnLoadImage=function(t){var e=this;return new Promise((function(n,i){e.imageLoadedListener=function(){return e.decodeOnce(t,!1,!0).then(n,i)},t.addEventListener("load",e.imageLoadedListener)}))},t.prototype._decodeOnLoadVideo=function(t){return i(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return e.sent(),[4,this.decodeOnce(t)];case 2:return[2,e.sent()]}}))}))},t.prototype._decodeOnLoadVideoContinuously=function(t,e){return i(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return n.sent(),this.decodeContinuously(t,e),[2]}}))}))},t.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.prototype.prepareImageElement=function(t){var e;return void 0===t&&((e=document.createElement("img")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e},t.prototype.prepareVideoElement=function(t){var e;return t||"undefined"==typeof document||((e=document.createElement("video")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},t.prototype.decodeOnce=function(t,e,n){var i=this;void 0===e&&(e=!0),void 0===n&&(n=!0),this._stopAsyncDecode=!1;return new Promise((function(r,o){return function r(o,a){if(i._stopAsyncDecode)return a(new l.default("Video stream has ended before any code could be detected.")),void(i._stopAsyncDecode=void 0);try{var c=i.decode(t);o(c)}catch(d){if(e&&d instanceof l.default||(d instanceof s.default||d instanceof u.default)&&n)return setTimeout((function(){return r(o,a)}),i._timeBetweenDecodingAttempts);a(d)}}(r,o)}))},t.prototype.decodeContinuously=function(t,e){var n=this;this._stopContinuousDecode=!1;!function i(){if(n._stopContinuousDecode)n._stopContinuousDecode=void 0;else try{var r=n.decode(t);e(r,null),setTimeout((function(){return i()}),n.timeBetweenScansMillis)}catch(o){e(null,o),(o instanceof s.default||o instanceof u.default||o instanceof l.default)&&setTimeout((function(){return i()}),n._timeBetweenDecodingAttempts)}}()},t.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},t.prototype.createBinaryBitmap=function(t){var e=this.getCaptureCanvasContext(t);this.drawImageOnCanvas(e,t);var n=this.getCaptureCanvas(t),i=new d.HTMLCanvasElementLuminanceSource(n),r=new c.default(i);return new a.default(r)},t.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t).getContext("2d");this.captureCanvasContext=e}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},t.prototype.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},t.prototype.createCaptureCanvas=function(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;var e,n,i=document.createElement("canvas");return void 0!==t&&(t instanceof HTMLVideoElement?(e=t.videoWidth,n=t.videoHeight):t instanceof HTMLImageElement&&(e=t.naturalWidth||t.width,n=t.naturalHeight||t.height)),i.style.width=e+"px",i.style.height=n+"px",i.width=e,i.height=n,i},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach((function(t){return t.stop()})),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.prototype._destroyImageElement=function(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch(n){t.src=URL.createObjectURL(e)}},t.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")},t}()},J7L8:function(t,e,n){"use strict";var i,o,a;n.d(e,"a",(function(){return Ct}));var s=n("D57K"),c=n("kZht"),u=n("zqNl"),l=n("ZTXN"),d=n("gxtV"),h=n("VmIW"),g=n("KQpv"),m=n.n(g),v=n("lx5p"),y=n("YzTY"),_=n("uJYd"),O=n("YyhG"),k=n("O5EP"),T=n("wk3K"),S=n("WncL"),E=n("houi"),x=n("nVws"),P=n("v4C1"),A=n("O0qa"),I=n("hnst"),M=n("36Sp"),D=n("bxcy"),R=n("Ngp4"),j=n("UZ8P"),L=n("6neU"),N=n("zK/z"),U=(f(i={},y.a.MARKET_DETAILS,k.a),f(i,y.a.MARKET_CHART,T.a),f(i,y.a.MARKET_PREVIEWS,S.a),f(i,y.a.ORDERBOOK,E.a),f(i,y.a.ORDER_FORM,x.a),f(i,y.a.TRADE_HISTORY,P.a),f(i,y.a.OPEN_ORDERS,A.a),f(i,y.a.TRIGGER_ORDERS,I.a),f(i,y.a.OPEN_POSITIONS,M.a),f(i,y.a.FILLED_ORDERS,D.a),f(i,y.a.PAIR_WALLET,R.a),f(i,y.a.BRACKET_ORDER,L.a),f(i,y.a.DEPTH_CHART,j.a),f(i,y.a.ACCOUNT_ACTIVITY,N.a),i);var F=n("LaGA"),B=n("TLy2"),z=n("An66"),V=n("aaFr"),H=n("TADc"),q=n("ROO/"),$=n("icqo"),Q=n("NxuZ"),W=n("FUfi"),G=n("bBQR"),Y=n("anSm"),K=n("aDqW"),Z=n("MqcE"),X=["content"],J=["container"],tt=["tabsList"],et=["tabsContainer"];function nt(t,e){if(1&t){var n=c.Vb();c.Ub(0,"div",25),c.bc("dragstart",(function(t){c.Ec(n);var i=e.$implicit;return c.fc(2).startTabDrag(t,i)}))("dragover",(function(){c.Ec(n);var t=e.index;return c.fc(2).dragOverTab(t)}))("dragend",(function(t){c.Ec(n);var i=e.$implicit;return c.fc(2).dragEndTab(t,i)}))("drop",(function(t){c.Ec(n);var i=e.index;return c.fc(2).dropTab(t,i)}))("click",(function(){c.Ec(n);var t=e.$implicit;return c.fc(2).focusTab(t)})),c.Ub(1,"tab-label",26),c.bc("closeTab",(function(){c.Ec(n);var t=e.$implicit;return c.fc(2).removeTab(t)})),c.Tb(),c.Tb()}if(2&t){var i=e.$implicit,r=e.index,o=c.fc(2);c.Lc("margin-left",o.marginLeft(i,r)),c.Gb("active",o.focussedComponentId.contains(i.id)),c.mc("hidden",o.hiddenComponents.includes(i)),c.Cb(1),c.oc("heading","HEADING.",o.CID[i.id],""),c.mc("badgeSelector",o.tabBadge(i.id)),c.Db("active",o.focussedComponentId.contains(i.id))}}function it(t,e){if(1&t&&(c.Ub(0,"div",27),c.Ub(1,"p",28),c.Qc(2),c.Tb(),c.Pb(3,"fa-icon",29),c.Tb()),2&t){var n=c.fc(2),i=c.Ac(6);c.mc("sbMenuTriggerFor",i),c.Cb(2),c.Rc(n.hiddenComponents.length)}}function rt(t,e){if(1&t&&(c.Ub(0,"div",30),c.Pb(1,"fa-icon",31),c.Tb()),2&t){c.fc(2);var n=c.Ac(13);c.mc("sbMenuTriggerFor",n)}}function ot(t,e){if(1&t&&(c.Ub(0,"div",5,21),c.Oc(2,nt,2,8,"div",22),c.Oc(3,it,4,2,"div",23),c.Oc(4,rt,2,1,"div",24),c.Tb()),2&t){var n=c.fc();c.Cb(2),c.mc("ngForOf",n.tabs),c.Cb(1),c.mc("ngIf",n.hiddenComponents.length),c.Cb(1),c.mc("ngIf",(n.usableTabs.length||n.moveHereTabs.length)&&!n.hiddenComponents.length)}}function at(t,e){if(1&t&&(c.Sb(0),c.Ub(1,"div",32),c.Ub(2,"p",33),c.Qc(3,"TAB_WRAPPER.ADD_NEW"),c.Tb(),c.Pb(4,"fa-icon",34),c.Tb(),c.Rb()),2&t){c.fc();var n=c.Ac(13);c.Cb(1),c.mc("sbMenuTriggerFor",n)}}function st(t,e){if(1&t){var n=c.Vb();c.Ub(0,"div",35),c.Ub(1,"button",36),c.bc("click",(function(){c.Ec(n);var t=e.$implicit,i=e.index;return c.fc().menuTabClick(t,i)})),c.Qc(2),c.gc(3,"translate"),c.Tb(),c.Ub(4,"button",37),c.bc("click",(function(){c.Ec(n);var t=e.$implicit;return c.fc().removeTab(t)})),c.Pb(5,"fa-icon",38),c.Tb(),c.Tb()}if(2&t){var i=e.$implicit,r=c.fc();c.Cb(2),c.Sc(" ",c.hc(3,1,"HEADING."+r.CID[i.id])," ")}}function ct(t,e){if(1&t){var n=c.Vb();c.Ub(0,"button",39),c.bc("click",(function(){c.Ec(n);var t=e.$implicit;return c.fc().addTab(t)})),c.Qc(1),c.gc(2,"translate"),c.Tb()}if(2&t){var i=e.$implicit,r=c.fc();c.Cb(1),c.Sc(" ",c.hc(2,1,"HEADING."+r.CID[i.id])," ")}}function ut(t,e){1&t&&(c.Ub(0,"p",40),c.Qc(1,"TAB_WRAPPER.IN_USE"),c.Tb())}function lt(t,e){if(1&t){var n=c.Vb();c.Ub(0,"button",41),c.bc("click",(function(){c.Ec(n);var t=e.$implicit;return c.fc().addInUseTab(t)})),c.Qc(1),c.gc(2,"translate"),c.Tb()}if(2&t){var i=e.$implicit,r=c.fc();c.Cb(1),c.Sc(" ",c.hc(2,1,"HEADING."+r.CID[i.id])," ")}}function dt(t,e){1&t&&(c.Sb(0),c.Pb(1,"fa-icon",44),c.Ub(2,"p",33),c.Qc(3,"TAB_WRAPPER.COMPONENT_IN_USE"),c.Tb(),c.Rb())}function ht(t,e){1&t&&(c.Sb(0),c.Pb(1,"fa-icon",45),c.Ub(2,"p",33),c.Qc(3,"TAB_WRAPPER.VALID_CONTAINER"),c.Tb(),c.Rb())}function ft(t,e){1&t&&(c.Sb(0),c.Pb(1,"fa-icon",44),c.Ub(2,"p",33),c.Qc(3,"TAB_WRAPPER.INVALID_CONTAINER"),c.Tb(),c.Rb())}function pt(t,e){1&t&&(c.Sb(0),c.Pb(1,"fa-icon",46),c.Ub(2,"p",33),c.Qc(3,"TAB_WRAPPER.DROP_TAB"),c.Tb(),c.Rb())}function bt(t,e){if(1&t){var n=c.Vb();c.Ub(0,"div",42),c.bc("drop",(function(t){return c.Ec(n),c.fc().dropTab(t)})),c.Oc(1,dt,4,0,"ng-container",43),c.Oc(2,ht,4,0,"ng-container",43),c.Oc(3,ft,4,0,"ng-container",43),c.Oc(4,pt,4,0,"ng-container",43),c.Tb()}if(2&t){var i=c.fc();c.Eb(i.dropClass),c.mc("ngSwitch",i.state),c.Cb(1),c.mc("ngSwitchCase","in-use"),c.Cb(1),c.mc("ngSwitchCase","drop-valid"),c.Cb(1),c.mc("ngSwitchCase","drop-invalid"),c.Cb(1),c.mc("ngSwitchCase","drop-target")}}function gt(t,e){if(1&t&&(c.Ub(0,"div",47),c.Ub(1,"div",48),c.Pb(2,"fa-icon",49),c.Ub(3,"p",33),c.Qc(4,"TAB_WRAPPER.ADD_NEW_WIDGET"),c.Tb(),c.Ub(5,"p",33),c.Qc(6,"TAB_WRAPPER.SELECT_DATA"),c.Tb(),c.Tb(),c.Tb()),2&t){c.fc();var n=c.Ac(13);c.Cb(1),c.mc("sbMenuTriggerFor",n)}}var mt,vt=m()("app:tab-wrapper"),yt=m()("trace:app:tab-wrapper"),_t={empty:"1px solid var(--border-colour)",content:"1px solid var(--border-colour)","in-use":"1px solid var(--border-colour)","drop-valid":"2px dashed var(--g200)","drop-invalid":"2px dashed var(--r200)","drop-target":"2px dashed var(--brand)"},Ot={empty:"",content:"","in-use":"in-use-container","drop-valid":"valid-container","drop-invalid":"invalid-container","drop-target":"drop-target"},kt=(f(o={},y.a.OPEN_POSITIONS,"POSITIONS_ORDERS"),f(o,y.a.OPEN_ORDERS,"POSITIONS_ORDERS"),f(o,y.a.TRIGGER_ORDERS,"POSITIONS_ORDERS"),f(o,y.a.FILLED_ORDERS,"POSITIONS_ORDERS"),f(o,y.a.ORDERBOOK,"ORDERBOOK"),f(o,y.a.MARKET_CHART,"MARKET_CHART"),f(o,y.a.TRADE_HISTORY,"TRADE_HISTORY"),o),wt=(f(a={},y.a.OPEN_ORDERS,O.h),f(a,y.a.TRIGGER_ORDERS,O.j),f(a,y.a.OPEN_POSITIONS,O.i),a),Ct=((mt=function(){function t(e,n,i){var r=this;C(this,t),this.cfr=e,this.store=n,this.changeDetectorRef=i,this.CID=y.a,this.loadedComponent=Object(h.None)(),this.dragCounter=0,this.dropPositionPreview=Object(h.None)(),this.workspaceComponents=[],this.tabAdd=new c.o,this.tabMove=new c.o,this.tabDelete=new c.o,this.tabFocus=new c.o,this.tabDragging=new c.o,this.hiddenComponents=[],this.observed=!1,this.badgeSelector$=new l.b,this.badge$=this.badgeSelector$.pipe(Object(B.a)((function(t){return r.store.pipe(Object(u.m)(t))}))),this.debug=function(t){for(var e,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o0,c=t.hiddenComponents.map((function(t){return t.id}));if(s){var u=function(t,e){for(var n=t.length;n--;)if(e(t[n],n,t))return n;return-1}(t.validComponents,(function(e){return!c.includes(e)&&t.activeComponent!==e}));if(-1!==u)return{v:(t.hiddenComponents.push(t.tabs[u]),void t.changeDetectorRef.detectChanges())}}else a-i>200&&t.hiddenComponents.shift();t.removeOldHiddenComponents(),t.changeDetectorRef.detectChanges()};for(i.s();!(n=i.n()).done;){var a=o();if("object"==typeof a)return a.v}}catch(s){i.e(s)}finally{i.f()}})),this.observer.observe(this.tabsList.nativeElement),this.observer.observe(this.tabsContainer.nativeElement),this.observed=!0}},{key:"removeOldHiddenComponents",value:function(){var t=this;this.hiddenComponents.forEach((function(e,n){t.validComponents.includes(e.id)||t.hiddenComponents.splice(n,1)}))}},{key:"menuTabClick",value:function(t,e){this.focusTab(t),this.moveTab(t,0),this.hiddenComponents.splice(e,1)}},{key:"marginLeft",value:function(t,e){var n=this;if(this.dropPositionPreview.contains(e))return"60px";var i=this.tabs.find((function(t){return!n.hiddenComponents.map((function(t){return t.id})).includes(t.id)}));return i&&t.id===i.id?"0px":"10px"}},{key:"tabBadge",value:function(t){return wt[t]}},{key:"tabs",get:function(){return this.validComponents.map((function(t){return y.i[t]}))}},{key:"suitableTabs",get:function(){var t=this;return b(Object.values(y.i)).filter((function(e){return Object(y.h)(e,t.panelSize)&&!e.deprecated}))}},{key:"usableTabs",get:function(){var t=this;return this.suitableTabs.filter((function(e){return!t.workspaceComponents.includes(e.id)&&!e.deprecated}))}},{key:"moveHereTabs",get:function(){var t=this;return this.suitableTabs.filter((function(e){var n=t.workspaceComponents.includes(e.id),i=t.tabs.includes(e);return n&&!i}))}},{key:"isValidPanel",get:function(){return this.validPanelLocations.has(this.location)}},{key:"isDraggedOver",get:function(){return this.dragCounter>0}},{key:"state",get:function(){var t=this;return this.dragging.cata((function(){return t.validComponents.length>0?"content":"empty"}),(function(e){return t.validComponents.includes(e)?"in-use":t.isValidPanel&&t.isDraggedOver?"drop-target":t.isValidPanel&&!t.isDraggedOver?"drop-valid":"drop-invalid"}))}},{key:"isDragMode",get:function(){return!["content","empty"].includes(this.state)}},{key:"dropClass",get:function(){return Ot[this.state]}},{key:"panelBorder",get:function(){return _t[this.state]}},{key:"focussedComponentId",get:function(){if(this.validComponents.length>0){var t=this.activeComponent&&!y.i[this.activeComponent].deprecated?this.activeComponent:this.validComponents[0];return Object(h.Some)(t)}return Object(h.None)()}},{key:"isOverflow",get:function(){var t=this.tabsList.nativeElement;return t.offsetWidth p[_ngcontent-%COMP%], .in-use-container[_ngcontent-%COMP%] > p[_ngcontent-%COMP%], .invalid-container[_ngcontent-%COMP%] > p[_ngcontent-%COMP%], .valid-container[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin-top:5px}.in-use-container[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--border-colour)}.valid-container[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--accent-colour)}.invalid-container[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--warn-colour)}.drop-target[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--brand)}.content[_ngcontent-%COMP%]{flex:1;overflow:auto}.content[_ngcontent-%COMP%] .no-content[_ngcontent-%COMP%]{height:100%}.content[_ngcontent-%COMP%] .no-content[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.content[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%]{color:#888;cursor:pointer;height:-moz-max-content;height:max-content;flex-direction:column;width:-moz-max-content;width:max-content}.content[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--icon-colour)}.content[_ngcontent-%COMP%] .placeholder[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin-top:5px}.spacer[_ngcontent-%COMP%]{flex-grow:1}.tab-basic[_ngcontent-%COMP%]{align-items:center;background:var(--toolbar-colour);border:1px solid var(--border-colour);border-top-left-radius:5px;border-top-right-radius:5px;border-bottom:0;display:flex;z-index:2}.tab-basic.active[_ngcontent-%COMP%], .tab-basic[_ngcontent-%COMP%]:hover{border-color:var(--border-colour-bright);background:var(--card-colour)}.tab-basic.active[_ngcontent-%COMP%]{border-bottom:1px solid var(--card-colour);position:relative;margin-top:-1px;top:1px}.tab-dropdown[_ngcontent-%COMP%]{cursor:pointer;display:flex;margin-left:var(--spacing);padding:4px 2px 4px 6px}.tab-dropdown[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--ghost-colour)}.tab-dropdown[_ngcontent-%COMP%] fa-icon.down[_ngcontent-%COMP%]{color:var(--icon-colour);top:-1px;position:relative}.tab-name[_ngcontent-%COMP%]{flex:1}.remove-tab[_ngcontent-%COMP%]{width:30px}.add-tab[_ngcontent-%COMP%]{cursor:pointer;padding:4px 6px;margin-left:var(--spacing)}.add-tab[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--icon-colour)}.tab-list[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap}.tab-list-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}.tab-list[_ngcontent-%COMP%] > fa-icon[_ngcontent-%COMP%]{cursor:pointer;color:var(--icon-colour);position:relative;top:4px;margin-left:10px;z-index:2}[hidden][_ngcontent-%COMP%]{display:none!important}"],changeDetection:0}),mt=Object(s.d)([Object(d.a)()],mt))},JHA6:function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var i,r=n("ZTXN"),s=n("IdLP"),u=(n("5uGe"),n("bwdy")),l=n("i7Dj"),d=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this)).source=t,r.subjectFactory=i,r._refCount=0,r._isComplete=!1,r}return w(n,[{key:"_subscribe",value:function(t){return this.getSubject().subscribe(t)}},{key:"getSubject",value:function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}},{key:"connect",value:function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new u.a).add(this.source.subscribe(new p(this.getSubject(),this))),t.closed&&(this._connection=null,t=u.a.EMPTY)),t}},{key:"refCount",value:function(){return Object(l.a)()(this)}}]),n}(s.a),f={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(i=d.prototype)._subscribe},_isComplete:{value:i._isComplete,writable:!0},getSubject:{value:i.getSubject},connect:{value:i.connect},refCount:{value:i.refCount}},p=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t)).connectable=i,r}return w(n,[{key:"_error",value:function(t){this._unsubscribe(),o(h(n.prototype),"_error",this).call(this,t)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),o(h(n.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value: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()}}}]),n}(r.c);function b(t,e){return function(n){var i;if(i="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new g(i,e));var r=Object.create(n,f);return r.source=n,r.subjectFactory=i,r}}var g=function(){function t(e,n){C(this,t),this.subjectFactory=e,this.selector=n}return w(t,[{key:"call",value:function(t,e){var n=this.selector,i=this.subjectFactory(),r=n(i).subscribe(t);return r.add(e.subscribe(i)),r}}]),t}()},JgBV:function(t,e,n){var i=n("p3rJ"),r=n("5OId");e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!i.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return r.testNumeric(t)?e.NUMERIC:r.testAlphanumeric(t)?e.ALPHANUMERIC:r.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(i){return n}}},JpLq:function(t,e,n){"use strict";n.d(e,"a",(function(){return f})),n.d(e,"b",(function(){return g}));var i=n("D57K"),r=n("An66"),o=n("kZht"),s=n("3kIJ"),u=n("Nhx6"),l=n("C05f"),d=["preview"],h=function(t){a(n,t);var e=c(n);function n(){var t;return C(this,n),(t=e.apply(this,arguments))._isTorchAvailable=new l.a(void 0),t}return w(n,[{key:"continuousDecodeFromInputVideoDevice",value:function(t,e){var n=this;if(this.reset(),void 0!==t&&(this.deviceId=t),"undefined"!=typeof navigator){var i=new l.a({});try{this.getStreamForDevice({deviceId:t}).then((function(t){return n.attachStreamToVideoAndCheckTorch(t,e)})).then((function(t){return n.decodeOnSubject(i,t,n.timeBetweenScansMillis)}))}catch(r){i.error(r)}return this._setScanStream(i),i.asObservable()}}},{key:"getStreamForDevice",value:function(t){var e=t.deviceId;return Object(i.a)(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getUserMediaConstraints(e),t.next=3,navigator.mediaDevices.getUserMedia(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"getUserMediaConstraints",value:function(t){return{video:void 0===t?{facingMode:{exact:"environment"}}:{deviceId:{exact:t}}}}},{key:"setTorch",value:function(t){if(this._isTorchAvailable.value){var e=this.getVideoTracks(this.stream);t?this.applyTorchOnTracks(e,!0):(this.applyTorchOnTracks(e,!1),this.restart())}}},{key:"attachStreamToVideoAndCheckTorch",value:function(t,e){return this.updateTorchCompatibility(t),this.attachStreamToVideo(t,e)}},{key:"updateTorchCompatibility",value:function(t){return Object(i.a)(this,void 0,void 0,regeneratorRuntime.mark((function e(){var n,i,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.getVideoTracks(t),i=p(n),e.prev=2,i.s();case 4:if((r=i.n()).done){e.next=13;break}return o=r.value,e.next=8,this.isTorchCompatible(o);case 8:if(!e.sent){e.next=11;break}return this._isTorchAvailable.next(!0),e.abrupt("break",13);case 11:e.next=4;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),i.e(e.t0);case 18:return e.prev=18,i.f(),e.finish(18);case 21:case"end":return e.stop()}}),e,this,[[2,15,18,21]])})))}},{key:"getVideoTracks",value:function(t){var e=[];try{e=t.getVideoTracks()}finally{return e||[]}}},{key:"isTorchCompatible",value:function(t){return Object(i.a)(this,void 0,void 0,regeneratorRuntime.mark((function e(){var n,i,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,i=new ImageCapture(t),e.next=5,i.getPhotoCapabilities();case 5:r=e.sent,n=!!r.torch||"fillLightMode"in r&&0!==r.fillLightMode.length;case 7:return e.prev=7,e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,null,[[1,,7,10]])})))}},{key:"applyTorchOnTracks",value:function(t,e){t.forEach((function(t){return t.applyConstraints({advanced:[{torch:e,fillLightMode:e?"torch":"none"}]})}))}},{key:"_setScanStream",value:function(t){this._cleanScanStream(),this.scanStream=t}},{key:"_cleanScanStream",value:function(){this.scanStream&&!this.scanStream.isStopped&&this.scanStream.complete(),this.scanStream=null}},{key:"decodeOnSubject",value:function(t,e,n){var i,r=this;if(!t.isStopped)try{i=this.decode(e),t.next({result:i})}catch(o){!o||o instanceof u.NotFoundException||o instanceof u.ChecksumException||o instanceof u.FormatException?t.next({error:o}):t.error(o)}finally{setTimeout((function(){return r.decodeOnSubject(t,e,n)}),i?n:0)}}},{key:"restart",value:function(){return this.continuousDecodeFromInputVideoDevice(this.deviceId,this.videoElement)}},{key:"isTorchAvailable",get:function(){return this._isTorchAvailable.asObservable()}}]),n}(u.BrowserMultiFormatReader),f=function(){var t=function(){function t(){C(this,t),this.timeBetweenScans=500,this.previewFitMode="cover",this.autostarted=new o.o,this.autostarting=new o.o,this.torchCompatible=new o.o,this.scanSuccess=new o.o,this.scanFailure=new o.o,this.scanError=new o.o,this.scanComplete=new o.o,this.camerasFound=new o.o,this.camerasNotFound=new o.o,this.permissionResponse=new o.o(!0),this.hasDevices=new o.o,this.deviceChange=new o.o,this._device=null,this._enabled=!0,this._hints=new Map,this.autofocusEnabled=!0,this.autostart=!0,this.formats=[u.BarcodeFormat.QR_CODE],this.hasNavigator="undefined"!=typeof navigator,this.isMediaDevicesSupported=this.hasNavigator&&!!navigator.mediaDevices}return w(t,[{key:"askForPermission",value:function(){return Object(i.a)(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.hasNavigator){t.next=2;break}return t.abrupt("return",(console.error("@zxing/ngx-scanner","Can't ask permission, navigator is not present."),this.setPermission(null),this.hasPermission));case 2:if(this.isMediaDevicesSupported){t.next=4;break}return t.abrupt("return",(console.error("@zxing/ngx-scanner","Can't get user media, this is not supported."),this.setPermission(null),this.hasPermission));case 4:return t.prev=4,t.next=7,this.getAnyVideoDevice();case 7:e=t.sent,n=!!e,t.next=14;break;case 11:return t.prev=11,t.t0=t.catch(4),t.abrupt("return",this.handlePermissionException(t.t0));case 14:return t.prev=14,this.terminateStream(e),t.finish(14);case 17:return t.abrupt("return",(this.setPermission(n),n));case 18:case"end":return t.stop()}}),t,this,[[4,11,14,17]])})))}},{key:"getAnyVideoDevice",value:function(){return navigator.mediaDevices.getUserMedia({video:!0})}},{key:"terminateStream",value:function(t){t&&t.getTracks().forEach((function(t){return t.stop()})),t=void 0}},{key:"initAutostartOff",value:function(){this.isAutostarting=null,this.updateVideoInputDevices()}},{key:"initAutostartOn",value:function(){return Object(i.a)(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isAutostarting=!0,t.prev=1,t.next=4,this.askForPermission();case 4:e=t.sent,t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(1),t.abrupt("return",void console.error("Exception occurred while asking for permission:",t.t0));case 10:if(!e){t.next=15;break}return t.next=13,this.updateVideoInputDevices();case 13:n=t.sent,this.autostartScanner(b(n));case 15:case"end":return t.stop()}}),t,this,[[1,7]])})))}},{key:"isCurrentDevice",value:function(t){return this.device&&t&&t.deviceId===this.device.deviceId}},{key:"ngAfterViewInit",value:function(){var t=this;if(this.getCodeReader().isTorchAvailable.subscribe((function(e){return t.torchCompatible.emit(e)})),!this.autostart)return console.warn("New feature 'autostart' disabled, be careful. Permissions and devices recovery has to be run manually."),void this.initAutostartOff();this.initAutostartOn()}},{key:"ngOnDestroy",value:function(){this.reset()}},{key:"restart",value:function(){var t=this._reset();t&&(this._codeReader=void 0,this.device=t)}},{key:"updateVideoInputDevices",value:function(){return Object(i.a)(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getCodeReader().listVideoInputDevices();case 2:if(t.t0=t.sent,t.t0){t.next=5;break}t.t0=[];case 5:return e=t.t0,n=e&&e.length>0,t.abrupt("return",(this.hasDevices.next(n),this.camerasFound.next(b(e)),n||this.camerasNotFound.next(),e));case 8:case"end":return t.stop()}}),t,this)})))}},{key:"autostartScanner",value:function(t){var e=t.find((function(t){var e=t.label;return/back|tr\xe1s|rear|traseira|environment|ambiente/gi.test(e)}))||t.pop();if(!e)throw new Error("Impossible to autostart, no input devices available.");this.device=e,this.deviceChange.emit(e),this.isAutostarting=!1,this.autostarted.next()}},{key:"dispatchScanSuccess",value:function(t){this.scanSuccess.next(t.getText())}},{key:"dispatchScanFailure",value:function(t){this.scanFailure.next(t)}},{key:"dispatchScanError",value:function(t){this.scanError.next(t)}},{key:"dispatchScanComplete",value:function(t){this.scanComplete.next(t)}},{key:"handlePermissionException",value:function(t){var e;switch(console.error("@zxing/ngx-scanner","Error when asking for permission.",t),t.name){case"NotSupportedError":console.warn("@zxing/ngx-scanner",t.message),e=null,this.hasDevices.next(null);break;case"NotAllowedError":console.warn("@zxing/ngx-scanner",t.message),e=!1,this.hasDevices.next(!0);break;case"NotFoundError":console.warn("@zxing/ngx-scanner",t.message),e=null,this.hasDevices.next(!1),this.camerasNotFound.next(t);break;case"NotReadableError":console.warn("@zxing/ngx-scanner","Couldn't read the device(s)'s stream, it's probably in use by another app."),e=null,this.hasDevices.next(!1),this.camerasNotFound.next(t);break;default:console.warn("@zxing/ngx-scanner","I was not able to define if I have permissions for camera or not.",t),e=null}return this.setPermission(e),this.permissionResponse.error(t),e}},{key:"getBarcodeFormatOrFail",value:function(t){return"string"==typeof t?u.BarcodeFormat[t.trim().toUpperCase()]:t}},{key:"getCodeReader",value:function(){return this._codeReader||(this._codeReader=new h(this.hints,this.timeBetweenScans)),this._codeReader}},{key:"scanFromDevice",value:function(t){var e=this,n=this.previewElemRef.nativeElement,i=this.getCodeReader().continuousDecodeFromInputVideoDevice(t,n);if(!i)throw new Error("Undefined decoding stream, aborting.");i.subscribe((function(t){return e._onDecodeResult(t.result,t.error)}),(function(t){return e._onDecodeError(t)}),(function(){e.reset(),console.log("completed")}))}},{key:"_onDecodeError",value:function(t){this.dispatchScanError(t),this.reset()}},{key:"_onDecodeResult",value:function(t,e){t?this.dispatchScanSuccess(t):this.dispatchScanFailure(e),this.dispatchScanComplete(t)}},{key:"_reset",value:function(){if(this._codeReader){var t=this.device;return this._device=null,this._codeReader.reset(),t}}},{key:"reset",value:function(){this._reset(),this.deviceChange.emit(null)}},{key:"setPermission",value:function(t){this.hasPermission=t,this.permissionResponse.next(t)}},{key:"codeReader",get:function(){return this._codeReader}},{key:"device",set:function(t){if(!t&&null!==t)throw new u.ArgumentException("The `device` must be a valid MediaDeviceInfo or null.");this.isCurrentDevice(t)?console.warn("Setting the same device is not allowed."):this.isAutostarting?console.warn("Avoid setting a device during auto-start."):(this.hasPermission||console.warn("Permissions not set yet, waiting for them to be set to apply device change."),this._reset(),this._device=t,this._enabled&&null!==t&&this.scanFromDevice(t.deviceId))},get:function(){return this._device}},{key:"formats",get:function(){return this.hints.get(u.DecodeHintType.POSSIBLE_FORMATS)},set:function(t){var e=this;if("string"==typeof t)throw new Error("Invalid formats, make sure the [formats] input is a binding.");var n=t.map((function(t){return e.getBarcodeFormatOrFail(t)})),i=this.hints;i.set(u.DecodeHintType.POSSIBLE_FORMATS,n),this.hints=i}},{key:"hints",get:function(){return this._hints},set:function(t){this._hints=t,this.restart()}},{key:"isAutostarting",set:function(t){this._isAutostarting=t,this.autostarting.next(t)},get:function(){return this._isAutostarting}},{key:"torch",set:function(t){this.getCodeReader().setTorch(t)}},{key:"enable",set:function(t){this._enabled=Boolean(t),this._enabled?this.device&&this.scanFromDevice(this.device.deviceId):this.reset()}},{key:"enabled",get:function(){return this._enabled}},{key:"tryHarder",get:function(){return this.hints.get(u.DecodeHintType.TRY_HARDER)},set:function(t){var e=this.hints;t?e.set(u.DecodeHintType.TRY_HARDER,!0):e.delete(u.DecodeHintType.TRY_HARDER),this.hints=e}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Ib({type:t,selectors:[["zxing-scanner"]],viewQuery:function(t,e){var n;1&t&&o.Jc(d,!0),2&t&&o.zc(n=o.cc())&&(e.previewElemRef=n.first)},inputs:{timeBetweenScans:"timeBetweenScans",previewFitMode:"previewFitMode",autofocusEnabled:"autofocusEnabled",autostart:"autostart",formats:"formats",device:"device",torch:"torch",enable:"enable",tryHarder:"tryHarder"},outputs:{autostarted:"autostarted",autostarting:"autostarting",torchCompatible:"torchCompatible",scanSuccess:"scanSuccess",scanFailure:"scanFailure",scanError:"scanError",scanComplete:"scanComplete",camerasFound:"camerasFound",camerasNotFound:"camerasNotFound",permissionResponse:"permissionResponse",hasDevices:"hasDevices",deviceChange:"deviceChange"},decls:6,vars:2,consts:[["preview",""]],template:function(t,e){1&t&&(o.Ub(0,"video",null,0),o.Ub(2,"p"),o.Qc(3," Your browser does not support this feature, please try to upgrade it. "),o.Tb(),o.Ub(4,"p"),o.Qc(5," Seu navegador n\xe3o suporta este recurso, por favor tente atualiz\xe1-lo. "),o.Tb(),o.Tb()),2&t&&o.Lc("object-fit",e.previewFitMode)},styles:["[_nghost-%COMP%]{display:block}video[_ngcontent-%COMP%]{width:100%;height:auto;-o-object-fit:contain;object-fit:contain}"],changeDetection:0}),t}(),g=function(){var t=function t(){C(this,t)};return t.\u0275mod=o.Mb({type:t}),t.\u0275inj=o.Lb({factory:function(e){return new(e||t)},imports:[[r.c,s.j]]}),t}()},JtL9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("FEHI"),r=n("Nxx2");e.default=function(){function t(t){this.errorCorrectionLevel=i.default.forBits(t>>3&3),this.dataMask=7&t}return t.numBitsDiffering=function(t,e){return r.default.bitCount(t^e)},t.decodeFormatInformation=function(e,n){var i=t.doDecodeFormatInformation(e,n);return null!==i?i:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,n^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,n){for(var i=Number.MAX_SAFE_INTEGER,r=0,o=0,a=t.FORMAT_INFO_DECODE_LOOKUP;o0){var n=new i.default[e.length+t.length];r.default.arraycopy(e,0,n,0,e.length),r.default.arraycopy(t,0,n,e.length,t.length),this.resultPoints=n}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}();e.default=o},KQpv:function(t,e,n){e.log=function(){var t;return"object"==typeof console&&console.log&&(t=console).log.apply(t,arguments)},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){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,r=0;e[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(i++,"%c"===t&&(r=i))})),e.splice(r,0,n)}},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(n){}},e.load=function(){var t;try{t=e.storage.getItem("debug")}catch(n){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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.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"],t.exports=n("SC2c")(e),t.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},KRZI:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("FU6l");function r(t){return!Object(i.a)(t)&&t-parseFloat(t)+1>=0}},KTx3:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("IdLP"),r=n("FU6l"),o=n("IJgj"),a=n("YtkY");function s(t,e,n,c){return Object(o.a)(n)&&(c=n,n=void 0),c?s(t,e,n).pipe(Object(a.a)((function(t){return Object(r.a)(t)?c.apply(void 0,b(t)):c(t)}))):new i.a((function(i){!function t(e,n,i,r,o){var a;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var s=e;e.addEventListener(n,i,o),a=function(){return s.removeEventListener(n,i,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var c=e;e.on(n,i),a=function(){return c.off(n,i)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var u=e;e.addListener(n,i),a=function(){return u.removeListener(n,i)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,d=e.length;l1?Array.prototype.slice.call(arguments):t)}),i,n)}))}},KZGf:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){function t(t){void 0===t&&(t=""),this.value=t}return t.prototype.append=function(t){return this.value+="string"==typeof t?t.toString():String.fromCharCode(t),this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(t){return this.value.charAt(t)},t.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},t.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},t.prototype.toString=function(){return this.value},t.prototype.insert=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+e.length)},t}()},Knqz:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return s}));var i=["","K","M","B","T","Z"];function r(t){if(t<1)return t.toString();var e=Math.log10(t)/3|0;if(0===e)return t.toPrecision(3);var n=i[e];return(t/Math.pow(10,3*e)).toPrecision(3)+n}var o,a=n("kZht"),s=((o=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){return null==t?null:r(t)}}]),t}()).\u0275fac=function(t){return new(t||o)},o.\u0275pipe=a.Nb({name:"humanNumber",type:o,pure:!0}),o)},KyJX:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return p})),n.d(e,"d",(function(){return b}));var i=n("zqNl"),r=n("1u95"),o=n("p5wL"),a=n("rxqU"),s=n("B59i"),c=n("+Px6"),u=Object(i.i)({initial:{buy:0,sell:0},edited:{buy:0,sell:0},bracket:{buy:0,sell:0}},Object(i.k)(r.e,(function(t,e){return Object(o.b)(e,t,"initial")})),Object(i.k)(r.d,(function(t,e){return Object(o.b)(e,t,"edited")})),Object(i.k)(r.c,(function(t,e){return Object(o.b)(e,t,"bracket")})));function l(t,e){return u(t,e)}var d=Object(i.h)("margin"),h=Object(i.j)(d,(function(t){return t.initial})),f=Object(i.j)(d,(function(t){return t.bracket})),p=Object(i.j)(d,(function(t){return t.edited})),b=Object(i.j)(h,a.a,c.a,(function(t,e,n){return Object(s.c)(t,e,n)}))},L09h:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("oznm"),r=e.ModeValues=function(t){return t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI",t}(e.ModeValues||{});e.default=function(){function t(e,n,i,r){this.value=e,this.stringValue=n,this.characterCountBitsForVersions=i,this.bits=r,t.FOR_BITS.set(r,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var n=t.FOR_BITS.get(e);if(void 0===n)throw new i.default;return n},t.prototype.getCharacterCountBits=function(t){var e=t.getVersionNumber();return this.characterCountBitsForVersions[e<=9?0:e<=26?1:2]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){return e instanceof t&&this.value===e.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(r.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(r.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(r.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(r.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(r.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(r.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(r.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(r.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(r.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(r.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}()},L20P:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("ZCEf"),r=n("Qkwj"),o=n("qArU"),a=n("e9V9"),s=n("9GlW"),c=n("dyLe"),u=n("TIRN"),l=n("4f+B"),d=n("0SRF"),h=n("LqyJ");e.default=function(){function t(t){this.image=t}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(t){this.resultPointCallback=null==t?null:t.get(i.default.NEED_RESULT_POINT_CALLBACK);var e=new l.default(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)},t.prototype.processFinderPatternInfo=function(e){var n=e.getTopLeft(),i=e.getTopRight(),r=e.getBottomLeft(),a=this.calculateModuleSize(n,i,r);if(a<1)throw new h.default("No pattern found in proccess finder.");var s=t.computeDimension(n,i,r,a),c=u.default.getProvisionalVersionForDimension(s),l=c.getDimensionForVersion()-7,d=null;if(c.getAlignmentPatternCenters().length>0)for(var f=i.getX()-n.getX()+r.getX(),p=i.getY()-n.getY()+r.getY(),b=1-3/l,g=Math.floor(n.getX()+b*(f-n.getX())),m=Math.floor(n.getY()+b*(p-n.getY())),v=4;v<=16;v<<=1)try{d=this.findAlignmentInRegion(a,g,m,v);break}catch(O){if(!(O instanceof h.default))throw O}var y=t.createTransform(n,i,r,d,s),_=t.sampleGrid(this.image,y,s);return new o.default(_,null===d?[r,n,i]:[r,n,i,d])},t.createTransform=function(t,e,n,i,r){var o,a,c,u,l=r-3.5;return null!==i?(o=i.getX(),a=i.getY(),u=c=l-3):(o=e.getX()-t.getX()+n.getX(),a=e.getY()-t.getY()+n.getY(),c=l,u=l),s.default.quadrilateralToQuadrilateral(3.5,3.5,l,3.5,c,u,3.5,l,t.getX(),t.getY(),e.getX(),e.getY(),o,a,n.getX(),n.getY())},t.sampleGrid=function(t,e,n){return a.default.getInstance().sampleGridWithTransform(t,n,n,e)},t.computeDimension=function(t,e,n,i){var o=c.default.round(r.default.distance(t,e)/i),a=c.default.round(r.default.distance(t,n)/i),s=Math.floor((o+a)/2)+7;switch(3&s){case 0:s++;break;case 2:s--;break;case 3:throw new h.default("Dimensions could be not found.")}return s},t.prototype.calculateModuleSize=function(t,e,n){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,n))/2},t.prototype.calculateModuleSizeOneWay=function(t,e){var n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),i=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(n)?i/7:isNaN(i)?n/7:(n+i)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(t,e,n,i){var r=this.sizeOfBlackWhiteBlackRun(t,e,n,i),o=1,a=t-(n-t);a<0?(o=t/(t-a),a=0):a>=this.image.getWidth()&&(o=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);var s=Math.floor(e-(i-e)*o);return o=1,s<0?(o=e/(e-s),s=0):s>=this.image.getHeight()&&(o=(this.image.getHeight()-1-e)/(s-e),s=this.image.getHeight()-1),a=Math.floor(t+(a-t)*o),(r+=this.sizeOfBlackWhiteBlackRun(t,e,a,s))-1},t.prototype.sizeOfBlackWhiteBlackRun=function(t,e,n,i){var r=Math.abs(i-e)>Math.abs(n-t);if(r){var o=t;t=e,e=o,o=n,n=i,i=o}for(var a=Math.abs(n-t),s=Math.abs(i-e),u=-a/2,l=t0){if(b===i)break;b+=d,u-=a}}return 2===h?c.default.distance(n+l,i,t,e):NaN},t.prototype.findAlignmentInRegion=function(t,e,n,i){var r=Math.floor(i*t),o=Math.max(0,e-r),a=Math.min(this.image.getWidth()-1,e+r);if(a-o<3*t)throw new h.default("Alignment top exceeds estimated module size.");var s=Math.max(0,n-r),c=Math.min(this.image.getHeight()-1,n+r);if(c-s<3*t)throw new h.default("Alignment bottom exceeds estimated module size.");return new d.default(this.image,o,s,a-o,c-s,t,this.resultPointCallback).find()},t}()},LBlH:function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var i=n("kZht"),r=n("KQpv"),o=n.n(r),a=n("ZtZA"),s=n("5OT+"),c=n("+6xv"),u=[Object(c.n)("slideInOut",[Object(c.k)("show",Object(c.l)({transform:"translateY(0)",opacity:1})),Object(c.m)(":enter",[Object(c.l)({transform:"translateY(-10px)",opacity:0}),Object(c.e)("300ms ease-out")]),Object(c.m)(":leave",[Object(c.e)("300ms ease-in"),Object(c.l)({transform:"translateY(10px)",opacity:0})])])],l=n("5GZx"),d=n("An66");function h(t,e){if(1&t&&(i.Ub(0,"div",0),i.Ub(1,"div",1),i.Qb(2,2),i.Tb(),i.Tb()),2&t){var n=i.fc();i.mc("@slideInOut","show"),i.Cb(2),i.mc("ngTemplateOutlet",n.content)}}var f,p=o()("sb:popper"),b=((f=function(){function t(e,n,i){C(this,t),this.overlay=e,this.vcr=n,this.placement=i,this.hasBackdrop=!0}return w(t,[{key:"componentTrigger",value:function(t,e){p("manual popper opening anchored to",t);var n=[s.e[e]],i=this.overlay.position().flexibleConnectedTo(t).withPositions(n).withPush(!1);this.trigger(i)}},{key:"centerTrigger",value:function(){var t=this.overlay.position().global().centerHorizontally().centerVertically();this.trigger(t)}},{key:"trigger",value:function(t){var e=this.overlay.create({positionStrategy:t,hasBackdrop:this.hasBackdrop,backdropClass:this.backdropClass,panelClass:this.panelClass});e.backdropClick().subscribe((function(t){return e.dispose()}));var n=new a.h(this.tmpl,this.vcr);e.attach(n),this.overlayRef=e}},{key:"onTrigger",value:function(t){var e,n,i=t.trigger,r=t.event;t.data,p("popper opening anchored to",i,r);var o=null!==(n=null===(e=this.placement)||void 0===e?void 0:e.connectedPositions())&&void 0!==n?n:[s.e.bottomStart],a=this.overlay.position().flexibleConnectedTo(i.vcr.element).withPositions(o).withPush(!1);this.trigger(a)}},{key:"dispose",value:function(){var t;null===(t=this.overlayRef)||void 0===t||t.dispose()}}]),t}()).\u0275fac=function(t){return new(t||f)(i.Ob(l.c),i.Ob(i.R),i.Ob(s.c,9))},f.\u0275cmp=i.Ib({type:f,selectors:[["sb-popper"]],contentQueries:function(t,e,n){var r;1&t&&i.Hb(n,i.N,!0),2&t&&i.zc(r=i.cc())&&(e.content=r.first)},viewQuery:function(t,e){var n;1&t&&i.Wc(i.N,!0),2&t&&i.zc(n=i.cc())&&(e.tmpl=n.first)},inputs:{panelClass:["sbPopperClass","panelClass"],hasBackdrop:["sbPopperBackdrop","hasBackdrop"],backdropClass:["sbPopperBackdropClass","backdropClass"]},exportAs:["sbPopper"],decls:1,vars:0,consts:[[1,"sb-popper"],[1,"sb-popper-content"],[3,"ngTemplateOutlet"]],template:function(t,e){1&t&&i.Oc(0,h,3,2,"ng-template")},directives:[d.s],styles:[".sb-popper[_ngcontent-%COMP%]{overflow:hidden;background-color:var(--card-colour);border:1px solid var(--border-colour);border-radius:var(--bdrs)}"],data:{animation:[u]},changeDetection:0}),f)},LBoB:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("4Pxi"),a=n("ZCEf"),s=n("KFdt"),c=n("Qkwj"),u=n("iiuT"),l=n("LqyJ"),d=n("nB6u"),h=n("sPys");e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.findStartPattern=function(t){for(var n=t.getSize(),i=t.getNextSet(0),r=0,o=[0,0,0,0,0,0],a=i,s=!1,c=i;c=0&&t.isRange(Math.max(0,a-(c-a)/2),a,!1))return[a,c,h];a+=o[0]+o[1],o.splice(0,2),o[r-1]=0,o[r]=0,r--}else r++;o[r]=1,s=!s}throw new l.default},e.decodeCode=function(t,n,i){u.default.recordPattern(t,i,n);for(var r=e.MAX_AVG_VARIANCE,o=-1,a=0;a=0)return o;throw new l.default},e.prototype.decodeRow=function(t,n,i){var r,u=i&&!0===i.get(a.default.ASSUME_GS1),f=e.findStartPattern(n),p=f[2],b=0,g=new Uint8Array(20);switch(g[b++]=p,p){case e.CODE_START_A:r=e.CODE_CODE_A;break;case e.CODE_START_B:r=e.CODE_CODE_B;break;case e.CODE_START_C:r=e.CODE_CODE_C;break;default:throw new d.default}for(var m=!1,v=!1,y="",_=f[0],O=f[1],k=[0,0,0,0,0,0],w=0,C=0,T=p,S=0,E=!0,x=!1,P=!1;!m;){var A=v;switch(v=!1,w=C,C=e.decodeCode(n,k,O),g[b++]=C,C!==e.CODE_STOP&&(E=!0),C!==e.CODE_STOP&&(T+=++S*C),_=O,O+=k.reduce((function(t,e){return t+e}),0),C){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new d.default}switch(r){case e.CODE_CODE_A:if(C<64)y+=String.fromCharCode(P===x?" ".charCodeAt(0)+C:" ".charCodeAt(0)+C+128),P=!1;else if(C<96)y+=String.fromCharCode(P===x?C-64:C+64),P=!1;else switch(C!==e.CODE_STOP&&(E=!1),C){case e.CODE_FNC_1:u&&(y+=0===y.length?"]C1":String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!x&&P?(x=!0,P=!1):x&&P?(x=!1,P=!1):P=!0;break;case e.CODE_SHIFT:v=!0,r=e.CODE_CODE_B;break;case e.CODE_CODE_B:r=e.CODE_CODE_B;break;case e.CODE_CODE_C:r=e.CODE_CODE_C;break;case e.CODE_STOP:m=!0}break;case e.CODE_CODE_B:if(C<96)y+=String.fromCharCode(P===x?" ".charCodeAt(0)+C:" ".charCodeAt(0)+C+128),P=!1;else switch(C!==e.CODE_STOP&&(E=!1),C){case e.CODE_FNC_1:u&&(y+=0===y.length?"]C1":String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!x&&P?(x=!0,P=!1):x&&P?(x=!1,P=!1):P=!0;break;case e.CODE_SHIFT:v=!0,r=e.CODE_CODE_A;break;case e.CODE_CODE_A:r=e.CODE_CODE_A;break;case e.CODE_CODE_C:r=e.CODE_CODE_C;break;case e.CODE_STOP:m=!0}break;case e.CODE_CODE_C:if(C<100)C<10&&(y+="0"),y+=C;else switch(C!==e.CODE_STOP&&(E=!1),C){case e.CODE_FNC_1:u&&(y+=0===y.length?"]C1":String.fromCharCode(29));break;case e.CODE_CODE_A:r=e.CODE_CODE_A;break;case e.CODE_CODE_B:r=e.CODE_CODE_B;break;case e.CODE_STOP:m=!0}}A&&(r=r===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var I=O-_;if(O=n.getNextUnset(O),!n.isRange(O,Math.min(n.getSize(),O+(O-_)/2),!1))throw new l.default;if((T-=S*w)%103!==w)throw new h.default;var M=y.length;if(0===M)throw new l.default;M>0&&E&&(y=y.substring(0,r===e.CODE_CODE_C?M-2:M-1));for(var D=(f[1]+f[0])/2,R=_+I/2,j=g.length,L=new Uint8Array(j),N=0;N0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),l=function(t,e){for(var n=0,i=Object.keys(e);n0},t}(),_="undefined"!=typeof WeakMap?new WeakMap:new i,O=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),i=new y(e,n,this);_.set(this,i)};["observe","unobserve","disconnect"].forEach((function(t){O.prototype[t]=function(){var e;return(e=_.get(this))[t].apply(e,arguments)}})),e.a=void 0!==o.ResizeObserver?o.ResizeObserver:O},LbKT:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n,this.pnl=0,this.pnlZero=!1}return w(t,[{key:"ngOnChanges",value:function(){this.renderer.removeClass(this.element.nativeElement,"global__text--accent"),this.renderer.removeClass(this.element.nativeElement,"global__text--warn"),this.renderer.removeClass(this.element.nativeElement,"global__text--link"),this.pnl>0?this.renderer.addClass(this.element.nativeElement,"global__text--accent"):this.pnl<0?this.renderer.addClass(this.element.nativeElement,"global__text--warn"):(this.pnlZero||""===this.pnlZero)&&this.renderer.addClass(this.element.nativeElement,"global__text--link")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","pnl",""]],inputs:{pnl:"pnl",pnlZero:"pnlZero"},features:[i.Ab]}),t}()},LoUP:function(t,e,n){"use strict";n.d(e,"a",(function(){return v})),n.d(e,"b",(function(){return E})),n.d(e,"c",(function(){return x}));var i=n("kZht"),r=n("5XID"),o=n("pTnX"),s=n("jL3B"),u=n("Hq54"),l=n("ZTXN"),d=n("g6G6"),h=n("+6xv"),f=n("An66"),p=["mat-sort-header",""];function b(t,e){if(1&t){var n=i.Vb();i.Ub(0,"div",3),i.bc("@arrowPosition.start",(function(){return i.Ec(n),i.fc()._disableViewStateAnimation=!0}))("@arrowPosition.done",(function(){return i.Ec(n),i.fc()._disableViewStateAnimation=!1})),i.Pb(1,"div",4),i.Ub(2,"div",5),i.Pb(3,"div",6),i.Pb(4,"div",7),i.Pb(5,"div",8),i.Tb(),i.Tb()}if(2&t){var r=i.fc();i.mc("@arrowOpacity",r._getArrowViewState())("@arrowPosition",r._getArrowViewState())("@allowChildren",r._getArrowDirectionState()),i.Cb(2),i.mc("@indicator",r._getArrowDirectionState()),i.Cb(1),i.mc("@leftPointer",r._getArrowDirectionState()),i.Cb(1),i.mc("@rightPointer",r._getArrowDirectionState())}}var g=["*"],m=Object(o.A)(Object(o.y)((function t(){C(this,t)}))),v=function(){var t=function(t){a(n,t);var e=c(n);function n(){var t;return C(this,n),(t=e.apply(this,arguments)).sortables=new Map,t._stateChanges=new l.b,t.start="asc",t._direction="",t.sortChange=new i.o,t}return w(n,[{key:"register",value:function(t){this.sortables.set(t.id,t)}},{key:"deregister",value:function(t){this.sortables.delete(t.id)}},{key:"sort",value:function(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}},{key:"getNextSortDirection",value:function(t){if(!t)return"";var e,n,i,r=(e=t.start||this.start,n=null!=t.disableClear?t.disableClear:this.disableClear,i=["asc","desc"],"desc"==e&&i.reverse(),n||i.push(""),i),o=r.indexOf(this.direction)+1;return o>=r.length&&(o=0),r[o]}},{key:"ngOnInit",value:function(){this._markInitialized()}},{key:"ngOnChanges",value:function(){this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"direction",get:function(){return this._direction},set:function(t){this._direction=t}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=Object(r.c)(t)}}]),n}(m);return t.\u0275fac=function(e){return y(e||t)},t.\u0275dir=i.Jb({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[i.zb,i.Ab]}),t}(),y=i.Wb(v),_=o.b.ENTERING+" "+o.a.STANDARD_CURVE,O={indicator:Object(h.n)("indicator",[Object(h.k)("active-asc, asc",Object(h.l)({transform:"translateY(0px)"})),Object(h.k)("active-desc, desc",Object(h.l)({transform:"translateY(10px)"})),Object(h.m)("active-asc <=> active-desc",Object(h.e)(_))]),leftPointer:Object(h.n)("leftPointer",[Object(h.k)("active-asc, asc",Object(h.l)({transform:"rotate(-45deg)"})),Object(h.k)("active-desc, desc",Object(h.l)({transform:"rotate(45deg)"})),Object(h.m)("active-asc <=> active-desc",Object(h.e)(_))]),rightPointer:Object(h.n)("rightPointer",[Object(h.k)("active-asc, asc",Object(h.l)({transform:"rotate(45deg)"})),Object(h.k)("active-desc, desc",Object(h.l)({transform:"rotate(-45deg)"})),Object(h.m)("active-asc <=> active-desc",Object(h.e)(_))]),arrowOpacity:Object(h.n)("arrowOpacity",[Object(h.k)("desc-to-active, asc-to-active, active",Object(h.l)({opacity:1})),Object(h.k)("desc-to-hint, asc-to-hint, hint",Object(h.l)({opacity:.54})),Object(h.k)("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",Object(h.l)({opacity:0})),Object(h.m)("* => asc, * => desc, * => active, * => hint, * => void",Object(h.e)("0ms")),Object(h.m)("* <=> *",Object(h.e)(_))]),arrowPosition:Object(h.n)("arrowPosition",[Object(h.m)("* => desc-to-hint, * => desc-to-active",Object(h.e)(_,Object(h.h)([Object(h.l)({transform:"translateY(-25%)"}),Object(h.l)({transform:"translateY(0)"})]))),Object(h.m)("* => hint-to-desc, * => active-to-desc",Object(h.e)(_,Object(h.h)([Object(h.l)({transform:"translateY(0)"}),Object(h.l)({transform:"translateY(25%)"})]))),Object(h.m)("* => asc-to-hint, * => asc-to-active",Object(h.e)(_,Object(h.h)([Object(h.l)({transform:"translateY(25%)"}),Object(h.l)({transform:"translateY(0)"})]))),Object(h.m)("* => hint-to-asc, * => active-to-asc",Object(h.e)(_,Object(h.h)([Object(h.l)({transform:"translateY(0)"}),Object(h.l)({transform:"translateY(-25%)"})]))),Object(h.k)("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",Object(h.l)({transform:"translateY(0)"})),Object(h.k)("hint-to-desc, active-to-desc, desc",Object(h.l)({transform:"translateY(-25%)"})),Object(h.k)("hint-to-asc, active-to-asc, asc",Object(h.l)({transform:"translateY(25%)"}))]),allowChildren:Object(h.n)("allowChildren",[Object(h.m)("* <=> *",[Object(h.i)("@*",Object(h.f)(),{optional:!0})])])},k=function(){var t=function t(){C(this,t),this.changes=new l.b,this.sortButtonLabel=function(t){return"Change sorting for "+t}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(i.Kb)({factory:function(){return new t},token:t,providedIn:"root"}),t}(),T={provide:k,deps:[[new i.C,new i.L,k]],useFactory:function(t){return t||new k}},S=Object(o.y)((function t(){C(this,t)})),E=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a,s){var c;return C(this,n),(c=e.call(this))._intl=t,c._sort=r,c._columnDef=o,c._focusMonitor=a,c._elementRef=s,c._showIndicatorHint=!1,c._arrowDirection="",c._disableViewStateAnimation=!1,c.arrowPosition="after",c._rerenderSubscription=Object(d.a)(r.sortChange,r._stateChanges,t.changes).subscribe((function(){c._isSorted()&&c._updateArrowDirection(),!c._isSorted()&&c._viewState&&"active"===c._viewState.toState&&(c._disableViewStateAnimation=!1,c._setAnimationTransitionState({fromState:"active",toState:c._arrowDirection})),i.markForCheck()})),c}return w(n,[{key:"ngOnInit",value:function(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){return t._setIndicatorHintVisible(!!e)}))}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}},{key:"_setIndicatorHintVisible",value:function(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}},{key:"_setAnimationTransitionState",value:function(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}},{key:"_toggleOnInteraction",value:function(){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0);var t=this._isSorted()?{fromState:this._arrowDirection,toState:"active"}:{fromState:"active",toState:this._arrowDirection};this._setAnimationTransitionState(t),this._showIndicatorHint=!1}},{key:"_handleClick",value:function(){this._isDisabled()||this._toggleOnInteraction()}},{key:"_handleKeydown",value:function(t){this._isDisabled()||t.keyCode!==u.m&&t.keyCode!==u.e||(t.preventDefault(),this._toggleOnInteraction())}},{key:"_isSorted",value:function(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}},{key:"_getArrowDirectionState",value:function(){return"".concat(this._isSorted()?"active-":"").concat(this._arrowDirection)}},{key:"_getArrowViewState",value:function(){var t=this._viewState.fromState;return(t?t+"-to-":"")+this._viewState.toState}},{key:"_updateArrowDirection",value:function(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}},{key:"_isDisabled",value:function(){return this._sort.disabled||this.disabled}},{key:"_getAriaSortAttribute",value:function(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}},{key:"_renderArrow",value:function(){return!this._isDisabled()||this._isSorted()}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=Object(r.c)(t)}}]),n}(S);return t.\u0275fac=function(e){return new(e||t)(i.Ob(k),i.Ob(i.h),i.Ob(v,8),i.Ob("MAT_SORT_HEADER_COLUMN_DEF",8),i.Ob(s.h),i.Ob(i.l))},t.\u0275cmp=i.Ib({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,e){1&t&&i.bc("click",(function(){return e._handleClick()}))("keydown",(function(t){return e._handleKeydown(t)}))("mouseenter",(function(){return e._setIndicatorHintVisible(!0)}))("mouseleave",(function(){return e._setIndicatorHintVisible(!1)})),2&t&&(i.Db("aria-sort",e._getAriaSortAttribute()),i.Gb("mat-sort-header-disabled",e._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[i.zb],attrs:p,ngContentSelectors:g,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,e){1&t&&(i.lc(),i.Ub(0,"div",0),i.Ub(1,"div",1),i.kc(2),i.Tb(),i.Oc(3,b,6,6,"div",2),i.Tb()),2&t&&(i.Gb("mat-sort-header-sorted",e._isSorted())("mat-sort-header-position-before","before"==e.arrowPosition),i.Db("tabindex",e._isDisabled()?null:0),i.Cb(3),i.mc("ngIf",e._renderArrow()))},directives:[f.n],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[O.indicator,O.leftPointer,O.rightPointer,O.arrowOpacity,O.arrowPosition,O.allowChildren]},changeDetection:0}),t}(),x=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},providers:[T],imports:[[f.c]]}),t}()},LqyJ:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("w6/c");e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.default)},LxLQ:function(t,e){function n(){this.buffer=[],this.length=0}n.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=n},"M/Eb":function(t,e,n){"use strict";n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"e",(function(){return l})),n.d(e,"a",(function(){return d}));var i=n("og7C"),r=n("TYVA"),o=n("Gbfs"),a=n("pjhv");function s(t){return t.filter((function(t){return t.tradeable&&t.type.includes("futures")}))}function c(t){return t.filter((function(t){return"flexible_futures"!==t.type}))}function u(t){return function(e){return e.filter((function(e){return!t.includes(e.symbol)}))}}function l(t){return t.map((function(t){var e=Object(a.c)(t);return Object.assign(Object.assign({},t),{symbol:t.symbol.toUpperCase(),contractValueTradePrecision:t.contractValueTradePrecision||0,numericPrecision:{short:e,full:e},numericFormat:{short:Object(a.d)(e),full:Object(a.d)(e)}})}))}function d(t){return b(t.reduce((function(t,e){var n=Object(r.u)(e.symbol).parts.currencies,i=n.base,o=n.quote;return t.withMutations((function(t){t.add(i),t.add(o)})).asImmutable()}),Object(i.f)()).asImmutable().toMap().map(o.b).values())}},MRfT:function(t,e,n){"use strict";n.d(e,"a",(function(){return M})),n.d(e,"b",(function(){return P}));var i=n("kZht"),r=n("+6xv"),o=n("ZTXN"),s=n("ENSU"),u=n("An66"),l=["toast-component",""];function d(t,e){if(1&t){var n=i.Vb();i.Ub(0,"button",5),i.bc("click",(function(){return i.Ec(n),i.fc().remove()})),i.Ub(1,"span",6),i.Qc(2,"\xd7"),i.Tb(),i.Tb()}}function h(t,e){if(1&t&&(i.Sb(0),i.Qc(1),i.Rb()),2&t){var n=i.fc(2);i.Cb(1),i.Sc("[",n.duplicatesCount+1,"]")}}function f(t,e){if(1&t&&(i.Ub(0,"div"),i.Qc(1),i.Oc(2,h,2,1,"ng-container",4),i.Tb()),2&t){var n=i.fc();i.Eb(n.options.titleClass),i.Db("aria-label",n.title),i.Cb(1),i.Sc(" ",n.title," "),i.Cb(1),i.mc("ngIf",n.duplicatesCount)}}function b(t,e){if(1&t&&i.Pb(0,"div",7),2&t){var n=i.fc();i.Eb(n.options.messageClass),i.mc("innerHTML",n.message,i.Fc)}}function g(t,e){if(1&t&&(i.Ub(0,"div",8),i.Qc(1),i.Tb()),2&t){var n=i.fc();i.Eb(n.options.messageClass),i.Db("aria-label",n.message),i.Cb(1),i.Sc(" ",n.message," ")}}function m(t,e){if(1&t&&(i.Ub(0,"div"),i.Pb(1,"div",9),i.Tb()),2&t){var n=i.fc();i.Cb(1),i.Lc("width",n.width+"%")}}var v=function(){function t(e,n,i,r,a,s){var c=this;C(this,t),this.toastId=e,this.config=n,this.message=i,this.title=r,this.toastType=a,this.toastRef=s,this._onTap=new o.b,this._onAction=new o.b,this.toastRef.afterClosed().subscribe((function(){c._onAction.complete(),c._onTap.complete()}))}return w(t,[{key:"triggerTap",value:function(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}},{key:"onTap",value:function(){return this._onTap.asObservable()}},{key:"triggerAction",value:function(t){this._onAction.next(t)}},{key:"onAction",value:function(){return this._onAction.asObservable()}}]),t}(),y=new i.s("ToastConfig"),_=function(){function t(e,n){C(this,t),this.component=e,this.injector=n}return w(t,[{key:"attach",value:function(t,e){return this._attachedHost=t,t.attach(this,e)}},{key:"detach",value:function(){var t=this._attachedHost;if(t)return this._attachedHost=void 0,t.detach()}},{key:"setAttachedHost",value:function(t){this._attachedHost=t}},{key:"isAttached",get:function(){return null!=this._attachedHost}}]),t}(),O=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this))._hostDomElement=t,o._componentFactoryResolver=i,o._appRef=r,o}return w(n,[{key:"attachComponentPortal",value:function(t,e){var n,i=this,r=this._componentFactoryResolver.resolveComponentFactory(t.component);return n=r.create(t.injector),this._appRef.attachView(n.hostView),this.setDisposeFn((function(){i._appRef.detachView(n.hostView),n.destroy()})),e?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}},{key:"_getComponentRootNode",value:function(t){return t.hostView.rootNodes[0]}}]),n}(function(){function t(){C(this,t)}return w(t,[{key:"attach",value:function(t,e){return this._attachedPortal=t,this.attachComponentPortal(t,e)}},{key:"detach",value:function(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}},{key:"setDisposeFn",value:function(t){this._disposeFn=t}}]),t}()),k=function(){var t=function(){function t(e){C(this,t),this._document=e}return w(t,[{key:"ngOnDestroy",value:function(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}},{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){var t=this._document.createElement("div");t.classList.add("overlay-container"),this._document.body.appendChild(t),this._containerElement=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(u.d))},t.\u0275prov=Object(i.Kb)({factory:function(){return new t(Object(i.Yb)(u.d))},token:t,providedIn:"root"}),t}(),T=function(){function t(e){C(this,t),this._portalHost=e}return w(t,[{key:"attach",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this._portalHost.attach(t,e)}},{key:"detach",value:function(){return this._portalHost.detach()}}]),t}(),S=function(){var t=function(){function t(e,n,i,r){C(this,t),this._overlayContainer=e,this._componentFactoryResolver=n,this._appRef=i,this._document=r,this._paneElements=new Map}return w(t,[{key:"create",value:function(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}},{key:"getPaneElement",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}},{key:"_createPaneElement",value:function(t,e){var n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}},{key:"_createPortalHost",value:function(t){return new O(t,this._componentFactoryResolver,this._appRef)}},{key:"_createOverlayRef",value:function(t){return new T(this._createPortalHost(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(k),i.Yb(i.j),i.Yb(i.g),i.Yb(u.d))},t.\u0275prov=Object(i.Kb)({factory:function(){return new t(Object(i.Yb)(k),Object(i.Yb)(i.j),Object(i.Yb)(i.g),Object(i.Yb)(u.d))},token:t,providedIn:"root"}),t}(),E=function(){function t(e){C(this,t),this._overlayRef=e,this.duplicatesCount=0,this._afterClosed=new o.b,this._activate=new o.b,this._manualClose=new o.b,this._resetTimeout=new o.b,this._countDuplicate=new o.b}return w(t,[{key:"manualClose",value:function(){this._manualClose.next(),this._manualClose.complete()}},{key:"manualClosed",value:function(){return this._manualClose.asObservable()}},{key:"timeoutReset",value:function(){return this._resetTimeout.asObservable()}},{key:"countDuplicate",value:function(){return this._countDuplicate.asObservable()}},{key:"close",value:function(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}},{key:"afterClosed",value:function(){return this._afterClosed.asObservable()}},{key:"isInactive",value:function(){return this._activate.isStopped}},{key:"activate",value:function(){this._activate.next(),this._activate.complete()}},{key:"afterActivate",value:function(){return this._activate.asObservable()}},{key:"onDuplicate",value:function(t,e){t&&this._resetTimeout.next(),e&&this._countDuplicate.next(++this.duplicatesCount)}}]),t}(),x=function(){function t(e,n){C(this,t),this._toastPackage=e,this._parentInjector=n}return w(t,[{key:"get",value:function(t,e,n){return t===v?this._toastPackage:this._parentInjector.get(t,e,n)}}]),t}(),P=function(){var t=function(){function t(e,n,i,r,o){C(this,t),this.overlay=n,this._injector=i,this.sanitizer=r,this.ngZone=o,this.currentlyActive=0,this.toasts=[],this.index=0,this.toastrConfig=Object.assign(Object.assign({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=Object.assign(Object.assign({},e.default.iconClasses),e.config.iconClasses))}return w(t,[{key:"show",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return this._preBuildNotification(i,t,e,this.applyConfig(n))}},{key:"success",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._preBuildNotification(this.toastrConfig.iconClasses.success||"",t,e,this.applyConfig(n))}},{key:"error",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._preBuildNotification(this.toastrConfig.iconClasses.error||"",t,e,this.applyConfig(n))}},{key:"info",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._preBuildNotification(this.toastrConfig.iconClasses.info||"",t,e,this.applyConfig(n))}},{key:"warning",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._preBuildNotification(this.toastrConfig.iconClasses.warning||"",t,e,this.applyConfig(n))}},{key:"clear",value:function(t){var e,n=p(this.toasts);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(void 0!==t){if(i.toastId===t)return void i.toastRef.manualClose()}else i.toastRef.manualClose()}}catch(r){n.e(r)}finally{n.f()}}},{key:"remove",value:function(t){var e=this._findToast(t);if(!e)return!1;if(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length)return!1;if(this.currentlyActive0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=p(this.toasts);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o.message===e)return o.toastRef.onDuplicate(n,i),o}}catch(a){r.e(a)}finally{r.f()}return null}},{key:"applyConfig",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(Object.assign({},this.toastrConfig),t)}},{key:"_findToast",value:function(t){for(var e=0;e0,this.toastrConfig.countDuplicates);if(e&&this.toastrConfig.preventDuplicates&&null!==o)return o;this.previousToastMessage=e;var a=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(a=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));var s=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;var c=e;e&&r.enableHtml&&(c=this.sanitizer.sanitize(i.K.HTML,e));var u=new E(s),l=new v(this.index,r,c,n,t,u),d=new x(l,this._injector),h=new _(r.toastComponent,d),f=s.attach(h,this.toastrConfig.newestOnTop);u.componentInstance=f.instance;var p={toastId:this.index,message:e||"",toastRef:u,onShown:u.afterActivate(),onHidden:u.afterClosed(),onTap:l.onTap(),onAction:l.onAction(),portal:f};return a||(this.currentlyActive=this.currentlyActive+1,setTimeout((function(){p.toastRef.activate()}))),this.toasts.push(p),p}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(y),i.Yb(S),i.Yb(i.t),i.Yb(s.b),i.Yb(i.B))},t.\u0275prov=Object(i.Kb)({factory:function(){return new t(Object(i.Yb)(y),Object(i.Yb)(S),Object(i.Yb)(i.p),Object(i.Yb)(s.b),Object(i.Yb)(i.B))},token:t,providedIn:"root"}),t}(),A=function(){var t=function(){function t(e,n,i){var r=this;C(this,t),this.toastrService=e,this.toastPackage=n,this.ngZone=i,this.width=-1,this.toastClasses="",this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}},this.message=n.message,this.title=n.title,this.options=n.config,this.originalTimeout=n.config.timeOut,this.toastClasses="".concat(n.toastType," ").concat(n.config.toastClass),this.sub=n.toastRef.afterActivate().subscribe((function(){r.activateToast()})),this.sub1=n.toastRef.manualClosed().subscribe((function(){r.remove()})),this.sub2=n.toastRef.timeoutReset().subscribe((function(){r.resetTimeout()})),this.sub3=n.toastRef.countDuplicate().subscribe((function(t){r.duplicatesCount=t}))}return w(t,[{key:"ngOnDestroy",value:function(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}},{key:"activateToast",value:function(){var t=this;this.state=Object.assign(Object.assign({},this.state),{value:"active"}),!0!==this.options.disableTimeOut&&"timeOut"!==this.options.disableTimeOut&&this.options.timeOut&&(this.outsideTimeout((function(){return t.remove()}),this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval((function(){return t.updateProgress()}),10))}},{key:"updateProgress",value:function(){if(0!==this.width&&100!==this.width&&this.options.timeOut){var t=(new Date).getTime();this.width=(this.hideTime-t)/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}}},{key:"resetTimeout",value:function(){var t=this;clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=Object.assign(Object.assign({},this.state),{value:"active"}),this.outsideTimeout((function(){return t.remove()}),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval((function(){return t.updateProgress()}),10)}},{key:"remove",value:function(){var t=this;"removed"!==this.state.value&&(clearTimeout(this.timeout),this.state=Object.assign(Object.assign({},this.state),{value:"removed"}),this.outsideTimeout((function(){return t.toastrService.remove(t.toastPackage.toastId)}),+this.toastPackage.config.easeTime))}},{key:"tapToast",value:function(){"removed"!==this.state.value&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}},{key:"stickAround",value:function(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}},{key:"delayedHideToast",value:function(){var t=this;!0!==this.options.disableTimeOut&&"extendedTimeOut"!==this.options.disableTimeOut&&0!==this.options.extendedTimeOut&&"removed"!==this.state.value&&(this.outsideTimeout((function(){return t.remove()}),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval((function(){return t.updateProgress()}),10))}},{key:"outsideTimeout",value:function(t,e){var n=this;this.ngZone?this.ngZone.runOutsideAngular((function(){return n.timeout=setTimeout((function(){return n.runInsideAngular(t)}),e)})):this.timeout=setTimeout((function(){return t()}),e)}},{key:"outsideInterval",value:function(t,e){var n=this;this.ngZone?this.ngZone.runOutsideAngular((function(){return n.intervalId=setInterval((function(){return n.runInsideAngular(t)}),e)})):this.intervalId=setInterval((function(){return t()}),e)}},{key:"runInsideAngular",value:function(t){this.ngZone?this.ngZone.run((function(){return t()})):t()}},{key:"displayStyle",get:function(){if("inactive"===this.state.value)return"none"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(P),i.Ob(v),i.Ob(i.B))},t.\u0275cmp=i.Ib({type:t,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(t,e){1&t&&i.bc("click",(function(){return e.tapToast()}))("mouseenter",(function(){return e.stickAround()}))("mouseleave",(function(){return e.delayedHideToast()})),2&t&&(i.Nc("@flyInOut",e.state),i.Eb(e.toastClasses),i.Lc("display",e.displayStyle))},attrs:l,decls:5,vars:5,consts:[["class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alertdialog","aria-live","polite",3,"class","innerHTML",4,"ngIf"],["role","alertdialog","aria-live","polite",3,"class",4,"ngIf"],[4,"ngIf"],["aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alertdialog","aria-live","polite",3,"innerHTML"],["role","alertdialog","aria-live","polite"],[1,"toast-progress"]],template:function(t,e){1&t&&(i.Oc(0,d,3,0,"button",0),i.Oc(1,f,3,5,"div",1),i.Oc(2,b,1,3,"div",2),i.Oc(3,g,2,4,"div",3),i.Oc(4,m,2,2,"div",4)),2&t&&(i.mc("ngIf",e.options.closeButton),i.Cb(1),i.mc("ngIf",e.title),i.Cb(1),i.mc("ngIf",e.message&&e.options.enableHtml),i.Cb(1),i.mc("ngIf",e.message&&!e.options.enableHtml),i.Cb(1),i.mc("ngIf",e.options.progressBar))},directives:[u.n],encapsulation:2,data:{animation:[Object(r.n)("flyInOut",[Object(r.k)("inactive",Object(r.l)({opacity:0})),Object(r.k)("active",Object(r.l)({opacity:1})),Object(r.k)("removed",Object(r.l)({opacity:0})),Object(r.m)("inactive => active",Object(r.e)("{{ easeTime }}ms {{ easing }}")),Object(r.m)("active => removed",Object(r.e)("{{ easeTime }}ms {{ easing }}"))])]}}),t}(),I=Object.assign(Object.assign({},{maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"}),{toastComponent:A}),M=function(){var t=function(){function t(){C(this,t)}return w(t,null,[{key:"forRoot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:t,providers:[{provide:y,useValue:{default:I,config:e}}]}}}]),t}();return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},imports:[[u.c]]}),t}()},MT7k:function(t,e,n){"use strict";n.d(e,"a",(function(){return p})),n.d(e,"g",(function(){return _})),n.d(e,"e",(function(){return O})),n.d(e,"c",(function(){return C})),n.d(e,"d",(function(){return T})),n.d(e,"f",(function(){return S})),n.d(e,"h",(function(){return E})),n.d(e,"b",(function(){return x}));var i=n("zqNl"),r=n("og7C"),o=n("p5wL"),a=n("lx5p"),s=n("1OAy"),c=n("+Px6"),u=n("H0/1"),l=n("rxqU"),d=n("7KkP"),h={trades:[],user:{logs:Object(r.b)(),transfers:[],orders:[],fiatWithdrawals:[],fiatDeposits:[]}},f=Object(i.i)(h,Object(i.k)(s.j,(function(t){return Object(o.b)(h.user,t,"user")})),Object(i.k)(s.p,(function(t,e){var n=e.trades;return Object(o.b)(n,t,"trades")})),Object(i.k)(s.b,(function(t,e){var n=e.trade;return Object(o.b)([n].concat(b(t.trades)).slice(0,100),t,"trades")})),Object(i.k)(s.c,(function(t,e){var n=e.trades;return Object(o.b)([].concat(b(n),b(t.trades)).slice(0,100),t,"trades")})),Object(i.k)(s.m,(function(t,e){var n=e.logs;return Object(o.b)(Object(o.c)(n,"id"),t,"user","logs")})),Object(i.k)(s.a,(function(t,e){var n=e.logs;return Object(o.a)(Object(o.c)(n,"id"),t,"user","logs")})),Object(i.k)(s.o,(function(t,e){var n=e.transfers;return Object(o.b)(n,t,"user","transfers")})),Object(i.k)(s.n,(function(t,e){var n=e.activity;return Object(o.b)(b(n).reverse(),t,"user","orders")})),Object(i.k)(s.l,(function(t,e){var n=e.withdrawals;return Object(o.b)(n,t,"user","fiatWithdrawals")})),Object(i.k)(s.k,(function(t,e){var n=e.deposits;return Object(o.b)(n,t,"user","fiatDeposits")})),Object(i.k)(s.n,(function(t,e){var n=e.activity;return Object(o.b)(n,t,"user","orders")})));function p(t,e){return f(t,e)}var g=Object(i.h)("logs"),m=Object(i.j)(g,Object(a.F)("trades")),v=Object(i.j)(g,Object(a.F)("user")),y=Object(i.j)(v,Object(a.F)("logs")),_=Object(i.j)(v,Object(a.F)("transfers")),O=Object(i.j)(v,Object(a.F)("orders")),k=Object(i.j)(v,(function(t){return t.fiatWithdrawals})),w=Object(i.j)(v,(function(t){return t.fiatDeposits})),C=Object(i.j)(m,c.t,l.r,(function(t,e,n){return t.map(Object(d.g)(n,e.inverse))})),T=Object(i.j)(c.d,c.j,y,(function(t,e,n){return Object(u.b)(n.sortBy(Object(a.F)("id"),a.i)).map((function(n){return Object(u.a)(t,e,n)})).valueSeq().toArray()})),S=Object(i.j)(T,(function(t){return t.filter((function(t){return t.info.includes("trade")}))})),E=Object(i.j)(T,(function(t){return t.filter((function(t){return t.info.includes("cross-exchange transfer")}))})),x=Object(i.j)(k,w,(function(t,e){return e.concat(t).sort((function(t,e){return e.timestamp-t.timestamp}))}))},MUfl:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n("og7C"),r=n("KQpv"),o=n.n(r),a=n("sXtk"),s=n("kZht"),c=o()("trace:app:FeatureService"),u={wsHealth:[],fido2:[],flex:[],createSubAccount:[],transferDestination:[],fusionBanners:[],dltBanners:[]},l=function(){var t=function(){function t(e){C(this,t),this.env=e,this.inited=!1,this.features=Object(i.f)()}return w(t,[{key:"resolveDepsFor",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object(i.f)();c("resolving feature",t,{excluding:n.toArray()});var r=Object(i.f)(u[t]).subtract(n),o=n.merge(r),a=r.reduce((function(t,n){var i=e.resolveDepsFor(n,o);return t.merge(i)}),r);return c("non-existing deps of",t,a.toArray()),a}},{key:"resolveEnvFeatures",value:function(){var t=this;c("resolving all env features:",this.env.featuresEnabled),this.features=this.env.featuresEnabled.reduce((function(e,n){var i=e.add(n),r=t.resolveDepsFor(n,i);return i.merge(r)}),Object(i.f)()),c("features enabled",this.features.toArray()),this.inited=!0}},{key:"isEnabled",value:function(t){return c("checking enabled for",t),this.inited||this.resolveEnvFeatures(),c("enabled?",this.features.has(t)),this.features.has(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Yb(a.a))},t.\u0275prov=s.Kb({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},MiDb:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},MqcE:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("kZht"),r=["sb-menu-heading",""],o=["*"],a=function(){var t=function t(){C(this,t),this._class=!0};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["","sb-menu-heading",""]],hostVars:2,hostBindings:function(t,e){2&t&&i.Gb("sb-menu-heading",e._class)},inputs:{sbIcon:"sbIcon"},exportAs:["sbMenuHeading"],attrs:r,ngContentSelectors:o,decls:1,vars:0,template:function(t,e){1&t&&(i.lc(),i.kc(0))},styles:["[_nghost-%COMP%]{margin:calc(var(--spacing-s, $default-spacing) * -1) calc(var(--spacing-s, $default-spacing) * -1) var(--spacing-s,5px);padding:var(--spacing,5px);color:var(--ghost-colour,currentColor);font-weight:700;text-transform:uppercase;background:var(--toolbar-colour);-webkit-user-select:none;-moz-user-select:none;user-select:none}"],changeDetection:0}),t}()},"ND+C":function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return s}));var i=n("zqNl"),r=Object(i.g)("Set Lite Ticker",Object(i.l)()),o=Object(i.g)("Set Lite Ticker Batch",Object(i.l)()),a=Object(i.g)("Set Ticker",Object(i.l)()),s=Object(i.g)("Set Ticker Batch",Object(i.l)())},NWTG:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("8vcT"),r=n("+luX"),o=n("y1Fj"),a=n("vI0g"),s=n("s/Os"),c=n("L09h"),u=n("TIRN"),l=n("sP54"),d=n("TDnQ"),h=n("IkhO"),f=n("YzW0"),p=n("3xzP"),b=n("a3or"),g=n("XveA"),m=function(){function t(){}return t.calculateMaskPenalty=function(t){return l.default.applyMaskPenaltyRule1(t)+l.default.applyMaskPenaltyRule2(t)+l.default.applyMaskPenaltyRule3(t)+l.default.applyMaskPenaltyRule4(t)},t.encode=function(e,n,a){void 0===a&&(a=null);var s=t.DEFAULT_BYTE_MODE_ENCODING,l=null!==a&&void 0!==a.get(i.default.CHARACTER_SET);l&&(s=a.get(i.default.CHARACTER_SET).toString());var p=this.chooseMode(e,s),b=new r.default;if(p===c.default.BYTE&&(l||t.DEFAULT_BYTE_MODE_ENCODING!==s)){var m=o.default.getCharacterSetECIByName(s);void 0!==m&&this.appendECI(m,b)}this.appendModeInfo(p,b);var v,y=new r.default;if(this.appendBytes(e,p,y,s),null!==a&&void 0!==a.get(i.default.QR_VERSION)){var _=Number.parseInt(a.get(i.default.QR_VERSION).toString(),10);v=u.default.getVersionForNumber(_);var O=this.calculateBitsNeeded(p,b,y,v);if(!this.willFit(O,v,n))throw new g.default("Data too big for requested version")}else v=this.recommendVersion(n,p,b,y);var k=new r.default;k.appendBitArray(b);var w=p===c.default.BYTE?y.getSizeInBytes():e.length;this.appendLengthInfo(w,v,p,k),k.appendBitArray(y);var C=v.getECBlocksForLevel(n),T=v.getTotalCodewords()-C.getTotalECCodewords();this.terminateBits(T,k);var S=this.interleaveWithECBytes(k,v.getTotalCodewords(),T,C.getNumBlocks()),E=new h.default;E.setECLevel(n),E.setMode(p),E.setVersion(v);var x=v.getDimensionForVersion(),P=new d.default(x,x),A=this.chooseMaskPattern(S,n,v,P);return E.setMaskPattern(A),f.default.buildMatrix(S,n,v,A,P),E.setMatrix(P),E},t.recommendVersion=function(t,e,n,i){var r=this.calculateBitsNeeded(e,n,i,u.default.getVersionForNumber(1)),o=this.chooseVersion(r,t),a=this.calculateBitsNeeded(e,n,i,o);return this.chooseVersion(a,t)},t.calculateBitsNeeded=function(t,e,n,i){return e.getSize()+t.getCharacterCountBits(i)+n.getSize()},t.getAlphanumericCode=function(e){return e159)&&(r<224||r>235))return!1}return!0},t.chooseMaskPattern=function(t,e,n,i){for(var r=Number.MAX_SAFE_INTEGER,o=-1,a=0;a=(t+7)/8},t.terminateBits=function(t,e){var n=8*t;if(e.getSize()>n)throw new g.default("data bits cannot fit in the QR Code"+e.getSize()+" > "+n);for(var i=0;i<4&&e.getSize()0)for(i=r;i<8;i++)e.appendBit(!1);var o=t-e.getSizeInBytes();for(i=0;i=n)throw new g.default("Block ID too large");var a=t%n,s=n-a,c=Math.floor(t/n),u=c+1,l=Math.floor(e/n),d=l+1,h=c-l,f=u-d;if(h!==f)throw new g.default("EC bytes mismatch");if(n!==s+a)throw new g.default("RS blocks mismatch");if(t!==(l+h)*s+(d+f)*a)throw new g.default("Total bytes mismatch");i=1<=0&&n<=9},t.appendNumericBytes=function(e,n){for(var i=e.length,r=0;r=33088&&a<=40956?s=a-33088:a>=57408&&a<=60351&&(s=a-49472),-1===s)throw new g.default("Invalid byte sequence");e.appendBits(192*(s>>8)+(255&s),13)}},t.appendECI=function(t,e){e.appendBits(c.default.ECI.getBits(),4),e.appendBits(t.getValue(),8)},t.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),t.DEFAULT_BYTE_MODE_ENCODING=o.default.UTF8.getName(),t}();e.default=m},NgZA:function(t,e,n){"use strict";var i={single_source_shortest_paths:function(t,e,n){var r={},o={};o[e]=0;var a,s,c,u,l,d,h=i.PriorityQueue.make();for(h.push(e,0);!h.empty();)for(c in u=(a=h.pop()).cost,l=t[s=a.value]||{})l.hasOwnProperty(c)&&(d=u+l[c],(void 0===o[c]||o[c]>d)&&(o[c]=d,h.push(c,d),r[c]=s));if(void 0!==n&&void 0===o[n]){var f=["Could not find a path from ",e," to ",n,"."].join("");throw new Error(f)}return r},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],i=e;i;)n.push(i),i=t[i];return n.reverse(),n},find_path:function(t,e,n){var r=i.single_source_shortest_paths(t,e,n);return i.extract_shortest_path_from_predecessor_list(r,n)},PriorityQueue:{make:function(t){var e,n=i.PriorityQueue,r={};for(e in t=t||{},n)n.hasOwnProperty(e)&&(r[e]=n[e]);return r.queue=[],r.sorter=t.sorter||n.default_sorter,r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){this.queue.push({value:t,cost:e}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=i},Ngp4:function(t,e,n){"use strict";n.d(e,"a",(function(){return J}));var i=n("zqNl"),r=n("YtkY"),o=n("HM3f"),a=n("lx5p"),s=n("uJYd"),c=n("lE9u"),u=n("rxqU"),l=n("+Px6"),d=n("J/3c"),h=n("sXtk"),f=n("kZht"),p=n("An66"),b=n("NxuZ"),g=n("1etq"),v=n("FQF6"),y=n("TMzY"),_=n("UVqw"),O=n("Eu46"),k=n("anSm"),T=n("oiza"),S=n("IkSM"),E=n("B6Vo"),x=n("Cc4E"),P=n("zho4"),A=n("yPvj"),I=n("1o0v"),M=n("LbKT"),D=n("+I9z"),R=n("/dWT"),j=n("7J2L"),L=n("aDqW"),N=n("fvDn"),U=n("DpwM"),F=n("rUBT");function B(t,e){1&t&&(f.Ub(0,"section",4),f.Pb(1,"fa-icon",5),f.Ub(2,"h2",6),f.Qc(3),f.gc(4,"translate"),f.Tb(),f.Tb()),2&t&&(f.Cb(3),f.Sc("",f.hc(4,1,"DASHBOARD.AUTHMASK"),"."))}function z(t,e){1&t&&(f.Sb(0),f.Pb(1,"flex-wallet"),f.Rb())}var V=function(){return[250,100]};function H(t,e){if(1&t){var n=f.Vb();f.Ub(0,"fa-icon",29),f.bc("click",(function(){f.Ec(n);var t=f.fc().$implicit;return f.fc(4).openWalletTransactionDialog("deposit",t)})),f.gc(1,"async"),f.Tb()}if(2&t){var i=f.fc(2).ngLet,r=f.fc(3);f.mc("sbDisabled",!i)("sbDelay",f.qc(5,V))("hidden",f.hc(1,3,r.isSubAccount$))}}var q=function(t){return{currency:t}};function $(t,e){if(1&t){var n=f.Vb();f.Ub(0,"section",14),f.Ub(1,"div",15),f.Ub(2,"p",16),f.Qc(3),f.gc(4,"translate"),f.gc(5,"cryptoName"),f.Tb(),f.Tb(),f.Ub(6,"div",17),f.Pb(7,"market-icon",18),f.Ub(8,"p",19),f.Qc(9),f.gc(10,"translate"),f.gc(11,"cryptoName"),f.Tb(),f.Ub(12,"p",20),f.Qc(13),f.gc(14,"translate"),f.Tb(),f.Tb(),f.Ub(15,"div",21),f.Pb(16,"market-icon",18),f.Tb(),f.Ub(17,"div",22),f.Ub(18,"span",23),f.Qc(19),f.gc(20,"cryptoPrecise"),f.Tb(),f.Tb(),f.Ub(21,"div",24),f.Ub(22,"span",25),f.Qc(23),f.gc(24,"crypto"),f.Tb(),f.Tb(),f.Ub(25,"div",26),f.Oc(26,H,2,6,"fa-icon",27),f.Ub(27,"fa-icon",28),f.bc("click",(function(){f.Ec(n);var t=e.$implicit;return f.fc(4).openWalletTransactionDialog("crypto-transfer",t)})),f.Tb(),f.Tb(),f.Tb()}if(2&t){var i=e.$implicit,r=f.fc().ngLet,o=f.fc(3);f.Cb(2),f.mc("sbDisabled",!r)("sbDelay",f.qc(32,V)),f.Cb(1),f.Sc(" ",f.ic(4,14,"LABEL.X_HOLDING_WALLET",f.rc(33,q,f.hc(5,17,i.name)))," "),f.Cb(4),f.mc("base",i.name),f.Cb(1),f.mc("sbDisabled",!r)("sbDelay",f.qc(35,V)),f.Cb(1),f.Sc(" ",f.ic(10,19,"LABEL.X_HOLDING_WALLET",f.rc(36,q,f.hc(11,22,i.name)))," "),f.Cb(4),f.Rc(f.hc(14,24,"WALLETS.HOLDING.SHORT_DESCRIPTION")),f.Cb(3),f.mc("base",i.name),f.Cb(3),f.Sc(" ",f.ic(20,26,i.balance||0,i.name)," "),f.Cb(4),f.Sc("\u2248 ",f.ic(24,29,i.notional,"usd")," USD"),f.Cb(3),f.mc("ngIf",!o.demo),f.Cb(1),f.mc("sbDisabled",!r)("sbDelay",f.qc(38,V))}}var Q=function(t){return{pair:t}};function W(t,e){if(1&t){var n=f.Vb();f.Ub(0,"section",30),f.Ub(1,"div",15),f.Ub(2,"p",31),f.Qc(3),f.gc(4,"translate"),f.gc(5,"pair"),f.Tb(),f.Tb(),f.Ub(6,"div",17),f.Pb(7,"market-icon",32),f.gc(8,"pair"),f.Ub(9,"p",33),f.Qc(10),f.gc(11,"translate"),f.gc(12,"pair"),f.Tb(),f.Ub(13,"p",20),f.Qc(14),f.gc(15,"translate"),f.gc(16,"pair"),f.Tb(),f.Tb(),f.Ub(17,"div",21),f.Pb(18,"market-icon",32),f.gc(19,"pair"),f.Tb(),f.Ub(20,"div",22),f.Ub(21,"span",34),f.Pb(22,"ghost-trail",35),f.gc(23,"cryptoPrecise"),f.Tb(),f.Tb(),f.Ub(24,"div",24),f.Ub(25,"span",25),f.Qc(26),f.gc(27,"crypto"),f.Tb(),f.Tb(),f.Ub(28,"div",26),f.Ub(29,"fa-icon",36),f.bc("click",(function(){f.Ec(n);var t=e.$implicit;return f.fc(4).openWalletDetailsDialog(t)})),f.Tb(),f.Ub(30,"fa-icon",37),f.bc("click",(function(){f.Ec(n);var t=e.$implicit;return f.fc(4).openWalletTransactionDialog("crypto-transfer",t)})),f.Tb(),f.Tb(),f.Tb()}if(2&t){var i=e.$implicit,r=f.fc().ngLet;f.Cb(2),f.mc("sbDisabled",!r)("sbDelay",f.qc(41,V)),f.Cb(1),f.Sc(" ",f.ic(4,16,"LABEL.X_FUTURES_WALLET",f.rc(42,Q,f.hc(5,19,i.pair)))," "),f.Cb(4),f.mc("pair",f.hc(8,21,i.pair)),f.Cb(2),f.mc("sbDisabled",!r)("sbDelay",f.qc(44,V)),f.Cb(1),f.Sc(" ",f.ic(11,23,"LABEL.X_FUTURES_WALLET",f.rc(45,Q,f.hc(12,26,i.pair)))," "),f.Cb(4),f.Sc(" ",f.ic(15,28,"WALLETS.FUTURES.SHORT_DESCRIPTION",f.rc(47,Q,f.hc(16,31,i.pair)))," "),f.Cb(4),f.mc("pair",f.hc(19,33,i.pair)),f.Cb(3),f.mc("pnl",i.am),f.Cb(1),f.mc("content",f.ic(23,35,i.am||0,i.currency)),f.Cb(4),f.Sc("\u2248 ",f.ic(27,38,i.amNotional,"usd")," USD"),f.Cb(3),f.mc("sbDisabled",!r)("sbDelay",f.qc(49,V)),f.Cb(1),f.mc("sbDisabled",!r)("sbDelay",f.qc(50,V))}}function G(t,e){if(1&t&&(f.Ub(0,"section",11),f.Oc(1,$,28,39,"section",12),f.gc(2,"async"),f.Oc(3,W,31,51,"section",13),f.gc(4,"async"),f.Tb()),2&t){var n=f.fc(3);f.Cb(1),f.mc("ngIf",f.hc(2,2,n.selectedHoldingWallet$)),f.Cb(2),f.mc("ngIf",f.hc(4,4,n.selectedFuturesWallet$))}}function Y(t,e){if(1&t&&(f.Ub(0,"section",38),f.Pb(1,"margin-details-list",39),f.gc(2,"async"),f.gc(3,"async"),f.Tb()),2&t){var n=f.fc(3);f.Cb(1),f.mc("displayTooltips",f.hc(2,2,n.displayTooltips$))("wallet",f.hc(3,4,n.selectedFuturesWallet$))}}function K(t,e){if(1&t&&(f.Ub(0,"section",8),f.Oc(1,G,5,6,"section",9),f.gc(2,"async"),f.Oc(3,Y,4,6,"section",10),f.gc(4,"async"),f.Tb()),2&t){var n=f.fc(2);f.Cb(1),f.mc("ngLet",f.hc(2,2,n.displayTooltips$)),f.Cb(2),f.mc("ngIf",f.hc(4,4,n.signedIn$))}}function Z(t,e){if(1&t&&(f.Oc(0,K,5,6,"section",7),f.gc(1,"async")),2&t){var n=f.fc(),i=f.Ac(8);f.mc("ngIf",f.hc(1,2,n.loaded$))("ngIfElse",i)}}function X(t,e){1&t&&f.Pb(0,"kraken-loading")}var J=function(){var t=function(){function t(e,n){C(this,t),this.store=e,this.env=n,this.signedIn$=this.store.pipe(Object(i.m)(u.m)),this.details$=this.store.pipe(Object(i.m)(u.d)),this.mSelectedHoldingWallet$=this.store.pipe(Object(i.m)(d.o)),this.selectedHoldingWallet$=this.mSelectedHoldingWallet$.pipe(Object(r.a)(a.O)),this.selectedFuturesWallet$=this.store.pipe(Object(i.m)(d.n)),this.walletFundingDetails$=this.store.pipe(Object(i.m)(d.q)),this.isSubAccount$=this.store.pipe(Object(i.m)(u.n)),this.displayTooltips$=this.store.pipe(Object(i.m)(u.y)),this.flexWallet$=this.store.pipe(Object(i.m)(d.l)),this.isFlexMarket$=this.store.pipe(Object(i.m)(l.a)),this.loaded$=Object(o.a)([this.signedIn$,this.mSelectedHoldingWallet$,this.selectedFuturesWallet$,this.flexWallet$,this.isFlexMarket$]).pipe(Object(r.a)((function(t){var e=m(t,5),n=e[0],i=e[1],r=e[2],o=e[3],a=e[4];return!n||(a?!!o:i.isSome()&&r)})))}return w(t,[{key:"openWalletDetailsDialog",value:function(t){this.store.dispatch(Object(c.j)({wallet:t}))}},{key:"openWalletTransactionDialog",value:function(t,e){this.store.dispatch(Object(s.g)({name:"wallet-transaction",inputs:{type:t,originWallet:e}}))}},{key:"demo",get:function(){return this.env.demo}}]),t}();return t.\u0275fac=function(e){return new(e||t)(f.Ob(i.b),f.Ob(h.a))},t.\u0275cmp=f.Ib({type:t,selectors:[["pair-wallet"]],decls:9,vars:9,consts:[["class","global__auth-mask",4,"ngIf"],[4,"ngIf","ngIfElse"],["futuresWallet",""],["loading",""],[1,"global__auth-mask"],["icon","stop","size","2x"],["subheading","",1,"global__text--warn"],["class","container","orientation","","breakpoint","",4,"ngIf","ngIfElse"],["orientation","","breakpoint","",1,"container"],["class","wallets",4,"ngLet"],["class","margin-details",4,"ngIf"],[1,"wallets"],["body","","class","wallet holding",4,"ngIf"],["body","","class","wallet",4,"ngIf"],["body","",1,"wallet","holding"],[1,"name"],["uppercase","","tooltip","","sbTooltip","TOOLTIP.HOLDING_WALLET",3,"sbDisabled","sbDelay"],[1,"grid-tri-left","gap-xs-m","large-name"],[3,"base"],["subheading","","tooltip","","sbTooltip","TOOLTIP.HOLDING_WALLET",3,"sbDisabled","sbDelay"],["ghost","",1,"description"],[1,"icon"],[1,"balance"],["subheading",""],[1,"estimate"],["body","","ghost",""],[1,"buttons"],["icon","deposit","size","2x","tooltip","","sbTooltip","TOOLTIP.HOLDING_DEPOSIT",3,"sbDisabled","sbDelay","hidden","click",4,"ngIf"],["icon","transfer","size","2x","tooltip","","sbTooltip","TOOLTIP.HOLDING_TRANSFER",3,"sbDisabled","sbDelay","click"],["icon","deposit","size","2x","tooltip","","sbTooltip","TOOLTIP.HOLDING_DEPOSIT",3,"sbDisabled","sbDelay","hidden","click"],["body","",1,"wallet"],["uppercase","","tooltip","","sbTooltip","TOOLTIP.FUTURES_WALLET",3,"sbDisabled","sbDelay"],[3,"pair"],["subheading","","tooltip","","sbTooltip","TOOLTIP.FUTURES_WALLET",3,"sbDisabled","sbDelay"],["subheading","","pnlZero","",3,"pnl"],[3,"content"],["icon","info","size","2x","tooltip","","sbTooltip","TOOLTIP.WALLET_DETAILS",3,"sbDisabled","sbDelay","click"],["icon","transfer","size","2x","tooltip","","sbTooltip","TOOLTIP.WALLET_TRANSFER",3,"sbDisabled","sbDelay","click"],[1,"margin-details"],[3,"displayTooltips","wallet"]],template:function(t,e){if(1&t&&(f.Oc(0,B,5,3,"section",0),f.gc(1,"async"),f.Oc(2,z,2,0,"ng-container",1),f.gc(3,"async"),f.gc(4,"async"),f.Oc(5,Z,2,4,"ng-template",null,2,f.Pc),f.Oc(7,X,1,0,"ng-template",null,3,f.Pc)),2&t){var n=f.Ac(6);f.mc("ngIf",!1===f.hc(1,3,e.signedIn$)),f.Cb(2),f.mc("ngIf",f.hc(3,5,e.signedIn$)&&f.hc(4,7,e.isFlexMarket$))("ngIfElse",n)}},directives:[p.n,b.b,g.a,v.a,y.a,_.a,O.a,k.a,T.a,S.a,E.a,x.a,P.a,A.a,I.a,M.a,D.a,R.a,j.a],pipes:[p.b,L.d,N.b,U.b,U.a,F.e],styles:['[_nghost-%COMP%]{position:relative}.container[_ngcontent-%COMP%], [_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.container[_ngcontent-%COMP%]{width:100%;padding:var(--spacing)}.container[orientation=horizontal][_ngcontent-%COMP%]{flex-direction:row}.container[orientation=horizontal][breakpoint=small][_ngcontent-%COMP%]{flex-direction:row;align-items:center}.container[orientation=horizontal][breakpoint=large][_ngcontent-%COMP%]{background-image:url(public/wallet-footer.a2924fe61c02e97dfd30.png);background-size:50%;background-repeat:no-repeat;background-position:115% 100%}.margin-details[_ngcontent-%COMP%]{flex:1;flex-direction:row;padding:var(--spacing) 0}[orientation=horizontal][_ngcontent-%COMP%] .margin-details[_ngcontent-%COMP%]{padding:var(--spacing) 0 0 var(--spacing);margin-left:var(--spacing);border-left:1px solid var(--border-colour)}[orientation=horizontal][breakpoint=small][_ngcontent-%COMP%] .margin-details[_ngcontent-%COMP%]{display:none!important}[orientation=vertical][_ngcontent-%COMP%] .margin-details[_ngcontent-%COMP%]{border-top:1px solid var(--border-colour);padding-top:var(--spacing-l)}.wallets[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:var(--spacing);min-width:250px}[orientation=horizontal][breakpoint=small][_ngcontent-%COMP%] .wallets[_ngcontent-%COMP%]{flex:1}[orientation=horizontal][breakpoint=large][_ngcontent-%COMP%] .wallets[_ngcontent-%COMP%], [orientation=horizontal][breakpoint=medium][_ngcontent-%COMP%] .wallets[_ngcontent-%COMP%]{flex:0.75}.wallet[_ngcontent-%COMP%]{display:grid;grid-template-areas:"name name name" "icon balance buttons" "icon estimate buttons";grid-template-columns:50px 1fr .75fr;grid-template-rows:25px 14px 16px;grid-gap:0 var(--spacing);padding:var(--spacing) 0}.wallet[_ngcontent-%COMP%]:first-child{border-bottom:1px solid var(--border-colour);padding-bottom:var(--spacing-l)!important}[orientation=horizontal][breakpoint=large][_ngcontent-%COMP%] .wallet[_ngcontent-%COMP%]{grid-template-areas:"name name" "balance buttons" "estimate buttons";grid-template-columns:1fr 1fr;grid-template-rows:auto 14px 16px;padding:var(--spacing-l) var(--spacing)}[orientation=horizontal][breakpoint=small][_ngcontent-%COMP%] .wallet[_ngcontent-%COMP%]{padding:var(--spacing-s)}[orientation=horizontal][breakpoint=small][_ngcontent-%COMP%] .wallet[_ngcontent-%COMP%]:not(:first-child){margin-top:var(--spacing)}.wallet[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;align-self:center}[orientation=horizontal][breakpoint=large][_ngcontent-%COMP%] .wallet[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:none}.wallet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name}[orientation=horizontal][breakpoint=large][_ngcontent-%COMP%] .wallet[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:none}.wallet[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.2}.wallet[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{grid-area:buttons;align-self:center;text-align:right}.wallet[_ngcontent-%COMP%] .balance[_ngcontent-%COMP%]{grid-area:balance;align-self:flex-end}.wallet[_ngcontent-%COMP%] .estimate[_ngcontent-%COMP%]{grid-area:estimate;align-self:flex-end}.wallet.holding[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{text-align:center}.wallet[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:14px;cursor:pointer}.wallet[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]:not(:last-child){padding-right:var(--spacing-l)}.wallet[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{font-size:28px}.wallet[_ngcontent-%COMP%] .large-name[_ngcontent-%COMP%]{padding-bottom:var(--spacing-l);grid-area:name}[orientation=horizontal][breakpoint=medium][_ngcontent-%COMP%] .wallet[_ngcontent-%COMP%] .large-name[_ngcontent-%COMP%], [orientation=horizontal][breakpoint=small][_ngcontent-%COMP%] .wallet[_ngcontent-%COMP%] .large-name[_ngcontent-%COMP%], [orientation=vertical][_ngcontent-%COMP%] .wallet[_ngcontent-%COMP%] .large-name[_ngcontent-%COMP%]{display:none}.caption[_ngcontent-%COMP%]{padding-bottom:var(--spacing)}.caption[_ngcontent-%COMP%], button[_ngcontent-%COMP%]{padding-top:var(--spacing-s)}button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%] svg{vertical-align:-25%}'],changeDetection:0}),t}()},Nhx6:function(t,e,n){"use strict";function i(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),i(n("13Sj")),i(n("J180")),i(n("pRbe")),i(n("lFJA")),i(n("4x5s")),i(n("4S8q")),i(n("t+Fc")),i(n("bSqp"));var r=n("ekTi");e.ArgumentException=r.default;var o=n("hTBg");e.ArithmeticException=o.default;var a=n("sPys");e.ChecksumException=a.default;var s=n("w6/c");e.Exception=s.default;var c=n("nB6u");e.FormatException=c.default;var u=n("oznm");e.IllegalArgumentException=u.default;var l=n("FoZF");e.IllegalStateException=l.default;var d=n("LqyJ");e.NotFoundException=d.default;var h=n("35XV");e.ReaderException=h.default;var f=n("uQul");e.ReedSolomonException=f.default;var p=n("2gaf");e.UnsupportedOperationException=p.default;var b=n("XveA");e.WriterException=b.default;var g=n("4Pxi");e.BarcodeFormat=g.default;var m=n("XQH8");e.Binarizer=m.default;var v=n("s92m");e.BinaryBitmap=v.default;var y=n("ZCEf");e.DecodeHintType=y.default;var _=n("unaY");e.InvertedLuminanceSource=_.default;var O=n("qvG1");e.LuminanceSource=O.default;var k=n("6oIa");e.MultiFormatReader=k.default;var w=n("EnH0");e.MultiFormatWriter=w.default;var C=n("XrPM");e.PlanarYUVLuminanceSource=C.default;var T=n("KFdt");e.Result=T.default;var S=n("xSUO");e.ResultMetadataType=S.default;var E=n("vc4l");e.RGBLuminanceSource=E.default;var x=n("+luX");e.BitArray=x.default;var P=n("q+cW");e.BitMatrix=P.default;var A=n("lcP6");e.BitSource=A.default;var I=n("y1Fj");e.CharacterSetECI=I.default;var M=n("SnIc");e.DecoderResult=M.default;var D=n("2rk/");e.DefaultGridSampler=D.default;var R=n("qArU");e.DetectorResult=R.default;var j=n("8vcT");e.EncodeHintType=j.default;var L=n("neWc");e.GlobalHistogramBinarizer=L.default;var N=n("qAUu");e.GridSampler=N.default;var U=n("e9V9");e.GridSamplerInstance=U.default;var F=n("XOQS");e.HybridBinarizer=F.default;var B=n("9GlW");e.PerspectiveTransform=B.default;var z=n("PDjX");e.StringUtils=z.default;var V=n("dyLe");e.MathUtils=V.default;var H=n("va0y");e.WhiteRectangleDetector=H.default;var q=n("vI0g");e.GenericGF=q.default;var $=n("YwYi");e.GenericGFPoly=$.default;var Q=n("oCyE");e.ReedSolomonDecoder=Q.default;var W=n("s/Os");e.ReedSolomonEncoder=W.default;var G=n("ldwH");e.DataMatrixReader=G.default;var Y=n("4f9k");e.QRCodeReader=Y.default;var K=n("oggm");e.QRCodeWriter=K.default;var Z=n("FEHI");e.QRCodeDecoderErrorCorrectionLevel=Z.default;var X=n("NWTG");e.QRCodeEncoder=X.default;var J=n("IkhO");e.QRCodeEncoderQRCode=J.default;var tt=n("iiuT");e.OneDReader=tt.default;var et=n("aEDl");e.EAN13Reader=et.default;var nt=n("LBoB");e.Code128Reader=nt.default;var it=n("2Agw");e.ITFReader=it.default;var rt=n("YrFw");e.Code39Reader=rt.default;var ot=n("S21V");e.RSS14Reader=ot.default;var at=n("uepk");e.MultiformatReader=at.default},NloN:function(t,e,n){"use strict";function i(t,e){var n=URL.createObjectURL(t),i=document.createElement("a");i.setAttribute("download",e),i.href=n,document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout((function(){return URL.revokeObjectURL(n)}),1e3)}function r(t){return new Promise((function(e){return t.toBlob((function(t){return e(t)}))}))}function o(t,e){performance.mark(t+"-start");var n=e();return performance.mark(t+"-end"),performance.measure(""+t,t+"-start",t+"-end"),n}function a(t){var e=new URL(window.location.href);e.searchParams.has(t)&&(e.searchParams.delete(t),window.history.replaceState(null,document.title,e.toString()))}function s(t,e){localStorage.setItem(t,JSON.stringify(e))}function c(t,e){if(!function(t){return null!==localStorage.getItem(t)}(t))return e;try{return JSON.parse(localStorage.getItem(t))}catch(n){return e}}n.d(e,"f",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return c})),Error},NxuZ:function(t,e,n){"use strict";n.d(e,"a",(function(){return Tt})),n.d(e,"b",(function(){return xt})),n.d(e,"c",(function(){return St})),n.d(e,"d",(function(){return Pt}));var i=n("kZht"),r=n("ENSU");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){for(var e=1;e0;)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return e}function G(t){return"".concat(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function Y(t){return Object.keys(t||{}).reduce((function(e,n){return e+"".concat(n,": ").concat(t[n],";")}),"")}function K(t){return t.size!==Q.size||t.x!==Q.x||t.y!==Q.y||t.rotate!==Q.rotate||t.flipX||t.flipY}function Z(t){var e=t.transform,n=t.iconWidth,i={transform:"translate(".concat(t.containerWidth/2," 256)")},r="translate(".concat(32*e.x,", ").concat(32*e.y,") "),o="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),a="rotate(".concat(e.rotate," 0 0)");return{outer:i,inner:{transform:"".concat(r," ").concat(o," ").concat(a)},path:{transform:"translate(".concat(n/2*-1," -256)")}}}var X={x:0,y:0,width:"100%",height:"100%"};function J(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function tt(t){var e=t.icons,n=e.main,i=e.mask,r=t.prefix,o=t.iconName,a=t.transform,c=t.symbol,u=t.title,l=t.maskId,d=t.titleId,h=t.extra,f=t.watchable,p=void 0!==f&&f,b=i.found?i:n,g=b.width,m=b.height,v="fa-w-".concat(Math.ceil(g/m*16)),y=[T.replacementClass,o?"".concat(T.familyPrefix,"-").concat(o):"",v].filter((function(t){return-1===h.classes.indexOf(t)})).concat(h.classes).join(" "),_={children:[],attributes:s({},h.attributes,{"data-prefix":r,"data-icon":o,class:y,role:h.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(g," ").concat(m)})};p&&(_.attributes["data-fa-i2svg"]=""),u&&_.children.push({tag:"title",attributes:{id:_.attributes["aria-labelledby"]||"title-".concat(d||W())},children:[u]});var O=s({},_,{prefix:r,iconName:o,main:n,mask:i,maskId:l,transform:a,symbol:c,styles:h.styles}),k=i.found&&n.found?function(t){var e,n=t.children,i=t.attributes,r=t.main,o=t.mask,a=t.maskId,c=r.icon,u=o.icon,l=Z({transform:t.transform,containerWidth:o.width,iconWidth:r.width}),d={tag:"rect",attributes:s({},X,{fill:"white"})},h=c.children?{children:c.children.map(J)}:{},f={tag:"g",attributes:s({},l.inner),children:[J(s({tag:c.tag,attributes:s({},c.attributes,l.path)},h))]},p={tag:"g",attributes:s({},l.outer),children:[f]},b="mask-".concat(a||W()),g="clip-".concat(a||W()),m={tag:"mask",attributes:s({},X,{id:b,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[d,p]},v={tag:"defs",children:[{tag:"clipPath",attributes:{id:g},children:(e=u,"g"===e.tag?e.children:[e])},m]};return n.push(v,{tag:"rect",attributes:s({fill:"currentColor","clip-path":"url(#".concat(g,")"),mask:"url(#".concat(b,")")},X)}),{children:n,attributes:i}}(O):function(t){var e=t.children,n=t.attributes,i=t.main,r=t.transform,o=Y(t.styles);if(o.length>0&&(n.style=o),K(r)){var a=Z({transform:r,containerWidth:i.width,iconWidth:i.width});e.push({tag:"g",attributes:s({},a.outer),children:[{tag:"g",attributes:s({},a.inner),children:[{tag:i.icon.tag,children:i.icon.children,attributes:s({},i.icon.attributes,a.path)}]}]})}else e.push(i.icon);return{children:e,attributes:n}}(O),w=k.attributes;return O.children=k.children,O.attributes=w,c?function(t){var e=t.iconName,n=t.children,i=t.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:s({},t.attributes,{id:!0===i?"".concat(t.prefix,"-").concat(T.familyPrefix,"-").concat(e):i}),children:n}]}]}(O):function(t){var e=t.children,n=t.main,i=t.mask,r=t.attributes,o=t.styles,a=t.transform;if(K(a)&&n.found&&!i.found){var c={x:n.width/n.height/2,y:.5};r.style=Y(s({},o,{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:r,children:e}]}(O)}var et=function(t,e,n,i){var r,o,a,s=Object.keys(t),c=s.length,u=void 0!==i?function(t,e){return function(n,i,r,o){return t.call(e,n,i,r,o)}}(e,i):e;for(void 0===n?(r=1,a=t[s[0]]):(r=0,a=n);r2&&void 0!==arguments[2]?arguments[2]:{},i=n.skipHooks,r=void 0!==i&&i,o=Object.keys(e).reduce((function(t,n){var i=e[n];return i.icon?t[i.iconName]=i.icon:t[n]=i,t}),{});"function"!=typeof E.hooks.addPack||r?E.styles[t]=s({},E.styles[t]||{},o):E.hooks.addPack(t,o),"fas"===t&&nt("fa",e)}var it=E.styles,rt=E.shims,ot=function(){var t=function(t){return et(it,(function(e,n,i){return e[i]=et(n,t,{}),e}),{})};t((function(t,e,n){return e[3]&&(t[e[3]]=n),t})),t((function(t,e,n){var i=e[2];return t[n]=n,i.forEach((function(e){t[e]=n})),t}));var e="far"in it;et(rt,(function(t,n){var i=n[1];return"far"!==i||e||(i="fas"),t[n[0]]={prefix:i,iconName:n[2]},t}),{})};function at(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}function st(t){var e=t.tag,n=t.attributes,i=void 0===n?{}:n,r=t.children,o=void 0===r?[]:r;return"string"==typeof t?G(t):"<".concat(e," ").concat(function(t){return Object.keys(t||{}).reduce((function(e,n){return e+"".concat(n,'="').concat(G(t[n]),'" ')}),"").trim()}(i),">").concat(o.map(st).join(""),"")}function ct(t){this.name="MissingIcon",this.message=t||"Icon unavailable",this.stack=(new Error).stack}ot(),(ct.prototype=Object.create(Error.prototype)).constructor=ct;var ut={fill:"currentColor"},lt={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},dt=(s({},ut,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"}),s({},lt,{attributeName:"opacity"}));function ht(t){var e=t[0],n=t[1],i=c(t.slice(4),1)[0];return{found:!0,width:e,height:n,icon:Array.isArray(i)?{tag:"g",attributes:{class:"".concat(T.familyPrefix,"-").concat(_.GROUP)},children:[{tag:"path",attributes:{class:"".concat(T.familyPrefix,"-").concat(_.SECONDARY),fill:"currentColor",d:i[0]}},{tag:"path",attributes:{class:"".concat(T.familyPrefix,"-").concat(_.PRIMARY),fill:"currentColor",d:i[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:i}}}}function ft(){T.autoAddCss&&!wt&&(function(t){if(t&&m){var e=g.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;for(var n=g.head.childNodes,i=null,r=n.length-1;r>-1;r--){var o=n[r],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(i=o)}g.head.insertBefore(e,i)}}(function(){var t="svg-inline--fa",e=T.familyPrefix,n=T.replacementClass,i='svg:not(:root).svg-inline--fa {\n overflow: visible;\n}\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-border {\n height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n width: 2em;\n}\n.svg-inline--fa.fa-fw {\n width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: 0.25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-lg {\n font-size: 1.3333333333em;\n line-height: 0.75em;\n vertical-align: -0.0667em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit;\n}\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: 0.1em;\n padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n float: left;\n}\n\n.fa-pull-right {\n float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: 0.3em;\n}\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n -webkit-filter: none;\n filter: none;\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: #fff;\n}\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse {\n color: #fff;\n}';if("fa"!==e||n!==t){var r=new RegExp("\\.".concat("fa","\\-"),"g"),o=new RegExp("\\--".concat("fa","\\-"),"g"),a=new RegExp("\\.".concat(t),"g");i=i.replace(r,".".concat(e,"-")).replace(o,"--".concat(e,"-")).replace(a,".".concat(n))}return i}()),wt=!0)}function pt(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map((function(t){return st(t)}))}}),Object.defineProperty(t,"node",{get:function(){if(m){var e=g.createElement("div");return e.innerHTML=t.html,e.children}}}),t}function bt(t){var e=t.prefix,n=void 0===e?"fa":e,i=t.iconName;if(i)return at(kt.definitions,n,i)||at(E.styles,n,i)}s({},ut,{cx:"256",cy:"364",r:"28"}),s({},lt,{attributeName:"r",values:"28;14;28;28;14;28;"}),s({},dt,{values:"1;0;1;1;0;1;"}),s({},ut,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),s({},dt,{values:"1;0;0;0;0;1;"}),s({},ut,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),s({},dt,{values:"0;0;1;1;0;0;"});var gt,mt,vt,yt,_t,Ot,kt=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.definitions={}}var e;return(e=[{key:"add",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i1&&void 0!==arguments[1]?arguments[1]:{},n=e.transform,i=void 0===n?Q:n,r=e.symbol,o=void 0!==r&&r,a=e.mask,c=void 0===a?null:a,u=e.maskId,l=void 0===u?null:u,d=e.title,h=void 0===d?null:d,f=e.titleId,p=void 0===f?null:f,b=e.classes,g=void 0===b?[]:b,m=e.attributes,v=void 0===m?{}:m,y=e.styles,_=void 0===y?{}:y;if(t){var O=t.prefix,k=t.iconName,w=t.icon;return pt(s({type:"icon"},t),(function(){return ft(),T.autoA11y&&(h?v["aria-labelledby"]="".concat(T.replacementClass,"-title-").concat(p||W()):(v["aria-hidden"]="true",v.focusable="false")),tt({icons:{main:ht(w),mask:c?ht(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:O,iconName:k,transform:s({},Q,i),symbol:o,title:h,maskId:l,titleId:p,extra:{attributes:v,styles:_,classes:g}})}))}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(t||{}).icon?t:bt(t||{}),i=e.mask;return i&&(i=(i||{}).icon?i:bt(i||{})),gt(n,s({},e,{mask:i}))}),Tt=((vt=function t(){C(this,t),this.defaultPrefix="fas",this.fallbackIcon=null,this.globalLibrary=!1}).\u0275fac=function(t){return new(t||vt)},vt.\u0275prov=Object(i.Kb)({factory:function(){return new vt},token:vt,providedIn:"root"}),vt),St=((mt=function(){function t(){C(this,t),this.definitions={}}return w(t,[{key:"addIcons",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n....')}}]),t}()).\u0275fac=function(t){return new(t||Ot)},Ot.\u0275dir=i.Jb({type:Ot,selectors:[["fa-icon","stackItemSize",""],["fa-duotone-icon","stackItemSize",""]],inputs:{stackItemSize:"stackItemSize",size:"size"},features:[i.Ab]}),Ot),xt=((_t=function(){function t(e,n,i,r){C(this,t),this.sanitizer=e,this.config=n,this.iconLibrary=i,this.stackItem=r,this.classes=[]}return w(t,[{key:"ngOnChanges",value:function(t){if(null==this.icon&&null==this.config.fallbackIcon)return function(){throw new Error("Property `icon` is required for `fa-icon`/`fa-duotone-icon` components.")}();var e;if(e=null==this.icon?this.config.fallbackIcon:this.icon,t){var n=this.findIconDefinition(e);if(null!=n){var i=this.buildParams();this.renderIcon(n,i)}}}},{key:"render",value:function(){this.ngOnChanges({})}},{key:"findIconDefinition",value:function(t){var e=function(t,e){return void 0!==(n=t).prefix&&void 0!==n.iconName?t:Array.isArray(t)&&2===t.length?{prefix:t[0],iconName:t[1]}:"string"==typeof t?{prefix:e,iconName:t}:void 0;var n}(t,this.config.defaultPrefix);if("icon"in e)return e;var n=this.iconLibrary.getIconDefinition(e.prefix,e.iconName);if(null!=n)return n;var i=bt(e);if(null!=i){var r="Global icon library is deprecated. Consult https://github.com/FortAwesome/angular-fontawesome/blob/master/UPGRADING.md for the migration instructions.";if("unset"===this.config.globalLibrary)console.error("FontAwesome: "+r);else if(!this.config.globalLibrary)throw new Error(r);return i}return function(t){throw new Error("Could not find icon with iconName=".concat(t.iconName," and prefix=").concat(t.prefix," in the icon library."))}(e),null}},{key:"buildParams",value:function(){var t,e,n,i,r,o={flip:this.flip,spin:this.spin,pulse:this.pulse,border:this.border,inverse:this.inverse,size:this.size||null,pull:this.pull||null,rotate:this.rotate||null,fixedWidth:"boolean"==typeof this.fixedWidth?this.fixedWidth:this.config.fixedWidth,stackItemSize:null!=this.stackItem?this.stackItem.stackItemSize:null},a="string"==typeof this.transform?(t=this.transform,e={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0},t?t.toLowerCase().split(" ").reduce((function(t,e){var n=e.toLowerCase().split("-"),i=n[0],r=n.slice(1).join("-");if(i&&"h"===r)return t.flipX=!0,t;if(i&&"v"===r)return t.flipY=!0,t;if(r=parseFloat(r),isNaN(r))return t;switch(i){case"grow":t.size=t.size+r;break;case"shrink":t.size=t.size-r;break;case"left":t.x=t.x-r;break;case"right":t.x=t.x+r;break;case"up":t.y=t.y-r;break;case"down":t.y=t.y+r;break;case"rotate":t.rotate=t.rotate+r}return t}),e):e):this.transform;return{title:this.title,transform:a,classes:[].concat(b((n=o,f(i={"fa-spin":n.spin,"fa-pulse":n.pulse,"fa-fw":n.fixedWidth,"fa-border":n.border,"fa-inverse":n.inverse,"fa-layers-counter":n.counter,"fa-flip-horizontal":"horizontal"===n.flip||"both"===n.flip,"fa-flip-vertical":"vertical"===n.flip||"both"===n.flip},"fa-"+n.size,null!==n.size),f(i,"fa-rotate-"+n.rotate,null!==n.rotate),f(i,"fa-pull-"+n.pull,null!==n.pull),f(i,"fa-stack-"+n.stackItemSize,null!=n.stackItemSize),r=i,Object.keys(r).map((function(t){return r[t]?t:null})).filter((function(t){return t})))),b(this.classes)),mask:null!=this.mask?this.findIconDefinition(this.mask):null,styles:null!=this.styles?this.styles:{},symbol:this.symbol,attributes:{role:this.a11yRole}}}},{key:"renderIcon",value:function(t,e){var n=Ct(t,e);this.renderedIconHTML=this.sanitizer.bypassSecurityTrustHtml(n.html.join("\n"))}}]),t}()).\u0275fac=function(t){return new(t||_t)(i.Ob(r.b),i.Ob(Tt),i.Ob(St),i.Ob(Et,8))},_t.\u0275cmp=i.Ib({type:_t,selectors:[["fa-icon"]],hostAttrs:[1,"ng-fa-icon"],hostVars:2,hostBindings:function(t,e){2&t&&(i.Xb("innerHTML",e.renderedIconHTML,i.Fc),i.Db("title",e.title))},inputs:{classes:"classes",icon:"icon",title:"title",spin:"spin",pulse:"pulse",mask:"mask",styles:"styles",flip:"flip",size:"size",pull:"pull",border:"border",inverse:"inverse",symbol:"symbol",rotate:"rotate",fixedWidth:"fixedWidth",transform:"transform",a11yRole:"a11yRole"},features:[i.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2}),_t),Pt=((yt=function t(){C(this,t)}).\u0275mod=i.Mb({type:yt}),yt.\u0275inj=i.Lb({factory:function(t){return new(t||yt)}}),yt)},Nxx2:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){function t(){}return t.numberOfTrailingZeros=function(t){var e;if(0===t)return 32;var n=31;return 0!=(e=t<<16)&&(n-=16,t=e),0!=(e=t<<8)&&(n-=8,t=e),0!=(e=t<<4)&&(n-=4,t=e),0!=(e=t<<2)&&(n-=2,t=e),n-(t<<1>>>31)},t.numberOfLeadingZeros=function(t){if(0===t)return 32;var e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-(t>>>31)},t.toHexString=function(t){return t.toString(16)},t.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,63&(t+=t>>>8)+(t>>>16)},t.MIN_VALUE_32_BITS=-2147483648,t}()},O0qa:function(t,e,n){"use strict";n.d(e,"a",(function(){return U}));var i=n("zqNl"),r=n("HM3f"),o=n("jOdJ"),a=n("i67J"),s=n("uJYd"),c=n("h3eB"),u=n("+Px6"),l=n("YyhG"),d=n("J/3c"),h=n("sxqi"),f=n("rxqU"),p=n("kZht"),b=n("aDqW"),g=n("Eu46"),v=n("UVqw"),y=n("An66"),_=n("v4/B"),O=n("VbQ3"),k=n("s96x"),T=n("anSm"),S=n("1o0v"),E=n("NxuZ"),x=n("7J2L");function P(t,e){if(1&t){var n=p.Vb();p.Ub(0,"open-orders-mobile",8),p.bc("selectTicker",(function(t){return p.Ec(n),p.fc(3).selectTicker(t)}))("editOrder",(function(t){return p.Ec(n),p.fc(3).editOrder(t)}))("cancelOrder",(function(t){return p.Ec(n),p.fc(3).cancelOrder(t)}))("viewDetailed",(function(t){return p.Ec(n),p.fc(3).viewDetailed(t)})),p.Tb()}2&t&&p.mc("order",e.$implicit)}function A(t,e){if(1&t){var n=p.Vb();p.Sb(0),p.Ub(1,"open-orders-desktop",5),p.bc("selectTicker",(function(t){return p.Ec(n),p.fc(2).selectTicker(t)}))("editOrder",(function(t){return p.Ec(n),p.fc(2).editOrder(t)}))("cancelOrder",(function(t){return p.Ec(n),p.fc(2).cancelOrder(t)}))("cancelAllOrders",(function(){return p.Ec(n),p.fc(2).cancelAllOrders()}))("viewDetailed",(function(t){return p.Ec(n),p.fc(2).viewDetailed(t)})),p.gc(2,"async"),p.Tb(),p.Ub(3,"cdk-virtual-scroll-viewport",6),p.Oc(4,P,1,1,"open-orders-mobile",7),p.Tb(),p.Rb()}if(2&t){var i=p.fc().ngLet,r=p.fc();p.Cb(1),p.mc("orders",i)("displayTooltips",p.hc(2,4,r.displayTooltips$)),p.Cb(2),p.mc("itemSize",90),p.Cb(1),p.mc("cdkVirtualForOf",i.valueSeq().toArray())}}var I=function(){return{small:100,medium:400,large:800}};function M(t,e){if(1&t&&(p.Ub(0,"div",3),p.Oc(1,A,5,6,"ng-container",4),p.Tb()),2&t){var n=e.ngLet;p.fc();var i=p.Ac(3);p.mc("breakpoints",p.qc(3,I)),p.Cb(1),p.mc("ngIf",n&&n.size>0)("ngIfElse",i)}}var D=function(t){return{pair:t}};function R(t,e){if(1&t&&(p.Ub(0,"p"),p.Qc(1),p.gc(2,"translate"),p.Tb()),2&t){var n=e.ngIf;p.Cb(1),p.Sc(" ",p.ic(2,1,"NO_CONTENT.PAIR_OPEN_ORDERS",p.rc(4,D,n))," ")}}function j(t,e){1&t&&(p.Ub(0,"p",12),p.Qc(1,"NO_CONTENT.OPEN_ORDERS"),p.Tb())}function L(t,e){if(1&t&&(p.Ub(0,"section",9),p.Pb(1,"fa-icon",10),p.Oc(2,R,3,6,"p",4),p.gc(3,"async"),p.Oc(4,j,2,0,"ng-template",null,11,p.Pc),p.Tb()),2&t){var n=p.Ac(5),i=p.fc(),r=null;p.Cb(2),p.mc("ngIf",null==(r=p.hc(3,2,i.filterPair$))?null:r.orUndefined())("ngIfElse",n)}}function N(t,e){1&t&&p.Pb(0,"kraken-loading")}var U=function(){var t=function(){function t(e,n,r){C(this,t),this.store=e,this.translate=n,this.market=r,this.displayTooltips$=this.store.pipe(Object(i.m)(f.y)),this.orders$=this.store.pipe(Object(i.m)(l.l),Object(a.p)()),this.instruments$=this.store.pipe(Object(i.m)(u.f)),this.filterPair$=this.store.pipe(Object(i.m)(f.q)),this.userSelectedFuturesWallet$=this.store.pipe(Object(i.m)(d.n))}return w(t,[{key:"selectTicker",value:function(t){var e=t.symbol,n=t.replaceUrl;this.market.navigateToMarket(e,n)}},{key:"editOrder",value:function(t){var e=this,n=t.order;this.selectTicker({symbol:n.instrument,replaceUrl:!1}),Object(r.a)([this.instruments$,this.userSelectedFuturesWallet$]).pipe(Object(o.a)()).subscribe((function(t){var i=m(t,2),r=i[0],o=i[1],a=r.get(n.instrument),c=null==o?void 0:o.am;e.store.dispatch(Object(s.g)({name:"edit-order",inputs:{order:n,instrument:a,availableMargin:c}}))}))}},{key:"cancelOrder",value:function(t){var e=t.id;this.store.dispatch(Object(c.d)({id:e}))}},{key:"cancelAllOrders",value:function(){this.store.dispatch(Object(s.g)({name:"confirmation",inputs:{title:"DIALOG.CONFIRM_ORDER_CANCEL.TITLE",subtitle:"DIALOG.CONFIRM_ORDER_CANCEL.SUBTITLE",body:this.translate.instant("DIALOG.CONFIRM_ORDER_CANCEL.BODY"),buttons:[{label:"BUTTON.YES",colour:"accent",actions:[Object(c.c)(),Object(s.c)()]},{label:"BUTTON.NO",colour:"warn",actions:[Object(s.c)()]}]}}))}},{key:"viewDetailed",value:function(t){var e=this,n=t.order;this.instruments$.pipe(Object(a.h)()).subscribe((function(t){var i=t.get(n.instrument);e.store.dispatch(Object(s.g)({name:"order-details",inputs:{order:n,instrument:i}}))}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(p.Ob(i.b),p.Ob(b.e),p.Ob(h.a))},t.\u0275cmp=p.Ib({type:t,selectors:[["open-orders"]],decls:6,vars:3,consts:[["class","table-wrapper","breakpoint","",3,"breakpoints",4,"ngLet"],["noEntries",""],["loader",""],["breakpoint","",1,"table-wrapper",3,"breakpoints"],[4,"ngIf","ngIfElse"],[3,"orders","displayTooltips","selectTicker","editOrder","cancelOrder","cancelAllOrders","viewDetailed"],[3,"itemSize"],[3,"order","selectTicker","editOrder","cancelOrder","viewDetailed",4,"cdkVirtualFor","cdkVirtualForOf"],[3,"order","selectTicker","editOrder","cancelOrder","viewDetailed"],["body","","ghost","",1,"no-activity"],["icon","list","size","3x"],["unfiltered",""],["translate",""]],template:function(t,e){1&t&&(p.Oc(0,M,2,4,"div",0),p.gc(1,"async"),p.Oc(2,L,6,4,"ng-template",null,1,p.Pc),p.Oc(4,N,1,0,"ng-template",null,2,p.Pc)),2&t&&p.mc("ngLet",p.hc(1,1,e.orders$))},directives:[g.a,v.a,y.n,_.a,O.e,O.a,O.d,k.a,T.a,S.a,E.b,b.a,x.a],pipes:[y.b,b.d],styles:["market-icon[_ngcontent-%COMP%]{font-size:20px}[_nghost-%COMP%]{display:flex;flex-direction:column;padding:var(--spacing)}.table-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%]{height:100%}.no-activity[_ngcontent-%COMP%]{text-align:center;padding:var(--spacing-l)}cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{height:100%}@media (max-width:1024px){.table-wrapper[_ngcontent-%COMP%] open-orders-desktop[_ngcontent-%COMP%]{display:none}.table-wrapper[_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{display:block!important}}.table-wrapper[breakpoint=large][_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%], .table-wrapper[breakpoint=medium][_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%], .table-wrapper[breakpoint=small][_ngcontent-%COMP%] open-orders-desktop[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),t}()},O1jd:function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return h})),n.d(e,"c",(function(){return v})),n.d(e,"d",(function(){return m})),n.d(e,"e",(function(){return p})),n.d(e,"f",(function(){return b})),n.d(e,"g",(function(){return g}));var i,r=n("kZht"),o=n("An66");try{i="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(y){i=!1}var a,s,c,u,l,d=function(){var t=function t(e){C(this,t),this._platformId=e,this.isBrowser=this._platformId?Object(o.z)(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!i)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT};return t.\u0275fac=function(e){return new(e||t)(r.Yb(r.D))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(r.D))},token:t,providedIn:"root"}),t}(),h=function(){var t=function t(){C(this,t)};return t.\u0275mod=r.Mb({type:t}),t.\u0275inj=r.Lb({factory:function(e){return new(e||t)}}),t}(),f=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function p(){if(a)return a;if("object"!=typeof document||!document)return a=new Set(f);var t=document.createElement("input");return a=new Set(f.filter((function(e){return t.setAttribute("type",e),t.type===e})))}function b(t){return function(){if(null==s&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return s=!0}}))}finally{s=s||!1}return s}()?t:!!t.capture}function g(){if(null==u)if("object"==typeof document&&document||(u=!1),"scrollBehavior"in document.documentElement.style)u=!0;else{var t=Element.prototype.scrollTo;u=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}return u}function m(){if("object"!=typeof document||!document)return 0;if(null==c){var t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";var n=document.createElement("div"),i=n.style;i.width="2px",i.height="1px",t.appendChild(n),document.body.appendChild(t),c=0,0===t.scrollLeft&&(t.scrollLeft=1,c=0===t.scrollLeft?1:2),t.parentNode.removeChild(t)}return c}function v(t){if(function(){if(null==l){var t="undefined"!=typeof document?document.head:null;l=!(!t||!t.createShadowRoot&&!t.attachShadow)}return l}()){var e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}},O30t:function(t,e,n){"use strict";n.d(e,"a",(function(){return te})),n.d(e,"b",(function(){return Qt})),n.d(e,"c",(function(){return Kt})),n.d(e,"d",(function(){return Xt})),n.d(e,"e",(function(){return Gt})),n.d(e,"f",(function(){return ae})),n.d(e,"g",(function(){return ne})),n.d(e,"h",(function(){return ce})),n.d(e,"i",(function(){return re})),n.d(e,"j",(function(){return qt})),n.d(e,"k",(function(){return de})),n.d(e,"l",(function(){return le}));var i=n("vE5V"),r=n("5XID"),s=n("sBeF"),u=n("kZht"),l=n("O1jd"),d=n("An66"),f=n("ZTXN"),g=n("GoAz"),v=n("C05f"),y=n("9bRT"),_=n("ROBh"),O=n("kuMc"),k=n("J+dc"),T=n("VbQ3"),S=[[["caption"]],[["colgroup"],["col"]]],E=["caption","colgroup, col"];function x(t){return function(t){a(n,t);var e=c(n);function n(){var t;C(this,n);for(var i=arguments.length,r=new Array(i),o=0;o4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];C(this,t),this._isNativeHtmlTable=e,this._stickCellCss=n,this.direction=i,this._coalescedStyleScheduler=r,this._isBrowser=o,this._needsPositionStickyOnElement=a}return w(t,[{key:"clearStickyPositioning",value:function(t,e){var n,i=this,r=[],o=p(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.nodeType===a.ELEMENT_NODE){r.push(a);for(var s=0;s0;r--)e[r]&&(n[r]=i,i+=t[r]);return n}}]),t}(),vt=((G=function t(e,n){C(this,t),this.viewContainer=e,this.elementRef=n}).\u0275fac=function(t){return new(t||G)(u.Ob(u.R),u.Ob(u.l))},G.\u0275dir=u.Jb({type:G,selectors:[["","rowOutlet",""]]}),G),yt=((W=function t(e,n){C(this,t),this.viewContainer=e,this.elementRef=n}).\u0275fac=function(t){return new(t||W)(u.Ob(u.R),u.Ob(u.l))},W.\u0275dir=u.Jb({type:W,selectors:[["","headerRowOutlet",""]]}),W),_t=((Q=function t(e,n){C(this,t),this.viewContainer=e,this.elementRef=n}).\u0275fac=function(t){return new(t||Q)(u.Ob(u.R),u.Ob(u.l))},Q.\u0275dir=u.Jb({type:Q,selectors:[["","footerRowOutlet",""]]}),Q),Ot=(($=function t(e,n){C(this,t),this.viewContainer=e,this.elementRef=n}).\u0275fac=function(t){return new(t||$)(u.Ob(u.R),u.Ob(u.l))},$.\u0275dir=u.Jb({type:$,selectors:[["","noDataRowOutlet",""]]}),$),kt=((q=function(){function t(e,n,i,r,o,a,s,c,u){C(this,t),this._differs=e,this._changeDetectorRef=n,this._coalescedStyleScheduler=i,this._elementRef=r,this._dir=a,this._platform=c,this._viewRepeater=u,this._onDestroy=new f.b,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this.viewChange=new v.a({start:0,end:Number.MAX_VALUE}),o||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=s,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}return w(t,[{key:"ngOnInit",value:function(){var t=this;this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((function(e,n){return t.trackBy?t.trackBy(n.dataIndex,n.data):n}))}},{key:"ngAfterContentChecked",value:function(){this._cacheRowDefs(),this._cacheColumnDefs();var t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():t&&this.updateStickyColumnStyles(),this._checkStickyStates()}},{key:"ngOnDestroy",value:function(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),Object(s.h)(this.dataSource)&&this.dataSource.disconnect(this)}},{key:"renderRows",value:function(){var t=this;this._renderRows=this._getAllRenderRows();var e=this._dataDiffer.diff(this._renderRows);if(e){var n=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,n,(function(e,n,i){return t._getEmbeddedViewArgs(e.item,i)}),(function(t){return t.item.data}),(function(e){1===e.operation&&e.context&&t._renderCellTemplateForItem(e.record.item.rowDef,e.context)})),this._updateRowIndexContext(),e.forEachIdentityChange((function(t){n.get(t.currentIndex).context.$implicit=t.item.data})),this._updateNoDataRow(),this.updateStickyColumnStyles()}else this._updateNoDataRow()}},{key:"addColumnDef",value:function(t){this._customColumnDefs.add(t)}},{key:"removeColumnDef",value:function(t){this._customColumnDefs.delete(t)}},{key:"addRowDef",value:function(t){this._customRowDefs.add(t)}},{key:"removeRowDef",value:function(t){this._customRowDefs.delete(t)}},{key:"addHeaderRowDef",value:function(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}},{key:"removeHeaderRowDef",value:function(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}},{key:"addFooterRowDef",value:function(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}},{key:"removeFooterRowDef",value:function(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}},{key:"updateStickyHeaderRowStyles",value:function(){var t=this._getRenderedRows(this._headerRowOutlet),e=this._elementRef.nativeElement.querySelector("thead");e&&(e.style.display=t.length?"":"none");var n=this._headerRowDefs.map((function(t){return t.sticky}));this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,n,"top"),this._headerRowDefs.forEach((function(t){return t.resetStickyChanged()}))}},{key:"updateStickyFooterRowStyles",value:function(){var t=this._getRenderedRows(this._footerRowOutlet),e=this._elementRef.nativeElement.querySelector("tfoot");e&&(e.style.display=t.length?"":"none");var n=this._footerRowDefs.map((function(t){return t.sticky}));this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach((function(t){return t.resetStickyChanged()}))}},{key:"updateStickyColumnStyles",value:function(){var t=this,e=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);this._stickyStyler.clearStickyPositioning([].concat(b(e),b(n),b(i)),["left","right"]),e.forEach((function(e,n){t._addStickyColumnStyles([e],t._headerRowDefs[n])})),this._rowDefs.forEach((function(e){for(var i=[],r=0;r0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((function(e,n){return t._renderRow(t._headerRowOutlet,e,n)})),this.updateStickyHeaderRowStyles()}},{key:"_forceRenderFooterRows",value:function(){var t=this;this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((function(e,n){return t._renderRow(t._footerRowOutlet,e,n)})),this.updateStickyFooterRowStyles()}},{key:"_addStickyColumnStyles",value:function(t,e){var n=this,i=Array.from(e.columns||[]).map((function(t){return n._columnDefsByName.get(t)})),r=i.map((function(t){return t.sticky})),o=i.map((function(t){return t.stickyEnd}));this._stickyStyler.updateStickyColumns(t,r,o)}},{key:"_getRenderedRows",value:function(t){for(var e=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:{},r=t.viewContainer.createEmbeddedView(e.template,i,n);return this._renderCellTemplateForItem(e,i),r}},{key:"_renderCellTemplateForItem",value:function(t,e){var n,i=p(this._getCellTemplates(t));try{for(i.s();!(n=i.n()).done;){var r=n.value;ht.mostRecentCellOutlet&&ht.mostRecentCellOutlet._viewContainer.createEmbeddedView(r,e)}}catch(o){i.e(o)}finally{i.f()}this._changeDetectorRef.markForCheck()}},{key:"_updateRowIndexContext",value:function(){for(var t=this._rowOutlet.viewContainer,e=0,n=t.length;e0&&void 0!==arguments[0]?arguments[0]:[];return C(this,n),(t=e.call(this))._renderData=new v.a([]),t._filter=new v.a(""),t._internalPageChanges=new f.b,t._renderChangesSubscription=Ut.a.EMPTY,t.sortingDataAccessor=function(t,e){var n=t[e];if(Object(r.a)(n)){var i=Number(n);return i<9007199254740991?i:n}return n},t.sortData=function(e,n){var i=n.active,r=n.direction;return i&&""!=r?e.sort((function(e,n){var o=t.sortingDataAccessor(e,i),a=t.sortingDataAccessor(n,i),s=typeof o,c=typeof a;s!==c&&("number"===s&&(o+=""),"number"===c&&(a+=""));var u=0;return null!=o&&null!=a?o>a?u=1:o0)){var i=Math.ceil(n.length/n.pageSize)-1||0,r=Math.min(n.pageIndex,i);r!==n.pageIndex&&(n.pageIndex=r,e._internalPageChanges.next())}}))}},{key:"connect",value:function(){return this._renderData}},{key:"disconnect",value:function(){}},{key:"data",get:function(){return this._data.value},set:function(t){this._data.next(t)}},{key:"filter",get:function(){return this._filter.value},set:function(t){this._filter.next(t)}},{key:"sort",get:function(){return this._sort},set:function(t){this._sort=t,this._updateChangeSubscription()}},{key:"paginator",get:function(){return this._paginator},set:function(t){this._paginator=t,this._updateChangeSubscription()}}]),n}(s.b)},O5EP:function(t,e,n){"use strict";n.d(e,"a",(function(){return et}));var i=n("zqNl"),r=n("TYVA"),o=n("i67J"),a=n("vYTc"),s=n("uJYd"),c=n("wMit"),u=n("qAYy"),l=n("YyhG"),d=n("rxqU");function h(t){switch(t){case"XBT/USD":return"BRTI";case"ETH/USD":return"ETHUSD_RTI";case"XRP/USD":return"XRPUSD_RTI";case"XRP/XBT":return"XRPXBT_RTI";case"BCH/USD":return"BCHUSD_RTI";case"LTC/USD":return"LTCUSD_RTI";case"XBT/EUR":return"XBTEUR_RTI";case"ETH/EUR":return"ETHEUR_RTI"}}var f=n("kZht"),p=n("An66"),b=n("Eu46"),g=n("anSm"),m=n("IkSM"),v=n("B6Vo"),y=n("Cc4E"),_=n("zho4"),O=n("chaP"),k=n("LbKT"),T=n("6BNo"),S=n("1o0v"),E=n("Oj3S"),x=n("7J2L"),P=n("aDqW"),A=n("fvDn"),I=n("e7kw"),M=n("FUqb"),D=n("DpwM"),R=n("rqGg"),j=function(){return[250,100]};function L(t,e){if(1&t&&(f.Ub(0,"section",4),f.Ub(1,"p",21),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Ub(4,"a",22),f.gc(5,"supportArticle"),f.Qc(6),f.gc(7,"date"),f.Tb(),f.Tb()),2&t){var n=f.fc().ngLet,i=f.fc().$implicit;f.Cb(1),f.mc("sbDisabled",!n)("sbDelay",f.qc(12,j)),f.Cb(1),f.Sc(" ",f.hc(3,5,"LABEL.MATURITY_DATE"),": "),f.Cb(2),f.mc("href",f.hc(5,7,360022632172),f.Gc),f.Cb(2),f.Sc(" ",f.ic(7,9,i.maturityTime,"dd/MMM/yyyy")," ")}}function N(t,e){if(1&t&&(f.Ub(0,"section",4),f.Ub(1,"p",23),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Ub(4,"a",22),f.gc(5,"supportArticle"),f.Qc(6),f.gc(7,"date"),f.Tb(),f.Tb()),2&t){var n=f.fc().ngLet,i=f.fc().$implicit;f.Cb(1),f.mc("sbDisabled",!n)("sbDelay",f.qc(12,j)),f.Cb(1),f.Sc(" ",f.hc(3,5,"LABEL.MATURITY_TIME"),": "),f.Cb(2),f.mc("href",f.hc(5,7,360022632172),f.Gc),f.Cb(2),f.Sc(" ",f.ic(7,9,i.maturityTime,"HH:mm")," ")}}function U(t,e){if(1&t&&(f.Ub(0,"section",4),f.Ub(1,"p",24),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Ub(4,"strong",9),f.Qc(5),f.Tb(),f.Tb()),2&t){var n=f.fc().ngLet,i=f.fc().$implicit,r=f.fc();f.Cb(1),f.mc("sbDisabled",!n)("sbDelay",f.qc(6,j)),f.Cb(1),f.Sc(" ",f.hc(3,4,"LABEL.SETTLEMENT"),": "),f.Cb(3),f.Sc(" ",r.getSettlementTime(i.maturityTime)," ")}}function F(t,e){if(1&t){var n=f.Vb();f.Ub(0,"section",4),f.Ub(1,"p",25),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Ub(4,"a",26),f.bc("click",(function(t){f.Ec(n);var e=f.fc(2).$implicit;return f.fc().getFundingRates(e.product_id),t.stopPropagation()})),f.Qc(5),f.gc(6,"percent"),f.gc(7,"translate"),f.Tb(),f.Tb()}if(2&t){var i=f.fc().ngLet,r=f.fc().$implicit;f.Cb(1),f.mc("sbDisabled",!i)("sbDelay",f.qc(12,j)),f.Cb(1),f.Sc(" ",f.hc(3,5,"LABEL.FUNDING_RATE"),": "),f.Cb(3),f.Tc(" ",f.ic(6,7,r.relative_funding_rate,"1.4-4")," / ",f.hc(7,10,"UNIT.HOUR_SHORT")," ")}}function B(t,e){if(1&t&&(f.Ub(0,"section",4),f.Ub(1,"p",27),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Ub(4,"strong",9),f.Qc(5),f.gc(6,"percent"),f.gc(7,"translate"),f.Tb(),f.Tb()),2&t){var n=f.fc().ngLet,i=f.fc().$implicit;f.Cb(1),f.mc("sbDisabled",!n)("sbDelay",f.qc(12,j)),f.Cb(1),f.Sc(" ",f.hc(3,5,"LABEL.EST_NEXT_RATE"),": "),f.Cb(3),f.Tc(" ",f.ic(6,7,i.relative_funding_rate_prediction,"1.4-4")," / ",f.hc(7,10,"UNIT.HOUR_SHORT")," ")}}function z(t,e){if(1&t&&(f.Ub(0,"section",4),f.Ub(1,"p",28),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Ub(4,"strong",9),f.Qc(5),f.Tb(),f.Tb()),2&t){var n=f.fc().ngLet,i=f.fc().$implicit,r=f.fc();f.Cb(1),f.mc("sbDisabled",!n)("sbDelay",f.qc(6,j)),f.Cb(1),f.Sc(" ",f.hc(3,4,"LABEL.NEXT_RATE"),": "),f.Cb(3),f.Sc(" ",r.getSettlementTime(i.next_funding_rate_time)," ")}}function V(t,e){if(1&t&&(f.Ub(0,"a",7),f.Pb(1,"img",29),f.Qc(2),f.Ub(3,"span",9),f.Qc(4),f.gc(5,"sato"),f.Tb(),f.Tb()),2&t){var n=f.fc(2).$implicit,i=f.fc();f.mc("href",n&&i.getRTILink(n.pair),f.Gc),f.Cb(2),f.Sc(" ",n&&i.getRTIName(n.pair)," - "),f.Cb(2),f.Sc(" ",f.ic(5,3,n.index,n)," ")}}function H(t,e){if(1&t&&(f.Ub(0,"span",9),f.Qc(1),f.gc(2,"sato"),f.Tb()),2&t){var n=f.fc(2).$implicit;f.Cb(1),f.Sc(" ",f.ic(2,1,n.index,n)," ")}}function q(t,e){if(1&t&&(f.Ub(0,"section",4),f.Ub(1,"p",30),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Ub(4,"strong",31),f.Ub(5,"span"),f.Qc(6),f.gc(7,"sato"),f.Tb(),f.Qc(8),f.Ub(9,"span",32),f.Qc(10),f.gc(11,"asset"),f.Tb(),f.Tb(),f.Tb()),2&t){var n=e.ngIf,i=f.fc().ngLet;f.Cb(1),f.mc("sbDisabled",!i)("sbDelay",f.qc(14,j)),f.Cb(1),f.Sc(" ",f.hc(3,6,"LABEL.UNREALIZED_FUNDING"),": "),f.Cb(4),f.Sc(" ",f.jc(7,8,n.displayUnrealizedFunding,n.walletDisplayAsset,"full")," "),f.Cb(2),f.Sc(" "," "," "),f.Cb(2),f.Rc(f.hc(11,12,n.walletDisplayAsset))}}function $(t,e){if(1&t&&(f.Ub(0,"strong",31),f.Qc(1),f.gc(2,"crypto"),f.Tb()),2&t){var n=e.ngIfSome;f.Cb(1),f.Sc(" ",f.ic(2,1,n,"usd")," USD ")}}function Q(t,e){if(1&t&&(f.Ub(0,"section",4),f.Ub(1,"p"),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Oc(4,$,3,4,"strong",33),f.gc(5,"async"),f.Tb()),2&t){var n=f.fc(3);f.Cb(2),f.Sc("",f.hc(3,2,"LABEL.30_DAY_USER_VOLUME"),":"),f.Cb(2),f.mc("ngIfSome",f.hc(5,4,n.userFeeVolume$))}}function W(t,e){if(1&t){var n=f.Vb();f.Ub(0,"strong",36),f.bc("click",(function(){return f.Ec(n),f.fc(4).openFeeSchedule()})),f.Qc(1),f.gc(2,"percent"),f.Tb()}if(2&t){var i=e.ngIfSome;f.Cb(1),f.Sc(" ",f.ic(2,1,i.maker,"1.4-4")," ")}}function G(t,e){if(1&t&&(f.Ub(0,"section",4),f.Ub(1,"p"),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Pb(4,"a",34),f.Oc(5,W,3,4,"strong",35),f.gc(6,"async"),f.Tb()),2&t){var n=f.fc(3);f.Cb(2),f.Sc("",f.hc(3,2,"LABEL.USER_MAKER_FEE"),":"),f.Cb(3),f.mc("ngIfSome",f.hc(6,4,n.userFeeTier$))}}function Y(t,e){if(1&t){var n=f.Vb();f.Ub(0,"strong",36),f.bc("click",(function(){return f.Ec(n),f.fc(4).openFeeSchedule()})),f.Qc(1),f.gc(2,"percent"),f.Tb()}if(2&t){var i=e.ngIfSome;f.Cb(1),f.Sc(" ",f.ic(2,1,i.taker,"1.4-4")," ")}}function K(t,e){if(1&t&&(f.Ub(0,"section",4),f.Ub(1,"p"),f.Qc(2),f.gc(3,"translate"),f.Tb(),f.Oc(4,Y,3,4,"strong",35),f.gc(5,"async"),f.Tb()),2&t){var n=f.fc(3);f.Cb(2),f.Sc("",f.hc(3,2,"LABEL.USER_TAKER_FEE"),":"),f.Cb(2),f.mc("ngIfSome",f.hc(5,4,n.userFeeTier$))}}function Z(t,e){if(1&t&&(f.Ub(0,"section",3),f.Ub(1,"section",4),f.Ub(2,"p",5),f.Qc(3),f.gc(4,"translate"),f.Tb(),f.Ub(5,"strong"),f.Qc(6),f.gc(7,"cryptoAbbreviation"),f.Tb(),f.Tb(),f.Ub(8,"section",4),f.Ub(9,"p",6),f.Qc(10),f.gc(11,"translate"),f.Tb(),f.Ub(12,"a",7),f.gc(13,"supportArticle"),f.Qc(14),f.Tb(),f.Tb(),f.Ub(15,"section",4),f.Ub(16,"p",8),f.Qc(17),f.gc(18,"translate"),f.Tb(),f.Ub(19,"strong",9),f.Qc(20),f.gc(21,"number"),f.Tb(),f.Tb(),f.Ub(22,"section",4),f.Ub(23,"p",10),f.Qc(24),f.gc(25,"translate"),f.Tb(),f.Ub(26,"strong",9),f.Qc(27),f.gc(28,"number"),f.Tb(),f.Tb(),f.Oc(29,L,8,13,"section",11),f.Oc(30,N,8,13,"section",11),f.Oc(31,U,6,7,"section",11),f.Oc(32,F,8,13,"section",11),f.Oc(33,B,8,13,"section",11),f.Oc(34,z,6,7,"section",11),f.Ub(35,"section",4),f.Ub(36,"p",12),f.Qc(37),f.gc(38,"translate"),f.Tb(),f.Ub(39,"strong",13),f.Qc(40),f.gc(41,"change"),f.gc(42,"number"),f.Tb(),f.Tb(),f.Ub(43,"section",4),f.Ub(44,"p",14),f.Qc(45),f.gc(46,"translate"),f.Tb(),f.Oc(47,V,6,6,"a",15),f.Oc(48,H,3,4,"span",16),f.Tb(),f.Ub(49,"section",4),f.Ub(50,"p",17),f.Qc(51),f.gc(52,"translate"),f.Tb(),f.Ub(53,"strong",9),f.Qc(54),f.gc(55,"sato"),f.Tb(),f.Tb(),f.Ub(56,"section",4),f.Ub(57,"p",18),f.Qc(58),f.gc(59,"translate"),f.Tb(),f.Ub(60,"strong",9),f.Qc(61),f.gc(62,"sato"),f.Tb(),f.Tb(),f.Ub(63,"section",19),f.Ub(64,"p",20),f.Qc(65),f.gc(66,"translate"),f.Tb(),f.Ub(67,"strong",13),f.Qc(68),f.gc(69,"number"),f.Tb(),f.Tb(),f.Oc(70,q,12,15,"section",11),f.gc(71,"async"),f.Oc(72,Q,6,6,"section",11),f.gc(73,"async"),f.Oc(74,G,7,6,"section",11),f.gc(75,"async"),f.Oc(76,K,6,6,"section",11),f.gc(77,"async"),f.Tb()),2&t){var n=e.ngLet,i=f.fc().$implicit,r=f.fc();f.Cb(2),f.mc("sbDisabled",!n)("sbDelay",f.qc(99,j)),f.Cb(1),f.Sc(" ",f.hc(4,51,"LABEL.SYMBOL"),": "),f.Cb(3),f.Sc(" ",f.hc(7,53,i.product_id)," "),f.Cb(3),f.mc("sbDisabled",!n)("sbDelay",f.qc(100,j)),f.Cb(1),f.Sc(" ",f.hc(11,55,"LABEL.TYPE"),": "),f.Cb(2),f.mc("href",f.hc(13,57,r.instrumentSupport(i)),f.Gc),f.Cb(2),f.Tc(" ",r.instrumentGroup(i)," ",r.isPerpetual(i)?"Perpetuals":"Futures"," "),f.Cb(2),f.mc("sbDisabled",!n)("sbDelay",f.qc(101,j)),f.Cb(1),f.Sc(" ",f.hc(18,59,"LABEL.VOLUME"),": "),f.Cb(3),f.Sc(" ",f.hc(21,61,i.volume)," "),f.Cb(3),f.mc("sbDisabled",!n)("sbDelay",f.qc(102,j)),f.Cb(1),f.Sc(" ",f.hc(25,63,"LABEL.OPEN_INTEREST"),": "),f.Cb(3),f.Sc(" ",f.hc(28,65,i.openInterest)," "),f.Cb(2),f.mc("ngIf",!r.isPerpetual(i)),f.Cb(1),f.mc("ngIf",!r.isPerpetual(i)),f.Cb(1),f.mc("ngIf",!r.isPerpetual(i)),f.Cb(1),f.mc("ngIf",r.isPerpetual(i)),f.Cb(1),f.mc("ngIf",r.isPerpetual(i)),f.Cb(1),f.mc("ngIf",r.isPerpetual(i)),f.Cb(2),f.mc("sbDisabled",!n)("sbDelay",f.qc(103,j)),f.Cb(1),f.Sc(" ",f.hc(38,67,"COLUMN.24H_CHANGE"),": "),f.Cb(2),f.mc("pnl",i.change),f.Cb(1),f.Sc("",f.hc(41,69,f.ic(42,71,i.change,"1.1-1")),"%"),f.Cb(4),f.mc("sbDisabled",!n)("sbDelay",f.qc(104,j)),f.Cb(1),f.Sc(" ",f.hc(46,74,"LABEL.MARK_INDEX"),": "),f.Cb(2),f.mc("ngIf",r.isRegulatedIndex(i)),f.Cb(1),f.mc("ngIf",!r.isRegulatedIndex(i)),f.Cb(2),f.mc("sbDisabled",!n)("sbDelay",f.qc(105,j)),f.Cb(1),f.Sc(" ",f.hc(52,76,"LABEL.MID_PRICE"),": "),f.Cb(3),f.Sc(" ",f.ic(55,78,r.getMid(i),i)," "),f.Cb(3),f.mc("sbDisabled",!n)("sbDelay",f.qc(106,j)),f.Cb(1),f.Sc(" ",f.hc(59,81,"LABEL.MARK_PRICE"),": "),f.Cb(3),f.Sc(" ",f.ic(62,83,i.markPrice,i)," "),f.Cb(3),f.mc("sbDisabled",!n)("sbDelay",f.qc(107,j)),f.Cb(1),f.Sc(" ",f.hc(66,86,"LABEL.PREMIUM"),": "),f.Cb(2),f.mc("pnl",i.premium),f.Cb(1),f.Sc("",f.ic(69,88,i.premium,"1.1-1"),"%"),f.Cb(2),f.mc("ngIf","perpetual"===i.tag&&f.hc(71,91,r.position$)),f.Cb(2),f.mc("ngIf",f.hc(73,93,r.userSignedIn$)),f.Cb(2),f.mc("ngIf",f.hc(75,95,r.userSignedIn$)),f.Cb(2),f.mc("ngIf",f.hc(77,97,r.userSignedIn$))}}function X(t,e){if(1&t&&(f.Sb(0),f.Oc(1,Z,78,108,"section",2),f.gc(2,"async"),f.Rb()),2&t){var n=f.fc();f.Cb(1),f.mc("ngLet",f.hc(2,1,n.displayTooltips$))}}function J(t,e){1&t&&f.Pb(0,"kraken-loading")}var tt,et=((tt=function(){function t(e){C(this,t),this.store=e,this.userSignedIn$=this.store.pipe(Object(i.m)(d.m)),this.selectedTicker$=this.store.pipe(Object(i.m)(u.p)),this.position$=this.store.pipe(Object(i.m)(l.g)),this.displayTooltips$=this.store.pipe(Object(i.m)(d.y)),this.userFeeVolume$=this.store.pipe(Object(i.m)(d.x)),this.userFeeTier$=this.store.pipe(Object(i.m)(d.v),Object(o.j)((function(t){return{maker:t[0].makerFee/100,taker:t[0].takerFee/100}})))}return w(t,[{key:"getFundingRates",value:function(t){this.store.dispatch(Object(c.j)({symbol:t}))}},{key:"openAllMarketsDialog",value:function(){this.store.dispatch(Object(s.g)({name:"markets-overview"}))}},{key:"openFeeSchedule",value:function(){this.store.dispatch(Object(s.g)({name:"fee-schedule"}))}},{key:"isRegulatedIndex",value:function(t){return"F"!==t.product_id[1]}},{key:"instrumentGroup",value:function(t){if(!t)return"-";var e=t.product_id;return Object(a.a)(e)?"linear":e.startsWith("FI")||e.startsWith("PI")?"inverse":"vanilla"}},{key:"instrumentSupport",value:function(t){var e=t.product_id;return Object(a.a)(e)?"4844359082772":"360022835911"}},{key:"isPerpetual",value:function(t){return!!t&&"perpetual"===t.tag}},{key:"getSettlementTime",value:function(t){if(t)return Object(r.h)(t,!0)}},{key:"getRTIName",value:function(t){return h(t)}},{key:"getRTILink",value:function(t){return"http://www.cfbenchmarks.com/indices/".concat(h(t),"/")}},{key:"contractMid",value:function(t){return Object(a.j)(t)}},{key:"getMid",value:function(t){return Object(a.j)(t)}}]),t}()).\u0275fac=function(t){return new(t||tt)(f.Ob(i.b))},tt.\u0275cmp=f.Ib({type:tt,selectors:[["market-details"]],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["loading",""],["body","","class","details",4,"ngLet"],["body","",1,"details"],[1,"detail"],["tooltip","","sbTooltip","TOOLTIP.INSTRUMENT_SYMBOL",3,"sbDisabled","sbDelay"],["tooltip","","sbTooltip","TOOLTIP.INSTRUMENT_TYPE",3,"sbDisabled","sbDelay"],["target","_blank",1,"global__text--link",3,"href"],["tooltip","","sbTooltip","TOOLTIP.24H_VOLUME",3,"sbDisabled","sbDelay"],["mono",""],["tooltip","","sbTooltip","TOOLTIP.OPEN_INTEREST",3,"sbDisabled","sbDelay"],["class","detail",4,"ngIf"],["tooltip","","sbTooltip","TOOLTIP.24H_CHANGE",3,"sbDisabled","sbDelay"],[3,"pnl"],["tooltip","","sbTooltip","TOOLTIP.MARK_INDEX",3,"sbDisabled","sbDelay"],["target","_blank","class","global__text--link",3,"href",4,"ngIf"],["mono","",4,"ngIf"],["tooltip","","sbTooltip","TOOLTIP.MID_PRICE",3,"sbDisabled","sbDelay"],["tooltip","","sbTooltip","TOOLTIP.MARK_PRICE",3,"sbDisabled","sbDelay"],[1,"detail","detail--premium"],["tooltip","","sbTooltip","TOOLTIP.PREMIUM",3,"sbDisabled","sbDelay"],["tooltip","","sbTooltip","TOOLTIP.MATURITY_DATE",3,"sbDisabled","sbDelay"],["mono","","target","_blank",1,"global__text--link",3,"href"],["tooltip","","sbTooltip","TOOLTIP.MATURITY_TIME",3,"sbDisabled","sbDelay"],["tooltip","","sbTooltip","TOOLTIP.SETTLEMENT",3,"sbDisabled","sbDelay"],["tooltip","","sbTooltip","TOOLTIP.FUNDING_RATE",3,"sbDisabled","sbDelay"],["mono","",1,"global__text--link",3,"click"],["tooltip","","sbTooltip","TOOLTIP.NEXT_RATE",3,"sbDisabled","sbDelay"],["tooltip","","sbTooltip","TOOLTIP.NEXT_RATE_TIME",3,"sbDisabled","sbDelay"],["src","assets/images/cfb.png","alt","cfb",1,"cfb"],["tooltip","","sbTooltip","TOOLTIP.UNREALIZED_FUNDING",3,"sbDisabled","sbDelay"],["mono","","nobr",""],["ghost",""],["mono","","nobr","",4,"ngIfSome"],["href",""],["mono","","nobr","","class","global__text--link",3,"click",4,"ngIfSome"],["mono","","nobr","",1,"global__text--link",3,"click"]],template:function(t,e){if(1&t&&(f.Oc(0,X,3,3,"ng-container",0),f.gc(1,"async"),f.Oc(2,J,1,0,"ng-template",null,1,f.Pc)),2&t){var n=f.Ac(3);f.mc("ngIf",f.hc(1,2,e.selectedTicker$))("ngIfElse",n)}},directives:[p.n,b.a,g.a,m.a,v.a,y.a,_.a,O.a,k.a,T.a,S.a,E.a,x.a],pipes:[p.b,P.d,A.a,I.a,p.f,M.b,D.c,p.e,p.u,R.a,D.a],styles:["[_nghost-%COMP%]{display:block;padding:var(--spacing);overflow:auto}.details[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(40ch,1fr));gap:var(--spacing-s) var(--spacing-l)}.detail[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:var(--spacing-s) 0}.detail[_ngcontent-%COMP%]:not(:last-of-type){border-bottom:1px dashed var(--border-colour-dark)}.detail[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-transform:capitalize}.cfb[_ngcontent-%COMP%]{width:20px;margin-right:var(--spacing-s)}"],changeDetection:0}),tt)},OHEV:function(t,e,n){var i=n("u9MN"),r=n("Wzsi"),o=n("1aiz"),a=n("TuP6");function s(t,e,n,o,a){var s=[].slice.call(arguments,1),c=s.length,u="function"==typeof s[c-1];if(!u&&!i())throw new Error("Callback required as last argument");if(!u){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=e,e=o=void 0):2!==c||e.getContext||(o=n,n=e,e=void 0),new Promise((function(i,a){try{var s=r.create(n,o);i(t(s,e,o))}catch(c){a(c)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(a=n,n=e,e=o=void 0):3===c&&(e.getContext&&void 0===a?(a=o,o=void 0):(a=o,o=n,n=e,e=void 0));try{var l=r.create(n,o);a(null,t(l,e,o))}catch(d){a(d)}}e.create=r.create,e.toCanvas=s.bind(null,o.render),e.toDataURL=s.bind(null,o.renderToDataURL),e.toString=s.bind(null,(function(t,e,n){return a.render(t,n)}))},OX2b:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("4Pxi"),a=n("ZCEf"),s=n("iiuT"),c=n("aEDl"),u=n("VYrj"),l=n("LqyJ");e.default=function(t){function e(e){var n=t.call(this)||this,i=null==e?null:e.get(a.default.POSSIBLE_FORMATS),r=[];return null!=i&&(i.indexOf(o.default.EAN_13)>-1&&r.push(new c.default),i.indexOf(o.default.EAN_8)>-1&&r.push(new u.default)),0===r.length&&(r.push(new c.default),r.push(new u.default)),n.readers=r,n}return r(e,t),e.prototype.decodeRow=function(t,e,n){for(var i=0,r=this.readers;i=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){for(var e=t.size,n=0,i=0,r=0,o=null,a=null,s=0;s=5&&(n+=i-5+3),o=u,i=1),(u=t.get(c,s))===a?r++:(r>=5&&(n+=r-5+3),a=u,r=1)}i>=5&&(n+=i-5+3),r>=5&&(n+=r-5+3)}return n},e.getPenaltyN2=function(t){for(var e=t.size,n=0,i=0;i=10&&(1488===i||93===i)&&n++,r=r<<1&2047|t.get(a,o),a>=10&&(1488===r||93===r)&&n++}return 40*n},e.getPenaltyN4=function(t){for(var e=0,n=t.data.length,i=0;i open-instant",Object(E.e)("0ms")),Object(E.m)("void <=> open, open-instant => void",Object(E.e)("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},B=new s.s("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function(){return!1}}),z=new s.s("MAT_DRAWER_CONTAINER"),V=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a){var s;return C(this,n),(s=e.call(this,r,o,a))._changeDetectorRef=t,s._container=i,s}return w(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._container._contentMarginChanges.subscribe((function(){t._changeDetectorRef.markForCheck()}))}}]),n}(r.b);return t.\u0275fac=function(e){return new(e||t)(s.Ob(s.h),s.Ob(Object(s.V)((function(){return q}))),s.Ob(s.l),s.Ob(r.f),s.Ob(s.B))},t.\u0275cmp=s.Ib({type:t,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(t,e){2&t&&s.Lc("margin-left",e._container._contentMargins.left,"px")("margin-right",e._container._contentMargins.right,"px")},features:[s.zb],ngContentSelectors:P,decls:1,vars:0,template:function(t,e){1&t&&(s.lc(),s.kc(0))},encapsulation:2,changeDetection:0}),t}(),H=function(){var t=function(){function t(e,n,i,r,o,a,c){var u=this;C(this,t),this._elementRef=e,this._focusTrapFactory=n,this._focusMonitor=i,this._platform=r,this._ngZone=o,this._doc=a,this._container=c,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new p.b,this._animationEnd=new p.b,this._animationState="void",this.openedChange=new s.o(!0),this._openedStream=this.openedChange.pipe(Object(m.a)((function(t){return t})),Object(v.a)((function(){}))),this.openedStart=this._animationStarted.pipe(Object(m.a)((function(t){return t.fromState!==t.toState&&0===t.toState.indexOf("open")})),Object(y.a)(void 0)),this._closedStream=this.openedChange.pipe(Object(m.a)((function(t){return!t})),Object(v.a)((function(){}))),this.closedStart=this._animationStarted.pipe(Object(m.a)((function(t){return t.fromState!==t.toState&&"void"===t.toState})),Object(y.a)(void 0)),this._destroyed=new p.b,this.onPositionChanged=new s.o,this._modeChanged=new p.b,this.openedChange.subscribe((function(t){t?(u._doc&&(u._elementFocusedBeforeDrawerWasOpened=u._doc.activeElement),u._takeFocus()):u._isFocusWithinDrawer()&&u._restoreFocus()})),this._ngZone.runOutsideAngular((function(){Object(b.a)(u._elementRef.nativeElement,"keydown").pipe(Object(m.a)((function(t){return t.keyCode===f.f&&!u.disableClose&&!Object(f.r)(t)})),Object(_.a)(u._destroyed)).subscribe((function(t){return u._ngZone.run((function(){u.close(),t.stopPropagation(),t.preventDefault()}))}))})),this._animationEnd.pipe(Object(O.a)((function(t,e){return t.fromState===e.fromState&&t.toState===e.toState}))).subscribe((function(t){var e=t.fromState,n=t.toState;(0===n.indexOf("open")&&"void"===e||"void"===n&&0===e.indexOf("open"))&&u.openedChange.emit(u._opened)}))}return w(t,[{key:"_takeFocus",value:function(){var t=this;this.autoFocus&&this._focusTrap&&this._focusTrap.focusInitialElementWhenReady().then((function(e){e||"function"!=typeof t._elementRef.nativeElement.focus||t._elementRef.nativeElement.focus()}))}},{key:"_restoreFocus",value:function(){this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,this._openedVia):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null,this._openedVia=null)}},{key:"_isFocusWithinDrawer",value:function(){var t,e=null===(t=this._doc)||void 0===t?void 0:t.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}},{key:"ngAfterContentInit",value:function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState()}},{key:"ngAfterContentChecked",value:function(){this._platform.isBrowser&&(this._enableAnimations=!0)}},{key:"ngOnDestroy",value:function(){this._focusTrap&&this._focusTrap.destroy(),this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}},{key:"open",value:function(t){return this.toggle(!0,t)}},{key:"close",value:function(){return this.toggle(!1)}},{key:"_closeViaBackdropClick",value:function(){return this._setOpen(!1,!0)}},{key:"toggle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.opened,e=arguments.length>1?arguments[1]:void 0;return this._setOpen(t,!t&&this._isFocusWithinDrawer(),e)}},{key:"_setOpen",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"program";return this._opened=t,t?(this._animationState=this._enableAnimations?"open":"open-instant",this._openedVia=i):(this._animationState="void",e&&this._restoreFocus()),this._updateFocusTrapState(),new Promise((function(t){n.openedChange.pipe(Object(k.a)(1)).subscribe((function(e){return t(e?"open":"close")}))}))}},{key:"_getWidth",value:function(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}},{key:"_updateFocusTrapState",value:function(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&"side"!==this.mode)}},{key:"_animationStartListener",value:function(t){this._animationStarted.next(t)}},{key:"_animationDoneListener",value:function(t){this._animationEnd.next(t)}},{key:"position",get:function(){return this._position},set:function(t){(t="end"===t?"end":"start")!=this._position&&(this._position=t,this.onPositionChanged.emit())}},{key:"mode",get:function(){return this._mode},set:function(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}},{key:"disableClose",get:function(){return this._disableClose},set:function(t){this._disableClose=Object(h.c)(t)}},{key:"autoFocus",get:function(){var t=this._autoFocus;return null==t?"side"!==this.mode:t},set:function(t){this._autoFocus=Object(h.c)(t)}},{key:"opened",get:function(){return this._opened},set:function(t){this.toggle(Object(h.c)(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Ob(s.l),s.Ob(l.i),s.Ob(l.h),s.Ob(i.a),s.Ob(s.B),s.Ob(o.d,8),s.Ob(z,8))},t.\u0275cmp=s.Ib({type:t,selectors:[["mat-drawer"]],hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(t,e){1&t&&s.Mc("@transform.start",(function(t){return e._animationStartListener(t)}))("@transform.done",(function(t){return e._animationDoneListener(t)})),2&t&&(s.Db("align",null),s.Nc("@transform",e._animationState),s.Gb("mat-drawer-end","end"===e.position)("mat-drawer-over","over"===e.mode)("mat-drawer-push","push"===e.mode)("mat-drawer-side","side"===e.mode)("mat-drawer-opened",e.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:P,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(t,e){1&t&&(s.lc(),s.Ub(0,"div",0),s.kc(1),s.Tb())},encapsulation:2,data:{animation:[F.transformDrawer]},changeDetection:0}),t}(),q=function(){var t=function(){function t(e,n,i,r,o){var a=this,c=arguments.length>5&&void 0!==arguments[5]&&arguments[5],u=arguments.length>6?arguments[6]:void 0;C(this,t),this._dir=e,this._element=n,this._ngZone=i,this._changeDetectorRef=r,this._animationMode=u,this._drawers=new s.F,this.backdropClick=new s.o,this._destroyed=new p.b,this._doCheckSubject=new p.b,this._contentMargins={left:null,right:null},this._contentMarginChanges=new p.b,e&&e.change.pipe(Object(_.a)(this._destroyed)).subscribe((function(){a._validateDrawers(),a.updateContentMargins()})),o.change().pipe(Object(_.a)(this._destroyed)).subscribe((function(){return a.updateContentMargins()})),this._autosize=c}return w(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._allDrawers.changes.pipe(Object(T.a)(this._allDrawers),Object(_.a)(this._destroyed)).subscribe((function(e){t._drawers.reset(e.filter((function(e){return!e._container||e._container===t}))),t._drawers.notifyOnChanges()})),this._drawers.changes.pipe(Object(T.a)(null)).subscribe((function(){t._validateDrawers(),t._drawers.forEach((function(e){t._watchDrawerToggle(e),t._watchDrawerPosition(e),t._watchDrawerMode(e)})),(!t._drawers.length||t._isDrawerOpen(t._start)||t._isDrawerOpen(t._end))&&t.updateContentMargins(),t._changeDetectorRef.markForCheck()})),this._ngZone.runOutsideAngular((function(){t._doCheckSubject.pipe(Object(S.a)(10),Object(_.a)(t._destroyed)).subscribe((function(){return t.updateContentMargins()}))}))}},{key:"ngOnDestroy",value:function(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}},{key:"open",value:function(){this._drawers.forEach((function(t){return t.open()}))}},{key:"close",value:function(){this._drawers.forEach((function(t){return t.close()}))}},{key:"updateContentMargins",value:function(){var t=this,e=0,n=0;if(this._left&&this._left.opened)if("side"==this._left.mode)e+=this._left._getWidth();else if("push"==this._left.mode){var i=this._left._getWidth();e+=i,n-=i}if(this._right&&this._right.opened)if("side"==this._right.mode)n+=this._right._getWidth();else if("push"==this._right.mode){var r=this._right._getWidth();n+=r,e-=r}n=n||null,(e=e||null)===this._contentMargins.left&&n===this._contentMargins.right||(this._contentMargins={left:e,right:n},this._ngZone.run((function(){return t._contentMarginChanges.next(t._contentMargins)})))}},{key:"ngDoCheck",value:function(){var t=this;this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular((function(){return t._doCheckSubject.next()}))}},{key:"_watchDrawerToggle",value:function(t){var e=this;t._animationStarted.pipe(Object(m.a)((function(t){return t.fromState!==t.toState})),Object(_.a)(this._drawers.changes)).subscribe((function(t){"open-instant"!==t.toState&&"NoopAnimations"!==e._animationMode&&e._element.nativeElement.classList.add("mat-drawer-transition"),e.updateContentMargins(),e._changeDetectorRef.markForCheck()})),"side"!==t.mode&&t.openedChange.pipe(Object(_.a)(this._drawers.changes)).subscribe((function(){return e._setContainerClass(t.opened)}))}},{key:"_watchDrawerPosition",value:function(t){var e=this;t&&t.onPositionChanged.pipe(Object(_.a)(this._drawers.changes)).subscribe((function(){e._ngZone.onMicrotaskEmpty.pipe(Object(k.a)(1)).subscribe((function(){e._validateDrawers()}))}))}},{key:"_watchDrawerMode",value:function(t){var e=this;t&&t._modeChanged.pipe(Object(_.a)(Object(g.a)(this._drawers.changes,this._destroyed))).subscribe((function(){e.updateContentMargins(),e._changeDetectorRef.markForCheck()}))}},{key:"_setContainerClass",value:function(t){var e=this._element.nativeElement.classList,n="mat-drawer-container-has-open";t?e.add(n):e.remove(n)}},{key:"_validateDrawers",value:function(){var t=this;this._start=this._end=null,this._drawers.forEach((function(e){"end"==e.position?t._end=e:t._start=e})),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}},{key:"_isPushed",value:function(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}},{key:"_onBackdropClicked",value:function(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}},{key:"_closeModalDrawersViaBackdrop",value:function(){var t=this;[this._start,this._end].filter((function(e){return e&&!e.disableClose&&t._canHaveBackdrop(e)})).forEach((function(t){return t._closeViaBackdropClick()}))}},{key:"_isShowingBackdrop",value:function(){return this._isDrawerOpen(this._start)&&this._canHaveBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._canHaveBackdrop(this._end)}},{key:"_canHaveBackdrop",value:function(t){return"side"!==t.mode||!!this._backdropOverride}},{key:"_isDrawerOpen",value:function(t){return null!=t&&t.opened}},{key:"start",get:function(){return this._start}},{key:"end",get:function(){return this._end}},{key:"autosize",get:function(){return this._autosize},set:function(t){this._autosize=Object(h.c)(t)}},{key:"hasBackdrop",get:function(){return null==this._backdropOverride?!this._start||"side"!==this._start.mode||!this._end||"side"!==this._end.mode:this._backdropOverride},set:function(t){this._backdropOverride=null==t?null:Object(h.c)(t)}},{key:"scrollable",get:function(){return this._userContent||this._content}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Ob(d.b,8),s.Ob(s.l),s.Ob(s.B),s.Ob(s.h),s.Ob(r.h),s.Ob(B),s.Ob(x.a,8))},t.\u0275cmp=s.Ib({type:t,selectors:[["mat-drawer-container"]],contentQueries:function(t,e,n){var i;1&t&&(s.Hb(n,V,!0),s.Hb(n,H,!0)),2&t&&(s.zc(i=s.cc())&&(e._content=i.first),s.zc(i=s.cc())&&(e._allDrawers=i))},viewQuery:function(t,e){var n;1&t&&s.Wc(V,!0),2&t&&s.zc(n=s.cc())&&(e._userContent=n.first)},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(t,e){2&t&&s.Gb("mat-drawer-container-explicit-backdrop",e._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[s.Bb([{provide:z,useExisting:t}])],ngContentSelectors:D,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],[4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"]],template:function(t,e){1&t&&(s.lc(M),s.Oc(0,A,1,2,"div",0),s.kc(1),s.kc(2,1),s.Oc(3,I,2,0,"mat-drawer-content",1)),2&t&&(s.mc("ngIf",e.hasBackdrop),s.Cb(3),s.mc("ngIf",!e._content))},directives:[o.n,V],styles:[U],encapsulation:2,changeDetection:0}),t}(),$=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a){return C(this,n),e.call(this,t,i,r,o,a)}return n}(V);return t.\u0275fac=function(e){return new(e||t)(s.Ob(s.h),s.Ob(Object(s.V)((function(){return G}))),s.Ob(s.l),s.Ob(r.f),s.Ob(s.B))},t.\u0275cmp=s.Ib({type:t,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],hostVars:4,hostBindings:function(t,e){2&t&&s.Lc("margin-left",e._container._contentMargins.left,"px")("margin-right",e._container._contentMargins.right,"px")},features:[s.zb],ngContentSelectors:P,decls:1,vars:0,template:function(t,e){1&t&&(s.lc(),s.kc(0))},encapsulation:2,changeDetection:0}),t}(),Q=function(){var t=function(t){a(n,t);var e=c(n);function n(){var t;return C(this,n),(t=e.apply(this,arguments))._fixedInViewport=!1,t._fixedTopGap=0,t._fixedBottomGap=0,t}return w(n,[{key:"fixedInViewport",get:function(){return this._fixedInViewport},set:function(t){this._fixedInViewport=Object(h.c)(t)}},{key:"fixedTopGap",get:function(){return this._fixedTopGap},set:function(t){this._fixedTopGap=Object(h.f)(t)}},{key:"fixedBottomGap",get:function(){return this._fixedBottomGap},set:function(t){this._fixedBottomGap=Object(h.f)(t)}}]),n}(H);return t.\u0275fac=function(e){return W(e||t)},t.\u0275cmp=s.Ib({type:t,selectors:[["mat-sidenav"]],hostAttrs:["tabIndex","-1",1,"mat-drawer","mat-sidenav"],hostVars:17,hostBindings:function(t,e){2&t&&(s.Db("align",null),s.Lc("top",e.fixedInViewport?e.fixedTopGap:null,"px")("bottom",e.fixedInViewport?e.fixedBottomGap:null,"px"),s.Gb("mat-drawer-end","end"===e.position)("mat-drawer-over","over"===e.mode)("mat-drawer-push","push"===e.mode)("mat-drawer-side","side"===e.mode)("mat-drawer-opened",e.opened)("mat-sidenav-fixed",e.fixedInViewport))},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],features:[s.zb],ngContentSelectors:P,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(t,e){1&t&&(s.lc(),s.Ub(0,"div",0),s.kc(1),s.Tb())},encapsulation:2,data:{animation:[F.transformDrawer]},changeDetection:0}),t}(),W=s.Wb(Q),G=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(q);return t.\u0275fac=function(e){return Y(e||t)},t.\u0275cmp=s.Ib({type:t,selectors:[["mat-sidenav-container"]],contentQueries:function(t,e,n){var i;1&t&&(s.Hb(n,$,!0),s.Hb(n,Q,!0)),2&t&&(s.zc(i=s.cc())&&(e._content=i.first),s.zc(i=s.cc())&&(e._allDrawers=i))},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(t,e){2&t&&s.Gb("mat-drawer-container-explicit-backdrop",e._backdropOverride)},exportAs:["matSidenavContainer"],features:[s.Bb([{provide:z,useExisting:t}]),s.zb],ngContentSelectors:N,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],["cdkScrollable","",4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"],["cdkScrollable",""]],template:function(t,e){1&t&&(s.lc(L),s.Oc(0,R,1,2,"div",0),s.kc(1),s.kc(2,1),s.Oc(3,j,2,0,"mat-sidenav-content",1)),2&t&&(s.mc("ngIf",e.hasBackdrop),s.Cb(3),s.mc("ngIf",!e._content))},directives:[o.n,$,r.b],styles:[U],encapsulation:2,changeDetection:0}),t}(),Y=s.Wb(G),K=function(){var t=function t(){C(this,t)};return t.\u0275mod=s.Mb({type:t}),t.\u0275inj=s.Lb({factory:function(e){return new(e||t)},imports:[[o.c,u.j,i.b,r.c],r.c,u.j]}),t}()},P4Xx:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n("IdLP"),r=n("FU6l"),o=n("YtkY"),a=n("X0qr"),s=n("GoAz");function c(){for(var t=arguments.length,e=new Array(t),n=0;n3&&239===e[0]&&187===e[1]&&191===e[2],_=0;_0?0==(128&O)?s=!1:c--:0!=(128&O)&&(0==(64&O)?s=!1:(c++,0==(32&O)?u++:(c++,0==(16&O)?l++:(c++,0==(8&O)?d++:s=!1))))),o&&(O>127&&O<160?o=!1:O>159&&(O<192||215===O||247===O)&&v++),a&&(h>0?O<64||127===O||O>252?a=!1:h--:128===O||160===O||O>239?a=!1:O>160&&O<224?(f++,b=0,++p>g&&(g=p)):O>127?(h++,p=0,++b>m&&(m=b)):(p=0,b=0))}return s&&c>0&&(s=!1),a&&h>0&&(a=!1),s&&(y||u+l+d>0)?t.UTF8:a&&(t.ASSUME_SHIFT_JIS||g>=3||m>=3)?t.SHIFT_JIS:o&&a?2===g&&2===f||10*v>=r?t.SHIFT_JIS:t.ISO88591:o?t.ISO88591:a?t.SHIFT_JIS:s?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.SHIFT_JIS=r.default.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=r.default.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=r.default.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}()},PNff:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=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}()},PSEG:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("Qkwj"),r=n("qArU"),o=n("e9V9"),a=n("dyLe"),s=n("va0y"),c=n("LqyJ");e.default=function(){function t(t){this.image=t,this.rectangleDetector=new s.default(t)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),n=e[0],o=e[1],a=e[2],s=e[3],l=[];l.push(this.transitionsBetween(n,o)),l.push(this.transitionsBetween(n,a)),l.push(this.transitionsBetween(o,s)),l.push(this.transitionsBetween(a,s)),l.sort(u.resultPointsAndTransitionsComparator);var d=l[0],h=l[1],f=new Map;t.increment(f,d.getFrom()),t.increment(f,d.getTo()),t.increment(f,h.getFrom()),t.increment(f,h.getTo());for(var p=null,b=null,g=null,m=0,v=Array.from(f.entries());m=7*(x+=2)||4*x>=7*E)null==(S=this.correctTopRightRectangular(b,k,C,w,E,x))&&(S=w),1==(1&(E=this.transitionsBetween(C,S).getTransitions()))&&E++,1==(1&(x=this.transitionsBetween(k,S).getTransitions()))&&x++,T=t.sampleGrid(this.image,C,b,k,S,E,x);else{var P=Math.min(x,E);null==(S=this.correctTopRight(b,k,C,w,P))&&(S=w);var A=Math.max(this.transitionsBetween(C,S).getTransitions(),this.transitionsBetween(k,S).getTransitions());1==(1&++A)&&A++,T=t.sampleGrid(this.image,C,b,k,S,A,A)}return new r.default(T,[C,b,k,S])},t.prototype.correctTopRightRectangular=function(e,n,r,o,a,s){var c=t.distance(e,n)/a,u=t.distance(r,o),l=(o.getX()-r.getX())/u,d=(o.getY()-r.getY())/u,h=new i.default(o.getX()+c*l,o.getY()+c*d);c=t.distance(e,r)/s,u=t.distance(n,o),l=(o.getX()-n.getX())/u,d=(o.getY()-n.getY())/u;var f=new i.default(o.getX()+c*l,o.getY()+c*d);return this.isValid(h)?this.isValid(f)?Math.abs(a-this.transitionsBetween(r,h).getTransitions())+Math.abs(s-this.transitionsBetween(n,h).getTransitions())<=Math.abs(a-this.transitionsBetween(r,f).getTransitions())+Math.abs(s-this.transitionsBetween(n,f).getTransitions())?h:f:h:this.isValid(f)?f:null},t.prototype.correctTopRight=function(e,n,r,o,a){var s=t.distance(e,n)/a,c=t.distance(r,o),u=(o.getX()-r.getX())/c,l=(o.getY()-r.getY())/c,d=new i.default(o.getX()+s*u,o.getY()+s*l);s=t.distance(e,r)/a,c=t.distance(n,o),u=(o.getX()-n.getX())/c,l=(o.getY()-n.getY())/c;var h=new i.default(o.getX()+s*u,o.getY()+s*l);return this.isValid(d)?this.isValid(h)?Math.abs(this.transitionsBetween(r,d).getTransitions()-this.transitionsBetween(n,d).getTransitions())<=Math.abs(this.transitionsBetween(r,h).getTransitions()-this.transitionsBetween(n,h).getTransitions())?d:h:d:this.isValid(h)?h:null},t.prototype.isValid=function(t){return t.getX()>=0&&t.getX()0&&t.getY()Math.abs(r-n);if(a){var s=n;n=i,i=s,s=r,r=o,o=s}for(var c=Math.abs(r-n),l=Math.abs(o-i),d=-c/2,h=i0){if(m===o)break;m+=h,d-=c}}return new u(t,e,p)},t}();var u=function(){function t(t,e,n){this.from=t,this.to=e,this.transitions=n}return t.prototype.getFrom=function(){return this.from},t.prototype.getTo=function(){return this.to},t.prototype.getTransitions=function(){return this.transitions},t.prototype.toString=function(){return this.from+"/"+this.to+"/"+this.transitions},t.resultPointsAndTransitionsComparator=function(t,e){return t.getTransitions()-e.getTransitions()},t}()},PdLq:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("n5WT"),r=n("ooS/"),o=n("686E");e.default=function(){function t(){}return t.decodeRow=function(t,e,n){var a=i.default.findGuardPattern(e,n,!1,this.EXTENSION_START_PATTERN,new Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new r.default).decodeRow(t,e,a)}catch(s){return(new o.default).decodeRow(t,e,a)}},t.EXTENSION_START_PATTERN=[1,1,2],t}()},PqQh:function(t,e,n){var i=n("yBEi").getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,n=i(t),r=145===n?26:2*Math.ceil((n-13)/(2*e-2)),o=[n-7],a=1;a0),o.Cb(1),o.mc("ngTemplateOutlet",r)("ngTemplateOutletContext",o.rc(3,b,n))}}function v(t,e){if(1&t&&(o.Ub(0,"div",7),o.Ub(1,"div"),o.Qc(2),o.gc(3,"translate"),o.Tb(),o.Ub(4,"div",8),o.Oc(5,g,3,5,"ng-container",9),o.Tb(),o.Tb()),2&t){var n=e.$implicit;o.Cb(2),o.Rc(o.hc(3,2,n[0])),o.Cb(3),o.mc("ngForOf",n[1])}}function y(t,e){if(1&t&&(o.Ub(0,"section",4),o.Ub(1,"h2",5),o.Qc(2),o.gc(3,"translate"),o.Tb(),o.Oc(4,v,6,4,"div",6),o.Tb()),2&t){var n=e.$implicit;o.Cb(2),o.Rc(o.hc(3,2,n[0])),o.Cb(2),o.mc("ngForOf",n[1].entrySeq())}}function _(t,e){if(1&t&&(o.Ub(0,"span"),o.Qc(1),o.Tb()),2&t){var n=o.fc(2).$implicit;o.Cb(1),o.Rc("then"===n.type?" ":"+")}}function O(t,e){if(1&t&&(o.Sb(0),o.Oc(1,_,2,1,"span",14),o.Ub(2,"span",15),o.Qc(3),o.Tb(),o.Rb()),2&t){var n=e.$implicit,i=e.index;o.Cb(1),o.mc("ngIf",i>0),o.Cb(2),o.Rc(n)}}function k(t,e){if(1&t&&(o.Ub(0,"div",13),o.Oc(1,O,4,2,"ng-container",9),o.Tb()),2&t){var n=e.$implicit;o.Cb(1),o.mc("ngForOf",n.keys)}}var T=function(){var t=function(){function t(){C(this,t),this.rawKeybinds={global:{"DIALOG.SHORTCUTS.SHORTCUT_DIALOG":["?","shift+/"],"DIALOG.SHORTCUTS.GO_TO_FUTURES_TRADING":["g f"],"DIALOG.SHORTCUTS.GO_TO_WALLETS":["g w"],"DIALOG.SHORTCUTS.GO_TO_HISTORY":["g l"],"DIALOG.SHORTCUTS.GO_TO_ASSIGNMENT":["g a"],"DIALOG.SHORTCUTS.GO_TO_SUPPORT":["g h"],"DIALOG.SHORTCUTS.GO_TO_SETTINGS":["g s"],"DIALOG.SHORTCUTS.ALT":["alt/option"]},trading:{"DIALOG.SHORTCUTS.MARKET_PICKER":["m"],"DIALOG.SHORTCUTS.SWITCH_LAYOUT":["1...6"]},orderbook:{"TOOLTIP.INCREASE_ORDER_GROUPING":["\ufe62","="],"TOOLTIP.DECREASE_ORDER_GROUPING":["\uff0d","_"]},order_form:{"DIALOG.SHORTCUTS.START_LIMIT_ORDER":["shift+l"],"DIALOG.SHORTCUTS.START_MARKET_ORDER":["shift+m"],"DIALOG.SHORTCUTS.TOGGLE_MAKER_ONLY":["shift+a"],"DIALOG.SHORTCUTS.TOGGLE_REDUCE_ONLY":["shift+r"]}}}return w(t,[{key:"keybinds",get:function(){return Object(i.c)(this.rawKeybinds).mapEntries((function(t){var e=m(t,2),n=e[0],o=e[1],a=Object(i.c)(o).map(S);return[Object(r.Q)("HEADING."+n),a]}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Ib({type:t,selectors:[["shortcuts-cheatsheet"]],decls:5,vars:1,consts:[["heading","HEADING.KEYBOARD_SHORTCUTS"],[1,"nutrition","keybinds"],["class","combo-concern",4,"ngFor","ngForOf"],["comboTmpl",""],[1,"combo-concern"],["ghost","","uppercase",""],["class","nutrition__detail grid-0-1 gap-m",4,"ngFor","ngForOf"],[1,"nutrition__detail","grid-0-1","gap-m"],[1,"comboset"],[4,"ngFor","ngForOf"],["translate","",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["translate",""],[1,"combo"],[4,"ngIf"],["mono","",1,"key"]],template:function(t,e){1&t&&(o.Ub(0,"pro-dialog",0),o.Ub(1,"div",1),o.Oc(2,y,5,4,"section",2),o.Tb(),o.Tb(),o.Oc(3,k,2,1,"ng-template",null,3,o.Pc)),2&t&&(o.Cb(2),o.mc("ngForOf",e.keybinds.entrySeq()))},directives:[a.a,s.a,c.m,u.a,l.a,c.n,c.s,d.a,h.a],pipes:[d.d],styles:[".scroll-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:100%}.keybinds[_ngcontent-%COMP%]{-moz-columns:2 50ch;columns:50ch 2;-moz-column-gap:var(--spacing-xl);column-gap:var(--spacing-xl);-moz-column-rule:1px dashed var(--ghost-colour);column-rule:1px dashed var(--ghost-colour);color:var(--text-colour);font-family:var(--typeface);font-size:.95rem}.keybinds[_ngcontent-%COMP%] section[_ngcontent-%COMP%]:not(:last-of-type){margin-bottom:var(--spacing-l)}.keybinds[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:1.15rem}.combo-concern[_ngcontent-%COMP%]{-moz-column-break-inside:avoid;break-inside:avoid}.comboset[_ngcontent-%COMP%]{display:inline-block;margin-left:var(--spacing-l)}.combo[_ngcontent-%COMP%]{white-space:nowrap}.combo[_ngcontent-%COMP%], .key[_ngcontent-%COMP%]{display:inline-block;margin:0 var(--spacing-s)}.key[_ngcontent-%COMP%]{padding:var(--spacing-s) var(--spacing);background-color:var(--tooltip-bg);border:solid var(--n400);border-width:1px 1px 3px;border-radius:var(--bdrs)}"],changeDetection:0}),t}();function S(t){return t.map(r.M).map(E)}function E(t){return t.includes(" ")?{type:"then",keys:t.split(" ")}:{type:"and",keys:t.split("+")}}},Q7YU:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r}));var i={allowed:["Afghanistan","Aland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bonaire","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo","Cook Islands","Costa Rica","Croatia","Cuba","Curacao","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands (Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard Island and McDonald Islands","Vatican City State","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Ivory Coast","Jamaica","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kuwait","Kyrgyzstan","Lao","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macao","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russia","Rwanda","Saint Barthelemy","Saint Helena","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","United States Virgin Islands","Uruguay","Uzbekistan","Vanuatu","Venezuela","Vietnam","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe"],disallowed:["Algeria","Bangladesh","Bolivia","Cambodia","Ecuador","Iran","Japan","Lebanon","Nepal","North Korea","Vietnam","Syria","United States"]},r=[].concat(b(i.allowed),b(i.disallowed))},QHMR:function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var i=n("kZht"),r=n("yPvj"),o=n("anSm"),a=n("1o0v"),s=n("An66"),c=n("chaP"),u=n("+e22"),l=n("rqGg"),d=n("aDqW"),h=n("rUBT"),f=n("DpwM"),p=n("09eR");function b(t,e){if(1&t&&(i.Sb(0),i.Qc(1),i.gc(2,"pair"),i.Pb(3,"market-icon",1),i.gc(4,"quote"),i.Rb()),2&t){var n=i.fc();i.Cb(1),i.Sc(" ",i.hc(2,2,n.primaryTicker)," "),i.Cb(2),i.mc("base",i.hc(4,4,n.primaryTicker.product_id))}}function g(t,e){if(1&t&&(i.Sb(0),i.Qc(1),i.gc(2,"sato"),i.gc(3,"mid"),i.Pb(4,"change",7),i.Rb()),2&t){var n=i.fc();i.Cb(1),i.Sc(" ",i.ic(2,2,i.hc(3,5,n.primaryTicker),n.primaryTicker)," "),i.Cb(3),i.mc("value",n.primaryTicker.change)}}var m=function(t){return{num:t}},v=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["market-picker-asset"]],inputs:{asset:"asset",primaryTicker:"primaryTicker",tickers:"tickers",count:"count"},decls:13,vars:14,consts:[[1,"icon"],[3,"base"],["body","",1,"asset"],["body","","ghost","",1,"count"],["body","",1,"price"],[4,"ngIf"],["body","","mono","",1,"change"],[3,"value"]],template:function(t,e){1&t&&(i.Ub(0,"div",0),i.Pb(1,"market-icon",1),i.gc(2,"asset"),i.Tb(),i.Ub(3,"div",2),i.Qc(4),i.gc(5,"asset"),i.Tb(),i.Ub(6,"div",3),i.Qc(7),i.gc(8,"translate"),i.Tb(),i.Ub(9,"div",4),i.Oc(10,b,5,6,"ng-container",5),i.Tb(),i.Ub(11,"div",6),i.Oc(12,g,5,7,"ng-container",5),i.Tb()),2&t&&(i.Cb(1),i.mc("base",i.hc(2,5,e.asset)),i.Cb(3),i.Rc(i.hc(5,7,e.asset)),i.Cb(3),i.Sc(" ",i.ic(8,9,"LABEL.N_MARKETS",i.rc(12,m,e.count)),"\n"),i.Cb(3),i.mc("ngIf",e.primaryTicker),i.Cb(2),i.mc("ngIf",e.primaryTicker))},directives:[r.a,o.a,a.a,s.n,c.a,u.a],pipes:[l.a,d.d,h.e,h.f,f.c,p.a],styles:['[_nghost-%COMP%]{display:block;padding:var(--spacing-s) var(--spacing);height:48px;display:grid;grid-template:"icon pair price" auto "icon count change" auto/min-content 1fr min-content;gap:var(--spacing-s) var(--spacing-ml);align-items:center;border-radius:var(--bdrs)}.icon[_ngcontent-%COMP%]{grid-area:icon;font-size:20px}.icon[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{cursor:pointer}.asset[_ngcontent-%COMP%]{grid-area:pair;align-self:end;font-size:14px;color:var(--pair-color,var(--text-colour))}.count[_ngcontent-%COMP%]{grid-area:count;align-self:start}.change[_ngcontent-%COMP%], .price[_ngcontent-%COMP%]{text-align:right}.price[_ngcontent-%COMP%]{grid-area:price;align-self:end}.change[_ngcontent-%COMP%]{grid-area:change;align-self:start;white-space:nowrap}'],changeDetection:0}),t}()},QQZH:function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var i=n("ZTXN"),r=n("kSHZ"),s=n("bwdy"),u=n("A2S1"),l=n("MiDb"),d=n("yTkW"),f=function(t){a(n,t);var e=c(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,o=arguments.length>2?arguments[2]:void 0;return C(this,n),(t=e.call(this)).scheduler=o,t._events=[],t._infiniteTimeWindow=!1,t._bufferSize=i<1?1:i,t._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(t._infiniteTimeWindow=!0,t.next=t.nextInfiniteTimeWindow):t.next=t.nextTimeWindow,t}return w(n,[{key:"nextInfiniteTimeWindow",value:function(t){if(!this.isStopped){var e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}o(h(n.prototype),"next",this).call(this,t)}},{key:"nextTimeWindow",value:function(t){this.isStopped||(this._events.push(new p(this._getNow(),t)),this._trimBufferThenGetEvents()),o(h(n.prototype),"next",this).call(this,t)}},{key:"_subscribe",value:function(t){var e,n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;if(this.closed)throw new l.a;if(this.isStopped||this.hasError?e=s.a.EMPTY:(this.observers.push(t),e=new d.a(this,t)),r&&t.add(t=new u.a(t,r)),n)for(var a=0;ae&&(o=Math.max(o,r-e)),o>0&&i.splice(0,o),i}}]),n}(i.b),p=function t(e,n){C(this,t),this.time=e,this.value=n}},Qbn9:function(t,e,n){"use strict";n.d(e,"e",(function(){return i})),n.d(e,"f",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return c}));var i=1e3,r=60,o=r*i,a=60,s=a*o,c=r*a*24},QdGC:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){"Escape"===t.key&&t.target&&"blur"in t.target&&(t.preventDefault(),t.target.blur())}},Qkwj:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("dyLe"),r=n("BfNR");e.default=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){return e instanceof t&&this.x===e.x&&this.y===e.y},t.prototype.hashCode=function(){return 31*r.default.floatToIntBits(this.x)+r.default.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(t){var e,n,i,r=this.distance(t[0],t[1]),o=this.distance(t[1],t[2]),a=this.distance(t[0],t[2]);if(o>=r&&o>=a?(n=t[0],e=t[1],i=t[2]):a>=o&&a>=r?(n=t[1],e=t[0],i=t[2]):(n=t[2],e=t[0],i=t[1]),this.crossProductZ(e,n,i)<0){var s=e;e=i,i=s}t[0]=e,t[1]=n,t[2]=i},t.distance=function(t,e){return i.default.distance(t.x,t.y,e.x,e.y)},t.crossProductZ=function(t,e,n){var i=e.x,r=e.y;return(n.x-i)*(t.y-r)-(n.y-r)*(t.x-i)},t}()},QmxK:function(t,e,n){"use strict";n.d(e,"b",(function(){return I})),n.d(e,"a",(function(){return M}));var i=n("P4Xx"),r=n("i9xl"),s=n("ROBh"),u=n("YtkY"),l=n("iT4G"),d=n("xVbo"),f=n("5uGe");function p(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;return function(e){return e.lift(new g(t,e))}}var b,g=function(){function t(e,n){C(this,t),this.count=e,this.source=n}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new v(t,this.count,this.source))}}]),t}(),v=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,t)).count=i,o.source=r,o}return w(n,[{key:"error",value:function(t){if(!this.isStopped){var e=this.source,i=this.count;if(0===i)return o(h(n.prototype),"error",this).call(this,t);i>-1&&(this.count=i-1),e.subscribe(this._unsubscribeAndRecycle())}}}]),n}(f.a),y=n("4e/d"),_=n("J+dc"),O=n("7SLS"),k=n("i67J"),T=n("sXtk"),S=n("7UDb"),E=n("yBos"),x=n("Qbn9"),P=n("kZht"),A=n("6uGs"),I={"trading-rest":!0,"trading-ws":!0,auth:!0,charts:!1},M=((b=function(){function t(e,n){C(this,t),this.http=e,this.env=n}return w(t,[{key:"checkSystemHealth",value:function(){return Object(i.a)([this.checkTradingRestHealth(),this.checkTradingWsHealth(),this.checkAuthHealth(),this.checkChartsHealth()]).pipe(Object(u.a)((function(t){var e=m(t,4);return{"trading-rest":e[0],"trading-ws":e[1],auth:e[2],charts:e[3]}})))}},{key:"healthWebsocket",value:function(){var t=this;return Object(r.a)((function(){return Object(E.a)({url:t.env.urls.healthWs}).pipe(Object(l.a)(11*x.e))})).pipe(Object(k.l)(200),Object(d.a)((function(t){return"status"===t.event})),Object(u.a)((function(t){var e=t.data;return{"trading-rest":e.trade,"trading-ws":e.tradeWebsocket,auth:e.auth,charts:e.chart}})))}},{key:"checkTradingRestHealth",value:function(){return this.http.get(this.env.urls.rest+"/readiness?health-check",S.a).pipe(p(2),Object(l.a)(2*x.e),Object(u.a)((function(t){return t.ready?"operational":"degraded"})),Object(y.a)((function(t){var e,n,i;return 503===t.status&&14===(null===(i=null===(n=null===(e=null==t?void 0:t.error)||void 0===e?void 0:e.errors)||void 0===n?void 0:n[0])||void 0===i?void 0:i.code)?Object(s.a)("maintenance"):Object(s.a)("offline")})))}},{key:"checkTradingWsHealth",value:function(){var t=this.env.urls.websocket+"?health-check";return Object(E.a)(t).pipe(p(2),Object(_.a)(1),Object(l.a)(2*x.e),Object(O.a)("operational"),Object(y.a)((function(){return Object(s.a)("offline")})))}},{key:"checkAuthHealth",value:function(){return this.http.get(this.env.urls.auth+"/test?health-check",S.a).pipe(p(2),Object(l.a)(2*x.e),Object(O.a)("operational"),Object(y.a)((function(){return Object(s.a)("offline")})))}},{key:"checkChartsHealth",value:function(){return this.http.get(this.env.urls.rest+"/charts/?health-check",S.a).pipe(p(2),Object(l.a)(2*x.e),Object(O.a)("operational"),Object(y.a)((function(){return Object(s.a)("offline")})))}}]),t}()).\u0275fac=function(t){return new(t||b)(P.Yb(A.a),P.Yb(T.a))},b.\u0275prov=P.Kb({token:b,factory:b.\u0275fac,providedIn:"root"}),b)},Qohw:function(t,e,n){"use strict";n.r(e),n.d(e,"TabSettingsComponent",(function(){return K}));var i=n("D57K"),o=n("mcff"),a=n("zqNl"),s=n("YtkY"),c=n("xVbo"),u=n("uJYd"),l=n("0tVE"),d=n("bjK4"),h=n("+Px6"),f=n("qAYy"),p=n("rxqU"),b=n("gxtV"),g=n("kZht"),m=n("rfPA"),v=n("bBQR"),y=n("gx5s"),_=n("1etq"),O=n("An66"),k=n("LBlH"),T=n("y1fC"),S=n("pPqe"),E=n("aDqW"),x=n("anSm"),P=n("NxuZ"),A=n("WYJo"),I=n("UDV5"),M=n("8spT"),D=n("w2Kr"),R=n("DpwM"),j=n("fvDn"),L=["tabSettingsPopper"],N=["tourPositionRef"];function U(t,e){if(1&t){var n=g.Vb();g.Ub(0,"li",4),g.bc("click",(function(){g.Ec(n);var t=e.$implicit;return g.fc().filterComponents(t)})),g.Qc(1),g.gc(2,"translate"),g.Tb()}if(2&t){var i=e.$implicit,r=g.fc();g.Gb("component--active",i===r.filterSettings),g.Cb(1),g.Sc(" ",g.hc(2,3,"HEADING."+i)," ")}}function F(t,e){if(1&t){var n=g.Vb();g.Ub(0,"section"),g.Ub(1,"h2",11),g.Qc(2,"HEADING.ORDERBOOK"),g.Tb(),g.Ub(3,"section",12),g.Ub(4,"p",13),g.Qc(5,"SUBTITLE.ORDERBOOK_GROUPING"),g.Tb(),g.Ub(6,"div"),g.Ub(7,"small",14),g.Qc(8),g.gc(9,"translate"),g.gc(10,"sato"),g.Tb(),g.Ub(11,"fa-icon",15),g.bc("click",(function(){return g.Ec(n),g.fc().decreaseGrouping()})),g.gc(12,"translate"),g.Tb(),g.Ub(13,"fa-icon",16),g.bc("click",(function(){return g.Ec(n),g.fc().increaseGrouping()})),g.gc(14,"translate"),g.Tb(),g.Tb(),g.Ub(15,"mat-checkbox",17),g.bc("change",(function(t){return g.Ec(n),g.fc().setUpdateFormQuantityFromBook(t.checked)})),g.gc(16,"async"),g.Qc(17),g.gc(18,"translate"),g.Tb(),g.Ub(19,"mat-checkbox",17),g.bc("change",(function(t){return g.Ec(n),g.fc().setFullOrderbook(t.checked)})),g.gc(20,"async"),g.Qc(21),g.gc(22,"translate"),g.Tb(),g.Tb(),g.Tb()}if(2&t){var i=e.$implicit,r=g.fc();g.Cb(8),g.Tc(" ",g.hc(9,12,"LABEL.GROUP"),": ",g.ic(10,14,r.groupingTickSize(i.instrument,i.grouping),i.instrument)," "),g.Cb(3),g.Gb("group--disabled",1===i.grouping),g.mc("matTooltip",g.hc(12,17,"TOOLTIP.DECREASE_ORDER_GROUPING")),g.Cb(2),g.Gb("group--disabled",5e3===i.grouping),g.mc("matTooltip",g.hc(14,19,"TOOLTIP.INCREASE_ORDER_GROUPING")),g.Cb(2),g.mc("checked",g.hc(16,21,r.alsoUpdateQuantity$)),g.Cb(2),g.Sc(" ",g.hc(18,23,"LABEL.UPDATE_FORM_QUANTITY_FROM_BOOK")," "),g.Cb(2),g.mc("checked",g.hc(20,25,r.fullOrderbook$)),g.Cb(2),g.Sc(" ",g.hc(22,27,"LABEL.SCROLLABLE_ORDERBOOK_DEPTH")," ")}}function B(t,e){if(1&t){var n=g.Vb();g.Ub(0,"section"),g.Ub(1,"h2",11),g.Qc(2,"HEADING.MARKET_CHART"),g.Tb(),g.Ub(3,"p",13),g.Qc(4,"LABEL.CANDLE_PRICE_TYPES"),g.Tb(),g.Ub(5,"mat-radio-group",18),g.Ub(6,"mat-radio-button",19),g.bc("change",(function(){return g.Ec(n),g.fc().changeChartType("trade")})),g.Ub(7,"p",14),g.Qc(8),g.gc(9,"translate"),g.Tb(),g.Tb(),g.Ub(10,"mat-radio-button",20),g.bc("change",(function(){return g.Ec(n),g.fc().changeChartType("mark")})),g.Ub(11,"p",14),g.Qc(12),g.gc(13,"translate"),g.Tb(),g.Tb(),g.Tb(),g.Ub(14,"mat-checkbox",17),g.bc("change",(function(t){return g.Ec(n),g.fc().setOrdersVisible(t.checked)})),g.Qc(15),g.gc(16,"translate"),g.Tb(),g.Ub(17,"mat-checkbox",17),g.bc("change",(function(t){return g.Ec(n),g.fc().setPositionsVisible(t.checked)})),g.Qc(18),g.gc(19,"translate"),g.Tb(),g.Ub(20,"mat-checkbox",17),g.bc("change",(function(t){return g.Ec(n),g.fc().setLiquidationLineVisible(t.checked)})),g.Qc(21),g.gc(22,"translate"),g.Tb(),g.Tb()}if(2&t){var i=e.$implicit;g.Cb(5),g.mc("value",i.chartType||"trade"),g.Cb(3),g.Rc(g.hc(9,9,"LABEL.TRADE")),g.Cb(4),g.Rc(g.hc(13,11,"LABEL.MARK")),g.Cb(2),g.mc("checked",!i.hideMarketChartOrders),g.Cb(1),g.Sc(" ",g.hc(16,13,"LABEL.SHOW_ORDERS")," "),g.Cb(2),g.mc("checked",!i.hideMarketChartPositions),g.Cb(1),g.Sc(" ",g.hc(19,15,"LABEL.SHOW_POSITIONS")," "),g.Cb(2),g.mc("checked",!i.hideMarketChartLiquidationPrice),g.Cb(1),g.Sc(" ",g.hc(22,17,"LABEL.SHOW_LIQUIDATION_PRICE")," ")}}var z=function(t){return{pair:t}};function V(t,e){if(1&t){var n=g.Vb();g.Ub(0,"section"),g.Ub(1,"p",11),g.Qc(2,"HEADING.POSITION_ORDER_FILTERING"),g.Tb(),g.Ub(3,"mat-checkbox",17),g.bc("change",(function(t){return g.Ec(n),g.fc().setActivityPairFilter(t.checked)})),g.gc(4,"async"),g.Qc(5),g.gc(6,"translate"),g.gc(7,"cryptoAbbreviation"),g.gc(8,"async"),g.Tb(),g.Tb()}if(2&t){var i=g.fc();g.Cb(3),g.mc("checked",g.hc(4,2,i.isFilteredByPair$)),g.Cb(2),g.Sc(" ",g.ic(6,4,"LABEL.POSITION_ORDER_FILTERING",g.rc(11,z,g.hc(7,7,g.hc(8,9,i.selectedMarketPair$))))," ")}}function H(t,e){if(1&t){var n=g.Vb();g.Ub(0,"section"),g.Ub(1,"p",11),g.Qc(2,"HEADING.TRADE_HISTORY"),g.Tb(),g.Ub(3,"mat-checkbox",17),g.bc("change",(function(t){return g.Ec(n),g.fc().setSizeRelativeTradeHistory(t.checked)})),g.gc(4,"async"),g.Qc(5),g.gc(6,"translate"),g.Tb(),g.Tb()}if(2&t){var i=g.fc();g.Cb(3),g.mc("checked",g.hc(4,2,i.sizeRelativeTradeHistory$)),g.Cb(2),g.Sc(" ",g.hc(6,4,"LABEL.SIZE_RELATIVE_COLOR")," ")}}function q(t,e){if(1&t){var n=g.Vb();g.Ub(0,"tour-step",21),g.bc("nextEvent",(function(){return g.Ec(n),g.fc().closeDialog()}))("previousEvent",(function(){return g.Ec(n),g.fc().closeDialog()}))("dispose",(function(){return g.Ec(n),g.fc(),g.Ac(17).dispose()})),g.Ub(1,"p",11),g.Qc(2,"TOUR.WORKSPACES.5"),g.Tb(),g.Tb()}2&t&&g.mc("title","HEADING.COMPONENT_SETTINGS")("nextRouteTo","/futures")}var $=function(){return[!1,"ORDERBOOK"]},Q=function(t,e){return{instrument:t,grouping:e}},W=function(){return[!1,"MARKET_CHART"]},G=function(){return[!1,"POSITIONS_ORDERS"]},Y=function(){return[!1,"TRADE_HISTORY"]},K=function(){var t=function(){function t(e,n,i){C(this,t),this.inputs=e,this.store=n,this.dialogRef=i,this.componentsWithSettings=["ORDERBOOK","MARKET_CHART","POSITIONS_ORDERS","TRADE_HISTORY"],this.filterSettings=!1,this.userData$=this.store.pipe(Object(a.m)(p.a)),this.alsoUpdateQuantity$=this.userData$.pipe(Object(s.a)((function(t){return t.updateFormQuantityFromBook}))),this.isFilteredByPair$=this.userData$.pipe(Object(s.a)((function(t){return t.activityPairFilterOn}))),this.sizeRelativeTradeHistory$=this.userData$.pipe(Object(s.a)((function(t){var e;return null===(e=t.sizeRelativeTradeHistory)||void 0===e||e}))),this.requireOrderConfirmation$=this.userData$.pipe(Object(s.a)((function(t){return t.requireOrderConfirmation}))),this.fullOrderbook$=this.userData$.pipe(Object(s.a)((function(t){return t.fullOrderbook}))),this.selectedMarketPair$=this.store.pipe(Object(a.m)(h.p)),this.selectedInstrument$=this.store.pipe(Object(a.m)(h.n)),this.orderbookGroup$=this.store.pipe(Object(a.m)(d.p)),this.selectedTicker$=this.store.pipe(Object(a.m)(f.p)),this.tour$=this.store.pipe(Object(a.m)(d.k))}return w(t,[{key:"ngOnInit",value:function(){var t;this.filterSettings=null!==(t=this.inputs.title)&&void 0!==t&&t}},{key:"ngAfterViewInit",value:function(){var t=this;this.tour$.pipe(Object(b.b)(this),Object(c.a)((function(t){return t.inProgress})),Object(c.a)((function(t){return"workspaces"===t.type})),Object(c.a)((function(t){return 5===t.step}))).subscribe((function(e){r(e),t.tabSettingsPopper.componentTrigger(t.tourPositionRef,"centerEnd")}))}},{key:"closeDialog",value:function(){this.dialogRef.close()}},{key:"filterComponents",value:function(t){this.filterSettings=t}},{key:"setUpdateFormQuantityFromBook",value:function(t){this.store.dispatch(Object(l.e)({updateFormQuantityFromBook:t}))}},{key:"setActivityPairFilter",value:function(t){this.store.dispatch(Object(l.e)({activityPairFilterOn:t}))}},{key:"decreaseGrouping",value:function(){this.store.dispatch(Object(u.w)({direction:"minus"}))}},{key:"increaseGrouping",value:function(){this.store.dispatch(Object(u.w)({direction:"plus"}))}},{key:"groupingTickSize",value:function(t,e){return t?e*t.tickSize:1}},{key:"setMarkPriceVisible",value:function(t){this.store.dispatch(Object(l.e)({hideMarketChartMarkPrice:!t}))}},{key:"setOrdersVisible",value:function(t){this.store.dispatch(Object(l.e)({hideMarketChartOrders:!t}))}},{key:"setPositionsVisible",value:function(t){this.store.dispatch(Object(l.e)({hideMarketChartPositions:!t}))}},{key:"setLiquidationLineVisible",value:function(t){this.store.dispatch(Object(l.e)({hideMarketChartLiquidationPrice:!t}))}},{key:"setSizeRelativeTradeHistory",value:function(t){this.store.dispatch(Object(l.e)({sizeRelativeTradeHistory:t}))}},{key:"setRequireOrderConfirmation",value:function(t){this.store.dispatch(Object(l.e)({requireOrderConfirmation:t}))}},{key:"changeChartType",value:function(t){this.store.dispatch(Object(l.e)({chartType:t}))}},{key:"setFullOrderbook",value:function(t){this.store.dispatch(Object(l.e)({fullOrderbook:t}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(g.Ob(o.a),g.Ob(a.b),g.Ob(o.d))},t.\u0275cmp=g.Ib({type:t,selectors:[["tab-settings"]],viewQuery:function(t,e){var n;1&t&&(g.Jc(L,!0),g.Jc(N,!0)),2&t&&(g.zc(n=g.cc())&&(e.tabSettingsPopper=n.first),g.zc(n=g.cc())&&(e.tourPositionRef=n.first))},decls:19,vars:23,consts:[["heading","HEADING.COMPONENT_SETTINGS"],[1,"tab-settings"],["tourPositionRef",""],[1,"components"],["selectable","","subheading","",1,"component",3,"click"],["selectable","","subheading","","class","component",3,"component--active","click",4,"ngFor","ngForOf"],[1,"settings"],[4,"ngIf"],["sbPlacement","topStart"],["tabSettingsPopper",""],[3,"title","nextRouteTo","nextEvent","previousEvent","dispose",4,"sbContent"],["subheading","","translate",""],[1,"grouping"],["body","","translate",""],["body",""],["icon","minus","size","2x",3,"matTooltip","click"],["icon","plus","size","2x",3,"matTooltip","click"],["body","",1,"no-border",3,"checked","change"],[3,"value"],["value","trade",3,"change"],["value","mark",3,"change"],[3,"title","nextRouteTo","nextEvent","previousEvent","dispose"]],template:function(t,e){1&t&&(g.Ub(0,"pro-dialog",0),g.Ub(1,"section",1,2),g.Ub(3,"ul",3),g.Ub(4,"li",4),g.bc("click",(function(){return e.filterComponents(!1)})),g.Qc(5),g.gc(6,"translate"),g.Tb(),g.Oc(7,U,3,5,"li",5),g.Tb(),g.Ub(8,"section",6),g.Oc(9,F,23,29,"section",7),g.gc(10,"async"),g.gc(11,"async"),g.Oc(12,B,23,19,"section",7),g.gc(13,"async"),g.Oc(14,V,9,13,"section",7),g.Oc(15,H,7,6,"section",7),g.Tb(),g.Tb(),g.Tb(),g.Ub(16,"sb-popper",8,9),g.Oc(18,q,3,2,"tour-step",10),g.Tb()),2&t&&(g.Cb(4),g.Gb("component--active",!1===e.filterSettings),g.Cb(1),g.Sc(" ",g.hc(6,8,"HEADING.ALL_COMPONENTS")," "),g.Cb(2),g.mc("ngForOf",e.componentsWithSettings),g.Cb(2),g.mc("ngIf",g.qc(16,$).includes(e.filterSettings)&&g.sc(17,Q,g.hc(10,10,e.selectedInstrument$),g.hc(11,12,e.orderbookGroup$))),g.Cb(3),g.mc("ngIf",g.qc(20,W).includes(e.filterSettings)&&g.hc(13,14,e.userData$)),g.Cb(2),g.mc("ngIf",g.qc(21,G).includes(e.filterSettings)),g.Cb(1),g.mc("ngIf",g.qc(22,Y).includes(e.filterSettings)))},directives:[m.a,v.a,y.a,_.a,O.m,O.n,k.a,T.a,S.a,E.a,x.a,P.b,A.a,I.a,M.b,M.a,D.a],pipes:[E.d,O.b,R.c,j.a],styles:[".tab-settings[_ngcontent-%COMP%]{display:flex;width:550px}.components[_ngcontent-%COMP%]{align-self:flex-start;background-color:var(--card-colour);border:1px solid var(--border-colour);border-left:0;margin-right:var(--spacing-l)}.components[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{align-items:center;border-left:solid var(--border-colour) var(--spacing-s);cursor:pointer;display:flex;padding:var(--spacing);width:250px}.components[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:not(:last-of-type){border-bottom:1px solid var(--border-colour)}.settings[_ngcontent-%COMP%]{width:100%}.settings[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:var(--spacing);padding-bottom:var(--spacing);width:100%}.settings[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(:last-of-type){border-bottom:1px solid var(--border-colour)}.settings[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > h2[_ngcontent-%COMP%], .settings[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.component--active[_ngcontent-%COMP%]{border-left:solid var(--icon-colour) var(--spacing-s)!important;color:var(--icon-colour)}.grouping[_ngcontent-%COMP%]{display:flex;flex-direction:column}.grouping[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;align-items:center}.grouping[_ngcontent-%COMP%] div[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .grouping[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{margin-right:var(--spacing-s)}.grouping[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{cursor:pointer;color:var(--text-colour)}.group--disabled[_ngcontent-%COMP%]{opacity:.3;pointer-events:none}.mat-radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:var(--spacing)}"],changeDetection:0}),t=Object(i.d)([Object(b.a)()],t)}()},R1aX:function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"f",(function(){return d})),n.d(e,"c",(function(){return h})),n.d(e,"b",(function(){return f})),n.d(e,"e",(function(){return p})),n.d(e,"d",(function(){return b}));var i=n("zqNl"),r={NONE:"NONE",UNKNOWN:"NONE",FAILED:"FAILED",RETAIL_INVESTOR:"RETAIL",ACCEPTED_DISCLAIMER:"RETAIL",PER_SE_INVESTOR:"PROFESSIONAL",ELECTIVE_PROFESSIONAL_INVESTOR:"PROFESSIONAL",INVESTOR_TYPES_DISABLED:"NONE"},o=n("Wxxs"),a=n("p5wL"),s={accountType:"individual",classification:"NONE",tier:"NONE",tempT1:"NONE"},c=Object(i.i)(s,Object(i.k)(o.c,(function(){return s})),Object(i.k)(o.d,(function(t,e){var n=e.accountType;return Object(a.b)(n,t,"accountType")})),Object(i.k)(o.e,(function(t,e){var n=e.classification;return Object(a.b)(n,t,"classification")})),Object(i.k)(o.g,(function(t,e){var n=e.status;return Object(a.b)(n,t,"tier")})),Object(i.k)(o.f,(function(t,e){var n=e.status;return Object(a.b)(n,t,"tempT1")})));function u(t,e){return c(t,e)}var l=Object(i.h)("verification"),d=Object(i.j)(l,(function(t){return t})),h=Object(i.j)(l,(function(t){return t.classification})),f=Object(i.j)(l,(function(t){return t.accountType})),p=Object(i.j)(l,(function(t){return t.tier})),b=(Object(i.j)(l,(function(t){return t.tempT1})),Object(i.j)(h,(function(t){return r[t]})))},RCeD:function(t,e,n){"use strict";n.d(e,"a",(function(){return Ot}));var i=n("D57K"),r=n("gxtV"),o=n("zqNl"),a=n("KQpv"),s=n.n(a),c=n("VmIW"),u=n("C05f"),l=n("HM3f"),d=n("YtkY"),h=n("TLy2"),f=n("jIqt"),p=n("0Woy"),b=n("w0kG"),g=n("jOdJ"),v=n("lx5p"),y=n("TYVA"),_=n("NloN"),O=n("vYTc"),k=n("0tVE"),T=n("bjK4"),S=n("+Px6"),E=n("qAYy"),x=n("rxqU"),P=n("Rjzq"),A=n("sxqi"),I=n("aeRQ"),M=n("J/3c"),D=n("mlVJ"),R=n("kZht"),j=n("3kIJ"),L=n("Eu46"),N=n("aaFr"),U=n("ROO/"),F=n("An66"),B=n("yvKM"),z=n("scAs"),V=n("anSm"),H=n("EmXI"),q=n("NxuZ"),$=n("Tcl6"),Q=n("F+Yz"),W=n("SAoO"),G=n("rEzU"),Y=n("rgaJ"),K=n("1o0v"),Z=n("bo+2"),X=n("QHMR"),J=n("icqo"),tt=n("za3o"),et=n("VbQ3"),nt=n("BgTU"),it=n("aDqW"),rt=["filter"],ot=["menuAimer"];function at(t,e){if(1&t){var n=R.Vb();R.Ub(0,"mat-button-toggle",20),R.bc("click",(function(){return R.Ec(n),R.fc(2).filterContractFamily("multi-collateral")})),R.Ub(1,"p",8),R.Qc(2,"Multi-Collateral "),R.Pb(3,"pill",21),R.Tb(),R.Tb()}2&t&&(R.Cb(3),R.mc("label","New"))}function st(t,e){if(1&t){var n=R.Vb();R.Ub(0,"market-picker-asset",31),R.bc("click",(function(){R.Ec(n);var t=e.$implicit;return R.fc(4).selectMarket(t.primaryTicker)})),R.Tb()}if(2&t){var i=e.$implicit,r=R.fc().ngLet;R.mc("asset",i.asset)("primaryTicker",i.primaryTicker)("tickers",i.tickers)("count",i.count),R.Db("data-asset",i.asset.name)("focus",r===i.asset.name)("has-primary",!!i.primaryTicker)}}var ct=function(t){return{num:t}};function ut(t,e){if(1&t&&(R.Sb(0),R.Ub(1,"div",25),R.Ub(2,"div",26),R.Pb(3,"fa-icon",27),R.Tb(),R.Ub(4,"div",28),R.Qc(5),R.gc(6,"translate"),R.Tb(),R.Ub(7,"div",29),R.Qc(8),R.gc(9,"translate"),R.gc(10,"async"),R.Tb(),R.Tb(),R.Oc(11,st,1,7,"market-picker-asset",30),R.gc(12,"async"),R.Rb()),2&t){var n,i=e.ngLet,r=R.fc(3);R.Cb(1),R.Db("data-asset","FAVORITES")("focus","FAVORITES"===i),R.Cb(4),R.Rc(R.hc(6,6,"HEADING.FAVORITES")),R.Cb(3),R.Sc(" ",R.ic(9,8,"LABEL.N_MARKETS",R.rc(15,ct,(null==(n=R.hc(10,11,r.favorites$))?null:n.size)||0))," "),R.Cb(3),R.mc("ngForOf",R.hc(12,13,r.assetItems$))("ngForTrackField","name")}}function lt(t,e){if(1&t){var n=R.Vb();R.Ub(0,"div",22,23),R.bc("menuAimActivate",(function(t){return R.Ec(n),R.fc(2).handleRowActivate(t)})),R.Oc(2,ut,13,17,"ng-container",24),R.gc(3,"async"),R.Tb()}if(2&t){var i=R.fc(2);R.mc("menuAimExitMenu",!0),R.Cb(2),R.mc("ngLet",R.hc(3,2,i.focusAsset$))}}var dt=function(t){return{inactive:t}};function ht(t,e){if(1&t){var n=R.Vb();R.Ub(0,"div",33),R.Ub(1,"section",34),R.Ub(2,"div",35),R.bc("click",(function(){R.Ec(n);var t=e.ngIf;return R.fc(3).changeFlexSort("volume",t.sortDirection)})),R.Ub(3,"p",36),R.Qc(4),R.gc(5,"translate"),R.Tb(),R.Pb(6,"fa-icon",37),R.Tb(),R.Ub(7,"div",35),R.bc("click",(function(){R.Ec(n);var t=e.ngIf;return R.fc(3).changeFlexSort("change",t.sortDirection)})),R.Ub(8,"p",36),R.Qc(9),R.gc(10,"translate"),R.Tb(),R.Pb(11,"fa-icon",37),R.Tb(),R.Tb(),R.Ub(12,"p",38),R.Ub(13,"span",39),R.Qc(14),R.gc(15,"async"),R.Tb(),R.Pb(16,"fa-icon",40),R.Tb(),R.Tb()}if(2&t){var i=e.ngIf,r=R.fc(3),o=R.Ac(3);R.Cb(2),R.mc("ngClass",R.rc(14,dt,"volume"!==i.sort)),R.Cb(2),R.Rc(R.hc(5,8,"LABEL.VOLUME")),R.Cb(2),R.mc("icon","caret-"+i.sortDirection),R.Cb(1),R.mc("ngClass",R.rc(16,dt,"change"!==i.sort)),R.Cb(2),R.Rc(R.hc(10,10,"COLUMN.24H_CHANGE")),R.Cb(2),R.mc("icon","caret-"+i.sortDirection),R.Cb(1),R.mc("sbMenuTriggerFor",o),R.Cb(2),R.Rc(R.hc(15,12,r.flexCategory$))}}var ft=function(t,e){return{sort:t,sortDirection:e}};function pt(t,e){if(1&t&&(R.Sb(0),R.Oc(1,ht,17,18,"div",32),R.gc(2,"async"),R.gc(3,"async"),R.Rb()),2&t){var n=R.fc(2);R.Cb(1),R.mc("ngIf",R.sc(5,ft,R.hc(2,1,n.flexSort$),R.hc(3,3,n.flexSortDirection$)))}}function bt(t,e){if(1&t){var n=R.Vb();R.Ub(0,"market-picker-ticker",43),R.bc("updateFavorite",(function(t){return R.Ec(n),R.fc(3).updateFavorite(t)}))("mouseenter",(function(){R.Ec(n);var t=e.$implicit;return R.fc(3).hoverMarket(t.product_id)}))("click",(function(){R.Ec(n);var t=e.$implicit;return R.fc(3).selectMarket(t)})),R.gc(1,"async"),R.gc(2,"async"),R.gc(3,"async"),R.Tb()}if(2&t){var i=e.$implicit,r=R.fc().ngLet,o=R.fc().ngLet,a=R.fc();R.mc("isFlex","multi-collateral"===o)("ticker",i)("favorites",R.hc(1,7,a.favorites$))("isAlt",R.hc(2,9,a.isAlt$))("focussed",r===i.product_id),R.Db("active",R.hc(3,11,a.activeSymbol$)===i.product_id)("focus",r===i.product_id)}}function gt(t,e){if(1&t&&(R.Ub(0,"cdk-virtual-scroll-viewport",41),R.Oc(1,bt,4,13,"market-picker-ticker",42),R.gc(2,"async"),R.Tb()),2&t){var n=R.fc(2);R.mc("itemSize",48),R.Cb(1),R.mc("cdkVirtualForOf",R.hc(2,3,n.assetTickers$))("cdkVirtualForTrackField","product_id")}}var mt=function(t){return{flex:t}};function vt(t,e){if(1&t){var n=R.Vb();R.Ub(0,"section",4),R.Ub(1,"div",5),R.Ub(2,"mat-button-toggle-group",6),R.Ub(3,"mat-button-toggle",7),R.bc("click",(function(){return R.Ec(n),R.fc().filterContractFamily("single-collateral")})),R.Ub(4,"p",8),R.Qc(5,"Single Collateral"),R.Tb(),R.Tb(),R.Oc(6,at,4,1,"mat-button-toggle",9),R.gc(7,"async"),R.Tb(),R.Tb(),R.Ub(8,"div",10),R.Ub(9,"mat-form-field",11),R.Pb(10,"fa-icon",12),R.Ub(11,"mat-label"),R.Qc(12),R.gc(13,"translate"),R.Tb(),R.Ub(14,"input",13,14),R.bc("keydown",(function(t){return R.Ec(n),R.fc().handleKeybinds(t)})),R.Tb(),R.Ub(16,"fa-icon",15),R.bc("click",(function(t){R.Ec(n);var e=R.fc();return t.stopPropagation(),e.filterControl.setValue("")})),R.Tb(),R.Tb(),R.Tb(),R.Oc(17,lt,4,4,"div",16),R.Oc(18,pt,4,8,"ng-container",17),R.Oc(19,gt,3,5,"cdk-virtual-scroll-viewport",18),R.gc(20,"async"),R.Pb(21,"market-picker-preview",19),R.gc(22,"async"),R.gc(23,"async"),R.Tb()}if(2&t){var i=e.ngLet,r=R.Ac(15),o=R.fc();R.mc("ngClass",R.rc(22,mt,"multi-collateral"===i)),R.Cb(2),R.mc("value",i),R.Cb(4),R.mc("ngIf",R.hc(7,12,o.flexEnabled$)),R.Cb(6),R.Rc(R.hc(13,14,"FORM.SEARCH")),R.Cb(2),R.mc("formControl",o.filterControl),R.Cb(2),R.mc("hidden",0===r.value.length),R.Cb(1),R.mc("ngIf","single-collateral"===i),R.Cb(1),R.mc("ngIf","multi-collateral"===i),R.Cb(1),R.mc("ngLet",R.hc(20,16,o.focusMarket$)),R.Cb(2),R.mc("ticker",R.hc(22,18,o.detailedTicker$))("isAlt",R.hc(23,20,o.isAlt$))("isFlex","multi-collateral"===i)}}function yt(t,e){if(1&t){var n=R.Vb();R.Ub(0,"button",2),R.bc("click",(function(){R.Ec(n);var t=e.$implicit;return R.fc().changeFlexCategory(t)})),R.Ub(1,"span",39),R.Qc(2),R.Tb(),R.Tb()}if(2&t){var i=e.$implicit;R.Cb(2),R.Rc(i)}}var _t=s()("trace:app:market-picker"),Ot=function(){var t=function(){function t(e,n,i,r,a){var s=this;C(this,t),this.store=e,this.fb=n,this.market=i,this.ws=r,this.keybinds=a,this.contractFamily$=new u.a("single-collateral"),this.hoverAsset$=new u.a(Object(c.None)()),this.hoverMarket$=new u.a(Object(c.None)()),this.pairFilter$=new u.a(Object(c.None)()),this.flexSort$=new u.a("volume"),this.flexSortDirection$=new u.a("up"),this.flexCategory$=new u.a("all"),this.filterControl=this.fb.control(""),this.assets$=this.store.pipe(Object(o.m)(S.d)),this.tickers$=this.store.pipe(Object(o.m)(E.o)),this.pairs$=this.store.pipe(Object(o.m)(E.m)),this.favorites$=this.store.pipe(Object(o.m)(x.p)),this.activeSymbol$=this.store.pipe(Object(o.m)(S.r)),this.isAlt$=this.store.pipe(Object(o.m)(T.l)),this.selectedMarket$=this.store.pipe(Object(o.m)(S.n)),this.flexCategories$=this.store.pipe(Object(o.m)(E.e)),this.flexEnabled$=this.store.pipe(Object(o.m)(M.f)),this.userData$=this.store.pipe(Object(o.m)(x.a)),this.focusAsset$=Object(l.a)([this.hoverAsset$,this.activeSymbol$.pipe(Object(d.a)(y.m))]).pipe(Object(d.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return n.orSome(i)}))),this.focusMarket$=Object(l.a)([this.hoverMarket$,this.activeSymbol$]).pipe(Object(d.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return n.orSome(i)}))),this.assetItems$=Object(l.a)([this.tickers$,this.assets$,this.pairFilter$,this.contractFamily$]).pipe(Object(d.a)((function(t){var e=m(t,4),n=e[0],i=e[1],r=e[2],o=e[3];return Object(_.d)("asset-transform",(function(){return i.valueSeq().filter((function(t){var e=t.name;return r.map(v.Q).map((function(t){return[e,Object(y.g)(e)].map(v.Q).some((function(e){return e.includes(t)}))})).orSome(!0)})).map((function(t){var e=n.filter(Tt("XBT"===t.name?"BTC":t.name)).filter(St(o)),i=e.get("".concat("multi-collateral"===o?"PF":"PI","_").concat(t.name,"USD").replace(D.a,"XBT"));return{asset:t,name:t.name,primaryTicker:i,tickers:e,count:e.size}})).filter((function(t){return t.tickers.size>0})).sortBy((function(t){var e,n=t.primaryTicker;return null!==(e=null==n?void 0:n.volume)&&void 0!==e?e:0}),v.i).toArray()}))}))),this.assetTickers$=Object(l.a)([this.tickers$,this.favorites$,this.focusAsset$,this.contractFamily$,this.pairFilter$,Object(l.a)([this.flexSort$,this.flexCategory$,this.flexSortDirection$])]).pipe(Object(d.a)((function(t){var e=m(t,6),n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=m(e[5],3),c=s[0],u=s[1],l=s[2];return Object(_.d)("ticker-transform",(function(){var t="up"===l?v.i:v.d;if("FAVORITES"===r&&"multi-collateral"!==o)return n.valueSeq().filter((function(t){return i.has(Object(O.i)(t))})).sortBy(kt,t).toArray();var e=n.filter((function(t){var e=t.pair;return a.map(v.Q).map((function(t){return[e,Object(y.g)(e)].map(v.Q).some((function(e){return e.includes(t)}))})).orSome(!0)})),s="change"===c?xt:Et,d="XBT"===r?"BTC":r;return e.valueSeq().filter("multi-collateral"===o?function(t){return!0}:Tt(d)).filter(St(o)).filter(function(t){return function(e){return"all"===t||!t||e.category===t}}(u)).groupBy(Ct).sortBy(s,t).map(Pt).valueSeq().flatMap(v.j).toArray().sort((function(t,e){return i.has(Object(O.i)(t))?-1:1}))}))}))),this.detailedTicker$=this.focusMarket$.pipe(Object(h.a)((function(t){return s.store.pipe(Object(o.m)(E.d,{symbol:t}))})))}return w(t,[{key:"ngOnInit",value:function(){var t=this;this.focusMarket$.pipe(Object(f.a)(void 0),Object(p.a)(),Object(b.a)(this.store.pipe(Object(o.m)(S.r))),Object(r.b)(this)).subscribe((function(e){var n=m(e,2),i=m(n[0],2),r=i[0],o=i[1],a=n[1];r&&r!==a&&t.ws.closeFeed({feed:"ticker",product_ids:[r]}),o&&o!==a&&t.ws.openFeed({feed:"ticker",product_ids:[o]})})),this.selectedMarket$.pipe(Object(g.a)()).subscribe((function(e){return t.contractFamily$.next("flexible_futures"===(null==e?void 0:e.type)?"multi-collateral":"single-collateral")})),this.filterControl.valueChanges.pipe(Object(d.a)(v.M),Object(r.b)(this)).subscribe((function(e){t.pairFilter$.next(c.Maybe.fromFalsy(e))})),this.keybinds.addBind("escape",(function(){return t.popper.dispose()})),this.keybinds.register()}},{key:"ngAfterViewInit",value:function(){var t=this;setTimeout((function(){return t.filterInput.focus()}))}},{key:"ngOnDestroy",value:function(){var t=this;this.keybinds.dispose(),this.focusMarket$.pipe(Object(b.a)(this.store.pipe(Object(o.m)(S.r))),Object(g.a)()).subscribe((function(e){var n=m(e,2),i=n[0],r=n[1];i&&i!==r&&t.ws.closeFeed({feed:"ticker",product_ids:[i]})}))}},{key:"hoverAsset",value:function(t){this.hoverAsset$.next(Object(c.Some)(t))}},{key:"hoverMarket",value:function(t){this.hoverMarket$.next(Object(c.Some)(t))}},{key:"unHoverPair",value:function(){this.menuAimer.commitExit(),this.hoverAsset$.next(Object(c.None)()),this.hoverMarket$.next(Object(c.None)())}},{key:"selectMarket",value:function(t){t&&(this.market.navigateToMarket(t.product_id),this.popper.dispose())}},{key:"handleKeybinds",value:function(t){"Escape"===t.code&&(t.stopPropagation(),t.target.blur(),this.filterControl.setValue(""))}},{key:"updateFavorite",value:function(t){var e=m(t,2),n=e[0],i=e[1];this.store.dispatch(i?Object(k.d)({marketDescriptor:n}):Object(k.v)({marketDescriptor:n}))}},{key:"handleRowActivate",value:function(t){_t("row activate",t.dataset.asset),"asset"in t.dataset&&this.hoverAsset(t.dataset.asset)}},{key:"filterContractFamily",value:function(t){this.contractFamily$.next(t)}},{key:"changeFlexSort",value:function(t,e){t===this.flexSort$.value&&this.flexSortDirection$.next("up"===e?"down":"up"),this.flexSort$.next(t)}},{key:"changeFlexCategory",value:function(t){this.flexCategory$.next(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(R.Ob(o.b),R.Ob(j.d),R.Ob(A.a),R.Ob(I.a),R.Ob(P.a,2))},t.\u0275cmp=R.Ib({type:t,selectors:[["market-picker"]],viewQuery:function(t,e){var n;1&t&&(R.Jc(rt,!0),R.Jc(ot,!0)),2&t&&(R.zc(n=R.cc())&&(e.filterInput=n.first),R.zc(n=R.cc())&&(e.menuAimer=n.first))},hostBindings:function(t,e){1&t&&R.bc("mouseleave",(function(){return e.unHoverPair()}))},inputs:{popper:"popper"},features:[R.Bb([P.a])],decls:9,vars:6,consts:[["class","market-picker",3,"ngClass",4,"ngLet"],["flexCategories",""],["sb-menu-item","",3,"click"],["sb-menu-item","",3,"click",4,"ngFor","ngForOf"],[1,"market-picker",3,"ngClass"],[1,"futures"],[3,"value"],["value","single-collateral",3,"click"],["bold",""],["value","multi-collateral",3,"click",4,"ngIf"],["body","",1,"search"],["color","accent","appearance","fill"],["icon","search","size","2x","matPrefix","",1,"icon"],["matInput","","autocomplete","off",3,"formControl","keydown"],["filter","matInput"],["icon","close","size","2x","matSuffix","",1,"clear",3,"hidden","click"],["class","assets","menuAim",".asset",3,"menuAimExitMenu","menuAimActivate",4,"ngIf"],[4,"ngIf"],["class","tickers",3,"itemSize",4,"ngLet"],[1,"preview",3,"ticker","isAlt","isFlex"],["value","multi-collateral",3,"click"],[3,"label"],["menuAim",".asset",1,"assets",3,"menuAimExitMenu","menuAimActivate"],["menuAimer","menuAim"],[4,"ngLet"],[1,"asset","favorite-assets"],[1,"icon"],["icon","star-filled"],["body","",1,"asset"],["body","","ghost","",1,"count"],["class","asset",3,"asset","primaryTicker","tickers","count","click",4,"ngFor","ngForOf","ngForTrackField"],[1,"asset",3,"asset","primaryTicker","tickers","count","click"],["class","controls",4,"ngIf"],[1,"controls"],[1,"sort-controls"],[1,"sort-control",3,"ngClass","click"],["body",""],[3,"icon"],["body","",1,"category",3,"sbMenuTriggerFor"],["capitalize",""],["icon","chevron-down","size","lg"],[1,"tickers",3,"itemSize"],[3,"isFlex","ticker","favorites","isAlt","focussed","updateFavorite","mouseenter","click",4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackField"],[3,"isFlex","ticker","favorites","isAlt","focussed","updateFavorite","mouseenter","click"]],template:function(t,e){1&t&&(R.Oc(0,vt,24,24,"section",0),R.gc(1,"async"),R.Ub(2,"sb-menu",null,1),R.Ub(4,"button",2),R.bc("click",(function(){return e.changeFlexCategory("all")})),R.Ub(5,"span"),R.Qc(6,"All"),R.Tb(),R.Tb(),R.Oc(7,yt,3,1,"button",3),R.gc(8,"async"),R.Tb()),2&t&&(R.mc("ngLet",R.hc(1,2,e.contractFamily$)),R.Cb(7),R.mc("ngForOf",R.hc(8,4,e.flexCategories$)))},directives:[L.a,N.a,U.a,F.m,F.l,B.b,B.a,z.a,F.n,V.a,H.c,q.b,H.g,H.f,$.b,j.c,j.o,j.f,H.h,Q.a,W.a,G.a,Y.a,K.a,Z.b,X.a,J.b,tt.a,et.e,et.a,et.d,Z.a,nt.a],pipes:[F.b,it.d],styles:['.market-picker[_ngcontent-%COMP%]{padding:var(--spacing) var(--spacing) 0;width:625px;height:525px;display:grid;grid-template:"futures futures" auto "search search" auto "assets tickers" 1fr "assets preview" 200px/280px 1fr;-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (max-width:1024px){.market-picker[_ngcontent-%COMP%]{height:100%;width:100%}}.market-picker.flex[_ngcontent-%COMP%]{grid-template:"futures futures" auto "search search" auto "controls controls" auto "tickers preview" 1fr "tickers preview" 200px/1.5fr 1fr!important}.market-picker.flex[_ngcontent-%COMP%] .tickers[_ngcontent-%COMP%]{margin-right:var(--spacing)!important;padding-bottom:0!important;border-bottom:none!important;border-right:1px solid var(--border-colour)}fa-icon[_ngcontent-%COMP%]{color:var(--icon-colour)}.futures[_ngcontent-%COMP%]{grid-area:futures}.search[_ngcontent-%COMP%]{grid-area:search}.search[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.search[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin-right:var(--spacing)}.search[_ngcontent-%COMP%] .clear[_ngcontent-%COMP%]{cursor:pointer}.assets[_ngcontent-%COMP%]{grid-area:assets;margin-right:var(--spacing);padding-right:var(--spacing);padding-bottom:var(--spacing);overflow:hidden auto;border-right:1px solid var(--border-colour)}.assets[_ngcontent-%COMP%] [active=true][_ngcontent-%COMP%]{--pair-color:var(--link-colour)}.assets[_ngcontent-%COMP%] [focus=true][_ngcontent-%COMP%]{background-color:var(--toolbar-colour)}.assets[_ngcontent-%COMP%] market-picker-asset[has-primary=true][_ngcontent-%COMP%]{cursor:pointer}.assets[_ngcontent-%COMP%] .favorite-assets[_ngcontent-%COMP%]{display:block;padding:var(--spacing-s) var(--spacing);height:48px;display:grid;grid-template:"icon asset" auto "icon count" auto/min-content 1fr;gap:var(--spacing-s) var(--spacing-ml);align-items:center;border-radius:var(--bdrs)}.assets[_ngcontent-%COMP%] .favorite-assets[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;font-size:24px}.assets[_ngcontent-%COMP%] .favorite-assets[_ngcontent-%COMP%] .asset[_ngcontent-%COMP%]{grid-area:asset;align-self:end;font-size:14px;color:var(--pair-color,var(--text-colour))}.assets[_ngcontent-%COMP%] .favorite-assets[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{grid-area:count;align-self:start}.tickers[_ngcontent-%COMP%]{grid-area:tickers;padding-bottom:var(--spacing);margin-bottom:var(--spacing);overflow:hidden auto;border-bottom:1px solid var(--border-colour)}.tickers[_ngcontent-%COMP%] [active=true][_ngcontent-%COMP%]{--market-color:var(--link-colour)}.tickers[_ngcontent-%COMP%] [focus=true][_ngcontent-%COMP%]{background-color:var(--toolbar-colour)}.tickers[_ngcontent-%COMP%] market-picker-ticker[_ngcontent-%COMP%]{cursor:pointer}.preview[_ngcontent-%COMP%]{grid-area:preview;align-self:stretch}.controls[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-right:var(--spacing-l);margin-bottom:var(--spacing)}.controls[_ngcontent-%COMP%] .category[_ngcontent-%COMP%]{cursor:pointer}.controls[_ngcontent-%COMP%] .category[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{padding-left:var(--spacing)}.sort-controls[_ngcontent-%COMP%]{display:flex}.sort-control[_ngcontent-%COMP%]{cursor:pointer;margin-right:var(--spacing);display:flex}.sort-control.inactive[_ngcontent-%COMP%]{opacity:.5}'],changeDetection:0}),t=Object(i.d)([Object(r.a)()],t)}(),kt=Object(v.F)("notionalVolume"),wt=Object(v.F)("change"),Ct=Object(v.F)("pair");function Tt(t){return function(e){return e.pair.includes(t)}}function St(t){return function(e){return"multi-collateral"===t?Object(O.a)(e.product_id):e.product_id.startsWith("PI")||e.product_id.startsWith("PV")||e.product_id.startsWith("FI")||e.product_id.startsWith("FV")}}function Et(t){return t.reduce(Object(v.L)(kt),0)}function xt(t){return t.reduce(Object(v.L)(wt),0)}function Pt(t){return t.valueSeq().sortBy(y.y)}},RN2F:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,e),window.removeEventListener("testPassiveEventSupport",n,e),i.hasSupport=t}}};i.update(),e.default=i},ROBh:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("gBlb"),r=n("ckkg"),o=n("czMQ");function a(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this.focusMonitor.focusVia(this._getHostElement(),t,e),this.focused.next(this)}},{key:"ngOnDestroy",value:function(){this.focusMonitor.stopMonitoring(this.el),this.hovered.complete(),this.focused.complete()}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this.el.nativeElement}},{key:"_checkDisabled",value:function(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}},{key:"_handleMouseEnter",value:function(){this.hovered.next(this)}},{key:"getLabel",value:function(){var t=this.el.nativeElement,e=this.document.TEXT_NODE,n="";if(t.childNodes)for(var i=t.childNodes.length,r=0;r1)for(var l=0,d=this.possibleRightPairs;l1&&e.checkChecksum(c,h))return e.constructResult(c,h)}}throw new u.default},e.addOrTally=function(t,e){if(null!=e){for(var n=!1,i=0,r=t;i0;o--)r.append("0");r.append(i);var a=0;for(o=0;o<13;o++){var c=r.charAt(o).charCodeAt(0)-"0".charCodeAt(0);a+=0==(1&o)?3*c:c}10==(a=10-a%10)&&(a=0),r.append(a.toString());var u=t.getFinderPattern().getResultPoints(),h=e.getFinderPattern().getResultPoints();return new s.default(r.toString(),null,0,[u[0],u[1],h[0],h[1]],d.default.RSS_14,(new Date).getTime())},e.checkChecksum=function(t,e){var n=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,i=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return i>72&&i--,i>8&&i--,n===i},e.prototype.decodePair=function(t,e,n,i){try{var r=this.findFinderPattern(t,e),o=this.parseFoundFinderPattern(t,n,e,r),s=null==i?null:i.get(c.default.NEED_RESULT_POINT_CALLBACK);if(null!=s){var u=(r[0]+r[1])/2;e&&(u=t.getSize()-1-u),s.foundPossibleResultPoint(new h.default(u,n))}var l=this.decodeDataCharacter(t,o,!0),d=this.decodeDataCharacter(t,o,!1);return new a.default(1597*l.getValue()+d.getValue(),l.getChecksumPortion()+4*d.getChecksumPortion(),o)}catch(f){return null}},e.prototype.decodeDataCharacter=function(t,n,i){for(var r=this.getDataCharacterCounters(),o=0;o8&&(O=8);var k=Math.floor(a/2);0==(1&a)?(h[k]=O,m[k]=_-O):(f[k]=O,y[k]=_-O)}this.adjustOddEvenCounts(i,l);var w=0,C=0;for(a=h.length-1;a>=0;a--)C*=9,C+=h[a],w+=h[a];var T=0,S=0;for(a=f.length-1;a>=0;a--)T*=9,T+=f[a],S+=f[a];var E,x,P=C+3*T;if(i){if(0!=(1&w)||w>12||w<4)throw new u.default;var A=9-(x=e.OUTSIDE_ODD_WIDEST[E=(12-w)/2]),I=g.default.getRSSvalue(h,x,!1),M=g.default.getRSSvalue(f,A,!0);return new p.default(I*e.OUTSIDE_EVEN_TOTAL_SUBSET[E]+M+e.OUTSIDE_GSUM[E],P)}if(0!=(1&S)||S>10||S<4)throw new u.default;return A=9-(x=e.INSIDE_ODD_WIDEST[E=(10-S)/2]),I=g.default.getRSSvalue(h,x,!0),M=g.default.getRSSvalue(f,A,!1),new p.default(M*e.INSIDE_ODD_TOTAL_SUBSET[E]+I+e.INSIDE_GSUM[E],P)},e.prototype.findFinderPattern=function(t,e){var n=this.getDecodeFinderCounters();n[0]=0,n[1]=0,n[2]=0,n[3]=0;for(var i=t.getSize(),r=!1,a=0;a=0&&o!==t.get(a);)a--;a++;var s=r[0]-a,c=this.getDecodeFinderCounters(),u=new Array(c.length);m.default.arraycopy(c,0,u,1,c.length-1),u[0]=s;var l=this.parseFinderValue(u,e.FINDER_PATTERNS),d=a,h=r[1];return i&&(d=t.getSize()-1-d,h=t.getSize()-1-h),new f.default(l,[a,r[1]],d,h,n)},e.prototype.adjustOddEvenCounts=function(t,e){var n=b.default.sum(new Int32Array(this.getOddCounts())),i=b.default.sum(new Int32Array(this.getEvenCounts())),r=!1,a=!1,s=!1,c=!1;t?(n>12?a=!0:n<4&&(r=!0),i>12?c=!0:i<4&&(s=!0)):(n>11?a=!0:n<5&&(r=!0),i>10?c=!0:i<4&&(s=!0));var l=n+i-e,d=(1&n)==(t?1:0),h=1==(1&i);if(1===l)if(d){if(h)throw new u.default;a=!0}else{if(!h)throw new u.default;c=!0}else if(-1===l)if(d){if(h)throw new u.default;r=!0}else{if(!h)throw new u.default;s=!0}else{if(0!==l)throw new u.default;if(d){if(!h)throw new u.default;n=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t}();e.default=i},SrNW:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("5uGe");function r(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new o(t,e,n))}}var o=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];C(this,t),this.accumulator=e,this.seed=n,this.hasSeed=i}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new s(t,this.accumulator,this.seed,this.hasSeed))}}]),t}(),s=function(t){a(n,t);var e=c(n);function n(t,i,r,o){var a;return C(this,n),(a=e.call(this,t)).accumulator=i,a._seed=r,a.hasSeed=o,a.index=0,a}return w(n,[{key:"_next",value:function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}},{key:"_tryNext",value:function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(i){this.destination.error(i)}this.seed=e,this.destination.next(e)}},{key:"seed",get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t}}]),n}(i.a)},SxAO:function(t,e,n){"use strict";n("gCmX")},T5QL:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n("6uGs"),r=n("P0Wc"),o=n.n(r),a=n("sXtk"),s=n("kZht");function c(t){if(t instanceof Array){var e,n=[],i=p(t);try{for(i.s();!(e=i.n()).done;){var r=e.value;n.push(c(r))}}catch(d){i.e(d)}finally{i.f()}return n}if(t instanceof ArrayBuffer)return o.a.encode(t);if(t instanceof Object){var a,s={},u=p(t);try{for(u.s();!(a=u.n()).done;){var l=a.value;s[l]=c(t[l])}}catch(d){u.e(d)}finally{u.f()}return s}return t}var u={headers:new i.c({"Content-Type":"application/json"}),withCredentials:!0},l=function(){var t=function(){function t(e,n){C(this,t),this.env=e,this.http=n}return w(t,[{key:"fetchRegisterChallenge",value:function(){return this.http.post(this.env.urls.auth+"/fido2/registerchallenge",void 0,u)}},{key:"createPublicKey",value:function(t){var e,n=((e=t).publicKey.challenge=o.a.toBuffer(e.publicKey.challenge),e.publicKey.user.id=o.a.toBuffer(e.publicKey.user.id),e.publicKey.excludeCredentials=e.publicKey.excludeCredentials.map((function(t){var e=t.id;return{type:t.type,id:o.a.toBuffer(e)}})),e);return navigator.credentials.create(n)}},{key:"registerCred",value:function(t,e){var n=c(t);return this.http.post(this.env.urls.auth+"/fido2/register",{cred:n,name:e},u)}},{key:"fetchAuthChallenge",value:function(){return this.http.post(this.env.urls.auth+"/fido2/authenticatechallenge",void 0,u)}},{key:"getAssertion",value:function(t){var e=function(t){t.publicKey.challenge=o.a.toBuffer(t.publicKey.challenge);var e,n=p(t.publicKey.allowCredentials);try{for(n.s();!(e=n.n()).done;){var i=e.value;i.id=o.a.toBuffer(i.id)}}catch(r){n.e(r)}finally{n.f()}return t}(t);return navigator.credentials.get(e)}},{key:"sendAssertion",value:function(t){var e,n=((e=c(t)).response.clientDataJSON=o.a.toBase64(e.response.clientDataJSON),e.response.authenticatorData=o.a.toBase64(e.response.authenticatorData),e.response.signature=o.a.toBase64(e.response.signature),e);return this.http.post(this.env.urls.auth+"/fido2/authenticate",{cred:n},u)}},{key:"fetchCredentials",value:function(){return this.http.get(this.env.urls.auth+"/account/hwcreds",u)}},{key:"deleteCred",value:function(t){return this.http.delete("".concat(this.env.urls.auth,"/account/hwcreds/").concat(t),u)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Yb(a.a),s.Yb(i.a))},t.\u0275prov=s.Kb({token:t,factory:t.\u0275fac}),t}()},TADc:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(){C(this,t),this.orientation="horizontal"}return w(t,[{key:"vertical",set:function(t){this.orientation=void 0!==t?"vertical":"horizontal"}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["sb-divider"]],hostVars:1,hostBindings:function(t,e){2&t&&i.Db("orientation",e.orientation)},inputs:{vertical:"vertical"},decls:0,vars:0,template:function(t,e){},styles:["[_nghost-%COMP%]{background-color:var(--divider-color,rgba(var(--ghost-colour-rgb),.5))}[orientation=horizontal][_nghost-%COMP%]{display:block;height:var(--divider-thickness,1px);width:var(--divider-size,calc(100% - var(--spacing-l)));margin:var(--divider-margin,0 auto)}[orientation=vertical][_nghost-%COMP%]{display:inline-block;width:var(--divider-thickness,1px);height:var(--divider-size,calc(100% - var(--spacing-l)))}"],changeDetection:0}),t}()},TDnQ:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("1XZd"),r=n("KZGf");e.default=function(){function t(t,e){this.width=t,this.height=e;for(var n=new Array(e),i=0;i!==e;i++)n[i]=new Uint8Array(t);this.bytes=n}return t.prototype.getHeight=function(){return this.height},t.prototype.getWidth=function(){return this.width},t.prototype.get=function(t,e){return this.bytes[e][t]},t.prototype.getArray=function(){return this.bytes},t.prototype.setNumber=function(t,e,n){this.bytes[e][t]=n},t.prototype.setBoolean=function(t,e,n){this.bytes[e][t]=n?1:0},t.prototype.clear=function(t){for(var e=0,n=this.bytes;e40)throw new c.default;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var n=Number.MAX_SAFE_INTEGER,i=0,o=0;o6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new o.default(7,new a.default(1,19)),new o.default(10,new a.default(1,16)),new o.default(13,new a.default(1,13)),new o.default(17,new a.default(1,9))),new t(2,Int32Array.from([6,18]),new o.default(10,new a.default(1,34)),new o.default(16,new a.default(1,28)),new o.default(22,new a.default(1,22)),new o.default(28,new a.default(1,16))),new t(3,Int32Array.from([6,22]),new o.default(15,new a.default(1,55)),new o.default(26,new a.default(1,44)),new o.default(18,new a.default(2,17)),new o.default(22,new a.default(2,13))),new t(4,Int32Array.from([6,26]),new o.default(20,new a.default(1,80)),new o.default(18,new a.default(2,32)),new o.default(26,new a.default(2,24)),new o.default(16,new a.default(4,9))),new t(5,Int32Array.from([6,30]),new o.default(26,new a.default(1,108)),new o.default(24,new a.default(2,43)),new o.default(18,new a.default(2,15),new a.default(2,16)),new o.default(22,new a.default(2,11),new a.default(2,12))),new t(6,Int32Array.from([6,34]),new o.default(18,new a.default(2,68)),new o.default(16,new a.default(4,27)),new o.default(24,new a.default(4,19)),new o.default(28,new a.default(4,15))),new t(7,Int32Array.from([6,22,38]),new o.default(20,new a.default(2,78)),new o.default(18,new a.default(4,31)),new o.default(18,new a.default(2,14),new a.default(4,15)),new o.default(26,new a.default(4,13),new a.default(1,14))),new t(8,Int32Array.from([6,24,42]),new o.default(24,new a.default(2,97)),new o.default(22,new a.default(2,38),new a.default(2,39)),new o.default(22,new a.default(4,18),new a.default(2,19)),new o.default(26,new a.default(4,14),new a.default(2,15))),new t(9,Int32Array.from([6,26,46]),new o.default(30,new a.default(2,116)),new o.default(22,new a.default(3,36),new a.default(2,37)),new o.default(20,new a.default(4,16),new a.default(4,17)),new o.default(24,new a.default(4,12),new a.default(4,13))),new t(10,Int32Array.from([6,28,50]),new o.default(18,new a.default(2,68),new a.default(2,69)),new o.default(26,new a.default(4,43),new a.default(1,44)),new o.default(24,new a.default(6,19),new a.default(2,20)),new o.default(28,new a.default(6,15),new a.default(2,16))),new t(11,Int32Array.from([6,30,54]),new o.default(20,new a.default(4,81)),new o.default(30,new a.default(1,50),new a.default(4,51)),new o.default(28,new a.default(4,22),new a.default(4,23)),new o.default(24,new a.default(3,12),new a.default(8,13))),new t(12,Int32Array.from([6,32,58]),new o.default(24,new a.default(2,92),new a.default(2,93)),new o.default(22,new a.default(6,36),new a.default(2,37)),new o.default(26,new a.default(4,20),new a.default(6,21)),new o.default(28,new a.default(7,14),new a.default(4,15))),new t(13,Int32Array.from([6,34,62]),new o.default(26,new a.default(4,107)),new o.default(22,new a.default(8,37),new a.default(1,38)),new o.default(24,new a.default(8,20),new a.default(4,21)),new o.default(22,new a.default(12,11),new a.default(4,12))),new t(14,Int32Array.from([6,26,46,66]),new o.default(30,new a.default(3,115),new a.default(1,116)),new o.default(24,new a.default(4,40),new a.default(5,41)),new o.default(20,new a.default(11,16),new a.default(5,17)),new o.default(24,new a.default(11,12),new a.default(5,13))),new t(15,Int32Array.from([6,26,48,70]),new o.default(22,new a.default(5,87),new a.default(1,88)),new o.default(24,new a.default(5,41),new a.default(5,42)),new o.default(30,new a.default(5,24),new a.default(7,25)),new o.default(24,new a.default(11,12),new a.default(7,13))),new t(16,Int32Array.from([6,26,50,74]),new o.default(24,new a.default(5,98),new a.default(1,99)),new o.default(28,new a.default(7,45),new a.default(3,46)),new o.default(24,new a.default(15,19),new a.default(2,20)),new o.default(30,new a.default(3,15),new a.default(13,16))),new t(17,Int32Array.from([6,30,54,78]),new o.default(28,new a.default(1,107),new a.default(5,108)),new o.default(28,new a.default(10,46),new a.default(1,47)),new o.default(28,new a.default(1,22),new a.default(15,23)),new o.default(28,new a.default(2,14),new a.default(17,15))),new t(18,Int32Array.from([6,30,56,82]),new o.default(30,new a.default(5,120),new a.default(1,121)),new o.default(26,new a.default(9,43),new a.default(4,44)),new o.default(28,new a.default(17,22),new a.default(1,23)),new o.default(28,new a.default(2,14),new a.default(19,15))),new t(19,Int32Array.from([6,30,58,86]),new o.default(28,new a.default(3,113),new a.default(4,114)),new o.default(26,new a.default(3,44),new a.default(11,45)),new o.default(26,new a.default(17,21),new a.default(4,22)),new o.default(26,new a.default(9,13),new a.default(16,14))),new t(20,Int32Array.from([6,34,62,90]),new o.default(28,new a.default(3,107),new a.default(5,108)),new o.default(26,new a.default(3,41),new a.default(13,42)),new o.default(30,new a.default(15,24),new a.default(5,25)),new o.default(28,new a.default(15,15),new a.default(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new o.default(28,new a.default(4,116),new a.default(4,117)),new o.default(26,new a.default(17,42)),new o.default(28,new a.default(17,22),new a.default(6,23)),new o.default(30,new a.default(19,16),new a.default(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new o.default(28,new a.default(2,111),new a.default(7,112)),new o.default(28,new a.default(17,46)),new o.default(30,new a.default(7,24),new a.default(16,25)),new o.default(24,new a.default(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new o.default(30,new a.default(4,121),new a.default(5,122)),new o.default(28,new a.default(4,47),new a.default(14,48)),new o.default(30,new a.default(11,24),new a.default(14,25)),new o.default(30,new a.default(16,15),new a.default(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new o.default(30,new a.default(6,117),new a.default(4,118)),new o.default(28,new a.default(6,45),new a.default(14,46)),new o.default(30,new a.default(11,24),new a.default(16,25)),new o.default(30,new a.default(30,16),new a.default(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new o.default(26,new a.default(8,106),new a.default(4,107)),new o.default(28,new a.default(8,47),new a.default(13,48)),new o.default(30,new a.default(7,24),new a.default(22,25)),new o.default(30,new a.default(22,15),new a.default(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new o.default(28,new a.default(10,114),new a.default(2,115)),new o.default(28,new a.default(19,46),new a.default(4,47)),new o.default(28,new a.default(28,22),new a.default(6,23)),new o.default(30,new a.default(33,16),new a.default(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new o.default(30,new a.default(8,122),new a.default(4,123)),new o.default(28,new a.default(22,45),new a.default(3,46)),new o.default(30,new a.default(8,23),new a.default(26,24)),new o.default(30,new a.default(12,15),new a.default(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new o.default(30,new a.default(3,117),new a.default(10,118)),new o.default(28,new a.default(3,45),new a.default(23,46)),new o.default(30,new a.default(4,24),new a.default(31,25)),new o.default(30,new a.default(11,15),new a.default(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new o.default(30,new a.default(7,116),new a.default(7,117)),new o.default(28,new a.default(21,45),new a.default(7,46)),new o.default(30,new a.default(1,23),new a.default(37,24)),new o.default(30,new a.default(19,15),new a.default(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new o.default(30,new a.default(5,115),new a.default(10,116)),new o.default(28,new a.default(19,47),new a.default(10,48)),new o.default(30,new a.default(15,24),new a.default(25,25)),new o.default(30,new a.default(23,15),new a.default(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new o.default(30,new a.default(13,115),new a.default(3,116)),new o.default(28,new a.default(2,46),new a.default(29,47)),new o.default(30,new a.default(42,24),new a.default(1,25)),new o.default(30,new a.default(23,15),new a.default(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new o.default(30,new a.default(17,115)),new o.default(28,new a.default(10,46),new a.default(23,47)),new o.default(30,new a.default(10,24),new a.default(35,25)),new o.default(30,new a.default(19,15),new a.default(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new o.default(30,new a.default(17,115),new a.default(1,116)),new o.default(28,new a.default(14,46),new a.default(21,47)),new o.default(30,new a.default(29,24),new a.default(19,25)),new o.default(30,new a.default(11,15),new a.default(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new o.default(30,new a.default(13,115),new a.default(6,116)),new o.default(28,new a.default(14,46),new a.default(23,47)),new o.default(30,new a.default(44,24),new a.default(7,25)),new o.default(30,new a.default(59,16),new a.default(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new o.default(30,new a.default(12,121),new a.default(7,122)),new o.default(28,new a.default(12,47),new a.default(26,48)),new o.default(30,new a.default(39,24),new a.default(14,25)),new o.default(30,new a.default(22,15),new a.default(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new o.default(30,new a.default(6,121),new a.default(14,122)),new o.default(28,new a.default(6,47),new a.default(34,48)),new o.default(30,new a.default(46,24),new a.default(10,25)),new o.default(30,new a.default(2,15),new a.default(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new o.default(30,new a.default(17,122),new a.default(4,123)),new o.default(28,new a.default(29,46),new a.default(14,47)),new o.default(30,new a.default(49,24),new a.default(10,25)),new o.default(30,new a.default(24,15),new a.default(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new o.default(30,new a.default(4,122),new a.default(18,123)),new o.default(28,new a.default(13,46),new a.default(32,47)),new o.default(30,new a.default(48,24),new a.default(14,25)),new o.default(30,new a.default(42,15),new a.default(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new o.default(30,new a.default(20,117),new a.default(4,118)),new o.default(28,new a.default(40,47),new a.default(7,48)),new o.default(30,new a.default(43,24),new a.default(22,25)),new o.default(30,new a.default(10,15),new a.default(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new o.default(30,new a.default(19,118),new a.default(6,119)),new o.default(28,new a.default(18,47),new a.default(31,48)),new o.default(30,new a.default(34,24),new a.default(34,25)),new o.default(30,new a.default(20,15),new a.default(61,16)))],t}()},TLy2:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n("YtkY"),r=n("GoAz"),s=n("uCWR");function u(t,e){return"function"==typeof e?function(n){return n.pipe(u((function(n,o){return Object(r.a)(t(n,o)).pipe(Object(i.a)((function(t,i){return e(n,t,o,i)})))})))}:function(e){return e.lift(new l(t))}}var l=function(){function t(e){C(this,t),this.project=e}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new d(t,this.project))}}]),t}(),d=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t)).project=i,r.index=0,r}return w(n,[{key:"_next",value:function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this._innerSub(e)}},{key:"_innerSub",value:function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new s.a(this),i=this.destination;i.add(n),this.innerSubscription=Object(s.c)(t,n),this.innerSubscription!==n&&i.add(this.innerSubscription)}},{key:"_complete",value:function(){var t=this.innerSubscription;t&&!t.closed||o(h(n.prototype),"_complete",this).call(this),this.unsubscribe()}},{key:"_unsubscribe",value:function(){this.innerSubscription=void 0}},{key:"notifyComplete",value:function(){this.innerSubscription=void 0,this.isStopped&&o(h(n.prototype),"_complete",this).call(this)}},{key:"notifyNext",value:function(t){this.destination.next(t)}}]),n}(s.b)},TMzY:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("kZht"),r=n("LaGA"),o=function(){var t=function(){function t(e,n){var o=this;C(this,t),this.element=e,this.renderer=n,this.orientationChange=new i.o,this.observer=new r.a((function(){return o.determineOrientation()}))}return w(t,[{key:"ngOnInit",value:function(){this.observer.observe(this.element.nativeElement)}},{key:"ngOnDestroy",value:function(){this.observer.disconnect()}},{key:"determineOrientation",value:function(){var t,e=this.element.nativeElement,n=e.offsetHeight,i=e.offsetWidth;this.renderer.removeAttribute(e,"orientation"),this.breakpoints?n>this.breakpoints.vertical?(t="vertical",this.renderer.setAttribute(e,"orientation",t)):i>this.breakpoints.horizontal&&(t="horizontal",this.renderer.setAttribute(e,"orientation",t)):(t=this.minVertical?n>i&&n>this.minVertical?"vertical":"horizontal":this.minHorizontal?i>n&&i>this.minHorizontal?"horizontal":"vertical":i>n?"horizontal":"vertical",this.renderer.setAttribute(e,"orientation",t)),this.orientationChange.emit(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.l),i.Ob(i.G))},t.\u0275dir=i.Jb({type:t,selectors:[["","orientation",""]],inputs:{breakpoints:"breakpoints",minVertical:"minVertical",minHorizontal:"minHorizontal"},outputs:{orientationChange:"orientationChange"}}),t}()},TNp2:function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var i=n("KQpv"),r=n.n(i),o=n("ZTXN"),a=n("+6xv"),s=[Object(a.n)("scaleFade",[Object(a.k)("void, initial, hidden",Object(a.l)({opacity:0,transform:"scale(0)"})),Object(a.k)("visible",Object(a.l)({transform:"scale(1)"})),Object(a.m)("* => visible",Object(a.e)("200ms cubic-bezier(0.215, 0.610, 0.355, 1.000)",Object(a.h)([Object(a.l)({opacity:0,transform:"scale(0)",offset:0}),Object(a.l)({opacity:.5,transform:"scale(0.99)",offset:.5}),Object(a.l)({opacity:1,transform:"scale(1)",offset:1})]))),Object(a.m)("* => hidden",Object(a.e)("100ms cubic-bezier(0.215, 0.610, 0.355, 1.000)",Object(a.l)({opacity:0})))])],c=n("kZht"),u=n("An66"),l=n("aDqW");function d(t,e){if(1&t&&(c.Sb(0),c.Qc(1),c.gc(2,"translate"),c.Rb()),2&t){var n=c.fc();c.Cb(1),c.Sc(" ",c.hc(2,1,n.stringContent)," ")}}function h(t,e){if(1&t&&c.Qb(0,3),2&t){var n=c.fc();c.mc("ngTemplateOutlet",n.content)}}var f,p=r()("trace:sb:tooltip-wrapper"),b=((f=function(){function t(e){C(this,t),this.cdr=e,this.closeInInteraction=!1,this.onHide$=new o.b,this.visibility="initial"}return w(t,[{key:"ngOnDestroy",value:function(){this.onHide$.complete()}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;p("showing in",e,"ms"),this.hideDelayId&&(clearTimeout(this.hideDelayId),this.hideDelayId=void 0),this.closeInInteraction=!0,this.showDelayId=window.setTimeout((function(){t.visibility="visible",t.showDelayId=void 0,t.markForCheck()}),e)}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;p("hiding in",e,"ms"),this.showDelayId&&(clearTimeout(this.showDelayId),this.showDelayId=void 0),this.hideDelayId=window.setTimeout((function(){t.visibility="hidden",t.hideDelayId=void 0,t.markForCheck()}),e)}},{key:"animationStart",value:function(t){p("animation start",t),this.closeInInteraction=!1}},{key:"animationDone",value:function(t){p("animation done",t);var e=t.toState;"hidden"===e&&this.onHide$.next(),"visible"!==e&&"hidden"!==e||(this.closeInInteraction=!0)}},{key:"markForCheck",value:function(){p("marking for check"),this.cdr.markForCheck()}},{key:"handleOutsideInteraction",value:function(t){this.closeInInteraction&&this.hide(0)}},{key:"isStringContent",get:function(){return"object"!=typeof this.content}},{key:"stringContent",get:function(){return(""+this.content).trim()}},{key:"isVisible",get:function(){return"visible"===this.visibility}},{key:"afterHidden",get:function(){return this.onHide$.asObservable()}}]),t}()).\u0275fac=function(t){return new(t||f)(c.Ob(c.h))},f.\u0275cmp=c.Ib({type:f,selectors:[["sb-tooltip-wrapper"]],hostAttrs:["aria-hidden","true"],hostBindings:function(t,e){1&t&&c.bc("click",(function(t){return e.handleOutsideInteraction(t)}),!1,c.Bc)},inputs:{content:"content"},decls:4,vars:3,consts:[[1,"sb-tooltip"],[4,"ngIf","ngIfElse"],["templateContent",""],[3,"ngTemplateOutlet"]],template:function(t,e){if(1&t&&(c.Ub(0,"div",0),c.bc("@scaleFade.start",(function(t){return e.animationStart(t)}))("@scaleFade.done",(function(t){return e.animationDone(t)})),c.Oc(1,d,3,3,"ng-container",1),c.Oc(2,h,1,1,"ng-template",null,2,c.Pc),c.Tb()),2&t){var n=c.Ac(3);c.mc("@scaleFade",e.visibility),c.Cb(1),c.mc("ngIf",e.isStringContent)("ngIfElse",n)}},directives:[u.n,u.s],pipes:[l.d],styles:[".sb-tooltip[_ngcontent-%COMP%]{z-index:101;padding:var(--spacing);max-width:var(--mw,350px);font-family:var(--typeface);color:var(--text-colour);font-size:.9rem;background-color:rgba(var(--tooltip-bg-rgb),.9);border:1px solid var(--border-colour);border-radius:var(--bdrs);box-shadow:var(--shadow100)}@supports ((-webkit-backdrop-filter:blur(0)) or (backdrop-filter:blur(0))){.sb-tooltip[_ngcontent-%COMP%]{background-color:rgba(var(--tooltip-bg-rgb),.75);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}"],data:{animation:[s]},changeDetection:0}),f)},TYVA:function(t,n,i){"use strict";i.d(n,"q",(function(){return u})),i.d(n,"c",(function(){return b})),i.d(n,"b",(function(){return g})),i.d(n,"u",(function(){return _})),i.d(n,"t",(function(){return O})),i.d(n,"x",(function(){return k})),i.d(n,"d",(function(){return w})),i.d(n,"v",(function(){return C})),i.d(n,"j",(function(){return T})),i.d(n,"o",(function(){return S})),i.d(n,"m",(function(){return E})),i.d(n,"p",(function(){return x})),i.d(n,"n",(function(){return P})),i.d(n,"z",(function(){return A})),i.d(n,"k",(function(){return I})),i.d(n,"l",(function(){return M})),i.d(n,"s",(function(){return D})),i.d(n,"g",(function(){return R})),i.d(n,"i",(function(){return j})),i.d(n,"f",(function(){return L})),i.d(n,"e",(function(){return N})),i.d(n,"w",(function(){return U})),i.d(n,"r",(function(){return F})),i.d(n,"y",(function(){return B})),i.d(n,"B",(function(){return z})),i.d(n,"h",(function(){return V})),i.d(n,"a",(function(){return H})),i.d(n,"A",(function(){return q}));var r=i("KQpv"),o=i.n(r),a=i("VmIW"),s=i("lx5p"),c=o()("lib:futures:utils:fees");function u(t,e){var n=Object(s.g)(Object(s.F)("usdVolume"),s.i);return t.map((function(i,r){var o=e.get(r),s=i.tiers.slice().sort(n),u=s.findIndex((function(t){return t.usdVolume<=o}));return-1===u&&c("no fee tier found for ".concat(r.slice(0,4),"..."),{feeSchedules:t,volumes:e}),[s[u],a.Maybe.fromNull(s[u-1])]}))}var l=i("Yu3e"),d=i.n(l),h=i("orIj"),f=i("9hG1"),p=o()("lib:market"),b=":",g="/",v=e(/^[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*([FOP])([FILV]?)_(10+)?(([0-9A-Z]+)(USD|USDC|EUR|BTC|XBT))(?:_(([0-9]{2})([0-9]{2})([0-9]{2})))?(?:_([0-9]+(\.[0-9]+)?)_(P|C))?[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/i,{group:1,type:2,multiplier:3,pair:4,base:5,quote:6,date:7,year:8,month:9,day:10,optionstrike:11,optiontype:13}),y=/^\s*P([IVF])_(([A-Z0-9]{1,7})([A-Z0-9]{3,4}))(?:_(\w+))\s*$/i,_=d()((function(t){var e=t.toUpperCase(),n=function(t){return Object(s.y)(v,t).flatMap((function(e){if(null==(null==e?void 0:e.groups))return a.Maybe.None();var n=e.groups,i=n.group,r=n.type,o=n.multiplier,s=n.pair,c=n.base,u=n.quote,l=n.date,d=n.year,h=n.month,f=n.day,p=c.replace("XBT","BTC"),b=u.replace("XBT","BTC"),m="P"===i,v="I"===r,y={original:t,perpetual:m,inverse:v,collateral:v?p:b,traded:v?b:p,pair:"".concat(p).concat(g).concat(b),customTag:void 0,parts:{family:"F"===r?"flex":"cryp",group:i,type:r,multiplier:o,currencies:{raw:s,base:p,quote:b},maturity:m?void 0:{raw:l,day:f,month:h,year:d,date:new Date("20".concat(d,"-").concat(h,"-").concat(f))}}};return a.Maybe.Just(y)}))}(e);if(n.isSome())return n.some();var i=O(e);if(i.isSome())return i.some();var r=new Error(t+" is not a parsable symbol");throw p(r),r}));function O(t){return Object(s.y)(y,t).map((function(e){var n=m(e.slice(1),5),i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],c=o.replace("XBT","BTC"),u=a.replace("XBT","BTC"),l="I"===i;return{original:t,perpetual:!0,inverse:l,collateral:l?c:u,traded:l?u:c,pair:"".concat(c,"/").concat(u),customTag:s,parts:{family:"F"===i?"flex":"cryp",group:"P",type:i,multiplier:void 0,currencies:{raw:r,base:c,quote:u},maturity:void 0}}}))}function k(t){try{return _(t)}catch(e){return null}}var w=function(t){return t.parts.currencies.base},C=function(t){return t.parts.currencies.quote};function T(t){return _(t).pair}function S(t){return _(t).pair}function E(t){return _(t).parts.currencies.base}function x(t){return _(t).parts.currencies.quote}function P(t){return _(t).collateral}function A(t){return _(t).traded}function I(t){return t.split("/")[0]}function M(t){return t.split("/")[1]}function D(t,e){return(t+e)/2}function R(t){if(!t)return t;var e=t.toUpperCase();return e in h.a?h.a[e]:e}function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=_(t);if(i.perpetual)return n?"long"===e?"TAG.PERPETUAL":"TAG.PERP":"long"===e?"Perpetual":"Perp";var r=f.DateTime.fromJSDate(i.parts.maturity.date);return"long"===e?r.monthLong:r.monthShort}function L(t){return"F"===_(t).parts.type?"mc":"sc"}var N=["XBT","BTC","ETH","LTC","BCH","XRP","EUR"],U=["USD","EUR","XBT","BTC"],F=["perpetual","week","month","quarter","semiannual"],B=Object(s.E)(Object(s.F)("tag"),(function(t){return F.indexOf(t)})),z=["holding","flex","futures"];function V(){var t,e,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=f.DateTime.local(),a=f.DateTime.fromMillis(i),s=f.Interval.fromDateTimes(o,a).toDuration(["months","days","hours","minutes","seconds"]);return o>a?"0d:00h:00m":s.months>0?"".concat((t=s.months,e=s.days,n=f.DateTime.local().plus(f.Duration.fromObject({months:t,days:e,conversionAccuracy:"longterm"})).diffNow().as("days"),Math.round(n)),"d:").concat(s.hours,"h:").concat(Math.floor(s.minutes),"m"):r?"".concat(s.days,"d:").concat(s.hours,"h:").concat(Math.floor(s.minutes),"m:").concat(Math.floor(s.seconds),"s"):"".concat(s.days,"d:").concat(s.hours,"h:").concat(Math.floor(s.minutes),"m")}var H={trading:"order",wallet:"face"};function q(){var t=window.innerWidth;return t>=1920?"desktop-max":t>=1441?"desktop-large":t>=1367?"desktop-medium":"desktop-small"}},Tcl6:function(t,e,n){"use strict";n.d(e,"a",(function(){return _})),n.d(e,"b",(function(){return S})),n.d(e,"c",(function(){return E}));var i=n("O1jd"),r=n("kZht"),o=n("5XID"),s=n("6Oco"),u=n("ZTXN");n("KTx3"),n("prE9"),n("kuMc"),n("An66");var l,d,h,f,p=Object(i.f)({passive:!0}),b=((d=function(){function t(e,n){C(this,t),this._platform=e,this._ngZone=n,this._monitoredElements=new Map}return w(t,[{key:"monitor",value:function(t){var e=this;if(!this._platform.isBrowser)return s.a;var n=Object(o.e)(t),i=this._monitoredElements.get(n);if(i)return i.subject;var r=new u.b,a="cdk-text-field-autofilled",c=function(t){"cdk-text-field-autofill-start"!==t.animationName||n.classList.contains(a)?"cdk-text-field-autofill-end"===t.animationName&&n.classList.contains(a)&&(n.classList.remove(a),e._ngZone.run((function(){return r.next({target:t.target,isAutofilled:!1})}))):(n.classList.add(a),e._ngZone.run((function(){return r.next({target:t.target,isAutofilled:!0})})))};return this._ngZone.runOutsideAngular((function(){n.addEventListener("animationstart",c,p),n.classList.add("cdk-text-field-autofill-monitored")})),this._monitoredElements.set(n,{subject:r,unlisten:function(){n.removeEventListener("animationstart",c,p)}}),r}},{key:"stopMonitoring",value:function(t){var e=Object(o.e)(t),n=this._monitoredElements.get(e);n&&(n.unlisten(),n.subject.complete(),e.classList.remove("cdk-text-field-autofill-monitored"),e.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(e))}},{key:"ngOnDestroy",value:function(){var t=this;this._monitoredElements.forEach((function(e,n){return t.stopMonitoring(n)}))}}]),t}()).\u0275fac=function(t){return new(t||d)(r.Yb(i.a),r.Yb(r.B))},d.\u0275prov=Object(r.Kb)({factory:function(){return new d(Object(r.Yb)(i.a),Object(r.Yb)(r.B))},token:d,providedIn:"root"}),d),g=((l=function t(){C(this,t)}).\u0275mod=r.Mb({type:l}),l.\u0275inj=r.Lb({factory:function(t){return new(t||l)},imports:[[i.b]]}),l),m=n("3kIJ"),v=n("pTnX"),y=n("EmXI"),_=new r.s("MAT_INPUT_VALUE_ACCESSOR"),O=["button","checkbox","file","hidden","image","radio","range","reset","submit"],k=0,T=Object(v.z)((function t(e,n,i,r){C(this,t),this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=r})),S=((f=function(t){a(n,t);var e=c(n);function n(t,r,o,a,s,c,l,d,h,f){var p;C(this,n),(p=e.call(this,c,a,s,o))._elementRef=t,p._platform=r,p.ngControl=o,p._autofillMonitor=d,p._formField=f,p._uid="mat-input-"+k++,p.focused=!1,p.stateChanges=new u.b,p.controlType="mat-input",p.autofilled=!1,p._disabled=!1,p._required=!1,p._type="text",p._readonly=!1,p._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter((function(t){return Object(i.e)().has(t)}));var b=p._elementRef.nativeElement,g=b.nodeName.toLowerCase();return p._inputValueAccessor=l||b,p._previousNativeValue=p.value,p.id=p.id,r.IOS&&h.runOutsideAngular((function(){t.nativeElement.addEventListener("keyup",(function(t){var e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))}))})),p._isServer=!p._platform.isBrowser,p._isNativeSelect="select"===g,p._isTextarea="textarea"===g,p._isNativeSelect&&(p.controlType=b.multiple?"mat-native-select-multiple":"mat-native-select"),p}return w(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe((function(e){t.autofilled=e.isAutofilled,t.stateChanges.next()}))}},{key:"ngOnChanges",value:function(){this.stateChanges.next()}},{key:"ngOnDestroy",value:function(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)}},{key:"ngDoCheck",value:function(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}},{key:"focus",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_focusChanged",value:function(t){t===this.focused||this.readonly&&t||(this.focused=t,this.stateChanges.next())}},{key:"_onInput",value:function(){}},{key:"_dirtyCheckPlaceholder",value:function(){var t,e,n=(null===(e=null===(t=this._formField)||void 0===t?void 0:t._hideControlPlaceholder)||void 0===e?void 0:e.call(t))?null:this.placeholder;if(n!==this._previousPlaceholder){var i=this._elementRef.nativeElement;this._previousPlaceholder=n,n?i.setAttribute("placeholder",n):i.removeAttribute("placeholder")}}},{key:"_dirtyCheckNativeValue",value:function(){var t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}},{key:"_validateType",value:function(){O.indexOf(this._type)}},{key:"_isNeverEmpty",value:function(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}},{key:"_isBadInput",value:function(){var t=this._elementRef.nativeElement.validity;return t&&t.badInput}},{key:"setDescribedByIds",value:function(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}},{key:"onContainerClick",value:function(){this.focused||this.focus()}},{key:"disabled",get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(t){this._disabled=Object(o.c)(t),this.focused&&(this.focused=!1,this.stateChanges.next())}},{key:"id",get:function(){return this._id},set:function(t){this._id=t||this._uid}},{key:"required",get:function(){return this._required},set:function(t){this._required=Object(o.c)(t)}},{key:"type",get:function(){return this._type},set:function(t){this._type=t||"text",this._validateType(),!this._isTextarea&&Object(i.e)().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}},{key:"value",get:function(){return this._inputValueAccessor.value},set:function(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}},{key:"readonly",get:function(){return this._readonly},set:function(t){this._readonly=Object(o.c)(t)}},{key:"empty",get:function(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}},{key:"shouldLabelFloat",get:function(){if(this._isNativeSelect){var t=this._elementRef.nativeElement,e=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&e&&e.label)}return this.focused||!this.empty}}]),n}(T)).\u0275fac=function(t){return new(t||f)(r.Ob(r.l),r.Ob(i.a),r.Ob(m.n,10),r.Ob(m.q,8),r.Ob(m.h,8),r.Ob(v.d),r.Ob(_,10),r.Ob(b),r.Ob(r.B),r.Ob(y.a,8))},f.\u0275dir=r.Jb({type:f,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:9,hostBindings:function(t,e){1&t&&r.bc("focus",(function(){return e._focusChanged(!0)}))("blur",(function(){return e._focusChanged(!1)}))("input",(function(){return e._onInput()})),2&t&&(r.Xb("disabled",e.disabled)("required",e.required),r.Db("id",e.id)("data-placeholder",e.placeholder)("readonly",e.readonly&&!e._isNativeSelect||null)("aria-invalid",e.errorState)("aria-required",e.required.toString()),r.Gb("mat-input-server",e._isServer))},inputs:{id:"id",disabled:"disabled",required:"required",type:"type",value:"value",readonly:"readonly",placeholder:"placeholder",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"]},exportAs:["matInput"],features:[r.Bb([{provide:y.d,useExisting:f}]),r.zb,r.Ab]}),f),E=((h=function t(){C(this,t)}).\u0275mod=r.Mb({type:h}),h.\u0275inj=r.Lb({factory:function(t){return new(t||h)},providers:[v.d],imports:[[g,y.e],g,y.e]}),h)},Ti3e:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var i=n("5E2i");function r(){for(var t=arguments.length,e=new Array(t),n=0;n').concat(n,"")}function r(t){return'

'.concat(t,"

")}function o(t){return'
  • '.concat(t,"
  • ")}n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return o}))},TuP6:function(t,e,n){var i=n("VTjg");function r(t,e){var n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function o(t,e,n){var i=t+e;return void 0!==n&&(i+=" "+n),i}e.render=function(t,e,n){var a=i.getOptions(e),s=t.modules.size,c=t.modules.data,u=s+2*a.margin,l=a.color.light.a?"':"",d="0&&u>0&&t[c-1]||(i+=a?o("M",u+n,.5+l+n):o("m",r,0),r=0,a=!1),u+1',h=''+l+d+"\n";return"function"==typeof n&&n(null,h),h}},TzY9:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n("Tcl6"),r=n("kZht"),o=n("EmXI"),a=n("3kIJ"),s=n("aDqW"),c=function(){var t=function(){function t(){C(this,t),this.controlName="otp"}return w(t,[{key:"ngOnInit",value:function(){this.input.focus()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Ib({type:t,selectors:[["input-otp-entry"]],viewQuery:function(t,e){var n;1&t&&r.Jc(i.b,!0),2&t&&r.zc(n=r.cc())&&(e.input=n.first)},inputs:{form:"form",controlName:"controlName"},decls:5,vars:5,consts:[["color","accent","appearance","fill",3,"formGroup"],["matInput","","maxlength","6","autocomplete","off",3,"formControlName"]],template:function(t,e){1&t&&(r.Ub(0,"mat-form-field",0),r.Ub(1,"mat-label"),r.Qc(2),r.gc(3,"translate"),r.Tb(),r.Pb(4,"input",1),r.Tb()),2&t&&(r.mc("formGroup",e.form),r.Cb(2),r.Rc(r.hc(3,3,"FORM.GOOGLE_AUTH_CODE")),r.Cb(2),r.mc("formControlName",e.controlName))},directives:[o.c,a.p,a.h,o.f,i.b,a.c,a.k,a.o,a.g],pipes:[s.d],styles:["[_nghost-%COMP%]{display:block}mat-form-field[_ngcontent-%COMP%]{margin-top:var(--margin-top,0);width:100%}"],changeDetection:0}),t}()},UDV5:function(t,e,n){"use strict";n.d(e,"a",(function(){return O})),n.d(e,"b",(function(){return x})),n.d(e,"c",(function(){return T}));var i=n("jL3B"),r=n("5XID"),o=n("kZht"),s=n("3kIJ"),u=n("pTnX"),l=n("FxgA"),d=n("s2U3"),h=["input"],f=function(){return{enterDuration:150}},p=["*"],b=new o.s("mat-checkbox-default-options",{providedIn:"root",factory:function(){return{color:"accent",clickAction:"check-indeterminate"}}}),g=new o.s("mat-checkbox-click-action"),m=0,v={provide:s.m,useExisting:Object(o.V)((function(){return O})),multi:!0},y=function t(){C(this,t)},_=Object(u.B)(Object(u.w)(Object(u.x)(Object(u.y)((function t(e){C(this,t),this._elementRef=e}))))),O=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,a,s,c,u,l){var d;return C(this,n),(d=e.call(this,t))._changeDetectorRef=i,d._focusMonitor=r,d._ngZone=a,d._clickAction=c,d._animationMode=u,d._options=l,d.ariaLabel="",d.ariaLabelledby=null,d._uniqueId="mat-checkbox-"+ ++m,d.id=d._uniqueId,d.labelPosition="after",d.name=null,d.change=new o.o,d.indeterminateChange=new o.o,d._onTouched=function(){},d._currentAnimationClass="",d._currentCheckState=0,d._controlValueAccessorChangeFn=function(){},d._checked=!1,d._disabled=!1,d._indeterminate=!1,d._options=d._options||{},d._options.color&&(d.color=d.defaultColor=d._options.color),d.tabIndex=parseInt(s)||0,d._clickAction=d._clickAction||d._options.clickAction,d}return w(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){e||Promise.resolve().then((function(){t._onTouched(),t._changeDetectorRef.markForCheck()}))})),this._syncIndeterminate(this._indeterminate)}},{key:"ngAfterViewChecked",value:function(){}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_onLabelTextChange",value:function(){this._changeDetectorRef.detectChanges()}},{key:"writeValue",value:function(t){this.checked=!!t}},{key:"registerOnChange",value:function(t){this._controlValueAccessorChangeFn=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t}},{key:"_getAriaChecked",value:function(){return this.checked?"true":this.indeterminate?"mixed":"false"}},{key:"_transitionCheckState",value:function(t){var e=this._currentCheckState,n=this._elementRef.nativeElement;if(e!==t&&(this._currentAnimationClass.length>0&&n.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){n.classList.add(this._currentAnimationClass);var i=this._currentAnimationClass;this._ngZone.runOutsideAngular((function(){setTimeout((function(){n.classList.remove(i)}),1e3)}))}}},{key:"_emitChangeEvent",value:function(){var t=new y;t.source=this,t.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(t)}},{key:"toggle",value:function(){this.checked=!this.checked}},{key:"_onInputClick",value:function(t){var e=this;t.stopPropagation(),this.disabled||"noop"===this._clickAction?this.disabled||"noop"!==this._clickAction||(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==this._clickAction&&Promise.resolve().then((function(){e._indeterminate=!1,e.indeterminateChange.emit(e._indeterminate)})),this.toggle(),this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"keyboard",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._inputElement,t,e)}},{key:"_onInteractionEvent",value:function(t){t.stopPropagation()}},{key:"_getAnimationClassForCheckStateTransition",value:function(t,e){if("NoopAnimations"===this._animationMode)return"";var n="";switch(t){case 0:if(1===e)n="unchecked-checked";else{if(3!=e)return"";n="unchecked-indeterminate"}break;case 2:n=1===e?"unchecked-checked":"unchecked-indeterminate";break;case 1:n=2===e?"checked-unchecked":"checked-indeterminate";break;case 3:n=1===e?"indeterminate-checked":"indeterminate-unchecked"}return"mat-checkbox-anim-"+n}},{key:"_syncIndeterminate",value:function(t){var e=this._inputElement;e&&(e.nativeElement.indeterminate=t)}},{key:"inputId",get:function(){return(this.id||this._uniqueId)+"-input"}},{key:"required",get:function(){return this._required},set:function(t){this._required=Object(r.c)(t)}},{key:"checked",get:function(){return this._checked},set:function(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}},{key:"disabled",get:function(){return this._disabled},set:function(t){var e=Object(r.c)(t);e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}},{key:"indeterminate",get:function(){return this._indeterminate},set:function(t){var e=t!=this._indeterminate;this._indeterminate=Object(r.c)(t),e&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}}]),n}(_);return t.\u0275fac=function(e){return new(e||t)(o.Ob(o.l),o.Ob(o.h),o.Ob(i.h),o.Ob(o.B),o.Zb("tabindex"),o.Ob(g,8),o.Ob(l.a,8),o.Ob(b,8))},t.\u0275cmp=o.Ib({type:t,selectors:[["mat-checkbox"]],viewQuery:function(t,e){var n;1&t&&(o.Wc(h,!0),o.Wc(u.r,!0)),2&t&&(o.zc(n=o.cc())&&(e._inputElement=n.first),o.zc(n=o.cc())&&(e.ripple=n.first))},hostAttrs:[1,"mat-checkbox"],hostVars:12,hostBindings:function(t,e){2&t&&(o.Xb("id",e.id),o.Db("tabindex",null),o.Gb("mat-checkbox-indeterminate",e.indeterminate)("mat-checkbox-checked",e.checked)("mat-checkbox-disabled",e.disabled)("mat-checkbox-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],id:"id",labelPosition:"labelPosition",name:"name",required:"required",checked:"checked",disabled:"disabled",indeterminate:"indeterminate",ariaDescribedby:["aria-describedby","ariaDescribedby"],value:"value"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[o.Bb([v]),o.zb],ngContentSelectors:p,decls:17,vars:20,consts:[[1,"mat-checkbox-layout"],["label",""],[1,"mat-checkbox-inner-container"],["type","checkbox",1,"mat-checkbox-input","cdk-visually-hidden",3,"id","required","checked","disabled","tabIndex","change","click"],["input",""],["matRipple","",1,"mat-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleRadius","matRippleCentered","matRippleAnimation"],[1,"mat-ripple-element","mat-checkbox-persistent-ripple"],[1,"mat-checkbox-frame"],[1,"mat-checkbox-background"],["version","1.1","focusable","false","viewBox","0 0 24 24",0,"xml","space","preserve",1,"mat-checkbox-checkmark"],["fill","none","stroke","white","d","M4.1,12.7 9,17.6 20.3,6.3",1,"mat-checkbox-checkmark-path"],[1,"mat-checkbox-mixedmark"],[1,"mat-checkbox-label",3,"cdkObserveContent"],["checkboxLabel",""],[2,"display","none"]],template:function(t,e){if(1&t&&(o.lc(),o.Ub(0,"label",0,1),o.Ub(2,"div",2),o.Ub(3,"input",3,4),o.bc("change",(function(t){return e._onInteractionEvent(t)}))("click",(function(t){return e._onInputClick(t)})),o.Tb(),o.Ub(5,"div",5),o.Pb(6,"div",6),o.Tb(),o.Pb(7,"div",7),o.Ub(8,"div",8),o.ec(),o.Ub(9,"svg",9),o.Pb(10,"path",10),o.Tb(),o.dc(),o.Pb(11,"div",11),o.Tb(),o.Tb(),o.Ub(12,"span",12,13),o.bc("cdkObserveContent",(function(){return e._onLabelTextChange()})),o.Ub(14,"span",14),o.Qc(15,"\xa0"),o.Tb(),o.kc(16),o.Tb(),o.Tb()),2&t){var n=o.Ac(1),i=o.Ac(13);o.Db("for",e.inputId),o.Cb(2),o.Gb("mat-checkbox-inner-container-no-side-margin",!i.textContent||!i.textContent.trim()),o.Cb(1),o.mc("id",e.inputId)("required",e.required)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex),o.Db("value",e.value)("name",e.name)("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby)("aria-checked",e._getAriaChecked())("aria-describedby",e.ariaDescribedby),o.Cb(2),o.mc("matRippleTrigger",n)("matRippleDisabled",e._isRippleDisabled())("matRippleRadius",20)("matRippleCentered",!0)("matRippleAnimation",o.qc(19,f))}},directives:[u.r,d.a],styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-frame{border-style:dotted}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}\n"],encapsulation:2,changeDetection:0}),t}(),k={provide:s.l,useExisting:Object(o.V)((function(){return T})),multi:!0},T=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(s.a);return t.\u0275fac=function(e){return S(e||t)},t.\u0275dir=o.Jb({type:t,selectors:[["mat-checkbox","required","","formControlName",""],["mat-checkbox","required","","formControl",""],["mat-checkbox","required","","ngModel",""]],features:[o.Bb([k]),o.zb]}),t}(),S=o.Wb(T),E=function(){var t=function t(){C(this,t)};return t.\u0275mod=o.Mb({type:t}),t.\u0275inj=o.Lb({factory:function(e){return new(e||t)}}),t}(),x=function(){var t=function t(){C(this,t)};return t.\u0275mod=o.Mb({type:t}),t.\u0275inj=o.Lb({factory:function(e){return new(e||t)},imports:[[u.s,u.j,d.c,E],u.j,E]}),t}()},UVER:function(t,e,n){"use strict";n.d(e,"a",(function(){return nt}));var i=n("D57K"),r=n("kZht"),o=n("O30t"),a=n("LoUP"),s=n("EZWv"),c=n("gxtV"),u=n("jIqt"),l=n("+vck"),d=n("UVqw"),h=n("IkSM"),f=n("B6Vo"),p=n("Cc4E"),b=n("zho4"),g=n("anSm"),m=n("1o0v"),v=n("yPvj"),y=n("rBBj"),_=n("chaP"),O=n("+I9z"),k=n("LbKT"),T=n("NxuZ"),S=n("WYJo"),E=n("aDqW"),x=n("An66"),P=n("rUBT"),A=n("DpwM"),I=n("rqGg");function M(t,e){1&t&&r.Pb(0,"tr",26)}function D(t,e){if(1&t){var n=r.Vb();r.Ub(0,"tr",27),r.bc("click",(function(){r.Ec(n);var t=e.$implicit;return r.fc().selectTicker.emit({symbol:t.instrument,replaceUrl:!1})})),r.Tb()}}var R=function(){return[250,100]};function j(t,e){if(1&t&&(r.Ub(0,"th",28),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,R)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.DATE_TIME")," ")}}function L(t,e){if(1&t&&(r.Ub(0,"td",29),r.Ub(1,"span"),r.Qc(2),r.gc(3,"date"),r.Tb(),r.Ub(4,"span",30),r.Qc(5),r.gc(6,"date"),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(2),r.Rc(r.ic(3,2,n.time,"HH:mm:ss")),r.Cb(3),r.Rc(r.ic(6,5,n.time,"dd/MMM/yyyy"))}}function N(t,e){if(1&t&&(r.Ub(0,"th",31),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,R)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.MARKET")," ")}}function U(t,e){if(1&t&&(r.Ub(0,"td",29),r.Ub(1,"span"),r.Pb(2,"market-icon",32),r.gc(3,"base"),r.Qc(4),r.gc(5,"pair"),r.Tb(),r.Ub(6,"span"),r.Qc(7),r.gc(8,"uppercase"),r.gc(9,"contractFamily"),r.gc(10,"translate"),r.gc(11,"maturityMonth"),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(2),r.mc("base",r.hc(3,4,n.instrument)),r.Cb(2),r.Sc(" ",r.hc(5,6,n.instrument)," "),r.Cb(3),r.Tc(" ",r.hc(8,8,r.hc(9,10,n.instrument))," ",r.hc(10,12,r.ic(11,14,n.instrument,"short"))," ")}}function F(t,e){if(1&t&&(r.Ub(0,"th",33),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,R)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.TRIGGER")," ")}}function B(t,e){if(1&t&&(r.Ub(0,"td",34),r.Qc(1),r.gc(2,"titlecase"),r.Ub(3,"span",35),r.Qc(4),r.gc(5,"sato"),r.Tb(),r.Tb()),2&t){var n=e.$implicit,i=r.fc();r.Cb(1),r.Tc(" ",r.hc(2,3,n.triggerSignal)," ",i.getTriggerSign(n)," "),r.Cb(3),r.Sc(" ",r.ic(5,5,n.stop_price,n)," ")}}function z(t,e){if(1&t&&(r.Ub(0,"th",36),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,R)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.TYPE")," ")}}function V(t,e){if(1&t&&(r.Ub(0,"td",34),r.Qc(1),r.gc(2,"titlecase"),r.Tb()),2&t){var n=e.$implicit;r.Cb(1),r.Sc(" ",r.hc(2,1,n.type.replace("_"," "))," ")}}function H(t,e){if(1&t&&(r.Ub(0,"th",37),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,R)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.SIDE")," ")}}function q(t,e){if(1&t&&(r.Ub(0,"td",34),r.Ub(1,"strong",38),r.Qc(2),r.gc(3,"translate"),r.Tb(),r.Tb()),2&t){var n=e.$implicit,i=r.fc();r.Cb(1),r.mc("pnlBool",0===n.direction),r.Cb(1),r.Sc(" ",r.hc(3,2,i.getDirection(n))," ")}}function $(t,e){if(1&t&&(r.Ub(0,"th",39),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,R)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.PRICE")," ")}}function Q(t,e){if(1&t&&(r.Ub(0,"td",29),r.Ub(1,"span",40),r.Qc(2),r.gc(3,"sato"),r.gc(4,"translate"),r.Tb(),r.Ub(5,"span",30),r.Qc(6),r.gc(7,"quote"),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(2),r.Sc(" ",n.limit_price?r.ic(3,2,n.limit_price,n):r.hc(4,5,"LABEL.MARKET")," "),r.Cb(4),r.Rc(n.limit_price?r.hc(7,7,n.instrument):null)}}function W(t,e){if(1&t&&(r.Ub(0,"th",41),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,R)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.SIZE")," ")}}function G(t,e){if(1&t&&(r.Ub(0,"td",42),r.Pb(1,"ghost-trail",43),r.Ub(2,"span",30),r.Qc(3),r.gc(4,"asset"),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(1),r.nc("content",n.displayQty),r.mc("showZeros",!1),r.Cb(2),r.Rc(r.hc(4,3,n.tradingDisplayAsset))}}function Y(t,e){if(1&t&&(r.Ub(0,"th",44),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,R)),r.Cb(1),r.Sc(" ",r.hc(2,3,"BUTTON.REDUCE_ONLY")," ")}}function K(t,e){if(1&t&&(r.Ub(0,"td",45),r.Qc(1),r.Tb()),2&t){var n=e.$implicit;r.mc("pnl",n.reduce_only),r.Cb(1),r.Sc(" ",n.reduce_only," ")}}function Z(t,e){if(1&t){var n=r.Vb();r.Ub(0,"th",46),r.bc("click",(function(){return r.Ec(n),r.fc().cancelAllOrders.emit()})),r.Pb(1,"fa-icon",47),r.Ub(2,"p"),r.Qc(3),r.gc(4,"translate"),r.Tb(),r.Tb()}2&t&&(r.Cb(3),r.Rc(r.hc(4,1,"BUTTON.CANCEL_ALL_ORDERS")))}function X(t,e){if(1&t){var n=r.Vb();r.Ub(0,"td",34),r.Ub(1,"div",48),r.bc("click",(function(t){r.Ec(n);var i=e.$implicit;return r.fc().viewDetailed.emit({order:i}),t.stopPropagation()})),r.Pb(2,"fa-icon",49),r.Tb(),r.Ub(3,"div",50),r.bc("click",(function(t){r.Ec(n);var i=e.$implicit;return r.fc().editOrder.emit({order:i}),t.stopPropagation()})),r.Pb(4,"fa-icon",51),r.gc(5,"translate"),r.Ub(6,"p"),r.Qc(7),r.gc(8,"translate"),r.Tb(),r.Tb(),r.Ub(9,"div",52),r.bc("click",(function(t){r.Ec(n);var i=e.$implicit;return r.fc().cancelOrder.emit({id:i.order_id}),t.stopPropagation()})),r.Pb(10,"fa-icon",53),r.gc(11,"translate"),r.Ub(12,"p"),r.Qc(13),r.gc(14,"translate"),r.Tb(),r.Tb(),r.Tb()}2&t&&(r.Cb(4),r.mc("matTooltip",r.hc(5,4,"BUTTON.EDIT")),r.Cb(3),r.Rc(r.hc(8,6,"BUTTON.EDIT")),r.Cb(3),r.mc("matTooltip",r.hc(11,8,"BUTTON.CANCEL")),r.Cb(3),r.Rc(r.hc(14,10,"BUTTON.CANCEL")))}var J=function(){return{small:100,medium:400,large:800}},tt=function(){return[10,20,50]},et=function(t,e){var n,i={symbol:t.instrument,price:null!==(n=t.limit_price)&&void 0!==n?n:0,trigger_when:t.stop_price,filled:t.qty,side:t.direction};return e in i?i[e]:t[e]},nt=function(){var t=function(){function t(){C(this,t),this.tableData=new o.k([]),this.tableColumns=["time","symbol","trigger_when","type","side","qty","price","reduce_only","order_actions"],this.selectTicker=new r.o,this.editOrder=new r.o,this.cancelOrder=new r.o,this.cancelAllOrders=new r.o,this.viewDetailed=new r.o}return w(t,[{key:"ngOnInit",value:function(){this.tableData.sortingDataAccessor=et,this.tableData.paginator=this.paginator}},{key:"ngAfterViewInit",value:function(){var t=this;this.tableSort.changes.pipe(Object(u.a)(this.tableSort),Object(c.b)(this)).subscribe((function(e){e.first&&(t.tableData.sort=e.first)}))}},{key:"trackByOrderId",value:function(t,e){return e.order_id}},{key:"getTriggerSign",value:function(t){return"stop"===t.type==(t.direction===l.a.Buy)?"\u2265":"\u2264"}},{key:"getDirection",value:function(t){return t.direction===l.a.Sell?"SIDE.SELL":"SIDE.BUY"}},{key:"orders",set:function(t){this.tableData.data=t.valueSeq().toArray()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Ib({type:t,selectors:[["trigger-orders-desktop"]],viewQuery:function(t,e){var n;1&t&&(r.Jc(s.a,!0),r.Wc(a.a,!0)),2&t&&(r.zc(n=r.cc())&&(e.paginator=n.first),r.zc(n=r.cc())&&(e.tableSort=n))},inputs:{orders:"orders",displayTooltips:"displayTooltips"},outputs:{selectTicker:"selectTicker",editOrder:"editOrder",cancelOrder:"cancelOrder",cancelAllOrders:"cancelAllOrders",viewDetailed:"viewDetailed"},decls:31,vars:10,consts:[["breakpoint","","mat-table","","matSort","",3,"breakpoints","dataSource","trackBy"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",3,"click",4,"matRowDef","matRowDefColumns"],["matColumnDef","time"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.DATE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["class","block-cell","mat-cell","","body","",4,"matCellDef"],["matColumnDef","symbol"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.MARKET",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["matColumnDef","trigger_when"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.SIGNAL",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["mat-cell","","body","",4,"matCellDef"],["matColumnDef","type"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.TYPE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["matColumnDef","side"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.SIDE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["matColumnDef","price"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.PRICE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["matColumnDef","qty"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.SIZE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["mat-cell","","body","","mono","",4,"matCellDef"],["matColumnDef","reduce_only"],["mat-header-cell","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.REDUCE_ONLY",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["mat-cell","","body","",3,"pnl",4,"matCellDef"],["matColumnDef","order_actions"],["class","cancel-all-button","body","","mat-header-cell","",3,"click",4,"matHeaderCellDef"],[3,"pageSize","pageSizeOptions"],["mat-header-row",""],["mat-row","",3,"click"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.DATE",3,"sbDisabled","sbDelay"],["mat-cell","","body","",1,"block-cell"],["ghost",""],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.MARKET",3,"sbDisabled","sbDelay"],[3,"base"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.SIGNAL",3,"sbDisabled","sbDelay"],["mat-cell","","body",""],[1,"global__text--mono"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.TYPE",3,"sbDisabled","sbDelay"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.SIDE",3,"sbDisabled","sbDelay"],[3,"pnlBool"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.PRICE",3,"sbDisabled","sbDelay"],["mono",""],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.SIZE",3,"sbDisabled","sbDelay"],["mat-cell","","body","","mono",""],[3,"content","showZeros"],["mat-header-cell","","tooltip","","sbTooltip","TOOLTIP.TRIGGER_ORDERS.REDUCE_ONLY",3,"sbDisabled","sbDelay"],["mat-cell","","body","",3,"pnl"],["body","","mat-header-cell","",1,"cancel-all-button",3,"click"],["icon","close","size","lg"],[1,"copy-button",3,"click"],["icon","file","size","lg"],[1,"edit-button",3,"click"],["primary","","icon","edit","size","lg",3,"matTooltip"],[1,"cancel-button",3,"click"],["icon","close","size","lg",3,"matTooltip"]],template:function(t,e){1&t&&(r.Ub(0,"table",0),r.Oc(1,M,1,0,"tr",1),r.Oc(2,D,1,0,"tr",2),r.Sb(3,3),r.Oc(4,j,3,6,"th",4),r.Oc(5,L,7,8,"td",5),r.Rb(),r.Sb(6,6),r.Oc(7,N,3,6,"th",7),r.Oc(8,U,12,17,"td",5),r.Rb(),r.Sb(9,8),r.Oc(10,F,3,6,"th",9),r.Oc(11,B,6,8,"td",10),r.Rb(),r.Sb(12,11),r.Oc(13,z,3,6,"th",12),r.Oc(14,V,3,3,"td",10),r.Rb(),r.Sb(15,13),r.Oc(16,H,3,6,"th",14),r.Oc(17,q,4,4,"td",10),r.Rb(),r.Sb(18,15),r.Oc(19,$,3,6,"th",16),r.Oc(20,Q,8,9,"td",5),r.Rb(),r.Sb(21,17),r.Oc(22,W,3,6,"th",18),r.Oc(23,G,5,5,"td",19),r.Rb(),r.Sb(24,20),r.Oc(25,Y,3,6,"th",21),r.Oc(26,K,2,2,"td",22),r.Rb(),r.Sb(27,23),r.Oc(28,Z,5,3,"th",24),r.Oc(29,X,15,12,"td",10),r.Rb(),r.Tb(),r.Pb(30,"mat-paginator",25)),2&t&&(r.mc("breakpoints",r.qc(8,J))("dataSource",e.tableData)("trackBy",e.trackByOrderId),r.Cb(1),r.mc("matHeaderRowDef",e.tableColumns)("matHeaderRowDefSticky",!0),r.Cb(1),r.mc("matRowDefColumns",e.tableColumns),r.Cb(28),r.mc("pageSize",20)("pageSizeOptions",r.qc(9,tt)))},directives:[o.j,d.a,a.a,o.g,o.i,o.c,o.e,o.b,s.a,o.f,o.h,o.d,a.b,h.a,f.a,p.a,b.a,o.a,g.a,m.a,v.a,y.a,_.a,O.a,k.a,T.b,S.a],pipes:[E.d,x.e,P.a,P.e,x.x,P.c,P.d,x.w,A.c,P.f,I.a],styles:["market-icon[_ngcontent-%COMP%]{font-size:20px}table[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%]{height:calc(var(--table-row-height) + var(--spacing))!important}table[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%]:last-of-type, table[_ngcontent-%COMP%] .mat-header-cell[_ngcontent-%COMP%]:last-of-type{text-align:right}.block-cell[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:block;line-height:1.25em}.actions-header[_ngcontent-%COMP%]{cursor:pointer}.actions-header[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.actions-header[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--warn-colour);margin-right:var(--spacing-s)}.actions-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--warn-colour);text-transform:capitalize!important}.cancel-button[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%]{cursor:pointer;display:inline-block}.cancel-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.cancel-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-left:var(--spacing-s)}.copy-button[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%]{margin-right:var(--spacing)}.copy-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--brand)}.cancel-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:var(--warn-colour)}.cancel-all-button[_ngcontent-%COMP%]{cursor:pointer}.cancel-all-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.cancel-all-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--warn-colour);margin-right:var(--spacing-s)}.cancel-all-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--warn-colour);text-transform:capitalize!important}table[breakpoint=medium][_ngcontent-%COMP%] .mat-column-reduce_only[_ngcontent-%COMP%]{display:none}table[breakpoint=medium][_ngcontent-%COMP%] .mat-column-trigger_when[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block}table[breakpoint=medium][_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], table[breakpoint=medium][_ngcontent-%COMP%] .copy-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], table[breakpoint=medium][_ngcontent-%COMP%] .edit-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.mat-column-reduce_only[_ngcontent-%COMP%]{text-align:right;text-transform:capitalize;padding-right:var(--spacing)}"],changeDetection:0}),t=Object(i.d)([Object(c.a)()],t)}()},UVqw:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("LaGA"),r=n("kZht"),o=function(){var t=function(){function t(e,n){var r=this;C(this,t),this.element=e,this.renderer=n,this.breakpoints={small:100,medium:400,large:500},this.observer=new i.a((function(){return r.determineBreakpoint()}))}return w(t,[{key:"ngOnInit",value:function(){this.observer.observe(this.element.nativeElement)}},{key:"ngOnDestroy",value:function(){this.observer.disconnect()}},{key:"determineBreakpoint",value:function(){var t=this.element.nativeElement,e=t.offsetWidth;this.renderer.removeAttribute(t,"breakpoint");var n,i=p(Object.entries(this.breakpoints).reverse());try{for(i.s();!(n=i.n()).done;){var r=m(n.value,2),o=r[0];if(e>=r[1]){this.renderer.setAttribute(t,"breakpoint",o);break}}}catch(a){i.e(a)}finally{i.f()}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(r.l),r.Ob(r.G))},t.\u0275dir=r.Jb({type:t,selectors:[["","breakpoint",""]],inputs:{breakpoints:"breakpoints"}}),t}()},UZ8P:function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return V}));var i=n("D57K"),r=n("An66"),o=n("zqNl"),a=n("C05f"),s=n("KTx3"),c=n("VvXq"),u=n("gxtV"),l=n("YtkY"),d=n("prE9"),h=n("8j5Y"),f=n("Wg7D"),p=n("mWib"),b=n("LaGA"),g=n("KQpv"),m=n.n(g),v=n("bCr7"),y=n("/sr6"),_=n("IncQ"),O=n("sXtk"),k=n("NloN"),T=n("ylpo"),S=n("bjK4"),E=n("rxqU"),x=n("i67J"),P=n("lx5p"),A=n("qAYy"),I=n("YyhG"),M=n("kZht"),D=n("1etq"),R=n("B6Vo"),j=n("zho4"),L=n("Cc4E"),N=n("NxuZ"),U=n("aDqW"),F=["canvas"],B=function(){return[1e3,0]},z=m()("app:depth-chart"),V=function(){var e=function(){function e(n,i,r,s){C(this,e),this.el=n,this.store=i,this.env=r,this.document=s,this.workerInner=new Worker(t,{type:void 0,name:"depth-chart"}),this.worker=new _.a(this.workerInner),this.span$=new a.a(Object(k.b)(T.f,.01)),this.ticker$=this.store.pipe(Object(o.m)(A.p)),this.theme$=this.store.pipe(Object(o.m)(S.q)),this.noobtips$=this.store.pipe(Object(o.m)(E.y)),this.userPairOrders$=this.store.pipe(Object(o.m)(I.f),Object(l.a)((function(t){return t.valueSeq().map(Object(P.F)("limit_price")).filter(P.m).toArray()}))),this.tradingUnits$=this.store.pipe(Object(o.m)(E.r),Object(l.a)(Object(P.F)("trading"))),this.observer=new b.a(this.tryCanvasResize.bind(this))}return w(e,[{key:"ngOnInit",value:function(){var t=this;this.observer.observe(this.el.nativeElement);var e=this.canvas.nativeElement;e.width=this.el.nativeElement.offsetWidth,e.height=this.el.nativeElement.offsetHeight,this.span$.pipe(Object(u.b)(this)).subscribe((function(e){return t.worker.dispatch("span",e)})),this.worker.on("ready",(function(){z("worker ready");var n={wsUrl:t.env.urls.websocket,dimensions:Object(v.b)(e.width,e.height),span:t.span$.value,debug:m.a.enabled("app:worker:depth-chart")};if(e.transferControlToOffscreen){var i=e.transferControlToOffscreen();t.worker.dispatch("init",Object.assign(Object.assign({},n),{canvas:i}),[i])}else{var r=new y.a,o=e.getContext("2d");t.worker.dispatch("init",Object.assign(Object.assign({},n),{canvas:void 0})),t.worker.on("paint",(function(t){var e=t.drawCalls;r.replaceDrawCalls(e),r.flushTo(o)}))}t.ticker$.pipe(Object(x.g)(),Object(u.b)(t)).subscribe((function(e){var n,i,r=e.product_id,o=null!==(i=null===(n=e.numericPrecision)||void 0===n?void 0:n.short)&&void 0!==i?i:2;t.worker.dispatch("market-change",{symbol:r,precision:o,exchangeRate:e.markPrice})})),setTimeout(t.tryCanvasResize.bind(t),10)})),Object(s.a)(this.canvas.nativeElement,"mousemove").pipe(Object(u.b)(this),Object(d.a)(0,c.a)).subscribe((function(e){return t.worker.dispatch("mouse-move",[e.timeStamp,Object(v.c)(e.offsetX||e.layerX||0,e.offsetY||e.layerY||0)])})),Object(s.a)(this.canvas.nativeElement,"mouseleave").pipe(Object(u.b)(this)).subscribe((function(e){return t.worker.dispatch("mouse-leave",e.timeStamp)}));var n=function(){t.worker.dispatch("visibility-change",t.document.visibilityState)};n(),Object(s.a)(this.document,"visibilitychange").pipe(Object(u.b)(this)).subscribe(n),Object(s.a)(this.el.nativeElement,"wheel").pipe(Object(h.a)((function(t){return t.preventDefault()})),Object(f.a)(0,c.a),Object(u.b)(this)).subscribe((function(e){t.alterSpan(e.deltaY)})),this.span$.pipe(Object(p.a)(500),Object(u.b)(this)).subscribe((function(t){return Object(k.c)(T.f,t)})),this.theme$.pipe(Object(u.b)(this)).subscribe((function(e){return t.worker.dispatch("theme",e)})),this.tradingUnits$.pipe(Object(u.b)(this)).subscribe((function(e){return t.worker.dispatch("trading-units-change",e)})),this.userPairOrders$.pipe(Object(u.b)(this)).subscribe((function(e){return t.worker.dispatch("pair-orders",e)}))}},{key:"ngOnDestroy",value:function(){this.worker.dispatch("stop",void 0),this.observer.disconnect()}},{key:"alterSpan",value:function(t){var e=Math.pow(t>0?.99:1/.99,Math.abs(t)),n=Object(y.b)(this.span$.value*e),i=Number(n.toPrecision(4));this.span$.next(i)}},{key:"tryCanvasResize",value:function(){var t=this.el.nativeElement,e=t.offsetWidth,n=t.offsetHeight,i=this.canvas.nativeElement;i.transferControlToOffscreen||(i.width=e,i.height=n),this.worker.dispatch("resize",Object(v.b)(e,n))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(M.Ob(M.l),M.Ob(o.b),M.Ob(O.a),M.Ob(r.d))},e.\u0275cmp=M.Ib({type:e,selectors:[["depth-chart"]],viewQuery:function(t,e){var n;1&t&&M.Jc(F,!0),2&t&&M.zc(n=M.cc())&&(e.canvas=n.first)},decls:11,vars:18,consts:[["canvas",""],["subheading","","sbTooltip","TOOLTIP.DEPTH_CHART_SCROLL",1,"span",3,"sbDelay","sbDisabled"],["icon","plus","size","lg",3,"click"],["icon","minus","size","lg",3,"click"]],template:function(t,e){1&t&&(M.Pb(0,"canvas",null,0),M.Ub(2,"div",1),M.gc(3,"async"),M.Qc(4),M.gc(5,"translate"),M.Ub(6,"fa-icon",2),M.bc("click",(function(){return e.alterSpan(5)})),M.Tb(),M.Ub(7,"fa-icon",3),M.bc("click",(function(){return e.alterSpan(-5)})),M.Tb(),M.Qc(8),M.gc(9,"percent"),M.gc(10,"async"),M.Tb()),2&t&&(M.Lc("width",100,"%")("height",100,"%"),M.Cb(2),M.mc("sbDelay",M.qc(17,B))("sbDisabled",!1===M.hc(3,8,e.noobtips$)),M.Cb(2),M.Sc(" ",M.hc(5,10,"LABEL.SPAN")," "),M.Cb(4),M.Sc(" ",M.ic(9,12,M.hc(10,15,e.span$),"1.3-3"),"\n"))},directives:[D.a,R.a,j.a,L.a,N.b],pipes:[r.b,U.d,r.u],styles:["[_nghost-%COMP%]{display:grid;overflow:hidden;height:100%}.span[_ngcontent-%COMP%]{margin:1em;position:absolute;z-index:2;-webkit-user-select:none;-moz-user-select:none;user-select:none}.span[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{cursor:pointer}"],changeDetection:0}),e=Object(i.d)([Object(u.a)()],e)}()}).call(this,n("71O4"))},UbJG:function(t,e,n){"use strict";n.d(e,"g",(function(){return _})),n.d(e,"f",(function(){return k})),n.d(e,"b",(function(){return w})),n.d(e,"d",(function(){return C})),n.d(e,"a",(function(){return T})),n.d(e,"c",(function(){return S})),n.d(e,"h",(function(){return E})),n.d(e,"e",(function(){return x}));var i=n("zqNl"),r=n("og7C"),o=n("VmIW"),a=n("p5wL"),s=n("lx5p"),c=n("YzTY"),u=n("yN5A"),l=n("NloN"),d=n("ylpo");function h(t,e,n){var i=Object(a.b)(e,t,"workspaces");return Object(a.b)(n,i,"activeWorkspace")}var f,p,g,v,y=Object(i.i)((f=Object(c.e)(),p=Object(l.b)(d.v,[f]),g=Object(l.b)(d.a,f.id),v=p.map(Object(s.F)("id")).includes(g)?g:p[0].id,{workspaces:p,activeWorkspace:v,draggedComponent:Object(o.None)()}),Object(i.k)(u.l,(function(t,e){var n=e.workspaces;return Object(a.b)(n,t,"workspaces")})),Object(i.k)(u.i,(function(t){var e=Object(c.e)();return h(t,[e],e.id)})),Object(i.k)(u.b,(function(t,e){var n=e.workspace;return h(t,[].concat(b(t.workspaces),[n]),n.id)})),Object(i.k)(u.c,(function(t,e){var n=e.config,i=Object(c.c)(n);return h(t,[].concat(b(t.workspaces),[i]),i.id)})),Object(i.k)(u.h,(function(t,e){var n=e.id,i=e.name,r=Object(c.n)(n,i)(t.workspaces);return Object(a.b)(r,t,"workspaces")})),Object(i.k)(u.e,(function(t,e){var n=e.id;if(t.workspaces.length<=1)return t;var i=Object(c.l)(n)(t.workspaces),r=i.map(Object(s.F)("id")).includes(t.activeWorkspace)?t.activeWorkspace:i[0].id;return h(t,i,r)})),Object(i.k)(u.j,(function(t,e){var n=e.id;return Object(a.b)(n,t,"activeWorkspace")})),Object(i.k)(u.a,(function(t,e){var n=e.component,i=e.location,r=t.workspaces,o=t.activeWorkspace,s=Object(c.j)(n,i,o)(r);return Object(a.b)(s,t,"workspaces")})),Object(i.k)(u.g,(function(t,e){var n=e.component,i=e.location,r=e.position,o=t.workspaces,u=t.activeWorkspace,l=Object(s.E)(Object(c.k)(n,u),Object(c.j)(n,i,u,r))(o);return Object(a.b)(l,t,"workspaces")})),Object(i.k)(u.d,(function(t,e){var n=e.component,i=t.workspaces,r=t.activeWorkspace,o=Object(c.k)(n,r)(i);return Object(a.b)(o,t,"workspaces")})),Object(i.k)(u.f,(function(t,e){var n=e.component,i=e.location,r=t.workspaces,o=t.activeWorkspace,s=Object(c.m)(n,i,o)(r);return Object(a.b)(s,t,"workspaces")})),Object(i.k)(u.k,(function(t,e){var n=e.tab;return Object(a.b)(n,t,"draggedComponent")})));function _(t,e){return y(t,e)}var O=Object(i.h)("workspace"),k=Object(i.j)(O,(function(t){return t.workspaces})),w=Object(i.j)(O,(function(t){return t.activeWorkspace})),C=Object(i.j)(O,(function(t){return t.draggedComponent})),T=Object(i.j)(O,(function(t){var e=t.workspaces,n=t.activeWorkspace;return Object(s.u)(e,(function(t){return t.id===n}))})),S=Object(i.j)(T,(function(t){return t.map(Object(s.F)("name")).orSome("")})),E=Object(i.j)(C,T,(function(t,e){return Object(s.w)(t,e).map((function(t){var e=m(t,2),n=e[0],i=e[1],o=c.i[n],a=Object.keys(i.panels),s=Object(c.b)(o);return Object(r.f)(a).filter((function(t){return s(i.panels[t].size)}))})).orSome(Object(r.f)())})),x=Object(i.j)(T,(function(t){return t.map((function(t){return Object(r.f)(Object.values(t.panels).filter(s.m).flatMap((function(t){return t.components})))})).orSome(Object(r.f)())}))},UdWo:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("oCyE"),r=n("vI0g"),o=n("nmFE"),a=n("Zg5S"),s=n("o7Rf"),c=n("sPys");e.default=function(){function t(){this.rsDecoder=new i.default(r.default.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(t){for(var e=new o.default(t),n=e.getVersion(),i=e.readCodewords(),r=a.default.getDataBlocks(i,n),c=0,u=0,l=r;u8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=t.width&&t.width>=21?t.width:void 0;return{width:e,scale:e?4:t.scale||4,margin:null==t.margin||t.margin<0?4:t.margin,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){var i=e.getScale(t,n);return Math.floor((t+2*n.margin)*i)},e.qrToImageData=function(t,n,i){for(var r=n.modules.size,o=n.modules.data,a=e.getScale(r,i),s=Math.floor((r+2*i.margin)*a),c=i.margin*a,u=[i.color.light,i.color.dark],l=0;l=c&&d>=c&&l div[_ngcontent-%COMP%]{display:grid;background-color:var(--background-colour);border-radius:4px;box-sizing:border-box;border:1px solid var(--border-colour);padding:var(--spacing);margin-bottom:var(--spacing);height:106px}@media (min-width:1367px) and (max-width:1440px){.layout-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:calc(106px - 20px)}}@media (min-width:1025px) and (max-width:1366px){.layout-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:calc(106px - 20px)}}.layout-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{background-color:var(--form-input-colour);border:1px solid var(--border-colour);border-radius:2px}.layout-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-align:center;padding:var(--spacing) 0}.layout-container.selected[_ngcontent-%COMP%], .layout-container[_ngcontent-%COMP%]:hover{background:var(--brand)}.layout-container.selected[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .layout-container[_ngcontent-%COMP%]:hover p[_ngcontent-%COMP%]{color:var(--white)}.buttons[_ngcontent-%COMP%]{justify-content:flex-end}.buttons[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{margin-left:var(--spacing)}.default[_ngcontent-%COMP%]{grid-gap:var(--spacing);grid-template:"left topCenter topRight" .6fr "left bottomCenter bottomRight" .4fr/.2fr .6fr .2fr}.default[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{grid-area:left}.default[_ngcontent-%COMP%] .topCenter[_ngcontent-%COMP%]{grid-area:topCenter}.default[_ngcontent-%COMP%] .bottomCenter[_ngcontent-%COMP%]{grid-area:bottomCenter}.default[_ngcontent-%COMP%] .topRight[_ngcontent-%COMP%]{grid-area:topRight}.default[_ngcontent-%COMP%] .bottomRight[_ngcontent-%COMP%]{grid-area:bottomRight}.single[_ngcontent-%COMP%]{grid-template-columns:1fr;grid-template-rows:1fr}.double[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr}.double[_ngcontent-%COMP%], .triple[_ngcontent-%COMP%]{grid-gap:var(--spacing)}.triple[_ngcontent-%COMP%]{grid-template:"topLeft right" 1fr "bottomLeft right" 1fr/1fr 1fr}.triple[_ngcontent-%COMP%] .topLeft[_ngcontent-%COMP%]{grid-area:topLeft}.triple[_ngcontent-%COMP%] .bottomLeft[_ngcontent-%COMP%]{grid-area:bottomLeft}.triple[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{grid-area:right}.quad[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.layout1[_ngcontent-%COMP%], .quad[_ngcontent-%COMP%]{grid-gap:var(--spacing)}.layout1[_ngcontent-%COMP%]{grid-template:"left topRight" 1fr "left bottomRight" 1fr/.6fr .4fr}.layout1[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{grid-area:left}.layout1[_ngcontent-%COMP%] .topRight[_ngcontent-%COMP%]{grid-area:topRight}.layout1[_ngcontent-%COMP%] .bottomRight[_ngcontent-%COMP%]{grid-area:bottomRight}.layout2[_ngcontent-%COMP%]{grid-template:"topLeft center right" 1fr "bottomLeft center right" 1fr/1fr .5fr .5fr;grid-gap:var(--spacing)}.layout2[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{grid-area:left}.layout2[_ngcontent-%COMP%] .bottomLeft[_ngcontent-%COMP%]{grid-area:bottomLeft}.layout2[_ngcontent-%COMP%] .center[_ngcontent-%COMP%]{grid-area:center}.layout2[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{grid-area:right}.layout3[_ngcontent-%COMP%]{grid-template:"topLeft topRight" 1fr "bottomLeft bottomRight" 1fr/.6fr .4fr;grid-gap:var(--spacing)}.layout3[_ngcontent-%COMP%] .topLeft[_ngcontent-%COMP%]{grid-area:topLeft}.layout3[_ngcontent-%COMP%] .bottomLeft[_ngcontent-%COMP%]{grid-area:bottomLeft}.layout3[_ngcontent-%COMP%] .topRight[_ngcontent-%COMP%]{grid-area:topRight}.layout3[_ngcontent-%COMP%] .bottomRight[_ngcontent-%COMP%]{grid-area:bottomRight}.layout4[_ngcontent-%COMP%]{grid-template:"left center right" 1fr/.25fr .5fr .25fr;grid-gap:var(--spacing)}.layout4[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{grid-area:left}.layout4[_ngcontent-%COMP%] .center[_ngcontent-%COMP%]{grid-area:center}.layout4[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{grid-area:right}.layout5[_ngcontent-%COMP%]{grid-template:"top" .6fr "bottom" .4fr/1fr;grid-gap:var(--spacing)}.layout5[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{grid-area:top}.layout5[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{grid-area:bottom}.layout6[_ngcontent-%COMP%]{grid-template:"topLeft topRight" .6fr "bottom bottom" .4fr/1fr 1fr;grid-gap:var(--spacing)}.layout6[_ngcontent-%COMP%] .topLeft[_ngcontent-%COMP%]{grid-area:topLeft}.layout6[_ngcontent-%COMP%] .topRight[_ngcontent-%COMP%]{grid-area:topRight}.layout6[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{grid-area:bottom}.layout7[_ngcontent-%COMP%]{grid-template:"top top" .6fr "bottomLeft bottomRight" .4fr/1fr 1fr;grid-gap:var(--spacing)}.layout7[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{grid-area:top}.layout7[_ngcontent-%COMP%] .bottomRight[_ngcontent-%COMP%]{grid-area:bottomRight}.layout7[_ngcontent-%COMP%] .bottomLeft[_ngcontent-%COMP%]{grid-area:bottomLeft}'],changeDetection:0}),t=Object(i.d)([Object(c.a)()],t)}()},VbQ3:function(t,e,n){"use strict";n.d(e,"a",(function(){return U})),n.d(e,"b",(function(){return B})),n.d(e,"c",(function(){return Q})),n.d(e,"d",(function(){return $})),n.d(e,"e",(function(){return H})),n.d(e,"f",(function(){return F})),n.d(e,"g",(function(){return W})),n.d(e,"h",(function(){return z}));var i=n("5XID"),r=n("kZht"),s=n("ZTXN"),u=n("ROBh"),l=n("IdLP"),d=n("KTx3"),f=n("VvXq"),b=n("vT4p"),g=n("bwdy"),v=n("9bRT"),y=n("Ohay"),_=n("prE9"),O=n("xVbo"),k=n("kuMc"),T=n("jIqt"),S=n("0Woy"),E=n("TLy2"),x=n("wqq/"),P=n("O1jd"),A=n("An66"),I=n("vE5V"),M=n("sBeF"),D=["contentWrapper"],R=["*"],j=new r.s("VIRTUAL_SCROLL_STRATEGY"),L=function(){function t(e,n,i){C(this,t),this._scrolledIndexChange=new s.b,this.scrolledIndexChange=this._scrolledIndexChange.pipe(Object(y.a)()),this._viewport=null,this._itemSize=e,this._minBufferPx=n,this._maxBufferPx=i}return w(t,[{key:"attach",value:function(t){this._viewport=t,this._updateTotalContentSize(),this._updateRenderedRange()}},{key:"detach",value:function(){this._scrolledIndexChange.complete(),this._viewport=null}},{key:"updateItemAndBufferSize",value:function(t,e,n){this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=n,this._updateTotalContentSize(),this._updateRenderedRange()}},{key:"onContentScrolled",value:function(){this._updateRenderedRange()}},{key:"onDataLengthChanged",value:function(){this._updateTotalContentSize(),this._updateRenderedRange()}},{key:"onContentRendered",value:function(){}},{key:"onRenderedOffsetChanged",value:function(){}},{key:"scrollToIndex",value:function(t,e){this._viewport&&this._viewport.scrollToOffset(t*this._itemSize,e)}},{key:"_updateTotalContentSize",value:function(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}},{key:"_updateRenderedRange",value:function(){if(this._viewport){var t=this._viewport.getRenderedRange(),e={start:t.start,end:t.end},n=this._viewport.getViewportSize(),i=this._viewport.getDataLength(),r=this._viewport.measureScrollOffset(),o=r/this._itemSize;if(e.end>i){var a=Math.ceil(n/this._itemSize),s=Math.max(0,Math.min(o,i-a));o!=s&&(o=s,r=s*this._itemSize,e.start=Math.floor(o)),e.end=Math.max(0,Math.min(i,e.start+a))}var c=r-e.start*this._itemSize;if(c0&&(e.end=Math.min(i,e.end+d),e.start=Math.max(0,Math.floor(o-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(this._itemSize*e.start),this._scrolledIndexChange.next(Math.floor(o))}}}]),t}();function N(t){return t._scrollStrategy}var U=function(){var t=function(){function t(){C(this,t),this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new L(this.itemSize,this.minBufferPx,this.maxBufferPx)}return w(t,[{key:"ngOnChanges",value:function(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}},{key:"itemSize",get:function(){return this._itemSize},set:function(t){this._itemSize=Object(i.f)(t)}},{key:"minBufferPx",get:function(){return this._minBufferPx},set:function(t){this._minBufferPx=Object(i.f)(t)}},{key:"maxBufferPx",get:function(){return this._maxBufferPx},set:function(t){this._maxBufferPx=Object(i.f)(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Jb({type:t,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[r.Bb([{provide:j,useFactory:N,deps:[Object(r.V)((function(){return t}))]}]),r.Ab]}),t}(),F=function(){var t=function(){function t(e,n,i){C(this,t),this._ngZone=e,this._platform=n,this._scrolled=new s.b,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=i}return w(t,[{key:"register",value:function(t){var e=this;this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe((function(){return e._scrolled.next(t)})))}},{key:"deregister",value:function(t){var e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}},{key:"scrolled",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return this._platform.isBrowser?new l.a((function(n){t._globalSubscription||t._addGlobalListener();var i=e>0?t._scrolled.pipe(Object(_.a)(e)).subscribe(n):t._scrolled.subscribe(n);return t._scrolledCount++,function(){i.unsubscribe(),t._scrolledCount--,t._scrolledCount||t._removeGlobalListener()}})):Object(u.a)()}},{key:"ngOnDestroy",value:function(){var t=this;this._removeGlobalListener(),this.scrollContainers.forEach((function(e,n){return t.deregister(n)})),this._scrolled.complete()}},{key:"ancestorScrolled",value:function(t,e){var n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(Object(O.a)((function(t){return!t||n.indexOf(t)>-1})))}},{key:"getAncestorScrollContainers",value:function(t){var e=this,n=[];return this.scrollContainers.forEach((function(i,r){e._scrollableContainsElement(r,t)&&n.push(r)})),n}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_scrollableContainsElement",value:function(t,e){var n=e.nativeElement,i=t.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1}},{key:"_addGlobalListener",value:function(){var t=this;this._globalSubscription=this._ngZone.runOutsideAngular((function(){var e=t._getWindow();return Object(d.a)(e.document,"scroll").subscribe((function(){return t._scrolled.next()}))}))}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(r.B),r.Yb(P.a),r.Yb(A.d,8))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(r.B),Object(r.Yb)(P.a),Object(r.Yb)(A.d,8))},token:t,providedIn:"root"}),t}(),B=function(){var t=function(){function t(e,n,i,r){var o=this;C(this,t),this.elementRef=e,this.scrollDispatcher=n,this.ngZone=i,this.dir=r,this._destroyed=new s.b,this._elementScrolled=new l.a((function(t){return o.ngZone.runOutsideAngular((function(){return Object(d.a)(o.elementRef.nativeElement,"scroll").pipe(Object(k.a)(o._destroyed)).subscribe(t)}))}))}return w(t,[{key:"ngOnInit",value:function(){this.scrollDispatcher.register(this)}},{key:"ngOnDestroy",value:function(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}},{key:"elementScrolled",value:function(){return this._elementScrolled}},{key:"getElementRef",value:function(){return this.elementRef}},{key:"scrollTo",value:function(t){var e=this.elementRef.nativeElement,n=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=n?t.end:t.start),null==t.right&&(t.right=n?t.start:t.end),null!=t.bottom&&(t.top=e.scrollHeight-e.clientHeight-t.bottom),n&&0!=Object(P.d)()?(null!=t.left&&(t.right=e.scrollWidth-e.clientWidth-t.left),2==Object(P.d)()?t.left=t.right:1==Object(P.d)()&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=e.scrollWidth-e.clientWidth-t.right),this._applyScrollToOptions(t)}},{key:"_applyScrollToOptions",value:function(t){var e=this.elementRef.nativeElement;Object(P.g)()?e.scrollTo(t):(null!=t.top&&(e.scrollTop=t.top),null!=t.left&&(e.scrollLeft=t.left))}},{key:"measureScrollOffset",value:function(t){var e=this.elementRef.nativeElement;if("top"==t)return e.scrollTop;if("bottom"==t)return e.scrollHeight-e.clientHeight-e.scrollTop;var n=this.dir&&"rtl"==this.dir.value;return"start"==t?t=n?"right":"left":"end"==t&&(t=n?"left":"right"),n&&2==Object(P.d)()?"left"==t?e.scrollWidth-e.clientWidth-e.scrollLeft:e.scrollLeft:n&&1==Object(P.d)()?"left"==t?e.scrollLeft+e.scrollWidth-e.clientWidth:-e.scrollLeft:"left"==t?e.scrollLeft:e.scrollWidth-e.clientWidth-e.scrollLeft}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(r.l),r.Ob(F),r.Ob(r.B),r.Ob(I.b,8))},t.\u0275dir=r.Jb({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),t}(),z=function(){var t=function(){function t(e,n,i){var r=this;C(this,t),this._platform=e,this._change=new s.b,this._changeListener=function(t){r._change.next(t)},this._document=i,n.runOutsideAngular((function(){if(e.isBrowser){var t=r._getWindow();t.addEventListener("resize",r._changeListener),t.addEventListener("orientationchange",r._changeListener)}r.change().subscribe((function(){return r._updateViewportSize()}))}))}return w(t,[{key:"ngOnDestroy",value:function(){if(this._platform.isBrowser){var t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}},{key:"getViewportSize",value:function(){this._viewportSize||this._updateViewportSize();var t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}},{key:"getViewportRect",value:function(){var t=this.getViewportScrollPosition(),e=this.getViewportSize(),n=e.width,i=e.height;return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+n,height:i,width:n}}},{key:"getViewportScrollPosition",value:function(){if(!this._platform.isBrowser)return{top:0,left:0};var t=this._getDocument(),e=this._getWindow(),n=t.documentElement,i=n.getBoundingClientRect();return{top:-i.top||t.body.scrollTop||e.scrollY||n.scrollTop||0,left:-i.left||t.body.scrollLeft||e.scrollX||n.scrollLeft||0}}},{key:"change",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return t>0?this._change.pipe(Object(_.a)(t)):this._change}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_updateViewportSize",value:function(){var t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(P.a),r.Yb(r.B),r.Yb(A.d,8))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(P.a),Object(r.Yb)(r.B),Object(r.Yb)(A.d,8))},token:t,providedIn:"root"}),t}(),V="undefined"!=typeof requestAnimationFrame?f.a:b.a,H=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a,c,u){var d;return C(this,n),(d=e.call(this,t,c,r,a)).elementRef=t,d._changeDetectorRef=i,d._scrollStrategy=o,d._detachedSubject=new s.b,d._renderedRangeSubject=new s.b,d._orientation="vertical",d.scrolledIndexChange=new l.a((function(t){return d._scrollStrategy.scrolledIndexChange.subscribe((function(e){return Promise.resolve().then((function(){return d.ngZone.run((function(){return t.next(e)}))}))}))})),d.renderedRangeStream=d._renderedRangeSubject,d._totalContentSize=0,d._totalContentWidth="",d._totalContentHeight="",d._renderedRange={start:0,end:0},d._dataLength=0,d._viewportSize=0,d._renderedContentOffset=0,d._renderedContentOffsetNeedsRewrite=!1,d._isChangeDetectionPending=!1,d._runAfterChangeDetection=[],d._viewportChanges=g.a.EMPTY,u&&(d._viewportChanges=u.change().subscribe((function(){d.checkViewportSize()}))),d}return w(n,[{key:"ngOnInit",value:function(){var t=this;o(h(n.prototype),"ngOnInit",this).call(this),this.ngZone.runOutsideAngular((function(){return Promise.resolve().then((function(){t._measureViewportSize(),t._scrollStrategy.attach(t),t.elementScrolled().pipe(Object(T.a)(null),Object(_.a)(0,V)).subscribe((function(){return t._scrollStrategy.onContentScrolled()})),t._markChangeDetectionNeeded()}))}))}},{key:"ngOnDestroy",value:function(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),o(h(n.prototype),"ngOnDestroy",this).call(this)}},{key:"attach",value:function(t){var e=this;this.ngZone.runOutsideAngular((function(){e._forOf=t,e._forOf.dataStream.pipe(Object(k.a)(e._detachedSubject)).subscribe((function(t){var n=t.length;n!==e._dataLength&&(e._dataLength=n,e._scrollStrategy.onDataLengthChanged()),e._doChangeDetection()}))}))}},{key:"detach",value:function(){this._forOf=null,this._detachedSubject.next()}},{key:"getDataLength",value:function(){return this._dataLength}},{key:"getViewportSize",value:function(){return this._viewportSize}},{key:"getRenderedRange",value:function(){return this._renderedRange}},{key:"setTotalContentSize",value:function(t){this._totalContentSize!==t&&(this._totalContentSize=t,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}},{key:"setRenderedRange",value:function(t){var e,n,i=this;((e=this._renderedRange).start!=(n=t).start||e.end!=n.end)&&(this._renderedRangeSubject.next(this._renderedRange=t),this._markChangeDetectionNeeded((function(){return i._scrollStrategy.onContentRendered()})))}},{key:"getOffsetToRenderedContentStart",value:function(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}},{key:"setRenderedContentOffset",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"to-start",i="horizontal"==this.orientation,r=i?"X":"Y",o="translate".concat(r,"(").concat(Number((i&&this.dir&&"rtl"==this.dir.value?-1:1)*t),"px)");this._renderedContentOffset=t,"to-end"===n&&(o+=" translate".concat(r,"(-100%)"),this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=o&&(this._renderedContentTransform=o,this._markChangeDetectionNeeded((function(){e._renderedContentOffsetNeedsRewrite?(e._renderedContentOffset-=e.measureRenderedContentSize(),e._renderedContentOffsetNeedsRewrite=!1,e.setRenderedContentOffset(e._renderedContentOffset)):e._scrollStrategy.onRenderedOffsetChanged()})))}},{key:"scrollToOffset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",n={behavior:e};"horizontal"===this.orientation?n.start=t:n.top=t,this.scrollTo(n)}},{key:"scrollToIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";this._scrollStrategy.scrollToIndex(t,e)}},{key:"measureScrollOffset",value:function(t){return o(h(n.prototype),"measureScrollOffset",this).call(this,t||("horizontal"===this.orientation?"start":"top"))}},{key:"measureRenderedContentSize",value:function(){var t=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?t.offsetWidth:t.offsetHeight}},{key:"measureRangeSize",value:function(t){return this._forOf?this._forOf.measureRangeSize(t,this.orientation):0}},{key:"checkViewportSize",value:function(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}},{key:"_measureViewportSize",value:function(){var t=this.elementRef.nativeElement;this._viewportSize="horizontal"===this.orientation?t.clientWidth:t.clientHeight}},{key:"_markChangeDetectionNeeded",value:function(t){var e=this;t&&this._runAfterChangeDetection.push(t),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular((function(){return Promise.resolve().then((function(){e._doChangeDetection()}))})))}},{key:"_doChangeDetection",value:function(){var t=this;this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run((function(){return t._changeDetectorRef.markForCheck()}));var e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];var n,i=p(e);try{for(i.s();!(n=i.n()).done;){(0,n.value)()}}catch(r){i.e(r)}finally{i.f()}}},{key:"_calculateSpacerSize",value:function(){this._totalContentHeight="horizontal"===this.orientation?"":this._totalContentSize+"px",this._totalContentWidth="horizontal"===this.orientation?this._totalContentSize+"px":""}},{key:"orientation",get:function(){return this._orientation},set:function(t){this._orientation!==t&&(this._orientation=t,this._calculateSpacerSize())}}]),n}(B);return t.\u0275fac=function(e){return new(e||t)(r.Ob(r.l),r.Ob(r.h),r.Ob(r.B),r.Ob(j,8),r.Ob(I.b,8),r.Ob(F),r.Ob(z))},t.\u0275cmp=r.Ib({type:t,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(t,e){var n;1&t&&r.Jc(D,!0),2&t&&r.zc(n=r.cc())&&(e._contentWrapper=n.first)},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(t,e){2&t&&r.Gb("cdk-virtual-scroll-orientation-horizontal","horizontal"===e.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==e.orientation)},inputs:{orientation:"orientation"},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[r.Bb([{provide:B,useExisting:t}]),r.zb],ngContentSelectors:R,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(t,e){1&t&&(r.lc(),r.Ub(0,"div",0,1),r.kc(2),r.Tb(),r.Pb(3,"div",2)),2&t&&(r.Cb(3),r.Lc("width",e._totalContentWidth)("height",e._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .cdk-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"],encapsulation:2,changeDetection:0}),t}();function q(t,e,n){if(!n.getBoundingClientRect)return 0;var i=n.getBoundingClientRect();return"horizontal"===t?"start"===e?i.left:i.right:"start"===e?i.top:i.bottom}var $=function(){var t=function(){function t(e,n,i,r,o,a){var c=this;C(this,t),this._viewContainerRef=e,this._template=n,this._differs=i,this._viewRepeater=r,this._viewport=o,this.viewChange=new s.b,this._dataSourceChanges=new s.b,this.dataStream=this._dataSourceChanges.pipe(Object(T.a)(null),Object(S.a)(),Object(E.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return c._changeDataSource(n,i)})),Object(x.a)(1)),this._differ=null,this._needsUpdate=!1,this._destroyed=new s.b,this.dataStream.subscribe((function(t){c._data=t,c._onRenderedDataChange()})),this._viewport.renderedRangeStream.pipe(Object(k.a)(this._destroyed)).subscribe((function(t){c._renderedRange=t,a.run((function(){return c.viewChange.next(c._renderedRange)})),c._onRenderedDataChange()})),this._viewport.attach(this)}return w(t,[{key:"measureRangeSize",value:function(t,e){if(t.start>=t.end)return 0;for(var n,i,r=t.start-this._renderedRange.start,o=t.end-t.start,a=0;a-1;c--){var u=this._viewContainerRef.get(c+r);if(u&&u.rootNodes.length){i=u.rootNodes[u.rootNodes.length-1];break}}return n&&i?q(e,"end",i)-q(e,"start",n):0}},{key:"ngDoCheck",value:function(){if(this._differ&&this._needsUpdate){var t=this._differ.diff(this._renderedItems);t?this._applyChanges(t):this._updateContext(),this._needsUpdate=!1}}},{key:"ngOnDestroy",value:function(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}},{key:"_onRenderedDataChange",value:function(){this._renderedRange&&(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create(this.cdkVirtualForTrackBy)),this._needsUpdate=!0)}},{key:"_changeDataSource",value:function(t,e){return t&&t.disconnect(this),this._needsUpdate=!0,e?e.connect(this):Object(u.a)()}},{key:"_updateContext",value:function(){for(var t=this._data.length,e=this._viewContainerRef.length;e--;){var n=this._viewContainerRef.get(e);n.context.index=this._renderedRange.start+e,n.context.count=t,this._updateComputedContextProperties(n.context),n.detectChanges()}}},{key:"_applyChanges",value:function(t){var e=this;this._viewRepeater.applyChanges(t,this._viewContainerRef,(function(t,n,i){return e._getEmbeddedViewArgs(t,i)}),(function(t){return t.item})),t.forEachIdentityChange((function(t){e._viewContainerRef.get(t.currentIndex).context.$implicit=t.item}));for(var n=this._data.length,i=this._viewContainerRef.length;i--;){var r=this._viewContainerRef.get(i);r.context.index=this._renderedRange.start+i,r.context.count=n,this._updateComputedContextProperties(r.context)}}},{key:"_updateComputedContextProperties",value:function(t){t.first=0===t.index,t.last=t.index===t.count-1,t.even=t.index%2==0,t.odd=!t.even}},{key:"_getEmbeddedViewArgs",value:function(t,e){return{templateRef:this._template,context:{$implicit:t.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:e}}},{key:"cdkVirtualForOf",get:function(){return this._cdkVirtualForOf},set:function(t){this._cdkVirtualForOf=t,Object(M.h)(t)?this._dataSourceChanges.next(t):this._dataSourceChanges.next(new M.a(Object(v.a)(t)?t:Array.prototype.slice.call(t||[])))}},{key:"cdkVirtualForTrackBy",get:function(){return this._cdkVirtualForTrackBy},set:function(t){var e=this;this._needsUpdate=!0,this._cdkVirtualForTrackBy=t?function(n,i){return t(n+(e._renderedRange?e._renderedRange.start:0),i)}:void 0}},{key:"cdkVirtualForTemplate",set:function(t){t&&(this._needsUpdate=!0,this._template=t)}},{key:"cdkVirtualForTemplateCacheSize",get:function(){return this._viewRepeater.viewCacheSize},set:function(t){this._viewRepeater.viewCacheSize=Object(i.f)(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(r.R),r.Ob(r.N),r.Ob(r.u),r.Ob(M.g),r.Ob(H,4),r.Ob(r.B))},t.\u0275dir=r.Jb({type:t,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[r.Bb([{provide:M.g,useClass:M.f}])]}),t}(),Q=function(){var t=function t(){C(this,t)};return t.\u0275mod=r.Mb({type:t}),t.\u0275inj=r.Lb({factory:function(e){return new(e||t)}}),t}(),W=function(){var t=function t(){C(this,t)};return t.\u0275mod=r.Mb({type:t}),t.\u0275inj=r.Lb({factory:function(e){return new(e||t)},imports:[[I.a,P.b,Q],I.a,Q]}),t}()},VmIW:function(t,e,n){var i,r;"undefined"!=typeof self&&self,void 0===(r="function"==typeof(i=function(){"use strict";var t={apply2:b,assign:u(Object.assign)?Object.assign:function(t,e){for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&(t[n]=e[n]);return t},compose:c,curry:s(p(s),[])([]),idFunction:l,isFunction:u,noop:o,swap:p};function e(t,e){t["@@type"]="monet.js/"+e}function n(t){return function(e){return(e["@@type"]||e.constructor["@@type"])==="monet.js/"+t}}function i(t){return function(e){var n=e["@@type"]||e.constructor&&e.constructor["@@type"];return Boolean(n)&&n.length>=t.length&&n.indexOf(t)===n.length-t.length}}function r(t){return null==t}function o(){}function a(t){return Array.prototype.slice.call(t)}function s(t,e){return function(){var n=e.concat(a(arguments));return n.length>=t.length?t.apply(null,n.slice(0,n.length)):s(t,n)}}function c(t,e){return function(n){return t(e(n))}}function u(t){return Boolean(t&&t.constructor&&t.call&&t.apply)}function l(t){return t}function d(t,e){return t===e||t!=t&&e!=e||!(!t||!e)&&!(!u(t.equals)||!u(e.equals))&&t.equals(e)}function h(t){return function(e){return d(t,e)}}function f(){return!1}function p(t){return function(e,n){return t(n,e)}}function b(t,e,n){return e.ap(t.map(s(n,[])))}function g(t,e){for(var n=t,i=e;!n.isNil&&!i.isNil;){if(!h(n.head())(i.head()))return!1;n=n.tail(),i=i.tail()}return n.isNil&&i.isNil}function m(t,e){return function t(e,n){return n.isNil?Q(n):$((function(){return t(e,n.tail())})).map(s(O,[])(e(n.head())))}(t,e).run()}function v(t,e){return t.foldRight(w)((function(t,n){return e(t)?O(t,n):n}))}function y(t,e){return function t(e,n){if(e.isNil)return Q(D());var i=e.head();return n(i)?Q(M(i)):$((function(){return t(e.tail(),n)}))}(t,e).run()}function _(t,e){return function t(e,n){return e.isNil?Q(!1):d(e.head(),n)?Q(!0):$((function(){return t(e.tail(),n)}))}(t,e).run()}function O(t,e){return e.cons(t)}function k(){switch(arguments.length){case 0:return new k.fn.init;case 1:return new k.fn.init(arguments[0]);default:return new k.fn.init(arguments[0],arguments[1])}}t.List=k;var w,C=function(t,e,n){return function e(n,i){return i.isNil?Q(n):$((function(){return e(t(n,i.head()),i.tail())}))}(e,n).run()},T=function(t,e,n){return function e(n,i){return n.isNil?Q(i):$((function(){return e(n.tail(),i)})).map((function(e){return t(n.head(),e)}))}(e,n).run()},S=function(t,e){return function t(e,n){return e.isNil?Q(n):$((function(){return t(e.tail(),n).map((function(t){return t.cons(e.head())}))}))}(t,e).run()},E=function(t,e){return t.foldRight(e.of(w))(e.map2(O))},x=function(t){return t.foldLeft(w)(p(O))};function P(t){return new Error("Cannot create an empty Non-Empty List. Passed head is "+t+".")}function A(t,e){if(r(t))throw P(t);return new A.fn.init(t,e)}(k.fn=k.prototype={init:function(){var t=arguments[0],n=arguments[1];0===arguments.length?(this.isNil=!0,this.size_=0):(this.isNil=!1,this.head_=t,this.tail_=n||w,this.size_=this.tail_.size()+1),e(this,"List")},of:function(t){return new k(t)},size:function(){return this.size_},equals:function(t){return(k.isOfType(t)||A.isOfType(t))&&g(this,t)},cons:function(t){return k(t,this)},snoc:function(t){return this.concat(k(t))},map:function(t){return m(t,this)},toArray:function(){return C((function(t,e){return t.push(e),t}),[],this)},toSet:function(){return new Set(this)},foldLeft:function(t){var e=this;return function(n){return C(n,t,e)}},foldRight:function(t){var e=this;return function(n){return T(n,e,t)}},append:function(t){return S(this,t)},filter:function(t){return v(this,t)},find:function(t){return y(this,t)},flatten:function(){return T(S,this,w)},flattenMaybe:function(){return this.flatMap(I.toList)},reverse:function(){return x(this)},bind:function(t){return this.map(t).flatten()},forEach:function(t){!function t(e,n){n.isNil||(e(n.head()),t(e,n.tail()))}(t,this)},contains:function(t){return _(this,t)},sequenceMaybe:function(){return E(this,I)},sequenceValidation:function(){return this.foldLeft(j(w))((function(t,e){return t.ap(e.map((function(t){return function(e){return O(t,e)}})))})).map(x)},sequenceEither:function(){return E(this,B)},sequenceIO:function(){return E(this,F)},sequenceReader:function(){return E(this,H)},sequence:function(t){return E(this,t)},head:function(){return this.head_},headMaybe:function(){return this.isNil?D():M(this.head_)},tail:function(){return this.isNil?w:this.tail_},tails:function(){return this.isNil?k(w,w):this.tail().tails().cons(this)},ap:function(t){return e=t,this.bind((function(t){return e.map((function(e){return e(t)}))}));var e},isNEL:f,toString:function(){return this.isNil?"Nil":"List("+this.toArray().join(", ")+")"},inspect:function(){return this.toString()}}).init.prototype=k.fn,e(k,"List"),e(k.fn.init,"List"),k.isInstance=n("List"),k.isOfType=i("List"),k.prototype.empty=function(){return w},k.fromArray=function(t){return t.reduceRight((function(t,e){return t.cons(e)}),w)},k.from=function(t){return k.fromArray(Array.from(t))},k.of=function(t){return new k(t,w)},k.prototype.each=k.prototype.forEach,w=t.Nil=new k.fn.init,t.NEL=t.NonEmptyList=A,A.of=function(t){return A(t,w)},A.fn=A.prototype={init:function(t,n){if(r(t))throw P(t);this.isNil=!1,this.head_=t,this.tail_=r(n)?w:n,this.size_=this.tail_.size()+1,e(this,"NEL")},equals:function(t){return k.isOfType(t)||A.isOfType(t)&&g(this,t)},cons:function(t){return A(t,this.toList())},snoc:function(t){return this.concat(A(t))},map:function(t){return A(t(this.head_),m(t,this.tail_))},bind:function(t){var e=t(this.head_);if(!e.isNEL())throw new Error("NEL.fn.bind: Passed function must return a NonEmptyList.");var n=this.tail().foldLeft(w.snoc(e.head()).append(e.tail()))((function(e,n){var i=t(n).toList();return e.snoc(i.head()).append(i.tail())}));return new A(n.head(),n.tail())},head:function(){return this.head_},tail:function(){return this.tail_},tails:function(){var t=this.toList().tails().map(A.fromList).flattenMaybe();return A(t.head(),t.tail())},toList:function(){return k(this.head_,this.tail_)},reverse:function(){if(this.tail().isNil)return this;var t=this.tail().reverse();return A(t.head(),t.tail().append(k(this.head())))},foldLeft:function(t){return this.toList().foldLeft(t)},foldRight:function(t){return this.toList().foldRight(t)},reduceLeft:function(t){return this.tail().foldLeft(this.head())(t)},filter:function(t){return v(this.toList(),t)},find:function(t){return y(this.toList(),t)},flatten:function(){return T(S,this.toList().map((function(t){return t.isNEL()?t.toList():t})),w)},flattenMaybe:function(){return this.toList().flatMap(I.toList)},contains:function(t){return _(this.toList(),t)},append:function(t){return A.fromList(this.toList().append(t.toList())).some()},cobind:function(t){return this.cojoin().map(t)},size:function(){return this.size_},forEach:function(t){return this.toList().forEach(t)},isNEL:function(){return!0},toString:function(){return"NEL("+this.toArray().join(", ")+")"},inspect:function(){return this.toString()}},A.fromList=function(t){return t.isNil?D():M(A(t.head(),t.tail()))},A.fromArray=function(t){return A.fromList(k.fromArray(t))},A.from=function(t){return A.fromList(k.from(t))},A.fn.init.prototype=A.fn,e(A,"NEL"),e(A.fn.init,"NEL"),A.isInstance=n("NEL"),A.isOfType=i("NEL"),A.prototype.toArray=k.prototype.toArray,A.prototype.toSet=k.prototype.toSet,A.prototype.extract=A.prototype.copure=A.prototype.head,A.prototype.cojoin=A.prototype.tails,A.prototype.coflatMap=A.prototype.mapTails=A.prototype.cobind,A.prototype.ap=k.prototype.ap;var I=t.Maybe={};I.fromFalsy=function(t){return t?I.Some(t):I.None()},I.fromNull=function(t){return r(t)?I.None():I.Some(t)},I.fromUndefined=function(t){return void 0===t?I.None():I.Some(t)},I.fromEmpty=function(t){return r(e=t)||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length?I.None():I.Some(t);var e},I.of=function(t){return M(t)};var M=I.Just=I.Some=I.some=t.Some=t.Just=function(t){return new I.fn.init(!0,t)},D=I.Nothing=I.None=I.none=t.None=t.Nothing=function(){return new I.fn.init(!1,null)};I.toList=function(t){return t.toList()},I.fn=I.prototype={init:function(t,n){if(this.isValue=t,t&&r(n))throw new Error("Can not create Some with illegal value: "+n+".");this.val=n,e(this,"Maybe")},isSome:function(){return this.isValue},isNone:function(){return!this.isSome()},bind:function(t){return this.isValue?t(this.val):this},some:function(){if(this.isValue)return this.val;throw new Error("Cannot call .some() on a None.")},orSome:function(t){return this.isValue?this.val:t},orLazy:function(t){return this.cata(t,l)},orNull:function(){return this.orSome(null)},orUndefined:function(){return this.orSome(void 0)},orElse:function(t){return this.catchMap((function(){return t}))},ap:function(t){var e=this.val;return this.isValue?t.map((function(t){return t(e)})):this},equals:function(t){return I.isOfType(t)&&this.cata((function(){return t.isNone()}),(function(e){return t.fold(!1)(h(e))}))},toArray:function(){return this.map((function(t){return[t]})).orLazy((function(){return[]}))},toSet:function(){return new Set(this)},toList:function(){return this.map(k).orLazy((function(){return w}))},toEither:function(t){return this.isSome()?z(this.val):V(t)},toValidation:function(t){return this.isSome()?j(this.val):L(t)},fold:function(t){var e=this;return function(n){return e.isSome()?n(e.val):t}},foldLeft:function(t){return this.toList().foldLeft(t)},foldRight:function(t){return this.toList().foldRight(t)},cata:function(t,e){return this.isSome()?e(this.val):t()},catchMap:function(t){return this.isSome()?this:t()},filter:function(t){var e=this;return e.flatMap((function(n){return t(n)?e:D()}))},orNoneIf:function(t){return t?D():this},contains:function(t){return!!this.isSome()&&d(this.val,t)},forEach:function(t){this.cata(o,t)},orElseRun:function(t){this.cata(t,o)},toString:function(){return this.isSome()?"Just("+this.val+")":"Nothing"},inspect:function(){return this.toString()}},I.prototype.orJust=I.prototype.getOrElse=I.prototype.orSome,I.prototype.just=I.prototype.some,I.prototype.isJust=I.prototype.isSome,I.prototype.isNothing=I.prototype.isNone,I.prototype.orNothingIf=I.prototype.orNoneIf,I.fn.init.prototype=I.fn,e(I,"Maybe"),e(I.fn.init,"Maybe"),I.isInstance=n("Maybe"),I.isOfType=i("Maybe");var R=t.Validation={},j=R.Success=R.success=t.Success=function(t){return new R.fn.init(t,!0)},L=R.Fail=R.fail=t.Fail=function(t){return new R.fn.init(t,!1)};R.of=function(t){return j(t)},R.fn=R.prototype={init:function(t,n){this.val=t,this.isSuccessValue=n,e(this,"Validation")},success:function(){if(this.isSuccess())return this.val;throw new Error("Cannot call success() on a Fail.")},isSuccess:function(){return this.isSuccessValue},isFail:function(){return!this.isSuccessValue},fail:function(){if(this.isSuccess())throw new Error("Cannot call fail() on a Success.");return this.val},bind:function(t){return this.isSuccess()?t(this.val):this},ap:function(t){var e=this.val;return this.isSuccess()?t.map((function(t){return t(e)})):t.isFail()?R.Fail(N.append(e,t.fail())):this},acc:function(){return this.isSuccessValue?R.success((function t(){return t})):this},foldLeft:function(t){return this.toMaybe().toList().foldLeft(t)},foldRight:function(t){return this.toMaybe().toList().foldRight(t)},cata:function(t,e){return this.isSuccessValue?e(this.val):t(this.val)},catchMap:function(t){return this.isSuccess()?this:t(this.val)},swap:function(){return this.isSuccess()?L(this.val):j(this.val)},failMap:function(t){return this.isFail()?L(t(this.val)):this},bimap:function(t,e){return this.isSuccessValue?this.map(e):this.failMap(t)},forEach:function(t){this.cata(o,t)},forEachFail:function(t){this.cata(t,o)},equals:function(t){return R.isOfType(t)&&this.cata((function(e){return t.cata(h(e),f)}),(function(e){return t.cata(f,h(e))}))},toMaybe:function(){return this.isSuccess()?M(this.val):D()},toEither:function(){return(this.isSuccess()?z:V)(this.val)},toString:function(){return(this.isSuccess()?"Success(":"Fail(")+this.val+")"},inspect:function(){return this.toString()}},R.prototype.fold=R.prototype.cata,R.fn.init.prototype=R.fn,e(R,"Validation"),e(R.fn.init,"Validation"),R.isInstance=n("Validation"),R.isOfType=i("Validation");var N=t.Semigroup={append:function(t,e){if(u(t.concat))return t.concat(e);throw new Error("Couldn't find a semigroup appender in the environment, please specify your own append function")}},U=t.monadTransformer=t.MonadT=t.monadT=function(t){return new U.fn.init(t)};U.of=function(t){return U(t)},U.fn=U.prototype={init:function(t){this.monad=t,e(R,"MonadT")},map:function(t){return U(this.monad.map((function(e){return e.map(t)})))},bind:function(t){return U(this.monad.map((function(e){return e.flatMap(t)})))},ap:function(t){return U(this.monad.flatMap((function(e){return t.perform().map((function(t){return e.ap(t)}))})))},perform:function(){return this.monad}},U.fn.init.prototype=U.fn;var F=t.IO=t.io=function(t){return new F.fn.init(t)};F.of=function(t){return F((function(){return t}))},F.fn=F.prototype={init:function(t){if(!u(t))throw new Error("IO requires a function.");this.effectFn=t,e(this,"IO")},map:function(t){var e=this;return F((function(){return t(e.effectFn())}))},bind:function(t){var e=this;return F((function(){return t(e.effectFn()).run()}))},ap:function(t){var e=this;return t.map((function(t){return t(e.effectFn())}))},run:function(){return this.effectFn()}},F.fn.init.prototype=F.fn,e(F,"IO"),e(F.fn.init,"IO"),F.isInstance=n("IO"),F.isOfType=i("IO"),F.prototype.perform=F.prototype.performUnsafeIO=F.prototype.run;var B=t.Either={};B.of=function(t){return z(t)},B.fromTry=function(t){try{return B.right(t())}catch(e){return B.left(e)}},B.fromPromise=function(t){return t.then(B.Right,B.Left)};var z=B.Right=B.right=t.Right=function(t){return new B.fn.init(t,!0)},V=B.Left=B.left=t.Left=function(t){return new B.fn.init(t,!1)};B.fn=B.prototype={init:function(t,n){this.isRightValue=n,this.value=t,e(this,"Either")},bind:function(t){return this.isRightValue?t(this.value):this},ap:function(t){var e=this;return this.isRightValue?t.map((function(t){return t(e.value)})):this},leftMap:function(t){return this.isLeft()?V(t(this.value)):this},isRight:function(){return this.isRightValue},isLeft:function(){return!this.isRight()},right:function(){if(this.isRightValue)return this.value;throw new Error("Cannot call right() on a Left.")},left:function(){if(this.isRightValue)throw new Error("Cannot call left() on a Right.");return this.value},foldLeft:function(t){return this.toMaybe().toList().foldLeft(t)},foldRight:function(t){return this.toMaybe().toList().foldRight(t)},cata:function(t,e){return this.isRightValue?e(this.value):t(this.value)},catchMap:function(t){return this.isRight()?this:t(this.value)},swap:function(){return this.isRight()?V(this.value):z(this.value)},forEach:function(t){this.cata(o,t)},forEachLeft:function(t){this.cata(t,o)},equals:function(t){return B.isOfType(t)&&this.cata((function(e){return t.cata(h(e),f)}),(function(e){return t.cata(f,h(e))}))},bimap:function(t,e){return this.isRightValue?this.map(e):this.leftMap(t)},toMaybe:function(){return this.isRight()?M(this.value):D()},toValidation:function(){return this.isRight()?j(this.value):L(this.value)},toString:function(){return this.cata((function(t){return"Left("+t+")"}),(function(t){return"Right("+t+")"}))},toPromise:function(){return this.cata((function(t){return Promise.reject(t)}),(function(t){return Promise.resolve(t)}))},inspect:function(){return this.toString()}},B.prototype.fold=B.prototype.cata,B.fn.init.prototype=B.fn,e(B,"Either"),e(B.fn.init,"Either"),B.isInstance=n("Either"),B.isOfType=i("Either");var H=t.Reader=function(t){return new H.fn.init(t)};H.of=function(t){return H((function(e){return t}))},H.ask=function(){return H(l)},H.fn=H.prototype={init:function(t){this.f=t,e(this,"Reader")},run:function(t){return this.f(t)},bind:function(t){var e=this;return H((function(n){return t(e.run(n)).run(n)}))},ap:function(t){var e=this;return t.bind((function(t){return H((function(n){return t(e.run(n))}))}))},map:function(t){var e=this;return H((function(n){return t(e.run(n))}))},local:function(t){var e=this;return H((function(n){return e.run(t(n))}))}},H.fn.init.prototype=H.fn,e(H,"Reader"),e(H.fn.init,"Reader"),H.isInstance=n("Reader"),H.isOfType=i("Reader");var q=t.Free={},$=q.Suspend=t.Suspend=function(t){return new q.fn.init(t,!0)},Q=q.Return=t.Return=function(t){return new q.fn.init(t,!1)};function W(t){return new W.fn.init(t)}function G(t){(function(t){t.prototype.flatMap=t.prototype.chain=t.prototype.bind,t.pure=t.unit=t.of,t.prototype.of=t.of,u(t.prototype.append)&&(t.prototype.concat=t.prototype.append),t.prototype.point=t.prototype.pure=t.prototype.unit=t.prototype.of})(t),function(t){u(t.prototype.filter)&&(t.prototype.filterNot=function(t){return this.filter((function(e){return!t(e)}))})}(t),function(t){t.prototype.join=function(){return this.flatMap(l)},t.map2=function(t){return function(e,n){return e.flatMap((function(e){return n.map((function(n){return t(e,n)}))}))}}}(t),function(t){u(t.prototype.map)||(t.prototype.map=function(t){return this.bind(c(this.of,t))})}(t),function(t){t.prototype.takeLeft=function(t){return b(this,t,(function(t,e){return t}))},t.prototype.takeRight=function(t){return b(this,t,(function(t,e){return e}))}}(t),function(t){u(t.prototype.toArray)&&(t.prototype.every=t.prototype.forall=function(t){return this.toArray().every(t)},t.prototype.exists=function(t){return this.toArray().some(t)})}(t),function(t){["equals","map","ap","chain"].filter((function(e){return u(t.prototype[e])})).forEach((function(e){t.prototype["fantasy-land/"+e]=t.prototype[e]}))}(t),function(t){u(t.prototype.toArray)&&(t.prototype[Symbol.iterator]=function(){return this.toArray()[Symbol.iterator]()})}(t),function(t){u(t.prototype.toArray)&&(t.prototype.to=function(t){return t(this)})}(t)}return q.of=function(t){return Q(t)},q.liftF=function(t){return u(t)?$(c(Q,t)):$(t.map(Q))},q.fn=q.prototype={init:function(t,n){this.isSuspend=n,n?this.functor=t:this.val=t,e(this,"Free")},run:function(){return this.go((function(t){return t()}))},bind:function(t){return this.isSuspend?u(this.functor)?$(c((function(e){return e.bind(t)}),this.functor)):$(this.functor.map((function(e){return e.bind(t)}))):t(this.val)},ap:function(t){return this.bind((function(e){return t.map((function(t){return t(e)}))}))},resume:function(){return this.isSuspend?V(this.functor):z(this.val)},go1:function(t){return function e(n){return n.resume().cata((function(n){return e(t(n))}),l)}(this)},go:function(t){for(var e=this.resume();e.isLeft();){var n=t(e.left());e=n.resume()}return e.right()}},q.fn.init.prototype=q.fn,e(q,"Free"),e(q.fn.init,"Free"),q.isInstance=n("Free"),q.isOfType=i("Free"),t.Identity=W,W.of=function(t){return new W(t)},(W.fn=W.prototype={init:function(t){this.val=t,e(this,"Identity")},bind:function(t){return t(this.val)},get:function(){return this.val},forEach:function(t){t(this.val)},equals:function(t){return W.isOfType(t)&&h(this.get())(t.get())},contains:function(t){return d(this.val,t)},toString:function(){return"Identity("+this.val+")"},inspect:function(){return this.toString()},ap:function(t){var e=this.val;return t.map((function(t){return t(e)}))},toArray:function(){return[this.get()]},toList:function(){return k(this.get(),w)},toSet:function(){return new Set(this)}}).init.prototype=W.fn,e(W,"Identity"),e(W.fn.init,"Identity"),W.isInstance=n("Identity"),W.isOfType=i("Identity"),G(U),G(B),G(I),G(F),G(A),G(k),G(R),G(H),G(q),G(W),t})?i.call(e,n,e,t):i)||(t.exports=r)},VvXq:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t,i)).scheduler=t,r.work=i,r}return w(n,[{key:"requestAsyncId",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==i&&i>0?o(h(n.prototype),"requestAsyncId",this).call(this,t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame((function(){return t.flush(null)}))))}},{key:"recycleAsyncId",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==i&&i>0||null===i&&this.delay>0)return o(h(n.prototype),"recycleAsyncId",this).call(this,t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}}]),n}(n("EWqr").a),r=new(function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,[{key:"flush",value:function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i visible",Object(y.e)("200ms cubic-bezier(0, 0, 0.2, 1)",Object(y.h)([Object(y.l)({opacity:0,transform:"scale(0)",offset:0}),Object(y.l)({opacity:.5,transform:"scale(0.99)",offset:.5}),Object(y.l)({opacity:1,transform:"scale(1)",offset:1})]))),Object(y.m)("* => hidden",Object(y.e)("100ms cubic-bezier(0, 0, 0.2, 1)",Object(y.l)({opacity:0})))])},O=Object(f.f)({passive:!0}),k=new a.s("mat-tooltip-scroll-strategy"),T={provide:k,deps:[i.c],useFactory:function(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:20})}}},S=new a.s("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),E=function(){var t=function(){function t(e,n,i,r,o,a,s,c,u,l,h){var f=this;C(this,t),this._overlay=e,this._elementRef=n,this._scrollDispatcher=i,this._viewContainerRef=r,this._ngZone=o,this._platform=a,this._ariaDescriber=s,this._focusMonitor=c,this._dir=l,this._defaultOptions=h,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new b.b,this._handleKeydown=function(t){f._isTooltipVisible()&&t.keyCode===d.f&&!Object(d.r)(t)&&(t.preventDefault(),t.stopPropagation(),f._ngZone.run((function(){return f.hide(0)})))},this._scrollStrategy=u,h&&(h.position&&(this.position=h.position),h.touchGestures&&(this.touchGestures=h.touchGestures)),o.runOutsideAngular((function(){n.nativeElement.addEventListener("keydown",f._handleKeydown)}))}return w(t,[{key:"ngAfterViewInit",value:function(){var t=this;this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Object(g.a)(this._destroyed)).subscribe((function(e){e?"keyboard"===e&&t._ngZone.run((function(){return t.show()})):t._ngZone.run((function(){return t.hide(0)}))}))}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),t.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach((function(e){var n=m(e,2),i=n[0],r=n[1];t.removeEventListener(i,r,O)})),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message),this._focusMonitor.stopMonitoring(t)}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showDelay;if(!this.disabled&&this.message&&(!this._isTooltipVisible()||this._tooltipInstance._showTimeoutId||this._tooltipInstance._hideTimeoutId)){var n=this._createOverlay();this._detach(),this._portal=this._portal||new p.d(x,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Object(g.a)(this._destroyed)).subscribe((function(){return t._detach()})),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(e)}}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hideDelay;this._tooltipInstance&&this._tooltipInstance.hide(t)}},{key:"toggle",value:function(){this._isTooltipVisible()?this.hide():this.show()}},{key:"_isTooltipVisible",value:function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}},{key:"_createOverlay",value:function(){var t=this;if(this._overlayRef)return this._overlayRef;var e=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),n=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(e);return n.positionChanges.pipe(Object(g.a)(this._destroyed)).subscribe((function(e){t._tooltipInstance&&e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance.isVisible()&&t._ngZone.run((function(){return t.hide(0)}))})),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:n,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Object(g.a)(this._destroyed)).subscribe((function(){return t._detach()})),this._overlayRef}},{key:"_detach",value:function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}},{key:"_updatePosition",value:function(){var t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([Object.assign(Object.assign({},e.main),n.main),Object.assign(Object.assign({},e.fallback),n.fallback)])}},{key:"_getOrigin",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n||"below"==n?t={originX:"center",originY:"above"==n?"top":"bottom"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={originX:"start",originY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={originX:"end",originY:"center"});var i=this._invertPosition(t.originX,t.originY);return{main:t,fallback:{originX:i.x,originY:i.y}}}},{key:"_getOverlayPosition",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n?t={overlayX:"center",overlayY:"bottom"}:"below"==n?t={overlayX:"center",overlayY:"top"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={overlayX:"end",overlayY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={overlayX:"start",overlayY:"center"});var i=this._invertPosition(t.overlayX,t.overlayY);return{main:t,fallback:{overlayX:i.x,overlayY:i.y}}}},{key:"_updateTooltipMessage",value:function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Object(v.a)(1),Object(g.a)(this._destroyed)).subscribe((function(){t._tooltipInstance&&t._overlayRef.updatePosition()})))}},{key:"_setTooltipClass",value:function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}},{key:"_invertPosition",value:function(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}},{key:"_setupPointerEnterEventsIfNeeded",value:function(){var t=this;!this._disabled&&this.message&&this._viewInitialized&&!this._passiveListeners.length&&(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",function(){t._setupPointerExitEventsIfNeeded(),t.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",function(){t._setupPointerExitEventsIfNeeded(),clearTimeout(t._touchstartTimeout),t._touchstartTimeout=setTimeout((function(){return t.show()}),500)}])),this._addListeners(this._passiveListeners))}},{key:"_setupPointerExitEventsIfNeeded",value:function(){var t,e=this;if(!this._pointerExitEventsInitialized){this._pointerExitEventsInitialized=!0;var n=[];if(this._platformSupportsMouseEvents())n.push(["mouseleave",function(){return e.hide()}]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();var i=function(){clearTimeout(e._touchstartTimeout),e.hide(e._defaultOptions.touchendHideDelay)};n.push(["touchend",i],["touchcancel",i])}this._addListeners(n),(t=this._passiveListeners).push.apply(t,n)}}},{key:"_addListeners",value:function(t){var e=this;t.forEach((function(t){var n=m(t,2),i=n[0],r=n[1];e._elementRef.nativeElement.addEventListener(i,r,O)}))}},{key:"_platformSupportsMouseEvents",value:function(){return!this._platform.IOS&&!this._platform.ANDROID}},{key:"_disableNativeGesturesIfNecessary",value:function(){var t=this.touchGestures;if("off"!==t){var e=this._elementRef.nativeElement,n=e.style;("on"===t||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName)&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),"on"!==t&&e.draggable||(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}},{key:"position",get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(l.c)(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}},{key:"message",get:function(){return this._message},set:function(t){var e=this;this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?(""+t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular((function(){Promise.resolve().then((function(){e._ariaDescriber.describe(e._elementRef.nativeElement,e.message)}))})))}},{key:"tooltipClass",get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(i.c),a.Ob(a.l),a.Ob(c.f),a.Ob(a.R),a.Ob(a.B),a.Ob(f.a),a.Ob(r.c),a.Ob(r.h),a.Ob(k),a.Ob(u.b,8),a.Ob(S,8))},t.\u0275dir=a.Jb({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),t}(),x=function(){var t=function(){function t(e,n){C(this,t),this._changeDetectorRef=e,this._breakpointObserver=n,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new b.b,this._isHandset=this._breakpointObserver.observe(h.b.Handset)}return w(t,[{key:"show",value:function(t){var e=this;this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout((function(){e._visibility="visible",e._showTimeoutId=null,e._markForCheck()}),t)}},{key:"hide",value:function(t){var e=this;this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout((function(){e._visibility="hidden",e._hideTimeoutId=null,e._markForCheck()}),t)}},{key:"afterHidden",value:function(){return this._onHide}},{key:"isVisible",value:function(){return"visible"===this._visibility}},{key:"ngOnDestroy",value:function(){this._onHide.complete()}},{key:"_animationStart",value:function(){this._closeOnInteraction=!1}},{key:"_animationDone",value:function(t){var e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}},{key:"_handleBodyInteraction",value:function(){this._closeOnInteraction&&this.hide(0)}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(a.h),a.Ob(h.a))},t.\u0275cmp=a.Ib({type:t,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&a.bc("click",(function(){return e._handleBodyInteraction()}),!1,a.Bc),2&t&&a.Lc("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){var n;1&t&&(a.Ub(0,"div",0),a.bc("@state.start",(function(){return e._animationStart()}))("@state.done",(function(t){return e._animationDone(t)})),a.gc(1,"async"),a.Qc(2),a.Tb()),2&t&&(a.Gb("mat-tooltip-handset",null==(n=a.hc(1,5,e._isHandset))?null:n.matches),a.mc("ngClass",e.tooltipClass)("@state",e._visibility),a.Cb(2),a.Rc(e.message))},directives:[o.l],pipes:[o.b],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[_.tooltipState]},changeDetection:0}),t}(),P=function(){var t=function t(){C(this,t)};return t.\u0275mod=a.Mb({type:t}),t.\u0275inj=a.Lb({factory:function(e){return new(e||t)},providers:[T],imports:[[r.a,o.c,i.f,s.j],s.j,c.c]}),t}()},Wg7D:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("5uGe"),r=n("Efrr");n("uCWR");var o={leading:!0,trailing:!1};function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;return function(i){return i.lift(new u(t,e,n.leading,n.trailing))}}var u=function(){function t(e,n,i,r){C(this,t),this.duration=e,this.scheduler=n,this.leading=i,this.trailing=r}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new l(t,this.duration,this.scheduler,this.leading,this.trailing))}}]),t}(),l=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a){var s;return C(this,n),(s=e.call(this,t)).duration=i,s.scheduler=r,s.leading=o,s.trailing=a,s._hasTrailingValue=!1,s._trailingValue=null,s}return w(n,[{key:"_next",value:function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(d,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))}},{key:"_complete",value:function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}},{key:"clearThrottle",value: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)}}]),n}(i.a);function d(t){t.subscriber.clearThrottle()}},WncL:function(t,e,n){"use strict";n.d(e,"a",(function(){return P}));var i=n("D57K"),r=n("gxtV"),o=n("zqNl"),a=n("HM3f"),s=n("YtkY"),c=n("wqq/"),u=n("+Px6"),l=n("qAYy"),d=n("rxqU"),h=n("sxqi"),f=n("vYTc"),p=n("kZht"),b=n("An66"),g=n("1etq"),v=n("NxuZ"),y=n("ZEHW"),_=n("9BXW"),O=n("aDqW");function k(t,e){1&t&&(p.Ub(0,"h2",1),p.Qc(1),p.gc(2,"translate"),p.Pb(3,"fa-icon",7),p.Tb()),2&t&&(p.Cb(1),p.Sc(" ",p.hc(2,1,"HEADING.FAVORITES")," "))}function T(t,e){if(1&t){var n=p.Vb();p.Ub(0,"market-preview-favorite",10),p.bc("click",(function(){p.Ec(n);var t=e.$implicit;return p.fc(3).selectMarket(t)})),p.gc(1,"async"),p.Tb()}if(2&t){var i,r=e.$implicit,o=p.fc(3);p.mc("ticker",r),p.Db("active",(null==(i=p.hc(1,2,o.selected$))?null:i.symbol)===r.product_id)}}function S(t,e){if(1&t&&(p.Ub(0,"div",8),p.Oc(1,T,2,4,"market-preview-favorite",9),p.Tb()),2&t){var n=p.fc().ngIf,i=p.fc();p.Cb(1),p.mc("ngForOf",n.values())("ngForTrackBy",i.trackByProductId)}}function E(t,e){if(1&t&&(p.Sb(0),p.Oc(1,k,4,3,"h2",5),p.Oc(2,S,2,2,"div",6),p.Rb()),2&t){var n=e.ngIf;p.Cb(1),p.mc("ngIf",n.size>0),p.Cb(1),p.mc("ngIf",n.size>0)}}function x(t,e){if(1&t){var n=p.Vb();p.Ub(0,"market-preview-compact",11),p.bc("click",(function(){p.Ec(n);var t=e.$implicit;return p.fc().selectMarket(t)})),p.gc(1,"async"),p.gc(2,"async"),p.Tb()}if(2&t){var i,r=e.$implicit,o=p.fc();p.mc("ticker",r)("maxVol",p.hc(1,3,o.maxVol$)),p.Db("active",(null==(i=p.hc(2,5,o.selected$))?null:i.symbol)===r.product_id)}}var P=function(){var t=function(){function t(e,n){C(this,t),this.store=e,this.market=n,this.selected$=this.store.pipe(Object(o.m)(u.n)),this.futures$=this.store.pipe(Object(o.m)(l.g)),this.favorites$=this.store.pipe(Object(o.m)(d.p)),this.tickers$=this.futures$.pipe(Object(s.a)((function(t){return t.valueSeq().sortBy((function(t){return t.volumeQuote})).reverse()})),Object(c.a)(1)),this.maxVol$=this.tickers$.pipe(Object(s.a)((function(t){var e;return null!==(e=t.map((function(t){return t.volumeQuote})).max())&&void 0!==e?e:1}))),this.favoriteTickers$=Object(a.a)([this.favorites$,this.tickers$]).pipe(Object(s.a)((function(t){var e=m(t,2),n=e[0];return e[1].filter((function(t){return n.has(Object(f.i)(t))})).toList()})))}return w(t,[{key:"trackByProductId",value:function(t,e){return e.product_id}},{key:"selectMarket",value:function(t){this.market.navigateToMarket(t.product_id)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(p.Ob(o.b),p.Ob(h.a))},t.\u0275cmp=p.Ib({type:t,selectors:[["market-preview-panel"]],decls:9,vars:10,consts:[[4,"ngIf"],["subheading",""],["icon","chart-candlestick","size","lg"],[1,"open"],[3,"ticker","maxVol","click",4,"ngFor","ngForOf","ngForTrackBy"],["subheading","",4,"ngIf"],["subheading","","class","favorites",4,"ngIf"],["icon","star-filled","size","lg"],["subheading","",1,"favorites"],[3,"ticker","click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ticker","click"],[3,"ticker","maxVol","click"]],template:function(t,e){if(1&t&&(p.Oc(0,E,3,2,"ng-container",0),p.gc(1,"async"),p.Ub(2,"h2",1),p.Pb(3,"fa-icon",2),p.Qc(4),p.gc(5,"translate"),p.Tb(),p.Ub(6,"div",3),p.Oc(7,x,3,7,"market-preview-compact",4),p.gc(8,"async"),p.Tb()),2&t){var n=null;p.mc("ngIf",p.hc(1,4,e.favoriteTickers$)),p.Cb(4),p.Sc(" ",p.hc(5,6,"HEADING.OPEN_MARKETS"),"\n"),p.Cb(3),p.mc("ngForOf",null==(n=p.hc(8,8,e.tickers$))?null:n.values())("ngForTrackBy",e.trackByProductId)}},directives:[b.n,g.a,v.b,b.m,y.a,_.a],pipes:[b.b,O.d],styles:["[_nghost-%COMP%]{display:block;overflow-x:hidden;padding:var(--spacing)}h2[_ngcontent-%COMP%]{font-weight:700;margin-bottom:var(--spacing)}h2[_ngcontent-%COMP%]:not(:first-of-type){margin-top:var(--spacing-l)}h2[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--icon-colour)}.favorites[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:var(--spacing)}@media (min-width:1441px){.favorites[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}}.open[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:var(--spacing)}market-preview-favorite[active=true][_ngcontent-%COMP%]{border-color:var(--brand)}market-preview-compact[active=true][_ngcontent-%COMP%]{--symbol-color:var(--link-colour)}"],changeDetection:0}),t=Object(i.d)([Object(r.a)()],t)}()},Wxxs:function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"f",(function(){return c})),n.d(e,"e",(function(){return u})),n.d(e,"a",(function(){return l}));var i=n("zqNl"),r=Object(i.g)("Reset Verification State"),o=Object(i.g)("Check Tier"),a=Object(i.g)("Set Account Type",Object(i.l)()),s=Object(i.g)("Set Tier Status",Object(i.l)()),c=Object(i.g)("Set Temp Tier Status",Object(i.l)()),u=Object(i.g)("Set Classification",Object(i.l)()),l=Object(i.g)("Affirm UK Classification",Object(i.l)())},Wzsi:function(t,e,n){var i=n("67SP"),r=n("yBEi"),o=n("ECQc"),a=n("LxLQ"),s=n("188V"),c=n("PqQh"),u=n("HnIH"),l=n("OpOv"),d=n("nwte"),h=n("wCIf"),f=n("ZR2N"),p=n("Amke"),b=n("JgBV"),g=n("iRqU"),m=n("B9MG");function v(t,e,n){var i,r,o=t.size,a=p.getEncodedBits(e,n);for(i=0;i<15;i++)t.set(i<6?i:i<8?i+1:o-15+i,8,r=1==(a>>i&1),!0),t.set(8,i<8?o-i-1:i<9?15-i-1+1:15-i-1,r,!0);t.set(o-8,8,1,!0)}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var n,p,y=o.M;return void 0!==e&&(y=o.from(e.errorCorrectionLevel,o.M),n=f.from(e.version),p=l.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),function(t,e,n,o){var p;if(m(t))p=g.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var y=e;if(!y){var _=g.rawSplit(t);y=f.getBestVersionForData(_,n)}p=g.fromString(t,y||40)}var O=f.getBestVersionForData(p,n);if(!O)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e=0&&s<=6&&(0===c||6===c)||c>=0&&c<=6&&(0===s||6===s)||s>=2&&s<=4&&c>=2&&c<=4,!0)}(C,e),function(t){for(var e=t.size,n=8;n=7&&function(t,e){for(var n,i,r,o=t.size,a=f.getEncodedBits(e),s=0;s<18;s++)n=Math.floor(s/3),t.set(n,i=s%3+o-8-3,r=1==(a>>s&1),!0),t.set(i,n,r,!0)}(C,e),function(t,e){for(var n=t.size,i=-1,r=n-1,o=7,a=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var c=0;c<2;c++)if(!t.isReserved(r,s-c)){var u=!1;a>>o&1)),t.set(r,s-c,u),-1==--o&&(a++,o=7)}if((r+=i)<0||n<=r){r-=i,i=-i;break}}}(C,k),isNaN(o)&&(o=l.getBestMask(C,v.bind(null,C,n))),l.applyMask(o,C),v(C,n,o),{modules:C,version:e,errorCorrectionLevel:n,maskPattern:o,segments:p}}(t,n,y,p)}},X0qr:function(t,e,n){"use strict";function i(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return i}))},XOQS:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("neWc"),a=n("q+cW");e.default=function(t){function e(e){var n=t.call(this,e)||this;return n.matrix=null,n}return r(e,t),e.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var n=this.getLuminanceSource(),i=n.getWidth(),r=n.getHeight();if(i>=e.MINIMUM_DIMENSION&&r>=e.MINIMUM_DIMENSION){var o=n.getMatrix(),s=i>>e.BLOCK_SIZE_POWER;0!=(i&e.BLOCK_SIZE_MASK)&&s++;var c=r>>e.BLOCK_SIZE_POWER;0!=(r&e.BLOCK_SIZE_MASK)&&c++;var u=e.calculateBlackPoints(o,s,c,i,r),l=new a.default(i,r);e.calculateThresholdForBlock(o,s,c,i,r,u,l),this.matrix=l}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(t){return new e(t)},e.calculateThresholdForBlock=function(t,n,i,r,o,a,s){for(var c=o-e.BLOCK_SIZE,u=r-e.BLOCK_SIZE,l=0;lc&&(d=c);for(var h=e.cap(l,2,i-3),f=0;fu&&(p=u);for(var b=e.cap(f,2,n-3),g=0,m=-2;m<=2;m++){var v=a[h+m];g+=v[b-2]+v[b-1]+v[b]+v[b+1]+v[b+2]}e.thresholdBlock(t,p,d,g/25,r,s)}}},e.cap=function(t,e,n){return tn?n:t},e.thresholdBlock=function(t,n,i,r,o,a){for(var s=0,c=i*o+n;sa&&(l=a);for(var d=0;ds&&(h=s);for(var f=0,p=255,b=0,g=0,m=l*r+h;gb&&(b=y)}if(b-p>e.MIN_DYNAMIC_RANGE)for(g++,m+=r;g>2*e.BLOCK_SIZE_POWER;if(b-p<=e.MIN_DYNAMIC_RANGE&&(_=p/2,u>0&&d>0)){var O=(c[u-1][d]+2*c[u][d-1]+c[u-1][d-1])/4;p
    Remaining: ".concat(i,"/").concat(c+i):"")}return""}(t):t.orderPriorExecution?function(t){if(t.orderPriorExecution){var e=t.orderPriorExecution,n=e.side,i=e.symbol,r=t.amount,s=t.takerReducedQuantity,c=t.price,u="buy"===n?"Long":"Short";return"".concat(Object(a.j)(i).replace(o.b,"BTC")," ").concat(Object(a.i)(i,"short",!1)," - ").concat(u," ").concat(r," @ ").concat(c," ").concat(s?"- Reduced by: "+s:""," ").concat(t.orderPriorEdit?"(Edit caused execution)":"")}return""}(t):t.old&&t.new?function(t){var e,n;if(t.old&&t.new){var i=t.old.quantity,r=t.new.quantity,s=i!==r,c=null!==(e=t.old.limitPrice)&&void 0!==e?e:"MKT",u=null!==(n=t.new.limitPrice)&&void 0!==n?n:"MKT",l=c!==u,d=t.old.triggerPrice,h=t.new.triggerPrice,f=d!==h,p=!!t.new.triggerSignal,b=t.new.triggerSignal,g=t.new,m=g.side,v=g.symbol,y="buy"===m?"Long":"Short",_=f?", Trigger: ".concat(d," => ").concat(h):", Trigger: "+h;return"".concat(Object(a.j)(v).replace(o.b,"BTC")," ").concat(Object(a.i)(v,"short",!1)," - ").concat(y," ").concat(s?"".concat(i," => ").concat(r):r," @ ").concat(l?"".concat(c," => ").concat(u):u," ").concat(p?_:""," ").concat(b?"(".concat(b.toUpperCase(),")"):"")}return""}(t):t.orderTrigger?function(t){if(t.orderTrigger){var e=t.orderTrigger,n=e.side,i=e.quantity,r=e.symbol,s=e.limitPrice,c=e.triggerPrice,u=e.triggerSignal,l="buy"===n?"Long":"Short";return"".concat(Object(a.j)(r).replace(o.b,"BTC")," ").concat(Object(a.i)(r,"short",!1)," - ").concat(l," ").concat(i," @ ").concat(null!=s?s:"MKT"," , Trigger: ").concat(c," (").concat(null==u?void 0:u.toUpperCase(),")")}return""}(t):""}},XrPM:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("ssKD"),a=n("qvG1"),s=n("unaY"),c=n("oznm");e.default=function(t){function e(e,n,i,r,o,a,s,u){var l=t.call(this,a,s)||this;if(l.yuvData=e,l.dataWidth=n,l.dataHeight=i,l.left=r,l.top=o,r+a>n||o+s>i)throw new c.default("Crop rectangle does not fit within image data.");return u&&l.reverseHorizontal(a,s),l}return r(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new c.default("Requested row is outside the image: "+t);var n=this.getWidth();return(null==e||e.lengthi&&(r=l);i=r,e=0;for(var s=0,c=0,u=0;ui&&(c|=1<0;u++){var l;if((l=t[u])>i&&(e--,2*l>=s))return-1}return c}}while(e>3);return-1},e.patternToChar=function(t){for(var n=0;n="A"&&o<="Z"))throw new s.default;a=String.fromCharCode(o.charCodeAt(0)+32);break;case"$":if(!(o>="A"&&o<="Z"))throw new s.default;a=String.fromCharCode(o.charCodeAt(0)-64);break;case"%":if(o>="A"&&o<="E")a=String.fromCharCode(o.charCodeAt(0)-38);else if(o>="F"&&o<="J")a=String.fromCharCode(o.charCodeAt(0)-11);else if(o>="K"&&o<="O")a=String.fromCharCode(o.charCodeAt(0)+16);else if(o>="P"&&o<="T")a=String.fromCharCode(o.charCodeAt(0)+43);else if("U"===o)a="\0";else if("V"===o)a="@";else if("W"===o)a="`";else{if("X"!==o&&"Y"!==o&&"Z"!==o)throw new s.default;a="\x7f"}break;case"/":if(o>="A"&&o<="O")a=String.fromCharCode(o.charCodeAt(0)-32);else{if("Z"!==o)throw new s.default;a=":"}}n+=a,i++}else n+=r}return n},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e}(u.default)},YtkY:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("5uGe");function r(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 o(t,e))}}var o=function(){function t(e,n){C(this,t),this.project=e,this.thisArg=n}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))}}]),t}(),s=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,t)).project=i,o.count=0,o.thisArg=r||l(o),o}return w(n,[{key:"_next",value:function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}]),n}(i.a)},Yu3e:function(t,e){function n(t,e,n,i){var r,o=null==(r=i)||"number"==typeof r||"boolean"==typeof r?i:n(i),a=e.get(o);return void 0===a&&(a=t.call(this,i),e.set(o,a)),a}function i(t,e,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),o=e.get(r);return void 0===o&&(o=t.apply(this,i),e.set(r,o)),o}function r(t,e,n,i,r){return n.bind(e,t,i,r)}function o(t,e){return r(t,this,1===t.length?n:i,e.cache.create(),e.serializer)}function a(){return JSON.stringify(arguments)}function s(){this.cache=Object.create(null)}s.prototype.has=function(t){return t in this.cache},s.prototype.get=function(t){return this.cache[t]},s.prototype.set=function(t,e){this.cache[t]=e};var c={create:function(){return new s}};t.exports=function(t,e){return(e&&e.strategy?e.strategy:o)(t,{cache:e&&e.cache?e.cache:c,serializer:e&&e.serializer?e.serializer:a})},t.exports.strategies={variadic:function(t,e){return r(t,this,i,e.cache.create(),e.serializer)},monadic:function(t,e){return r(t,this,n,e.cache.create(),e.serializer)}}},YwYi:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("vI0g"),r=n("ssKD"),o=n("oznm");e.default=function(){function t(t,e){if(0===e.length)throw new o.default;this.field=t;var n=e.length;if(n>1&&0===e[0]){for(var i=1;ia.length){var s=n;n=a,a=s}var c=new Int32Array(a.length),u=a.length-n.length;r.default.arraycopy(a,0,c,0,u);for(var l=u;l=t.getDegree()&&!i.isZero();){var s=i.getDegree()-t.getDegree(),c=e.multiply(i.getCoefficient(i.getDegree()),a),u=t.multiplyByMonomial(s,c),l=e.buildMonomial(s,c);n=n.addOrSubtract(l),i=i.addOrSubtract(u)}return[n,i]},t.prototype.toString=function(){for(var t="",e=this.getDegree();e>=0;e--){var n=this.getCoefficient(e);if(0!==n){if(n<0?(t+=" - ",n=-n):t.length>0&&(t+=" + "),0===e||1!==n){var i=this.field.log(n);0===i?t+="1":1===i?t+="a":(t+="a^",t+=i)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t},t}()},YyhG:function(t,e,n){"use strict";n.d(e,"b",(function(){return m})),n.d(e,"k",(function(){return k})),n.d(e,"c",(function(){return w})),n.d(e,"l",(function(){return T})),n.d(e,"o",(function(){return S})),n.d(e,"d",(function(){return E})),n.d(e,"n",(function(){return x})),n.d(e,"m",(function(){return P})),n.d(e,"f",(function(){return A})),n.d(e,"g",(function(){return I})),n.d(e,"h",(function(){return M})),n.d(e,"j",(function(){return D})),n.d(e,"i",(function(){return R})),n.d(e,"e",(function(){return j})),n.d(e,"p",(function(){return L})),n.d(e,"a",(function(){return U})),n.d(e,"q",(function(){return B}));var i=n("zqNl"),r=n("og7C"),o=n("p5wL"),a=n("lx5p"),s=n("a1kK"),c=n("h3eB"),u=n("+Px6"),l=n("rxqU"),d=n("Gbfs"),h=n("7KkP"),f=n("TYVA"),p=n("J/3c"),b={positions:[],orders:Object(r.b)(),fills:Object(r.b)()},g=Object(i.i)(b,Object(i.k)(c.j,(function(){return b})),Object(i.k)(c.m,(function(t,e){var n=e.positions;return Object(o.b)(n,t,"positions")})),Object(i.k)(c.l,(function(t,e){var n=e.orders;return Object(o.b)(Object(o.c)(n,"order_id"),t,"orders")})),Object(i.k)(c.b,(function(t,e){var n=e.order;return Object(o.a)(Object(r.b)([[n.order_id,n]]),t,"orders")})),Object(i.k)(c.i,(function(t,e){var n=e.orderId;return Object(o.b)(t.orders.remove(n),t,"orders")})),Object(i.k)(c.k,(function(t,e){var n=e.fills;return Object(o.b)(Object(o.c)(n,"fill_id"),t,"fills")})),Object(i.k)(c.a,(function(t,e){var n=e.fills;return Object(o.a)(Object(o.c)(n,"fill_id"),t,"fills")})));function m(t,e){return g(t,e)}var v=Object(i.h)("trades"),y=Object(i.j)(v,(function(t){return t.positions})),_=Object(i.j)(v,(function(t){return t.orders})),O=Object(i.j)(v,(function(t){return t.fills})),k=Object(i.j)(y,u.d,u.j,u.r,l.a,l.r,u.g,u.k,(function(t,e,n,i,r,o,a,c,u){var l,d=Object(s.f)(n,t,"instrument").map(Object(h.c)(e,o)).map(Object(h.d)(a,c,i));return(null==u?void 0:u.ignorePairFilter)?d:null!==(l=null==r?void 0:r.activityPairFilterOn)&&void 0!==l&&l?d.filter(Object(s.h)(i)):d})),w=Object(i.j)(_,u.r,(function(t,e){return t.filter((function(t){return"limit"===t.type})).filter((function(t){return t.instrument===e})).map((function(t){return t.limit_price})).toSet()})),C=Object(i.j)(_,u.d,u.j,u.r,l.a,l.r,(function(t,e,n,i,r,o,c){var u,l=Object(s.d)(n,t,"instrument").map(Object(h.b)(e,o)).toOrderedMap().sortBy(Object(a.F)("time"),a.i);return(null==c?void 0:c.ignorePairFilter)?l:null!==(u=null==r?void 0:r.activityPairFilterOn)&&void 0!==u&&u?l.filter(Object(s.h)(i)):l})),T=Object(i.j)(C,(function(t){return t.filter((function(t){return"limit"===t.type}))})),S=Object(i.j)(C,(function(t){return t.filter((function(t){return"limit"!==t.type}))})),E=Object(i.j)(O,u.d,u.j,u.r,l.a,l.r,(function(t,e,n,i,r,o,c){var u,l=Object(s.d)(n,t,"instrument").map(Object(h.a)(e,o)).toOrderedMap().sortBy(Object(a.F)("time"),a.i);return(null==c?void 0:c.ignorePairFilter)?l:null!==(u=null==r?void 0:r.activityPairFilterOn)&&void 0!==u&&u?l.filter(Object(s.h)(i)):l})),x=Object(i.j)(l.r,u.t,u.n,(function(t,e,n){return"futures_inverse"===(null==n?void 0:n.type)?""+e.parts.currencies.quote:""+e.parts.currencies.base})),P=Object(i.j)(l.r,u.t,u.d,(function(t,e,n){var i="order"===t.trading,r="flex"===e.parts.family,o=n.get(r?e.parts.currencies.base:e.collateral);return i&&!r?d.a:o})),A=Object(i.j)(u.r,C,(function(t,e){return e.filter((function(e){return e.instrument===t}))})),I=Object(i.j)(u.r,k,(function(t,e){return e.find((function(e){return e.instrument===t}))})),M=Object(i.j)(T,(function(t){return t.size})),D=Object(i.j)(S,(function(t){return t.size})),R=Object(i.j)(y,(function(t){return t.length})),j=Object(i.j)(k,(function(t){return t.filter((function(t){return"mc"===Object(f.f)(t.instrument)}))})),L=Object(i.j)(I,j,p.l,u.o,(function(t,e,n,i){return n&&function(t,e,n,i){var r=n.margin_equity&&n.mm/n.margin_equity;if(i.cross){var o=n.cv||0,a=e.filter((function(t){var e;return!(null===(e=t.leveragePref)||void 0===e?void 0:e.cross)})).map((function(t){return t.initial_margin||0})).reduce((function(t,e){return t+e}),0),s=e.filter((function(t){var e;return null===(e=t.leveragePref)||void 0===e?void 0:e.cross})).map((function(t){return t.maintenance_margin||0})).reduce((function(t,e){return t+e}),0),c=e.filter((function(t){var e;return null===(e=t.leveragePref)||void 0===e?void 0:e.cross})).map((function(t){return t.pnl})).reduce((function(t,e){return t+e}),0);return 1-Math.max(r,1/((o-a)/(s-c)))}return t&&t.initial_margin&&t.maintenance_margin&&r?1-Math.max(r,t.maintenance_margin/(t.initial_margin+t.pnl)):1}(t,e,n,i)})),N=Object(i.j)(j,u.o,(function(t,e){return t.filter((function(t){var e;return null===(e=t.leveragePref)||void 0===e?void 0:e.cross}))})),U=Object(i.j)(N,(function(t){return t.length>0})),F=(Object(i.j)(N,(function(t){return t.reduce((function(t,e){return t+e.pnl}),0)})),Object(i.j)(N,(function(t){var e,n;return null!==(n=null===(e=t[0])||void 0===e?void 0:e.effective_leverage)&&void 0!==n?n:0}))),B=Object(i.j)(u.o,F,(function(t,e){return t.cross?e:t.maxLeverage}))},YzTY:function(t,e,n){"use strict";var i;function r(t){return function(e){return!(t.lowerBounds&&(e[0]t.upperBounds[0]||e[1]>t.upperBounds[1]))}}function o(t,e){return r(t)(e)}n.d(e,"b",(function(){return r})),n.d(e,"h",(function(){return o})),n.d(e,"f",(function(){return l})),n.d(e,"d",(function(){return h})),n.d(e,"g",(function(){return p})),n.d(e,"e",(function(){return y})),n.d(e,"c",(function(){return _})),n.d(e,"i",(function(){return C})),n.d(e,"a",(function(){return c})),n.d(e,"n",(function(){return E})),n.d(e,"l",(function(){return x})),n.d(e,"m",(function(){return P})),n.d(e,"j",(function(){return A})),n.d(e,"k",(function(){return I}));var a=n("u7r1"),s=n("lx5p"),c=function(t){return t[t.ORDER_FORM=1]="ORDER_FORM",t[t.MARKET_PREVIEWS=2]="MARKET_PREVIEWS",t[t.MARKET_CHART=3]="MARKET_CHART",t[t.OPEN_POSITIONS=4]="OPEN_POSITIONS",t[t.OPEN_ORDERS=5]="OPEN_ORDERS",t[t.TRIGGER_ORDERS=6]="TRIGGER_ORDERS",t[t.FILLED_ORDERS=7]="FILLED_ORDERS",t[t.ORDERBOOK=8]="ORDERBOOK",t[t.MARKET_DETAILS=9]="MARKET_DETAILS",t[t.PAIR_WALLET=10]="PAIR_WALLET",t[t.TRADE_HISTORY=11]="TRADE_HISTORY",t[t.BRACKET_ORDER=12]="BRACKET_ORDER",t[t.DEPTH_CHART=13]="DEPTH_CHART",t[t.ACCOUNT_ACTIVITY=14]="ACCOUNT_ACTIVITY",t}({}),u=function(t){return t[t.center="c"]="center",t[t.top="t"]="top",t[t.bottom="b"]="bottom",t[t.left="l"]="left",t[t.right="r"]="right",t[t.topCenter="tc"]="topCenter",t[t.topLeft="tl"]="topLeft",t[t.topRight="tr"]="topRight",t[t.bottomCenter="bc"]="bottomCenter",t[t.bottomLeft="bl"]="bottomLeft",t[t.bottomRight="br"]="bottomRight",t[t.c00="c00"]="c00",t[t.c01="c01"]="c01",t[t.c02="c02"]="c02",t[t.c03="c03"]="c03",t[t.c04="c04"]="c04",t[t.c10="c10"]="c10",t[t.c11="c11"]="c11",t[t.c12="c12"]="c12",t[t.c13="c13"]="c13",t[t.c14="c14"]="c14",t[t.c20="c20"]="c20",t[t.c21="c21"]="c21",t[t.c22="c22"]="c22",t[t.c23="c23"]="c23",t[t.c24="c24"]="c24",t[t.c30="c30"]="c30",t[t.c31="c31"]="c31",t[t.c32="c32"]="c32",t[t.c33="c33"]="c33",t[t.c34="c34"]="c34",t[t.c40="c40"]="c40",t[t.c41="c41"]="c41",t[t.c42="c42"]="c42",t[t.c43="c43"]="c43",t[t.c44="c44"]="c44",t}({});function l(t){var e=t.name,n=t.type,i=t.panels,r=n;r+="$";var o=Object.entries(i).map((function(t){var e=m(t,2);return function(t,e){var n="";return n+=u[t],n+="!",e.size&&(n+=e.size.map((function(t){return t.toString(16)})).join(",")),n+="!",n+=e.components.map((function(t){var n=t.toString(16);return e.activeComponent===t?"@"+n:n})).join(",")}(e[0],e[1])})).join("_");return r+=o,r+="$",r+=escape(e)}function d(t){var e={},n=t.split("!");if(3!==n.length)throw new Error("Encoded panel has wrong number of parts.");var i=m(n,3),r=i[0],o=i[1],a=i[2];if(!(r in u))throw new Error("Encoded panel location does not exist.");var l=u[r],d=o.split(",");if(2!==d.length)throw new Error("Encoded tab size has wrong number of parts.");var h=m(d.map((function(t){return parseInt(t,16)})),2),f=h[0],p=h[1];if([f,p].some(Number.isNaN))throw new Error("Encoded panel size is not hexadecimal.");if([f,p].some(s.o))throw new Error("Encoded panel size is negative.");return e.size=[f,p],e.components=a.split(",").filter((function(t){return t.length>0})).map((function(t){if("@"===t[0]){var n=parseInt(t.substring(1),16);return e.activeComponent=n,n}return parseInt(t,16)})).filter((function(t){return t in c})),[l,e]}function h(t){var e={},n=Object(s.K)("$",3)(t);if(3!==n.length)throw new Error("Encoded workspace has wrong number of parts.");var i=m(n,3),r=i[0],o=i[1],c=i[2];return e.type=r,e.name=unescape(c),e.id=Object(a.a)(11),e.panels={},o.split("_").map(d).forEach((function(t){var n=m(t,2),i=n[0],r=n[1];e.panels[i]=r})),e}function p(t,e){var n=t.slice(1).split("").slice(0,2).map(Number);return"".concat(n[0]+1," / ").concat(n[1]+1," / span ").concat(e.size[1]/2," / span ").concat(e.size[0]/2)}var g=n("TYVA"),v={name:"WORKSPACE.__DEFAULT__",type:"default"};function y(){return _(v)}function _(t){var e;return Object.assign(Object.assign({},t),{id:Object(a.a)(10),panels:null!==(e=t.panels)&&void 0!==e?e:w[t.type]})}var O={left:{size:[2,10],components:[c.ORDER_FORM,c.MARKET_PREVIEWS]},topCenter:{size:[6,6],components:[c.MARKET_CHART,c.DEPTH_CHART]},bottomCenter:{size:[6,4],components:[c.OPEN_POSITIONS,c.OPEN_ORDERS,c.TRIGGER_ORDERS,c.FILLED_ORDERS]},topRight:{size:[2,6],components:[c.ORDERBOOK,c.MARKET_DETAILS]},bottomRight:{size:[2,4],components:[c.TRADE_HISTORY,c.PAIR_WALLET]}},k={left:{size:[2,10],components:[c.ORDER_FORM,c.MARKET_PREVIEWS]},topCenter:{size:[6,6],components:[c.MARKET_CHART,c.DEPTH_CHART,c.MARKET_DETAILS]},bottomCenter:{size:[8,4],components:[c.OPEN_POSITIONS,c.OPEN_ORDERS,c.TRIGGER_ORDERS,c.FILLED_ORDERS]},topRight:{size:[2,6],components:[c.ORDERBOOK,c.TRADE_HISTORY]}},w={default:"desktop-max"===Object(g.A)()||"desktop-large"===Object(g.A)()?O:k,single:{center:{size:[10,10],components:[c.MARKET_CHART]}},double:{left:{size:[5,10],components:[c.ORDER_FORM]},right:{size:[5,10],components:[c.MARKET_CHART,c.ORDERBOOK]}},triple:{topLeft:{size:[5,5],components:[c.OPEN_POSITIONS]},bottomLeft:{size:[5,5],components:[c.OPEN_ORDERS,c.TRIGGER_ORDERS,c.FILLED_ORDERS]},right:{size:[5,10],components:[c.MARKET_CHART,c.ORDERBOOK]}},quad:{topLeft:{size:[5,5],components:[c.MARKET_CHART]},topRight:{size:[5,5],components:[c.ORDERBOOK,c.TRADE_HISTORY]},bottomLeft:{size:[5,5],components:[c.ORDER_FORM,c.PAIR_WALLET]},bottomRight:{size:[5,5],components:[c.OPEN_POSITIONS,c.OPEN_ORDERS,c.TRIGGER_ORDERS,c.FILLED_ORDERS]}},layout1:{left:{size:[6,10],components:[c.MARKET_CHART]},topRight:{size:[4,5],components:[c.ORDERBOOK,c.MARKET_PREVIEWS]},bottomRight:{size:[4,5],components:[c.OPEN_POSITIONS,c.OPEN_ORDERS,c.TRIGGER_ORDERS,c.FILLED_ORDERS]}},layout2:{topLeft:{size:[5,5],components:[c.MARKET_PREVIEWS]},bottomLeft:{size:[5,5],components:[c.OPEN_POSITIONS,c.OPEN_ORDERS,c.TRIGGER_ORDERS,c.FILLED_ORDERS]},center:{size:[2.5,10],components:[c.ORDERBOOK]},right:{size:[2.5,10],components:[c.ORDER_FORM,c.TRADE_HISTORY]}},layout3:{topLeft:{size:[6,5],components:[c.ORDER_FORM,c.MARKET_PREVIEWS]},bottomLeft:{size:[6,5],components:[c.OPEN_POSITIONS,c.OPEN_ORDERS,c.TRIGGER_ORDERS,c.FILLED_ORDERS]},topRight:{size:[4,5],components:[c.ORDERBOOK]},bottomRight:{size:[4,5],components:[c.PAIR_WALLET]}},layout4:{left:{size:[2.5,10],components:[c.ORDER_FORM]},center:{size:[5,10],components:[c.MARKET_CHART]},right:{size:[2.5,10],components:[c.ORDERBOOK,c.MARKET_PREVIEWS]}},layout5:{top:{size:[10,6],components:[c.MARKET_CHART]},bottom:{size:[10,4],components:[c.OPEN_POSITIONS,c.OPEN_ORDERS,c.TRIGGER_ORDERS,c.FILLED_ORDERS]}},layout6:{topLeft:{size:[5,6],components:[c.MARKET_CHART]},topRight:{size:[5,6],components:[c.ORDERBOOK]},bottom:{size:[10,4],components:[c.OPEN_POSITIONS,c.OPEN_ORDERS,c.TRIGGER_ORDERS,c.FILLED_ORDERS]}},layout7:{top:{size:[10,6],components:[c.MARKET_CHART]},bottomLeft:{size:[5,4],components:[c.OPEN_POSITIONS,c.PAIR_WALLET]},bottomRight:{size:[5,4],components:[c.OPEN_ORDERS,c.TRIGGER_ORDERS,c.FILLED_ORDERS]}},custom:{}},C=(f(i={},c.MARKET_DETAILS,{id:c.MARKET_DETAILS,upperBounds:[6,10]}),f(i,c.MARKET_CHART,{id:c.MARKET_CHART,lowerBounds:[2,1]}),f(i,c.MARKET_PREVIEWS,{id:c.MARKET_PREVIEWS}),f(i,c.ORDERBOOK,{id:c.ORDERBOOK}),f(i,c.ORDER_FORM,{id:c.ORDER_FORM}),f(i,c.TRADE_HISTORY,{id:c.TRADE_HISTORY}),f(i,c.OPEN_ORDERS,{id:c.OPEN_ORDERS}),f(i,c.TRIGGER_ORDERS,{id:c.TRIGGER_ORDERS}),f(i,c.OPEN_POSITIONS,{id:c.OPEN_POSITIONS}),f(i,c.FILLED_ORDERS,{id:c.FILLED_ORDERS}),f(i,c.PAIR_WALLET,{id:c.PAIR_WALLET}),f(i,c.BRACKET_ORDER,{id:c.BRACKET_ORDER,deprecated:!0}),f(i,c.ACCOUNT_ACTIVITY,{id:c.ACCOUNT_ACTIVITY,deprecated:!0}),f(i,c.DEPTH_CHART,{id:c.DEPTH_CHART,lowerBounds:[2,2]}),i),T=n("p5wL");function S(t,e){return function(n){return n.map((function(n){return n.id===e?t(n):n}))}}function E(t,e){return S((function(t){return t.name!==e?Object(T.b)(e,t,"name"):t}),t)}function x(t){return function(e){return e.map(Object(s.F)("id")).includes(t)?e.filter((function(e){return e.id!==t})):e}}function P(t,e,n){return S((function(n){return Object(T.b)(t,n,"panels",e,"activeComponent")}),n)}function A(t,e,n,i){return S((function(n){if(b(Object.values(n.panels)).flatMap((function(t){var e;return null!==(e=null==t?void 0:t.components)&&void 0!==e?e:[]})).includes(t))return n;var r,o,a,c=n,u=(a=null!==(o=null===(r=c.panels[e])||void 0===r?void 0:r.components)&&void 0!==o?o:[],Object(s.m)(i)?[].concat(b(a.slice(0,i)),[t],b(a.slice(i))):[].concat(b(a),[t])),l=Object(T.b)(u,c,"panels",e,"components");return Object(T.b)(t,l,"panels",e,"activeComponent")}),n)}function I(t,e){return S((function(e){if(b(Object.values(e.panels)).flatMap((function(t){var e;return null!==(e=null==t?void 0:t.components)&&void 0!==e?e:[]})).includes(t)){var n=Object(s.A)((function(e){if(!e)return e;if(e.components.includes(t)){var n=e.activeComponent?e.components.indexOf(e.activeComponent):void 0,i=e.components.filter(Object(s.p)(t)),r=Object(T.b)(i,e,"components");if(void 0===n)return r;if(0===i.length)return Object(T.b)(void 0,r,"activeComponent");var o=i[Math.min(n,i.length-1)];return Object(T.b)(o,r,"activeComponent")}return e}),e.panels);return Object(T.b)(n,e,"panels")}return e}),e)}},YzW0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("+luX"),r=n("Nxx2"),o=n("IkhO"),a=n("sP54"),s=n("XveA"),c=n("oznm");e.default=function(){function t(){}return t.clearMatrix=function(t){t.clear(255)},t.buildMatrix=function(e,n,i,r,o){t.clearMatrix(o),t.embedBasicPatterns(i,o),t.embedTypeInfo(n,r,o),t.maybeEmbedVersionInfo(i,o),t.embedDataBits(e,r,o)},t.embedBasicPatterns=function(e,n){t.embedPositionDetectionPatternsAndSeparators(n),t.embedDarkDotAtLeftBottomCorner(n),t.maybeEmbedPositionAdjustmentPatterns(e,n),t.embedTimingPatterns(n)},t.embedTypeInfo=function(e,n,r){var o=new i.default;t.makeTypeInfoBits(e,n,o);for(var a=0,s=o.getSize();a0;){for(6===c&&(c-=1);u>=0&&u=i;)e^=n<=0)for(var c=0;c!==a;c++){var u=r[c];u>=0&&t.isEmpty(n.get(u,s))&&t.embedPositionAdjustmentPattern(u-2,s-2,n)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522,t}()},ZCEf:function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.default=((i={})[i.OTHER=0]="OTHER",i[i.PURE_BARCODE=1]="PURE_BARCODE",i[i.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",i[i.TRY_HARDER=3]="TRY_HARDER",i[i.CHARACTER_SET=4]="CHARACTER_SET",i[i.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",i[i.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",i[i.ASSUME_GS1=7]="ASSUME_GS1",i[i.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",i[i.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",i[i.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS",i)},ZEHW:function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var i=n("vYTc"),r=n("kZht"),o=n("1etq"),a=n("yPvj"),s=n("1o0v"),c=n("za3o"),u=n("anSm"),l=n("LbKT"),d=n("aDqW"),h=n("BeMo"),f=n("rUBT"),p=n("DpwM"),b=n("FUqb"),g=n("An66"),m=n("Knqz"),v=function(){var t=function t(){C(this,t),this.mid=i.j};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Ib({type:t,selectors:[["market-preview-favorite"]],inputs:{ticker:"ticker"},decls:34,vars:32,consts:[["subheading","",1,"grid-min-1","gap-m","vcenter","symbol"],[3,"pair"],[1,"pair"],["ghost","","capitalize","",1,"maturity"],["body","",1,"price"],[1,"mid"],[1,"amount"],[1,"unit"],["pnlZero","",1,"change",3,"pnl"],["body","",1,"volume"],["translate","","ghost","",1,"label"],[1,"shade"],[3,"market","filled"]],template:function(t,e){1&t&&(r.Ub(0,"h2",0),r.Pb(1,"market-icon",1),r.Ub(2,"div"),r.Ub(3,"div",2),r.Qc(4),r.gc(5,"pair"),r.Tb(),r.Ub(6,"div",3),r.Qc(7),r.gc(8,"translate"),r.gc(9,"maturityMonth"),r.Tb(),r.Tb(),r.Tb(),r.Ub(10,"div",4),r.Ub(11,"div",5),r.Ub(12,"span",6),r.Qc(13),r.gc(14,"sato"),r.Tb(),r.Ub(15,"span",7),r.Qc(16),r.gc(17,"quote"),r.Tb(),r.Tb(),r.Ub(18,"div",8),r.Qc(19),r.gc(20,"change"),r.gc(21,"percent"),r.Tb(),r.Tb(),r.Ub(22,"div",9),r.Ub(23,"div",10),r.Qc(24,"LABEL.24H_VOLUME"),r.Tb(),r.Ub(25,"div"),r.Ub(26,"span",6),r.Qc(27),r.gc(28,"humanNumber"),r.Tb(),r.Ub(29,"span"),r.Qc(30),r.gc(31,"base"),r.Tb(),r.Tb(),r.Tb(),r.Pb(32,"div",11),r.Pb(33,"sparkline",12)),2&t&&(r.Cb(1),r.mc("pair",e.ticker.pair),r.Cb(3),r.Rc(r.hc(5,11,e.ticker.product_id)),r.Cb(3),r.Sc(" ",r.hc(8,13,r.ic(9,15,e.ticker.product_id,"short")||"")," "),r.Cb(6),r.Rc(r.ic(14,18,e.mid(e.ticker),e.ticker)),r.Cb(3),r.Sc(" ",r.hc(17,21,e.ticker.product_id),""),r.Cb(2),r.mc("pnl",e.ticker.change),r.Cb(1),r.Sc(" ",r.hc(20,23,r.ic(21,25,e.ticker.change/100,"1.2-2"))," "),r.Cb(8),r.Rc(r.hc(28,28,e.ticker.volume)),r.Cb(3),r.Sc(" ",r.hc(31,30,e.ticker.product_id),""),r.Cb(3),r.mc("market",e.ticker.product_id)("filled",!0))},directives:[o.a,a.a,s.a,c.a,u.a,l.a,d.a,h.a],pipes:[f.e,d.d,f.d,p.c,f.f,b.b,g.u,m.a,f.a],styles:['[_nghost-%COMP%]{display:grid;grid-template:"symbol symbol" auto "volume price" auto/auto auto;gap:var(--spacing);padding:var(--spacing);border:1px solid var(--border-colour);border-radius:var(--bdrs);background-color:var(--background-colour)}[_nghost-%COMP%]:hover{background:rgba(var(--text-colour-rgb),.1);cursor:pointer}[active=true][_nghost-%COMP%]{border:1px solid var(--brand)}.price[_ngcontent-%COMP%], .symbol[_ngcontent-%COMP%], .volprop[_ngcontent-%COMP%], .volume[_ngcontent-%COMP%]{z-index:2}.symbol[_ngcontent-%COMP%]{grid-area:symbol;font-size:1.1em}.symbol[_ngcontent-%COMP%] .pair[_ngcontent-%COMP%]{color:var(--symbol-color,var(--text-colour))}.symbol[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{font-size:1.5em}.symbol[_ngcontent-%COMP%] .maturity[_ngcontent-%COMP%]{margin-top:var(--spacing-s);font-size:.8em}.price[_ngcontent-%COMP%]{grid-area:price;align-self:end;text-align:right}.price[_ngcontent-%COMP%] .mid[_ngcontent-%COMP%]{margin-bottom:var(--spacing-s)}.price[_ngcontent-%COMP%] .mid[_ngcontent-%COMP%] .amount[_ngcontent-%COMP%]{font-size:1.4em}.volume[_ngcontent-%COMP%]{grid-area:volume;align-self:end}.volume[_ngcontent-%COMP%] .amount[_ngcontent-%COMP%]{font-size:1.25em}.volume[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-bottom:var(--spacing-s)}.shade[_ngcontent-%COMP%]{width:auto;height:calc(100% + var(--spacing) * 2);z-index:1;background-image:linear-gradient(0deg,rgba(0,0,0,.4),transparent);background-size:100% 40%;background-position:bottom;background-repeat:repeat-x;pointer-events:none}.shade[_ngcontent-%COMP%], sparkline[_ngcontent-%COMP%]{grid-area:1/1/-1/-1;margin:calc(var(--spacing) * -1)}sparkline[_ngcontent-%COMP%]{align-self:center;z-index:0;opacity:.6}'],changeDetection:0}),t}()},ZR2N:function(t,e,n){var i=n("yBEi"),r=n("nwte"),o=n("ECQc"),a=n("JgBV"),s=n("p3rJ"),c=n("B9MG"),u=i.getBCHDigit(7973);function l(t,e){return a.getCharCountIndicator(t,e)+4}function d(t,e){var n=0;return t.forEach((function(t){var i=l(t.mode,e);n+=i+t.getBitsLength()})),n}e.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!s.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);var o=8*(i.getSymbolTotalCodewords(t)-r.getTotalCodewordsCount(t,e));if(n===a.MIXED)return o;var c=o-l(n,t);switch(n){case a.NUMERIC:return Math.floor(c/10*3);case a.ALPHANUMERIC:return Math.floor(c/11*2);case a.KANJI:return Math.floor(c/13);case a.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(t,n){var i,r=o.from(n,o.M);if(c(t)){if(t.length>1)return function(t,n){for(var i=1;i<=40;i++)if(d(t,i)<=e.getCapacity(i,n,a.MIXED))return i}(t,r);if(0===t.length)return 1;i=t[0]}else i=t;return function(t,n,i){for(var r=1;r<=40;r++)if(n<=e.getCapacity(r,i,t))return r}(i.mode,i.getLength(),r)},e.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;i.getBCHDigit(e)-u>=0;)e^=7973<7?p-1:p]=e[y++]}if(y!==e.length)throw new i.default;return u},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}()},ZtZA:function(t,e,n){"use strict";n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return g})),n.d(e,"c",(function(){return m})),n.d(e,"d",(function(){return u})),n.d(e,"e",(function(){return b})),n.d(e,"f",(function(){return v})),n.d(e,"g",(function(){return _})),n.d(e,"h",(function(){return d}));var i=n("kZht"),r=n("An66"),s=function(){function t(){C(this,t)}return w(t,[{key:"attach",value:function(t){return this._attachedHost=t,t.attach(this)}},{key:"detach",value:function(){var t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}},{key:"setAttachedHost",value:function(t){this._attachedHost=t}},{key:"isAttached",get:function(){return null!=this._attachedHost}}]),t}(),u=function(t){a(n,t);var e=c(n);function n(t,i,r,o){var a;return C(this,n),(a=e.call(this)).component=t,a.viewContainerRef=i,a.injector=r,a.componentFactoryResolver=o,a}return n}(s),d=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this)).templateRef=t,o.viewContainerRef=i,o.context=r,o}return w(n,[{key:"attach",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=e,o(h(n.prototype),"attach",this).call(this,t)}},{key:"detach",value:function(){return this.context=void 0,o(h(n.prototype),"detach",this).call(this)}},{key:"origin",get:function(){return this.templateRef.elementRef}}]),n}(s),f=function(t){a(n,t);var e=c(n);function n(t){var r;return C(this,n),(r=e.call(this)).element=t instanceof i.l?t.nativeElement:t,r}return n}(s),p=function(){function t(){C(this,t),this._isDisposed=!1,this.attachDomPortal=null}return w(t,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(t){return t instanceof u?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof d?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof f?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}},{key:"detach",value:function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}},{key:"dispose",value:function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}},{key:"setDisposeFn",value:function(t){this._disposeFn=t}},{key:"_invokeDisposeFn",value:function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}]),t}(),b=function(t){a(n,t);var e=c(n);function n(t,i,r,a,s){var c,u;return C(this,n),(u=e.call(this)).outletElement=t,u._componentFactoryResolver=i,u._appRef=r,u._defaultInjector=a,u.attachDomPortal=function(t){var e=t.element,i=u._document.createComment("dom-portal");e.parentNode.insertBefore(i,e),u.outletElement.appendChild(e),o((c=l(u),h(n.prototype)),"setDisposeFn",c).call(c,(function(){i.parentNode&&i.parentNode.replaceChild(e,i)}))},u._document=s,u}return w(n,[{key:"attachComponentPortal",value:function(t){var e,n=this,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn((function(){return e.destroy()}))):(e=i.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn((function(){n._appRef.detachView(e.hostView),e.destroy()}))),this.outletElement.appendChild(this._getComponentRootNode(e)),e}},{key:"attachTemplatePortal",value:function(t){var e=this,n=t.viewContainerRef,i=n.createEmbeddedView(t.templateRef,t.context);return i.rootNodes.forEach((function(t){return e.outletElement.appendChild(t)})),i.detectChanges(),this.setDisposeFn((function(){var t=n.indexOf(i);-1!==t&&n.remove(t)})),i}},{key:"dispose",value:function(){o(h(n.prototype),"dispose",this).call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}},{key:"_getComponentRootNode",value:function(t){return t.hostView.rootNodes[0]}}]),n}(p),g=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i){return C(this,n),e.call(this,t,i)}return n}(d);return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.N),i.Ob(i.R))},t.\u0275dir=i.Jb({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[i.zb]}),t}(),m=function(){var t=function(t){a(n,t);var e=c(n);function n(t,r,a){var s,c;return C(this,n),(c=e.call(this))._componentFactoryResolver=t,c._viewContainerRef=r,c._isInitialized=!1,c.attached=new i.o,c.attachDomPortal=function(t){var e=t.element,i=c._document.createComment("dom-portal");t.setAttachedHost(l(c)),e.parentNode.insertBefore(i,e),c._getRootNode().appendChild(e),o((s=l(c),h(n.prototype)),"setDisposeFn",s).call(s,(function(){i.parentNode&&i.parentNode.replaceChild(e,i)}))},c._document=a,c}return w(n,[{key:"ngOnInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){o(h(n.prototype),"dispose",this).call(this),this._attachedPortal=null,this._attachedRef=null}},{key:"attachComponentPortal",value:function(t){t.setAttachedHost(this);var e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),r=e.createComponent(i,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(r.hostView.rootNodes[0]),o(h(n.prototype),"setDisposeFn",this).call(this,(function(){return r.destroy()})),this._attachedPortal=t,this._attachedRef=r,this.attached.emit(r),r}},{key:"attachTemplatePortal",value:function(t){var e=this;t.setAttachedHost(this);var i=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return o(h(n.prototype),"setDisposeFn",this).call(this,(function(){return e._viewContainerRef.clear()})),this._attachedPortal=t,this._attachedRef=i,this.attached.emit(i),i}},{key:"_getRootNode",value:function(){var t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}},{key:"portal",get:function(){return this._attachedPortal},set:function(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&o(h(n.prototype),"detach",this).call(this),t&&o(h(n.prototype),"attach",this).call(this,t),this._attachedPortal=t)}},{key:"attachedRef",get:function(){return this._attachedRef}}]),n}(p);return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.j),i.Ob(i.R),i.Ob(r.d))},t.\u0275dir=i.Jb({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[i.zb]}),t}(),v=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(m);return t.\u0275fac=function(e){return y(e||t)},t.\u0275dir=i.Jb({type:t,selectors:[["","cdkPortalHost",""],["","portalHost",""]],inputs:{portal:["cdkPortalHost","portal"]},exportAs:["cdkPortalHost"],features:[i.Bb([{provide:m,useExisting:t}]),i.zb]}),t}(),y=i.Wb(v),_=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)}}),t}()},"a+Rm":function(t,e){var n=1e3,i=60*n,r=60*i,o=24*r;function a(t,e,n,i){var r=e>=1.5*n;return Math.round(t/n)+" "+i+(r?"s":"")}t.exports=function(t,e){e=e||{};var s,c,u=typeof t;if("string"===u&&t.length>0)return function(t){if(!((t=String(t)).length>100)){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){var a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*i;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(t);if("number"===u&&isFinite(t))return e.long?(s=t,(c=Math.abs(s))>=o?a(s,c,o,"day"):c>=r?a(s,c,r,"hour"):c>=i?a(s,c,i,"minute"):c>=n?a(s,c,n,"second"):s+" ms"):function(t){var e=Math.abs(t);return e>=o?Math.round(t/o)+"d":e>=r?Math.round(t/r)+"h":e>=i?Math.round(t/i)+"m":e>=n?Math.round(t/n)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},a1kK:function(t,e,n){"use strict";n.d(e,"f",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return c})),n.d(e,"h",(function(){return u})),n.d(e,"g",(function(){return l})),n.d(e,"b",(function(){return d})),n.d(e,"a",(function(){return h})),n.d(e,"c",(function(){return f}));var i=n("VmIW"),r=n("lx5p"),o=n("TYVA");function a(t,e,n){return e.map((function(e){return c(t,e,n)}))}function s(t,e,n){return e.map((function(e){return c(t,e,n)}))}function c(t,e,n){var r=i.Maybe.fromUndefined(t.get(e[n])).map((function(t){return{numericPrecision:t.numericPrecision,numericFormat:t.numericFormat,category:t.category}}));return Object.assign(Object.assign({},e),r.orUndefined())}var u=function(t){return Object(r.E)(Object(r.F)("instrument"),o.o,Object(r.n)(Object(o.o)(t)))};function l(t,e){if(0!==t.length&&0!==e.length){var n=t[0].price,i=n-e[0].price;return{percent:i/n,value:i}}}var d="PI_XBTUSD",h="PF_XBTUSD",f="futures"},a3or:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){function t(t,e){this.dataBytes=t,this.errorCorrectionBytes=e}return t.prototype.getDataBytes=function(){return this.dataBytes},t.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},t}()},aDqW:function(t,e,n){"use strict";n.d(e,"a",(function(){return B})),n.d(e,"b",(function(){return v})),n.d(e,"c",(function(){return V})),n.d(e,"d",(function(){return z})),n.d(e,"e",(function(){return F}));var i=n("kZht"),r=n("ROBh"),o=n("9bRT"),s=n("P4Xx"),u=n("qZtG"),l=n("i9xl"),d=n("J+dc"),h=n("wqq/"),b=n("YtkY"),g=n("5uDM"),m=n("TLy2"),v=function t(){C(this,t)},y=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,[{key:"getTranslation",value:function(t){return Object(r.a)({})}}]),n}(v);return t.\u0275fac=function(e){return _(e||t)},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),_=i.Wb(y),O=function t(){C(this,t)},k=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"handle",value:function(t){return t.key}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}();function T(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;var n,i,r,o=typeof t;if(o==typeof e&&"object"==o){if(!Array.isArray(t)){if(Array.isArray(e))return!1;for(i in r=Object.create(null),t){if(!T(t[i],e[i]))return!1;r[i]=!0}for(i in e)if(!(i in r)&&void 0!==e[i])return!1;return!0}if(!Array.isArray(e))return!1;if((n=t.length)==e.length){for(i=0;i5&&void 0!==arguments[5])||arguments[5],c=arguments.length>6&&void 0!==arguments[6]&&arguments[6],u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=arguments.length>8?arguments[8]:void 0;C(this,t),this.store=e,this.currentLoader=n,this.compiler=r,this.parser=o,this.missingTranslationHandler=a,this.useDefaultLang=s,this.isolate=c,this.extend=u,this.pending=!1,this._onTranslationChange=new i.o,this._onLangChange=new i.o,this._onDefaultLangChange=new i.o,this._langs=[],this._translations={},this._translationRequests={},l&&this.setDefaultLang(l)}return w(t,[{key:"setDefaultLang",value:function(t){var e=this;if(t!==this.defaultLang){var n=this.retrieveTranslations(t);void 0!==n?(null==this.defaultLang&&(this.defaultLang=t),n.pipe(Object(d.a)(1)).subscribe((function(n){e.changeDefaultLang(t)}))):this.changeDefaultLang(t)}}},{key:"getDefaultLang",value:function(){return this.defaultLang}},{key:"use",value:function(t){var e=this;if(t===this.currentLang)return Object(r.a)(this.translations[t]);var n=this.retrieveTranslations(t);return void 0!==n?(this.currentLang||(this.currentLang=t),n.pipe(Object(d.a)(1)).subscribe((function(n){e.changeLang(t)})),n):(this.changeLang(t),Object(r.a)(this.translations[t]))}},{key:"retrieveTranslations",value:function(t){var e;return(void 0===this.translations[t]||this.extend)&&(this._translationRequests[t]=this._translationRequests[t]||this.getTranslation(t),e=this._translationRequests[t]),e}},{key:"getTranslation",value:function(t){var e=this;this.pending=!0;var n=this.currentLoader.getTranslation(t).pipe(Object(h.a)(1),Object(d.a)(1));return this.loadingTranslations=n.pipe(Object(b.a)((function(n){return e.compiler.compileTranslations(n,t)})),Object(h.a)(1),Object(d.a)(1)),this.loadingTranslations.subscribe({next:function(n){e.translations[t]=e.extend&&e.translations[t]?Object.assign(Object.assign({},n),e.translations[t]):n,e.updateLangs(),e.pending=!1},error:function(t){e.pending=!1}}),n}},{key:"setTranslation",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e=this.compiler.compileTranslations(e,t),this.translations[t]=(n||this.extend)&&this.translations[t]?function t(e,n){var i=Object.assign({},e);return E(e)&&E(n)&&Object.keys(n).forEach((function(r){E(n[r])&&r in e?i[r]=t(e[r],n[r]):Object.assign(i,f({},r,n[r]))})),i}(this.translations[t],e):e,this.updateLangs(),this.onTranslationChange.emit({lang:t,translations:this.translations[t]})}},{key:"getLangs",value:function(){return this.langs}},{key:"addLangs",value:function(t){var e=this;t.forEach((function(t){-1===e.langs.indexOf(t)&&e.langs.push(t)}))}},{key:"updateLangs",value:function(){this.addLangs(Object.keys(this.translations))}},{key:"getParsedResult",value:function(t,e,n){var i;if(e instanceof Array){var a,c={},u=!1,l=p(e);try{for(l.s();!(a=l.n()).done;){var d=a.value;c[d]=this.getParsedResult(t,d,n),Object(o.a)(c[d])&&(u=!0)}}catch(g){l.e(g)}finally{l.f()}if(u){var h=e.map((function(t){return Object(o.a)(c[t])?c[t]:Object(r.a)(c[t])}));return Object(s.a)(h).pipe(Object(b.a)((function(t){var n={};return t.forEach((function(t,i){n[e[i]]=t})),n})))}return c}if(t&&(i=this.parser.interpolate(this.parser.getValue(t,e),n)),void 0===i&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],e),n)),void 0===i){var f={key:e,translateService:this};void 0!==n&&(f.interpolateParams=n),i=this.missingTranslationHandler.handle(f)}return void 0!==i?i:e}},{key:"get",value:function(t,e){var n=this;if(!S(t)||!t.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(Object(g.a)((function(i){return i=n.getParsedResult(i,t,e),Object(o.a)(i)?i:Object(r.a)(i)})));var i=this.getParsedResult(this.translations[this.currentLang],t,e);return Object(o.a)(i)?i:Object(r.a)(i)}},{key:"getStreamOnTranslationChange",value:function(t,e){var n=this;if(!S(t)||!t.length)throw new Error('Parameter "key" required');return Object(u.a)(Object(l.a)((function(){return n.get(t,e)})),this.onTranslationChange.pipe(Object(m.a)((function(i){var o=n.getParsedResult(i.translations,t,e);return"function"==typeof o.subscribe?o:Object(r.a)(o)}))))}},{key:"stream",value:function(t,e){var n=this;if(!S(t)||!t.length)throw new Error('Parameter "key" required');return Object(u.a)(Object(l.a)((function(){return n.get(t,e)})),this.onLangChange.pipe(Object(m.a)((function(i){var a=n.getParsedResult(i.translations,t,e);return Object(o.a)(a)?a:Object(r.a)(a)}))))}},{key:"instant",value:function(t,e){if(!S(t)||!t.length)throw new Error('Parameter "key" required');var n=this.getParsedResult(this.translations[this.currentLang],t,e);if(Object(o.a)(n)){if(t instanceof Array){var i={};return t.forEach((function(e,n){i[t[n]]=t[n]})),i}return t}return n}},{key:"set",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.currentLang;this.translations[n][t]=this.compiler.compile(e,n),this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}},{key:"changeLang",value:function(t){this.currentLang=t,this.onLangChange.emit({lang:t,translations:this.translations[t]}),null==this.defaultLang&&this.changeDefaultLang(t)}},{key:"changeDefaultLang",value:function(t){this.defaultLang=t,this.onDefaultLangChange.emit({lang:t,translations:this.translations[t]})}},{key:"reloadLang",value:function(t){return this.resetLang(t),this.getTranslation(t)}},{key:"resetLang",value:function(t){this._translationRequests[t]=void 0,this.translations[t]=void 0}},{key:"getBrowserLang",value:function(){if("undefined"!=typeof window&&void 0!==window.navigator){var t=window.navigator.languages?window.navigator.languages[0]:null;return void 0!==(t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage)?(-1!==t.indexOf("-")&&(t=t.split("-")[0]),-1!==t.indexOf("_")&&(t=t.split("_")[0]),t):void 0}}},{key:"getBrowserCultureLang",value:function(){if("undefined"!=typeof window&&void 0!==window.navigator){var t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}}},{key:"onTranslationChange",get:function(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}},{key:"onLangChange",get:function(){return this.isolate?this._onLangChange:this.store.onLangChange}},{key:"onDefaultLangChange",get:function(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}},{key:"defaultLang",get:function(){return this.isolate?this._defaultLang:this.store.defaultLang},set:function(t){this.isolate?this._defaultLang=t:this.store.defaultLang=t}},{key:"currentLang",get:function(){return this.isolate?this._currentLang:this.store.currentLang},set:function(t){this.isolate?this._currentLang=t:this.store.currentLang=t}},{key:"langs",get:function(){return this.isolate?this._langs:this.store.langs},set:function(t){this.isolate?this._langs=t:this.store.langs=t}},{key:"translations",get:function(){return this.isolate?this._translations:this.store.translations},set:function(t){this.isolate?this._translations=t:this.store.translations=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(R),i.Yb(v),i.Yb(I),i.Yb(x),i.Yb(O),i.Yb(L),i.Yb(j),i.Yb(U),i.Yb(N))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),B=function(){var t=function(){function t(e,n,i){var r=this;C(this,t),this.translateService=e,this.element=n,this._ref=i,this.onTranslationChangeSub||(this.onTranslationChangeSub=this.translateService.onTranslationChange.subscribe((function(t){t.lang===r.translateService.currentLang&&r.checkNodes(!0,t.translations)}))),this.onLangChangeSub||(this.onLangChangeSub=this.translateService.onLangChange.subscribe((function(t){r.checkNodes(!0,t.translations)}))),this.onDefaultLangChangeSub||(this.onDefaultLangChangeSub=this.translateService.onDefaultLangChange.subscribe((function(t){r.checkNodes(!0)})))}return w(t,[{key:"ngAfterViewChecked",value:function(){this.checkNodes()}},{key:"checkNodes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0,n=this.element.nativeElement.childNodes;n.length||(this.setContent(this.element.nativeElement,this.key),n=this.element.nativeElement.childNodes);for(var i=0;i1?i-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:t,providers:[e.loader||{provide:v,useClass:y},e.compiler||{provide:I,useClass:M},e.parser||{provide:x,useClass:P},e.missingTranslationHandler||{provide:O,useClass:k},R,{provide:j,useValue:e.isolate},{provide:L,useValue:e.useDefaultLang},{provide:U,useValue:e.extend},{provide:N,useValue:e.defaultLanguage},F]}}},{key:"forChild",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:t,providers:[e.loader||{provide:v,useClass:y},e.compiler||{provide:I,useClass:M},e.parser||{provide:x,useClass:P},e.missingTranslationHandler||{provide:O,useClass:k},{provide:j,useValue:e.isolate},{provide:L,useValue:e.useDefaultLang},{provide:U,useValue:e.extend},{provide:N,useValue:e.defaultLanguage},F]}}}]),t}();return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)}}),t}()},aEDl:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("4Pxi"),a=n("n5WT"),s=n("LqyJ");e.default=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=[0,0,0,0],e}return r(e,t),e.prototype.decodeMiddle=function(t,n,i){var r=this.decodeMiddleCounters;r[0]=0,r[1]=0,r[2]=0,r[3]=0;for(var o=t.getSize(),s=n[1],c=0,u=0;u<6&&s=10&&(c|=1<<5-u)}for(i=e.determineFirstDigit(i,c),s=a.default.findGuardPattern(t,s,!0,a.default.MIDDLE_PATTERN,new Array(a.default.MIDDLE_PATTERN.length).fill(0))[1],u=0;u<6&&s0)("mat-toolbar-single-row",0===e._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[i.zb],ngContentSelectors:l,decls:2,vars:0,template:function(t,e){1&t&&(i.lc(u),i.kc(0),i.kc(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"],encapsulation:2,changeDetection:0}),t}(),p=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},imports:[[r.j],r.j]}),t}()},aaFr:function(t,e,n){"use strict";n.d(e,"a",(function(){return S}));var i=n("jL3B"),r=n("5XID"),o=n("Hq54"),a=n("kZht"),s=n("bwdy"),c=n("ZTXN"),u=n("g6G6"),l=n("jIqt"),d=n("TLy2"),h=n("J+dc"),f=n("hvMX"),p=n("bW1x"),g=n("njz0"),m=n("ROO/"),v=n("2yS1"),y=n("An66");function _(t,e){if(1&t){var n=a.Vb();a.Ub(0,"div",0),a.bc("keydown",(function(t){return a.Ec(n),a.fc()._handleKeydown(t)}))("click",(function(){return a.Ec(n),a.fc().closed.emit("click")}))("@transformMenu.start",(function(t){return a.Ec(n),a.fc()._onAnimationStart(t)}))("@transformMenu.done",(function(t){return a.Ec(n),a.fc()._onAnimationDone(t)})),a.kc(1),a.Tb()}if(2&t){var i=a.fc();a.mc("id",i.panelId)("ngClass",i._classList)("@transformMenu",i._panelAnimationState),a.Db("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby||null)("aria-describedby",i.ariaDescribedby||null)}}var O=["*"],k=new a.s("sb-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!1,xPosition:"center",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}}),T=0,S=function(){var t=function(){function t(e,n,i){C(this,t),this._elementRef=e,this._ngZone=n,this._defaultOptions=i,this._directDescendantItems=new a.F,this._tabSubscription=s.a.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new c.b,this.backdropClass=this._defaultOptions.backdropClass,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new a.o,this.panelId="sb-menu-panel-"+T++}return w(t,[{key:"ngOnInit",value:function(){this.setPositionClasses()}},{key:"ngAfterContentInit",value:function(){var t=this;this._updateDirectDescendants(),this._keyManager=new i.g(this._directDescendantItems).withWrap().withTypeAhead(),this._tabSubscription=this._keyManager.tabOut.subscribe((function(){return t.closed.emit("tab")})),this._directDescendantItems.changes.pipe(Object(l.a)(this._directDescendantItems),Object(d.a)((function(t){return Object(u.a).apply(void 0,b(t.map((function(t){return t.focused}))))}))).subscribe((function(e){return t._keyManager.updateActiveItem(e)}))}},{key:"ngOnDestroy",value:function(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()}},{key:"_hovered",value:function(){return this._directDescendantItems.changes.pipe(Object(l.a)(this._directDescendantItems),Object(d.a)((function(t){return Object(u.a).apply(void 0,b(t.map((function(t){return t.hovered}))))})))}},{key:"_handleKeydown",value:function(t){var e=t.key,n=this._keyManager;switch(e){case"Escape":Object(o.r)(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case"ArrowLeft":this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case"ArrowRight":this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;case"Home":case"End":Object(o.r)(t)||("Home"===e?n.setFirstItemActive():n.setLastItemActive(),t.preventDefault());break;default:"ArrowUp"!==e&&"ArrowDown"!==e||n.setFocusOrigin("keyboard"),n.onKeydown(t)}}},{key:"focusFirstItem",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program";this.lazyContent?this._ngZone.onStable.asObservable().pipe(Object(h.a)(1)).subscribe((function(){return t._focusFirstItem(e)})):this._focusFirstItem(e)}},{key:"_focusFirstItem",value:function(t){var e=this._keyManager;if(e.setFocusOrigin(t).setFirstItemActive(),!e.activeItem&&this._directDescendantItems.length)for(var n=this._directDescendantItems.first._getHostElement().parentElement;n;){if("menu"===n.getAttribute("role")){n.focus();break}n=n.parentElement}}},{key:"resetActiveItem",value:function(){this._keyManager.setActiveItem(-1)}},{key:"setPositionClasses",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.xPosition,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.yPosition,n=this._classList;n["sb-menu-center"]="center"===t,n["sb-menu-before"]="before"===t,n["sb-menu-after"]="after"===t,n["sb-menu-above"]="above"===e,n["sb-menu-below"]="below"===e}},{key:"_startAnimation",value:function(){this._panelAnimationState="enter"}},{key:"_resetAnimation",value:function(){this._panelAnimationState="void"}},{key:"_onAnimationDone",value:function(t){this._animationDone.next(t),this._isAnimating=!1}},{key:"_onAnimationStart",value:function(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}},{key:"_updateDirectDescendants",value:function(){var t=this;this._allItems.changes.pipe(Object(l.a)(this._allItems)).subscribe((function(e){t._directDescendantItems.reset(e.filter((function(e){return e.parentMenu===t}))),t._directDescendantItems.notifyOnChanges()}))}},{key:"xPosition",get:function(){return this._xPosition},set:function(t){["center","before","after"].includes(t)||Object(g.a)(),this._xPosition=t,this.setPositionClasses()}},{key:"yPosition",get:function(){return this._yPosition},set:function(t){"above"!==t&&"below"!==t&&Object(g.b)(),this._yPosition=t,this.setPositionClasses()}},{key:"overlapTrigger",set:function(t){this._overlapTrigger=Object(r.c)(t)},get:function(){return this._overlapTrigger}},{key:"hasBackdrop",set:function(t){this._hasBackdrop=Object(r.c)(t)},get:function(){return this._hasBackdrop}},{key:"panelClass",set:function(t){var e=this,n=this._previousPanelClass;n&&n.length&&n.split(" ").forEach((function(t){e._classList[t]=!1})),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach((function(t){e._classList[t]=!0})),this._elementRef.nativeElement.className="")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(a.l),a.Ob(a.B),a.Ob(k))},t.\u0275cmp=a.Ib({type:t,selectors:[["sb-menu"]],contentQueries:function(t,e,n){var i;1&t&&(a.Hb(n,p.a,!0),a.Hb(n,m.a,!0)),2&t&&(a.zc(i=a.cc())&&(e.lazyContent=i.first),a.zc(i=a.cc())&&(e._allItems=i))},viewQuery:function(t,e){var n;1&t&&a.Wc(a.N,!0),2&t&&a.zc(n=a.cc())&&(e.templateRef=n.first)},inputs:{backdropClass:"backdropClass",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"]},outputs:{closed:"closed"},exportAs:["sbMenu"],features:[a.Bb([{provide:v.a,useExisting:t}])],ngContentSelectors:O,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"sb-menu",3,"id","ngClass","keydown","click"]],template:function(t,e){1&t&&(a.lc(),a.Oc(0,_,2,6,"ng-template"))},directives:[y.l],styles:[".sb-menu[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;padding:var(--spacing-s,5px);min-width:112px;color:var(--c,var(--text-colour,#fff));font-family:var(--typeface,Arial);background-color:var(--menu-bg,#000);border-radius:var(--bdrs,5px);border:1px solid var(--border-colour);box-shadow:0 4px 20px 0 rgba(0,0,0,.3)}.sb-menu[_ngcontent-%COMP%]:focus{outline:0}.sb-menu[_ngcontent-%COMP%]{--divider-size:calc(100% + var(--spacing-s) * 2);--divider-margin:var(--spacing-s) calc(var(--spacing-s) * -1);--divider-color:var(--border-colour)}"],data:{animation:[f.a]},changeDetection:0}),t}()},aeRQ:function(t,e,n){"use strict";n.d(e,"a",(function(){return N}));var i=n("ZTXN"),r=n("HM3f"),o=n("yBos"),a=n("xVbo"),s=n("Wg7D"),c=n("iT4G"),u=n("KQpv"),l=n.n(u),d=n("p5wL"),h=n("i67J"),f=n("TYVA"),p=n("nXdR"),g=n("sXtk"),v=n("uJYd"),y=n("GGXD"),_=n("+Px6"),O=n("ND+C"),k=n("1OAy"),T=n("h3eB"),S=n("lE9u"),E=n("vYTc"),x=n("H0/1"),P=n("wMit"),A=n("7KkP"),I=n("MUfl"),M=n("dWHr"),D=n("kZht"),R=n("zqNl"),j=n("aDqW"),L=l()("app:websocket"),N=function(){var t=function(){function t(e,n,o,c){var u=this;C(this,t),this.store=e,this.translateService=n,this.env=o,this.feature=c,this.liteTickers=new i.b,this.detailedTickers=new i.b,this.trades=new i.b,this.userWallets=new i.b,this.holdingWallets=new i.b,this.crypWallets=new i.b,this.flexWallet=new i.b,this.prices=new i.b,this.feeds=[],this.retryDelay=100,document.addEventListener("visibilitychange",(function(){document.hidden&&u.socket?(L("document hidden; closing all feeds except selected ticker"),u.socket.complete(),u.store.pipe(Object(h.n)(_.n)).subscribe((function(t){u.startSocket(),u.socket.next({event:"subscribe",feed:"ticker",product_ids:[t.symbol]})}))):u.restartSocket()})),this.prices.pipe(Object(h.c)(1e3,"base"),Object(a.a)((function(t){return t.size>0}))).subscribe((function(t){u.store.dispatch(Object(M.b)({prices:t}))})),this.liteTickers.pipe(Object(h.c)(1e3,"product_id"),Object(a.a)((function(t){return t.size>0}))).subscribe((function(t){u.store.dispatch(Object(O.b)({tickers:t}))})),this.trades.pipe(Object(h.d)(100),Object(a.a)((function(t){return t.length>0}))).subscribe((function(t){u.store.dispatch(Object(k.c)({trades:t}))})),this.detailedTickers.pipe(Object(h.c)(250,"product_id"),Object(a.a)((function(t){return t.size>0}))).subscribe((function(t){u.store.dispatch(Object(O.d)({tickers:t}))})),this.feature.isEnabled("flex")?Object(r.a)([this.holdingWallets,this.crypWallets,this.flexWallet]).pipe(Object(s.a)(1e3)).subscribe((function(t){var e=m(t,3),n=e[0],i=e[1],r=e[2],o=Object(p.k)(n),a=Object(p.i)(i),s=Object(p.j)(r);u.store.dispatch(Object(S.w)({margin:Object(d.c)([],"name"),futures:Object(d.c)(a,"name"),holding:Object(d.c)(o,"name"),flex:s}))})):this.userWallets.pipe(Object(s.a)(1e3)).subscribe((function(t){var e=t.filter((function(t){return t.name.startsWith("m-")})).map((function(t){return Object.assign(Object.assign({},t),{type:"margin",currency:Object(p.d)(t.name).toUpperCase(),pair:t.name.substring(2).replace(p.a,f.b)})})).map(p.l),n=t.filter((function(t){return t.name.startsWith("f-")})).map((function(t){return Object.assign(Object.assign({},t),{type:"futures",currency:Object(p.d)(t.name).toUpperCase(),pair:t.name.substring(2).replace(p.a,f.b)})})).map(p.l),i=t.filter((function(t){return!t.name.includes("-")})).map((function(t){return Object.assign(Object.assign({},t),{type:"holding",currency:t.name.toUpperCase()})})).map(p.l);u.store.dispatch(Object(S.w)({margin:Object(d.c)(e,"name"),futures:Object(d.c)(n,"name"),holding:Object(d.c)(i,"name")}))}))}return w(t,[{key:"openFeed",value:function(t){L("opening feed",t),this.socket||this.startSocket(),this.socket.next(Object.assign({event:"subscribe"},t)),this.feeds=[].concat(b(this.feeds),[t])}},{key:"closeFeed",value:function(t){L("closing feed",t),this.socket.next(Object.assign({event:"unsubscribe"},t)),this.feeds=this.feeds.filter((function(e){return e.feed!==t.feed}))}},{key:"closeAllFeeds",value:function(){var t=this;L("closing all feeds",b(this.feeds)),this.feeds.forEach((function(e){return t.socket.next(Object.assign({event:"unsubscribe"},e))}))}},{key:"restartSocket",value:function(){var t=this;this.socket&&this.socket.complete(),L("restarting socket",this.feeds),setTimeout((function(){t.startSocket(),t.feeds.forEach((function(e){return t.socket.next(Object.assign({event:"subscribe"},e))}))}),this.retryDelay)}},{key:"startSocket",value:function(){var t=this;L("starting socket"),this.socket=Object(o.a)(this.env.urls.websocket+"?general"),this.socket.next({event:"subscribe",feed:"heartbeat"}),this.socket.pipe(Object(c.a)(11e3)).subscribe((function(e){"event"in e?"error"===e.event&&t.handleError(e):t.handleResponse(e)}),(function(e){return t.handleError(e)}),(function(){return L("WS complete")}))}},{key:"handleResponse",value:function(t){if("prices_snapshot"===t.feed){var e=t.prices,n=Object(d.c)(e.map((function(t){return Object(E.b)(t)})),"base");this.store.dispatch(Object(M.b)({prices:n}))}if("prices"!==t.feed)if("ticker"!==t.feed)if("ticker_lite"!==t.feed)if("trade_snapshot"!==t.feed)if("trade"!==t.feed)if("account_balances_and_margins"!==t.feed){if("balances_snapshot"===t.feed||"balances"===t.feed){var i=t.holding,r=t.futures,o=t.flex_futures;i&&Object.keys(i).length>0&&this.holdingWallets.next(i),r&&Object.keys(r).length>0&&this.crypWallets.next(r),o&&Object.keys(o).length>0&&this.flexWallet.next(o)}if("open_positions"!==t.feed)if("open_orders_snapshot"!==t.feed)if("open_orders"!==t.feed)if("fills_snapshot"!==t.feed)if("fills"!==t.feed)if("account_log_snapshot"!==t.feed){if("account_log"===t.feed){var a=t.new_entry;return"cross-exchange transfer"===a.info&&a.new_balance>a.old_balance&&this.store.dispatch(Object(v.j)({message:"SNACKBAR.CROSS_EXCHANGE_TRANSFER_SUCCESS"})),void("cross-exchange transfer failed"===a.info&&this.store.dispatch(Object(v.j)({message:"SNACKBAR.CROSS_EXCHANGE_TRANSFER_FAILED",class:"warn"})))}if("deposits_withdrawals"!==t.feed)if("notifications"!==t.feed)if("notifications_auth"!==t.feed)this.retryDelay=100;else{var s=t.notifications;this.store.dispatch(Object(y.d)({notifications:s}))}else{var c=t.notifications;this.store.dispatch(Object(y.e)({notifications:c}))}else{var u=t.elements;this.store.dispatch(Object(k.o)({transfers:u}))}}else this.store.dispatch(Object(k.m)({logs:Object(x.c)(t.logs)}));else this.store.dispatch(Object(T.a)({fills:Object(A.h)(t.fills)}));else this.store.dispatch(Object(T.k)({fills:Object(A.h)(t.fills)}));else{var l=t.is_cancel,h=t.order_id,f=t.order,p=t.reason;if(l){var b=h||f.order_id;this.store.dispatch(Object(T.i)({orderId:b}))}else this.store.dispatch(Object(T.b)({order:Object(A.i)(f)})),"full_fill"===p?this.store.dispatch(Object(v.j)({message:"SNACKBAR.ORDER_EXECUTED_FULL"})):"partial_fill"===p&&this.store.dispatch(Object(v.j)({message:this.translateService.instant("SNACKBAR.ORDER_PARTIALLY_FILLED_VARS",{filled:f.filled,total:f.filled+f.qty,qty:f.qty})}))}else this.store.dispatch(Object(T.l)({orders:Object(A.j)(t.orders)}));else this.store.dispatch(Object(T.m)({positions:Object(A.k)(t.positions)}))}else{var g=t.margin_accounts;this.userWallets.next(g)}else this.trades.next(t);else{var m=t.trades;this.store.dispatch(Object(k.p)({trades:m}))}else{var _=t;this.liteTickers.next(Object(E.c)(_))}else{var O=t;this.detailedTickers.next(Object(E.c)(O))}else{var w=t;this.prices.next(Object(E.b)(w))}}},{key:"handleError",value:function(t){console.error("websocket error",t);try{"invalid product id"===(null==t?void 0:t.message)&&this.store.dispatch(Object(P.c)())}catch(t){console.error(t)}this.retryDelay=Object(h.b)(this.retryDelay),L("General WS Error; Restarting in ".concat(this.retryDelay,"ms"),t),this.restartSocket()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(D.Yb(R.b),D.Yb(j.e),D.Yb(g.a),D.Yb(I.a))},t.\u0275prov=D.Kb({token:t,factory:t.\u0275fac}),t}()},afE0:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("kZht"),r=n("NxuZ"),o=function(){var t=function t(){C(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["dialog-badge"]],inputs:{icon:"icon"},decls:1,vars:1,consts:[[3,"icon"]],template:function(t,e){1&t&&i.Pb(0,"fa-icon",0),2&t&&i.mc("icon",e.icon)},directives:[r.b],styles:["[_nghost-%COMP%]{display:block;text-align:center}fa-icon[_ngcontent-%COMP%]{display:inline-block;padding:var(--spacing);color:var(--accent-colour);font-size:34px;border:2px solid;border-radius:25%}"],changeDetection:0}),t}()},anA8:function(t,e,n){"use strict";n.d(e,"a",(function(){return Y}));var i=n("D57K"),r=n("kZht"),o=n("O30t"),a=n("LoUP"),s=n("EZWv"),c=n("gxtV"),u=n("jIqt"),l=n("UVqw"),d=n("IkSM"),h=n("B6Vo"),f=n("Cc4E"),p=n("zho4"),b=n("anSm"),g=n("1o0v"),m=n("yPvj"),v=n("rBBj"),y=n("chaP"),_=n("+I9z"),O=n("NxuZ"),k=n("aDqW"),T=n("An66"),S=n("rUBT"),E=n("rqGg"),x=n("DpwM");function P(t,e){1&t&&r.Pb(0,"tr",22)}function A(t,e){1&t&&r.Pb(0,"tr",23)}var I=function(){return[250,100]};function M(t,e){if(1&t&&(r.Ub(0,"th",24),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,I)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.DATE_TIME")," ")}}function D(t,e){if(1&t&&(r.Ub(0,"td",25),r.Ub(1,"span"),r.Qc(2),r.gc(3,"date"),r.Tb(),r.Ub(4,"span",26),r.Qc(5),r.gc(6,"date"),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(2),r.Rc(r.ic(3,2,n.time,"HH:mm:ss")),r.Cb(3),r.Rc(r.ic(6,5,n.time,"dd/MMM/yyyy"))}}function R(t,e){if(1&t&&(r.Ub(0,"th",27),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,I)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.MARKET")," ")}}function j(t,e){if(1&t&&(r.Ub(0,"td",28),r.Pb(1,"market-icon",29),r.gc(2,"base"),r.Qc(3),r.gc(4,"uppercase"),r.gc(5,"contractFamily"),r.gc(6,"pair"),r.gc(7,"translate"),r.gc(8,"maturityMonth"),r.Tb()),2&t){var n=e.$implicit;r.Cb(1),r.mc("base",r.hc(2,4,n.instrument)),r.Cb(2),r.Uc(" ",r.hc(4,6,r.hc(5,8,n.instrument))," ",r.hc(6,10,n.instrument)," ",r.hc(7,12,r.ic(8,14,n.instrument,"short"))," ")}}function L(t,e){if(1&t&&(r.Ub(0,"th",30),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,I)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.TYPE")," ")}}function N(t,e){if(1&t&&(r.Ub(0,"td",28),r.Qc(1),r.gc(2,"titlecase"),r.Tb()),2&t){var n=e.$implicit;r.Cb(1),r.Sc(" ",r.hc(2,1,n.fill_type)," ")}}function U(t,e){if(1&t&&(r.Ub(0,"th",31),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,I)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.SIDE")," ")}}function F(t,e){if(1&t&&(r.Ub(0,"td",32),r.Ub(1,"strong",33),r.Qc(2),r.gc(3,"translate"),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(1),r.mc("pnlBool",n.buy),r.Cb(1),r.Sc(" ",r.hc(3,2,n.buy?"SIDE.BUY":"SIDE.SELL")," ")}}function B(t,e){if(1&t&&(r.Ub(0,"th",34),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,I)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.SIZE")," ")}}function z(t,e){if(1&t&&(r.Ub(0,"td",35),r.Pb(1,"ghost-trail",36),r.Qc(2),r.Ub(3,"span",26),r.Qc(4),r.gc(5,"asset"),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(1),r.nc("content",n.displayQty),r.mc("showZeros",!1),r.Cb(1),r.Sc(" "," "," "),r.Cb(2),r.Rc(r.hc(5,4,n.tradingDisplayAsset))}}function V(t,e){if(1&t&&(r.Ub(0,"th",37),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,I)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.FILL_PRICE")," ")}}function H(t,e){if(1&t&&(r.Ub(0,"td",25),r.Ub(1,"span",38),r.Qc(2),r.gc(3,"sato"),r.Tb(),r.Ub(4,"span",26),r.Qc(5),r.gc(6,"quote"),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(2),r.Rc(r.ic(3,2,n.price,n)),r.Cb(3),r.Rc(r.hc(6,5,n.instrument))}}function q(t,e){1&t&&r.Pb(0,"th",39)}function $(t,e){if(1&t){var n=r.Vb();r.Ub(0,"td",28),r.Ub(1,"div",40),r.bc("click",(function(t){r.Ec(n);var i=e.$implicit;return r.fc().viewDetailed.emit(i),t.stopPropagation()})),r.Pb(2,"fa-icon",41),r.Ub(3,"p"),r.Qc(4),r.gc(5,"translate"),r.Tb(),r.Tb(),r.Tb()}2&t&&(r.Cb(4),r.Rc(r.hc(5,1,"BUTTON.DETAILS")))}var Q=function(){return{small:100,medium:400,large:800}},W=function(){return[10,20,50]},G=function(t,e){var n={symbol:t.instrument,fill_price:t.price,size:t.qty};return e in n?n[e]:t[e]},Y=function(){var t=function(){function t(){C(this,t),this.tableColumns=["time","symbol","type","side","size","fill_price","order_actions"],this.tableData=new o.k([]),this.viewDetailed=new r.o}return w(t,[{key:"ngOnInit",value:function(){this.tableData.sortingDataAccessor=G,this.tableData.paginator=this.tablePaginator}},{key:"ngAfterViewInit",value:function(){var t=this;this.tableSort.changes.pipe(Object(u.a)(this.tableSort),Object(c.b)(this)).subscribe((function(e){e.first&&(t.tableData.sort=e.first)}))}},{key:"trackByFillId",value:function(t,e){return e.fill_id}},{key:"fills",set:function(t){this.tableData.data=t.valueSeq().toArray()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Ib({type:t,selectors:[["filled-orders-desktop"]],viewQuery:function(t,e){var n;1&t&&(r.Jc(s.a,!0),r.Wc(a.a,!0)),2&t&&(r.zc(n=r.cc())&&(e.tablePaginator=n.first),r.zc(n=r.cc())&&(e.tableSort=n))},inputs:{fills:"fills",displayTooltips:"displayTooltips"},outputs:{viewDetailed:"viewDetailed"},decls:25,vars:10,consts:[["breakpoint","","mat-table","","matSort","",3,"breakpoints","dataSource","trackBy"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["matColumnDef","time"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.DATE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["class","block-cell","mat-cell","","body","",4,"matCellDef"],["matColumnDef","symbol"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.SYMBOL",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["mat-cell","","body","",4,"matCellDef"],["matColumnDef","type"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.TYPE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["matColumnDef","side"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.SIDE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["body","","mat-cell","",4,"matCellDef"],["matColumnDef","size"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.SIZE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["mat-cell","","body","","mono","",4,"matCellDef"],["matColumnDef","fill_price"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.FILL_PRICE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["matColumnDef","order_actions"],["body","","mat-header-cell","",4,"matHeaderCellDef"],[3,"pageSize","pageSizeOptions"],["mat-header-row",""],["mat-row",""],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.DATE",3,"sbDisabled","sbDelay"],["mat-cell","","body","",1,"block-cell"],["ghost",""],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.SYMBOL",3,"sbDisabled","sbDelay"],["mat-cell","","body",""],[3,"base"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.TYPE",3,"sbDisabled","sbDelay"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.SIDE",3,"sbDisabled","sbDelay"],["body","","mat-cell",""],[3,"pnlBool"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.SIZE",3,"sbDisabled","sbDelay"],["mat-cell","","body","","mono",""],[3,"content","showZeros"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.FILLED_ORDERS.FILL_PRICE",3,"sbDisabled","sbDelay"],["mono",""],["body","","mat-header-cell",""],["body","",1,"copy-button",3,"click"],["icon","file","size","lg"]],template:function(t,e){1&t&&(r.Ub(0,"table",0),r.Oc(1,P,1,0,"tr",1),r.Oc(2,A,1,0,"tr",2),r.Sb(3,3),r.Oc(4,M,3,6,"th",4),r.Oc(5,D,7,8,"td",5),r.Rb(),r.Sb(6,6),r.Oc(7,R,3,6,"th",7),r.Oc(8,j,9,17,"td",8),r.Rb(),r.Sb(9,9),r.Oc(10,L,3,6,"th",10),r.Oc(11,N,3,3,"td",8),r.Rb(),r.Sb(12,11),r.Oc(13,U,3,6,"th",12),r.Oc(14,F,4,4,"td",13),r.Rb(),r.Sb(15,14),r.Oc(16,B,3,6,"th",15),r.Oc(17,z,6,6,"td",16),r.Rb(),r.Sb(18,17),r.Oc(19,V,3,6,"th",18),r.Oc(20,H,7,7,"td",5),r.Rb(),r.Sb(21,19),r.Oc(22,q,1,0,"th",20),r.Oc(23,$,6,3,"td",8),r.Rb(),r.Tb(),r.Pb(24,"mat-paginator",21)),2&t&&(r.mc("breakpoints",r.qc(8,Q))("dataSource",e.tableData)("trackBy",e.trackByFillId),r.Cb(1),r.mc("matHeaderRowDef",e.tableColumns)("matHeaderRowDefSticky",!0),r.Cb(1),r.mc("matRowDefColumns",e.tableColumns),r.Cb(22),r.mc("pageSize",20)("pageSizeOptions",r.qc(9,W)))},directives:[o.j,l.a,a.a,o.g,o.i,o.c,o.e,o.b,s.a,o.f,o.h,o.d,a.b,d.a,h.a,f.a,p.a,o.a,b.a,g.a,m.a,v.a,y.a,_.a,O.b],pipes:[k.d,T.e,S.a,T.x,S.c,S.e,S.d,T.w,E.a,x.c,S.f],styles:["market-icon[_ngcontent-%COMP%]{font-size:20px}table[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%]{height:calc(var(--table-row-height) + var(--spacing))!important}table[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%]:last-of-type, table[_ngcontent-%COMP%] .mat-header-cell[_ngcontent-%COMP%]:last-of-type{text-align:right}.block-cell[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:block;line-height:1.25em}.actions-header[_ngcontent-%COMP%]{cursor:pointer}.actions-header[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.actions-header[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--warn-colour);margin-right:var(--spacing-s)}.actions-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--warn-colour);text-transform:capitalize!important}.cancel-button[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%]{cursor:pointer;display:inline-block}.cancel-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.cancel-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-left:var(--spacing-s)}.copy-button[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%]{margin-right:var(--spacing)}.copy-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--brand)}.cancel-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:var(--warn-colour)}.cancel-all-button[_ngcontent-%COMP%]{cursor:pointer}.cancel-all-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.cancel-all-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--warn-colour);margin-right:var(--spacing-s)}.cancel-all-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--warn-colour);text-transform:capitalize!important}table[breakpoint=medium][_ngcontent-%COMP%] .copy-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),t=Object(i.d)([Object(c.a)()],t)}()},anSm:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n}return w(t,[{key:"ngOnInit",value:function(){this.renderer.addClass(this.element.nativeElement,"global__text"),this.renderer.addClass(this.element.nativeElement,"global__text-body")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","body",""]]}),t}()},aygZ:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("kZht"),r=n("hCLc"),o=n("NxuZ"),a=["*"],s=function(){var t=function(){function t(){C(this,t),this.dismissed=null,this.dismissEvent=new i.o}return w(t,[{key:"dismiss",value:function(){this.dismissed=!0,this.dismissEvent.emit()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["popup-banner"]],hostVars:1,hostBindings:function(t,e){2&t&&i.Db("dismissed",e.dismissed)},outputs:{dismissEvent:"dismiss"},ngContentSelectors:a,decls:4,vars:0,consts:[["mat-button","","color","positive",3,"click"],["icon","close-large","size","2x"]],template:function(t,e){1&t&&(i.lc(),i.Ub(0,"section"),i.kc(1),i.Tb(),i.Ub(2,"button",0),i.bc("click",(function(){return e.dismiss()})),i.Pb(3,"fa-icon",1),i.Tb())},directives:[r.b,o.b],styles:["[_nghost-%COMP%]{position:fixed;bottom:0;width:100%;z-index:10;display:grid;grid-template-columns:1fr auto;padding:var(--spacing);color:var(--text-colour);text-align:center;background:rgba(var(--accent-colour-rgb),.8);box-shadow:0 0 10px rgba(0,0,0,.5)}@supports ((-webkit-backdrop-filter:blur(0)) or (backdrop-filter:blur(0))){[_nghost-%COMP%]{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:rgba(var(--accent-colour-rgb),.6)}}@media (max-width:1024px){[_nghost-%COMP%]{bottom:46px}}[dismissed][_nghost-%COMP%]{display:none}section[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}"],changeDetection:0}),t}()},bBQR:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n}return w(t,[{key:"ngOnInit",value:function(){this.renderer.addClass(this.element.nativeElement,"global__text"),this.renderer.addClass(this.element.nativeElement,"global__text-heading")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","heading",""]]}),t}()},bCr7:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"f",(function(){return s})),n.d(e,"e",(function(){return c})),n.d(e,"d",(function(){return u}));var i=function(){function t(e){C(this,t),this.components=e}return w(t,[{key:"withOpacity",value:function(t){return"rgba(".concat(this.rgbPartial,", ").concat(t,")")}},{key:"toString",value:function(){return"rgba(".concat(this.rgbaPartial,")")}},{key:"rgba",get:function(){return this.components}},{key:"rgbaPartial",get:function(){return this.components.join(", ")}},{key:"rgb",get:function(){return this.components.slice(0,3)}},{key:"rgbPartial",get:function(){return this.rgb.join(", ")}}],[{key:"fromRgba",value:function(e,n,i,r){return new t([e,n,i,r])}},{key:"fromRgb",value:function(e,n,i){return t.fromRgba(e,n,i,1)}},{key:"fromGrey",value:function(e){return t.fromRgb(e,e,e)}},{key:"fromHex",value:function(e){return t.fromRgb(e>>16&255,e>>8&255,255&e)}}]),t}();function r(t,e){return{width:t,height:e}}var o=n("lx5p");function a(t,e){return{x:t,y:e}}function s(t){var e=Object(o.H)(t);return function(t){var n=t.x,i=t.y;return a(e(n),e(i))}}function c(t){return function(e){return a(e.x+t.x,e.y+t.y)}}function u(t){var e=t.orientation,n=t.center;return function(t){var i=t.x,r=t.y;return"horizontal"===e?a(n.x+(n.x-i),r):a(i,n.y+(n.y-r))}}},bSqp:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VideoInputDevice=function(){function t(t,e,n){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=n||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}()},bT3u:function(t,e,n){var i=n("67SP"),r=n("r9nU");e.mul=function(t,e){var n=new i(t.length+e.length-1);n.fill(0);for(var o=0;o=0;){for(var o=n[0],a=0;a0&&void 0!==arguments[0]?arguments[0]:{};this.portal||(this.portal=new o.h(this.template,this.vcr)),this.detach(),this.outlet||(this.outlet=new o.e(this.document.createElement("div"),this.componentFactoryResolver,this.appRef,this.injector));var e=this.template.elementRef.nativeElement;e.parentNode.insertBefore(this.outlet.outletElement,e),this.cdr.markForCheck(),this.portal.attach(this.outlet,t),this.attached.next()}},{key:"detach",value:function(){this.portal.isAttached&&this.portal.detach()}},{key:"ngOnDestroy",value:function(){var t;null===(t=this.outlet)||void 0===t||t.dispose()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.N),i.Ob(i.j),i.Ob(i.g),i.Ob(i.t),i.Ob(i.R),i.Ob(i.h),i.Ob(r.d))},t.\u0275dir=i.Jb({type:t,selectors:[["ng-template","sbMenuContent",""]]}),t}()},bZCB:function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var i=n("zqNl"),r=n("+Px6"),o=n("qAYy"),a=n("sxqi"),s=n("xVbo"),c=n("Wg7D"),u=n("kZht"),l=n("An66"),d=n("3W1Y"),h=n("yPvj"),f=n("+e22"),p=n("rUBT");function b(t,e){if(1&t){var n=u.Vb();u.Ub(0,"div",4),u.bc("click",(function(){u.Ec(n);var t=e.$implicit;return u.fc(2).navTicker(t)})),u.Ub(1,"p",5),u.Pb(2,"market-icon",6),u.gc(3,"base"),u.Qc(4),u.Pb(5,"change",7),u.Tb(),u.Tb()}if(2&t){var i=e.$implicit;u.Cb(2),u.mc("base",u.hc(3,3,i.product_id)),u.Cb(2),u.Sc(" ",i.pair," "),u.Cb(1),u.mc("value",i.change)}}function g(t,e){if(1&t&&(u.Sb(0),u.Oc(1,b,6,5,"div",3),u.gc(2,"async"),u.Rb()),2&t){var n=u.fc();u.Cb(1),u.mc("ngForOf",u.hc(2,1,n.flexTickers$))}}function m(t,e){if(1&t){var n=u.Vb();u.Ub(0,"div",4),u.bc("click",(function(){u.Ec(n);var t=e.$implicit;return u.fc(2).navTicker(t)})),u.Ub(1,"p",5),u.Pb(2,"market-icon",6),u.gc(3,"base"),u.Qc(4),u.Pb(5,"change",7),u.Tb(),u.Tb()}if(2&t){var i=e.$implicit;u.Cb(2),u.mc("base",u.hc(3,3,i.product_id)),u.Cb(2),u.Sc(" ",i.pair," "),u.Cb(1),u.mc("value",i.change)}}function v(t,e){if(1&t&&(u.Oc(0,m,6,5,"div",3),u.gc(1,"async")),2&t){var n=u.fc();u.mc("ngForOf",u.hc(1,1,n.legacyTickers$))}}var y=function(){var t=function(){function t(e,n){C(this,t),this.store=e,this.market=n,this.isFlexMarket$=this.store.pipe(Object(i.m)(r.a)),this.legacyTickers$=this.store.pipe(Object(i.m)(o.j),Object(s.a)((function(t){return t.length>0})),Object(c.a)(6e4)),this.flexTickers$=this.store.pipe(Object(i.m)(o.f),Object(s.a)((function(t){return t.length>0})),Object(c.a)(6e4))}return w(t,[{key:"navTicker",value:function(t){this.market.navigateToMarket(t.product_id,!0)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Ob(i.b),u.Ob(a.a))},t.\u0275cmp=u.Ib({type:t,selectors:[["ticker-bar"]],decls:5,vars:4,consts:[[1,"ticker-bar"],[4,"ngIf","ngIfElse"],["legacyTickers",""],["class","ticker",3,"click",4,"ngFor","ngForOf"],[1,"ticker",3,"click"],["caption",""],[3,"base"],[3,"value"]],template:function(t,e){if(1&t&&(u.Ub(0,"section",0),u.Oc(1,g,3,3,"ng-container",1),u.gc(2,"async"),u.Tb(),u.Oc(3,v,2,3,"ng-template",null,2,u.Pc)),2&t){var n=u.Ac(4);u.Cb(1),u.mc("ngIf",u.hc(2,2,e.isFlexMarket$))("ngIfElse",n)}},directives:[l.n,l.m,d.a,h.a,f.a],pipes:[l.b,p.a],styles:[".ticker-bar[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;flex-wrap:wrap;overflow-y:hidden;background:var(--toolbar-colour);border:1px solid var(--border-colour);border-radius:var(--bdrs);padding-left:var(--spacing);height:20px}.ticker-bar[_ngcontent-%COMP%] .ticker[_ngcontent-%COMP%]{white-space:nowrap;display:inline-flex;box-sizing:border-box;cursor:pointer;padding:3px var(--spacing-l) 3px var(--spacing-l);border-radius:var(--bdrs)}.ticker-bar[_ngcontent-%COMP%] .ticker[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{vertical-align:middle}.ticker-bar[_ngcontent-%COMP%] .ticker[_ngcontent-%COMP%]:hover{background-color:var(--table-row-alt)}"],changeDetection:0}),t}()},bjK4:function(t,e,n){"use strict";n.d(e,"a",(function(){return g})),n.d(e,"n",(function(){return _})),n.d(e,"e",(function(){return k})),n.d(e,"h",(function(){return w})),n.d(e,"d",(function(){return T})),n.d(e,"c",(function(){return S})),n.d(e,"o",(function(){return x})),n.d(e,"p",(function(){return P})),n.d(e,"j",(function(){return I})),n.d(e,"l",(function(){return M})),n.d(e,"b",(function(){return D})),n.d(e,"i",(function(){return R})),n.d(e,"k",(function(){return j})),n.d(e,"g",(function(){return U})),n.d(e,"m",(function(){return F})),n.d(e,"q",(function(){return B})),n.d(e,"f",(function(){return z}));var i=n("zqNl"),r=n("og7C"),o=n("VmIW"),a=n("p5wL"),s=n("lx5p"),c=n("rTkt"),u=n("uJYd"),l=n("NloN"),d=n("ylpo"),h=n("QmxK"),f=n("5JSY"),p=[1,2,5,10,20,50,100,200,500,1e3,2e3,5e3],b=p.length-1,g={"trading-dashboard":8,wallets:5,workspaces:6,flex:5},v={pageTitle:"",navigation:{internal:[{name:"NAV.PLATFORM",route:"/futures",icon:"trade",alwaysDisplay:!1},{name:"NAV.WALLETS",route:"/wallets",icon:"wallet",alwaysDisplay:!1},{name:"NAV.LOGS",route:"/history",icon:"list",alwaysDisplay:!1},{name:"NAV.SETTINGS",route:"/settings",icon:"cog",alwaysDisplay:!0},{name:"NAV.VERIFICATION",route:"/verification",icon:"check",alwaysDisplay:!0},{name:"NAV.ASSIGNMENT",route:"/assignment",icon:"thunder",alwaysDisplay:!0},{name:"NAV.SUPPORT",route:"/support",icon:"support",alwaysDisplay:!1}],external:[{name:"NAV.EXTERNAL_INDICES",url:"https://www.cfbenchmarks.com/"},{name:"NAV.EXTERNAL_RESOURCES",supportCategory:360001977131},{name:"NAV.EXTERNAL_API",url:"https://support.kraken.com/hc/en-us/sections/360012894412-Futures-API"},{name:"NAV.EXTERNAL_TESTING",supportArticle:360024809011},{name:"NAV.EXTERNAL_HISTORY",supportArticle:360022835871},{name:"NAV.EXTERNAL_RISK",supportArticle:360022629052},{name:"NAV.EXTERNAL_BOT_PARTNERS",supportArticle:360041402071}]},loadingActions:Object(r.f)(),orderbook:{depth:1,grouping:Object(l.b)(d.k,1)},theme:"dark",alt:!1,systemHealth:{"trading-rest":Object(o.None)(),"trading-ws":Object(o.None)(),auth:Object(o.None)(),charts:Object(o.None)()},tour:{type:"trading-dashboard",inProgress:!1,step:1,total:g["trading-dashboard"]},layoutType:Object(l.b)(d.m,"draggable"),enableChartPointer:!0},y=Object(i.i)(v,Object(i.k)(u.y,(function(t,e){var n=e.title;return Object(a.b)(n,t,"pageTitle")})),Object(i.k)(u.b,(function(t,e){var n=e.action;return Object(a.b)(t.loadingActions.add(n),t,"loadingActions")})),Object(i.k)(u.o,(function(t,e){var n=e.action;return Object(a.b)(t.loadingActions.remove(n),t,"loadingActions")})),Object(i.k)(u.v,(function(t,e){var n=e.depth;return Object(a.b)(n,t,"orderbook","depth")})),Object(i.k)(u.w,(function(t,e){var n=e.direction,i=p.indexOf(t.orderbook.grouping);return"plus"===n&&i0?(Object(l.c)(d.k,p[i-1]),Object(a.b)(p[i-1],t,"orderbook","grouping")):t})),Object(i.k)(u.q,(function(t,e){var n=e.theme;return Object(a.b)(n,t,"theme")})),Object(i.k)(u.s,(function(t,e){var n=e.alt;return Object(a.b)(n,t,"alt")})),Object(i.k)(u.t,(function(t,e){var n=e.enable;return Object(a.b)(n,t,"enableChartPointer")})),Object(i.k)(u.z,(function(t,e){var n=e.health,i=Object.entries(n).map((function(t){var e=m(t,2),n=e[0],i=e[1];return[n,o.Maybe.fromNull(i)]}));return Object(a.a)(Object.fromEntries(i),t,"systemHealth")})),Object(i.k)(u.A,(function(t,e){var n=e.tour;return Object(a.b)({type:n,inProgress:!0,step:1,total:g[n]},t,"tour")})),Object(i.k)(u.d,(function(t,e){return Object(a.b)(Object.assign(Object.assign({},t.tour),{inProgress:!1,step:1}),t,"tour")})),Object(i.k)(u.f,(function(t,e){return Object(a.b)(t.tour.step+1,t,"tour","step")})),Object(i.k)(u.m,(function(t,e){return Object(a.b)(Math.max(t.tour.step-1,1),t,"tour","step")})),Object(i.k)(u.u,(function(t,e){var n=e.layout;return Object(l.c)(d.m,n),Object(a.b)(n,t,"layoutType")})));function _(t,e){return y(t,e)}var O=Object(i.h)("layout"),k=Object(i.j)(O,(function(t){return t.layoutType})),w=Object(i.j)(O,(function(t){return t.pageTitle})),C=Object(i.j)(O,(function(t){return t.navigation})),T=Object(i.j)(C,(function(t){return t.internal})),S=Object(i.j)(C,(function(t){return t.external})),E=Object(i.j)(O,(function(t){return t.orderbook})),x=Object(i.j)(E,(function(t){return t.depth})),P=Object(i.j)(E,(function(t){return t.grouping})),A=Object(i.j)(O,(function(t){return t.loadingActions})),I=Object(i.j)(O,(function(t){return t.theme})),M=Object(i.j)(O,(function(t){return t.alt})),D=Object(i.j)(O,(function(t){return t.enableChartPointer})),R=Object(i.j)(O,(function(t){return t.systemHealth})),j=Object(i.j)(O,(function(t){return t.tour})),L=Object(i.j)(R,(function(t){return Object(r.b)(t).filter((function(t,e){return h.b[e]})).toObject()})),N=Object(i.j)(R,(function(t){return Object(r.b)(t).filter((function(t,e){return!h.b[e]})).toObject()})),U=Object(i.j)(R,L,N,(function(t,e,n){return Object.values(t).some(s.q)?Object(o.None)():t["trading-rest"].contains("maintenance")?Object(o.Some)("maintenance"):Object(r.b)(e).some((function(t){return t.contains("offline")}))?Object(o.Some)("offline"):Object(r.b)(e).some((function(t){return t.contains("degraded")}))||Object(r.b)(n).some((function(t){return t.contains("offline")||t.contains("degraded")}))?Object(o.Some)("degraded"):Object(o.Some)("operational")})),F=Object(i.j)(A,(function(t,e){var n=Array.isArray(e.filter)?Object(r.f)(e.filter):r.f.of(e.filter);return!t.intersect(n).isEmpty()})),B=Object(i.j)(I,c.b),z=Object(i.j)(B,f.a,(function(t,e,n){var i="assets/images/".concat(e,"/logo"),r=[];return"dark"===t&&r.push("white"),n&&(n.badge&&r.push("badge"),n.demo&&r.push("demo")),i+(r.length>0?"_"+r.join("-"):"")+".svg"}))},"bo+2":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return s}));var i=n("kZht"),r=n("An66"),o=n("VbQ3"),a=function(){var t=function t(e){var n=this;C(this,t),this.ngFor=e,this.ngFor.ngForTrackBy=function(t,e){return n.field?e[n.field]:e}};return t.\u0275fac=function(e){return new(e||t)(i.Ob(r.m,1))},t.\u0275dir=i.Jb({type:t,selectors:[["","ngForTrackField",""]],inputs:{field:["ngForTrackField","field"]}}),t}(),s=function(){var t=function t(e){var n=this;C(this,t),this.cdkVirtualFor=e,this.cdkVirtualFor.cdkVirtualForTrackBy=function(t,e){return n.field?e[n.field]:e}};return t.\u0275fac=function(e){return new(e||t)(i.Ob(o.d,1))},t.\u0275dir=i.Jb({type:t,selectors:[["","cdkVirtualForTrackField",""]],inputs:{field:["cdkVirtualForTrackField","field"]}}),t}()},bv5E:function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var i=n("kZht"),r=n("3kIJ"),o=function(t){return t.MultiCollateral="MULTI_COLLATERAL",t.SingleCollateral="SINGLE_COLLATERAL",t}({}),a=n("EmXI"),s=n("IOEv"),c=n("An66"),u=n("hCLc"),l=n("pTnX"),d=n("aDqW");function h(t,e){if(1&t&&(i.Ub(0,"mat-option",5),i.Qc(1),i.Tb()),2&t){var n=e.$implicit,r=i.fc();i.mc("value",n),i.Cb(1),i.Sc(" ",r.getWalletLabel(n)," ")}}var p,b=((p=function(){function t(e){var n;C(this,t),this.formBuilder=e,this.form=this.buildForm(),this.walletLabels=(f(n={},o.MultiCollateral,"Multi-Collateral Wallet"),f(n,o.SingleCollateral,"Single Collateral Wallets"),n),this.changeTransferPreference$=new i.o}return w(t,[{key:"ngOnChanges",value:function(t){t.defaultTransferPreference&&t.defaultTransferPreference.currentValue&&(this.form=this.buildForm())}},{key:"buildForm",value:function(){return this.formBuilder.group({transferPreference:[this.defaultTransferPreference,r.x.required]})}},{key:"submitForm",value:function(){var t=this.form.value.transferPreference;this.changeTransferPreference$.emit(t)}},{key:"getWalletLabel",value:function(t){return this.walletLabels[t]}}]),t}()).\u0275fac=function(t){return new(t||p)(i.Ob(r.d))},p.\u0275cmp=i.Ib({type:p,selectors:[["inbound-transfer-dropdown"]],inputs:{availablePreferences:"availablePreferences",defaultTransferPreference:"defaultTransferPreference"},outputs:{changeTransferPreference$:"changeTransferPreference"},features:[i.Ab],decls:10,vars:9,consts:[[1,"form",3,"formGroup","ngSubmit"],["color","accent","appearance","fill"],["matNativeControl","","formControlName","transferPreference"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","",3,"disabled"],[3,"value"]],template:function(t,e){1&t&&(i.Ub(0,"form",0),i.bc("ngSubmit",(function(){return e.submitForm()})),i.Ub(1,"mat-form-field",1),i.Ub(2,"mat-label"),i.Qc(3),i.gc(4,"translate"),i.Tb(),i.Ub(5,"mat-select",2),i.Oc(6,h,2,2,"mat-option",3),i.Tb(),i.Tb(),i.Ub(7,"button",4),i.Qc(8),i.gc(9,"translate"),i.Tb(),i.Tb()),2&t&&(i.mc("formGroup",e.form),i.Cb(3),i.Rc(i.hc(4,5,"Wallet")),i.Cb(3),i.mc("ngForOf",e.availablePreferences),i.Cb(1),i.mc("disabled",e.form.invalid),i.Cb(1),i.Sc(" ",i.hc(9,7,"BUTTON.SAVE")," "))},directives:[r.z,r.p,r.h,a.c,a.f,s.a,r.o,r.g,c.m,u.b,l.n],pipes:[d.d],styles:[".form[_ngcontent-%COMP%]{padding-top:var(--spacing)}.form[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding-bottom:var(--spacing)}.form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.form[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),p)},bvVZ:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n("kZht"),r=n("An66"),o=["sbBadge",""];function a(t,e){if(1&t&&(i.Ub(0,"span",1),i.Qc(1),i.Tb()),2&t){var n=i.fc();i.Cb(1),i.Rc(n.content)}}var s=["*"],c=function(){var t=function(){function t(){C(this,t),this.show=!0,this._permClass=!0}return w(t,[{key:"content",get:function(){return this.rawContent.toString().trim()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["","sbBadge",""]],hostVars:2,hostBindings:function(t,e){2&t&&i.Gb("sb-badge",e._permClass)},inputs:{rawContent:["sbBadge","rawContent"],show:["sbBadgeShow","show"]},exportAs:["sbBadge"],attrs:o,ngContentSelectors:s,decls:2,vars:1,consts:[["class","sb-badge-content",4,"ngIf"],[1,"sb-badge-content"]],template:function(t,e){1&t&&(i.lc(),i.kc(0),i.Oc(1,a,2,1,"span",0)),2&t&&(i.Cb(1),i.mc("ngIf",e.show))},directives:[r.n],styles:[".sb-badge[_nghost-%COMP%]{position:relative}.sb-badge-content[_ngcontent-%COMP%]{--private__height:22px;--private__font-size:12px;--private__bg-color:var(--badge-bg,#3b9b4a);--private__text-color:var(--badge-text,#fff);--private__text-weight:var(--badge-weight,normal);height:var(--private-height);position:absolute;padding:.2em .4em;max-width:5ch;overflow:hidden;top:calc(var(--private__height) / 2 * -1);transform:translateX(calc(var(--private__height) / 5 * -1));font-size:var(--private__font-size);font-family:inherit;font-weight:var(--private__text-weight);line-height:var(--private__font-size);color:var(--private__text-color);white-space:nowrap;text-overflow:ellipsis;border-radius:calc(var(--private__height) / 2);background-color:var(--private__bg-color);pointer-events:none}"]}),t}()},bwdy:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i,r,o=n("FU6l"),a=n("X0qr"),s=n("IJgj"),c=function(){function t(t){return Error.call(this),this.message=t?"".concat(t.length," errors occurred during unsubscription:\n").concat(t.map((function(t,e){return"".concat(e+1,") ").concat(t.toString())})).join("\n ")):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}(),u=((r=function(){function t(e){C(this,t),this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return w(t,[{key:"unsubscribe",value:function(){var e;if(!this.closed){var n=this._parentOrParents,i=this._ctorUnsubscribe,r=this._unsubscribe,u=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(var d=0;d0)("ngIfElse",i)}}var E=function(t){return{pair:t}};function x(t,e){if(1&t&&(u.Ub(0,"p"),u.Qc(1),u.gc(2,"translate"),u.Tb()),2&t){var n=e.ngIf;u.Cb(1),u.Sc(" ",u.ic(2,1,"NO_CONTENT.PAIR_FILLS",u.rc(4,E,n))," ")}}function P(t,e){1&t&&(u.Ub(0,"p",12),u.Qc(1,"NO_CONTENT.FILLED_ORDERS"),u.Tb())}function A(t,e){if(1&t&&(u.Ub(0,"section",9),u.Pb(1,"fa-icon",10),u.Oc(2,x,3,6,"p",4),u.gc(3,"async"),u.Oc(4,P,2,0,"ng-template",null,11,u.Pc),u.Tb()),2&t){var n=u.Ac(5),i=u.fc(),r=null;u.Cb(2),u.mc("ngIf",null==(r=u.hc(3,2,i.filterPair$))?null:r.orUndefined())("ngIfElse",n)}}function I(t,e){1&t&&u.Pb(0,"kraken-loading")}var M=function(){var t=function(){function t(e){C(this,t),this.store=e,this.displayTooltips$=this.store.pipe(Object(i.m)(c.y)),this.fills$=this.store.pipe(Object(i.m)(o.d),Object(r.p)()),this.instruments$=this.store.pipe(Object(i.m)(s.f)),this.filterPair$=this.store.pipe(Object(i.m)(c.q))}return w(t,[{key:"viewDetailed",value:function(t){var e=this;this.instruments$.pipe(Object(r.h)()).subscribe((function(n){var i,r=null!==(i=n.get(t.instrument))&&void 0!==i?i:"expired";e.store.dispatch(Object(a.g)({name:"fill-details",inputs:{fill:t,market:r}}))}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Ob(i.b))},t.\u0275cmp=u.Ib({type:t,selectors:[["filled-orders"]],decls:6,vars:3,consts:[["class","table-wrapper","breakpoint","",3,"breakpoints",4,"ngLet"],["noEntries",""],["loader",""],["breakpoint","",1,"table-wrapper",3,"breakpoints"],[4,"ngIf","ngIfElse"],[3,"fills","displayTooltips","viewDetailed"],[3,"itemSize"],[3,"fill","viewDetailed",4,"cdkVirtualFor","cdkVirtualForOf"],[3,"fill","viewDetailed"],["body","","ghost","",1,"no-activity"],["icon","list","size","3x"],["unfiltered",""],["translate",""]],template:function(t,e){1&t&&(u.Oc(0,S,2,4,"div",0),u.gc(1,"async"),u.Oc(2,A,6,4,"ng-template",null,1,u.Pc),u.Oc(4,I,1,0,"ng-template",null,2,u.Pc)),2&t&&u.mc("ngLet",u.hc(1,1,e.fills$))},directives:[l.a,d.a,h.n,f.a,p.e,p.a,p.d,b.a,g.a,m.a,v.b,y.a,_.a],pipes:[h.b,y.d],styles:["market-icon[_ngcontent-%COMP%]{font-size:20px}[_nghost-%COMP%]{display:flex;flex-direction:column;padding:var(--spacing)}.table-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%]{height:100%}.no-activity[_ngcontent-%COMP%]{text-align:center;padding:var(--spacing-l)}cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{height:100%}@media (max-width:1024px){.table-wrapper[_ngcontent-%COMP%] filled-orders-desktop[_ngcontent-%COMP%]{display:none}.table-wrapper[_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{display:block!important}}.table-wrapper[breakpoint=large][_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%], .table-wrapper[breakpoint=medium][_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%], .table-wrapper[breakpoint=small][_ngcontent-%COMP%] filled-orders-desktop[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),t}()},c6U1:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){function t(t){for(var e=[],n=1;n2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof e?function(o){return o.pipe(s((function(n,o){return Object(r.a)(t(n,o)).pipe(Object(i.a)((function(t,i){return e(n,t,o,i)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new u(t,n))})}var u=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;C(this,t),this.project=e,this.concurrent=n}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new l(t,this.project,this.concurrent))}}]),t}(),l=function(t){a(n,t);var e=c(n);function n(t,i){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return C(this,n),(r=e.call(this,t)).project=i,r.concurrent=o,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return w(n,[{key:"_next",value:function(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(o.b)},cMxr:function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n("D57K"),r=n("kZht"),o=n("gxtV"),a=n("uJYd"),s=n("zqNl"),c=n("An66"),u=n("4g2U");function l(t,e){if(1&t){var n=r.Vb();r.Ub(0,"ngx-slider",3),r.bc("valueChange",(function(t){return r.Ec(n),r.fc().currentValue=t}))("userChange",(function(t){return r.Ec(n),r.fc().change(t)}))("userChangeStart",(function(){return r.Ec(n),r.fc().startSliding()}))("userChangeEnd",(function(){return r.Ec(n),r.fc().stopSliding()})),r.Tb()}if(2&t){var i=r.fc();r.mc("value",i.currentValue)("options",i.options)}}function d(t,e){if(1&t){var n=r.Vb();r.Ub(0,"ngx-slider",4),r.bc("valueChange",(function(t){return r.Ec(n),r.fc().currentValue=t}))("userChangeStart",(function(){return r.Ec(n),r.fc().startSliding()}))("userChangeEnd",(function(t){r.Ec(n);var e=r.fc();return e.change(t),e.stopSliding()})),r.Tb()}if(2&t){var i=r.fc();r.mc("value",i.currentValue)("options",i.options)}}var h=function(){var t=function(){function t(e){var n=this;C(this,t),this.store=e,this.isOverMax=!1,this.fastUpdateMode=!1,this.logSteps=!1,this.min=0,this.stepBetween=1,this.suffix="",this.decimals=0,this.showLegend=!1,this.stepChange=new r.o,this.isSliding=new r.o,this.legend=function(t){return"".concat(t).concat(n.suffix)},this.translate=function(t){return"".concat(n.isOverMax?">":"").concat(t.toFixed(n.decimals)).concat(n.suffix)}}return w(t,[{key:"ngOnInit",value:function(){this.currentValue=this.step,this.setOptions()}},{key:"ngOnChanges",value:function(t){var e;"adjustedStep"in t&&(this.isOverMax=this.adjustedStep>this.max,this.currentValue=this.adjustedStep),(null===(e=t.min)||void 0===e?void 0:e.currentValue)&&this.setOptions()}},{key:"setOptions",value:function(){var t;this.options=this.max?Object.assign(Object.assign(Object.assign({step:this.stepBetween,floor:this.min,ceil:this.max,showTicks:!1,ticksArray:null!==(t=this.ticks)&&void 0!==t?t:[1,.25*this.max,.5*this.max,.75*this.max,this.max],hidePointerLabels:!1,hideLimitLabels:!0,showSelectionBar:!0,animate:!1,translate:this.translate.bind(this)},this.showLegend&&{getLegend:this.legend.bind(this)}),this.logSteps&&{customValueToPosition:function(t,e,n){return((t=Math.cbrt(t))-(e=Math.cbrt(e)))/((n=Math.cbrt(n))-e)}}),this.logSteps&&{customPositionToValue:function(t,e,n){return e=Math.cbrt(e),n=Math.cbrt(n),Math.pow(t*(n-e)+e,3)}}):{step:this.stepBetween,floor:this.min,ceil:this.steps.length-1,showTicks:!0,hidePointerLabels:!1,hideLimitLabels:!0,showSelectionBar:!0,animate:!1,showTicksValues:!0,translate:this.getStepLegend.bind(this)}}},{key:"change",value:function(t){var e=t.value;this.stepChange.emit(e)}},{key:"startSliding",value:function(){this.isSliding.emit(!0),this.store.dispatch(Object(a.t)({enable:!1}))}},{key:"stopSliding",value:function(){this.isSliding.emit(!1),this.store.dispatch(Object(a.t)({enable:!0}))}},{key:"getStepLegend",value:function(t){return""+this.steps[t].legend}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(s.b))},t.\u0275cmp=r.Ib({type:t,selectors:[["slider"]],inputs:{fastUpdateMode:"fastUpdateMode",adjustedStep:"adjustedStep",logSteps:"logSteps",step:"step",max:"max",min:"min",stepBetween:"stepBetween",steps:"steps",ticks:"ticks",suffix:"suffix",decimals:"decimals",showLegend:"showLegend"},outputs:{stepChange:"stepChange",isSliding:"isSliding"},features:[r.Ab],decls:4,vars:2,consts:[[1,"slider"],[3,"value","options","valueChange","userChange","userChangeStart","userChangeEnd",4,"ngIf"],[3,"value","options","valueChange","userChangeStart","userChangeEnd",4,"ngIf"],[3,"value","options","valueChange","userChange","userChangeStart","userChangeEnd"],[3,"value","options","valueChange","userChangeStart","userChangeEnd"]],template:function(t,e){1&t&&(r.Sb(0),r.Ub(1,"div",0),r.Oc(2,l,1,2,"ngx-slider",1),r.Oc(3,d,1,2,"ngx-slider",2),r.Tb(),r.Rb()),2&t&&(r.Cb(2),r.mc("ngIf",e.fastUpdateMode),r.Cb(1),r.mc("ngIf",!e.fastUpdateMode))},directives:[c.n,u.b],styles:[".slider{margin-bottom:var(--spacing)} .slider .ngx-slider .ngx-slider-selection-bar .ngx-slider-selection, .slider .ngx-slider .ngx-slider-selection-bar .ngx-slider-tick{background:var(--brand)} .slider .ngx-slider .ngx-slider-bubble{color:var(--input-colour)!important;font-size:12px!important} .slider .ngx-slider .ngx-slider-full-bar .ngx-slider-bar{background:var(--form-input-colour)} .slider .ngx-slider .ngx-slider-pointer{background:var(--brand);outline:none;height:18px;width:18px;top:-8px} .slider .ngx-slider .ngx-slider-pointer:after{display:none} .slider .ngx-slider .ngx-slider-tick{cursor:not-allowed;color:var(--ghost-colour);background:var(--form-input-colour);margin-right:2px;margin-left:4px} .slider .ngx-slider .ngx-slider-tick.ngx-slider-selected{background:var(--brand);color:var(--input-colour)!important} .slider .ngx-slider .ngx-slider-tick-legend{color:var(--ghost-colour);font-size:11px;position:inherit!important;margin-top:var(--spacing-s)!important} .slider .ngx-slider .ngx-slider-tick-legend p{color:var(--input-colour)!important;font-weight:700} .slider .ngx-slider .ngx-slider-bar, .slider .ngx-slider .ngx-slider-selection{background:var(--brand)} .slider .ngx-slider .ngx-slider-active:after{background-color:var(--brand)!important}"],changeDetection:0}),t=Object(i.d)([Object(o.a)()],t)}()},cedy:function(t,e,n){"use strict";n.r(e),n.d(e,"PrivateKeyComponent",(function(){return m}));var i=n("3kIJ"),r=n("mcff"),o=n("uJYd"),a=n("kZht"),s=n("zqNl"),c=n("rfPA"),u=n("bBQR"),l=n("EmXI"),d=n("Tcl6"),h=n("hCLc"),f=n("YC1o"),p=n("NxuZ"),b=n("B6Vo"),g=n("aDqW"),m=function(){var t=function(){function t(e,n,i,r){C(this,t),this.inputs=e,this.dialogRef=n,this.store=i,this.formBuilder=r}return w(t,[{key:"ngOnInit",value:function(){this.form=this.buildForm}},{key:"copyKey",value:function(){this.store.dispatch(Object(o.j)({message:"SNACKBAR.PRIVATE_KEY_COPIED"}))}},{key:"closeDialog",value:function(){this.dialogRef.close()}},{key:"buildForm",get:function(){return this.formBuilder.group({publicKey:[this.inputs.publicKey,[i.x.required]],privateKey:[this.inputs.privateKey,[i.x.required]]})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(r.a),a.Ob(r.d),a.Ob(s.b),a.Ob(i.d))},t.\u0275cmp=a.Ib({type:t,selectors:[["private-key"]],decls:22,vars:18,consts:[["heading","DIALOG.PRIVATE_API_KEY.TITLE"],[1,"private-key__form","global__text","global__text-body",3,"formGroup"],[1,"global__text","global__text-subheading"],["color","accent","appearance","fill"],["formControlName","publicKey","matInput","","readonly","",3,"value"],["mat-button","","matSuffix","","mat-icon-button","",1,"private-key__key",3,"clipboard"],["icon","copy","size","2x","sbTooltip","TOOLTIP.COPY_TO_CLIPBOARD"],["formControlName","privateKey","matInput","","readonly","",3,"value"],["mat-button","","matSuffix","","mat-icon-button","",1,"private-key__key",3,"clipboard","clipboardSuccessMsg"],["mat-raised-button","",1,"global__text","global__text-body",3,"click"]],template:function(t,e){1&t&&(a.Ub(0,"pro-dialog",0),a.Ub(1,"form",1),a.Ub(2,"p",2),a.Qc(3),a.gc(4,"translate"),a.Tb(),a.Ub(5,"mat-form-field",3),a.Ub(6,"mat-label"),a.Qc(7),a.gc(8,"translate"),a.Tb(),a.Pb(9,"input",4),a.Ub(10,"button",5),a.Pb(11,"fa-icon",6),a.Tb(),a.Tb(),a.Ub(12,"mat-form-field",3),a.Ub(13,"mat-label"),a.Qc(14),a.gc(15,"translate"),a.Tb(),a.Pb(16,"input",7),a.Ub(17,"button",8),a.Pb(18,"fa-icon",6),a.Tb(),a.Tb(),a.Tb(),a.Ub(19,"button",9),a.bc("click",(function(){return e.closeDialog()})),a.Qc(20),a.gc(21,"translate"),a.Tb(),a.Tb()),2&t&&(a.Cb(1),a.mc("formGroup",e.form),a.Cb(2),a.Sc(" ",a.hc(4,10,"DIALOG.PRIVATE_API_KEY.CONTENT")," "),a.Cb(4),a.Rc(a.hc(8,12,"DIALOG.PRIVATE_API_KEY.KEYS.PUBLIC")),a.Cb(2),a.mc("value",e.inputs.publicKey),a.Cb(1),a.mc("clipboard",e.inputs.publicKey),a.Cb(4),a.Rc(a.hc(15,14,"DIALOG.PRIVATE_API_KEY.KEYS.PRIVATE")),a.Cb(2),a.mc("value",e.inputs.privateKey),a.Cb(1),a.mc("clipboard",e.inputs.privateKey)("clipboardSuccessMsg","SNACKBAR.PRIVATE_KEY_COPIED"),a.Cb(3),a.Sc(" ",a.hc(21,16,"BUTTON.CLOSE")," "))},directives:[c.a,u.a,i.z,i.p,i.h,l.c,l.f,i.c,d.b,i.o,i.g,h.b,l.h,f.a,p.b,b.a],pipes:[g.d],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.mat-form-field[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:var(--text-colour)!important}.private-key__form[_ngcontent-%COMP%]{margin-top:var(--spacing)!important}.private-key__form[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:100%}.private-key__form[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]:first-of-type{margin-bottom:var(--spacing)}.private-key__form[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{margin-top:var(--spacing);width:100%}"],changeDetection:0}),t}()},chaP:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n}return w(t,[{key:"ngOnInit",value:function(){this.renderer.addClass(this.element.nativeElement,"global__text--mono")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","mono",""]]}),t}()},cjU9:function(t,e,n){var i=n("JgBV"),r=n("yBEi");function o(t){this.mode=i.KANJI,this.data=t}o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}t.put(n=192*(n>>>8&255)+(255&n),13)}},t.exports=o},ckkg:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("IdLP"),r=n("dUuy"),o=n("czMQ");function a(t,e){return e?Object(o.a)(t,e):new i.a(Object(r.a)(t))}},cqWG:function(t,e,n){"use strict";n.d(e,"a",(function(){return Z}));var i=n("D57K"),r=n("3kIJ"),o=n("gxtV"),a=n("zqNl"),s=n("C05f"),c=n("47ST"),u=n("ROBh"),l=n("GoAz"),d=n("xVbo"),h=n("BwBJ"),f=n("4e/d"),p=n("TLy2"),b=n("NloN"),g=n("uJYd"),m=n("94ty"),v=n("sXtk"),y=n("bjK4"),_=n("r1OQ"),O=n("MUfl"),k=n("T5QL"),T=n("kZht"),S=n("aDqW"),E=n("Asjx"),x=n("anSm"),P=n("An66"),A=n("hCLc"),I=n("3W1Y"),M=n("EmXI"),D=n("Tcl6"),R=n("7J2L"),j=n("NxuZ"),L=n("TzY9");function N(t,e){1&t&&(T.Sb(0),T.Ub(1,"ul",9),T.Ub(2,"li"),T.Ub(3,"p",10),T.Qc(4,"Bitcoin futures trading with leverage"),T.Tb(),T.Tb(),T.Ub(5,"li"),T.Ub(6,"p",10),T.Qc(7,"Choose your own collateral"),T.Tb(),T.Tb(),T.Ub(8,"li"),T.Ub(9,"p",10),T.Qc(10,"Go long or short to suit your trading strategy"),T.Tb(),T.Tb(),T.Ub(11,"li"),T.Ub(12,"p",10),T.Qc(13,"Lowest fees in the market"),T.Tb(),T.Tb(),T.Tb(),T.Rb())}function U(t,e){1&t&&(T.Ub(0,"small",13),T.Qc(1),T.gc(2,"translate"),T.Tb()),2&t&&(T.Cb(1),T.Rc(T.hc(2,1,"FRAGMENT.OR")))}function F(t,e){if(1&t){var n=T.Vb();T.Sb(0),T.Ub(1,"button",11),T.bc("click",(function(){return T.Ec(n),T.fc(2).openKrakenLogin()})),T.Qc(2),T.gc(3,"translate"),T.Tb(),T.Oc(4,U,3,3,"small",12),T.Rb()}if(2&t){var i=T.fc(2);T.Cb(2),T.Sc(" ",T.hc(3,2,i.includeDirect?"DIALOG.SIGNIN.BUTTONS.SSO":"NAV.SIGN_IN")," "),T.Cb(2),T.mc("ngIf",i.includeDirect)}}function B(t,e){1&t&&(T.Ub(0,"mat-error"),T.Qc(1),T.gc(2,"translate"),T.Tb()),2&t&&(T.Cb(1),T.Sc(" ",T.hc(2,1,"FORM.EMAIL_ERROR")," "))}function z(t,e){if(1&t&&(T.Sb(0),T.Ub(1,"mat-form-field",14),T.Ub(2,"mat-label"),T.Qc(3),T.gc(4,"translate"),T.Tb(),T.Pb(5,"input",15),T.Oc(6,B,3,3,"mat-error",7),T.Tb(),T.Ub(7,"mat-form-field",14),T.Ub(8,"mat-label"),T.Qc(9),T.gc(10,"translate"),T.Tb(),T.Pb(11,"input",16),T.Tb(),T.Ub(12,"button",17),T.gc(13,"async"),T.Qc(14),T.gc(15,"translate"),T.Tb(),T.Rb()),2&t){var n=T.fc(2);T.Cb(3),T.Rc(T.hc(4,5,"FORM.EMAIL")),T.Cb(3),T.mc("ngIf",n.form.get("email").invalid),T.Cb(3),T.Rc(T.hc(10,7,"FORM.PASSWORD")),T.Cb(3),T.mc("disabled",n.form.invalid||T.hc(13,9,n.loading$)),T.Cb(2),T.Sc(" ",T.hc(15,11,"DIALOG.SIGNIN.BUTTONS.EMAIL")," ")}}function V(t,e){if(1&t&&(T.Sb(0),T.Oc(1,N,14,0,"ng-container",7),T.Oc(2,F,5,4,"ng-container",8),T.Oc(3,z,16,13,"ng-container",7),T.Rb()),2&t){var n=T.fc(),i=T.Ac(10);T.Cb(1),T.mc("ngIf",!n.includeDirect),T.Cb(1),T.mc("ngIf",!n.env.demo)("ngIfElse",i),T.Cb(1),T.mc("ngIf",n.includeDirect)}}function H(t,e){1&t&&(T.Ub(0,"div",20),T.Ub(1,"p",21),T.Qc(2,"DIALOG.SIGNIN.HWAUTH_VERIFY"),T.Tb(),T.Pb(3,"kraken-loading",22),T.Tb())}function q(t,e){if(1&t&&(T.Sb(0),T.Oc(1,H,4,0,"div",19),T.Rb()),2&t){var n=T.fc(2);T.Cb(1),T.mc("ngIf",n.mfaPriority.includes("fido2"))}}function $(t,e){if(1&t){var n=T.Vb();T.Sb(0),T.Ub(1,"div",23),T.Pb(2,"fa-icon",24),T.Ub(3,"div"),T.Ub(4,"p",21),T.Qc(5,"DIALOG.SIGNIN.HWAUTH_ERROR"),T.Tb(),T.Ub(6,"button",25),T.bc("click",(function(){return T.Ec(n),T.fc(2).resetFido()})),T.Qc(7),T.gc(8,"translate"),T.Tb(),T.Tb(),T.Tb(),T.Rb()}2&t&&(T.Cb(7),T.Sc(" ",T.hc(8,1,"BUTTON.TRY_AGAIN")," "))}function Q(t,e){1&t&&(T.Ub(0,"small",13),T.Qc(1),T.gc(2,"translate"),T.Tb()),2&t&&(T.Cb(1),T.Sc(" ",T.hc(2,1,"FRAGMENT.OR")," "))}function W(t,e){if(1&t&&(T.Ub(0,"div",26),T.Ub(1,"p",21),T.Qc(2,"DIALOG.SIGNIN.TOTP_VERIFY"),T.Tb(),T.Pb(3,"input-otp-entry",27),T.Tb()),2&t){var n=T.fc(2);T.Cb(3),T.mc("form",n.form)}}function G(t,e){if(1&t&&(T.Sb(0),T.Sb(1,3),T.gc(2,"async"),T.Oc(3,q,2,1,"ng-container",4),T.Oc(4,$,9,3,"ng-container",4),T.Rb(),T.Oc(5,Q,3,3,"small",12),T.Oc(6,W,4,1,"div",18),T.Rb()),2&t){var n=T.fc();T.Cb(1),T.mc("ngSwitch",T.hc(2,5,n.fidoState$)),T.Cb(2),T.mc("ngSwitchCase","waiting"),T.Cb(1),T.mc("ngSwitchCase","error"),T.Cb(1),T.mc("ngIf",n.mfaPriority.includes("fido2")&&n.mfaPriority.includes("totp")),T.Cb(1),T.mc("ngIf",n.mfaPriority.includes("totp"))}}function Y(t,e){if(1&t){var n=T.Vb();T.Ub(0,"div",28),T.Ub(1,"a",29),T.bc("click",(function(){return T.Ec(n),T.fc().closeDialog({name:"password-reset-request"})})),T.Qc(2),T.gc(3,"translate"),T.Tb(),T.Ub(4,"a",29),T.bc("click",(function(){return T.Ec(n),T.fc().signUp()})),T.Qc(5),T.gc(6,"translate"),T.Tb(),T.Tb()}2&t&&(T.Cb(2),T.Sc(" ",T.hc(3,2,"DIALOG.SIGNIN.PASSWORD_RESET_LINK")," "),T.Cb(3),T.Sc(" ",T.hc(6,4,"DIALOG.SIGNIN.SIGNUP_LINK")," "))}function K(t,e){1&t&&(T.Ub(0,"p",30),T.Qc(1),T.gc(2,"translate"),T.Tb()),2&t&&(T.Cb(1),T.Sc(" ",T.hc(2,1,"LABEL.PROD_INVALID_ON_DEMO")," "))}var Z=function(){var t=function(){function t(e,n,i,r,o,c,u,l){C(this,t),this.env=e,this.feature=n,this.store=i,this.fb=r,this.auth=o,this.fido2=c,this.translate=u,this.breakpointObserver=l,this.form=this.buildForm(),this.loading$=this.store.pipe(Object(a.m)(y.m,{filter:m.a})),this.mfaPriority=[],this.fidoState$=new s.a("waiting"),this.step$=new s.a("password"),this.logo$=this.store.pipe(Object(a.m)(y.f,{demo:this.env.demo})),this.includeDirect=!0}return w(t,[{key:"ngOnInit",value:function(){this.watchTotpInput()}},{key:"ngOnDestroy",value:function(){Object(b.e)("dialog")}},{key:"openKrakenLogin",value:function(){window.open(this.env.urls.externalSignIn,"_blank","noopener")}},{key:"watchTotpInput",value:function(){var t=this;this.form.get("otp").valueChanges.pipe(Object(d.a)((function(t){return 6===t.length})),Object(h.a)(100),Object(o.b)(this)).subscribe((function(){return t.submitForm()}))}},{key:"buildForm",value:function(){return this.fb.group({email:["",[r.x.required,r.x.email]],password:["",[r.x.required]],otp:[""],cred:[void 0]})}},{key:"submitForm",value:function(){this.signin(this.form.value)}},{key:"signin",value:function(t){var e=this;this.store.dispatch(Object(g.a)(m.a)),this.auth.signIn(Object.assign(Object.assign({},t),{otp:t.otp||void 0})).pipe(Object(f.a)((function(t){return Object(c.a)(t.error.error)})),Object(p.a)((function(n){return"token"in n?Object(u.a)(n):"mfaRequired"in n?(e.mfaPriority=n.mfaRequired,e.step$.next("mfa"),e.fidoState$.next("waiting"),"challenge"in n&&n.challenge?Object(l.a)(e.fido2.getAssertion(n.challenge)).pipe(Object(f.a)((function(t){return console.error("error in authenticator verify",t),e.fidoState$.next("error"),Object(c.a)("HWAUTH_VERIFY_FAIL")})),Object(p.a)((function(n){return e.auth.signIn(Object.assign(Object.assign({},t),{cred:n})).pipe(Object(f.a)((function(t){return Object(c.a)(t.error.error)})))}))):Object(u.a)(null)):Object(c.a)(0)})),Object(d.a)((function(t){return null!==t||(e.store.dispatch(Object(g.n)(m.a)),!1)}))).subscribe((function(t){e.store.dispatch(Object(g.n)(m.a)),e.store.dispatch(Object(m.D)()),e.store.dispatch(Object(g.c)()),e.store.dispatch(Object(g.j)({message:"SNACKBAR.SIGNIN_SUCCESS"}))}),(function(t){console.warn({errCode:t}),e.store.dispatch(Object(g.n)(m.a)),"invalid_mfa"===t&&(e.form.get("otp").setValue(""),e.form.get("cred").setValue(void 0));var n=e.translate.instant("ERROR.SIGNIN_ERR"),i=e.translate.instant("ERROR_CODE."+t.toUpperCase());e.store.dispatch(Object(g.j)({message:"".concat(n," - ").concat(i),class:"warn"}))}))}},{key:"resetFido",value:function(){this.form.get("otp").setValue(""),this.form.get("cred").setValue(void 0),this.submitForm(),this.fidoState$.next("waiting")}},{key:"signUp",value:function(){this.env.demo?this.store.dispatch(Object(g.g)({name:"sign-up-demo"})):window.open("https://www.kraken.com/sign-up","_blank","noopener")}},{key:"closeDialog",value:function(t){this.store.dispatch(Object(g.n)(m.a)),t&&this.store.dispatch(Object(g.g)(t))}},{key:"isMobile",get:function(){return this.breakpointObserver.isMatched("(max-width: 599px)")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(T.Ob(v.a),T.Ob(O.a),T.Ob(a.b),T.Ob(r.d),T.Ob(_.a),T.Ob(k.a),T.Ob(S.e),T.Ob(E.a))},t.\u0275cmp=T.Ib({type:t,selectors:[["sign-in-form"]],inputs:{includeDirect:"includeDirect"},decls:11,vars:10,consts:[["body","",3,"formGroup","ngSubmit"],[1,"unauth__logo"],["alt","Logo",3,"src"],[3,"ngSwitch"],[4,"ngSwitchCase"],["body","","class","reset vstack gap-s",4,"ngIf"],["demoWarning",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"marketing-list"],["body",""],["mat-raised-button","","type","button",3,"click"],["caption","",4,"ngIf"],["caption",""],["color","accent","appearance","fill"],["formControlName","email","required","","matInput","","type","email"],["formControlName","password","required","","matInput","","type","password"],["body","","mat-raised-button","",3,"disabled"],["class","totp-verify",4,"ngIf"],["class","hwauth-verify",4,"ngIf"],[1,"hwauth-verify"],["body","","translate",""],["color","accent"],[1,"hwauth-error"],["icon","circle-exclamationmark","size","lg"],["mat-raised-button","",1,"mat-small-button",3,"click"],[1,"totp-verify"],[3,"form"],["body","",1,"reset","vstack","gap-s"],[1,"global__text--link",3,"click"],["body","",1,"global__text--warn","demo-warning"]],template:function(t,e){1&t&&(T.Ub(0,"form",0),T.bc("ngSubmit",(function(){return e.submitForm()})),T.Ub(1,"div",1),T.Pb(2,"img",2),T.gc(3,"async"),T.Tb(),T.Sb(4,3),T.gc(5,"async"),T.Oc(6,V,4,4,"ng-container",4),T.Oc(7,G,7,7,"ng-container",4),T.Rb(),T.Oc(8,Y,7,6,"div",5),T.Tb(),T.Oc(9,K,3,3,"ng-template",null,6,T.Pc)),2&t&&(T.mc("formGroup",e.form),T.Cb(2),T.mc("src",T.hc(3,6,e.logo$),T.Gc),T.Cb(2),T.mc("ngSwitch",T.hc(5,8,e.step$)),T.Cb(2),T.mc("ngSwitchCase","password"),T.Cb(1),T.mc("ngSwitchCase","mfa"),T.Cb(1),T.mc("ngIf",e.includeDirect))},directives:[r.z,r.p,x.a,r.h,P.p,P.q,P.n,A.b,I.a,M.c,M.f,r.c,D.b,r.o,r.g,r.v,M.b,S.a,R.a,j.b,L.a],pipes:[P.b,S.d],styles:["[_nghost-%COMP%], form[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:center}form[_ngcontent-%COMP%] > small[_ngcontent-%COMP%]{margin:var(--spacing) 0}.hwauth-error[_ngcontent-%COMP%], .hwauth-verify[_ngcontent-%COMP%], .hwauth-verify[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.hwauth-error[_ngcontent-%COMP%]{display:grid;justify-content:center;align-items:center;gap:var(--spacing);grid-auto-flow:column}.hwauth-error[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--warn-colour);transform:scale(1.5)}.hwauth-error[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .totp-verify[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.demo-warning[_ngcontent-%COMP%]{max-width:45ch;margin:var(--spacing);line-height:1.3}.unauth[_ngcontent-%COMP%]{text-align:center;padding:var(--spacing)}.unauth__logo[_ngcontent-%COMP%]{border-bottom:2px solid var(--border-colour-dark);padding:var(--spacing-xl) 0}.unauth__logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:90%;max-width:250px}.marketing-list[_ngcontent-%COMP%], .reset[_ngcontent-%COMP%]{margin:var(--spacing-l) 0}"],changeDetection:0}),t=Object(i.d)([Object(o.a)()],t)}()},czMQ:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("IdLP"),r=n("bwdy");function o(t,e){return new i.a((function(n){var i=new r.a,o=0;return i.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||i.add(this.schedule())):n.complete()}))),i}))}},dUuy:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){return function(e){for(var n=0,i=t.length;n=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0},t.distance=function(t,e,n,i){var r=t-n,o=e-i;return Math.sqrt(r*r+o*o)},t.sum=function(t){for(var e=0,n=0,i=t.length;n!==i;n++)e+=t[n];return e},t}()},e7kw:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}));var i=n("sXtk"),r=n("kZht"),o=function(){var t=function(){function t(e){C(this,t),this.env=e}return w(t,[{key:"transform",value:function(t){var e=escape(t.toString());return"".concat(this.env.urls.support,"/hc/en-us/articles/").concat(e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(i.a))},t.\u0275pipe=r.Nb({name:"supportArticle",type:t,pure:!0}),t}(),a=function(){var t=function(){function t(e){C(this,t),this.env=e}return w(t,[{key:"transform",value:function(t){var e=escape(t.toString());return"".concat(this.env.urls.support,"/hc/en-us/categories/").concat(e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(i.a))},t.\u0275pipe=r.Nb({name:"supportCategory",type:t,pure:!0}),t}()},e9V9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("2rk/");e.default=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new i.default,t}()},eGwX:function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var i=n("D57K"),r=n("kZht"),o=n("3kIJ"),a=n("ZTXN"),s=n("C05f"),c=n("mWib"),u=n("kuMc"),l=n("wny4"),d=n.n(l),h=n("EmXI"),f=n("Tcl6"),p=n("hCLc"),b=n("NxuZ"),g=n("+Tmv"),m=n("An66"),v=n("aDqW");function y(t,e){1&t&&(r.Ub(0,"mat-error"),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t&&(r.Cb(1),r.Rc(r.hc(2,1,"FORM.NO_MATCH_ERROR")))}var _=function(t){var e=t.get("password"),n=t.get("confirmPassword");return e&&n?e.value===n.value?null:(n.setErrors({noMatch:!0}),{noMatch:!0}):null},O=function(){var t=function(){function t(e){C(this,t),this.formBuilder=e,this.destroy$=new a.b,this.inputVisibility={password:!1,confirmPassword:!1},this.passwordStrength$=new s.a(0),this.passwordUpdate$=new r.o}return w(t,[{key:"ngOnInit",value:function(){this.form=this.buildForm(),this.watchPasswordStrength()}},{key:"ngOnChanges",value:function(t){var e=this;t.resetToggle&&this.form&&(this.form.reset(),Object.keys(this.form.controls).forEach((function(t){return e.form.get(t).setErrors(null)})))}},{key:"watchPasswordStrength",value:function(){return Object(i.a)(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.a.load({});case 2:e=t.sent,this.form.get("password").valueChanges.pipe(Object(c.a)(100),Object(u.a)(this.destroy$)).subscribe((function(t){n.passwordStrength$.next(t?e(t).score:0)}));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"updatePassword",value:function(){this.passwordUpdate$.emit(this.form.valid?this.form.get("password").value:"")}},{key:"buildForm",value:function(){return this.formBuilder.group({password:["",[o.x.required]],confirmPassword:["",[o.x.required]]},{validator:_})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(o.d))},t.\u0275cmp=r.Ib({type:t,selectors:[["input-password-confirm"]],inputs:{resetToggle:"resetToggle"},outputs:{passwordUpdate$:"passwordUpdate"},features:[r.Ab],decls:18,vars:15,consts:[[1,"input-password-confirm__form","global__text","global__text-body",3,"formGroup"],["color","accent","appearance","fill"],["formControlName","password","required","","matInput","","autocomplete","new-password",3,"type","change","input"],["mat-button","","mat-icon-button","","matSuffix","","tabindex","-1","type","button",3,"click"],["size","2x",3,"icon"],[3,"strength"],["formControlName","confirmPassword","required","","matInput","","autocomplete","new-password",3,"type","change","input"],[4,"ngIf"]],template:function(t,e){1&t&&(r.Ub(0,"form",0),r.Ub(1,"mat-form-field",1),r.Ub(2,"mat-label"),r.Qc(3),r.gc(4,"translate"),r.Tb(),r.Ub(5,"input",2),r.bc("change",(function(){return e.updatePassword()}))("input",(function(){return e.updatePassword()})),r.Tb(),r.Ub(6,"button",3),r.bc("click",(function(){return e.inputVisibility.password=!e.inputVisibility.password})),r.Pb(7,"fa-icon",4),r.Tb(),r.Tb(),r.Pb(8,"strength-meter",5),r.gc(9,"async"),r.Ub(10,"mat-form-field",1),r.Ub(11,"mat-label"),r.Qc(12),r.gc(13,"translate"),r.Tb(),r.Ub(14,"input",6),r.bc("change",(function(){return e.updatePassword()}))("input",(function(){return e.updatePassword()})),r.Tb(),r.Ub(15,"button",3),r.bc("click",(function(){return e.inputVisibility.confirmPassword=!e.inputVisibility.confirmPassword})),r.Pb(16,"fa-icon",4),r.Tb(),r.Oc(17,y,3,3,"mat-error",7),r.Tb(),r.Tb()),2&t&&(r.mc("formGroup",e.form),r.Cb(3),r.Rc(r.hc(4,9,"FORM.PASSWORD")),r.Cb(2),r.mc("type",e.inputVisibility.password?"text":"password"),r.Cb(2),r.mc("icon",e.inputVisibility.password?"privacy-on":"privacy-off"),r.Cb(1),r.mc("strength",r.hc(9,11,e.passwordStrength$)),r.Cb(4),r.Rc(r.hc(13,13,"FORM.CONFIRM_PASSWORD")),r.Cb(2),r.mc("type",e.inputVisibility.confirmPassword?"text":"password"),r.Cb(2),r.mc("icon",e.inputVisibility.confirmPassword?"privacy-on":"privacy-off"),r.Cb(1),r.mc("ngIf",e.form.hasError("noMatch")))},directives:[o.z,o.p,o.h,h.c,h.f,o.c,f.b,o.o,o.g,o.v,p.b,h.h,b.b,g.a,m.n,h.b],pipes:[v.d,m.b],styles:[".input-password-confirm__form[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:100%}.input-password-confirm__form[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{margin-top:var(--spacing);width:100%}"],changeDetection:0}),t}()},eI8f:function(t,e,n){"use strict";n.r(e),n.d(e,"DemoCredentialsComponent",(function(){return T}));var i=n("3kIJ"),r=n("zqNl"),o=n("u7r1"),a=n("94ty"),s=n("bjK4"),c=n("kZht"),u=n("rfPA"),l=n("bBQR"),d=n("afE0"),h=n("anSm"),f=n("EmXI"),p=n("Tcl6"),b=n("hCLc"),g=n("YC1o"),m=n("NxuZ"),v=n("B6Vo"),y=n("UDV5"),_=n("i9Na"),O=n("An66"),k=n("aDqW"),T=function(){var t=function(){function t(e,n){C(this,t),this.store=e,this.fb=n,this.email=Object(o.a)(8)+"@futures-demo.com",this.password=Object(o.a)(20),this.form=this.buildForm(),this.loading$=this.store.pipe(Object(r.m)(s.m,{filter:a.C.type}))}return w(t,[{key:"buildForm",value:function(){return this.fb.group({email:[this.email,[i.x.required,i.x.email]],password:[this.password,[i.x.required]],termsConditions:[!1,[i.x.requiredTrue]],privacyPolicy:[!1,[i.x.requiredTrue]]})}},{key:"submitForm",value:function(){this.store.dispatch(Object(a.C)({email:this.form.get("email").value,password:this.form.get("password").value,accountType:"individual",marketing:!1,acknowledgement:!0}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Ob(r.b),c.Ob(i.d))},t.\u0275cmp=c.Ib({type:t,selectors:[["demo-credentials"]],decls:31,vars:25,consts:[["heading","DIALOG.DEMO_CREDENTIALS.TITLE",3,"loading"],[1,"dialog-content","vstack","hcenter","gap-l"],["icon","user-full"],["body",""],["body","",1,"vstack","hcenter",3,"formGroup","ngSubmit"],["color","accent","appearance","fill"],["matInput","","readonly","","formControlName","email"],["type","button","mat-button","","matSuffix","","mat-icon-button","",3,"clipboard"],["icon","copy","size","2x","sbTooltip","TOOLTIP.COPY_EMAIL"],["matInput","","readonly","","formControlName","password"],["icon","copy","size","2x","sbTooltip","TOOLTIP.COPY_PASSWORD"],["formControlName","termsConditions",1,"no-border"],[3,"data"],["formControlName","privacyPolicy",1,"no-border"],["body","","mat-raised-button","",1,"signup",3,"disabled"]],template:function(t,e){1&t&&(c.Ub(0,"pro-dialog",0),c.gc(1,"async"),c.Ub(2,"div",1),c.Pb(3,"dialog-badge",2),c.Ub(4,"p",3),c.Qc(5),c.gc(6,"translate"),c.Tb(),c.Ub(7,"form",4),c.bc("ngSubmit",(function(){return e.submitForm()})),c.Ub(8,"mat-form-field",5),c.Ub(9,"mat-label"),c.Qc(10),c.gc(11,"translate"),c.Tb(),c.Pb(12,"input",6),c.Ub(13,"button",7),c.Pb(14,"fa-icon",8),c.Tb(),c.Tb(),c.Ub(15,"mat-form-field",5),c.Ub(16,"mat-label"),c.Qc(17),c.gc(18,"translate"),c.Tb(),c.Pb(19,"input",9),c.Ub(20,"button",7),c.Pb(21,"fa-icon",10),c.Tb(),c.Tb(),c.Ub(22,"mat-checkbox",11),c.Pb(23,"markdown",12),c.gc(24,"translate"),c.Tb(),c.Ub(25,"mat-checkbox",13),c.Pb(26,"markdown",12),c.gc(27,"translate"),c.Tb(),c.Ub(28,"button",14),c.Qc(29),c.gc(30,"translate"),c.Tb(),c.Tb(),c.Tb(),c.Tb()),2&t&&(c.mc("loading",c.hc(1,11,e.loading$)),c.Cb(5),c.Rc(c.hc(6,13,"DIALOG.DEMO_CREDENTIALS.BODY")),c.Cb(2),c.mc("formGroup",e.form),c.Cb(3),c.Rc(c.hc(11,15,"DIALOG.DEMO_CREDENTIALS.EMAIL")),c.Cb(3),c.mc("clipboard",e.email),c.Cb(4),c.Rc(c.hc(18,17,"DIALOG.DEMO_CREDENTIALS.PASSWORD")),c.Cb(3),c.mc("clipboard",e.password),c.Cb(3),c.mc("data",c.hc(24,19,"DIALOG.DEMO_CREDENTIALS.TCS")),c.Cb(3),c.mc("data",c.hc(27,21,"DIALOG.DEMO_CREDENTIALS.PRIVACY")),c.Cb(2),c.mc("disabled",e.form.invalid),c.Cb(1),c.Sc(" ",c.hc(30,23,"BUTTON.COMPLETE_SIGNUP")," "))},directives:[u.a,l.a,d.a,h.a,i.z,i.p,i.h,f.c,f.f,p.b,i.c,i.o,i.g,b.b,f.h,g.a,m.b,v.a,y.a,_.a],pipes:[O.b,k.d],styles:[".dialog-content[_ngcontent-%COMP%]{text-align:center}markdown[_ngcontent-%COMP%] a{color:var(--link-colour)}.signup[_ngcontent-%COMP%]{margin-top:var(--spacing)}"],changeDetection:0}),t}()},eL2r:function(t,e,n){"use strict";n.r(e),n.d(e,"PositionAssignmentComponent",(function(){return P}));var i=n("3kIJ"),r=n("mcff"),o=n("1ONQ"),a=n("kZht"),s=n("zqNl"),c=n("rfPA"),u=n("bBQR"),l=n("An66"),d=n("UDV5"),h=n("EmXI"),f=n("Tcl6"),p=n("IOEv"),b=n("hCLc"),g=n("pTnX"),m=n("1etq"),v=n("scAs"),y=n("1o0v"),_=n("anSm"),O=n("aDqW"),k=n("fvDn");function T(t,e){if(1&t&&(a.Ub(0,"mat-option",14),a.Qc(1),a.gc(2,"cryptoAbbreviation"),a.Tb()),2&t){var n=e.$implicit;a.mc("value",n),a.Cb(1),a.Sc(" ",a.hc(2,2,n)," ")}}function S(t,e){if(1&t&&(a.Ub(0,"mat-form-field",7),a.Ub(1,"mat-label"),a.Qc(2),a.gc(3,"translate"),a.Tb(),a.Ub(4,"mat-select",13),a.Oc(5,T,3,4,"mat-option",11),a.Tb(),a.Tb()),2&t){var n=a.fc();a.Cb(2),a.Rc(a.hc(3,2,"FORM.CONTRACT_TYPE")),a.Cb(3),a.mc("ngForOf",n.inputs.contractTypes)}}function E(t,e){if(1&t&&(a.Ub(0,"section"),a.Ub(1,"p",15),a.Qc(2,"Contracts:"),a.Tb(),a.Ub(3,"p",16),a.Qc(4),a.Tb(),a.Tb()),2&t){var n=a.fc();a.Lc("margin-bottom","var(--spacing)"),a.Cb(4),a.Rc(n.prefLables)}}function x(t,e){if(1&t&&(a.Ub(0,"mat-option",14),a.Qc(1),a.Tb()),2&t){var n=e.$implicit;a.mc("value",n),a.Cb(1),a.Sc(" ",n," ")}}var P=function(){var t=function(){function t(e,n,i){C(this,t),this.inputs=e,this.store=n,this.formBuilder=i,this.timeframes=["All","Weekdays","Weekend"]}return w(t,[{key:"ngOnInit",value:function(){this.form=this.buildForm}},{key:"onSubmitForm",value:function(){var t,e=this;if("new"===this.inputs.action)this.store.dispatch(Object(o.b)(this.form.value));else if("update"===this.inputs.action&&this.inputs.prefs){var n=null===(t=this.inputs.prefs)||void 0===t?void 0:t.map((function(t){return Object.assign(Object.assign({},e.form.value),{contractType:"flex",contract:t.participant.contract})}));this.store.dispatch(Object(o.i)({participants:n}))}}},{key:"buildForm",get:function(){return this.formBuilder.group("new"===this.inputs.action&&this.inputs.contractTypes?{contractType:[this.inputs.contractTypes[0],[i.x.required]],maxSize:[0,[i.x.required]],maxPosition:[0,[i.x.required]],acceptLong:[!1,[i.x.required]],acceptShort:[!1,[i.x.required]],timeFrame:["Weekdays",[i.x.required]]}:{maxSize:[0,[i.x.required]],maxPosition:[0,[i.x.required]],acceptLong:[!1,[i.x.required]],acceptShort:[!1,[i.x.required]],timeFrame:["Weekdays",[i.x.required]]})}},{key:"prefLables",get:function(){var t;return null===(t=this.inputs.prefs)||void 0===t?void 0:t.map((function(t){return t.participant.contract})).join(", ")}},{key:"quoteLabel",get:function(){return"multi-collateral"===this.inputs.family?"(USD)":"(Contracts)"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(r.a),a.Ob(s.b),a.Ob(i.d))},t.\u0275cmp=a.Ib({type:t,selectors:[["position-assignment"]],decls:30,vars:26,consts:[[1,"position-assignment",3,"heading"],[1,"position-assignment__form","global__text","global__text-body",3,"formGroup","ngSubmit"],["color","accent","appearance","fill","class","global__text global__text-body",4,"ngIf"],[3,"marginBottom",4,"ngIf"],[1,"position-assignment__checkboxes"],["formControlName","acceptLong"],["formControlName","acceptShort"],["color","accent","appearance","fill",1,"global__text","global__text-body"],["formControlName","maxSize","required","","matInput","","type","number"],["formControlName","maxPosition","required","","matInput","","type","number"],["matNativeControl","","formControlName","timeFrame"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","",1,"global__text","global__text-body",3,"disabled"],["matNativeControl","","formControlName","contractType"],[3,"value"],["subheading","","bold","","ghost",""],["body",""]],template:function(t,e){1&t&&(a.Ub(0,"pro-dialog",0),a.Ub(1,"form",1),a.bc("ngSubmit",(function(){return e.onSubmitForm()})),a.Oc(2,S,6,4,"mat-form-field",2),a.Oc(3,E,5,3,"section",3),a.Ub(4,"section",4),a.Ub(5,"mat-checkbox",5),a.Qc(6),a.gc(7,"translate"),a.Tb(),a.Ub(8,"mat-checkbox",6),a.Qc(9),a.gc(10,"translate"),a.Tb(),a.Tb(),a.Ub(11,"mat-form-field",7),a.Ub(12,"mat-label"),a.Qc(13),a.gc(14,"translate"),a.Tb(),a.Pb(15,"input",8),a.Tb(),a.Ub(16,"mat-form-field",7),a.Ub(17,"mat-label"),a.Qc(18),a.gc(19,"translate"),a.Tb(),a.Pb(20,"input",9),a.Tb(),a.Ub(21,"mat-form-field",7),a.Ub(22,"mat-label"),a.Qc(23),a.gc(24,"translate"),a.Tb(),a.Ub(25,"mat-select",10),a.Oc(26,x,2,2,"mat-option",11),a.Tb(),a.Tb(),a.Ub(27,"button",12),a.Qc(28),a.gc(29,"translate"),a.Tb(),a.Tb(),a.Tb()),2&t&&(a.mc("heading","new"===e.inputs.action?"New Assignment Preferences":"Update Assignment Preferences"),a.Cb(1),a.mc("formGroup",e.form),a.Cb(1),a.mc("ngIf","new"===e.inputs.action),a.Cb(1),a.mc("ngIf","update"===e.inputs.action&&(null==e.inputs.prefs?null:e.inputs.prefs.length)),a.Cb(3),a.Sc(" ",a.hc(7,14,"FORM.ACCEPT_LONG")," "),a.Cb(3),a.Sc(" ",a.hc(10,16,"FORM.ACCEPT_SHORT")," "),a.Cb(4),a.Tc("",a.hc(14,18,"FORM.MAX_SIZE")," ",e.quoteLabel,""),a.Cb(5),a.Tc("",a.hc(19,20,"FORM.MAX_POSITION")," ",e.quoteLabel,""),a.Cb(5),a.Rc(a.hc(24,22,"FORM.TIMEFRAME")),a.Cb(3),a.mc("ngForOf",e.timeframes),a.Cb(1),a.mc("disabled",e.form.invalid),a.Cb(1),a.Sc(" ",a.hc(29,24,"BUTTON.SUBMIT")," "))},directives:[c.a,u.a,i.z,i.p,i.h,l.n,d.a,i.o,i.g,h.c,h.f,i.c,f.b,i.s,i.v,p.a,l.m,b.b,g.n,m.a,v.a,y.a,_.a],pipes:[O.d,k.a],styles:["form[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{margin-top:var(--spacing);width:100%}.position-assignment[_ngcontent-%COMP%]{width:400px}@media (max-width:599px){.position-assignment[_ngcontent-%COMP%]{width:100%}}.position-assignment__checkboxes[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}"],changeDetection:0}),t}()},"eMi/":function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"d",(function(){return c}));var i=n("zqNl"),r=Object(i.g)("Reset Affiliate State"),o=Object(i.g)("Get Affiliate Details"),a=Object(i.g)("Create Affiliate Details"),s=Object(i.g)("Set Affiliate Details",Object(i.l)()),c=Object(i.g)("Set Affiliate Code",Object(i.l)())},"eY+9":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},ebJJ:function(t,e,n){"use strict";n.d(e,"a",(function(){return Dt}));var i=n("D57K"),r=n("kZht"),o=n("3kIJ"),a=n("zqNl"),s=n("+Px6"),c=n("rxqU"),u=n("qAYy"),l=n("J/3c"),d=n("KyJX"),h=n("YyhG"),f=n("l5Az"),p=n("YtkY"),b=n("3mST"),g=n("w0kG"),v=n("xVbo"),y=n("TLy2"),_=n("jOdJ"),O=n("gxtV"),k=n("lx5p"),T=n("i67J"),S=n("HM3f"),E=n("C05f"),x=n("8lHc"),P=n("1u95"),A=n("h3eB"),I=n("uJYd"),M=n("VmIW"),D=n("KQpv"),R=n.n(D),j=n("NloN"),L=n("ylpo"),N=n("QdGC"),U=n("CW1w"),F=n("bjK4"),B=n("1VvW"),z=n("An66"),V=n("anSm"),H=n("TMzY"),q=n("EmXI"),$=n("B6Vo"),Q=n("Cc4E"),W=n("zho4"),G=n("Tcl6"),Y=n("aaFr"),K=n("ROO/"),Z=n("aDqW"),X=n("UDV5"),J=n("IkSM"),tt=n("bW1a"),et=n("hCLc"),nt=n("NxuZ"),it=n("tOKo"),rt=n("8spT"),ot=n("icqo"),at=n("za3o"),st=n("LbKT"),ct=n("FUqb"),ut=function(){return[500,100]};function lt(t,e){if(1&t){var n=r.Vb();r.Ub(0,"mat-form-field",32),r.Ub(1,"mat-label"),r.Qc(2),r.gc(3,"translate"),r.Tb(),r.Ub(4,"input",33),r.bc("input",(function(){return r.Ec(n),r.fc(3).setUSDAmount()})),r.Tb(),r.Ub(5,"span",9),r.Qc(6),r.Tb(),r.Tb()}if(2&t){var i=r.fc(2).ngIf,o=r.fc();r.mc("sbDisabled",!i.displayTooltips)("sbDelay",r.qc(7,ut)),r.Cb(2),r.Sc("",r.hc(3,5,"FORM.LIMIT_PRICE"),":"),r.Cb(2),r.mc("step",o.tickSize(i.selectedMarket)),r.Cb(2),r.Rc(i.quoteCurrency)}}function dt(t,e){if(1&t&&(r.Ub(0,"span",9),r.Qc(1),r.Tb()),2&t){var n=r.fc(3).ngIf;r.Cb(1),r.Sc(" ",n.quoteCurrency," ")}}function ht(t,e){if(1&t){var n=r.Vb();r.Ub(0,"mat-form-field",6),r.Ub(1,"mat-label"),r.Qc(2),r.gc(3,"translate"),r.Tb(),r.Ub(4,"input",34,8),r.bc("focus",(function(){return r.Ec(n),r.fc(3).onSizeFocus()}))("input",(function(){r.Ec(n);var t=r.fc(2).ngIf;return r.fc().setAmount(t.selectedMarket)})),r.Tb(),r.Oc(6,dt,2,1,"span",35),r.Tb()}if(2&t){var i=r.fc(2).ngIf;r.mc("sbDisabled",!i.displayTooltips)("sbDelay",r.qc(7,ut)),r.Cb(2),r.Sc("\u2248 ",r.hc(3,5,"Notional"),":"),r.Cb(2),r.mc("step",1),r.Cb(2),r.mc("ngIf",i.isFlexMarket)}}function ft(t,e){if(1&t){var n=r.Vb();r.Sb(0),r.Ub(1,"div",38),r.Ub(2,"button",39),r.bc("click",(function(){r.Ec(n);var t=r.fc(3).ngIf;return r.fc().setBalancePercentage(.25,t.selectedMarket,t.selectedMarketPosition)})),r.Qc(3," 25% "),r.Tb(),r.Ub(4,"button",39),r.bc("click",(function(){r.Ec(n);var t=r.fc(3).ngIf;return r.fc().setBalancePercentage(.5,t.selectedMarket,t.selectedMarketPosition)})),r.Qc(5," 50% "),r.Tb(),r.Ub(6,"button",39),r.bc("click",(function(){r.Ec(n);var t=r.fc(3).ngIf;return r.fc().setBalancePercentage(.75,t.selectedMarket,t.selectedMarketPosition)})),r.Qc(7," 75% "),r.Tb(),r.Ub(8,"button",39),r.bc("click",(function(){r.Ec(n);var t=r.fc(3).ngIf;return r.fc().setBalancePercentage(.98,t.selectedMarket,t.selectedMarketPosition)})),r.Qc(9," 100% "),r.Tb(),r.Tb(),r.Rb()}}function pt(t,e){if(1&t){var n=r.Vb();r.Ub(0,"button",40),r.bc("click",(function(){return r.Ec(n),r.fc(4).viewWallets()})),r.Pb(1,"fa-icon",41),r.Qc(2),r.gc(3,"translate"),r.Tb()}2&t&&(r.Lc("margin-bottom","var(--spacing)"),r.Cb(2),r.Sc(" ",r.hc(3,3,"Transfer Funds")," "))}function bt(t,e){if(1&t&&(r.Sb(0),r.Oc(1,ft,10,0,"ng-container",36),r.Oc(2,pt,4,5,"ng-template",null,37,r.Pc),r.Rb()),2&t){var n=r.Ac(3),i=r.fc(2).ngIf;r.Cb(1),r.mc("ngIf",null==i.wallet?null:i.wallet.am)("ngIfElse",n)}}var gt=function(){return[250,100]};function mt(t,e){if(1&t&&(r.Ub(0,"mat-checkbox",42),r.Ub(1,"span",43),r.Qc(2),r.gc(3,"translate"),r.Tb(),r.Tb()),2&t){var n=r.fc(2).ngIf;r.Cb(1),r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,gt)),r.Cb(1),r.Sc(" ",r.hc(3,3,"BUTTON.MAKER_ONLY")," ")}}function vt(t,e){1&t&&(r.Sb(0),r.Pb(1,"leverage-limiter"),r.Rb())}function yt(t,e){1&t&&(r.Ub(0,"section",44),r.Ub(1,"mat-radio-group",45),r.Ub(2,"mat-radio-button",46),r.Qc(3),r.gc(4,"translate"),r.Tb(),r.Ub(5,"mat-radio-button",47),r.Qc(6),r.gc(7,"translate"),r.Tb(),r.Tb(),r.Tb()),2&t&&(r.Cb(3),r.Sc(" ",r.hc(4,2,"BUTTON.IOC")," "),r.Cb(3),r.Sc(" ",r.hc(7,4,"BUTTON.GOOD_TILL_CANCEL")," "))}function _t(t,e){if(1&t&&(r.Ub(0,"div",48),r.Ub(1,"p",49),r.Qc(2),r.Pb(3,"fa-icon",50),r.Tb(),r.Tb()),2&t){r.fc();var n=r.Ac(15),i=r.fc(2);r.mc("sbMenuTriggerFor",n),r.Cb(2),r.Sc(" ",i.triggerSignal," ")}}function Ot(t,e){if(1&t&&(r.Ub(0,"mat-form-field",51),r.Ub(1,"mat-label"),r.Qc(2),r.gc(3,"translate"),r.Tb(),r.Pb(4,"input",52),r.Ub(5,"span",9),r.Qc(6),r.Tb(),r.Tb()),2&t){var n=r.fc(2).ngIf;r.Cb(2),r.Sc("",r.hc(3,2,"SL Price"),":"),r.Cb(4),r.Rc(n.quoteCurrency)}}function kt(t,e){if(1&t&&(r.Ub(0,"mat-form-field",51),r.Ub(1,"mat-label"),r.Qc(2),r.gc(3,"translate"),r.Tb(),r.Pb(4,"input",53),r.Ub(5,"span",9),r.Qc(6),r.Tb(),r.Tb()),2&t){var n=r.fc(2).ngIf;r.Cb(2),r.Sc("",r.hc(3,2,"TP Price"),":"),r.Cb(4),r.Rc(n.quoteCurrency)}}function wt(t,e){if(1&t&&(r.Ub(0,"p",56),r.Ub(1,"span"),r.Qc(2," Stop PnL: "),r.Tb(),r.Ub(3,"span",57),r.Qc(4),r.gc(5,"change"),r.gc(6,"number"),r.Tb(),r.Tb()),2&t){var n=r.fc(3).ngIf,i=r.fc();r.Cb(3),r.mc("pnl",i.stopLoss.some()),r.Cb(1),r.Tc(" ",r.hc(5,3,r.ic(6,5,i.stopLoss.some(),"1.2-2"))," ",n.quoteCurrency," ")}}function Ct(t,e){if(1&t&&(r.Ub(0,"p",56),r.Ub(1,"span"),r.Qc(2," Exit PnL: "),r.Tb(),r.Ub(3,"span",57),r.Qc(4),r.gc(5,"change"),r.gc(6,"number"),r.Tb(),r.Tb()),2&t){var n=r.fc(3).ngIf,i=r.fc();r.Cb(3),r.mc("pnl",i.exitProfit.some()),r.Cb(1),r.Tc(" ",r.hc(5,3,r.ic(6,5,i.exitProfit.some(),"1.2-2"))," ",n.quoteCurrency," ")}}function Tt(t,e){if(1&t&&(r.Ub(0,"section",54),r.Oc(1,wt,7,8,"p",55),r.Oc(2,Ct,7,8,"p",55),r.Tb()),2&t){var n=r.fc(3);r.Cb(1),r.mc("ngIf",n.stopLoss.isSome()&&n.slEnabled),r.Cb(1),r.mc("ngIf",n.exitProfit.isSome()&&n.tpEnabled)}}function St(t,e){1&t&&(r.Ub(0,"section",58),r.Pb(1,"fa-icon",59),r.Ub(2,"p",56),r.Qc(3,"This market is currently in post-only mode."),r.Tb(),r.Tb())}var Et=function(){return{horizontal:675,vertical:600}},xt=function(t){return{side:t}};function Pt(t,e){if(1&t){var n=r.Vb();r.Ub(0,"form",2),r.Ub(1,"section",3),r.Oc(2,lt,7,8,"mat-form-field",4),r.Ub(3,"section",5),r.Ub(4,"mat-form-field",6),r.Ub(5,"mat-label"),r.Qc(6),r.gc(7,"translate"),r.Tb(),r.Ub(8,"input",7,8),r.bc("focus",(function(){return r.Ec(n),r.fc(2).onSizeFocus()}))("input",(function(){return r.Ec(n),r.fc(2).setUSDAmount()})),r.Tb(),r.Ub(10,"span",9),r.Qc(11),r.Tb(),r.Tb(),r.Oc(12,ht,7,8,"mat-form-field",10),r.Tb(),r.Oc(13,bt,4,2,"ng-container",0),r.Ub(14,"sb-menu",null,11),r.Ub(16,"button",12),r.bc("click",(function(){return r.Ec(n),r.fc(2).setTriggerSignal("mark")})),r.Ub(17,"span",13),r.Qc(18,"BUTTON.MARK"),r.Tb(),r.Tb(),r.Ub(19,"button",12),r.bc("click",(function(){return r.Ec(n),r.fc(2).setTriggerSignal("last")})),r.Ub(20,"span",13),r.Qc(21,"BUTTON.LAST"),r.Tb(),r.Tb(),r.Ub(22,"button",12),r.bc("click",(function(){return r.Ec(n),r.fc(2).setTriggerSignal("spot")})),r.Ub(23,"span",13),r.Qc(24,"BUTTON.INDEX"),r.Tb(),r.Tb(),r.Tb(),r.Ub(25,"section",14),r.Ub(26,"section",15),r.Oc(27,mt,4,6,"mat-checkbox",16),r.Ub(28,"mat-checkbox",17),r.Ub(29,"span",18),r.Qc(30),r.gc(31,"translate"),r.Tb(),r.Tb(),r.Tb(),r.Oc(32,vt,2,0,"ng-container",0),r.Oc(33,yt,8,6,"section",19),r.Ub(34,"section",20),r.Ub(35,"div",21),r.Ub(36,"mat-checkbox",22),r.Qc(37),r.gc(38,"translate"),r.Tb(),r.Ub(39,"mat-checkbox",23),r.Qc(40),r.gc(41,"translate"),r.Tb(),r.Tb(),r.Oc(42,_t,4,2,"div",24),r.Tb(),r.Ub(43,"section",5),r.Oc(44,Ot,7,4,"mat-form-field",25),r.Oc(45,kt,7,4,"mat-form-field",25),r.Tb(),r.Oc(46,Tt,3,2,"section",26),r.Tb(),r.Tb(),r.Pb(47,"order-form-details",27),r.Ub(48,"section",28),r.Oc(49,St,4,0,"section",29),r.Ub(50,"section",30),r.Ub(51,"button",31),r.bc("click",(function(){r.Ec(n);var t=r.fc().ngIf;return r.fc().submitOrder(t.selectedMarket,t.initialMargin,t.wallet)})),r.Qc(52),r.gc(53,"titlecase"),r.gc(54,"translate"),r.Tb(),r.Tb(),r.Tb(),r.Tb()}if(2&t){var i=r.fc().ngIf,o=r.fc();r.mc("formGroup",o.form)("breakpoints",r.qc(46,Et)),r.Cb(2),r.mc("ngIf","limit"===o.basicOrderType),r.Cb(2),r.mc("sbDisabled",!i.displayTooltips)("sbDelay",r.qc(47,ut)),r.Cb(2),r.Sc("",r.hc(7,33,"FORM.QUANTITY"),":"),r.Cb(2),r.mc("step",o.stepSize(i.selectedMarket)),r.Cb(3),r.Sc(" ",i.sizeUnit," "),r.Cb(1),r.mc("ngIf",i.isFlexMarket),r.Cb(1),r.mc("ngIf",i.isFlexMarket),r.Cb(14),r.mc("ngIf","limit"===o.basicOrderType),r.Cb(2),r.mc("sbDisabled",!i.displayTooltips)("sbDelay",r.qc(48,gt)),r.Cb(1),r.Sc(" ",r.hc(31,35,"BUTTON.REDUCE_ONLY")," "),r.Cb(2),r.mc("ngIf",!i.isFlexMarket),r.Cb(1),r.mc("ngIf","limit"===o.basicOrderType),r.Cb(4),r.Sc(" ",r.hc(38,37,"LABEL.STOP_LOSS")," "),r.Cb(3),r.Sc(" ",r.hc(41,39,"LABEL.TAKE_PROFIT")," "),r.Cb(2),r.mc("ngIf",o.slEnabled||o.tpEnabled),r.Cb(2),r.mc("ngIf",o.slEnabled),r.Cb(1),r.mc("ngIf",o.tpEnabled),r.Cb(1),r.mc("ngIf",i.isFlexMarket),r.Cb(1),r.mc("side",o.side)("selectedMarket",i.selectedMarket)("selectedTicker",i.selectedTicker)("initialMargin",o.hasPriceAndSize?i.initialMargin:0)("wallet",i.wallet)("isTrigger",!1)("form",o.form)("imOverBalance",i.imOverBalance),r.Cb(2),r.mc("ngIf",i.selectedMarket.postOnly),r.Cb(2),r.mc("disabled",o.form.invalid||0===i.wallet.am||i.loading||i.imOverBalance),r.Cb(1),r.Sc(" ",r.hc(53,41,r.ic(54,43,"LABEL.PLACE_ORDER",r.rc(49,xt,o.side)))," ")}}function At(t,e){if(1&t&&(r.Sb(0),r.Oc(1,Pt,55,51,"form",1),r.Rb()),2&t){var n=r.fc();r.Cb(1),r.mc("ngIf",n.form)}}var It=function(t,e,n,i,r,o,a,s,c,u,l,d,h,f,p,b){return{selectedMarket:t,selectedTicker:e,displayTooltips:n,baseCurrency:i,quoteCurrency:r,wallet:o,initialMargin:a,isFlexMarket:s,userData:c,sizeFormatter:u,maxOrderSize:l,position:d,loading:h,imOverBalance:f,sizeUnit:p,selectedMarketPosition:b}},Mt=R()("trace:app:basic-order-form"),Dt=function(){var t=function(){function t(e,n,i,o,f){var b=this;C(this,t),this.formBuilder=e,this.store=n,this.trade=i,this.el=o,this.router=f,this.selectedMarket$=this.store.pipe(Object(a.m)(s.n)),this.selectedTicker$=this.store.pipe(Object(a.m)(u.p)),this.displayTooltips$=this.store.pipe(Object(a.m)(c.y)),this.baseCurrency$=this.store.pipe(Object(a.m)(s.s)),this.quoteCurrency$=this.store.pipe(Object(a.m)(s.u)),this.userSelectedFuturesWallet$=this.store.pipe(Object(a.m)(l.n)),this.initialMargin$=this.store.pipe(Object(a.m)(d.d)),this.userSignedIn$=this.store.pipe(Object(a.m)(c.m)),this.isFlexMarket$=this.store.pipe(Object(a.m)(s.a)),this.userData$=this.store.pipe(Object(a.m)(c.a)),this.sizeFormatter$=this.store.pipe(Object(a.m)(h.m)),this.selectedMarketPosition$=this.store.pipe(Object(a.m)(h.g)),this.loading$=this.store.pipe(Object(a.m)(F.m,{filter:[A.o.type,A.n.type]})),this.imOverBalance$=Object(S.a)([this.initialMargin$,this.userSelectedFuturesWallet$]).pipe(Object(p.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return i&&n[b.side]>i.am&&n[b.side]>0}))),this.isSliding=!1,this.maxOrderSize$=new E.a(null),this.sizeUnit$=this.store.pipe(Object(a.m)(h.n)),this.refreshOptions=new r.o,this.blurFieldEsc=function(t){return Object(N.a)(t)}}return w(t,[{key:"ngOnInit",value:function(){var t=this;this.buildForm(),this.getInitialMargin(),this.getMaxOrderSize(),this.selectedMarket$.pipe(Object(b.a)(1),Object(O.b)(this)).subscribe((function(e){var n,i,r,o;null===(n=t.form.get("size"))||void 0===n||n.setValue(0),null===(i=t.form.get("usdSize"))||void 0===i||i.setValue(0),null===(r=t.form.get("slEnabled"))||void 0===r||r.setValue(!1),null===(o=t.form.get("tpEnabled"))||void 0===o||o.setValue(!1)})),this.trade.orderFormPriceUpdated$.pipe(Object(g.a)(this.selectedMarket$),Object(v.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return!!n&&!!i})),Object(O.b)(this)).subscribe((function(e){var n,i=m(e,2),r=i[0],o=i[1],a=Object(k.I)(o.tickSize)(r);null===(n=t.form.get("limitPrice"))||void 0===n||n.setValue(a)})),this.trade.orderFormQuantityUpdated$.pipe(Object(T.g)(),Object(O.b)(this)).subscribe((function(e){var n;null===(n=t.form.get("size"))||void 0===n||n.setValue(e),t.setUSDAmount()})),this.selectedMarketPosition$.pipe(Object(O.b)(this)).subscribe((function(e){var n;e||null===(n=t.form.get("reduceOnly"))||void 0===n||n.setValue(!1)}))}},{key:"ngOnChanges",value:function(t){var e,n,i,r,o,a,s=this;if(null===(e=t.basicOrderType)||void 0===e?void 0:e.currentValue){var c=null===(i=null===(n=this.form)||void 0===n?void 0:n.get("size"))||void 0===i?void 0:i.value;this.buildForm(c),setTimeout((function(){s.setUSDAmount()}),1500)}(null===(r=t.side)||void 0===r?void 0:r.currentValue)&&(null===(o=this.form.get("slPrice"))||void 0===o||o.updateValueAndValidity(),null===(a=this.form.get("tpPrice"))||void 0===a||a.updateValueAndValidity())}},{key:"ngAfterViewInit",value:function(){this.setupLocalKeybinds()}},{key:"ngOnDestroy",value:function(){var t;this.clearInitialMargin(),null===(t=this.locallyFocussedKeybinds)||void 0===t||t.reset(),this.locallyFocussedKeybinds=void 0}},{key:"stopPriceValidatorFn",value:function(){var t=this;return function(e){return t.selectedTicker$.pipe(Object(T.h)(),Object(p.a)((function(n){var i,r="buy"===t.side?null==n?void 0:n.bid:null==n?void 0:n.ask,o="limit"===t.basicOrderType?null===(i=t.form.get("limitPrice"))||void 0===i?void 0:i.value:r;return"buy"===t.side?e.valueo&&e.value>=r?null:{stopInvalidWithEntry:!0}})))}}},{key:"exitPriceValidatorFn",value:function(){var t=this;return function(e){return t.selectedTicker$.pipe(Object(T.h)(),Object(p.a)((function(n){var i,r="buy"===t.side?null==n?void 0:n.bid:null==n?void 0:n.ask,o="limit"===t.basicOrderType?null===(i=t.form.get("limitPrice"))||void 0===i?void 0:i.value:r;return"buy"===t.side?e.value>o&&e.value>=r?null:{stopInvalidWithEntry:!0}:e.value0&&void 0!==arguments[0]?arguments[0]:0,s=(null===(t=this.options)||void 0===t?void 0:t.reduceOnly)||!1,c=(null===(e=this.options)||void 0===e?void 0:e.makerOnly)||!1,u="limit"===this.basicOrderType,l=new o.e(a||0,[o.x.required,o.x.min(1e-9)]),d=new o.e(0),h=new o.e(s,[o.x.required]),f=new o.e(c,[o.x.required]),p=new o.e(0,[o.x.required,o.x.min(1e-9)]),b=new o.e(!1,[o.x.required]),v=new o.e(!1,[o.x.required]);this.form=this.formBuilder.group(Object.assign(Object.assign(Object.assign({size:l,usdSize:d,reduceOnly:h},u&&{limitPrice:p}),u&&{makerOnly:f}),{orderTypeOverride:[this.basicOrderType,[o.x.required]],slEnabled:b,tpEnabled:v})),this.watchFormOptions(),null===(n=this.form.get("slEnabled"))||void 0===n||n.valueChanges.subscribe((function(t){if(t){var e=new o.e(r.form.value.limitPrice||"",[o.x.required,o.x.min(1e-9)],r.stopPriceValidatorFn()),n=new o.e("mark",[o.x.required]);r.form.addControl("slPrice",e),r.form.value.triggerSignal||r.form.addControl("triggerSignal",n)}else r.form.removeControl("slPrice")})),null===(i=this.form.get("tpEnabled"))||void 0===i||i.valueChanges.subscribe((function(t){if(t){var e=new o.e(r.form.value.limitPrice||"",[o.x.required,o.x.min(1e-9)],r.exitPriceValidatorFn()),n=new o.e("mark",[o.x.required]);r.form.addControl("tpPrice",e),r.form.value.triggerSignal||r.form.addControl("triggerSignal",n)}else r.form.removeControl("tpPrice")})),this.selectedMarket$.pipe(Object(T.h)(),Object(g.a)(this.selectedTicker$)).subscribe((function(t){var e,n=m(t,2),i=n[0],o=n[1],a=("buy"===r.side?null==o?void 0:o.bid:null==o?void 0:o.ask)||0,s=Object(k.I)(i.tickSize)(a);null===(e=r.form.get("limitPrice"))||void 0===e||e.setValue(s),r.setUSDAmount()}))}},{key:"getInitialMargin",value:function(){var t=this;this.clearInitialMargin(),Object(x.a)(100,1e3).pipe(Object(g.a)(this.userSignedIn$),Object(g.a)(this.selectedMarket$),Object(v.a)((function(t){var e=m(t,2),n=m(e[0],2)[1];e[1];return n})),Object(v.a)((function(){return t.form&&t.form.get("size").value>0&&(!t.form.get("limitPrice")||t.form.get("limitPrice").value>0)})),Object(v.a)((function(t){var e=m(t,2),n=(m(e[0],2)[1],e[1]);return!!n&&!n.symbol.startsWith("S")})),Object(O.b)(this)).subscribe((function(e){var n=m(e,2),i=(m(n[0],2)[1],n[1]),r=i.contractValueTradePrecision,o=Object.assign(Object.assign({},t.form.value),{symbol:i.symbol.toUpperCase(),orderType:t.basicOrderType,size:Object(k.H)(r)(t.form.value.size)});t.store.dispatch(Object(P.b)({order:o,editMargin:!1}))}))}},{key:"getMaxOrderSize",value:function(){var t=this;Object(x.a)(100,1e3).pipe(Object(g.a)(this.userSignedIn$),Object(g.a)(this.selectedMarket$),Object(v.a)((function(t){var e=m(t,1);return m(e[0],2)[1]})),Object(v.a)((function(){return!t.form.get("limitPrice")||t.form.get("limitPrice").value>0})),Object(v.a)((function(t){var e=m(t,2)[1];return!!e&&!e.symbol.startsWith("S")})),Object(O.b)(this),Object(y.a)((function(e){var n=m(e,2)[1];return t.trade.calculateMaxOrderSize({symbol:n.symbol.toUpperCase(),orderType:t.basicOrderType,limitPrice:t.form.value.limitPrice})}))).subscribe((function(e){t.maxOrderSize$.next(e)}))}},{key:"submitOrder",value:function(t,e,n){var i,r,o,a,s=null===(i=this.form.get("limitPrice"))||void 0===i?void 0:i.value,c=null===(r=this.form.get("makerOnly"))||void 0===r?void 0:r.value,u=null===(o=this.form.get("tpEnabled"))||void 0===o?void 0:o.value,l=null===(a=this.form.get("slEnabled"))||void 0===a?void 0:a.value,d=e[this.side],h={side:this.side,symbol:t.symbol.toUpperCase(),orderType:this.basicOrderType,size:this.form.value.size,quantityType:this.form.value.reference,limitPrice:s,reduceOnly:this.form.value.reduceOnly,margin:this.form.value.margin,triggerSignal:this.form.value.triggerSignal},f=u?{side:"buy"===this.side?"sell":"buy",symbol:t.symbol.toUpperCase(),orderType:"take_profit",size:this.form.value.size,stopPrice:this.form.value.tpPrice,reduceOnly:!0,triggerSignal:this.form.value.triggerSignal}:void 0,p=l?{side:"buy"===this.side?"sell":"buy",symbol:t.symbol.toUpperCase(),orderType:"stop",size:this.form.value.size,stopPrice:this.form.value.slPrice,reduceOnly:!0,triggerSignal:this.form.value.triggerSignal}:void 0;c?h.orderType="post":this.form.get("orderTypeOverride")&&(h.orderType=this.form.get("orderTypeOverride").value),this.store.dispatch("flexible_futures"!==t.type&&d>n.am&&d>0?Object(I.j)({message:"SNACKBAR.ORDER_EXCEED_MAX_LVG",class:"warn"}):f||p?Object(A.n)({mainOrder:h,stopLoss:p,takeProfit:f}):Object(A.o)(h))}},{key:"clearInitialMargin",value:function(){this.store.dispatch(Object(P.e)({buy:0,sell:0}))}},{key:"setupLocalKeybinds",value:function(){var t=this;this.locallyFocussedKeybinds=new Mousetrap(this.el.nativeElement),this.locallyFocussedKeybinds.bind("shift+r",(function(){var e=t.form.get("reduceOnly");null==e||e.setValue(!e.value)})),this.locallyFocussedKeybinds.bind("shift+a",(function(){var e=t.form.get("makerOnly");null==e||e.setValue(!e.value)}))}},{key:"watchFormOptions",value:function(){var t=this;this.form.valueChanges.subscribe((function(e){var n=Object.assign({},t.options);M.Maybe.fromNull(e.makerOnly).forEach((function(t){return n.makerOnly=t})),M.Maybe.fromNull(e.reduceOnly).forEach((function(t){return n.reduceOnly=t})),M.Maybe.fromNull(e.orderTypeOverride).forEach((function(t){return n.orderTypeOverride=t})),Mt("saving form options",n),Object(j.c)(L.j,n),t.refreshOptions.emit()}))}},{key:"setTriggerSignal",value:function(t){var e;null===(e=this.form.get("triggerSignal"))||void 0===e||e.setValue(t)}},{key:"onSizeFocus",value:function(){var t=this.form.get("size");0===t.value&&t.setValue("")}},{key:"setUSDAmount",value:function(){var t,e,n,i=null===(t=this.form.get("size"))||void 0===t?void 0:t.value,r=this.maxOrderSize$.getValue(),o="buy"===this.side?null==r?void 0:r.buyPrice:null==r?void 0:r.sellPrice,a="limit"===this.basicOrderType?null===(e=this.form.get("limitPrice"))||void 0===e?void 0:e.value:o,s="limit"===this.basicOrderType?a:o;null===(n=this.form.get("usdSize"))||void 0===n||n.setValue(Object(k.I)(.01)(i*s))}},{key:"setAmount",value:function(t){var e,n,i,r=null===(e=this.form.get("usdSize"))||void 0===e?void 0:e.value,o=this.maxOrderSize$.getValue(),a="buy"===this.side?null==o?void 0:o.buyPrice:null==o?void 0:o.sellPrice,s=(null===(n=this.form.get("limitPrice"))||void 0===n?void 0:n.value)||a,c="limit"===this.basicOrderType?s:a;null===(i=this.form.get("size"))||void 0===i||i.setValue(Object(k.H)(t.contractValueTradePrecision)(r/c))}},{key:"changeSize",value:function(t,e){var n,i=this.maxOrderSize$.getValue();if(i){var r=("buy"===this.side?i.maxBuySize:i.maxSellSize)/100*t;null===(n=this.form.get("size"))||void 0===n||n.setValue(Object(k.H)(e.contractValueTradePrecision)(r)),this.setUSDAmount()}}},{key:"setSliding",value:function(t){this.isSliding=t}},{key:"closePosition",value:function(){var t=this;this.selectedMarketPosition$.pipe(Object(_.a)(),Object(g.a)(this.selectedMarket$)).subscribe((function(e){var n,i,r=m(e,2),o=r[0],a=r[1],s=Math.abs((null==o?void 0:o.balance)||0),c=a.contractValueTradePrecision;null===(n=t.form.get("size"))||void 0===n||n.setValue(Object(k.H)(c)(s)),null===(i=t.form.get("reduceOnly"))||void 0===i||i.setValue(!0),t.setUSDAmount()}))}},{key:"setBalancePercentage",value:function(t,e,n){var i,r=this.maxOrderSize$.value,o="buy"===this.side?null==r?void 0:r.maxBuySize:null==r?void 0:r.maxSellSize,a=n&&(n.balance>0&&"sell"===this.side||n.balance<0&&"buy"===this.side),s=a?Math.abs(n.balance):o;if(s){var c=s*(.98===t&&a?1:t);null===(i=this.form.get("size"))||void 0===i||i.setValue(Object(k.H)(e.contractValueTradePrecision)(c)),this.setUSDAmount()}}},{key:"tickSize",value:function(t){return"flexible_futures"===t.type?1/Math.pow(10,t.contractValueTradePrecision):t?t.tickSize:1}},{key:"stepSize",value:function(t){return t?1/Math.pow(10,t.contractValueTradePrecision):1}},{key:"hasClosablePosition",value:function(t){return t.balance>0&&"sell"===this.side||t.balance<0&&"buy"===this.side}},{key:"viewWallets",value:function(){this.router.navigate(["wallets"])}},{key:"hasPriceAndSize",get:function(){return this.form.get("limitPrice")?this.form.value.limitPrice&&this.form.value.size:!!this.form.value.size}},{key:"slEnabled",get:function(){var t;return null===(t=this.form.get("slEnabled"))||void 0===t?void 0:t.value}},{key:"tpEnabled",get:function(){var t;return null===(t=this.form.get("tpEnabled"))||void 0===t?void 0:t.value}},{key:"triggerSignal",get:function(){var t;return null===(t=this.form.get("triggerSignal"))||void 0===t?void 0:t.value}},{key:"stopLoss",get:function(){var t,e,n,i=null===(t=this.form.get("slPrice"))||void 0===t?void 0:t.value,r=null===(e=this.form.get("limitPrice"))||void 0===e?void 0:e.value,o=null===(n=this.form.get("size"))||void 0===n?void 0:n.value,a=this.maxOrderSize$.value,s="limit"===this.basicOrderType?r:"buy"===this.side?null==a?void 0:a.buyPrice:null==a?void 0:a.sellPrice,c="buy"===this.side?"long":"short";return i?Object(M.Some)(Object(U.f)({entry:s,exit:i,isInverse:!1,quantity:o,side:c})):Object(M.None)()}},{key:"exitProfit",get:function(){var t,e,n,i=null===(t=this.form.get("tpPrice"))||void 0===t?void 0:t.value,r=null===(e=this.form.get("limitPrice"))||void 0===e?void 0:e.value,o=null===(n=this.form.get("size"))||void 0===n?void 0:n.value,a=this.maxOrderSize$.value,s="limit"===this.basicOrderType?r:"buy"===this.side?null==a?void 0:a.buyPrice:null==a?void 0:a.sellPrice,c="buy"===this.side?"long":"short";return i?Object(M.Some)(Object(U.f)({entry:s,exit:i,isInverse:!1,quantity:o,side:c})):Object(M.None)()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(o.d),r.Ob(a.b),r.Ob(f.a),r.Ob(r.l),r.Ob(B.d))},t.\u0275cmp=r.Ib({type:t,selectors:[["basic-order-form"]],hostBindings:function(t,e){1&t&&r.bc("keydown",(function(t){return e.blurFieldEsc(t)}))},inputs:{side:"side",options:"options",indexPrice:"indexPrice",basicOrderType:"basicOrderType"},outputs:{refreshOptions:"refreshOptions"},features:[r.Ab],decls:17,vars:50,consts:[[4,"ngIf"],["class","basic-order","body","","orientation","",3,"formGroup","breakpoints",4,"ngIf"],["body","","orientation","",1,"basic-order",3,"formGroup","breakpoints"],[1,"inputs"],["color","accent","appearance","fill","sbTooltip","TOOLTIP.LIMIT_PRICE",3,"sbDisabled","sbDelay",4,"ngIf"],[1,"input-row"],["color","accent","appearance","fill","sbTooltip","TOOLTIP.QUANTITY",3,"sbDisabled","sbDelay"],["autocomplete","off","type","number","pattern","\\d*.?\\d*","formControlName","size","matInput","","min","0",3,"step","focus","input"],["quantityField",""],["matSuffix",""],["color","accent","appearance","fill","sbTooltip","TOOLTIP.QUANTITY",3,"sbDisabled","sbDelay",4,"ngIf"],["triggerSignalMenu","sbMenu"],["sb-menu-item","","type","button",3,"click"],["translate",""],[1,"options"],[1,"maker-reduce"],["formControlName","makerOnly",4,"ngIf"],["formControlName","reduceOnly"],["tooltip","","sbTooltip","TOOLTIP.REDUCE_ONLY",3,"sbDisabled","sbDelay"],["class","radio-options radio-options--inline",4,"ngIf"],[1,"trigger"],[1,"trigger-checkboxes"],["formControlName","slEnabled",1,"no-border"],["formControlName","tpEnabled",1,"no-border"],["class","trigger-menu",3,"sbMenuTriggerFor",4,"ngIf"],["color","accent","appearance","fill",4,"ngIf"],["class","trigger-details",4,"ngIf"],[3,"side","selectedMarket","selectedTicker","initialMargin","wallet","isTrigger","form","imOverBalance"],[1,"footer"],["class","post-only-notice",4,"ngIf"],["theme","dark",1,"submit"],["mat-raised-button","","body","",3,"disabled","click"],["color","accent","appearance","fill","sbTooltip","TOOLTIP.LIMIT_PRICE",3,"sbDisabled","sbDelay"],["autocomplete","off","type","number","pattern","^\\d*\\.?\\d*$","formControlName","limitPrice","matInput","",3,"step","input"],["autocomplete","off","type","number","pattern","\\d*.?\\d*","formControlName","usdSize","matInput","","min","0",3,"step","focus","input"],["matSuffix","",4,"ngIf"],[4,"ngIf","ngIfElse"],["noFlexFunds",""],[1,"balance-btns"],["matSuffix","","mat-raised-button","","body","","type","button",1,"balance-btn","mat-small-button",3,"click"],["type","button","body","","mat-raised-button","",1,"mat-small-button",3,"click"],["icon","wallet"],["formControlName","makerOnly"],["tooltip","","sbTooltip","TOOLTIP.MAKER_ONLY",3,"sbDisabled","sbDelay"],[1,"radio-options","radio-options--inline"],["formControlName","orderTypeOverride"],["value","ioc"],["value","limit"],[1,"trigger-menu",3,"sbMenuTriggerFor"],["body","","capitalize",""],["icon","chevron-down","size","lg"],["color","accent","appearance","fill"],["autocomplete","off","type","number","pattern","^\\d*\\.?\\d*$","formControlName","slPrice","matInput","","placeholder","0"],["autocomplete","off","type","number","pattern","^\\d*\\.?\\d*$","formControlName","tpPrice","matInput","","placeholder","0"],[1,"trigger-details"],["body","",4,"ngIf"],["body",""],["pnlZero","",3,"pnl"],[1,"post-only-notice"],["icon","info","size","lg"]],template:function(t,e){1&t&&(r.Oc(0,At,2,1,"ng-container",0),r.gc(1,"async"),r.gc(2,"async"),r.gc(3,"async"),r.gc(4,"async"),r.gc(5,"async"),r.gc(6,"async"),r.gc(7,"async"),r.gc(8,"async"),r.gc(9,"async"),r.gc(10,"async"),r.gc(11,"async"),r.gc(12,"async"),r.gc(13,"async"),r.gc(14,"async"),r.gc(15,"async"),r.gc(16,"async")),2&t&&r.mc("ngIf",r.yc(33,It,[r.hc(1,1,e.selectedMarket$),r.hc(2,3,e.selectedTicker$),r.hc(3,5,e.displayTooltips$),r.hc(4,7,e.baseCurrency$),r.hc(5,9,e.quoteCurrency$),r.hc(6,11,e.userSelectedFuturesWallet$),r.hc(7,13,e.initialMargin$),r.hc(8,15,e.isFlexMarket$),r.hc(9,17,e.userData$),r.hc(10,19,e.sizeFormatter$),r.hc(11,21,e.maxOrderSize$),r.hc(12,23,e.selectedMarketPosition$),r.hc(13,25,e.loading$),r.hc(14,27,e.imOverBalance$),r.hc(15,29,e.sizeUnit$),r.hc(16,31,e.selectedMarketPosition$)]))},directives:[z.n,o.z,o.p,V.a,H.a,o.h,q.c,$.a,Q.a,W.a,q.f,o.s,o.c,G.b,o.t,o.o,o.g,q.h,Y.a,K.a,Z.a,X.a,J.a,tt.a,et.b,nt.b,it.a,rt.b,rt.a,ot.b,at.a,st.a],pipes:[z.b,Z.d,z.w,ct.b,z.f],styles:["[noauth][_nghost-%COMP%]{pointer-events:none}mat-card[_ngcontent-%COMP%]{box-shadow:none!important;overflow:hidden}form[_ngcontent-%COMP%]{overflow-x:hidden}form[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:100%}.submit[_ngcontent-%COMP%]{display:flex}.submit[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1}.submit[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:first-of-type){margin-left:var(--spacing)}.footer[_ngcontent-%COMP%]{margin-top:var(--spacing);background:var(--card-colour);text-align:right;width:100%}.options[_ngcontent-%COMP%]{display:block}.inputs[_ngcontent-%COMP%], .options[_ngcontent-%COMP%]{flex-direction:column}.inputs[_ngcontent-%COMP%]{display:flex}.inputs[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex:1}.order-form[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;padding-left:var(--spacing);padding-top:var(--spacing);padding-bottom:var(--spacing)}.radio-options[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;padding-top:var(--spacing)}.radio-options--inline[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{flex-flow:row nowrap;justify-content:space-between}.slider-info[_ngcontent-%COMP%]{cursor:pointer}.slider-info[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--icon-colour)}.side-buttons[_ngcontent-%COMP%]{padding-right:var(--spacing)}.side[_ngcontent-%COMP%] .buy[_ngcontent-%COMP%]{color:var(--accent-colour)!important}.side[_ngcontent-%COMP%] .buy.mat-button-toggle-checked[_ngcontent-%COMP%]{color:var(--text-colour)!important;background-color:var(--button-accent-colour)!important}.side[_ngcontent-%COMP%] .sell[_ngcontent-%COMP%]{color:var(--warn-colour)!important}.side[_ngcontent-%COMP%] .sell.mat-button-toggle-checked[_ngcontent-%COMP%]{color:var(--text-colour)!important;background-color:var(--button-warn-colour)!important}.input-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex:1}.input-row[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{min-width:0}.input-row[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]:not(:first-child){padding-left:var(--spacing)}@media (max-width:599px){.input-row[_ngcontent-%COMP%]{width:91vw}}.maker-reduce[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}.maker-reduce[_ngcontent-%COMP%] .mat-checkbox-layout{border-bottom:none!important}.unauth[_ngcontent-%COMP%]{padding:var(--spacing)}.estimate[_ngcontent-%COMP%]{font-size:2em;margin-right:var(--spacing)}.mat-button-toggle-checked.long[_ngcontent-%COMP%]{background:var(--g300)}.mat-button-toggle-checked.short[_ngcontent-%COMP%]{background:var(--warn-colour)}.close-position[_ngcontent-%COMP%]{align-self:flex-end}.trigger-details[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly}.trigger-details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:center}.trigger[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid var(--border-colour);margin:var(--spacing-s) 0;justify-content:space-between;align-items:center}.trigger-menu[_ngcontent-%COMP%]{cursor:pointer}.trigger-checkboxes[_ngcontent-%COMP%]{display:flex}.trigger-checkboxes[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]:first-child{margin-right:var(--spacing-l)}[_nghost-%COMP%]{height:100%;position:relative;overflow-y:auto;padding-right:var(--spacing)}.close-position[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.balanace-btn[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing-s)}.balance-btns[_ngcontent-%COMP%]{justify-content:space-between;flex-wrap:wrap}.balance-btns[_ngcontent-%COMP%], .post-only-notice[_ngcontent-%COMP%]{display:flex;margin-bottom:var(--spacing)}.post-only-notice[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .post-only-notice[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--y200)!important}.post-only-notice[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--spacing-s)}"],changeDetection:0}),t=Object(i.d)([Object(O.a)()],t)}()},ekTi:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("w6/c");e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.default)},fLha:function(t,e,n){"use strict";n.r(e),n.d(e,"WaitingListComponent",(function(){return S}));var i=n("3kIJ"),r=n("Q7YU"),o=n("hsG4"),a=n("zqNl"),s=n("bjK4"),c=n("kZht"),u=n("mcff"),l=n("rfPA"),d=n("bBQR"),h=n("anSm"),f=n("NxuZ"),p=n("1etq"),b=n("EmXI"),g=n("Tcl6"),m=n("An66"),v=n("UDV5"),y=n("hCLc"),_=n("aDqW");function O(t,e){if(1&t&&(c.Ub(0,"option",18),c.Qc(1),c.Tb()),2&t){var n=e.$implicit;c.mc("value",n),c.Cb(1),c.Rc(n)}}function k(t,e){1&t&&(c.Ub(0,"div",19),c.Pb(1,"fa-icon",20),c.Ub(2,"p",21),c.Qc(3),c.gc(4,"translate"),c.Tb(),c.Tb()),2&t&&(c.Cb(3),c.Rc(c.hc(4,1,"Thank you for subscribing!")))}function T(t,e){1&t&&(c.Ub(0,"div",22),c.Pb(1,"fa-icon",23),c.Ub(2,"p",21),c.Qc(3),c.gc(4,"translate"),c.Tb(),c.Tb()),2&t&&(c.Cb(3),c.Rc(c.hc(4,1,"We couldn't validate your request, please try again!")))}var S=function(){var t=function(){function t(e,n,i,r){C(this,t),this.store=e,this.dialogRef=n,this.fb=i,this.userService=r,this.form=this.buildForm(),this.logoUrl$=this.store.pipe(Object(a.m)(s.f,{badge:!0})),this.isSuccess=!1,this.hasErrors=!1}return w(t,[{key:"buildForm",value:function(){return this.fb.group({fullName:["",[i.x.required]],email:["",[i.x.required,i.x.email]],country:["",[i.x.required]],aum:[""],estTradingVol:[""],companyName:[""],optIn:[!1,[i.x.requiredTrue]]})}},{key:"submitForm",value:function(){var t=this;this.isSuccess=!1,this.hasErrors=!1,this.userService.signWaitingList(this.form.value).subscribe((function(){t.isSuccess=!0}),(function(){t.hasErrors=!1}))}},{key:"closeDialog",value:function(){this.dialogRef.close()}},{key:"countries",get:function(){return r.a}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Ob(a.b),c.Ob(u.d),c.Ob(i.d),c.Ob(o.a))},t.\u0275cmp=c.Ib({type:t,selectors:[["waiting-list"]],decls:46,vars:32,consts:[[3,"heading"],["body","",1,"dialog-content","vstack","hcenter","gap-l"],[1,"kraken-logo"],["icon","kraken","size","lg"],["subheading",""],["body","",1,"vstack","hcenter",3,"formGroup","ngSubmit"],["color","accent","appearance","fill"],["matInput","","formControlName","fullName","required",""],["matInput","","formControlName","email","required",""],["matNativeControl","","required","","formControlName","country","tabindex","10"],[3,"value",4,"ngFor","ngForOf"],["matInput","","formControlName","aum"],["matInput","","formControlName","estTradingVol"],["matInput","","formControlName","companyName"],["formControlName","optIn",1,"no-border"],["class","success",4,"ngIf"],["class","error",4,"ngIf"],["body","","mat-raised-button","",3,"disabled"],[3,"value"],[1,"success"],["icon","check","size","lg"],["body",""],[1,"error"],["icon","circle-exclamationmark","size","lg"]],template:function(t,e){1&t&&(c.Ub(0,"pro-dialog",0),c.Ub(1,"div",1),c.Ub(2,"div",2),c.Pb(3,"fa-icon",3),c.Tb(),c.Ub(4,"p",4),c.Qc(5," Input your contact information below to be among the first to be notified at launch "),c.Tb(),c.Ub(6,"form",5),c.bc("ngSubmit",(function(){return e.submitForm()})),c.Ub(7,"mat-form-field",6),c.Ub(8,"mat-label"),c.Qc(9),c.gc(10,"translate"),c.Tb(),c.Pb(11,"input",7),c.Tb(),c.Ub(12,"mat-form-field",6),c.Ub(13,"mat-label"),c.Qc(14),c.gc(15,"translate"),c.Tb(),c.Pb(16,"input",8),c.Tb(),c.Ub(17,"mat-form-field",6),c.Ub(18,"mat-label"),c.Qc(19),c.gc(20,"translate"),c.Tb(),c.Ub(21,"select",9),c.Oc(22,O,2,2,"option",10),c.Tb(),c.Tb(),c.Ub(23,"mat-form-field",6),c.Ub(24,"mat-label"),c.Qc(25),c.gc(26,"translate"),c.Tb(),c.Pb(27,"input",11),c.Tb(),c.Ub(28,"mat-form-field",6),c.Ub(29,"mat-label"),c.Qc(30),c.gc(31,"translate"),c.Tb(),c.Pb(32,"input",12),c.Tb(),c.Ub(33,"mat-form-field",6),c.Ub(34,"mat-label"),c.Qc(35),c.gc(36,"translate"),c.Tb(),c.Pb(37,"input",13),c.Tb(),c.Ub(38,"mat-checkbox",14),c.Qc(39),c.gc(40,"translate"),c.Tb(),c.Oc(41,k,5,3,"div",15),c.Oc(42,T,5,3,"div",16),c.Ub(43,"button",17),c.Qc(44),c.gc(45,"translate"),c.Tb(),c.Tb(),c.Tb(),c.Tb()),2&t&&(c.mc("heading","Coming this April - Multi-Collateral Futures"),c.Cb(6),c.mc("formGroup",e.form),c.Cb(3),c.Rc(c.hc(10,16,"Full name")),c.Cb(5),c.Rc(c.hc(15,18,"Email")),c.Cb(5),c.Rc(c.hc(20,20,"FORM.COUNTRY")),c.Cb(3),c.mc("ngForOf",e.countries),c.Cb(3),c.Rc(c.hc(26,22,"Assets under management")),c.Cb(5),c.Rc(c.hc(31,24,"Est. trading volume")),c.Cb(5),c.Rc(c.hc(36,26,"Company name")),c.Cb(4),c.Sc(" ",c.hc(40,28,"I consent to being contacted by Kraken when Multi-Collateral Futures launches. Corporate clients acknowledge they may be contacted before launch by Kraken\u2019s account management team for white glove onboarding support.")," "),c.Cb(2),c.mc("ngIf",e.isSuccess),c.Cb(1),c.mc("ngIf",e.hasErrors),c.Cb(1),c.Lc("margin-top","var(--spacing)"),c.mc("disabled",e.form.invalid||e.isSuccess),c.Cb(1),c.Sc(" ",c.hc(45,30,"Join launch list")," "))},directives:[l.a,d.a,h.a,f.b,p.a,i.z,i.p,i.h,b.c,b.f,g.b,i.c,i.o,i.g,i.v,i.w,m.m,v.a,m.n,y.b,i.r,i.y],pipes:[_.d],styles:["[_nghost-%COMP%]{display:block;width:520px}.kraken-logo[_ngcontent-%COMP%]{display:flex;justify-content:center}.kraken-logo[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:28px}.success[_ngcontent-%COMP%]{display:grid;justify-content:center;align-items:center;gap:var(--spacing);grid-auto-flow:column;margin:1rem 0}.success[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--accent-colour);transform:scale(1.5)}.success[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1rem}.error[_ngcontent-%COMP%]{display:grid;justify-content:center;align-items:center;gap:var(--spacing);grid-auto-flow:column;margin:1rem 0}.error[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--warn-colour);transform:scale(1.5)}.error[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:var(--spacing-s)}"],changeDetection:0}),t}()},fa4l:function(t,e,n){"use strict";n.d(e,"a",(function(){return it}));var i=n("D57K"),r=n("kZht"),o=n("3kIJ"),a=n("zqNl"),s=n("+Px6"),c=n("rxqU"),u=n("qAYy"),l=n("J/3c"),d=n("KyJX"),h=n("l5Az"),f=n("3mST"),p=n("w0kG"),b=n("xVbo"),g=n("gxtV"),v=n("lx5p"),y=n("i67J"),_=n("h3eB"),O=n("uJYd"),k=n("VmIW"),T=n("NloN"),S=n("ylpo"),E=n("KQpv"),x=n.n(E),P=n("vYTc"),A=n("QdGC"),I=n("YyhG"),M=n("An66"),D=n("anSm"),R=n("TMzY"),j=n("EmXI"),L=n("IOEv"),N=n("pTnX"),U=n("B6Vo"),F=n("Cc4E"),B=n("zho4"),z=n("Tcl6"),V=n("UDV5"),H=n("IkSM"),q=n("8spT"),$=n("WYJo"),Q=n("bW1a"),W=n("hCLc"),G=n("aDqW"),Y=function(){return[500,100]};function K(t,e){if(1&t&&(r.Ub(0,"mat-form-field",29),r.Ub(1,"mat-label"),r.Qc(2),r.gc(3,"translate"),r.Tb(),r.Pb(4,"input",30),r.Ub(5,"span",11),r.Qc(6),r.Tb(),r.Tb()),2&t){var n=r.fc().ngIf,i=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(7,Y)),r.Cb(2),r.Sc("",r.hc(3,5,"FORM.LIMIT_PRICE"),":"),r.Cb(2),r.mc("step",i.tickSize(n.selectedMarket)),r.Cb(2),r.Rc(n.quoteCurrency)}}var Z=function(){return{horizontal:675,vertical:600}},X=function(){return[250,100]},J=function(t){return{side:t}};function tt(t,e){if(1&t){var n=r.Vb();r.Sb(0),r.Ub(1,"form",1),r.Ub(2,"section",2),r.Ub(3,"section",3),r.Ub(4,"mat-form-field",4),r.Ub(5,"mat-label"),r.Qc(6),r.gc(7,"translate"),r.Tb(),r.Ub(8,"mat-select",5),r.bc("selectionChange",(function(){return r.Ec(n),r.fc().toggleLimitControl()})),r.Ub(9,"mat-option",6),r.Qc(10),r.gc(11,"translate"),r.Tb(),r.Ub(12,"mat-option",7),r.Qc(13),r.gc(14,"translate"),r.Tb(),r.Tb(),r.Tb(),r.Ub(15,"mat-form-field",8),r.Ub(16,"mat-label"),r.Qc(17),r.gc(18,"translate"),r.Tb(),r.Ub(19,"input",9,10),r.bc("focus",(function(){return r.Ec(n),r.fc().onSizeFocus()})),r.Tb(),r.Ub(21,"span",11),r.Qc(22),r.Tb(),r.Tb(),r.Tb(),r.Ub(23,"section",3),r.Oc(24,K,7,8,"mat-form-field",12),r.Ub(25,"mat-form-field",4),r.Ub(26,"mat-label"),r.Qc(27),r.gc(28,"translate"),r.Tb(),r.Pb(29,"input",13),r.Ub(30,"span",11),r.Qc(31),r.Tb(),r.Tb(),r.Tb(),r.Ub(32,"section",14),r.Ub(33,"section",15),r.Ub(34,"mat-checkbox",16),r.Ub(35,"span",17),r.Qc(36),r.gc(37,"translate"),r.Tb(),r.Tb(),r.Tb(),r.Ub(38,"section",18),r.Ub(39,"mat-label",19),r.Qc(40),r.gc(41,"uppercase"),r.gc(42,"translate"),r.Tb(),r.Ub(43,"mat-radio-group",20),r.Ub(44,"mat-radio-button",21),r.Ub(45,"p",22),r.gc(46,"translate"),r.Qc(47),r.gc(48,"translate"),r.Tb(),r.Tb(),r.Ub(49,"mat-radio-button",23),r.Ub(50,"p",22),r.gc(51,"translate"),r.Qc(52),r.gc(53,"translate"),r.Tb(),r.Tb(),r.Ub(54,"mat-radio-button",24),r.Ub(55,"p",22),r.gc(56,"translate"),r.Qc(57),r.gc(58,"translate"),r.Tb(),r.Tb(),r.Tb(),r.Tb(),r.Tb(),r.Pb(59,"order-form-details",25),r.Ub(60,"section",26),r.Ub(61,"section",27),r.Ub(62,"button",28),r.bc("click",(function(){r.Ec(n);var t=e.ngIf;return r.fc().submitOrder(t.selectedMarket,t.userData)})),r.Qc(63),r.gc(64,"titlecase"),r.gc(65,"translate"),r.Tb(),r.Tb(),r.Tb(),r.Tb(),r.Tb(),r.Rb()}if(2&t){var i=e.ngIf,o=r.fc();r.Cb(1),r.mc("formGroup",o.form)("breakpoints",r.qc(66,Z)),r.Cb(5),r.Rc(r.hc(7,33,"LABEL.TRIGGER_ORDER_TYPE")),r.Cb(4),r.Sc(" ",r.hc(11,35,"BUTTON.LIMIT_ORDER")," "),r.Cb(3),r.Sc(" ",r.hc(14,37,"BUTTON.MARKET_ORDER")," "),r.Cb(2),r.mc("sbDisabled",!i.displayTooltips)("sbDelay",r.qc(67,Y)),r.Cb(2),r.Sc("",r.hc(18,39,"FORM.QUANTITY"),":"),r.Cb(2),r.mc("step",o.stepSize(i.selectedMarket)),r.Cb(3),r.Sc(" ",i.sizeUnit," "),r.Cb(2),r.mc("ngIf",o.isLimit),r.Cb(3),r.Sc("",r.hc(28,41,"FORM.TRIGGER_PRICE"),":"),r.Cb(2),r.mc("step",o.tickSize(i.selectedMarket)),r.Cb(2),r.Rc(i.quoteCurrency),r.Cb(3),r.mc("disabled",o.reduceOnlyDisabled),r.Cb(1),r.mc("sbDisabled",!i.displayTooltips)("sbDelay",r.qc(68,X)),r.Cb(1),r.Sc(" ",r.hc(37,43,"BUTTON.REDUCE_ONLY")," "),r.Cb(4),r.Sc(" ",r.hc(41,45,r.hc(42,47,"FORM.TRIGGER_SIGNAL")),": "),r.Cb(5),r.mc("matTooltip",r.hc(46,49,o.triggerTooltipText.last)),r.Cb(2),r.Sc(" ",r.hc(48,51,"BUTTON.LAST")," "),r.Cb(3),r.mc("matTooltip",r.hc(51,53,o.triggerTooltipText.mark)),r.Cb(2),r.Sc(" ",r.hc(53,55,"BUTTON.MARK")," "),r.Cb(3),r.mc("matTooltip",r.hc(56,57,o.triggerTooltipText.spot)),r.Cb(2),r.Sc(" ",r.hc(58,59,"BUTTON.INDEX")," "),r.Cb(2),r.mc("selectedMarket",i.selectedMarket)("selectedTicker",i.selectedTicker)("initialMargin",i.initialMargin)("wallet",i.wallet)("isTrigger",!0)("form",o.form),r.Cb(3),r.mc("disabled",o.form.invalid||o.buttonDisabled(o.side,i.selectedTicker)),r.Cb(1),r.Sc(" ",r.hc(64,61,r.ic(65,63,"LABEL.PLACE_ORDER",r.rc(69,J,o.side)))," ")}}var et=function(t,e,n,i,r,o,a,s,c){return{selectedMarket:t,selectedTicker:e,displayTooltips:n,baseCurrency:i,quoteCurrency:r,wallet:o,initialMargin:a,userData:s,sizeUnit:c}},nt=x()("trace:app:trigger-order-form"),it=function(){var t=function(){function t(e,n,i){C(this,t),this.formBuilder=e,this.store=n,this.trade=i,this.selectedMarket$=this.store.pipe(Object(a.m)(s.n)),this.selectedTicker$=this.store.pipe(Object(a.m)(u.p)),this.displayTooltips$=this.store.pipe(Object(a.m)(c.y)),this.baseCurrency$=this.store.pipe(Object(a.m)(s.s)),this.quoteCurrency$=this.store.pipe(Object(a.m)(s.u)),this.userSelectedFuturesWallet$=this.store.pipe(Object(a.m)(l.n)),this.initialMargin$=this.store.pipe(Object(a.m)(d.d)),this.userSignedIn$=this.store.pipe(Object(a.m)(c.m)),this.userData$=this.store.pipe(Object(a.m)(c.a)),this.sizeUnit$=this.store.pipe(Object(a.m)(I.n)),this.refreshOptions=new r.o,this.blurFieldEsc=function(t){return Object(A.a)(t)}}return w(t,[{key:"ngOnInit",value:function(){var t=this;this.buildForm(),this.selectedMarket$.pipe(Object(f.a)(1),Object(g.b)(this)).subscribe((function(e){var n,i;null===(n=t.form.get("stopPrice"))||void 0===n||n.setValue(0),null===(i=t.form.get("limitPrice"))||void 0===i||i.setValue(0)})),this.trade.orderFormPriceUpdated$.pipe(Object(p.a)(this.selectedMarket$),Object(b.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return!!n&&!!i})),Object(g.b)(this)).subscribe((function(e){var n,i=m(e,2),r=i[0],o=i[1],a=Object(v.I)(o.tickSize)(r);null===(n=t.form.get("limitPrice"))||void 0===n||n.setValue(a)})),this.trade.orderFormQuantityUpdated$.pipe(Object(y.g)(),Object(g.b)(this)).subscribe((function(e){var n;null===(n=t.form.get("size"))||void 0===n||n.setValue(e)}))}},{key:"buildForm",value:function(){var t,e,n="stop"===this.triggerType||"take_profit"===this.triggerType||(null===(t=this.options)||void 0===t?void 0:t.reduceOnly),i=(null===(e=this.options)||void 0===e?void 0:e.triggerSignal)||"mark",r=new o.e(this.side,[o.x.required]),a=new o.e(0,[o.x.required,o.x.min(1e-9)]),s=new o.e(n,[o.x.required]);this.form=this.formBuilder.group({type:["market",[o.x.required]],side:r,size:a,stopPrice:[0,[o.x.required,o.x.min(1e-9)]],reduceOnly:s,triggerSignal:[i,[o.x.required]]}),this.watchFormOptions()}},{key:"submitOrder",value:function(t,e){var n=this.isLimit?this.form.value.limitPrice:void 0,i={side:this.side,symbol:t.symbol.toUpperCase(),orderType:"trigger_entry"===this.triggerType?"stop":this.triggerType,size:this.form.value.size,reduceOnly:this.form.value.reduceOnly,triggerSignal:this.form.value.triggerSignal,limitPrice:n,stopPrice:this.form.value.stopPrice};this.store.dispatch(e.requireOrderConfirmation?Object(O.g)({name:"order-confirmation",inputs:{order:i,instrument:t}}):Object(_.o)(i))}},{key:"toggleLimitControl",value:function(){if(this.form.get("limitPrice"))this.form.removeControl("limitPrice");else{var t=this.form&&this.form.get("limitPrice")?this.form.get("limitPrice").value:0,e=new o.e(t,[o.x.required,o.x.min(1e-9)]);this.form.addControl("limitPrice",e)}}},{key:"watchFormOptions",value:function(){var t=this;this.form.valueChanges.subscribe((function(e){var n=Object.assign({},t.options);k.Maybe.fromNull(e.triggerSignal).forEach((function(t){return n.triggerSignal=t})),k.Maybe.fromNull(e.orderTypeOverride).forEach((function(t){return n.orderTypeOverride=t})),nt("saving form options",n),Object(T.c)(S.j,n),t.refreshOptions.emit()}))}},{key:"onSizeFocus",value:function(){var t=this.form.get("size");0===t.value&&t.setValue("")}},{key:"tickSize",value:function(t){return t?t.tickSize:1}},{key:"stepSize",value:function(t){return t?1/Math.pow(10,t.contractValueTradePrecision):1}},{key:"buttonDisabled",value:function(t,e){var n={last:Object(P.j)(e),mark:e.markPrice,spot:e.index},i=this.form.get("stopPrice").value,r=n[this.form.get("triggerSignal").value];return"stop"===this.triggerType||"trigger_entry"===this.triggerType?"buy"===t?ir:"take_profit"===this.triggerType&&("buy"===t?i>r:i0&&void 0!==arguments[0]?arguments[0]:l;return function(e){return e.lift(new s(t))}}var s=function(){function t(e){C(this,t),this.errorFactory=e}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new u(t,this.errorFactory))}}]),t}(),u=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t)).errorFactory=i,r.hasValue=!1,r}return w(n,[{key:"_next",value:function(t){this.hasValue=!0,this.destination.next(t)}},{key:"_complete",value:function(){if(this.hasValue)return this.destination.complete();var t;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)}}]),n}(r.a);function l(){return new i.a}},fhVT:function(t,e,n){var i=n("67SP"),r=n("JgBV");function o(t){this.mode=r.BYTE,this.data=new i(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(var e=0,n=this.data.length;e1&&"number"==typeof e[e.length-1]&&(s=e.pop())):"number"==typeof u&&(s=e.pop()),null===c&&1===e.length&&e[0]instanceof i.a?e[0]:Object(o.a)(s)(Object(a.a)(e,c))}},gBlb:function(t,e,n){"use strict";function i(t){return t&&"function"==typeof t.schedule}n.d(e,"a",(function(){return i}))},gCmX:function(t,e,n){"use strict";n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return g})),n.d(e,"c",(function(){return v})),n.d(e,"d",(function(){return y}));var i=n("IdLP"),r=n("KTx3"),o={error:"cordova_not_available"},a={error:"plugin_not_installed"};function s(t){if("undefined"!=typeof window&&window.angular){var e=window.document,n=window.angular.element(e.querySelector("[ng-app]")||e.body).injector();if(n)return n.get("$q")((function(e,n){t(e,n)}));console.warn("Angular 1 was detected but $q couldn't be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won't trigger an automatic digest when promises resolve.")}return function(){if(Promise)return new Promise((function(e,n){t(e,n)}));console.error("No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.")}()}function c(t,e,n,i){var r,o;void 0===i&&(i={});var a=s((function(a,s){r=i.destruct?p(t,e,n,i,(function(){for(var t=[],e=0;et.length?t[e.successIndex]=n:t.splice(e.successIndex,0,n)},a=function(){e.errorIndex>t.length?t[e.errorIndex]=i:t.splice(e.errorIndex,0,i)};e.successIndex>e.errorIndex?(a(),o()):(o(),a())}else t.push(n),t.push(i);return t}function p(t,e,n,i,r,o){void 0===i&&(i={}),n=f(n,i,r,o);var a=h(t,e);if(!0===a){var s=g(t.constructor.getPluginRef());return s[e].apply(s,n)}return a}function b(t,e,n,i,r,o){if(void 0===i&&(i={}),n=f(n,i,r,o),function(t,e){return t._objectInstance&&(!e||void 0!==t._objectInstance[e])}(t,e))return t._objectInstance[e].apply(t._objectInstance,n)}function g(t){return"undefined"!=typeof window?m(window,t):null}function m(t,e){for(var n=e.split("."),i=t,r=0;rt.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(i=t[Symbol.iterator]()).next.bind(i)}var i=function(t){var e={exports:{}};return function(t){t.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}},changeDefaults:function(e){t.exports.defaults=e}}}(e),e.exports}(),r=/[&<>"']/,o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,c={"&":"&","<":"<",">":">",'"':""","'":"'"},u=function(t){return c[t]},l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function d(t){return t.replace(l,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var h=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,b={},g=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(t,e,n){var i=t.length;if(0===i)return"";for(var r=0;r=0&&"\\"===n[r];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(n.length>e)n.splice(e);else for(;n.length1?{type:"space",raw:e[0]}:{raw:"\n"}},e.code=function(t,e){var n=this.rules.block.code.exec(t);if(n){var i=e[e.length-1];if(i&&"paragraph"===i.type)return{raw:n[0],text:n[0].trimRight()};var r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:C(r,"\n")}}},e.fences=function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],i=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var i=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:e[0].length>=i.length?t.slice(i.length):t})).join("\n")}(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim():e[2],text:i}}},e.heading=function(t){var e=this.rules.block.heading.exec(t);if(e){var n=e[2].trim();if(/#$/.test(n)){var i=C(n,"#");this.options.pedantic?n=i.trim():i&&!/ $/.test(i)||(n=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n}}},e.nptable=function(t){var e=this.rules.block.nptable.exec(t);if(e){var n={type:"table",header:T(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(n.header.length===n.align.length){var i,r=n.align.length;for(i=0;i ?/gm,"");return{type:"blockquote",raw:e[0],text:n}}},e.list=function(t){var e=this.rules.block.list.exec(t);if(e){var n,i,r,o,a,s,c,u,l=e[0],d=e[2],h=d.length>1,f={type:"list",raw:l,ordered:h,start:h?+d.slice(0,-1):"",loose:!1,items:[]},p=e[0].match(this.rules.block.item),b=!1,g=p.length;r=this.rules.block.listItemStart.exec(p[0]);for(var m=0;mr[1].length:o[1].length>r[0].length||o[1].length>3){p.splice(m,2,p[m]+"\n"+p[m+1]),m--,g--;continue}(!this.options.pedantic||this.options.smartLists?o[2][o[2].length-1]!==d[d.length-1]:h===(1===o[2].length))&&(a=p.slice(m+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-a.length),m=g-1),r=o}i=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(i-=n.length,n=n.replace(this.options.pedantic?/^ {1,4}/gm:new RegExp("^ {1,"+i+"}","gm"),"")),s=b||/\n\n(?!\s*$)/.test(n),m!==g-1&&(b="\n"===n.charAt(n.length-1),s||(s=b)),s&&(f.loose=!0),this.options.gfm&&(u=void 0,(c=/^\[[ xX]\] /.test(n))&&(u=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,""))),f.items.push({type:"list_item",raw:l,task:c,checked:u,loose:s,text:n})}return f}},e.html=function(t){var e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):S(e[0]):e[0]}},e.def=function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},e.table=function(t){var e=this.rules.block.table.exec(t);if(e){var n={type:"table",header:T(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=e[0];var i,r=n.align.length;for(i=0;i/i.test(i[0])&&(e=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:i[0],inLink:e,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):S(i[0]):i[0]}},e.link=function(t){var e=this.rules.inline.link.exec(t);if(e){var n=e[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var i=C(n.slice(0,-1),"\\");if((n.length-i.length)%2==0)return}else{var r=function(t,e){if(-1===t.indexOf(e[1]))return-1;for(var n=t.length,i=0,r=0;r-1){var o=(0===e[0].indexOf("!")?5:4)+e[1].length+r;e[2]=e[2].substring(0,r),e[0]=e[0].substring(0,o).trim(),e[3]=""}}var a=e[2],s="";if(this.options.pedantic){var c=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);c&&(a=c[1],s=c[3])}else s=e[3]?e[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),E(e,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:s?s.replace(this.rules.inline._escapes,"$1"):s},e[0])}},e.reflink=function(t,e){var n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){var i=(n[2]||n[1]).replace(/\s+/g," ");if(!(i=e[i.toLowerCase()])||!i.href){var r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return E(n,i,n[0])}},e.strong=function(t,e,n){void 0===n&&(n="");var i=this.rules.inline.strong.start.exec(t);if(i&&(!i[1]||i[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var r,o="**"===i[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(i=o.exec(e));)if(r=this.rules.inline.strong.middle.exec(e.slice(0,i.index+3)))return{type:"strong",raw:t.slice(0,r[0].length),text:t.slice(2,r[0].length-2)}}},e.em=function(t,e,n){void 0===n&&(n="");var i=this.rules.inline.em.start.exec(t);if(i&&(!i[1]||i[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var r,o="*"===i[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(i=o.exec(e));)if(r=this.rules.inline.em.middle.exec(e.slice(0,i.index+2)))return{type:"em",raw:t.slice(0,r[0].length),text:t.slice(1,r[0].length-1)}}},e.codespan=function(t){var e=this.rules.inline.code.exec(t);if(e){var n=e[2].replace(/\n/g," "),i=/[^ ]/.test(n),r=/^ /.test(n)&&/ $/.test(n);return i&&r&&(n=n.substring(1,n.length-1)),n=S(n,!0),{type:"codespan",raw:e[0],text:n}}},e.br=function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}},e.del=function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2]}},e.autolink=function(t,e){var n,i,r=this.rules.inline.autolink.exec(t);if(r)return i="@"===r[2]?"mailto:"+(n=S(this.options.mangle?e(r[1]):r[1])):n=S(r[1]),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}},e.url=function(t,e){var n;if(n=this.rules.inline.url.exec(t)){var i,r;if("@"===n[2])r="mailto:"+(i=S(this.options.mangle?e(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);i=S(n[0]),r="www."===n[1]?"http://"+i:i}return{type:"link",raw:n[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}},e.inlineText=function(t,e,n){var i,r=this.rules.inline.text.exec(t);if(r)return i=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):S(r[0]):r[0]:S(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}},t}(),P={exec:function(){}},A=function(t,e){t=t.source||t,e=e||"";var n={replace:function(e,i){return i=(i=i.source||i).replace(h,"$1"),t=t.replace(e,i),n},getRegex:function(){return new RegExp(t,e)}};return n},I=k,M={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:P,table:P,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};M.def=A(M.def).replace("label",M._label).replace("title",M._title).getRegex(),M.bullet=/(?:[*+-]|\d{1,9}[.)])/,M.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,M.item=A(M.item,"gm").replace(/bull/g,M.bullet).getRegex(),M.listItemStart=A(/^( *)(bull)/).replace("bull",M.bullet).getRegex(),M.list=A(M.list).replace(/bull/g,M.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+M.def.source+")").getRegex(),M._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",M._comment=/|$)/,M.html=A(M.html,"i").replace("comment",M._comment).replace("tag",M._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),M.paragraph=A(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",M._tag).getRegex(),M.blockquote=A(M.blockquote).replace("paragraph",M.paragraph).getRegex(),M.normal=I({},M),M.gfm=I({},M.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),M.gfm.nptable=A(M.gfm.nptable).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",M._tag).getRegex(),M.gfm.table=A(M.gfm.table).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",M._tag).getRegex(),M.pedantic=I({},M.normal,{html:A("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",M._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:P,paragraph:A(M.normal._paragraph).replace("hr",M.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",M.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var D={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:P,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:P,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};D.punctuation=A(D.punctuation).replace(/punctuation/g,D._punctuation).getRegex(),D._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",D._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",D._comment=A(M._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),D.em.start=A(D.em.start).replace(/punctuation/g,D._punctuation).getRegex(),D.em.middle=A(D.em.middle).replace(/punctuation/g,D._punctuation).replace(/overlapSkip/g,D._overlapSkip).getRegex(),D.em.endAst=A(D.em.endAst,"g").replace(/punctuation/g,D._punctuation).getRegex(),D.em.endUnd=A(D.em.endUnd,"g").replace(/punctuation/g,D._punctuation).getRegex(),D.strong.start=A(D.strong.start).replace(/punctuation/g,D._punctuation).getRegex(),D.strong.middle=A(D.strong.middle).replace(/punctuation/g,D._punctuation).replace(/overlapSkip/g,D._overlapSkip).getRegex(),D.strong.endAst=A(D.strong.endAst,"g").replace(/punctuation/g,D._punctuation).getRegex(),D.strong.endUnd=A(D.strong.endUnd,"g").replace(/punctuation/g,D._punctuation).getRegex(),D.blockSkip=A(D._blockSkip,"g").getRegex(),D.overlapSkip=A(D._overlapSkip,"g").getRegex(),D._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,D._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,D._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,D.autolink=A(D.autolink).replace("scheme",D._scheme).replace("email",D._email).getRegex(),D._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,D.tag=A(D.tag).replace("comment",D._comment).replace("attribute",D._attribute).getRegex(),D._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,D._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,D._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,D.link=A(D.link).replace("label",D._label).replace("href",D._href).replace("title",D._title).getRegex(),D.reflink=A(D.reflink).replace("label",D._label).getRegex(),D.reflinkSearch=A(D.reflinkSearch,"g").replace("reflink",D.reflink).replace("nolink",D.nolink).getRegex(),D.normal=I({},D),D.pedantic=I({},D.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:A(/^!?\[(label)\]\((.*?)\)/).replace("label",D._label).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",D._label).getRegex()}),D.gfm=I({},D.normal,{escape:A(D.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\1;)1&e&&(n+=t),e>>=1,t+=t;return n+t};function F(t){return t.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201c").replace(/"/g,"\u201d").replace(/\.{3}/g,"\u2026")}function B(t){var e,n,i="",r=t.length;for(e=0;e.5&&(n="x"+n.toString(16)),i+="&#"+n+";";return i}var z=function(){function e(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||j,this.options.tokenizer=this.options.tokenizer||new x,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var e={block:L.normal,inline:N.normal};this.options.pedantic?(e.block=L.pedantic,e.inline=N.pedantic):this.options.gfm&&(e.block=L.gfm,e.inline=this.options.breaks?N.breaks:N.gfm),this.tokenizer.rules=e}e.lex=function(t,n){return new e(n).lex(t)},e.lexInline=function(t,n){return new e(n).inlineTokens(t)};var n,i,r=e.prototype;return r.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens},r.blockTokens=function(t,e,n){var i,r,o,a;for(void 0===e&&(e=[]),void 0===n&&(n=!0),this.options.pedantic&&(t=t.replace(/^ +$/gm,""));t;)if(i=this.tokenizer.space(t))t=t.substring(i.raw.length),i.type&&e.push(i);else if(i=this.tokenizer.code(t,e))t=t.substring(i.raw.length),i.type?e.push(i):((a=e[e.length-1]).raw+="\n"+i.raw,a.text+="\n"+i.text);else if(i=this.tokenizer.fences(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.heading(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.nptable(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.hr(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.blockquote(t))t=t.substring(i.raw.length),i.tokens=this.blockTokens(i.text,[],n),e.push(i);else if(i=this.tokenizer.list(t)){for(t=t.substring(i.raw.length),o=i.items.length,r=0;r0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(c));)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,o.index)+"["+U("a",o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,o.index)+"["+U("a",o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(a||(s=""),a=!1,r=this.tokenizer.escape(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.tag(t,n,i))t=t.substring(r.raw.length),n=r.inLink,i=r.inRawBlock,e.push(r);else if(r=this.tokenizer.link(t))t=t.substring(r.raw.length),"link"===r.type&&(r.tokens=this.inlineTokens(r.text,[],!0,i)),e.push(r);else if(r=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(r.raw.length),"link"===r.type&&(r.tokens=this.inlineTokens(r.text,[],!0,i)),e.push(r);else if(r=this.tokenizer.strong(t,c,s))t=t.substring(r.raw.length),r.tokens=this.inlineTokens(r.text,[],n,i),e.push(r);else if(r=this.tokenizer.em(t,c,s))t=t.substring(r.raw.length),r.tokens=this.inlineTokens(r.text,[],n,i),e.push(r);else if(r=this.tokenizer.codespan(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.br(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.del(t))t=t.substring(r.raw.length),r.tokens=this.inlineTokens(r.text,[],n,i),e.push(r);else if(r=this.tokenizer.autolink(t,B))t=t.substring(r.raw.length),e.push(r);else if(n||!(r=this.tokenizer.url(t,B))){if(r=this.tokenizer.inlineText(t,i,F))t=t.substring(r.raw.length),s=r.raw.slice(-1),a=!0,e.push(r);else if(t){var l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}else t=t.substring(r.raw.length),e.push(r);return e},n=e,(i=[{key:"rules",get:function(){return{block:L,inline:N}}}])&&t(n,i),e}(),V=i.defaults,H=function(t,e,n){if(t){var i;try{i=decodeURIComponent(d(n)).replace(f,"").toLowerCase()}catch(r){return null}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return null}e&&!p.test(n)&&(n=function(t,e){b[" "+t]||(b[" "+t]=g.test(t)?t+"/":y(t,"/",!0));var n=-1===(t=b[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(m,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(v,"$1")+e:t+e}(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(r){return null}return n},q=_,$=function(){function t(t){this.options=t||V}var e=t.prototype;return e.code=function(t,e,n){var i=(e||"").match(/\S*/)[0];if(this.options.highlight){var r=this.options.highlight(t,i);null!=r&&r!==t&&(n=!0,t=r)}return t=t.replace(/\n$/,"")+"\n",i?'
    '+(n?t:q(t,!0))+"
    \n":"
    "+(n?t:q(t,!0))+"
    \n"},e.blockquote=function(t){return"
    \n"+t+"
    \n"},e.html=function(t){return t},e.heading=function(t,e,n,i){return this.options.headerIds?"'+t+"\n":""+t+"\n"},e.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},e.list=function(t,e,n){var i=e?"ol":"ul";return"<"+i+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"\n"},e.listitem=function(t){return"
  • "+t+"
  • \n"},e.checkbox=function(t){return" "},e.paragraph=function(t){return"

    "+t+"

    \n"},e.table=function(t,e){return e&&(e=""+e+""),"\n\n"+t+"\n"+e+"
    \n"},e.tablerow=function(t){return"\n"+t+"\n"},e.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' align="'+e.align+'">':"<"+n+">")+t+"\n"},e.strong=function(t){return""+t+""},e.em=function(t){return""+t+""},e.codespan=function(t){return""+t+""},e.br=function(){return this.options.xhtml?"
    ":"
    "},e.del=function(t){return""+t+""},e.link=function(t,e,n){if(null===(t=H(this.options.sanitize,this.options.baseUrl,t)))return n;var i='"+n+""},e.image=function(t,e,n){if(null===(t=H(this.options.sanitize,this.options.baseUrl,t)))return n;var i=''+n+'":">")},e.text=function(t){return t},t}(),Q=function(){function t(){}var e=t.prototype;return e.strong=function(t){return t},e.em=function(t){return t},e.codespan=function(t){return t},e.del=function(t){return t},e.html=function(t){return t},e.text=function(t){return t},e.link=function(t,e,n){return""+n},e.image=function(t,e,n){return""+n},e.br=function(){return""},t}(),W=function(){function t(){this.seen={}}var e=t.prototype;return e.serialize=function(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},e.getNextSafeSlug=function(t,e){var n=t,i=0;if(this.seen.hasOwnProperty(n)){i=this.seen[t];do{n=t+"-"+ ++i}while(this.seen.hasOwnProperty(n))}return e||(this.seen[t]=i,this.seen[n]=0),n},e.slug=function(t,e){void 0===e&&(e={});var n=this.serialize(t);return this.getNextSafeSlug(n,e.dryrun)},t}(),G=i.defaults,Y=O,K=function(){function t(t){this.options=t||G,this.options.renderer=this.options.renderer||new $,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Q,this.slugger=new W}t.parse=function(e,n){return new t(n).parse(e)},t.parseInline=function(e,n){return new t(n).parseInline(e)};var e=t.prototype;return e.parse=function(t,e){void 0===e&&(e=!0);var n,i,r,o,a,s,c,u,l,d,h,f,p,b,g,m,v,y,_="",O=t.length;for(n=0;n0&&"text"===g.tokens[0].type?(g.tokens[0].text=y+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=y+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:y}):b+=y),b+=this.parse(g.tokens,p),l+=this.renderer.listitem(b,v,m);_+=this.renderer.list(l,h,f);continue;case"html":_+=this.renderer.html(d.text);continue;case"paragraph":_+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(l=d.tokens?this.parseInline(d.tokens):d.text;n+1An error occurred:

    "+J(c.message+"",!0)+"
    ";throw c}}return it.options=it.setOptions=function(t){return Z(it.defaults,t),et(it.defaults),it},it.getDefaults=tt,it.defaults=nt,it.use=function(t){var e=Z({},t);if(t.renderer&&function(){var n=it.defaults.renderer||new $,i=function(e){var i=n[e];n[e]=function(){for(var r=arguments.length,o=new Array(r),a=0;aAn error occurred:

    "+J(i.message+"",!0)+"
    ";throw i}},it.Parser=K,it.parser=K.parse,it.Renderer=$,it.TextRenderer=Q,it.Lexer=z,it.lexer=z.lex,it.Tokenizer=x,it.Slugger=W,it.parse=it,it}()},gPG9:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("gCmX");function r(t,e,n,r){return Object(i.c)(t,e,n).apply(this,r)}},gWyO:function(t,e,n){"use strict";n("gCmX")},gelr:function(t,e,n){"use strict";n.r(e),n.d(e,"FlexPreferencesComponent",(function(){return at}));var i=n("zqNl"),r=n("+Px6"),o=n("J/3c"),a=n("3kIJ"),s=n("C05f"),c=n("HM3f"),u=n("YtkY"),l=n("BwBJ"),d=n("jOdJ"),h=n("mWib"),f=n("w0kG"),p=n("qAYy"),b=n("wMit"),g=n("nXdR"),v=n("l5Az"),y=n("i67J"),_=n("YyhG"),O=n("lx5p"),k=n("kZht"),T=n("rfPA"),S=n("bBQR"),E=n("An66"),x=n("anSm"),P=n("yPvj"),A=n("scAs"),I=n("8spT"),M=n("EmXI"),D=n("aDqW"),R=n("IOEv"),j=n("hCLc"),L=n("1eaT"),N=n("LbKT"),U=n("1o0v"),F=n("1etq"),B=n("Tcl6"),z=n("3W1Y"),V=n("cMxr"),H=n("pTnX"),q=n("7J2L"),$=n("rUBT"),Q=n("DpwM"),W=n("rqGg");function G(t,e){1&t&&(k.Ub(0,"div",22),k.Ub(1,"p",23),k.Qc(2," With Cross Margin mode, your total margin will be shared across all your positions. "),k.Tb(),k.Pb(3,"br"),k.Ub(4,"p",23),k.Qc(5," If you want to allocate a certain amount of margin to each specific contract, use isolated margin mode. "),k.Tb(),k.Tb())}function Y(t,e){1&t&&(k.Ub(0,"div",22),k.Ub(1,"p",23),k.Qc(2," If you want to allocate a certain amount of margin to each specific contract, use isolated margin mode. "),k.Tb(),k.Tb())}function K(t,e){if(1&t&&(k.Ub(0,"div",24),k.Ub(1,"div"),k.Ub(2,"nutritional-info"),k.Ub(3,"span",25),k.Qc(4),k.Tb(),k.Ub(5,"span",23),k.Qc(6),k.gc(7,"sato"),k.Ub(8,"span",26),k.Qc(9),k.gc(10,"asset"),k.Tb(),k.Tb(),k.Tb(),k.Ub(11,"nutritional-info"),k.Ub(12,"span",23),k.Qc(13),k.gc(14,"translate"),k.Tb(),k.Ub(15,"span",23),k.Qc(16),k.gc(17,"number"),k.Ub(18,"span",26),k.Qc(19),k.gc(20,"quote"),k.Tb(),k.Tb(),k.Tb(),k.Tb(),k.Ub(21,"div"),k.Ub(22,"nutritional-info"),k.Ub(23,"span",23),k.Qc(24),k.gc(25,"translate"),k.Tb(),k.Ub(26,"span",27),k.Qc(27),k.gc(28,"number"),k.Ub(29,"span",26),k.Qc(30),k.gc(31,"quote"),k.Tb(),k.Tb(),k.Tb(),k.Ub(32,"nutritional-info"),k.Ub(33,"span",23),k.Qc(34),k.Tb(),k.Ub(35,"span",23),k.Qc(36),k.gc(37,"number"),k.Tb(),k.Tb(),k.Tb(),k.Tb()),2&t){var n=k.fc(2).ngIf;k.Cb(3),k.mc("pnl",n.selectedMarketPosition.balance),k.Cb(1),k.Sc("",n.selectedMarketPosition.balance>0?"Long":"Short"," "),k.Cb(2),k.Sc(" ",k.jc(7,13,n.selectedMarketPosition.displaySize,n.selectedMarketPosition.tradingDisplayAsset,"full")," "),k.Cb(3),k.Sc(" ",k.hc(10,17,n.selectedMarketPosition.tradingDisplayAsset)," "),k.Cb(4),k.Sc("",k.hc(14,19,"Current Initial Margin"),":"),k.Cb(3),k.Sc(" ",k.ic(17,21,n.selectedMarketPosition.initial_margin,"1.2-2")," "),k.Cb(3),k.Rc(k.hc(20,24,n.selectedMarketPosition.instrument)),k.Cb(5),k.Sc("",k.hc(25,26,"Available Margin"),":"),k.Cb(2),k.mc("pnl",n.flexWallet.am),k.Cb(1),k.Sc(" ",k.ic(28,28,n.flexWallet.am,"1.2-2")," "),k.Cb(3),k.Rc(k.hc(31,31,n.selectedMarketPosition.instrument)),k.Cb(4),k.Sc(" ","Current Leverage: "," "),k.Cb(2),k.Sc(" ",k.ic(37,33,n.selectedMarketPosition.effective_leverage,"1.2-2"),"x ")}}function Z(t,e){if(1&t){var n=k.Vb();k.Sb(0),k.Ub(1,"p",28),k.Qc(2,"New Initial Margin"),k.Tb(),k.Ub(3,"div",29),k.Ub(4,"mat-form-field",30),k.Ub(5,"mat-label",15),k.Qc(6,"Current Margin"),k.Tb(),k.Pb(7,"input",31),k.Ub(8,"span",32),k.Qc(9,"USD"),k.Tb(),k.Tb(),k.Ub(10,"div"),k.Ub(11,"mat-form-field",30),k.Ub(12,"mat-label",15),k.Qc(13,"Change"),k.Tb(),k.Ub(14,"input",33),k.bc("input",(function(){return k.Ec(n),k.fc(3).changeNew()})),k.Tb(),k.Ub(15,"span",32),k.Qc(16,"USD"),k.Tb(),k.Tb(),k.Ub(17,"p",34),k.Qc(18),k.gc(19,"number"),k.Tb(),k.Tb(),k.Ub(20,"mat-form-field",30),k.Ub(21,"mat-label",15),k.Qc(22,"New Margin"),k.Tb(),k.Ub(23,"input",35),k.bc("input",(function(){return k.Ec(n),k.fc(3).changeDiff()})),k.Tb(),k.Ub(24,"span",32),k.Qc(25,"USD"),k.Tb(),k.Tb(),k.Tb(),k.Rb()}if(2&t){var i=k.fc(2).ngIf;k.Cb(1),k.Lc("margin-bottom","var(--spacing-l)"),k.Cb(16),k.mc("pnl",i.flexWallet.am),k.Cb(1),k.Sc(" Available Margin: ",k.ic(19,4,i.flexWallet.am,"1.2-2")," ")}}var X=function(t){return[1,2,5,10,25,t]};function J(t,e){if(1&t){var n=k.Vb();k.Ub(0,"div"),k.Ub(1,"p",28),k.Qc(2,"New Initial Leverage"),k.Tb(),k.Ub(3,"slider",36),k.bc("stepChange",(function(t){return k.Ec(n),k.fc(3).changeLeverage(t,!0)})),k.Tb(),k.Tb()}if(2&t){var i=k.fc(2).ngIf;k.Cb(3),k.mc("max",i.maxLvg)("logSteps",!0)("min",1)("stepBetween",1)("step",i.currentLvg||1)("adjustedStep",i.sliderLvg)("ticks",k.rc(10,X,i.maxLvg))("suffix","x")("decimals",0)("showLegend",!0)}}function tt(t,e){if(1&t&&(k.Ub(0,"mat-option",37),k.Pb(1,"market-icon",18),k.Qc(2),k.Tb()),2&t){var n=e.$implicit;k.mc("value",n),k.Cb(1),k.mc("base",n),k.Cb(1),k.Sc(" ",n," ")}}function et(t,e){1&t&&(k.Ub(0,"p",23),k.Qc(1," Change in initial margin exceeds available margin. "),k.Tb())}function nt(t,e){if(1&t){var n=k.Vb();k.Ub(0,"form",4),k.bc("ngSubmit",(function(){return k.Ec(n),k.fc(2).submitForm()})),k.Ub(1,"p",5),k.Pb(2,"market-icon",6),k.gc(3,"pair"),k.Ub(4,"span",7),k.Qc(5),k.gc(6,"uppercase"),k.gc(7,"contractFamily"),k.Tb(),k.Qc(8),k.gc(9,"pair"),k.gc(10,"translate"),k.gc(11,"maturityMonth"),k.Tb(),k.Ub(12,"mat-radio-group",8),k.Ub(13,"mat-radio-button",9),k.Qc(14),k.gc(15,"translate"),k.Tb(),k.Ub(16,"mat-radio-button",10),k.Qc(17),k.gc(18,"translate"),k.Tb(),k.Tb(),k.Oc(19,G,6,0,"div",11),k.Oc(20,Y,3,0,"div",11),k.Oc(21,K,38,36,"div",12),k.Oc(22,Z,26,7,"ng-container",13),k.Oc(23,J,4,12,"div",13),k.Ub(24,"mat-form-field",14),k.Ub(25,"mat-label",15),k.Qc(26,"LABEL.PROFIT_CURRENCY"),k.Tb(),k.Ub(27,"mat-select",16),k.Oc(28,tt,3,3,"mat-option",17),k.Tb(),k.Pb(29,"market-icon",18),k.Tb(),k.Ub(30,"div",19),k.Oc(31,et,2,0,"p",20),k.Ub(32,"button",21),k.Qc(33),k.gc(34,"translate"),k.Tb(),k.Tb(),k.Tb()}if(2&t){var i,r,o=k.fc().ngIf,a=k.fc();k.mc("formGroup",a.form),k.Cb(2),k.mc("pair",k.hc(3,18,o.selectedMarket.symbol)),k.Cb(3),k.Tc(""," "," ",k.hc(6,20,k.hc(7,22,o.selectedMarket.symbol)),""),k.Cb(3),k.Tc(" ",k.hc(9,24,o.selectedMarket.symbol)," ",k.hc(10,26,k.ic(11,28,o.selectedMarket.symbol,"short"))," "),k.Cb(6),k.Sc(" ",k.hc(15,31,"Use Cross Margin")," "),k.Cb(3),k.Sc(" ",k.hc(18,33,"Use Isolated Margin")," "),k.Cb(2),k.mc("ngIf","cross"===a.leverageType),k.Cb(1),k.mc("ngIf","isolated"===a.leverageType),k.Cb(1),k.mc("ngIf",o.selectedMarketPosition&&"isolated"===a.leverageType),k.Cb(1),k.mc("ngIf",o.selectedMarketPosition&&"isolated"===a.leverageType),k.Cb(1),k.mc("ngIf",o.maxLvg&&"isolated"===a.leverageType),k.Cb(5),k.mc("ngForOf",o.currencies),k.Cb(1),k.mc("base",null==(i=a.form.get("pnlCurrency"))?null:i.value),k.Cb(2),k.mc("ngIf",null==(r=a.form.get("diffInitialMargin"))||null==r.errors?null:r.errors.marginOverAm),k.Cb(1),k.mc("disabled",a.form.invalid),k.Cb(1),k.Sc(" ",k.hc(34,35,"BUTTON.SAVE")," ")}}function it(t,e){if(1&t&&(k.Ub(0,"section"),k.Oc(1,nt,35,37,"form",3),k.Tb()),2&t){var n=e.ngIf,i=k.fc(),r=k.Ac(15);k.Gb("isolated","isolated"===i.leverageType&&n.selectedMarketPosition),k.Cb(1),k.mc("ngIf",n.currencies&&n.maxLvg)("ngIfElse",r)}}function rt(t,e){1&t&&k.Pb(0,"kraken-loading")}var ot=function(t,e,n,i,r,o,a,s,c,u,l,d){return{selectedMarket:t,leverage:e,pnl:n,currencies:i,selectedTicker:r,maxLvg:o,currentLvg:a,sliderLvg:s,selectedMarketPosition:c,flexWallet:u,minLvg:l,newAm:d}},at=function(){var t=function(){function t(e,n,a){C(this,t),this.store=e,this.formBuilder=n,this.trades=a,this.flexWallet$=this.store.pipe(Object(i.m)(o.l)),this.selectedMarket$=this.store.pipe(Object(i.m)(r.n)),this.leveragePrefs$=this.store.pipe(Object(i.m)(r.o)),this.selectedMarketPosition$=this.store.pipe(Object(i.m)(_.g)),this.pnlPrefs$=this.store.pipe(Object(i.m)(r.q)),this.pnlCurrencies$=this.store.pipe(Object(i.m)(o.e),Object(u.a)((function(t){return null==t?void 0:t.filter((function(t){return!!t})).sort(g.m)}))),this.selectedTicker$=this.store.pipe(Object(i.m)(p.p)),this.maxLvg$=this.store.pipe(Object(i.m)(p.q),Object(l.a)(100)),this.maxLvgBeforeLiquidation$=new s.a(0),this.changedLvg$=new s.a(0),this.minLvg$=new s.a(0),this.newAm$=new s.a(0),this.currentLvg$=this.leveragePrefs$.pipe(Object(d.a)(),Object(u.a)((function(t){return t.cross||!t.maxLeverage?0:t.maxLeverage}))),this.sliderLvg$=Object(c.a)([this.changedLvg$,this.currentLvg$]).pipe(Object(u.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return n>0?n:i})))}return w(t,[{key:"ngOnInit",value:function(){var t=this;Object(c.a)([this.selectedMarket$,this.leveragePrefs$,this.pnlPrefs$,this.currentLvg$,this.selectedMarketPosition$]).pipe(Object(d.a)()).subscribe((function(e){var n,i=m(e,5),r=i[0],o=i[1],s=i[2],c=i[3],u=i[4];t.defaultLvgType=o.cross?"cross":"isolated",t.defaultMaxLvg=o.cross?void 0:o.maxLeverage,t.defaultPnlCurrency=s.pnlCurrency;var l=Object(O.I)(.01)((null==u?void 0:u.initial_margin)||0);t.form=t.formBuilder.group({symbol:null==r?void 0:r.symbol,leverageType:[t.defaultLvgType],currentInitialMargin:[{value:l,disabled:!0}],diffInitialMargin:[0,[a.x.required],t.marginValidator()],initialMargin:[l],maxLeverage:[t.defaultMaxLvg,[a.x.required]],pnlCurrency:[t.defaultPnlCurrency,[a.x.required]]}),null===(n=t.form.get("initialMargin"))||void 0===n||n.valueChanges.pipe(Object(h.a)(250)).subscribe((function(e){"number"==typeof e&&t.changeMargin(e)})),t.changeLeverage(c,!o.cross)}))}},{key:"submitForm",value:function(){var t=this.form.value,e=t.symbol,n=t.leverageType,i=t.maxLeverage,r=t.pnlCurrency,o="cross"===n,a=0===i?1:i;this.store.dispatch(Object(b.a)({prefs:{symbol:e,maxLeverage:o?null:a}})),r!==this.defaultPnlCurrency&&this.store.dispatch(Object(b.b)({prefs:{symbol:e,pnlCurrency:"XBT"===r?"BTC":r}}))}},{key:"changeLeverage",value:function(t){var e,n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];null===(e=this.form.get("maxLeverage"))||void 0===e||e.setValue(t),i&&this.selectedMarket$.pipe(Object(y.g)(),Object(d.a)()).subscribe((function(e){n.trades.calculateMarginFromLeverge({symbol:null==e?void 0:e.symbol,maxLeverage:t}).pipe(Object(d.a)()).subscribe((function(t){var e,i=t.initialMarginOfPosition,r=t.availableMargin,o=t.minimumLeverage;isFinite(i)&&(n.newAm$.next(r),n.minLvg$.next(o),null===(e=n.form.get("initialMargin"))||void 0===e||e.setValue(i.toFixed(2)),n.changeDiff())}))}))}},{key:"changeMargin",value:function(t){var e=this;this.selectedMarket$.pipe(Object(y.g)(),Object(d.a)()).subscribe((function(n){e.trades.calculateLeverageFromMargin({symbol:null==n?void 0:n.symbol,desiredInitialMargin:Number(t)}).pipe(Object(d.a)()).subscribe((function(t){var n,i=t.maxLeverage;e.changedLvg$.next(i),null===(n=e.form.get("maxLeverage"))||void 0===n||n.setValue(i)}))}))}},{key:"changeDiff",value:function(){var t,e=this.form.value.initialMargin,n=null===(t=this.form.get("currentInitialMargin"))||void 0===t?void 0:t.value,i=this.form.get("diffInitialMargin"),r=Number(e)-Number(n);null==i||i.setValue(Object(O.I)(.01)(r))}},{key:"changeNew",value:function(){var t,e=this.form.value.diffInitialMargin,n=null===(t=this.form.get("currentInitialMargin"))||void 0===t?void 0:t.value,i=this.form.get("initialMargin"),r=Number(n)+Number(e);null==i||i.setValue(Object(O.I)(.01)(r))}},{key:"marginValidator",value:function(){var t=this;return function(e){return t.flexWallet$.pipe(Object(d.a)(),Object(f.a)(t.leveragePrefs$),Object(u.a)((function(t){var n=m(t,2),i=n[0],r=n[1];return e.value>=i.am&&!r.cross?{marginOverAm:!0}:null})))}}},{key:"leverageType",get:function(){var t;return null===(t=this.form.get("leverageType"))||void 0===t?void 0:t.value}},{key:"newMargin",get:function(){var t;return null===(t=this.form.get("initialMargin"))||void 0===t?void 0:t.value}},{key:"newLvg",get:function(){var t;return null===(t=this.form.get("maxLeverage"))||void 0===t?void 0:t.value}},{key:"imChange",get:function(){var t;return null===(t=this.form.get("diffInitialMargin"))||void 0===t?void 0:t.value}}]),t}();return t.\u0275fac=function(e){return new(e||t)(k.Ob(i.b),k.Ob(a.d),k.Ob(v.a))},t.\u0275cmp=k.Ib({type:t,selectors:[["flex-preferences"]],decls:16,vars:38,consts:[["heading","HEADING.MC_PREFERENCES"],[3,"isolated",4,"ngIf"],["loading",""],["body","",3,"formGroup","ngSubmit",4,"ngIf","ngIfElse"],["body","",3,"formGroup","ngSubmit"],["heading","",1,"heading"],[3,"pair"],["bold","",1,"family"],["formControlName","leverageType"],["value","cross"],["value","isolated"],["class","description",4,"ngIf"],["class","infos",4,"ngIf"],[4,"ngIf"],["color","accent","appearance","fill",1,"pnl","no-padding"],["translate",""],["matNativeControl","","formControlName","pnlCurrency"],[3,"value",4,"ngFor","ngForOf"],["matPrefix","",1,"form-icon",3,"base"],[1,"errors"],["body","",4,"ngIf"],["mat-raised-button","","body","",3,"disabled"],[1,"description"],["body",""],[1,"infos"],["body","",3,"pnl"],["ghost",""],["body","","pnlZero","",3,"pnl"],["subheading",""],[1,"input-row"],["color","accent","appearance","fill"],["disabled","","matInput","","formControlName","currentInitialMargin","type","number","min","0","inputmode","numeric","autocomplete","off"],["matSuffix",""],["matInput","","formControlName","diffInitialMargin","type","number","inputmode","numeric","autocomplete","off",3,"input"],["caption","","pnlZero","",3,"pnl"],["matInput","","formControlName","initialMargin","type","number","min","0","inputmode","numeric","autocomplete","off",3,"input"],[3,"max","logSteps","min","stepBetween","step","adjustedStep","ticks","suffix","decimals","showLegend","stepChange"],[3,"value"]],template:function(t,e){1&t&&(k.Ub(0,"pro-dialog",0),k.Oc(1,it,2,4,"section",1),k.gc(2,"async"),k.gc(3,"async"),k.gc(4,"async"),k.gc(5,"async"),k.gc(6,"async"),k.gc(7,"async"),k.gc(8,"async"),k.gc(9,"async"),k.gc(10,"async"),k.gc(11,"async"),k.gc(12,"async"),k.gc(13,"async"),k.Tb(),k.Oc(14,rt,1,0,"ng-template",null,2,k.Pc)),2&t&&(k.Cb(1),k.mc("ngIf",k.yc(25,ot,[k.hc(2,1,e.selectedMarket$),k.hc(3,3,e.leveragePrefs$),k.hc(4,5,e.pnlPrefs$),k.hc(5,7,e.pnlCurrencies$),k.hc(6,9,e.selectedTicker$),k.hc(7,11,e.maxLvg$),k.hc(8,13,e.currentLvg$),k.hc(9,15,e.sliderLvg$),k.hc(10,17,e.selectedMarketPosition$),k.hc(11,19,e.flexWallet$),k.hc(12,21,e.minLvg$),k.hc(13,23,e.newAm$)])))},directives:[T.a,S.a,E.n,a.z,a.p,x.a,a.h,P.a,A.a,I.b,a.o,a.g,I.a,M.c,M.f,D.a,R.a,E.m,M.g,j.b,L.a,N.a,U.a,F.a,B.b,a.c,a.s,M.h,z.a,V.a,H.n,q.a],pipes:[E.b,$.e,E.x,$.c,D.d,$.d,Q.c,W.a,E.f,$.f],styles:["section[_ngcontent-%COMP%]{height:400px;width:450px;position:relative}section.isolated[_ngcontent-%COMP%]{height:600px}section[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{margin-bottom:var(--spacing-l)}section[_ngcontent-%COMP%] .pnl[_ngcontent-%COMP%]{position:absolute;bottom:60px;right:0}section[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{margin:var(--spacing) 0;border:1px solid var(--border-colour-dark);border-radius:var(--bdrs);padding:var(--spacing)}section[_ngcontent-%COMP%] .family[_ngcontent-%COMP%]{color:var(--brand)}.input-row[_ngcontent-%COMP%]{display:flex;flex-direction:row}.input-row[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .input-row[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:0;width:100%}.input-row[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:not(:first-child), .input-row[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing)}.infos[_ngcontent-%COMP%]{display:flex;margin-bottom:var(--spacing-l)}.infos[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{flex:1}.infos[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing)}mat-radio-button[_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing-l)}.errors[_ngcontent-%COMP%]{margin-top:var(--spacing);bottom:0;width:100%;position:absolute;display:flex;justify-content:flex-end}.errors[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-right:var(--spacing);color:var(--warn-colour);align-self:center}"],changeDetection:0}),t}()},gx5s:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n}return w(t,[{key:"ngOnInit",value:function(){this.renderer.addClass(this.element.nativeElement,"global__selectable")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","selectable",""]]}),t}()},gxtV:function(t,e,n){"use strict";n.d(e,"a",(function(){return b})),n.d(e,"b",(function(){return g}));var i=n("ZTXN"),r=n("bwdy"),o=n("kZht"),a=n("kuMc"),s=o.db,c=Symbol("__destroy"),u=Symbol("__decoratorApplied");function l(t){return"string"==typeof t?Symbol("__destroy__"+t):c}function d(t,e){t[e]||(t[e]=new i.b)}function h(t,e){t[e]&&(t[e].next(),t[e].complete(),t[e]=null)}function f(t){t instanceof r.a&&t.unsubscribe()}function p(t,e){return function(){var n,i;if(t&&t.call(this),h(this,l()),e.arrayName)return i=this[e.arrayName],void(Array.isArray(i)&&i.forEach(f));if(e.checkProperties)for(var r in this)(null===(n=e.blackList)||void 0===n?void 0:n.includes(r))||f(this[r])}}function b(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){e[s]?function(t,e){var n=t.\u0275pipe;n.onDestroy=p(n.onDestroy,e)}(e,t):function(t,e){t.prototype.ngOnDestroy=p(t.prototype.ngOnDestroy,e)}(e,t),function(t){t.prototype[u]=!0}(e)}}function g(t,e){return function(n){var i=l(e);return"string"==typeof e?function(t,e,n){var i=t[e];d(t,n),t[e]=function(){i.apply(this,arguments),h(this,n),t[e]=i}}(t,e,i):d(t,i),n.pipe(Object(a.a)(t[i]))}}},"h2+Y":function(t,e,n){"use strict";n.d(e,"a",(function(){return m})),n.d(e,"b",(function(){return y}));var i=n("kZht"),r=n("An66"),o=n("pTnX"),s=n("5XID"),u=n("FxgA"),l=n("bwdy"),d=n("KTx3"),h=n("xVbo"),f=["primaryValueBar"],p=Object(o.w)((function t(e){C(this,t),this._elementRef=e}),"primary"),b=new i.s("mat-progress-bar-location",{providedIn:"root",factory:function(){var t=Object(i.W)(r.d),e=t?t.location:null;return{getPathname:function(){return e?e.pathname+e.search:""}}}}),g=0,m=function(){var t=function(t){a(n,t);var e=c(n);function n(t,r,o,a){var s;C(this,n),(s=e.call(this,t))._elementRef=t,s._ngZone=r,s._animationMode=o,s._isNoopAnimation=!1,s._value=0,s._bufferValue=0,s.animationEnd=new i.o,s._animationEndSubscription=l.a.EMPTY,s.mode="determinate",s.progressbarId="mat-progress-bar-"+g++;var c=a?a.getPathname().split("#")[0]:"";return s._rectangleFillValue="url('".concat(c,"#").concat(s.progressbarId,"')"),s._isNoopAnimation="NoopAnimations"===o,s}return w(n,[{key:"_primaryTransform",value:function(){return{transform:"scaleX(".concat(this.value/100,")")}}},{key:"_bufferTransform",value:function(){return"buffer"===this.mode?{transform:"scaleX(".concat(this.bufferValue/100,")")}:null}},{key:"ngAfterViewInit",value:function(){var t=this;this._ngZone.runOutsideAngular((function(){var e=t._primaryValueBar.nativeElement;t._animationEndSubscription=Object(d.a)(e,"transitionend").pipe(Object(h.a)((function(t){return t.target===e}))).subscribe((function(){"determinate"!==t.mode&&"buffer"!==t.mode||t._ngZone.run((function(){return t.animationEnd.next({value:t.value})}))}))}))}},{key:"ngOnDestroy",value:function(){this._animationEndSubscription.unsubscribe()}},{key:"value",get:function(){return this._value},set:function(t){this._value=v(Object(s.f)(t)||0)}},{key:"bufferValue",get:function(){return this._bufferValue},set:function(t){this._bufferValue=v(t||0)}}]),n}(p);return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.l),i.Ob(i.B),i.Ob(u.a,8),i.Ob(b,8))},t.\u0275cmp=i.Ib({type:t,selectors:[["mat-progress-bar"]],viewQuery:function(t,e){var n;1&t&&i.Wc(f,!0),2&t&&i.zc(n=i.cc())&&(e._primaryValueBar=n.first)},hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"mat-progress-bar"],hostVars:4,hostBindings:function(t,e){2&t&&(i.Db("aria-valuenow","indeterminate"===e.mode||"query"===e.mode?null:e.value)("mode",e.mode),i.Gb("_mat-animation-noopable",e._isNoopAnimation))},inputs:{color:"color",mode:"mode",value:"value",bufferValue:"bufferValue"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],features:[i.zb],decls:9,vars:4,consts:[["width","100%","height","4","focusable","false",1,"mat-progress-bar-background","mat-progress-bar-element"],["x","4","y","0","width","8","height","4","patternUnits","userSpaceOnUse",3,"id"],["cx","2","cy","2","r","2"],["width","100%","height","100%"],[1,"mat-progress-bar-buffer","mat-progress-bar-element",3,"ngStyle"],[1,"mat-progress-bar-primary","mat-progress-bar-fill","mat-progress-bar-element",3,"ngStyle"],["primaryValueBar",""],[1,"mat-progress-bar-secondary","mat-progress-bar-fill","mat-progress-bar-element"]],template:function(t,e){1&t&&(i.ec(),i.Ub(0,"svg",0),i.Ub(1,"defs"),i.Ub(2,"pattern",1),i.Pb(3,"circle",2),i.Tb(),i.Tb(),i.Pb(4,"rect",3),i.Tb(),i.dc(),i.Pb(5,"div",4),i.Pb(6,"div",5,6),i.Pb(8,"div",7)),2&t&&(i.Cb(2),i.mc("id",e.progressbarId),i.Cb(2),i.Db("fill",e._rectangleFillValue),i.Cb(1),i.mc("ngStyle",e._bufferTransform()),i.Cb(1),i.mc("ngStyle",e._primaryTransform()))},directives:[r.o],styles:['.mat-progress-bar{display:block;height:4px;overflow:hidden;position:relative;transition:opacity 250ms linear;width:100%}._mat-animation-noopable.mat-progress-bar{transition:none;animation:none}.mat-progress-bar .mat-progress-bar-element,.mat-progress-bar .mat-progress-bar-fill::after{height:100%;position:absolute;width:100%}.mat-progress-bar .mat-progress-bar-background{width:calc(100% + 10px)}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-background{display:none}.mat-progress-bar .mat-progress-bar-buffer{transform-origin:top left;transition:transform 250ms ease}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-buffer{border-top:solid 5px;opacity:.5}.mat-progress-bar .mat-progress-bar-secondary{display:none}.mat-progress-bar .mat-progress-bar-fill{animation:none;transform-origin:top left;transition:transform 250ms ease}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-fill{border-top:solid 4px}.mat-progress-bar .mat-progress-bar-fill::after{animation:none;content:"";display:inline-block;left:0}.mat-progress-bar[dir=rtl],[dir=rtl] .mat-progress-bar{transform:rotateY(180deg)}.mat-progress-bar[mode=query]{transform:rotateZ(180deg)}.mat-progress-bar[mode=query][dir=rtl],[dir=rtl] .mat-progress-bar[mode=query]{transform:rotateZ(180deg) rotateY(180deg)}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-fill,.mat-progress-bar[mode=query] .mat-progress-bar-fill{transition:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary,.mat-progress-bar[mode=query] .mat-progress-bar-primary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-translate 2000ms infinite linear;left:-145.166611%}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-primary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-scale 2000ms infinite linear}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary,.mat-progress-bar[mode=query] .mat-progress-bar-secondary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-translate 2000ms infinite linear;left:-54.888891%;display:block}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-secondary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-scale 2000ms infinite linear}.mat-progress-bar[mode=buffer] .mat-progress-bar-background{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-background-scroll 250ms infinite linear;display:block}.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-buffer,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-background{animation:none;transition-duration:1ms}@keyframes mat-progress-bar-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mat-progress-bar-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mat-progress-bar-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mat-progress-bar-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mat-progress-bar-background-scroll{to{transform:translateX(-8px)}}\n'],encapsulation:2,changeDetection:0}),t}();function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;return Math.max(e,Math.min(n,t))}var y=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},imports:[[r.c,o.j],o.j]}),t}()},h3eB:function(t,e,n){"use strict";n.d(e,"j",(function(){return r})),n.d(e,"h",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"o",(function(){return s})),n.d(e,"n",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"d",(function(){return l})),n.d(e,"c",(function(){return d})),n.d(e,"f",(function(){return h})),n.d(e,"m",(function(){return f})),n.d(e,"l",(function(){return p})),n.d(e,"b",(function(){return b})),n.d(e,"i",(function(){return g})),n.d(e,"k",(function(){return m})),n.d(e,"a",(function(){return v}));var i=n("zqNl"),r=Object(i.g)("Reset Trades State"),o=Object(i.g)("Open User Activity Feeds"),a=Object(i.g)("Close User Activity Feeds"),s=Object(i.g)("Submit Order",Object(i.l)()),c=Object(i.g)("Submit Bracket Order",Object(i.l)()),u=Object(i.g)("Edit Order",Object(i.l)()),l=Object(i.g)("Cancel Order",Object(i.l)()),d=Object(i.g)("Cancel All Orders"),h=Object(i.g)("Display Order Status",Object(i.l)()),f=Object(i.g)("Set Open Positions",Object(i.l)()),p=Object(i.g)("Set Open Orders",Object(i.l)()),b=Object(i.g)("Add Open Order",Object(i.l)()),g=Object(i.g)("Remove Open Order",Object(i.l)()),m=Object(i.g)("Set Fills",Object(i.l)()),v=Object(i.g)("Add Fills",Object(i.l)());Object(i.g)("Calculate Leverage from Margin",Object(i.l)()),Object(i.g)("Calculate Margin from Leverage",Object(i.l)())},hCLc:function(t,e,n){"use strict";n.d(e,"a",(function(){return g})),n.d(e,"b",(function(){return b})),n.d(e,"c",(function(){return m}));var i=n("kZht"),r=n("pTnX"),o=n("jL3B"),s=n("FxgA"),u=["mat-button",""],l=["*"],d=".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.cdk-high-contrast-active .mat-button-focus-overlay{background-color:#fff}.cdk-high-contrast-black-on-white .mat-button-focus-overlay{background-color:#000}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}\n",h=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],f=Object(r.w)(Object(r.y)(Object(r.x)((function t(e){C(this,t),this._elementRef=e})))),b=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;C(this,n),(o=e.call(this,t))._focusMonitor=i,o._animationMode=r,o.isRoundButton=o._hasHostAttributes("mat-fab","mat-mini-fab"),o.isIconButton=o._hasHostAttributes("mat-icon-button");var a,s=p(h);try{for(s.s();!(a=s.n()).done;){var c=a.value;o._hasHostAttributes(c)&&o._getHostElement().classList.add(c)}}catch(u){s.e(u)}finally{s.f()}return t.nativeElement.classList.add("mat-button-base"),o.isRoundButton&&(o.color="accent"),o}return w(n,[{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._getHostElement(),t,e)}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_hasHostAttributes",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i0)("ngIfElse",i)}}var D=function(t){return{pair:t}};function R(t,e){if(1&t&&(p.Ub(0,"p"),p.Qc(1),p.gc(2,"translate"),p.Tb()),2&t){var n=e.ngIf;p.Cb(1),p.Sc(" ",p.ic(2,1,"NO_CONTENT.PAIR_TRIGGERS",p.rc(4,D,n))," ")}}function j(t,e){1&t&&(p.Ub(0,"p",12),p.Qc(1,"NO_CONTENT.ORDERS_TRIGGERS"),p.Tb())}function L(t,e){if(1&t&&(p.Ub(0,"section",9),p.Pb(1,"fa-icon",10),p.Oc(2,R,3,6,"p",4),p.gc(3,"async"),p.Oc(4,j,2,0,"ng-template",null,11,p.Pc),p.Tb()),2&t){var n=p.Ac(5),i=p.fc(),r=null;p.Cb(2),p.mc("ngIf",null==(r=p.hc(3,2,i.filterPair$))?null:r.orUndefined())("ngIfElse",n)}}function N(t,e){1&t&&p.Pb(0,"kraken-loading")}var U=function(){var t=function(){function t(e,n,r){C(this,t),this.store=e,this.translate=n,this.market=r,this.displayTooltips$=this.store.pipe(Object(i.m)(f.y)),this.orders$=this.store.pipe(Object(i.m)(l.o),Object(a.p)()),this.wallets$=this.store.pipe(Object(i.m)(d.h)),this.markets$=this.store.pipe(Object(i.m)(u.f)),this.filterPair$=this.store.pipe(Object(i.m)(f.q)),this.userSelectedFuturesWallet$=this.store.pipe(Object(i.m)(d.n))}return w(t,[{key:"selectTicker",value:function(t){var e=t.symbol,n=t.replaceUrl;this.market.navigateToMarket(e,n)}},{key:"editOrder",value:function(t){var e=this,n=t.order;Object(r.a)([this.markets$,this.userSelectedFuturesWallet$]).pipe(Object(o.a)()).subscribe((function(t){var i=m(t,2),r=i[0],o=i[1],a=r.get(n.instrument),c=null==o?void 0:o.am;e.store.dispatch(Object(s.g)({name:"edit-order",inputs:{order:n,instrument:a,availableMargin:c}}))}))}},{key:"cancelOrder",value:function(t){var e=t.id;this.store.dispatch(Object(c.d)({id:e}))}},{key:"cancelAllOrders",value:function(){this.store.dispatch(Object(s.g)({name:"confirmation",inputs:{title:"DIALOG.CONFIRM_ORDER_CANCEL.TITLE",subtitle:"DIALOG.CONFIRM_ORDER_CANCEL.SUBTITLE",body:this.translate.instant("DIALOG.CONFIRM_ORDER_CANCEL.BODY"),buttons:[{label:"BUTTON.YES",colour:"accent",actions:[Object(c.c)(),Object(s.c)()]},{label:"BUTTON.NO",colour:"warn",actions:[Object(s.c)()]}]}}))}},{key:"viewDetailed",value:function(t){var e=this,n=t.order;this.markets$.pipe(Object(a.h)()).subscribe((function(t){var i=t.get(n.instrument);e.store.dispatch(Object(s.g)({name:"order-details",inputs:{order:n,instrument:i}}))}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(p.Ob(i.b),p.Ob(b.e),p.Ob(h.a))},t.\u0275cmp=p.Ib({type:t,selectors:[["trigger-orders"]],decls:6,vars:3,consts:[["class","table-wrapper","breakpoint","",3,"breakpoints",4,"ngLet"],["noEntries",""],["loader",""],["breakpoint","",1,"table-wrapper",3,"breakpoints"],[4,"ngIf","ngIfElse"],[3,"orders","displayTooltips","selectTicker","editOrder","cancelOrder","cancelAllOrders","viewDetailed"],[3,"itemSize"],[3,"order","selectTicker","editOrder","cancelOrder","viewDetailed",4,"cdkVirtualFor","cdkVirtualForOf"],[3,"order","selectTicker","editOrder","cancelOrder","viewDetailed"],["body","","ghost","",1,"no-activity"],["icon","list","size","3x"],["unfiltered",""],["translate",""]],template:function(t,e){1&t&&(p.Oc(0,M,2,4,"div",0),p.gc(1,"async"),p.Oc(2,L,6,4,"ng-template",null,1,p.Pc),p.Oc(4,N,1,0,"ng-template",null,2,p.Pc)),2&t&&p.mc("ngLet",p.hc(1,1,e.orders$))},directives:[g.a,v.a,y.n,_.a,O.e,O.a,O.d,k.a,T.a,S.a,E.b,b.a,x.a],pipes:[y.b,b.d],styles:["market-icon[_ngcontent-%COMP%]{font-size:20px}[_nghost-%COMP%]{display:flex;flex-direction:column;padding:var(--spacing)}.table-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%]{height:100%}.no-activity[_ngcontent-%COMP%]{text-align:center;padding:var(--spacing-l)}cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{height:100%}@media (max-width:1024px){.table-wrapper[_ngcontent-%COMP%] trigger-orders-desktop[_ngcontent-%COMP%]{display:none}.table-wrapper[_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%]{display:block!important}}.table-wrapper[breakpoint=large][_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%], .table-wrapper[breakpoint=medium][_ngcontent-%COMP%] cdk-virtual-scroll-viewport[_ngcontent-%COMP%], .table-wrapper[breakpoint=small][_ngcontent-%COMP%] trigger-orders-desktop[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),t}()},houi:function(t,e,n){"use strict";n.d(e,"a",(function(){return Pt}));var i=n("D57K"),r=n("gxtV"),o=n("zqNl"),a=n("KQpv"),s=n.n(a),c=n("og7C"),u=n("C05f"),l=n("HM3f"),d=n("KTx3"),h=n("P4Xx"),f=n("YtkY"),p=n("wqq/"),g=n("xVbo"),v=n("w0kG"),y=n("8j5Y"),_=n("Wg7D"),O=n("jOdJ"),k=n("iT4G"),T=n("yBos"),S=n("VmIW"),E=n("i67J"),x=n("a1kK"),P=n("CW1w"),A=n("uJYd"),I=n("h3eB"),M=n("sXtk"),D=n("bjK4"),R=n("+Px6"),j=n("YyhG"),L=n("rxqU"),N=n("l5Az"),U=n("kZht"),F=n("Eu46"),B=n("F6wS"),z=n("TMzY"),V=n("An66"),H=n("anSm"),q=n("1o0v"),$=n("oiza"),Q=n("IkSM"),W=n("B6Vo"),G=n("Cc4E"),Y=n("zho4"),K=n("NxuZ"),Z=n("WYJo"),X=n("AD/o"),J=n("chaP"),tt=n("rEzU"),et=n("7J2L"),nt=n("aDqW"),it=n("DpwM"),rt=["content"];function ot(t,e){1&t&&U.Qb(0)}function at(t,e){if(1&t&&(U.Ub(0,"div",9),U.Oc(1,ot,1,0,"ng-container",10),U.gc(2,"async"),U.Tb()),2&t){U.fc();var n=U.Ac(8),i=U.fc(),r=U.Ac(9);U.Cb(1),U.mc("ngIf",U.hc(2,3,i.spread$))("ngIfThen",n)("ngIfElse",r)}}function st(t,e){1&t&&U.Qb(0)}var ct=function(t,e,n){return{$implicit:t,side:"asks",row:e,fill:n}};function ut(t,e){if(1&t&&(U.Sb(0),U.Oc(1,st,1,0,"ng-container",18),U.Rb()),2&t){var n=e.$implicit,i=e.index,r=U.fc().$implicit;U.fc(2);var o=U.Ac(10),a=U.fc();U.Cb(1),U.mc("ngTemplateOutlet",o)("ngTemplateOutletContext",U.tc(2,ct,n,a.askRow(i),a.clampFill(n.total/r)))}}function lt(t,e){1&t&&U.Qb(0)}function dt(t,e){if(1&t&&(U.Ub(0,"div",9),U.Oc(1,lt,1,0,"ng-container",10),U.gc(2,"async"),U.Tb()),2&t){U.fc(3);var n=U.Ac(8),i=U.fc(),r=U.Ac(9);U.Cb(1),U.mc("ngIf",U.hc(2,3,i.spread$))("ngIfThen",n)("ngIfElse",r)}}var ht=function(){return[250,100]};function ft(t,e){if(1&t&&(U.Sb(0),U.Ub(1,"div",12),U.Qc(2),U.gc(3,"translate"),U.Tb(),U.Ub(4,"div",19),U.Qc(5),U.gc(6,"translate"),U.Tb(),U.Ub(7,"div",14),U.Qc(8),U.gc(9,"translate"),U.Tb(),U.Rb()),2&t){var n=U.fc(3).ngLet;U.Cb(1),U.mc("sbTooltip","TOOLTIP.BUY_PRICE")("sbDisabled",!n.displayTooltips)("sbDelay",U.qc(17,ht)),U.Cb(1),U.Sc(" ",U.hc(3,11,"COLUMN.PRICE")," "),U.Cb(3),U.Tc(" ",U.hc(6,13,"COLUMN.SIZE")," (",n.sizeUnit,") "),U.Cb(2),U.mc("sbTooltip","TOOLTIP.BUY_TOTAL")("sbDisabled",!n.displayTooltips)("sbDelay",U.qc(18,ht)),U.Cb(1),U.Tc(" ",U.hc(9,15,"COLUMN.TOTAL")," (",n.sizeUnit,") ")}}function pt(t,e){1&t&&U.Qb(0)}var bt=function(t,e,n){return{$implicit:t,side:"bids",row:e,fill:n}};function gt(t,e){if(1&t&&(U.Sb(0),U.Oc(1,pt,1,0,"ng-container",18),U.Rb()),2&t){var n=e.$implicit,i=e.index,r=U.fc().$implicit;U.fc(2);var o=U.Ac(10),a=U.fc();U.Cb(1),U.mc("ngTemplateOutlet",o)("ngTemplateOutletContext",U.tc(2,bt,n,a.bidRow(i),a.clampFill(n.total/r)))}}function mt(t,e){if(1&t&&(U.Sb(0),U.Ub(1,"div",11),U.Sb(2),U.Ub(3,"div",12),U.Qc(4),U.gc(5,"translate"),U.Tb(),U.Ub(6,"div",13),U.Qc(7),U.gc(8,"translate"),U.gc(9,"async"),U.Tb(),U.Ub(10,"div",14),U.Qc(11),U.gc(12,"translate"),U.gc(13,"async"),U.Tb(),U.Rb(),U.Oc(14,ut,2,6,"ng-container",15),U.gc(15,"async"),U.Tb(),U.Oc(16,dt,3,5,"div",4),U.Ub(17,"div",16),U.Oc(18,ft,10,19,"ng-container",17),U.Oc(19,gt,2,6,"ng-container",15),U.gc(20,"async"),U.Tb(),U.Rb()),2&t){var n=U.fc(2).ngLet,i=U.fc();U.Cb(3),U.mc("sbTooltip","horizontal"===i.orientation?"TOOLTIP.SELL_PRICE":"TOOLTIP.ORDERBOOK_PRICE")("sbDisabled",!n.displayTooltips)("sbDelay",U.qc(35,ht)),U.Cb(1),U.Sc(" ",U.hc(5,21,"COLUMN.PRICE")," "),U.Cb(2),U.mc("sbDisabled",!n.displayTooltips)("sbDelay",U.qc(36,ht)),U.Cb(1),U.Tc(" ",U.hc(8,23,"COLUMN.SIZE")," (",U.hc(9,25,i.sizeUnit$),") "),U.Cb(3),U.mc("sbTooltip","horizontal"===i.orientation?"TOOLTIP.SELL_TOTAL":"TOOLTIP.ORDERBOOK_TOTAL")("sbDisabled",!n.displayTooltips)("sbDelay",U.qc(37,ht)),U.Cb(1),U.Tc(" ",U.hc(12,27,"COLUMN.TOTAL")," (",U.hc(13,29,i.sizeUnit$),") "),U.Cb(3),U.mc("ngForOf",U.hc(15,31,i.asksTable$))("ngForTrackBy",i.trackByPrice),U.Cb(2),U.mc("ngIf","horizontal"!==i.orientation),U.Cb(1),U.Gb("book--flipy","horizontal"===i.orientation),U.Cb(1),U.mc("ngIf","horizontal"===i.orientation),U.Cb(1),U.mc("ngForOf",U.hc(20,33,i.bidsTable$))("ngForTrackBy",i.trackByPrice)}}function vt(t,e){if(1&t&&(U.Sb(0),U.Oc(1,mt,21,38,"ng-container",6),U.gc(2,"async"),U.Rb()),2&t){var n=U.fc(2),i=U.Ac(11);U.Cb(1),U.mc("ngIf",U.hc(2,2,n.largestTotal$))("ngIfElse",i)}}function yt(t,e){if(1&t){var n=U.Vb();U.Ub(0,"span"),U.Qc(1),U.gc(2,"sato"),U.Ub(3,"span",20),U.Qc(4),U.gc(5,"translate"),U.Tb(),U.Tb(),U.Ub(6,"span"),U.Qc(7),U.gc(8,"percent"),U.Tb(),U.Ub(9,"span"),U.Qc(10,"|"),U.Tb(),U.Ub(11,"span",21),U.Qc(12),U.gc(13,"translate"),U.gc(14,"sato"),U.Tb(),U.Ub(15,"span",22),U.Ub(16,"fa-icon",23),U.bc("click",(function(){return U.Ec(n),U.fc(2).decreaseGrouping()})),U.gc(17,"translate"),U.Tb(),U.Ub(18,"fa-icon",24),U.bc("click",(function(){return U.Ec(n),U.fc(2).increaseGrouping()})),U.gc(19,"translate"),U.Tb(),U.Tb()}if(2&t){var i=e.$implicit,r=U.fc().ngLet,o=U.fc();U.Cb(1),U.Sc(" ",U.ic(2,15,i.value,r.market)," "),U.Cb(2),U.mc("sbDisabled",!r.displayTooltips)("sbDelay",U.qc(32,ht)),U.Cb(1),U.Sc(" ",U.hc(5,18,"LABEL.SPREAD")," "),U.Cb(3),U.Sc("(",U.ic(8,20,i.percent,"1.2-2"),")"),U.Cb(4),U.mc("sbDisabled",!r.displayTooltips)("sbDelay",U.qc(33,ht)),U.Cb(1),U.Tc(" ",U.hc(13,23,"LABEL.GROUP"),": ",U.ic(14,25,o.groupingTickSize(r.market,r.grouping),r.market)," "),U.Cb(4),U.Gb("group--disabled",1===r.grouping),U.mc("matTooltip",U.hc(17,28,"TOOLTIP.DECREASE_ORDER_GROUPING")),U.Cb(2),U.Gb("group--disabled",5e3===r.grouping),U.mc("matTooltip",U.hc(19,30,"TOOLTIP.INCREASE_ORDER_GROUPING"))}}function _t(t,e){if(1&t){var n=U.Vb();U.Ub(0,"fa-icon",32),U.bc("click",(function(t){U.Ec(n);var e=U.fc().$implicit,i=U.fc(2);return t.preventDefault(),i.cancelFirstOrderAtPrice(e.price)})),U.gc(1,"translate"),U.Tb()}2&t&&U.mc("matTooltip",U.hc(1,1,"TOOLTIP.CANCEL_OPEN_ORDER"))}var Ot=function(t,e){return{"global__text--accent":t,"global__text--warn":e}};function kt(t,e){if(1&t){var n=U.Vb();U.Pb(0,"div"),U.Pb(1,"div",25),U.Pb(2,"div",26),U.Ub(3,"div",27),U.bc("click",(function(){U.Ec(n);var t=e.$implicit;return U.fc(2).updateFormPrice(t.price,t.qty)})),U.Qc(4),U.gc(5,"sato"),U.Tb(),U.Ub(6,"div",28),U.bc("click",(function(){U.Ec(n);var t=e.$implicit;return U.fc(2).updateFormQty(t.qty,t.price)})),U.Qc(7),U.gc(8,"satoSize"),U.Tb(),U.Ub(9,"div",29),U.bc("click",(function(){U.Ec(n);var t=e.$implicit;return U.fc(2).updateFormQty(t.total,t.price)})),U.Qc(10),U.gc(11,"satoSize"),U.Tb(),U.Ub(12,"div",30),U.bc("click",(function(){U.Ec(n);var t=e.$implicit;return U.fc(2).updateFormPrice(t.price,t.qty)})),U.Oc(13,_t,2,3,"fa-icon",31),U.Tb()}if(2&t){var i=e.$implicit,r=e.side,o=e.row,a=e.fill,s=U.fc().ngLet,c=U.fc();U.Lc("grid-row-start",o),U.Gb("row",!0)("hover",c.hoveredSide===r&&c.hoveredIdx===o),U.Db("data-row",o),U.Cb(1),U.Lc("grid-row-start",o)("--fill",a),U.Db("data-row",o),U.Cb(1),U.Lc("grid-row-start",o),U.Db("data-row",o),U.Cb(1),U.Lc("grid-row-start",o),U.Gb("update-cell",!s.updatePriceAndQty),U.mc("ngClass",U.sc(47,Ot,"bids"===r&&"dark"===s.theme,"asks"===r&&"dark"===s.theme)),U.Db("data-row",o),U.Cb(1),U.Sc(" ",U.ic(5,38,i.price,s.market)," "),U.Cb(2),U.Lc("grid-row-start",o),U.Gb("update-cell",!s.updatePriceAndQty),U.Db("data-row",o),U.Cb(1),U.Sc(" ",U.ic(8,41,i.displayQty,s.market)," "),U.Cb(2),U.Lc("grid-row-start",o),U.Gb("update-cell",!s.updatePriceAndQty),U.Db("data-row",o),U.Cb(1),U.Sc(" ",U.ic(11,44,i.displayTotal,s.market)," "),U.Cb(2),U.Lc("grid-row-start",o),U.Db("data-row",o),U.Cb(1),U.mc("ngIf",i.hasOpen)}}function wt(t,e){if(1&t){var n=U.Vb();U.Sb(0),U.Ub(1,"mat-card",3),U.bc("orientationChange",(function(t){return U.Ec(n),U.fc().orientationChange(t)})),U.Oc(2,at,3,5,"div",4),U.Ub(3,"mat-card-content",null,5),U.Oc(5,vt,3,4,"ng-container",6),U.gc(6,"async"),U.Tb(),U.Tb(),U.Oc(7,yt,20,34,"ng-template",null,7,U.Pc),U.Oc(9,kt,14,50,"ng-template",null,8,U.Pc),U.Rb()}if(2&t){var i=U.fc(),r=U.Ac(11);U.Cb(2),U.mc("ngIf","horizontal"===i.orientation),U.Cb(3),U.mc("ngIf",U.hc(6,3,i.loaded$))("ngIfElse",r)}}function Ct(t,e){if(1&t&&(U.Ub(0,"span",20),U.gc(1,"async"),U.Qc(2),U.gc(3,"translate"),U.Tb(),U.Ub(4,"span"),U.Qc(5,": -"),U.Tb()),2&t){var n=U.fc();U.mc("sbDisabled",!1===U.hc(1,3,n.displayTooltips$))("sbDelay",U.qc(7,ht)),U.Cb(2),U.Sc(" ",U.hc(3,5,"LABEL.SPREAD")," ")}}function Tt(t,e){1&t&&U.Pb(0,"kraken-loading")}var St=function(t,e,n,i,r,o,a){return{market:t,grouping:e,displayTooltips:n,sizeFormatter:i,sizeUnit:r,updatePriceAndQty:o,theme:a}},Et=s()("app:book");function xt(t,e,n,i,r){var o=m(t,3),a=o[0],s=o[1],c=o[2],u=m(e,2),l=u[0],d=u[1],h=s+d,f=Object(P.d)(d,l,i),p=c+f,b={notionalQty:f,displayQty:"order"===r?d:f,notionalTotal:p,displayTotal:"order"===r?h:p};return a.push(Object.assign({qty:d,price:l,total:h,hasOpen:n.has(l)},b)),[a,h,p]}var Pt=function(){var t=function(){function t(e,n,i,r,a,s){var d=this;C(this,t),this.el=e,this.env=n,this.cdr=i,this.store=r,this.trade=a,this.zone=s,this.loaded$=new u.a(!1),this.retryDelay=100,this.hoveredSide="",this.hoveredIdx=-1,this.orientation="vertical",this.horizontal=!1,this.fullBook=!1,this.throttle=250,this.depthMultiplier=1,this.userData$=this.store.pipe(Object(o.m)(L.a)),this.displayTooltips$=this.store.pipe(Object(o.m)(L.y)),this.updatePriceAndQty$=this.userData$.pipe(Object(f.a)((function(t){return t.updateFormQuantityFromBook}))),this.fullOrderbook$=this.userData$.pipe(Object(f.a)((function(t){return t.fullOrderbook}))),this.assets$=this.store.pipe(Object(o.m)(R.d)),this.selectedMarket$=this.store.pipe(Object(o.m)(R.n)),this.selectedSymbolParts$=this.store.pipe(Object(o.m)(R.t)),this.orderbookGroup$=this.store.pipe(Object(o.m)(D.p)),this.orderbookDepth$=this.store.pipe(Object(o.m)(D.o)),this.userOrderPrices$=this.store.pipe(Object(o.m)(j.c)),this.userTradeOrders$=this.store.pipe(Object(o.m)(j.l)),this.quantityUnits$=this.store.pipe(Object(o.m)(L.r)),this.sizeUnit$=this.store.pipe(Object(o.m)(j.n)),this.sizeFormatter$=this.store.pipe(Object(o.m)(j.m)),this.layoutTheme$=this.store.pipe(Object(o.m)(D.q)),this.subbedProduct=void 0,this.subbedGrouping=1,this.asksMap$=new u.a(Object(c.b)()),this.bidsMap$=new u.a(Object(c.b)()),this.asks$=this.asksMap$.pipe(Object(f.a)((function(t){return t.filter((function(t){return t>0}))}))),this.bids$=this.bidsMap$.pipe(Object(f.a)((function(t){return t.filter((function(t){return t>0}))}))),this.asksData$=Object(l.a)([this.asks$,this.userOrderPrices$,this.orderbookDepth$,this.selectedSymbolParts$,this.quantityUnits$]).pipe(Object(f.a)((function(t){var e=m(t,5),n=e[0],i=e[1],r=e[2],o=e[3],a=e[4];return n.toArray().sort((function(t,e){return t[0]-e[0]})).slice(0,d.fullBook?void 0:r).reduce((function(t,e){return xt(t,e,i,o.inverse,a.trading)}),[[],0,0])})),Object(p.a)(1)),this.bidsData$=Object(l.a)([this.bids$,this.userOrderPrices$,this.orderbookDepth$,this.selectedSymbolParts$,this.quantityUnits$]).pipe(Object(f.a)((function(t){var e=m(t,5),n=e[0],i=e[1],r=e[2],o=e[3],a=e[4];return n.toArray().sort((function(t,e){return e[0]-t[0]})).slice(0,d.fullBook?void 0:r).reduce((function(t,e){return xt(t,e,i,o.inverse,a.trading)}),[[],0,0])})),Object(p.a)(1)),this.asksTable$=this.asksData$.pipe(Object(f.a)((function(t){var e=m(t,1)[0];return"horizontal"===d.orientation?e:b(e).reverse()})),Object(E.p)(this.throttle)),this.bidsTable$=this.bidsData$.pipe(Object(f.a)((function(t){return m(t,1)[0]})),Object(E.p)(this.throttle)),this.largestTotal$=Object(l.a)([this.asksData$,this.bidsData$]).pipe(Object(f.a)((function(t){var e=m(t,2),n=m(e[0],2)[1],i=m(e[1],2)[1];return Math.max(n,i,1)})),Object(E.p)(this.throttle)),this.spread$=Object(l.a)([this.asksData$,this.bidsData$]).pipe(Object(f.a)((function(t){var e=m(t,2),n=m(e[0],1)[0],i=m(e[1],1)[0];return Object(x.g)(n,i)})),Object(E.p)(this.throttle))}return w(t,[{key:"ngOnInit",value:function(){var t=this;this.handleBookMsgs(),this.fullOrderbook$.pipe(Object(r.b)(this)).subscribe((function(e){t.depthMultiplier=e?3:1,t.updateOrderbookDepth(t.calculateDepth)})),this.selectedMarket$.pipe(Object(r.b)(this)).subscribe((function(e){e&&t.resubFeed(e.symbol,t.subbedGrouping)})),this.orderbookGroup$.pipe(Object(r.b)(this)).subscribe((function(e){e&&t.resubFeed(t.subbedProduct,e)})),this.userOrderPrices$.pipe(Object(r.b)(this)).subscribe((function(){t.bidsMap$.next(Object(c.b)(t.bidsMap$.value)),t.asksMap$.next(Object(c.b)(t.asksMap$.value))})),Object(d.a)(document,"visibilitychange").pipe(Object(r.b)(this)).subscribe((function(){document.hidden&&t.socket$?t.socket$.complete():t.restartSocket()}))}},{key:"ngAfterContentInit",value:function(){var t=this;Object(d.a)(this.el.nativeElement,"mouseover").pipe(Object(g.a)((function(t){return!!t.target&&!!t.target.dataset.row})),Object(r.b)(this)).subscribe((function(e){var n=e.target,i=n.dataset.row||"-1",r=n.closest(".book");t.hoveredSide=r.classList.contains("asks")?"asks":"bids",t.hoveredIdx=Number(i),t.cdr.detectChanges()})),Object(d.a)(this.el.nativeElement,"mouseleave").subscribe((function(e){t.hoveredSide="",t.hoveredIdx=-1,t.cdr.detectChanges()}))}},{key:"ngOnChanges",value:function(t){t.horizontal&&t.horizontal.currentValue&&this.updateOrderbookDepth(this.calculateDepth)}},{key:"setWheelScroll",value:function(){var t=this;Object(d.a)(this.el.nativeElement,"wheel").pipe(Object(g.a)((function(e){return 1===t.depthMultiplier})),Object(v.a)(this.orderbookGroup$),Object(y.a)((function(t){var e=m(t,2),n=e[0];e[1];return n.preventDefault()})),Object(_.a)(80),Object(g.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return 1===i?n.deltaY<0:5e3!==i||n.deltaY>0})),Object(f.a)((function(t){var e=m(t,2),n=e[0];e[1];return n.deltaY<0?"plus":"minus"})),Object(r.b)(this)).subscribe((function(e){return t.store.dispatch(Object(A.w)({direction:e}))}))}},{key:"updateOrderbookDepth",value:function(t){var e=this;this.zone.run((function(){return e.store.dispatch(Object(A.v)({depth:t*e.depthMultiplier}))}))}},{key:"updateFormPrice",value:function(t,e){var n=this;this.updatePriceAndQty$.pipe(Object(O.a)()).subscribe((function(i){i&&(Et("updating order form",{quantity:e}),n.trade.updateOrderFormQty(e)),Et("updating order form",{price:t}),n.trade.updateOrderFormPrice(t)}))}},{key:"updateFormQty",value:function(t,e){var n=this;this.updatePriceAndQty$.pipe(Object(O.a)()).subscribe((function(i){i&&e&&(Et("updating order form",{price:e}),n.trade.updateOrderFormPrice(e)),Et("updating order form",{quantity:t}),n.trade.updateOrderFormQty(t)}))}},{key:"cancelFirstOrderAtPrice",value:function(t){var e=this;Object(h.a)([this.selectedMarket$.pipe(Object(E.h)()),this.userTradeOrders$.pipe(Object(O.a)())]).pipe(Object(O.a)()).subscribe((function(n){var i=m(n,2),r=i[0];i[1].filter((function(t){return t.instrument.toLowerCase()===r.symbol.toLowerCase()})).filter((function(e){return e.limit_price===t})).map((function(t){return Object(S.Some)(t.order_id)})).first(Object(S.None)()).forEach((function(t){e.store.dispatch(Object(I.d)({id:t}))}))}))}},{key:"handleBookMsgs",value:function(){var t=this;this.socket$=Object(T.a)(this.env.urls.websocket+"?orderbook"),this.socket$.next({event:"subscribe",feed:"heartbeat"}),this.socket$.pipe(Object(k.a)(12500),Object(g.a)((function(t){return!("event"in t)&&"heartbeat"!==t.feed})),Object(r.b)(this)).subscribe((function(e){var n=e.feed,i=e.asks,r=e.bids;if(n.includes("snapshot"))t.asksMap$.next(Object(c.b)(i)),t.bidsMap$.next(Object(c.b)(r));else{var o=t.asksMap$.value.merge(i);t.asksMap$.next(o);var a=t.bidsMap$.value.merge(r);t.bidsMap$.next(a)}t.retryDelay=100,t.loaded$.next(!0)}),(function(e){return t.handleSocketError(e)}),(function(){return Et("WS complete")}))}},{key:"resubFeed",value:function(t,e){if(this.socket$){if(this.subbedProduct&&this.subbedGrouping){var n=this.subbedGrouping;this.socket$.next({event:"unsubscribe",feed:this.fullBook?"book_ui_full_"+n:"book_ui_"+n,product_ids:[this.subbedProduct]})}t&&this.socket$.next({event:"subscribe",feed:this.fullBook?"book_ui_full_"+e:"book_ui_"+e,product_ids:[t]}),this.subbedProduct=t,this.subbedGrouping=e}}},{key:"handleSocketError",value:function(t){this.retryDelay=Object(E.b)(this.retryDelay),Et("Orderbook WS Error; Restarting in ".concat(this.retryDelay,"ms"),t),this.restartSocket()}},{key:"restartSocket",value:function(){var t=this;this.loaded$.next(!1),this.socket$&&this.socket$.complete(),setTimeout((function(){t.handleBookMsgs(),t.resubFeed(t.subbedProduct,t.subbedGrouping)}),this.retryDelay)}},{key:"groupingTickSize",value:function(t,e){return t?e*t.tickSize:1}},{key:"askRow",value:function(t){return t+2}},{key:"bidRow",value:function(t){return t+1+Number("horizontal"===this.orientation)}},{key:"clampFill",value:function(t){return Math.min(Math.max(.01,t),1)}},{key:"decreaseGrouping",value:function(){this.store.dispatch(Object(A.w)({direction:"minus"}))}},{key:"increaseGrouping",value:function(){this.store.dispatch(Object(A.w)({direction:"plus"}))}},{key:"trackByPrice",value:function(t,e){return e.price}},{key:"orientationChange",value:function(t){this.orientation=t,this.updateOrderbookDepth(this.calculateDepth)}},{key:"calculateDepth",get:function(){if(this.content){var t=(this.content.nativeElement.offsetHeight-24)/25;return"horizontal"===this.orientation?Math.floor(t):Math.floor(t/2)-1}return 8}}]),t}();return t.\u0275fac=function(e){return new(e||t)(U.Ob(U.l),U.Ob(M.a),U.Ob(U.h),U.Ob(o.b),U.Ob(N.a),U.Ob(U.B))},t.\u0275cmp=U.Ib({type:t,selectors:[["orderbook"]],viewQuery:function(t,e){var n;1&t&&U.Wc(rt,!0),2&t&&U.zc(n=U.cc())&&(e.content=n.first)},features:[U.Ab],decls:12,vars:23,consts:[[4,"ngLet"],["noSpread",""],["loader",""],["orientation","","minHorizontal","500",3,"orientationChange"],["body","","ghost","","class","spread",4,"ngIf"],["content",""],[4,"ngIf","ngIfElse"],["spread",""],["order",""],["body","","ghost","",1,"spread"],[4,"ngIf","ngIfThen","ngIfElse"],["body","",1,"book","asks"],["ghost","","uppercase","","tooltip","",1,"header","price",3,"sbTooltip","sbDisabled","sbDelay"],["ghost","","uppercase","","tooltip","","sbTooltip","TOOLTIP.SIZE",1,"header","qty",3,"sbDisabled","sbDelay"],["ghost","","uppercase","","tooltip","",1,"header","total",3,"sbTooltip","sbDisabled","sbDelay"],[4,"ngFor","ngForOf","ngForTrackBy"],["body","",1,"book","bids"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["ghost","","uppercase","",1,"header","qty"],["tooltip","","sbTooltip","TOOLTIP.SPREAD",3,"sbDisabled","sbDelay"],["tooltip","","sbTooltip","TOOLTIP.GROUP",1,"no-wrap",3,"sbDisabled","sbDelay"],[1,"no-wrap"],["icon","minus","size","2x",3,"matTooltip","click"],["icon","plus","size","2x",3,"matTooltip","click"],[1,"fill"],["flash","",1,"flash"],["body","","mono","",1,"price",3,"ngClass","click"],["label","","mono","",1,"qty",3,"click"],["label","","mono","",1,"total",3,"click"],[1,"cancel",3,"click"],["icon","close-large","size","lg","class","global__text--warn",3,"matTooltip","click",4,"ngIf"],["icon","close-large","size","lg",1,"global__text--warn",3,"matTooltip","click"]],template:function(t,e){1&t&&(U.Oc(0,wt,11,5,"ng-container",0),U.gc(1,"async"),U.gc(2,"async"),U.gc(3,"async"),U.gc(4,"async"),U.gc(5,"async"),U.gc(6,"async"),U.gc(7,"async"),U.Oc(8,Ct,6,8,"ng-template",null,1,U.Pc),U.Oc(10,Tt,1,0,"ng-template",null,2,U.Pc)),2&t&&U.mc("ngLet",U.xc(15,St,U.hc(1,1,e.selectedMarket$),U.hc(2,3,e.orderbookGroup$),U.hc(3,5,e.displayTooltips$),U.hc(4,7,e.sizeFormatter$),U.hc(5,9,e.sizeUnit$),U.hc(6,11,e.updatePriceAndQty$),U.hc(7,13,e.layoutTheme$)))},directives:[F.a,B.a,z.a,V.n,B.b,H.a,q.a,$.a,Q.a,W.a,G.a,Y.a,V.m,V.s,K.b,Z.a,X.a,J.a,V.l,tt.a,et.a],pipes:[V.b,nt.d,it.c,V.u,it.d],styles:["[_nghost-%COMP%]{display:block;height:100%}mat-card[_ngcontent-%COMP%]{box-shadow:none!important}mat-card-title[_ngcontent-%COMP%]{justify-content:center;border-bottom:1px solid var(--border-colour-dark)}mat-card-content[_ngcontent-%COMP%]{display:flex;flex-flow:column;height:100%}[orientation=horizontal][_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{flex-flow:row-reverse;height:calc(100% - 45px)}@media (max-width:599px){[orientation=horizontal][_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{height:100%!important}}.group--disabled[_ngcontent-%COMP%]{opacity:.3;pointer-events:none}.book[_ngcontent-%COMP%]{display:grid;grid-auto-flow:row;grid-auto-rows:25px;grid-template-columns:repeat(3,3fr) 1fr;align-items:center;width:100%}.book.bids[_ngcontent-%COMP%]{--fill-color:rgba(6,115,37,0.25)}.book.asks[_ngcontent-%COMP%]{--fill-color:rgba(188,27,49,0.25)}.update-cell[_ngcontent-%COMP%]:hover{font-weight:700}.header[_ngcontent-%COMP%]{grid-row:1/span 1}.cancel[_ngcontent-%COMP%], .price[_ngcontent-%COMP%], .qty[_ngcontent-%COMP%], .total[_ngcontent-%COMP%]{grid-row-end:span 1;z-index:2;padding:.5em;text-align:right;cursor:pointer;contain:content}.price[_ngcontent-%COMP%]{grid-column:1/span 1}.price.header[_ngcontent-%COMP%]{color:var(--ghost-colour)}.book--flipy[_ngcontent-%COMP%] .price[_ngcontent-%COMP%]{grid-column:-3/span 1}.qty[_ngcontent-%COMP%]{color:var(--input-colour);grid-column:2/span 1}.qty.header[_ngcontent-%COMP%]{color:var(--ghost-colour)}.book--flipy[_ngcontent-%COMP%] .qty[_ngcontent-%COMP%]{grid-column:-4/span 1}@media (max-width:1024px){[orientation=horizontal][_ngcontent-%COMP%] .qty[_ngcontent-%COMP%]{display:none}}.total[_ngcontent-%COMP%]{color:var(--input-colour);grid-column:3/span 1}.total.header[_ngcontent-%COMP%]{color:var(--ghost-colour)}.book--flipy[_ngcontent-%COMP%] .total[_ngcontent-%COMP%]{grid-column:-5/span 1}@media (max-width:1024px){[orientation=horizontal][_ngcontent-%COMP%] .book--flipy[_ngcontent-%COMP%] .total[_ngcontent-%COMP%]{grid-column:-5/span 1!important}}@media (max-width:1024px){[orientation=horizontal][_ngcontent-%COMP%] .total[_ngcontent-%COMP%]{grid-column:2/span 2!important}}.cancel[_ngcontent-%COMP%]{grid-column:4/span 1}.book--flipy[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{grid-column:-2/span 1}.cancel[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{cursor:pointer}.row[_ngcontent-%COMP%]{grid-column:1/-1;height:26px;width:100%;z-index:1;contain:strict}.row.hover[_ngcontent-%COMP%]{background-color:rgba(var(--text-colour-rgb),.08)}.fill[_ngcontent-%COMP%]{grid-column:1/-1;height:25px;width:100%;z-index:0;background-color:var(--fill-color);transform:scaleX(var(--fill));transform-origin:0 0;contain:strict}.book--flipy[_ngcontent-%COMP%] .fill[_ngcontent-%COMP%]{transform-origin:100% 0}.flash[_ngcontent-%COMP%]{grid-column:1/-1;height:25px;width:100%;z-index:3;pointer-events:none;contain:strict}.spread[_ngcontent-%COMP%]{display:grid;grid-auto-flow:column;justify-content:center;align-items:center;gap:var(--spacing);padding:var(--spacing);text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.spread[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{cursor:pointer}.spread[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]:hover{color:var(--text-colour)}@media (max-width:599px){.spread[_ngcontent-%COMP%]{display:none}}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}"],changeDetection:0}),t=Object(i.d)([Object(r.a)()],t)}()},hsG4:function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var i=n("6uGs"),r=n("GoAz"),o=n("7SLS"),a=n("YtkY"),s=n("nXdR"),c=n("sXtk"),u=n("7UDb"),l=n("i67J"),d=n("mlVJ"),h=n("kZht"),f={headers:new i.c({"Content-Type":"application/json","Cache-Control":"no-cache, no-store, must-revalidate, post-check=0, pre-check=0",Pragma:"no-cache",Expires:"0"}),withCredentials:!0},p=function(){var t=function(){function t(e,n){C(this,t),this.http=e,this.env=n}return w(t,[{key:"getSummary",value:function(){return this.http.get(this.env.urls.auth+"/account",f)}},{key:"acceptTerms",value:function(){return this.http.post(this.env.urls.rest+"/readandagree","",u.a)}},{key:"activateSSO",value:function(){return this.http.post(this.env.urls.auth+"/account/activate-kraken-transfers","",u.a)}},{key:"getAccountDetails",value:function(){return this.http.get(this.env.urls.rest+"/accountdetails",u.a)}},{key:"saveFrontendData",value:function(t){var e={data:JSON.stringify(Object.assign(Object.assign({},t),{type:void 0}))};return this.http.post(this.env.urls.rest+"/frontenddata",e,u.a)}},{key:"updateNewsletter",value:function(t){return this.http.post(this.env.urls.rest+"/changeemailalerts",{newsletter:t},u.a)}},{key:"accountLimits",value:function(){return this.http.get(this.env.urls.rest+"/accountlimits",u.a)}},{key:"getAPIKeys",value:function(){return this.http.get(this.env.urls.auth+"/api-keys/v3",f)}},{key:"createAPIKey",value:function(t){return this.http.post(this.env.urls.auth+"/api-keys/v3",{permissions:{general:t.general,transfer:t.transfer},mfaRequestId:t.mfaRequestId},f)}},{key:"deleteAPIKey",value:function(t){var e={mfaRequestId:t.mfaRequestId};return this.http.request("delete","".concat(this.env.urls.auth,"/api-keys/v3/").concat(t.id),Object.assign(Object.assign({},f),{body:e,observe:"response",responseType:"json"})).pipe(Object(o.a)(t.id))}},{key:"resetAPIKey",value:function(t){return this.http.post("".concat(this.env.urls.auth,"/api-keys/v3/").concat(t.id,"/reset-nonce"),null,Object.assign(Object.assign({},f),{observe:"response",responseType:"json"}))}},{key:"fetchEmailAlerts",value:function(){return this.http.get(this.env.urls.rest+"/emailalerts",u.a).pipe(Object(a.a)((function(t){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.margining),t.marketing),t.settlements),t.system),t.transfers)})))}},{key:"changeEmailAlerts",value:function(t){var e=Object.assign(Object.assign({},t),{withdrawalRequest:t.withdrawalReceived});return this.http.post(this.env.urls.rest+"/changeemailalerts",e,u.a).pipe(Object(a.a)((function(t){var e=t.currentEmailAlerts;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.margining),e.marketing),e.settlements),e.system),e.transfers)})))}},{key:"getSubAccounts",value:function(){return this.http.get(this.env.urls.rest+"/balances/subaccounts",u.a).pipe(Object(a.a)((function(t){return t.subAccountBalances}))).pipe(Object(a.a)((function(t){return t.map((function(t){return Object.assign(Object.assign({},t),{holdingAccounts:t.holdingAccounts.map((function(t){return{name:t.currency.toUpperCase(),currency:t.currency.toUpperCase(),type:"holding",balance:t.amount}})),futuresAccounts:t.futuresAccounts.map((function(t){var e;return{name:t.name.toUpperCase(),type:"futures",balance:t.availableMargin,currency:null===(e=Object(s.d)(t.name))||void 0===e?void 0:e.replace(d.a,"XBT")}})),flexAccount:t.flexAccount.currencies.map((function(t){return{name:"FLEX-"+t.currency.toUpperCase().replace(d.b,"BTC"),type:"flex",balance:t.available,currency:t.currency.toUpperCase()}}))})}))})))}},{key:"getUserDocs",value:function(){return this.http.get(this.env.urls.rest+"/documents",u.a)}},{key:"respondUserDoc",value:function(t){var e=t.documentName,n=t.response;return this.http.post("".concat(this.env.urls.rest,"/terms-and-conditions/").concat(e),{response:n},u.a).pipe(Object(l.l)(400,10))}},{key:"affirmUKClassification",value:function(t){return this.http.put(this.env.urls.rest+"/ukretailpopup",{investorType:t},u.a)}},{key:"fetchUserVolumes",value:function(){return this.http.get(this.env.urls.rest+"/feeschedules/volumes",u.a).pipe(Object(l.k)("volumesByFeeSchedule"))}},{key:"getUserAlgos",value:function(){return this.http.get(this.env.urls.rest+"/algo-ids",u.a)}},{key:"createAlgo",value:function(t){return this.http.post(this.env.urls.rest+"/algo-ids",{label:t},u.a)}},{key:"signAlgo",value:function(t){return this.http.post("".concat(this.env.urls.rest,"/algo-ids/").concat(t,"/sign"),{},u.a)}},{key:"signWaitingList",value:function(t){var e,n,i,o=new URLSearchParams;o.append("lid","1547"),o.append("mid","514004678"),o.append("Full Name 2",t.fullName),o.append("Email Address",t.email),o.append("Country of Residence launch form",t.country),o.append("AUM",(null===(e=t.aum)||void 0===e?void 0:e.toString())||""),o.append("Estimated trading volume launch form",(null===(n=t.estTradingVol)||void 0===n?void 0:n.toString())||""),o.append("Company name",(null===(i=t.companyName)||void 0===i?void 0:i.toString())||"");var a=fetch("https://cl.s11.exct.net/subscribe.aspx",{method:"POST",body:o,mode:"no-cors",redirect:"follow"});return Object(r.a)(a)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Yb(i.a),h.Yb(c.a))},t.\u0275prov=h.Kb({token:t,factory:t.\u0275fac}),t}()},hvMX:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("+6xv"),r=Object(i.n)("transformMenu",[Object(i.k)("void",Object(i.l)({opacity:0})),Object(i.m)("void => enter",Object(i.g)([Object(i.e)("100ms linear",Object(i.l)({opacity:1}))])),Object(i.m)("* => void",Object(i.e)("100ms 25ms linear",Object(i.l)({opacity:0})))])},"i2L+":function(t,e,n){"use strict";n.d(e,"a",(function(){return jt}));var i,r=n("An66"),s=n("6uGs"),u=n("3kIJ"),l=n("1VvW"),d=n("NxuZ"),f=n("BpC5"),p=n("aDqW"),b=n("JpLq"),g=n("0o+O"),m=n("0FJ2"),v=n("i9Na"),y=n("MRfT"),_=n("4g2U"),O=n("lw+r"),k=n("wdR4"),T=n("5GZx"),S=n("ZtZA"),E=n("VbQ3"),x=n("zW++"),P=n("hCLc"),A=n("yvKM"),I=n("F6wS"),M=n("UDV5"),D=n("pTnX"),R=n("807T"),j=n("mcff"),L=n("EmXI"),N=n("Tcl6"),U=n("kZht"),F=(n("5XID"),n("ZTXN")),B=(n("kuMc"),n("jIqt")),z=(n("jL3B"),n("sBeF"),n("Hq54"),n("8EXQ")),V=((i=function t(){C(this,t)}).\u0275mod=U.Mb({type:i}),i.\u0275inj=U.Lb({factory:function(t){return new(t||i)},imports:[[D.l,D.s,D.j,D.q,r.c],D.l,D.j,D.q,z.b]}),i),H=n("EZWv"),q=n("h2+Y"),$=n("8spT"),Q=n("IOEv"),W=n("P0vk"),G=n("LoUP"),Y=n("vE5V");n("ROBh");var K,Z=((K=function t(){C(this,t)}).\u0275mod=U.Mb({type:K}),K.\u0275inj=U.Lb({factory:function(t){return new(t||K)},imports:[[Y.a]]}),K);n("47ST"),n("P4Xx"),n("bwdy"),n("8j5Y");var X=n("YtkY");n("4e/d"),n("ruxD"),n("7ntQ"),n("J+dc"),n("ENSU");var J,tt=((J=function t(){C(this,t)}).\u0275mod=U.Mb({type:J}),J.\u0275inj=U.Lb({factory:function(t){return new(t||J)},imports:[[D.j],D.j]}),J);n("Ohay"),n("+6xv");var et,nt,it,rt=((et=function t(){C(this,t),this.changes=new F.b,this.optionalLabel="Optional"}).\u0275fac=function(t){return new(t||et)},et.\u0275prov=Object(U.Kb)({factory:function(){return new et},token:et,providedIn:"root"}),et),ot={provide:rt,deps:[[new U.C,new U.L,rt]],useFactory:function(t){return t||new rt}},at=((nt=function t(){C(this,t)}).\u0275mod=U.Mb({type:nt}),nt.\u0275inj=U.Lb({factory:function(t){return new(t||nt)},providers:[ot,D.d],imports:[[D.j,r.c,S.g,P.c,Z,tt,D.s],D.j]}),nt),st=n("O30t"),ct=n("sq1e"),ut=n("aJOL"),lt=n("WYJo"),dt=n("Ee7O"),ht=(n("rgaJ"),n("9hG1")),ft=n("GoAz"),pt=n("mawV"),bt=n("Qbn9"),gt=n("i67J"),mt=((it=function(t){a(n,t);var e=c(n);function n(t){return C(this,n),e.call(this,t)}return w(n,[{key:"transform",value:function(t){return null!=t?(this.value=t,this.timer||(this.timer=this.getObservable()),o(h(n.prototype),"transform",this).call(this,this.timer)):o(h(n.prototype),"transform",this).call(this,t)}},{key:"getObservable",value:function(){var t=this.value,e=t instanceof ht.DateTime?t:t instanceof Date?ht.DateTime.fromJSDate(t):"string"==typeof t?ht.DateTime.fromISO(t,{zone:"utc"}):ht.DateTime.fromMillis(t,{zone:"utc"}),n=ht.DateTime.utc().toMillis()-e.toMillis(),i=n>bt.b?gt.i.slice(2):n>bt.c?gt.i.slice(1):gt.i;return Object(ft.a)(i).pipe(Object(pt.a)(),Object(B.a)(0),Object(X.a)((function(){return e.toRelative({style:"short",padding:500,base:ht.DateTime.utc().plus({milliseconds:501})})})))}}]),n}(r.b)).\u0275fac=function(t){return new(t||it)(U.ac())},it.\u0275pipe=U.Nb({name:"relativeTime",type:it,pure:!1}),it),vt=n("Knqz");n("ka3Y"),n("zqNl"),n("YyhG"),n("6neU"),n("y6QJ"),n("+e22"),n("pbVI"),n("2YH/"),n("7erP"),n("FTWg"),n("rfPA"),n("IiX2"),n("x94p"),n("Q7YU"),n("anSm"),n("+I9z"),n("TzY9"),n("eGwX"),n("1h0I"),n("7J2L"),n("OwpI"),n("/dWT"),n("wk3K"),n("ykds"),n("yPvj"),n("QHMR"),n("F+Yz"),n("BgTU"),n("RCeD"),n("DduF"),n("1eaT"),n("houi"),n("aygZ"),n("B6Vo");var yt=n("DpwM");n("+Px6"),n("uJYd"),n("1o0v"),n("oiza"),n("6BNo"),n("LbKT"),n("3W1Y");var _t=n("rqGg");n("WRMk"),n("cqWG"),n("BeMo"),n("vVza"),n("+Tmv"),n("J7L8"),n("FUfi"),n("EzKQ"),n("AdKB"),n("w2Kr"),n("v4C1"),n("Dm6q"),n("afE0"),n("DTJn"),n("cMxr"),n("bZCB"),n("m6an"),n("SAoO"),n("2hZ/"),n("36Sp"),n("nkQU"),n("Eo3p"),n("O0qa"),n("v4/B"),n("s96x"),n("bxcy"),n("anA8"),n("mT8l"),n("hnst"),n("UVER"),n("yHDr"),n("CfRh"),n("nVws"),n("bW1a"),n("ebJJ"),n("fa4l"),n("4hXt"),n("tOKo"),n("AsU5"),n("HyYW"),n("zK/z"),n("3GEX"),n("scAs"),n("UVqw"),n("za3o"),n("YC1o"),n("AD/o"),n("rEzU"),n("chaP"),n("bo+2"),n("Eu46"),n("TMzY"),n("rBBj"),n("gx5s"),n("bBQR"),n("1etq"),n("IkSM"),n("Oj3S");var Ot=n("FUqb"),kt=n("fvDn"),wt=n("rUBT"),Ct=n("A9Vm"),Tt=n("e7kw"),St=n("15qg"),Et=n("rcUp"),xt=n("5a6m"),Pt=n("P0Um"),At=n("09eR");n("6D9M"),n("bv5E"),n("HHCP"),n("ENxB");var It,Mt=[r.c,l.h,s.b,u.u,p.c,g.b,E.g,T.f,k.b,S.g,ut.b,j.c,P.c,I.c,lt.b,st.l,G.c,x.b,W.d,L.e,N.c,q.b,ct.e,M.b,Q.b,H.b,R.c,D.m,$.c,V,at,A.c,b.b,d.d,dt.b,_.a,O.d],Dt=[m.a],Rt=[Et.a,xt.a,yt.a,yt.b,kt.b,Pt.a,Pt.b,wt.a,wt.f,wt.b,wt.g,wt.e,wt.d,Ct.a,At.a,Ct.b,St.a,Ot.b,Ot.a,mt,vt.a,yt.c,Tt.a,Tt.b,_t.a,wt.c,kt.a,yt.d],jt=((It=function t(){C(this,t)}).\u0275mod=U.Mb({type:It}),It.\u0275inj=U.Lb({factory:function(t){return new(t||It)},providers:[].concat(Dt,Rt,[f.a,r.f]),imports:[[].concat(Mt,[v.b.forChild(),y.a.forRoot({timeOut:3e3,positionClass:"toast-bottom-right",preventDuplicates:!0,maxOpened:6,countDuplicates:!0,resetTimeoutOnDuplicate:!0})]),r.c,l.h,s.b,u.u,p.c,g.b,E.g,T.f,k.b,S.g,ut.b,j.c,P.c,I.c,lt.b,st.l,G.c,x.b,W.d,L.e,N.c,q.b,ct.e,M.b,Q.b,H.b,R.c,D.m,$.c,V,at,A.c,b.b,d.d,dt.b,_.a,O.d]}),It)},i67J:function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return s})),n.d(e,"i",(function(){return h})),n.d(e,"o",(function(){return P})),n.d(e,"n",(function(){return A})),n.d(e,"m",(function(){return I})),n.d(e,"g",(function(){return O})),n.d(e,"f",(function(){return k})),n.d(e,"h",(function(){return T})),n.d(e,"k",(function(){return S})),n.d(e,"e",(function(){return E})),n.d(e,"j",(function(){return x})),n.d(e,"b",(function(){return M})),n.d(e,"l",(function(){return D})),n.d(e,"p",(function(){return R})),n.d(e,"a",(function(){return j}));var i=n("IdLP"),r=n("og7C");function o(t,e){return function(n){var o,a=Object(r.b)().asMutable();return new i.a((function(i){o=window.setInterval((function(){i.next(a.asImmutable()),(a=a.asMutable()).clear()}),t),n.subscribe((function(t){return a.set(t[e],t)}),(function(t){return i.error(t)}),(function(){clearInterval(o),i.next(a.asImmutable()),i.complete()}))}))}}function s(t){return function(e){var n,r=[];return new i.a((function(i){n=window.setInterval((function(){i.next(r),r=[]}),t),e.subscribe((function(t){return r.unshift(t)}),(function(t){return i.error(t)}),(function(){clearInterval(n),i.next(r),i.complete()}))}))}}var u=n("3p4X"),l=n("J+dc"),d=n("Qbn9"),h=[Object(u.a)(d.e).pipe(Object(l.a)(d.f)),Object(u.a)(d.c).pipe(Object(l.a)(d.d)),Object(u.a)(d.b)],f=n("Ti3e"),p=n("prE9"),b=n("zqNl"),g=n("xVbo"),m=n("YtkY"),v=n("jOdJ"),y=n("Ohay"),_=n("lx5p"),O=function(){return Object(f.a)(Object(g.a)((function(t){return!!t})))},k=function(){return Object(f.a)(Object(g.a)(_.r),Object(m.a)(_.P))},T=function(){return Object(f.a)(O(),Object(v.a)())},S=function(t){return Object(f.a)(Object(m.a)(Object(_.F)(t)))},E=function(){return Object(y.a)((function(t,e){return t.equals(e)}))},x=function(t){return Object(f.a)(Object(m.a)((function(e){return e.map(t)})))},P=function(t,e){return Object(f.a)(Object(b.m)(t,e),O())},A=function(t,e){return Object(f.a)(Object(b.m)(t,e),T())},I=function(t,e,n){return Object(f.a)(Object(b.m)(t,n),Object(p.a)(e))};function M(t){return Math.floor(Math.min(1.4*t,5e3))}function D(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return function(n){var r=0,o=t;return new i.a((function(i){!function i(a){n.subscribe((function(e){o=t,a.next(e)}),(function(t){r>=e?a.error(t):(o=M(o),r+=1,setTimeout((function(){return i(a)}),o))}),(function(){return a.complete()}))}(i)}))}}function R(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,e=window.navigator.deviceMemory;if(e){if(e<=2)return Object(p.a)(1e3);if(e<=4)return Object(p.a)(500);if(e>=8)return Object(p.a)(t)}return Object(p.a)(t)}n("HM3f"),n("jIqt"),n("iLlD");var j=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,[{key:"toggle",value:function(){this.next(!this.value)}}]),n}(n("C05f").a)},i7Dj:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("5uGe");function r(){return function(t){return t.lift(new o(t))}}var o=function(){function t(e){C(this,t),this.connectable=e}return w(t,[{key:"call",value:function(t,e){var n=this.connectable;n._refCount++;var i=new s(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r}}]),t}(),s=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t)).connectable=i,r}return w(n,[{key:"_unsubscribe",value: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,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null}}]),n}(i.a)},i9Na:function(t,e,n){"use strict";n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return g})),n.d(e,"c",(function(){return h})),n.d(e,"d",(function(){return l}));var i=n("kZht"),r=n("An66"),o=n("6uGs"),a=n("ENSU"),s=n("gNrm"),c=n("YtkY");n("jOdJ");var u=["*"],l=function t(){C(this,t)},d=new i.s("SECURITY_CONTEXT"),h=function(){var t=function(){function t(e,n,i,r,o){C(this,t),this.platform=e,this.securityContext=n,this.http=i,this.sanitizer=o,this.initialMarkedOptions={renderer:new s.Renderer},this.options=r}return w(t,[{key:"compile",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.options,r=this.trimIndentation(t),o=e?this.decodeHtml(r):r,a=n?this.renderEmoji(o):o,c=Object(s.parse)(a,i);return this.sanitizer.sanitize(this.securityContext,c)||""}},{key:"getSource",value:function(t){var e=this;if(!this.http)throw new Error("[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information");return this.http.get(t,{responseType:"text"}).pipe(Object(c.a)((function(n){return e.handleExtension(t,n)})))}},{key:"highlight",value:function(t){if(Object(r.z)(this.platform)&&"undefined"!=typeof Prism){t||(t=document);var e=t.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(e,(function(t){return t.classList.add("language-none")})),Prism.highlightAllUnder(t)}}},{key:"renderKatex",value:function(t,e){if("undefined"==typeof katex||void 0===katex.renderToString)throw new Error("[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information");return t.replace(/\$([^\s][^$]*?[^\s])\$/gm,(function(t,n){return katex.renderToString(n,e)}))}},{key:"decodeHtml",value:function(t){if(Object(r.z)(this.platform)){var e=document.createElement("textarea");return e.innerHTML=t,e.value}return t}},{key:"handleExtension",value:function(t,e){var n=t?t.split("?")[0].split(".").splice(-1).join():null;return"md"!==n?"```"+n+"\n"+e+"\n```":e}},{key:"renderEmoji",value:function(t){if("undefined"==typeof joypixels||void 0===joypixels.shortnameToUnicode)throw new Error("[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information");return joypixels.shortnameToUnicode(t)}},{key:"trimIndentation",value:function(t){return t?t.split("\n").map((function(t){var n=e;return t.length>0&&(n=isNaN(n)?t.search(/\S|$/):Math.min(t.search(/\S|$/),n)),isNaN(e)&&(e=n),n?t.substring(n):t})).join("\n"):"";var e}},{key:"options",get:function(){return this._options},set:function(t){this._options=Object.assign(Object.assign({},this.initialMarkedOptions),t)}},{key:"renderer",get:function(){return this.options.renderer},set:function(t){this.options.renderer=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(i.D),i.Yb(d),i.Yb(o.a,8),i.Yb(l,8),i.Yb(a.b))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),f=function(t){return t.LineHighlight="line-highlight",t.LineNumbers="line-numbers",t}({}),p=function(){var t=function(){function t(e,n){C(this,t),this.element=e,this.markdownService=n,this.error=new i.o,this.load=new i.o,this.ready=new i.o,this._emoji=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1}return w(t,[{key:"ngOnChanges",value:function(){null==this.data?null==this.src||this.handleSrc():this.handleData()}},{key:"ngAfterViewInit",value:function(){this.data||this.src||this.handleTransclusion()}},{key:"render",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.markdownService.compile(t,e,this.emoji);n=this.katex?this.markdownService.renderKatex(n,this.katexOptions):n,this.element.nativeElement.innerHTML=n,this.handlePlugins(),this.markdownService.highlight(this.element.nativeElement),this.ready.emit()}},{key:"coerceBooleanProperty",value:function(t){return null!=t&&""+t!="false"}},{key:"handleData",value:function(){this.render(this.data)}},{key:"handleSrc",value:function(){var t=this;this.markdownService.getSource(this.src).subscribe((function(e){t.render(e),t.load.emit(e)}),(function(e){return t.error.emit(e)}))}},{key:"handleTransclusion",value:function(){this.render(this.element.nativeElement.innerHTML,!0)}},{key:"handlePlugins",value:function(){this.lineHighlight&&(this.setPluginClass(this.element.nativeElement,f.LineHighlight),this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset})),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,f.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))}},{key:"setPluginClass",value:function(t,e){for(var n=t.querySelectorAll("pre"),i=0;i=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[]))},e.rawSplit=function(t){return e.fromArray(f(t,u.isKanjiModeEnabled()))}},iT4G:function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var i=n("Efrr"),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}(),s=n("iRe+"),u=n("uCWR"),l=function(){function t(e,n,i,r){C(this,t),this.waitFor=e,this.absoluteTimeout=n,this.withObservable=i,this.scheduler=r}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new d(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))}}]),t}(),d=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a){var s;return C(this,n),(s=e.call(this,t)).absoluteTimeout=i,s.waitFor=r,s.withObservable=o,s.scheduler=a,s.scheduleTimeout(),s}return w(n,[{key:"scheduleTimeout",value:function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(n.dispatchTimeout,this.waitFor,this))}},{key:"_next",value:function(t){this.absoluteTimeout||this.scheduleTimeout(),o(h(n.prototype),"_next",this).call(this,t)}},{key:"_unsubscribe",value:function(){this.action=void 0,this.scheduler=null,this.withObservable=null}}],[{key:"dispatchTimeout",value:function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(u.c)(e,new u.a(t)))}}]),n}(u.b),f=n("47ST");function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.a;return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.a;return function(i){var r=Object(s.a)(t),o=r?+t-n.now():Math.abs(t);return i.lift(new l(o,r,e,n))}}(t,Object(f.a)(new r),e)}},icqo:function(t,e,n){"use strict";n.d(e,"a",(function(){return O})),n.d(e,"b",(function(){return T}));var i=n("jL3B"),r=n("5GZx"),o=n("ZtZA"),a=n("kZht"),s=n("bwdy"),c=n("ROBh"),u=n("g6G6"),l=n("vT4p"),d=n("xVbo"),h=n("J+dc"),f=n("kuMc"),p=n("BwBJ"),b=n("aaFr"),g=n("njz0"),v=n("ROO/"),y=n("vE5V"),_=new a.s("sb-menu-scroll-strategy"),O={provide:_,deps:[r.c],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},k={passive:!0},T=function(){var t=function(){function t(e,n,i,r,o,c,u,l){var d=this;C(this,t),this.overlay=e,this.el=n,this.vcr=i,this.focusMonitor=r,this.parentMenu=c,this.menuItem=u,this._dir=l,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=s.a.EMPTY,this._hoverSubscription=s.a.EMPTY,this._menuCloseSubscription=s.a.EMPTY,this._openedBy=null,this.restoreFocus=!0,this.menuOpened=new a.o,this.onMenuOpen=this.menuOpened,this.menuClosed=new a.o,this.onMenuClose=this.menuClosed,this._handleTouchStart=function(){return d._openedBy="touch"},n.nativeElement.addEventListener("touchstart",this._handleTouchStart,k),u&&(u.triggersSubmenu=this.triggersSubmenu()),this._scrollStrategy=o}return w(t,[{key:"ngAfterContentInit",value:function(){this._checkMenu(),this._handleHover()}},{key:"ngOnDestroy",value:function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this.el.nativeElement.removeEventListener("touchstart",this._handleTouchStart,k),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}},{key:"triggersSubmenu",value:function(){return!(!this.menuItem||!this.parentMenu)}},{key:"toggleMenu",value:function(){return this._menuOpen?this.closeMenu():this.openMenu()}},{key:"openMenu",value:function(){var t=this;if(!this._menuOpen){this._checkMenu();var e=this._createOverlay(),n=e.getConfig();this._setPosition(n.positionStrategy),n.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,e.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe((function(){return t.closeMenu()})),this._initMenu(),this.menu instanceof b.a&&this.menu._startAnimation()}}},{key:"closeMenu",value:function(){this.menu.closed.emit()}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this.focusMonitor.focusVia(this.el,t,e)}},{key:"_destroyMenu",value:function(){var t=this;if(this._overlayRef&&this.menuOpen){var e=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this._restoreFocus(),e instanceof b.a?(e._resetAnimation(),e.lazyContent?e._animationDone.pipe(Object(d.a)((function(t){return"void"===t.toState})),Object(h.a)(1),Object(f.a)(e.lazyContent.attached)).subscribe({next:function(){return e.lazyContent.detach()},complete:function(){return t._setIsMenuOpen(!1)}}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),e.lazyContent&&e.lazyContent.detach())}}},{key:"_initMenu",value:function(){this.menu.parentMenu=this.triggersSubmenu()?this.parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")}},{key:"_setMenuElevation",value:function(){if(this.menu.setElevation){for(var t=0,e=this.menu.parentMenu;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}},{key:"_restoreFocus",value:function(){this.restoreFocus&&(this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus()),this._openedBy=null}},{key:"_setIsMenuOpen",value:function(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this.menuItem.highlighted=t)}},{key:"_checkMenu",value:function(){this.menu||Object(g.c)()}},{key:"_createOverlay",value:function(){if(!this._overlayRef){var t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this.overlay.create(t),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}},{key:"_getOverlayConfig",value:function(){return new r.d({positionStrategy:this.overlay.position().flexibleConnectedTo(this.el).withLockedPosition().withTransformOriginOn(".sb-menu"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._scrollStrategy(),direction:this._dir})}},{key:"_subscribeToPositions",value:function(t){var e=this;this.menu.setPositionClasses&&t.positionChanges.subscribe((function(t){e.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")}))}},{key:"_setPosition",value:function(t){var e=m("center"===this.menu.xPosition?["center","center"]:"before"===this.menu.xPosition?["end","start"]:["start","end"],2),n=e[0],i=e[1],r=m("above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],2),o=r[0],a=r[1],s=o,c=a,u=n,l=i,d=5;this.triggersSubmenu()?(l=n="before"===this.menu.xPosition?"start":"end",i=u="end"===n?"start":"end",d="bottom"===o?5:-5):this.menu.overlapTrigger||(s="top"===o?"bottom":"top",c="top"===a?"bottom":"top"),t.withPositions([{originX:n,originY:s,overlayX:u,overlayY:o,offsetY:d},{originX:i,originY:s,overlayX:l,overlayY:o,offsetY:d},{originX:n,originY:c,overlayX:u,overlayY:a,offsetY:-d},{originX:i,originY:c,overlayX:l,overlayY:a,offsetY:-d}])}},{key:"_menuClosingActions",value:function(){var t=this,e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments(),i=this.parentMenu?this.parentMenu.closed:Object(c.a)(),r=this.parentMenu?this.parentMenu._hovered().pipe(Object(d.a)((function(e){return e!==t.menuItem})),Object(d.a)((function(){return t._menuOpen}))):Object(c.a)();return Object(u.a)(e,i,r,n)}},{key:"_handleMousedown",value:function(t){Object(i.l)(t)||(this._openedBy=0===t.button?"mouse":null,this.triggersSubmenu()&&t.preventDefault())}},{key:"_handleKeydown",value:function(t){var e=t.key;this.triggersSubmenu()&&("ArrowRight"===e&&"ltr"===this.dir||"ArrowLeft"===e&&"rtl"===this.dir)&&this.openMenu()}},{key:"_handleClick",value:function(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}},{key:"_handleHover",value:function(){var t=this;this.triggersSubmenu()&&(this._hoverSubscription=this.parentMenu._hovered().pipe(Object(d.a)((function(e){return e===t.menuItem&&!e.disabled})),Object(p.a)(0,l.a)).subscribe((function(){t._openedBy="mouse",t.menu instanceof b.a&&t.menu._isAnimating?t.menu._animationDone.pipe(Object(h.a)(1),Object(p.a)(0,l.a),Object(f.a)(t.parentMenu._hovered())).subscribe((function(){return t.openMenu()})):t.openMenu()})))}},{key:"_getPortal",value:function(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new o.h(this.menu.templateRef,this.vcr)),this._portal}},{key:"menu",set:function(t){var e=this;t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.closed.asObservable().subscribe((function(t){e._destroyMenu(),"click"!==t&&"tab"!==t||!e.parentMenu||e.parentMenu.closed.emit(t)}))))},get:function(){return this._menu}},{key:"menuOpen",get:function(){return this._menuOpen}},{key:"dir",get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(r.c),a.Ob(a.l),a.Ob(a.R),a.Ob(i.h),a.Ob(_),a.Ob(b.a,8),a.Ob(v.a,10),a.Ob(y.b,8))},t.\u0275dir=a.Jb({type:t,selectors:[["","sbMenuTriggerFor",""]],hostAttrs:["aria-haspopup","true",1,"sb-menu-trigger"],hostVars:2,hostBindings:function(t,e){1&t&&a.bc("mousedown",(function(t){return e._handleMousedown(t)}))("keydown",(function(t){return e._handleKeydown(t)}))("click",(function(t){return e._handleClick(t)})),2&t&&a.Db("aria-expanded",e.menuOpen||null)("aria-controls",e.menuOpen?e.menu.panelId:null)},inputs:{menu:["sbMenuTriggerFor","menu"],menuData:["sbMenuTriggerData","menuData"],restoreFocus:["sbMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["sbMenuTrigger"]}),t}()},iiuT:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("+luX"),r=n("ZCEf"),o=n("xSUO"),a=n("Qkwj"),s=n("LqyJ");e.default=function(){function t(){}return t.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(f){if(e&&!0===e.get(r.default.TRY_HARDER)&&t.isRotateSupported()){var n=t.rotateCounterClockwise(),i=this.doDecode(n,e),c=i.getResultMetadata(),u=270;null!==c&&!0===c.get(o.default.ORIENTATION)&&(u+=c.get(o.default.ORIENTATION)%360),i.putMetadata(o.default.ORIENTATION,u);var l=i.getResultPoints();if(null!==l)for(var d=n.getHeight(),h=0;h>(d?8:5));n=d?u:15;for(var f=Math.trunc(u/2),p=0;p=u)break;try{l=t.getBlackRow(g,l)}catch(O){continue}for(var m=function(t){if(1===t&&(l.reverse(),e&&!0===e.get(r.default.NEED_RESULT_POINT_CALLBACK))){var n=new Map;e.forEach((function(t,e){return n.set(e,t)})),n.delete(r.default.NEED_RESULT_POINT_CALLBACK),e=n}try{var i=v.decodeRow(g,l,e);if(1===t){i.putMetadata(o.default.ORIENTATION,180);var s=i.getResultPoints();null!==s&&(s[0]=new a.default(c-s[0].getX()-1,s[0].getY()),s[1]=new a.default(c-s[1].getX()-1,s[1].getY()))}return{value:i}}catch(u){}},v=this,y=0;y<2;y++){var _=m(y);if("object"==typeof _)return _.value}}throw new s.default},t.recordPattern=function(t,e,n){for(var i=n.length,r=0;r=o)throw new s.default;for(var a=!t.get(e),c=0,u=e;u0&&r>=0;)e.get(--n)!==o&&(r--,o=!o);if(r>=0)throw new s.default;t.recordPattern(e,n+1,i)},t.patternMatchVariance=function(t,e,n){for(var i=t.length,r=0,o=0,a=0;ad?l-d:d-l;if(h>n)return Number.POSITIVE_INFINITY;c+=h}return c/r},t}()},iqFP:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("5uGe");function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(e){return e.lift(new o(t))}}var o=function(){function t(e){C(this,t),this.defaultValue=e}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new s(t,this.defaultValue))}}]),t}(),s=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t)).defaultValue=i,r.isEmpty=!0,r}return w(n,[{key:"_next",value:function(t){this.isEmpty=!1,this.destination.next(t)}},{key:"_complete",value:function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}]),n}(i.a)},jIqt:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("qZtG"),r=n("gBlb");function o(){for(var t=arguments.length,e=new Array(t),n=0;n-1&&e!==n._activeItemIndex&&(n._activeItemIndex=e)}}))}return w(t,[{key:"skipPredicate",value:function(t){return this._skipPredicateFn=t,this}},{key:"withWrap",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._wrap=t,this}},{key:"withVerticalOrientation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._vertical=t,this}},{key:"withHorizontalOrientation",value:function(t){return this._horizontal=t,this}},{key:"withAllowedModifierKeys",value:function(t){return this._allowedModifierKeys=t,this}},{key:"withTypeAhead",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Object(p.a)((function(e){return t._pressedLetters.push(e)})),Object(b.a)(e),Object(g.a)((function(){return t._pressedLetters.length>0})),Object(v.a)((function(){return t._pressedLetters.join("")}))).subscribe((function(e){for(var n=t._getItemsArray(),i=1;i0&&void 0!==arguments[0])||arguments[0];return this._homeAndEnd=t,this}},{key:"setActiveItem",value:function(t){var e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}},{key:"onKeydown",value:function(t){var e=this,n=t.keyCode,i=["altKey","ctrlKey","metaKey","shiftKey"].every((function(n){return!t[n]||e._allowedModifierKeys.indexOf(n)>-1}));switch(n){case f.n:return void this.tabOut.next();case f.c:if(this._vertical&&i){this.setNextItemActive();break}return;case f.o:if(this._vertical&&i){this.setPreviousItemActive();break}return;case f.l:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case f.h:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case f.g:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case f.d:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||Object(f.r)(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(n>=f.a&&n<=f.p||n>=f.q&&n<=f.i)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],t.preventDefault()}},{key:"isTyping",value:function(){return this._pressedLetters.length>0}},{key:"setFirstItemActive",value:function(){this._setActiveItemByIndex(0,1)}},{key:"setLastItemActive",value:function(){this._setActiveItemByIndex(this._items.length-1,-1)}},{key:"setNextItemActive",value:function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}},{key:"setPreviousItemActive",value:function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}},{key:"updateActiveItem",value:function(t){var e=this._getItemsArray(),n="number"==typeof t?t:e.indexOf(t),i=e[n];this._activeItem=null==i?null:i,this._activeItemIndex=n}},{key:"_setActiveItemByDelta",value:function(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}},{key:"_setActiveInWrapMode",value:function(t){for(var e=this._getItemsArray(),n=1;n<=e.length;n++){var i=(this._activeItemIndex+t*n+e.length)%e.length;if(!this._skipPredicateFn(e[i]))return void this.setActiveItem(i)}}},{key:"_setActiveInDefaultMode",value:function(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}},{key:"_setActiveItemByIndex",value:function(t,e){var n=this._getItemsArray();if(n[t]){for(;this._skipPredicateFn(n[t]);)if(!n[t+=e])return;this.setActiveItem(t)}}},{key:"_getItemsArray",value:function(){return this._items instanceof r.F?this._items.toArray():this._items}},{key:"activeItemIndex",get:function(){return this._activeItemIndex}},{key:"activeItem",get:function(){return this._activeItem}}]),t}(),A=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,[{key:"setActiveItem",value:function(t){this.activeItem&&this.activeItem.setInactiveStyles(),o(h(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.setActiveStyles()}}]),n}(P),I=function(t){a(n,t);var e=c(n);function n(){var t;return C(this,n),(t=e.apply(this,arguments))._origin="program",t}return w(n,[{key:"setFocusOrigin",value:function(t){return this._origin=t,this}},{key:"setActiveItem",value:function(t){o(h(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.focus(this._origin)}}]),n}(P),M=function(){var t=function(){function t(e){C(this,t),this._platform=e}return w(t,[{key:"isDisabled",value:function(t){return t.hasAttribute("disabled")}},{key:"isVisible",value:function(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}},{key:"isTabbable",value:function(t){if(!this._platform.isBrowser)return!1;var e,n=function(t){try{return t.frameElement}catch(e){return null}}((e=t).ownerDocument&&e.ownerDocument.defaultView||window);if(n){if(-1===R(n))return!1;if(!this.isVisible(n))return!1}var i=t.nodeName.toLowerCase(),r=R(t);return t.hasAttribute("contenteditable")?-1!==r:"iframe"!==i&&"object"!==i&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){var e=t.nodeName.toLowerCase(),n="input"===e&&t.type;return"text"===n||"password"===n||"select"===e||"textarea"===e}(t))&&("audio"===i?!!t.hasAttribute("controls")&&-1!==r:"video"===i?-1!==r&&(null!==r||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}},{key:"isFocusable",value:function(t,e){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){var e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||D(t))}(t)&&!this.isDisabled(t)&&((null==e?void 0:e.ignoreVisibility)||this.isVisible(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(s.a))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(s.a))},token:t,providedIn:"root"}),t}();function D(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;var e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function R(t){if(!D(t))return null;var e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}var j=function(){function t(e,n,i,r){var o=this,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];C(this,t),this._element=e,this._checker=n,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=function(){return o.focusLastTabbableElement()},this.endAnchorListener=function(){return o.focusFirstTabbableElement()},this._enabled=!0,a||this.attachAnchors()}return w(t,[{key:"destroy",value:function(){var t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this.endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}},{key:"attachAnchors",value:function(){var t=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular((function(){t._startAnchor||(t._startAnchor=t._createAnchor(),t._startAnchor.addEventListener("focus",t.startAnchorListener)),t._endAnchor||(t._endAnchor=t._createAnchor(),t._endAnchor.addEventListener("focus",t.endAnchorListener))})),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}},{key:"focusInitialElementWhenReady",value:function(){var t=this;return new Promise((function(e){t._executeOnStable((function(){return e(t.focusInitialElement())}))}))}},{key:"focusFirstTabbableElementWhenReady",value:function(){var t=this;return new Promise((function(e){t._executeOnStable((function(){return e(t.focusFirstTabbableElement())}))}))}},{key:"focusLastTabbableElementWhenReady",value:function(){var t=this;return new Promise((function(e){t._executeOnStable((function(){return e(t.focusLastTabbableElement())}))}))}},{key:"_getRegionBoundary",value:function(t){for(var e=this._element.querySelectorAll("[cdk-focus-region-".concat(t,"], [cdkFocusRegion").concat(t,"], [cdk-focus-").concat(t,"]")),n=0;n=0;n--){var i=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(i)return i}return null}},{key:"_createAnchor",value:function(){var t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}},{key:"_toggleAnchorTabIndex",value:function(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}},{key:"toggleAnchors",value:function(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}},{key:"_executeOnStable",value:function(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(Object(y.a)(1)).subscribe(t)}},{key:"enabled",get:function(){return this._enabled},set:function(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}}]),t}(),L=function(){var t=function(){function t(e,n,i){C(this,t),this._checker=e,this._ngZone=n,this._document=i}return w(t,[{key:"create",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new j(t,this._checker,this._ngZone,this._document,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(M),r.Yb(r.B),r.Yb(i.d))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(M),Object(r.Yb)(r.B),Object(r.Yb)(i.d))},token:t,providedIn:"root"}),t}(),N=function(){var t=function(){function t(e,n,i){C(this,t),this._elementRef=e,this._focusTrapFactory=n,this._previouslyFocusedElement=null,this._document=i,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}return w(t,[{key:"ngOnDestroy",value:function(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}},{key:"ngAfterContentInit",value:function(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}},{key:"ngDoCheck",value:function(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}},{key:"ngOnChanges",value:function(t){var e=t.autoCapture;e&&!e.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}},{key:"_captureFocus",value:function(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}},{key:"enabled",get:function(){return this.focusTrap.enabled},set:function(t){this.focusTrap.enabled=Object(_.c)(t)}},{key:"autoCapture",get:function(){return this._autoCapture},set:function(t){this._autoCapture=Object(_.c)(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(r.l),r.Ob(L),r.Ob(i.d))},t.\u0275dir=r.Jb({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[r.Ab]}),t}();"undefined"!=typeof Element&∈var U=new r.s("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),F=new r.s("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),B=function(){var t=function(){function t(e,n,i,r){C(this,t),this._ngZone=n,this._defaultOptions=r,this._document=i,this._liveElement=e||this._createLiveElement()}return w(t,[{key:"announce",value:function(t){for(var e,n,i,r=this,o=this._defaultOptions,a=arguments.length,s=new Array(a>1?a-1:0),c=1;c1&&void 0!==arguments[1]&&arguments[1];if(!this._platform.isBrowser)return Object(d.a)(null);var n=Object(_.e)(t),i=Object(s.c)(n)||this._getDocument(),r=this._elementInfo.get(n);if(r)return e&&(r.checkChildren=!0),r.subject;var o={checkChildren:e,subject:new u.b,rootNode:i};return this._elementInfo.set(n,o),this._registerGlobalListeners(o),o.subject}},{key:"stopMonitoring",value:function(t){var e=Object(_.e)(t),n=this._elementInfo.get(e);n&&(n.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._removeGlobalListeners(n))}},{key:"focusVia",value:function(t,e,n){var i=Object(_.e)(t);this._setOriginForCurrentEventQueue(e),"function"==typeof i.focus&&i.focus(n)}},{key:"ngOnDestroy",value:function(){var t=this;this._elementInfo.forEach((function(e,n){return t.stopMonitoring(n)}))}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_toggleClass",value:function(t,e,n){n?t.classList.add(e):t.classList.remove(e)}},{key:"_getFocusOrigin",value:function(t){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"}},{key:"_setClasses",value:function(t,e){this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e)}},{key:"_setOriginForCurrentEventQueue",value:function(t){var e=this;this._ngZone.runOutsideAngular((function(){e._origin=t,0===e._detectionMode&&(e._originTimeoutId=setTimeout((function(){return e._origin=null}),1))}))}},{key:"_wasCausedByTouch",value:function(t){var e=Q(t);return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}},{key:"_onFocus",value:function(t,e){var n=this._elementInfo.get(e);if(n&&(n.checkChildren||e===Q(t))){var i=this._getFocusOrigin(t);this._setClasses(e,i),this._emitOrigin(n.subject,i),this._lastFocusOrigin=i}}},{key:"_onBlur",value:function(t,e){var n=this._elementInfo.get(e);!n||n.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(n.subject,null))}},{key:"_emitOrigin",value:function(t,e){this._ngZone.run((function(){return t.next(e)}))}},{key:"_registerGlobalListeners",value:function(t){var e=this;if(this._platform.isBrowser){var n=t.rootNode,i=this._rootNodeFocusListenerCount.get(n)||0;i||this._ngZone.runOutsideAngular((function(){n.addEventListener("focus",e._rootNodeFocusAndBlurListener,q),n.addEventListener("blur",e._rootNodeFocusAndBlurListener,q)})),this._rootNodeFocusListenerCount.set(n,i+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular((function(){var t=e._getDocument(),n=e._getWindow();t.addEventListener("keydown",e._documentKeydownListener,q),t.addEventListener("mousedown",e._documentMousedownListener,q),t.addEventListener("touchstart",e._documentTouchstartListener,q),n.addEventListener("focus",e._windowFocusListener)}))}}},{key:"_removeGlobalListeners",value:function(t){var e=t.rootNode;if(this._rootNodeFocusListenerCount.has(e)){var n=this._rootNodeFocusListenerCount.get(e);n>1?this._rootNodeFocusListenerCount.set(e,n-1):(e.removeEventListener("focus",this._rootNodeFocusAndBlurListener,q),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,q),this._rootNodeFocusListenerCount.delete(e))}if(!--this._monitoredElementCount){var i=this._getDocument(),r=this._getWindow();i.removeEventListener("keydown",this._documentKeydownListener,q),i.removeEventListener("mousedown",this._documentMousedownListener,q),i.removeEventListener("touchstart",this._documentTouchstartListener,q),r.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(r.B),r.Yb(s.a),r.Yb(i.d,8),r.Yb(H,8))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(r.B),Object(r.Yb)(s.a),Object(r.Yb)(i.d,8),Object(r.Yb)(H,8))},token:t,providedIn:"root"}),t}();function Q(t){return t.composedPath?t.composedPath()[0]:t.target}var W=function(){var t=function(){function t(e,n){C(this,t),this._elementRef=e,this._focusMonitor=n,this.cdkFocusChange=new r.o}return w(t,[{key:"ngAfterViewInit",value:function(){var t=this;this._monitorSubscription=this._focusMonitor.monitor(this._elementRef,this._elementRef.nativeElement.hasAttribute("cdkMonitorSubtreeFocus")).subscribe((function(e){return t.cdkFocusChange.emit(e)}))}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(r.l),r.Ob($))},t.\u0275dir=r.Jb({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"}}),t}(),G=function(){var t=function(){function t(e,n){C(this,t),this._platform=e,this._document=n}return w(t,[{key:"getHighContrastMode",value:function(){if(!this._platform.isBrowser)return 0;var t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);var e=this._document.defaultView||window,n=e&&e.getComputedStyle?e.getComputedStyle(t):null,i=(n&&n.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(t),i){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}},{key:"_applyBodyHighContrastModeCssClasses",value:function(){if(this._platform.isBrowser&&this._document.body){var t=this._document.body.classList;t.remove("cdk-high-contrast-active"),t.remove("cdk-high-contrast-black-on-white"),t.remove("cdk-high-contrast-white-on-black");var e=this.getHighContrastMode();1===e?(t.add("cdk-high-contrast-active"),t.add("cdk-high-contrast-black-on-white")):2===e&&(t.add("cdk-high-contrast-active"),t.add("cdk-high-contrast-white-on-black"))}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(s.a),r.Yb(i.d))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(s.a),Object(r.Yb)(i.d))},token:t,providedIn:"root"}),t}(),Y=function(){var t=function t(e){C(this,t),e._applyBodyHighContrastModeCssClasses()};return t.\u0275mod=r.Mb({type:t}),t.\u0275inj=r.Lb({factory:function(e){return new(e||t)(r.Yb(G))},imports:[[s.b,O.c]]}),t}()},jOdJ:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n("VxHp"),r=n("xVbo"),o=n("J+dc"),a=n("iqFP"),s=n("fbWu"),c=n("5E2i");function u(t,e){var n=arguments.length>=2;return function(u){return u.pipe(t?Object(r.a)((function(e,n){return t(e,n,u)})):c.a,Object(o.a)(1),n?Object(a.a)(e):Object(s.a)((function(){return new i.a})))}}},jPSd:function(t,e){(function(e){t.exports=e}).call(this,{})},kSHZ:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return s}));var i=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t,i)).scheduler=t,r.work=i,r}return w(n,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e>0?o(h(n.prototype),"schedule",this).call(this,t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}},{key:"execute",value:function(t,e){return e>0||this.closed?o(h(n.prototype),"execute",this).call(this,t,e):this._execute(t,e)}},{key:"requestAsyncId",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==i&&i>0||null===i&&this.delay>0?o(h(n.prototype),"requestAsyncId",this).call(this,t,e,i):t.flush(this)}}]),n}(n("EWqr").a),r=new(function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(n("DG/E").a))(i),s=r},kZht:function(t,e,n){"use strict";n.d(e,"a",(function(){return Fo})),n.d(e,"b",(function(){return vu})),n.d(e,"c",(function(){return fu})),n.d(e,"d",(function(){return du})),n.d(e,"e",(function(){return hu})),n.d(e,"f",(function(){return cl})),n.d(e,"g",(function(){return Zu})),n.d(e,"h",(function(){return Oo})),n.d(e,"i",(function(){return Pu})),n.d(e,"j",(function(){return Us})),n.d(e,"k",(function(){return Ou})),n.d(e,"l",(function(){return Fs})),n.d(e,"m",(function(){return rl})),n.d(e,"n",(function(){return Hn})),n.d(e,"o",(function(){return zc})),n.d(e,"p",(function(){return rt})),n.d(e,"q",(function(){return y})),n.d(e,"r",(function(){return T})),n.d(e,"s",(function(){return it})),n.d(e,"t",(function(){return Uo})),n.d(e,"u",(function(){return rc})),n.d(e,"v",(function(){return oc})),n.d(e,"w",(function(){return _u})),n.d(e,"x",(function(){return vt})),n.d(e,"y",(function(){return Ju})),n.d(e,"z",(function(){return mt})),n.d(e,"A",(function(){return Qu})),n.d(e,"B",(function(){return Mu})),n.d(e,"C",(function(){return _})),n.d(e,"D",(function(){return mu})),n.d(e,"E",(function(){return gu})),n.d(e,"F",(function(){return Hc})),n.d(e,"G",(function(){return Hs})),n.d(e,"H",(function(){return zs})),n.d(e,"I",(function(){return Vs})),n.d(e,"J",(function(){return $s})),n.d(e,"K",(function(){return Ii})),n.d(e,"L",(function(){return k})),n.d(e,"M",(function(){return nl})),n.d(e,"N",(function(){return uc})),n.d(e,"O",(function(){return Bu})),n.d(e,"P",(function(){return wo})),n.d(e,"Q",(function(){return Qs})),n.d(e,"R",(function(){return dc})),n.d(e,"S",(function(){return xt})),n.d(e,"T",(function(){return Wu})),n.d(e,"U",(function(){return si})),n.d(e,"V",(function(){return z})),n.d(e,"W",(function(){return ft})),n.d(e,"X",(function(){return ai})),n.d(e,"Y",(function(){return al})),n.d(e,"Z",(function(){return Vu})),n.d(e,"ab",(function(){return yu})),n.d(e,"bb",(function(){return Co})),n.d(e,"cb",(function(){return Ss})),n.d(e,"db",(function(){return X})),n.d(e,"eb",(function(){return Pi})),n.d(e,"fb",(function(){return hi})),n.d(e,"gb",(function(){return Zn})),n.d(e,"hb",(function(){return Jn})),n.d(e,"ib",(function(){return ii})),n.d(e,"jb",(function(){return ei})),n.d(e,"kb",(function(){return ti})),n.d(e,"lb",(function(){return ni})),n.d(e,"mb",(function(){return ks})),n.d(e,"nb",(function(){return ol})),n.d(e,"ob",(function(){return ws})),n.d(e,"pb",(function(){return Cs})),n.d(e,"qb",(function(){return Xn})),n.d(e,"rb",(function(){return Y})),n.d(e,"sb",(function(){return Ko})),n.d(e,"tb",(function(){return Oa})),n.d(e,"ub",(function(){return _a})),n.d(e,"vb",(function(){return Os})),n.d(e,"wb",(function(){return he})),n.d(e,"xb",(function(){return U})),n.d(e,"yb",(function(){return Kn})),n.d(e,"zb",(function(){return Vo})),n.d(e,"Ab",(function(){return ae})),n.d(e,"Bb",(function(){return js})),n.d(e,"Cb",(function(){return Xi})),n.d(e,"Db",(function(){return ra})),n.d(e,"Eb",(function(){return Ka})),n.d(e,"Fb",(function(){return bs})),n.d(e,"Gb",(function(){return Wa})),n.d(e,"Hb",(function(){return nu})),n.d(e,"Ib",(function(){return Mt})),n.d(e,"Jb",(function(){return Ft})),n.d(e,"Kb",(function(){return x})),n.d(e,"Lb",(function(){return P})),n.d(e,"Mb",(function(){return Lt})),n.d(e,"Nb",(function(){return Bt})),n.d(e,"Ob",(function(){return ua})),n.d(e,"Pb",(function(){return ba})),n.d(e,"Qb",(function(){return va})),n.d(e,"Rb",(function(){return ma})),n.d(e,"Sb",(function(){return ga})),n.d(e,"Tb",(function(){return pa})),n.d(e,"Ub",(function(){return fa})),n.d(e,"Vb",(function(){return ya})),n.d(e,"Wb",(function(){return Fn})),n.d(e,"Xb",(function(){return gs})),n.d(e,"Yb",(function(){return ht})),n.d(e,"Zb",(function(){return la})),n.d(e,"ac",(function(){return lu})),n.d(e,"bc",(function(){return ka})),n.d(e,"cc",(function(){return ou})),n.d(e,"dc",(function(){return an})),n.d(e,"ec",(function(){return on})),n.d(e,"fc",(function(){return Ea})),n.d(e,"gc",(function(){return jc})),n.d(e,"hc",(function(){return Lc})),n.d(e,"ic",(function(){return Nc})),n.d(e,"jc",(function(){return Uc})),n.d(e,"kc",(function(){return Aa})),n.d(e,"lc",(function(){return Pa})),n.d(e,"mc",(function(){return da})),n.d(e,"nc",(function(){return Ia})),n.d(e,"oc",(function(){return Ma})),n.d(e,"pc",(function(){return Da})),n.d(e,"qc",(function(){return kc})),n.d(e,"rc",(function(){return wc})),n.d(e,"sc",(function(){return Cc})),n.d(e,"tc",(function(){return Tc})),n.d(e,"uc",(function(){return Sc})),n.d(e,"vc",(function(){return Ec})),n.d(e,"wc",(function(){return xc})),n.d(e,"xc",(function(){return Pc})),n.d(e,"yc",(function(){return Ac})),n.d(e,"zc",(function(){return Xc})),n.d(e,"Ac",(function(){return ca})),n.d(e,"Bc",(function(){return ne})),n.d(e,"Cc",(function(){return ee})),n.d(e,"Dc",(function(){return te})),n.d(e,"Ec",(function(){return Me})),n.d(e,"Fc",(function(){return Mi})),n.d(e,"Gc",(function(){return Di})),n.d(e,"Hc",(function(){return Nt})),n.d(e,"Ic",(function(){return iu})),n.d(e,"Jc",(function(){return Jc})),n.d(e,"Kc",(function(){return Ga})),n.d(e,"Lc",(function(){return Qa})),n.d(e,"Mc",(function(){return wa})),n.d(e,"Nc",(function(){return ms})),n.d(e,"Oc",(function(){return sa})),n.d(e,"Pc",(function(){return uu})),n.d(e,"Qc",(function(){return us})),n.d(e,"Rc",(function(){return ls})),n.d(e,"Sc",(function(){return ds})),n.d(e,"Tc",(function(){return hs})),n.d(e,"Uc",(function(){return fs})),n.d(e,"Vc",(function(){return ps})),n.d(e,"Wc",(function(){return tu}));var r=n("ZTXN"),s=n("bwdy"),u=n("IdLP"),d=n("g6G6"),f=n("7ntQ");function g(t){return{toString:t}.toString()}function v(t,e,n){return g((function(){var r=function(t){return function(){if(t){var e=t.apply(void 0,arguments);for(var n in e)this[n]=e[n]}}}(e);function o(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:T.Default;if(void 0===ct)throw new Error("inject() must be called from an injection context");return null===ct?pt(t,void 0,e):ct.get(t,e&T.Optional?null:void 0,e)}function ht(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T.Default;return(q||dt)(V(t),e)}var ft=ht;function pt(t,e,n){var i=A(t);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&T.Optional)return null;if(void 0!==e)return e;throw new Error("Injector: NOT_FOUND [".concat(U(t),"]"))}function bt(t){for(var e=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:ot;if(e===ot){var n=new Error("NullInjectorError: No provider for ".concat(U(t),"!"));throw n.name="NullInjectorError",n}return e}}]),t}(),mt=function t(){C(this,t)},vt=function t(){C(this,t)};function yt(t,e){t.forEach((function(t){return Array.isArray(t)?yt(t,e):e(t)}))}function _t(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function Ot(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function kt(t,e){for(var n=[],i=0;i=0?t[1|i]=n:function(t,e,n,i){var r=t.length;if(r==e)t.push(n,i);else if(1===r)t.push(i,t[0]),t[0]=n;else{for(r--,t.push(t[r-1],t[r]);r>e;)t[r]=t[r-2],r--;t[e]=n,t[e+1]=i}}(t,i=~i,e,n),i}function Ct(t,e){var n=Tt(t,e);if(n>=0)return t[1|n]}function Tt(t,e){return function(t,e,n){for(var i=0,r=t.length>>1;r!==i;){var o=i+(r-i>>1),a=t[o<<1];if(e===a)return o<<1;a>e?r=o:i=o+1}return~(r<<1)}(t,e)}var St,Et=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),xt=((St={})[St.Emulated=0]="Emulated",St[St.Native=1]="Native",St[St.None=2]="None",St[St.ShadowDom=3]="ShadowDom",St),Pt={},At=[],It=0;function Mt(t){return g((function(){var e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===Et.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||At,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||xt.Emulated,id:"c",styles:t.styles||At,_:null,setInput:null,schemas:t.schemas||null,tView:null},i=t.directives,r=t.features,o=t.pipes;return n.id+=It++,n.inputs=Ut(t.inputs,e),n.outputs=Ut(t.outputs),r&&r.forEach((function(t){return t(n)})),n.directiveDefs=i?function(){return("function"==typeof i?i():i).map(Dt)}:null,n.pipeDefs=o?function(){return("function"==typeof o?o():o).map(Rt)}:null,n}))}function Dt(t){return zt(t)||function(t){return t[Z]||null}(t)}function Rt(t){return function(t){return t[X]||null}(t)}var jt={};function Lt(t){var e={type:t.type,bootstrap:t.bootstrap||At,declarations:t.declarations||At,imports:t.imports||At,exports:t.exports||At,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&g((function(){jt[t.id]=t.type})),e}function Nt(t,e){return g((function(){var n=Ht(t,!0);n.declarations=e.declarations||At,n.imports=e.imports||At,n.exports=e.exports||At}))}function Ut(t,e){if(null==t)return Pt;var n={};for(var i in t)if(t.hasOwnProperty(i)){var r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),n[r]=i,e&&(e[r]=o)}return n}var Ft=Mt;function Bt(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function zt(t){return t[K]||null}function Vt(t,e){return t.hasOwnProperty(et)?t[et]:null}function Ht(t,e){var n=t[J]||null;if(!n&&!0===e)throw new Error("Type ".concat(U(t)," does not have '\u0275mod' property."));return n}function qt(t){return Array.isArray(t)&&"object"==typeof t[1]}function $t(t){return Array.isArray(t)&&!0===t[1]}function Qt(t){return 0!=(8&t.flags)}function Wt(t){return 2==(2&t.flags)}function Gt(t){return 1==(1&t.flags)}function Yt(t){return null!==t.template}function Kt(t){return 0!=(512&t[2])}function Zt(t){return"string"==typeof t?t:null==t?"":""+t}function Xt(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Zt(t)}var Jt=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Y);function te(t){return{name:"window",target:t.ownerDocument.defaultView}}function ee(t){return{name:"document",target:t.ownerDocument}}function ne(t){return{name:"body",target:t.ownerDocument.body}}function ie(t){return t instanceof Function?t():t}function re(t,e){var n=e?" in "+e:"";throw new Error("No provider for ".concat(Xt(t)," found").concat(n))}var oe=function(){function t(e,n,i){C(this,t),this.previousValue=e,this.currentValue=n,this.firstChange=i}return w(t,[{key:"isFirstChange",value:function(){return this.firstChange}}]),t}();function ae(){return se}function se(t){return t.type.prototype.ngOnChanges&&(t.setInput=ue),ce}function ce(){var t=le(this),e=null==t?void 0:t.current;if(e){var n=t.previous;if(n===Pt)t.previous=e;else for(var i in e)n[i]=e[i];t.current=null,this.ngOnChanges(e)}}function ue(t,e,n,i){var r=le(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:Pt,current:null}),o=r.current||(r.current={}),a=r.previous,s=this.declaredInputs[n],c=a[s];o[s]=new oe(c&&c.currentValue,e,a===Pt),t[i]=e}function le(t){return t.__ngSimpleChanges__||null}ae.ngInherit=!0;var de=void 0;function he(t){de=t}function fe(){return void 0!==de?de:"undefined"!=typeof document?document:void 0}function pe(t){return!!t.listen}var be={createRenderer:function(t,e){return fe()}};function ge(t){for(;Array.isArray(t);)t=t[0];return t}function me(t,e){return ge(e[t+20])}function ve(t,e){return ge(e[t.index])}function ye(t,e){return t.data[e+20]}function _e(t,e){return t[e+20]}function Oe(t,e){var n=e[t];return qt(n)?n:n[0]}function ke(t){var e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function we(t){return 4==(4&t[2])}function Ce(t){return 128==(128&t[2])}function Te(t,e){return null===t||null==e?null:t[e]}function Se(t){t[18]=0}function Ee(t,e){t[5]+=e;for(var n=t,i=t[3];null!==i&&(1===e&&1===n[5]||-1===e&&0===n[5]);)i[5]+=e,n=i,i=i[3]}var xe={lFrame:Ze(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Pe(){return xe.bindingsEnabled}function Ae(){return xe.lFrame.lView}function Ie(){return xe.lFrame.tView}function Me(t){xe.lFrame.contextLView=t}function De(){return xe.lFrame.currentTNode}function Re(t,e){xe.lFrame.currentTNode=t,xe.lFrame.isParent=e}function je(){return xe.lFrame.isParent}function Le(){xe.lFrame.isParent=!1}function Ne(){return xe.isInCheckNoChangesMode}function Ue(t){xe.isInCheckNoChangesMode=t}function Fe(){var t=xe.lFrame,e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Be(){return xe.lFrame.bindingIndex}function ze(){return xe.lFrame.bindingIndex++}function Ve(t){var e=xe.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function He(t,e){var n=xe.lFrame;n.bindingIndex=n.bindingRootIndex=t,qe(e)}function qe(t){xe.lFrame.currentDirectiveIndex=t}function $e(t){var e=xe.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function Qe(){return xe.lFrame.currentQueryIndex}function We(t){xe.lFrame.currentQueryIndex=t}function Ge(t,e){var n=Ke();xe.lFrame=n,n.currentTNode=e,n.lView=t}function Ye(t){var e=Ke(),n=t[1];xe.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex}function Ke(){var t=xe.lFrame,e=null===t?null:t.child;return null===e?Ze(t):e}function Ze(t){var e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null};return null!==t&&(t.child=e),e}function Xe(){var t=xe.lFrame;return xe.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var Je=Xe;function tn(){var t=Xe();t.isParent=!0,t.tView=null,t.selectedIndex=0,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function en(){return xe.lFrame.selectedIndex}function nn(t){xe.lFrame.selectedIndex=t}function rn(){var t=xe.lFrame;return ye(t.tView,t.selectedIndex)}function on(){xe.lFrame.currentNamespace="http://www.w3.org/2000/svg"}function an(){xe.lFrame.currentNamespace=null}function sn(t,e){for(var n=e.directiveStart,i=e.directiveEnd;n=i)break}else e[a]<0&&(t[18]+=65536),(o>11>16&&(3&t[2])===e&&(t[2]+=2048,o.call(a)):o.call(a)}var fn=function t(e,n,i){C(this,t),this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=i};function pn(t,e,n){for(var i=pe(t),r=0;re){a=o-1;break}}}for(;o>16,i=e;n>0;)i=i[15],n--;return i}var kn=!0;function wn(t){var e=kn;return kn=t,e}var Cn=0;function Tn(t,e){var n=En(t,e);if(-1!==n)return n;var i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,Sn(i.data,t),Sn(e,null),Sn(i.blueprint,null));var r=xn(t,e),o=t.injectorIndex;if(yn(r))for(var a=_n(r),s=On(r,e),c=s[1].data,u=0;u<8;u++)e[o+u]=s[a+u]|c[a+u];return e[o+8]=r,o}function Sn(t,e){t.push(0,0,0,0,0,0,0,0,e)}function En(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function xn(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;for(var n=0,i=null,r=e;null!==r;){var o=r[1],a=o.type;if(null===(i=2===a?o.declTNode:1===a?r[6]:null))return-1;if(n++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return-1}function Pn(t,e,n){!function(t,e,n){var i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(nt)&&(i=n[nt]),null==i&&(i=n[nt]=Cn++);var r=255&i,o=1<3&&void 0!==arguments[3]?arguments[3]:T.Default,r=arguments.length>4?arguments[4]:void 0;if(null!==t){var o=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;var e=t.hasOwnProperty(nt)?t[nt]:void 0;return"number"==typeof e&&e>0?255&e:e}(n);if("function"==typeof o){Ge(e,t);try{var a=o();if(null!=a||i&T.Optional)return a;re(n)}finally{Je()}}else if("number"==typeof o){if(-1===o)return new Nn(t,e);var s=null,c=En(t,e),u=-1,l=i&T.Host?e[16][6]:null;for((-1===c||i&T.SkipSelf)&&(-1!==(u=-1===c?xn(t,e):e[c+8])&&Ln(i,!1)?(s=e[1],c=_n(u),e=On(u,e)):c=-1);-1!==c;){var d=e[1];if(jn(o,c,d.data)){var h=Mn(c,e,n,s,i,l);if(h!==In)return h}-1!==(u=e[c+8])&&Ln(i,e[1].data[c+8]===l)&&jn(o,c,e)?(s=d,c=_n(u),e=On(u,e)):c=-1}}}if(i&T.Optional&&void 0===r&&(r=null),0==(i&(T.Self|T.Host))){var f=e[9],p=lt(void 0);try{return f?f.get(n,r,i&T.Optional):pt(n,r,i&T.Optional)}finally{lt(p)}}if(i&T.Optional)return r;re(n,"NodeInjector")}var In={};function Mn(t,e,n,i,r,o){var a=e[1],s=a.data[t+8],c=Dn(s,a,n,null==i?Wt(s)&&kn:i!=a&&2===s.type,r&T.Host&&o===s);return null!==c?Rn(e,a,c,s):In}function Dn(t,e,n,i,r){for(var o=t.providerIndexes,a=e.data,s=1048575&o,c=t.directiveStart,u=o>>20,l=r?s+u:t.directiveEnd,d=i?s:s+u;d=c&&h.type===n)return d}if(r){var f=a[c];if(f&&Yt(f)&&f.type===n)return c}return null}function Rn(t,e,n,i){var r=t[n],o=e.data;if(r instanceof fn){var a=r;a.resolving&&function(t,e){throw new Error("Circular dependency in DI detected for "+t)}(Xt(o[n]));var s=wn(a.canSeeViewProviders);a.resolving=!0;var c=a.injectImpl?lt(a.injectImpl):null;Ge(t,i);try{r=t[n]=a.factory(void 0,o,t,i),e.firstCreatePass&&n>=i.directiveStart&&function(t,e,n){var i=e.type.prototype,r=i.ngOnChanges,o=i.ngOnInit,a=i.ngDoCheck;if(r){var s=se(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,s)}o&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,o),a&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,a),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,a))}(n,o[n],e)}finally{null!==c&<(c),wn(s),a.resolving=!1,Je()}}return r}function jn(t,e,n){var i=64&t,r=32&t;return!!((128&t?i?r?n[e+7]:n[e+6]:r?n[e+5]:n[e+4]:i?r?n[e+3]:n[e+2]:r?n[e+1]:n[e])&1<1?e-1:0),i=1;i"),!0}},{key:"endElement",value:function(t){var e=t.nodeName.toLowerCase();_i.hasOwnProperty(e)&&!gi.hasOwnProperty(e)&&(this.buf.push(""))}},{key:"chars",value:function(t){this.buf.push(xi(t))}},{key:"checkClobberedElement",value:function(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e}}]),t}(),Si=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ei=/([^\#-~ |!])/g;function xi(t){return t.replace(/&/g,"&").replace(Si,(function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"})).replace(Ei,(function(t){return"&#"+t.charCodeAt(0)+";"})).replace(//g,">")}function Pi(t,e){var n=null;try{bi=bi||function(t){return function(){try{return!!(new window.DOMParser).parseFromString("","text/html")}catch(t){return!1}}()?new ci:new ui(t)}(t);var i=e?String(e):"";n=bi.getInertBodyElement(i);var r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=n.innerHTML,n=bi.getInertBodyElement(i)}while(i!==o);var a=new Ti,s=a.sanitizeChildren(Ai(n)||n);return ai()&&a.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),s}finally{if(n)for(var c=Ai(n)||n;c.firstChild;)c.removeChild(c.firstChild)}}function Ai(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Ii=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function Mi(t){var e=Ri();return e?e.sanitize(Ii.HTML,t)||"":Zn(t,"HTML")?Kn(t):Pi(fe(),Zt(t))}function Di(t){var e=Ri();return e?e.sanitize(Ii.URL,t)||"":Zn(t,"URL")?Kn(t):hi(Zt(t))}function Ri(){var t=Ae();return t&&t[12]}function ji(t,e){t.__ngContext__=e}function Li(t,e,n){for(var i=t.length;;){var r=t.indexOf(e,n);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){var o=e.length;if(r+o===i||t.charCodeAt(r+o)<=32)return r}n=r+1}}function Ni(t,e,n){for(var i=0;io?"":r[l+1].toLowerCase();var h=8&i?d:null;if(h&&-1!==Li(h,u,0)||2&i&&u!==d){if(zi(i))return!1;a=!0}}}}else{if(!a&&!zi(i)&&!zi(c))return!1;if(a&&zi(c))continue;a=!1,i=c|1&i}}return zi(i)||a}function zi(t){return 0==(1&t)}function Vi(t,e,n,i){if(null===e)return-1;var r=0;if(i||!n){for(var o=!1;r-1)for(n++;n2&&void 0!==arguments[2]&&arguments[2],i=0;i0?'="'+s+'"':"")+"]"}else 8&i?r+="."+a:4&i&&(r+=" "+a);else""===r||zi(a)||(e+=$i(o,r),r=""),i=a,o=o||!zi(i);n++}return""!==r&&(e+=$i(o,r)),e}var Wi={};function Gi(t){var e=t[3];return $t(e)?e[3]:e}function Yi(t){return Zi(t[13])}function Ki(t){return Zi(t[4])}function Zi(t){for(;null!==t&&!$t(t);)t=t[4];return t}function Xi(t){Ji(Ie(),Ae(),en()+t,Ne())}function Ji(t,e,n,i){if(!i)if(3==(3&e[2])){var r=t.preOrderCheckHooks;null!==r&&cn(e,r,n)}else{var o=t.preOrderHooks;null!==o&&un(e,o,0,n)}nn(n)}function tr(t,e){return t<<17|e<<2}function er(t){return t>>17&32767}function nr(t){return 2|t}function ir(t){return(131068&t)>>2}function rr(t,e){return-131069&t|e<<2}function or(t){return 1|t}function ar(t,e){var n=t.contentQueries;if(null!==n)for(var i=0;i20&&Ji(t,e,0,Ne()),n(i,r)}finally{nn(o)}}function pr(t,e,n){if(Qt(e))for(var i=e.directiveEnd,r=e.directiveStart;r2&&void 0!==arguments[2]?arguments[2]:ve,i=e.localNames;if(null!==i)for(var r=e.index+1,o=0;o0&&function t(e){for(var n=Yi(e);null!==n;n=Ki(n))for(var i=10;i0&&t(r)}var a=e[1].components;if(null!==a)for(var s=0;s0&&t(c)}}(n)}}function Lr(t,e){var n=Oe(e,t),i=n[1];!function(t,e){for(var n=e.length;n0&&(t[i-1][4]=r[4]);var a=Ot(t,10+e);so(r[1],n=r,n[11],2,null,null),n[0]=null,n[6]=null;var s=a[19];null!==s&&s.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}}function Zr(t,e){if(!(256&e[2])){var n=e[11];pe(n)&&n.destroyNode&&so(t,e,n,3,null,null),function(t){var e=t[13];if(!e)return Xr(t[1],t);for(;e;){var n=null;if(qt(e))n=e[13];else{var i=e[10];i&&(n=i)}if(!n){for(;e&&!e[4]&&e!==t;)qt(e)&&Xr(e[1],e),e=e[3];null===e&&(e=t),qt(e)&&Xr(e[1],e),n=e&&e[4]}e=n}}(e)}}function Xr(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){var n;if(null!=t&&null!=(n=t.destroyHooks))for(var i=0;i=0?i[c]():i[-c].unsubscribe(),r+=2}else n[r].call(i[n[r+1]]);e[7]=null}}(t,e),1===e[1].type&&pe(e[11])&&e[11].destroy();var n=e[17];if(null!==n&&$t(e[3])){n!==e[3]&&Yr(n,e);var i=e[19];null!==i&&i.detachView(t)}}}function Jr(t,e,n){for(var i=e.parent;null!=i&&(3===i.type||4===i.type);)i=(e=i).parent;if(null===i)return n[0];if(e&&4===e.type&&4&e.flags)return ve(e,n).parentNode;if(2&i.flags){var r=t.data,o=r[r[i.index].directiveStart].encapsulation;if(o!==xt.ShadowDom&&o!==xt.Native)return null}return ve(i,n)}function to(t,e,n,i){pe(t)?t.insertBefore(e,n,i):e.insertBefore(n,i,!0)}function eo(t,e,n){pe(t)?t.appendChild(e,n):e.appendChild(n)}function no(t,e,n,i){null!==i?to(t,e,n,i):eo(t,e,n)}function io(t,e){return pe(t)?t.parentNode(e):e.parentNode}function ro(t,e){return 3===t.type||4===t.type?ve(t,e):null}function oo(t,e,n,i){var r=Jr(t,i,e);if(null!=r){var o=e[11],a=ro(i.parent||e[6],e);if(Array.isArray(n))for(var s=0;s-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}Zr(this._lView[1],this._lView)}},{key:"onDestroy",value:function(t){yr(this._lView[1],this._lView,null,t)}},{key:"markForCheck",value:function(){Ur(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){Fr(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(t,e,n){Ue(!0);try{Fr(t,e,n)}finally{Ue(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}},{key:"detachFromAppRef",value:function(){var t;this._appRef=null,so(this._lView[1],t=this._lView,t[11],2,null,null)}},{key:"attachToAppRef",value:function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}},{key:"rootNodes",get:function(){var t=this._lView,e=t[1];return function t(e,n,i,r){for(var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];null!==i;){var a=n[i.index];if(null!==a&&r.push(ge(a)),$t(a))for(var s=10;s0;)this.remove(this.length-1)}},{key:"get",value:function(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null}},{key:"createEmbeddedView",value:function(t,e,n){var i=t.createEmbeddedView(e||{});return this.insert(i,n),i}},{key:"createComponent",value:function(t,e,n,i,r){var o=n||this.parentInjector;if(!r&&null==t.ngModule&&o){var a=o.get(mt,null);a&&(r=a)}var s=t.create(o,i,void 0,r);return this.insert(s.hostView,e),s}},{key:"insert",value:function(t,e){var n=t._lView,i=n[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),$t(n[3])){var r=this.indexOf(t);if(-1!==r)this.detach(r);else{var o=n[3],a=new po(o,o[6],o[3]);a.detach(a.indexOf(t))}}var s=this._adjustIndex(e),c=this._lContainer;!function(t,e,n,i){var r=10+i,o=n.length;i>0&&(n[r-1][4]=e),i1&&void 0!==arguments[1]?arguments[1]:0;return null==t?this.length+e:t}},{key:"allocateContainerIfNeeded",value:function(){null===this._lContainer[8]&&(this._lContainer[8]=[])}},{key:"element",get:function(){return mo(e,this._hostTNode,this._hostView)}},{key:"injector",get:function(){return new Nn(this._hostTNode,this._hostView)}},{key:"parentInjector",get:function(){var t=xn(this._hostTNode,this._hostView);if(yn(t)){var e=On(t,this._hostView),n=_n(t);return new Nn(e[1].data[n+8],e)}return new Nn(null,this._hostView)}},{key:"length",get:function(){return this._lContainer.length-10}}]),i}(t));var o=i[n.index];if($t(o))r=o;else{var s;if(3===n.type)s=ge(o);else if(s=i[11].createComment(""),Kt(i)){var u=i[11],l=ve(n,i);to(u,io(u,l),s,function(t,e){return pe(t)?t.nextSibling(e):e.nextSibling}(u,l))}else oo(i[1],i,s,n);i[n.index]=r=Rr(o,i,s,n),Nr(i,r)}return new po(r,n,i)}function _o(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t,e,n){if(!n&&Wt(t)){var i=Oe(t.index,e);return new bo(i,i)}return 2===t.type||0===t.type||3===t.type||4===t.type?new bo(e[16],e):null}(De(),Ae(),t)}var Oo=function(){var t=function t(){C(this,t)};return t.__NG_ELEMENT_ID__=function(){return ko()},t}(),ko=_o,wo=Function,Co=new it("Set Injector scope."),To={},So={},Eo=[],xo=void 0;function Po(){return void 0===xo&&(xo=new gt),xo}function Ao(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;return new Io(t,n,e||Po(),i)}var Io=function(){function t(e,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;C(this,t),this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var a=[];n&&yt(n,(function(t){return r.processProvider(t,e,n)})),yt([e],(function(t){return r.processInjectorType(t,[],a)})),this.records.set(rt,Ro(void 0,this));var s=this.records.get(Co);this.scope=null!=s?s.value:null,this.source=o||("object"==typeof e?null:U(e))}return w(t,[{key:"destroy",value:function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach((function(t){return t.ngOnDestroy()}))}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ot,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T.Default;this.assertNotDestroyed();var i,r=ut(this);try{if(!(n&T.SkipSelf)){var o=this.records.get(t);if(void 0===o){var a=("function"==typeof(i=t)||"object"==typeof i&&i instanceof it)&&A(t);o=a&&this.injectableDefInScope(a)?Ro(Mo(t),To):null,this.records.set(t,o)}if(null!=o)return this.hydrate(t,o)}return(n&T.Self?Po():this.parent).get(t,e=n&T.Optional&&e===ot?null:e)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(U(t)),r)throw s;return function(t,e,n,i){var r=t.ngTempTokenPath;throw e.__source&&r.unshift(e.__source),t.message=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;var r=U(e);if(Array.isArray(e))r=e.map(U).join(" -> ");else if("object"==typeof e){var o=[];for(var a in e)if(e.hasOwnProperty(a)){var s=e[a];o.push(a+":"+("string"==typeof s?JSON.stringify(s):U(s)))}r="{".concat(o.join(", "),"}")}return"".concat(n).concat(i?"("+i+")":"","[").concat(r,"]: ").concat(t.replace(at,"\n "))}("\n"+t.message,r,"R3InjectorError",i),t.ngTokenPath=r,t.ngTempTokenPath=null,t}(s,t,0,this.source)}throw s}finally{ut(r)}}},{key:"_resolveInjectorDefTypes",value:function(){var t=this;this.injectorDefTypes.forEach((function(e){return t.get(e)}))}},{key:"toString",value:function(){var t=[];return this.records.forEach((function(e,n){return t.push(U(n))})),"R3Injector[".concat(t.join(", "),"]")}},{key:"assertNotDestroyed",value:function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}},{key:"processInjectorType",value:function(t,e,n){var i=this;if(!(t=V(t)))return!1;var r=M(t),o=null==r&&t.ngModule||void 0,a=void 0===o?t:o,s=-1!==n.indexOf(a);if(void 0!==o&&(r=M(o)),null==r)return!1;if(null!=r.imports&&!s){var c;n.push(a);try{yt(r.imports,(function(t){i.processInjectorType(t,e,n)&&(void 0===c&&(c=[]),c.push(t))}))}finally{}if(void 0!==c)for(var u=function(t){var e=c[t],n=e.ngModule,r=e.providers;yt(r,(function(t){return i.processProvider(t,n,r||Eo)}))},l=0;l0){var n=kt(e,"?");throw new Error("Can't resolve all parameters for ".concat(U(t),": (").concat(n.join(", "),")."))}var i=function(t){var e=t&&(t[D]||t[L]||t[j]&&t[j]());if(e){var n=function(t){if(t.hasOwnProperty("name"))return t.name;var e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn('DEPRECATED: DI is instantiating a token "'.concat(n,'" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "').concat(n,'" class.')),e}return null}(t);return null!==i?function(){return i.factory(t)}:function(){return new t}}(t);throw new Error("unreachable")}function Do(t,e,n){var r,o=void 0;if(Lo(t)){var a=V(t);return Vt(a)||Mo(a)}if(jo(t))o=function(){return V(t.useValue)};else if((r=t)&&r.useFactory)o=function(){return t.useFactory.apply(t,b(bt(t.deps||[])))};else if(function(t){return!(!t||!t.useExisting)}(t))o=function(){return ht(V(t.useExisting))};else{var s=V(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return Vt(s)||Mo(s);o=function(){return i(s,b(bt(t.deps)))}}return o}function Ro(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:t,value:e,multi:n?[]:void 0}}function jo(t){return null!==t&&"object"==typeof t&&st in t}function Lo(t){return"function"==typeof t}var No=function(t,e,n){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0,r=Ao(t,e,n,i);return r._resolveInjectorDefTypes(),r}({name:n},e,t,n)},Uo=function(){var t=function(){function t(){C(this,t)}return w(t,null,[{key:"create",value:function(t,e){return Array.isArray(t)?No(t,e,""):No(t.providers,t.parent,t.name||"")}}]),t}();return t.THROW_IF_NOT_FOUND=ot,t.NULL=new gt,t.\u0275prov=x({token:t,providedIn:"any",factory:function(){return ht(rt)}}),t.__NG_ELEMENT_ID__=-1,t}(),Fo=new it("AnalyzeForEntryComponents");function Bo(t,e,n){var i=n?t.styles:null,r=n?t.classes:null,o=0;if(null!==e)for(var a=0;a=0;i--){var r=t[i];r.hostVars=e+=r.hostVars,r.hostAttrs=mn(r.hostAttrs,n=mn(n,r.hostAttrs))}}(i)}function Ho(t){return t===Pt?{}:t===At?[]:t}function qo(t,e){var n=t.viewQuery;t.viewQuery=n?function(t,i){e(t,i),n(t,i)}:e}function $o(t,e){var n=t.contentQueries;t.contentQueries=n?function(t,i,r){e(t,i,r),n(t,i,r)}:e}function Qo(t,e){var n=t.hostBindings;t.hostBindings=n?function(t,i){e(t,i),n(t,i)}:e}var Wo=null;function Go(){if(!Wo){var t=Y.Symbol;if(t&&t.iterator)Wo=t.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),n=0;n1&&void 0!==arguments[1]?arguments[1]:T.Default,n=Ae();return null===n?ht(t,e):An(De(),n,V(t),e)}function la(t){return function(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;var n=t.attrs;if(n)for(var i=n.length,r=0;r2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=Ae(),o=Ie(),a=De();return Ca(o,r,r[11],a,t,e,n,i),ka}function wa(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=De(),o=Ae(),a=Ie();return Ca(a,o,qr($e(a.data),r,o),r,t,e,n,i),wa}function Ca(t,e,n,i,r,o){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0,c=Gt(i),u=t.firstCreatePass&&(t.cleanup||(t.cleanup=[])),l=Hr(e),d=!0;if(2===i.type){var h=ve(i,e),f=s?s(h):Pt,p=f.target||h,b=l.length,g=s?function(t){return s(ge(t[i.index])).target}:i.index;if(pe(n)){var m=null;if(!s&&c&&(m=function(t,e,n,i){var r=t.cleanup;if(null!=r)for(var o=0;oc?s[c]:null}"string"==typeof a&&(o+=2)}return null}(t,e,r,i.index)),null!==m)(m.__ngLastListenerFn__||m).__ngNextListenerFn__=o,m.__ngLastListenerFn__=o,d=!1;else{o=Sa(i,e,o,!1);var v=n.listen(f.name||p,r,o);l.push(o,v),u&&u.push(r,g,b,b+1)}}else o=Sa(i,e,o,!0),p.addEventListener(r,o,a),l.push(o),u&&u.push(r,g,b,a)}var y,_=i.outputs;if(d&&null!==_&&(y=_[r])){var O=y.length;if(O)for(var k=0;k0&&void 0!==arguments[0]?arguments[0]:1;return function(t){return(xe.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,xe.lFrame.contextLView))[8]}(t)}function xa(t,e){for(var n=null,i=function(t){var e=t.attrs;if(null!=e){var n=e.indexOf(5);if(0==(1&n))return e[n+1]}return null}(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=Ae(),r=Ie(),o=ur(r,t,1,null,n||null);null===o.projection&&(o.projection=e),Le(),function(t,e,n){co(e[11],0,e,n,Jr(t,n,e),ro(n.parent||e[6],e))}(r,i,o)}function Ia(t,e,n){return Ma(t,"",e,"",n),Ia}function Ma(t,e,n,i,r){var o=Ae(),a=oa(o,e,n,i);return a!==Wi&&Or(Ie(),rn(),o,t,a,o[11],r,!1),Ma}function Da(t,e,n,i,r,o,a){var s=Ae(),c=aa(s,e,n,i,r,o);return c!==Wi&&Or(Ie(),rn(),s,t,c,s[11],a,!1),Da}var Ra=[];function ja(t,e,n,i,r){for(var o=t[n+1],a=null===e,s=i?er(o):ir(o),c=!1;0!==s&&(!1===c||a);){var u=t[s+1];La(t[s],e)&&(c=!0,t[s+1]=i?or(u):nr(u)),s=i?er(u):ir(u)}c&&(t[n+1]=i?nr(o):or(o))}function La(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&Tt(t,e)>=0}var Na={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Ua(t){return t.substring(Na.key,Na.keyEnd)}function Fa(t){return t.substring(Na.value,Na.valueEnd)}function Ba(t,e){var n=Na.textEnd;return n===e?-1:(e=Na.keyEnd=function(t,e,n){for(;e32;)e++;return e}(t,Na.key=e,n),Ha(t,e,n))}function za(t,e){var n=Na.textEnd,i=Na.key=Ha(t,e,n);return n===i?-1:(i=Na.keyEnd=function(t,e,n){for(var i;e=65&&(-33&i)<=90||i>=48&&i<=57);)e++;return e}(t,i,n),i=qa(t,i,n),i=Na.value=Ha(t,i,n),i=Na.valueEnd=function(t,e,n){for(var i=-1,r=-1,o=-1,a=e,s=a;a32&&(s=a),o=r,r=i,i=-33&c}return s}(t,i,n),qa(t,i,n))}function Va(t){Na.key=0,Na.keyEnd=0,Na.value=0,Na.valueEnd=0,Na.textEnd=t.length}function Ha(t,e,n){for(;e=0;n=za(e,n))rs(t,Ua(e),Fa(e))}function Ka(t){Ja(wt,Za,t,!0)}function Za(t,e){for(var n=function(t){return Va(t),Ba(t,Ha(t,0,Na.textEnd))}(e);n>=0;n=Ba(e,n))wt(t,Ua(e),!0)}function Xa(t,e,n,i){var r=Ae(),o=Ie(),a=Ve(2);o.firstUpdatePass&&es(o,t,a,i),e!==Wi&&ta(r,a,e)&&os(o,o.data[en()+20],r,r[11],t,r[a+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=U(Kn(t)))),t}(e,n),i,a)}function Ja(t,e,n,i){var r=Ie(),o=Ve(2);r.firstUpdatePass&&es(r,null,o,i);var a=Ae();if(n!==Wi&&ta(a,o,n)){var s=r.data[en()+20];if(cs(s,i)&&!ts(r,o)){var c=i?s.classesWithoutHost:s.stylesWithoutHost;null!==c&&(n=F(c,n||"")),ha(r,s,a,n,i)}else!function(t,e,n,i,r,o,a,s){r===Wi&&(r=Ra);for(var c=0,u=0,l=0=t.expandoStartIndex}function es(t,e,n,i){var r=t.data;if(null===r[n+1]){var o=r[en()+20],a=ts(t,n);cs(o,i)&&null===e&&!a&&(e=!1),e=function(t,e,n,i){var r=$e(t),o=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(n=is(n=ns(null,t,e,n,i),e.attrs,i),o=null);else{var a=e.directiveStylingLast;if(-1===a||t[a]!==r)if(n=ns(r,t,e,n,i),null===o){var s=function(t,e,n){var i=n?e.classBindings:e.styleBindings;if(0!==ir(i))return t[er(i)]}(t,e,i);void 0!==s&&Array.isArray(s)&&function(t,e,n,i){t[er(n?e.classBindings:e.styleBindings)]=i}(t,e,i,s=is(s=ns(null,t,e,s[1],i),e.attrs,i))}else o=function(t,e,n){for(var i=void 0,r=e.directiveEnd,o=1+e.directiveStylingLast;o0)&&(l=!0)}else u=n;if(r)if(0!==c){var h=er(t[s+1]);t[i+1]=tr(h,s),0!==h&&(t[h+1]=rr(t[h+1],i)),t[s+1]=131071&t[s+1]|i<<17}else t[i+1]=tr(s,0),0!==s&&(t[s+1]=rr(t[s+1],i)),s=i;else t[i+1]=tr(c,0),0===s?s=i:t[c+1]=rr(t[c+1],i),c=i;l&&(t[i+1]=nr(t[i+1])),ja(t,u,i,!0),ja(t,u,i,!1),function(t,e,n,i,r){var o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof e&&Tt(o,e)>=0&&(n[i+1]=or(n[i+1]))}(e,u,t,i,o),a=tr(s,c),o?e.classBindings=a:e.styleBindings=a}(r,o,e,n,a,i)}}function ns(t,e,n,i,r){var o=null,a=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s0;){var c=t[r],u=Array.isArray(c),l=u?c[1]:c,d=null===l,h=n[r+1];h===Wi&&(h=d?Ra:void 0);var f=d?Ct(h,i):l===i?h:void 0;if(u&&!ss(f)&&(f=Ct(c,i)),ss(f)&&(s=f,a))return s;var p=t[r+1];r=a?er(p):ir(p)}if(null!==e){var b=o?e.residualClasses:e.residualStyles;null!=b&&(s=Ct(b,i))}return s}function ss(t){return void 0!==t}function cs(t,e){return 0!=(t.flags&(e?16:32))}function us(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Ae(),i=Ie(),r=t+20,o=i.firstCreatePass?ur(i,t,2,null,null):i.data[r],a=n[r]=function(t,e){return pe(e)?e.createText(t):e.createTextNode(t)}(e,n[11]);oo(i,n,a,o),Re(o,!1)}function ls(t){return ds("",t,""),ls}function ds(t,e,n){var i=Ae(),r=oa(i,t,e,n);return r!==Wi&&Wr(i,en(),r),ds}function hs(t,e,n,i,r){var o=Ae(),a=aa(o,t,e,n,i,r);return a!==Wi&&Wr(o,en(),a),hs}function fs(t,e,n,i,r,o,a){var s=Ae(),c=function(t,e,n,i,r,o,a,s){var c=na(t,Be(),n,r,a);return Ve(3),c?e+Zt(n)+i+Zt(r)+o+Zt(a)+s:Wi}(s,t,e,n,i,r,o,a);return c!==Wi&&Wr(s,en(),c),fs}function ps(t,e,n,i,r,o,a,s,c){var u=Ae(),l=function(t,e,n,i,r,o,a,s,c,u){var l=ia(t,Be(),n,r,a,c);return Ve(4),l?e+Zt(n)+i+Zt(r)+o+Zt(a)+s+Zt(c)+u:Wi}(u,t,e,n,i,r,o,a,s,c);return l!==Wi&&Wr(u,en(),l),ps}function bs(t,e,n){Ja(wt,Za,oa(Ae(),t,e,n),!0)}function gs(t,e,n){var i=Ae();return ta(i,ze(),e)&&Or(Ie(),rn(),i,t,e,i[11],n,!0),gs}function ms(t,e,n){var i=Ae();if(ta(i,ze(),e)){var r=Ie(),o=rn();Or(r,o,i,t,e,qr($e(r.data),o,i),n,!0)}return ms}var vs=void 0,ys=["en",[["a","p"],["AM","PM"],vs],[["AM","PM"],vs,vs],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],vs,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],vs,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",vs,"{1} 'at' {0}",vs],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){var e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}],_s={};function Os(t,e,n){"string"!=typeof e&&(n=e,e=t[Ss.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),_s[e]=t,n&&(_s[e][Ss.ExtraData]=n)}function ks(t){var e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t),n=Ts(e);if(n)return n;var i=e.split("-")[0];if(n=Ts(i))return n;if("en"===i)return ys;throw new Error('Missing locale data for the locale "'.concat(t,'".'))}function ws(t){return ks(t)[Ss.CurrencyCode]||null}function Cs(t){return ks(t)[Ss.PluralCase]}function Ts(t){return t in _s||(_s[t]=Y.ng&&Y.ng.common&&Y.ng.common.locales&&Y.ng.common.locales[t]),_s[t]}var Ss=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});function Es(t){var e;null==(e=t)&&function(t,e,n,i){throw new Error("ASSERTION ERROR: Expected localeId to be defined"+" [Expected=> null != ".concat(e," <=Actual]"))}(0,e),"string"==typeof t&&t.toLowerCase().replace(/_/g,"-")}function xs(t,e,n,i,r){if(t=V(t),Array.isArray(t))for(var o=0;o>20;if(Lo(t)||!t.multi){var p=new fn(u,r,ua),b=Is(c,e,r?d:d+f,h);-1===b?(Pn(Tn(l,s),a,c),Ps(a,t,e.length),e.push(c),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),n.push(p),s.push(p)):(n[b]=p,s[b]=p)}else{var g=Is(c,e,d+f,h),m=Is(c,e,d,d+f),v=g>=0&&n[g],y=m>=0&&n[m];if(r&&!y||!r&&!v){Pn(Tn(l,s),a,c);var _=function(t,e,n,i,r){var o=new fn(t,n,ua);return o.multi=[],o.index=e,o.componentProviders=0,As(o,r,i&&!n),o}(r?Ds:Ms,n.length,r,i,u);!r&&y&&(n[m].providerFactory=_),Ps(a,t,e.length,0),e.push(c),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),n.push(_),s.push(_)}else Ps(a,t,g>-1?g:m,As(n[r?m:g],u,!r&&i));!r&&i&&y&&n[m].componentProviders++}}}function Ps(t,e,n,i){var r=Lo(e);if(r||e.useClass){var o=(e.useClass||e).prototype.ngOnDestroy;if(o){var a=t.destroyHooks||(t.destroyHooks=[]);if(!r&&e.multi){var s=a.indexOf(n);-1===s?a.push(n,[i,o]):a[s+1].push(i,o)}else a.push(n,o)}}}function As(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function Is(t,e,n,i){for(var r=n;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,i){return function(t,e,n){var i=Ie();if(i.firstCreatePass){var r=Yt(t);xs(n,i.data,i.blueprint,r,!0),xs(e,i.data,i.blueprint,r,!1)}}(n,i?i(t):t,e)}}}var Ls=function t(){C(this,t)},Ns=function(){function t(){C(this,t)}return w(t,[{key:"resolveComponentFactory",value:function(t){throw function(t){var e=Error("No component factory found for ".concat(U(t),". Did you add it to @NgModule.entryComponents?"));return e.ngComponent=t,e}(t)}}]),t}(),Us=function(){var t=function t(){C(this,t)};return t.NULL=new Ns,t}(),Fs=function(){var t=function t(e){C(this,t),this.nativeElement=e};return t.__NG_ELEMENT_ID__=function(){return Bs(t)},t}(),Bs=function(t){return mo(t,De(),Ae())},zs=function t(){C(this,t)},Vs=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({}),Hs=function(){var t=function t(){C(this,t)};return t.__NG_ELEMENT_ID__=function(){return qs()},t}(),qs=function(){var t=Ae(),e=Oe(De().index,t);return function(t){var e=t[11];if(pe(e))return e;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(qt(e)?e:t)},$s=function(){var t=function t(){C(this,t)};return t.\u0275prov=x({token:t,providedIn:"root",factory:function(){return null}}),t}(),Qs=function t(e){C(this,t),this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")},Ws=new Qs("10.2.5"),Gs=function(){function t(){C(this,t)}return w(t,[{key:"supports",value:function(t){return Ko(t)}},{key:"create",value:function(t){return new Ks(t)}}]),t}(),Ys=function(t,e){return e},Ks=function(){function t(e){C(this,t),this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Ys}return w(t,[{key:"forEachItem",value:function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)}},{key:"forEachOperation",value:function(t){for(var e=this._itHead,n=this._removalsHead,i=0,r=null;e||n;){var o=!n||e&&e.currentIndex0&&lo(u,d,y.join(" "))}if(o=ye(p,0),void 0!==e)for(var _=o.projection=[],O=0;O1&&void 0!==arguments[1]?arguments[1]:Uo.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T.Default;return t===Uo||t===mt||t===rt?this:this._r3Injector.get(t,e,n)}},{key:"destroy",value:function(){var t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach((function(t){return t()})),this.destroyCbs=null}},{key:"onDestroy",value:function(t){this.destroyCbs.push(t)}}]),n}(mt),Oc=function(t){a(n,t);var e=c(n);function n(t){var i,r,o;return C(this,n),(i=e.call(this)).moduleType=t,null!==Ht(t)&&(r=t,o=new Set,function t(e){var n=Ht(e,!0),i=n.id;null!==i&&(function(t,e,n){if(e&&e!==n)throw new Error("Duplicate module registered for ".concat(t," - ").concat(U(e)," vs ").concat(U(e.name)))}(i,yc.get(i),e),yc.set(i,e));var r,a=p(ie(n.imports));try{for(a.s();!(r=a.n()).done;){var s=r.value;o.has(s)||(o.add(s),t(s))}}catch(c){a.e(c)}finally{a.f()}}(r)),i}return w(n,[{key:"create",value:function(t){return new _c(this.moduleType,t)}}]),n}(vt);function kc(t,e,n){var i=Fe()+t,r=Ae();return r[i]===Wi?Xo(r,i,n?e.call(n):e()):Jo(r,i)}function wc(t,e,n,i){return Mc(Ae(),Fe(),t,e,n,i)}function Cc(t,e,n,i,r){return Dc(Ae(),Fe(),t,e,n,i,r)}function Tc(t,e,n,i,r,o){return Rc(Ae(),Fe(),t,e,n,i,r,o)}function Sc(t,e,n,i,r,o,a){return function(t,e,n,i,r,o,a,s,c){var u=e+n;return ia(t,u,r,o,a,s)?Xo(t,u+4,c?i.call(c,r,o,a,s):i(r,o,a,s)):Ic(t,u+4)}(Ae(),Fe(),t,e,n,i,r,o,a)}function Ec(t,e,n,i,r,o,a,s){var c=Fe()+t,u=Ae(),l=ia(u,c,n,i,r,o);return ta(u,c+4,a)||l?Xo(u,c+5,s?e.call(s,n,i,r,o,a):e(n,i,r,o,a)):Jo(u,c+5)}function xc(t,e,n,i,r,o,a,s,c){var u=Fe()+t,l=Ae(),d=ia(l,u,n,i,r,o);return ea(l,u+4,a,s)||d?Xo(l,u+6,c?e.call(c,n,i,r,o,a,s):e(n,i,r,o,a,s)):Jo(l,u+6)}function Pc(t,e,n,i,r,o,a,s,c,u){var l=Fe()+t,d=Ae(),h=ia(d,l,n,i,r,o);return na(d,l+4,a,s,c)||h?Xo(d,l+7,u?e.call(u,n,i,r,o,a,s,c):e(n,i,r,o,a,s,c)):Jo(d,l+7)}function Ac(t,e,n,i){return function(t,e,n,i,r,o){for(var a=e+n,s=!1,c=0;c=0;n--){var i=e[n];if(t===i.name)return i}throw new Error("The pipe '".concat(t,"' could not be found!"))}(e,i.pipeRegistry),i.data[r]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(r,n.onDestroy)):n=i.data[r];var o=n.factory||(n.factory=Vt(n.type)),a=lt(ua);try{var s=wn(!1),c=o();return wn(s),function(t,e,n,i){var r=n+20;r>=t.data.length&&(t.data[r]=null,t.blueprint[r]=null),e[r]=i}(i,Ae(),t,c),c}finally{lt(a)}}function Lc(t,e,n){var i=Ae(),r=_e(i,t);return Bc(i,Fc(i,t)?Mc(i,Fe(),e,r.transform,n,r):r.transform(n))}function Nc(t,e,n,i){var r=Ae(),o=_e(r,t);return Bc(r,Fc(r,t)?Dc(r,Fe(),e,o.transform,n,i,o):o.transform(n,i))}function Uc(t,e,n,i,r){var o=Ae(),a=_e(o,t);return Bc(o,Fc(o,t)?Rc(o,Fe(),e,a.transform,n,i,r,a):a.transform(n,i,r))}function Fc(t,e){return t[1].data[e+20].pure}function Bc(t,e){return Yo.isWrapped(e)&&(e=Yo.unwrap(e),t[Be()]=Wi),e}var zc=function(t){a(n,t);var e=c(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return C(this,n),(t=e.call(this)).__isAsync=i,t}return w(n,[{key:"emit",value:function(t){o(h(n.prototype),"next",this).call(this,t)}},{key:"subscribe",value:function(t,e,i){var r,a=function(t){return null},c=function(){return null};t&&"object"==typeof t?(r=this.__isAsync?function(e){setTimeout((function(){return t.next(e)}))}:function(e){t.next(e)},t.error&&(a=this.__isAsync?function(e){setTimeout((function(){return t.error(e)}))}:function(e){t.error(e)}),t.complete&&(c=this.__isAsync?function(){setTimeout((function(){return t.complete()}))}:function(){t.complete()})):(r=this.__isAsync?function(e){setTimeout((function(){return t(e)}))}:function(e){t(e)},e&&(a=this.__isAsync?function(t){setTimeout((function(){return e(t)}))}:function(t){e(t)}),i&&(c=this.__isAsync?function(){setTimeout((function(){return i()}))}:function(){i()}));var u=o(h(n.prototype),"subscribe",this).call(this,r,a,c);return t instanceof s.a&&t.add(u),u}}]),n}(r.b);function Vc(){return this._results[Go()]()}var Hc=function(){function t(){C(this,t),this.dirty=!0,this._results=[],this.changes=new zc,this.length=0;var e=Go(),n=t.prototype;n[e]||(n[e]=Vc)}return w(t,[{key:"map",value:function(t){return this._results.map(t)}},{key:"filter",value:function(t){return this._results.filter(t)}},{key:"find",value:function(t){return this._results.find(t)}},{key:"reduce",value:function(t,e){return this._results.reduce(t,e)}},{key:"forEach",value:function(t){this._results.forEach(t)}},{key:"some",value:function(t){return this._results.some(t)}},{key:"toArray",value:function(){return this._results.slice()}},{key:"toString",value:function(){return this._results.toString()}},{key:"reset",value:function(t){this._results=function t(e,n){void 0===n&&(n=e);for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[];C(this,t),this.queries=e}return w(t,[{key:"createEmbeddedView",value:function(e){var n=e.queries;if(null!==n){for(var i=null!==e.contentQueries?e.contentQueries[0]:n.length,r=[],o=0;o3&&void 0!==arguments[3]?arguments[3]:null;C(this,t),this.predicate=e,this.descendants=n,this.isStatic=i,this.read=r},Wc=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];C(this,t),this.queries=e}return w(t,[{key:"elementStart",value:function(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:-1;C(this,t),this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return w(t,[{key:"elementStart",value:function(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}},{key:"elementEnd",value:function(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}},{key:"template",value:function(t,e){this.elementStart(t,e)}},{key:"embeddedTView",value:function(e,n){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,n),new t(this.metadata)):null}},{key:"isApplyingToNode",value:function(t){if(this._appliesToNextNode&&!1===this.metadata.descendants){for(var e=this._declarationNodeIndex,n=t.parent;null!==n&&3===n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(t,e){var n=this.metadata.predicate;if(Array.isArray(n))for(var i=0;i0)r.push(s[c/2]);else{for(var l=a[c+1],d=n[-u],h=10;h0&&void 0!==arguments[0]?arguments[0]:T.Default,e=_o(!0);if(null!=e||t&T.Optional)return e;re("ChangeDetectorRef")}var du=new it("Application Initializer"),hu=function(){var t=function(){function t(e){var n=this;C(this,t),this.appInits=e,this.initialized=!1,this.done=!1,this.donePromise=new Promise((function(t,e){n.resolve=t,n.reject=e}))}return w(t,[{key:"runInitializers",value:function(){var t=this;if(!this.initialized){var e=[],n=function(){t.done=!0,t.resolve()};if(this.appInits)for(var i=0;i0&&(r=setTimeout((function(){i._callbacks=i._callbacks.filter((function(t){return t.timeoutId!==r})),t(i._didWork,i.getPendingTasks())}),e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})}},{key:"whenStable",value:function(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}},{key:"getPendingRequestCount",value:function(){return this._pendingCount}},{key:"findProviders",value:function(t,e,n){return[]}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ht(Mu))},t.\u0275prov=x({token:t,factory:t.\u0275fac}),t}(),zu=function(){var t=function(){function t(){C(this,t),this._applications=new Map,qu.addToWindow(this)}return w(t,[{key:"registerApplication",value:function(t,e){this._applications.set(t,e)}},{key:"unregisterApplication",value:function(t){this._applications.delete(t)}},{key:"unregisterAllApplications",value:function(){this._applications.clear()}},{key:"getTestability",value:function(t){return this._applications.get(t)||null}},{key:"getAllTestabilities",value:function(){return Array.from(this._applications.values())}},{key:"getAllRootElements",value:function(){return Array.from(this._applications.keys())}},{key:"findTestabilityInTree",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return qu.findTestabilityInTree(this,t,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=x({token:t,factory:t.\u0275fac}),t}();function Vu(t){qu=t}var Hu,qu=new(function(){function t(){C(this,t)}return w(t,[{key:"addToWindow",value:function(t){}},{key:"findTestabilityInTree",value:function(t,e,n){return null}}]),t}()),$u=new it("AllowMultipleToken"),Qu=function t(e,n){C(this,t),this.name=e,this.token=n};function Wu(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i="Platform: "+e,r=new it(i);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=Gu();if(!o||o.injector.get($u,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{var a=n.concat(e).concat({provide:r,useValue:!0},{provide:Co,useValue:"platform"});!function(t){if(Hu&&!Hu.destroyed&&!Hu.injector.get($u,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Hu=t.get(Yu);var e=t.get(gu,null);e&&e.forEach((function(t){return t()}))}(Uo.create({providers:a,name:i}))}return function(t){var e=Gu();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(r)}}function Gu(){return Hu&&!Hu.destroyed?Hu:null}var Yu=function(){var t=function(){function t(e){C(this,t),this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return w(t,[{key:"bootstrapModuleFactory",value:function(t,e){var n,i,r=this,o=(n=e?e.ngZone:void 0,i=e&&e.ngZoneEventCoalescing||!1,"noop"===n?new Fu:("zone.js"===n?void 0:n)||new Mu({enableLongStackTrace:ai(),shouldCoalesceEventChangeDetection:i})),a=[{provide:Mu,useValue:o}];return o.run((function(){var e=Uo.create({providers:a,parent:r.injector,name:t.moduleType.name}),n=t.create(e),i=n.injector.get(Hn,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy((function(){return Xu(r._modules,n)})),o.runOutsideAngular((function(){return o.onError.subscribe({next:function(t){i.handleError(t)}})})),function(t,e,i){try{var o=((a=n.injector.get(hu)).runInitializers(),a.donePromise.then((function(){return Es(n.injector.get(_u,"en-US")||"en-US"),r._moduleDoBootstrap(n),n})));return _a(o)?o.catch((function(n){throw e.runOutsideAngular((function(){return t.handleError(n)})),n})):o}catch(s){throw e.runOutsideAngular((function(){return t.handleError(s)})),s}var a}(i,o)}))}},{key:"bootstrapModule",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=Ku({},n);return function(t,e,n){var i=new Oc(n);return Promise.resolve(i)}(0,0,t).then((function(t){return e.bootstrapModuleFactory(t,i)}))}},{key:"_moduleDoBootstrap",value:function(t){var e=t.injector.get(Zu);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach((function(t){return e.bootstrap(t)}));else{if(!t.instance.ngDoBootstrap)throw new Error("The module ".concat(U(t.instance.constructor),' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.'));t.instance.ngDoBootstrap(e)}this._modules.push(t)}},{key:"onDestroy",value:function(t){this._destroyListeners.push(t)}},{key:"destroy",value:function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach((function(t){return t.destroy()})),this._destroyListeners.forEach((function(t){return t()})),this._destroyed=!0}},{key:"injector",get:function(){return this._injector}},{key:"destroyed",get:function(){return this._destroyed}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ht(Uo))},t.\u0275prov=x({token:t,factory:t.\u0275fac}),t}();function Ku(t,e){return Array.isArray(e)?e.reduce(Ku,t):Object.assign(Object.assign({},t),e)}var Zu=function(){var t=function(){function t(e,n,i,r,o,a){var s=this;C(this,t),this._zone=e,this._console=n,this._injector=i,this._exceptionHandler=r,this._componentFactoryResolver=o,this._initStatus=a,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=ai(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run((function(){s.tick()}))}});var c=new u.a((function(t){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular((function(){t.next(s._stable),t.complete()}))})),l=new u.a((function(t){var e;s._zone.runOutsideAngular((function(){e=s._zone.onStable.subscribe((function(){Mu.assertNotInAngularZone(),Iu((function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,t.next(!0))}))}))}));var n=s._zone.onUnstable.subscribe((function(){Mu.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular((function(){t.next(!1)})))}));return function(){e.unsubscribe(),n.unsubscribe()}}));this.isStable=Object(d.a)(c,l.pipe(Object(f.a)()))}return w(t,[{key:"bootstrap",value:function(t,e){var n,i=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=t instanceof Ls?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var r=n.isBoundToModule?void 0:this._injector.get(mt),o=n.create(Uo.NULL,[],e||n.selector,r);o.onDestroy((function(){i._unloadComponent(o)}));var a=o.injector.get(Bu,null);return a&&o.injector.get(zu).registerApplication(o.location.nativeElement,a),this._loadComponent(o),ai()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),o}},{key:"tick",value:function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;var e,n=p(this._views);try{for(n.s();!(e=n.n()).done;){e.value.detectChanges()}}catch(o){n.e(o)}finally{n.f()}if(this._enforceNoNewChanges){var i,r=p(this._views);try{for(r.s();!(i=r.n()).done;){i.value.checkNoChanges()}}catch(o){r.e(o)}finally{r.f()}}}catch(a){this._zone.runOutsideAngular((function(){return t._exceptionHandler.handleError(a)}))}finally{this._runningTick=!1}}},{key:"attachView",value:function(t){var e=t;this._views.push(e),e.attachToAppRef(this)}},{key:"detachView",value:function(t){var e=t;Xu(this._views,e),e.detachFromAppRef()}},{key:"_loadComponent",value:function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(vu,[]).concat(this._bootstrapListeners).forEach((function(e){return e(t)}))}},{key:"_unloadComponent",value:function(t){this.detachView(t.hostView),Xu(this.components,t)}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach((function(t){return t.destroy()}))}},{key:"viewCount",get:function(){return this._views.length}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ht(Mu),ht(yu),ht(Uo),ht(Hn),ht(Us),ht(hu))},t.\u0275prov=x({token:t,factory:t.\u0275fac}),t}();function Xu(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Ju=function t(){C(this,t)},tl=function t(){C(this,t)},el={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},nl=function(){var t=function(){function t(e,n){C(this,t),this._compiler=e,this._config=n||el}return w(t,[{key:"load",value:function(t){return this.loadAndCompile(t)}},{key:"loadAndCompile",value:function(t){var e=this,i=m(t.split("#"),2),r=i[0],o=i[1];return void 0===o&&(o="default"),n("zn8P")(r).then((function(t){return t[o]})).then((function(t){return il(t,r,o)})).then((function(t){return e._compiler.compileModuleAsync(t)}))}},{key:"loadFactory",value:function(t){var e=m(t.split("#"),2),i=e[0],r=e[1],o="NgFactory";return void 0===r&&(r="default",o=""),n("zn8P")(this._config.factoryPathPrefix+i+this._config.factoryPathSuffix).then((function(t){return t[r+o]})).then((function(t){return il(t,i,r)}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ht(Pu),ht(tl,8))},t.\u0275prov=x({token:t,factory:t.\u0275fac}),t}();function il(t,e,n){if(!t)throw new Error("Cannot find '".concat(n,"' in '").concat(e,"'"));return t}var rl=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(Oo)),ol=function(t){return null},al=Wu(null,"core",[{provide:mu,useValue:"unknown"},{provide:Yu,deps:[Uo]},{provide:zu,deps:[]},{provide:yu,deps:[]}]),sl=[{provide:Zu,useClass:Zu,deps:[Mu,yu,Uo,Hn,Us,hu]},{provide:gc,deps:[Mu],useFactory:function(t){var e=[];return t.onStable.subscribe((function(){for(;e.length;)e.pop()()})),function(t){e.push(t)}}},{provide:hu,useClass:hu,deps:[[new _,du]]},{provide:Pu,useClass:Pu,deps:[]},pu,{provide:rc,useFactory:function(){return sc},deps:[]},{provide:oc,useFactory:function(){return cc},deps:[]},{provide:_u,useFactory:function(t){return Es(t=t||"undefined"!=typeof $localize&&$localize.locale||"en-US"),t},deps:[[new y(_u),new _,new k]]},{provide:Ou,useValue:"USD"}],cl=function(){var t=function t(e){C(this,t)};return t.\u0275mod=Lt({type:t}),t.\u0275inj=P({factory:function(e){return new(e||t)(ht(Zu))},providers:sl}),t}()},ka3Y:function(t,e,n){"use strict";n.d(e,"a",(function(){return I}));var i=n("kZht"),r=n("3kIJ"),o=n("C05f"),a=n("pjhv"),s=n("lE9u"),c=n("mlVJ"),u=n("zqNl"),l=n("anSm"),d=n("EmXI"),h=n("aDqW"),f=n("IOEv"),p=n("An66"),g=n("1eaT"),m=n("+I9z"),v=n("Tcl6"),y=n("hCLc"),_=n("yPvj"),O=n("pTnX"),k=n("DpwM"),T=n("P0Um");function S(t,e){if(1&t&&(i.Ub(0,"mat-option",24),i.Qc(1),i.Tb()),2&t){var n=e.$implicit;i.mc("value",n.accountUid),i.Cb(1),i.Sc(" ",n.email," ")}}function E(t,e){if(1&t&&(i.Ub(0,"mat-option",24),i.Qc(1),i.gc(2,"walletName"),i.gc(3,"walletType"),i.Tb()),2&t){var n=e.$implicit;i.mc("value",n.name),i.Cb(1),i.Tc(" ",i.hc(2,3,n.name)," ",i.hc(3,5,n.type)," wallet ")}}function x(t,e){if(1&t&&(i.Ub(0,"mat-option",24),i.Qc(1),i.Tb()),2&t){var n=e.$implicit;i.mc("value",n.accountUid),i.Cb(1),i.Sc(" ",n.email," ")}}function P(t,e){if(1&t&&(i.Ub(0,"mat-option",24),i.Qc(1),i.gc(2,"walletName"),i.gc(3,"walletType"),i.Tb()),2&t){var n=e.$implicit;i.mc("value",n.name),i.Cb(1),i.Tc(" ",i.hc(2,3,n.name)," ",i.hc(3,5,n.type)," wallet ")}}var A=function(t){return{"global__text--warn":t}},I=function(){var t=function(){function t(e,n){C(this,t),this.store=e,this.formBuilder=n,this.origins$=new o.a(void 0),this.destinations$=new o.a(void 0),this.transfer=new i.o}return w(t,[{key:"ngOnInit",value:function(){this.appendMasterToSubAccounts(),this.form=this.formBuilder.group({accountOrigin:[this.selectedSub.accountUid,r.x.required],walletOrigin:["",r.x.required],accountDestination:[this.selectedSub.accountUid,r.x.required],walletDestination:["",r.x.required],amount:[0,[r.x.required,r.x.min(1e-12)]]}),this.setBothWallets(this.selected.name)}},{key:"ngOnChanges",value:function(t){if(t.selected&&!t.selected.firstChange){var e=t.selected.currentValue;this.form.controls.walletOrigin.setValue(e.name),this.appendMasterToSubAccounts(),this.setBothWallets(e.name)}t.subaccounts&&!t.subaccounts.firstChange&&this.appendMasterToSubAccounts()}},{key:"appendMasterToSubAccounts",value:function(){this.subs=[].concat(b(this.subAccounts),[{accountUid:this.uid,email:"Master account",fullName:"Master",holdingAccounts:Array.from(this.wallets.holding.values()).map((function(t){return{currency:t.currency,balance:t.balance,name:t.currency,type:"holding"}})),futuresAccounts:Array.from(this.wallets.futures.values()).map((function(t){return{currency:t.currency,balance:t.am,name:t.name,type:"futures"}})),flexAccount:Array.from(this.wallets.flex.flexAssets.values()).map((function(t){return{currency:t.currency.replace(c.a,"XBT"),balance:t.am,name:"FLEX-"+t.currency,type:"flex"}}))}])}},{key:"setOriginsSubAccount",value:function(t,e){var n=this.subs.find((function(t){return t.accountUid===e}));if(n){var i=n.holdingAccounts.filter((function(e){return e.name===t.currency})),r=n.futuresAccounts.filter((function(e){var n;return(null===(n=e.currency)||void 0===n?void 0:n.replace(c.a,"XBT"))===t.currency})),o=n.flexAccount.filter((function(e){return e.currency.replace(c.a,"XBT")===t.currency}));this.form.controls.walletOrigin.setValue(null==t?void 0:t.name),this.origins$.next([].concat(b(i),b(r),b(o)))}}},{key:"setDestinationSubAccount",value:function(t,e){var n,i=this,r=this.subs.find((function(t){return t.accountUid===e}));if(r){var o=[].concat(b(r.holdingAccounts.filter((function(e){return e.name===t.currency}))),b(r.futuresAccounts.filter((function(e){return e.currency.replace(c.a,"XBT")===t.currency}))),b(r.flexAccount.filter((function(e){return e.currency.replace(c.a,"XBT")===t.currency})))).filter((function(e){return e.name!==(null==t?void 0:t.name)||e.type!==t.type||i.isAcrossAccounts}));this.destinations$.next(o),this.form.controls.walletDestination.setValue(null===(n=o[0])||void 0===n?void 0:n.name)}}},{key:"setWalletPercentage",value:function(t){var e=this.form.controls.walletOrigin.value,n=this.rawOriginWallets.find((function(t){return t.name===e})),i=Object(a.b)(n.currency,!0),r=Math.pow(10,i),o=Math.min(n.balance*t,n.balance),s=Math.floor(o*r)/r;this.form.controls.amount.setValue(s)}},{key:"setWalletsDestination",value:function(t){var e=this.rawOriginWallets.find((function(e){return e.name===t}));this.setDestination(e,this.rawOriginWallets)}},{key:"setBothWallets",value:function(t){this.setWalletsOrigin(t),this.setWalletsDestination(t)}},{key:"setWalletsOrigin",value:function(t){var e=this.rawDestinationWallets.find((function(e){return e.name===t}));this.setOrigins(e,this.rawDestinationWallets)}},{key:"setOrigins",value:function(t,e){var n=e.filter((function(e){return e.currency===(null==t?void 0:t.currency)})),i=n.find((function(e){return e.type===t.type}));this.form.controls.walletOrigin.setValue(null==i?void 0:i.name),this.origins$.next(n)}},{key:"setDestination",value:function(t,e){var n,i=this,r=e.filter((function(e){return e.currency===(null==t?void 0:t.currency)})).filter((function(e){return e.name!==(null==t?void 0:t.name)||i.isAcrossAccounts}));this.form.controls.walletDestination.setValue(null===(n=r[0])||void 0===n?void 0:n.name),this.destinations$.next(r)}},{key:"submitTransfer",value:function(){var t,e,n=this;if(this.isSubAccountTransfer&&this.origins$.value&&this.destinations$.value){var i=this.form.controls.walletOrigin.value,r=this.form.controls.walletDestination.value,o=this.origins$.value.find((function(t){return t.name===i})),a=this.destinations$.value.find((function(t){return t.name===r}));if(!o||!a)return;var u=o.type,l=Object.assign(Object.assign(Object.assign(Object.assign({accountUid:this.form.controls.accountOrigin.value},"holding"===o.type&&{currency:i}),"futures"===o.type&&{name:i.toLowerCase()}),"flex"===o.type&&{currency:o.currency}),{type:u}),d=a.type,h=Object.assign(Object.assign(Object.assign(Object.assign({accountUid:this.form.controls.accountDestination.value},"holding"===a.type&&{currency:r}),"futures"===a.type&&{name:r.toLowerCase()}),"flex"===a.type&&{currency:a.currency.replace(c.a,"XBT")}),{type:d});this.store.dispatch(Object(s.x)({amount:null===(t=this.form.get("amount"))||void 0===t?void 0:t.value,from:l,to:h}))}else{var f=this.rawOriginWallets.find((function(t){var e;return t.name===(null===(e=n.form.get("walletOrigin"))||void 0===e?void 0:e.value)})),p=this.rawDestinationWallets.find((function(t){var e;return t.name===(null===(e=n.form.get("walletDestination"))||void 0===e?void 0:e.value)}));this.store.dispatch(Object(s.y)({quantity:null===(e=this.form.get("amount"))||void 0===e?void 0:e.value,asset:f.currency,source:f,destination:p}))}}},{key:"rawOriginWallets",get:function(){var t=this.form.value.accountOrigin,e=this.subs.find((function(e){return e.accountUid===t}));if(!e)return[];var n=e.holdingAccounts,i=e.futuresAccounts,r=e.flexAccount;return[].concat(b(n),b(i),b(r))}},{key:"rawDestinationWallets",get:function(){var t=this.form.value.accountDestination,e=this.subs.find((function(e){return e.accountUid===t}));if(!e)return[];var n=e.holdingAccounts,i=e.futuresAccounts,r=e.flexAccount;return[].concat(b(n),b(i),b(r))}},{key:"balance",get:function(){var t=this.form.controls.walletOrigin.value,e=this.rawOriginWallets.find((function(e){return e.name===t}));return e?e.balance:0}},{key:"margin",get:function(){var t=this.form.controls.walletDestination.value,e=this.rawDestinationWallets.find((function(e){return e.name===t}));return e?e.balance:0}},{key:"amount",get:function(){return this.form.controls.amount.value}},{key:"originIsSub",get:function(){return this.form.controls.accountOrigin.value!==this.uid}},{key:"destinationIsSub",get:function(){return this.form.controls.accountDestination.value!==this.uid}},{key:"isSubAccountTransfer",get:function(){var t=this.form.controls.accountDestination.value,e=this.form.controls.accountOrigin.value;return t!==e||t!==this.uid||e!==this.uid}},{key:"isAcrossAccounts",get:function(){return this.form.controls.accountDestination.value!==this.form.controls.accountOrigin.value}},{key:"originBalanceLabel",get:function(){var t=this,e=this.rawOriginWallets.find((function(e){var n;return e.name===(null===(n=t.form.get("walletOrigin"))||void 0===n?void 0:n.value)}));return e?"holding"===(null==e?void 0:e.type)?"LABEL.BALANCE":"LABEL.AVAILABLE_MARGIN":"LABEL.BALANCE"}},{key:"destinationBalanceLabel",get:function(){var t=this,e=this.rawDestinationWallets.find((function(e){var n;return e.name===(null===(n=t.form.get("walletDestination"))||void 0===n?void 0:n.value)}));return e?"holding"===(null==e?void 0:e.type)?"LABEL.BALANCE":"LABEL.AVAILABLE_MARGIN":"LABEL.BALANCE"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(u.b),i.Ob(r.d))},t.\u0275cmp=i.Ib({type:t,selectors:[["subaccount-transfer-form"]],inputs:{uid:"uid",selectedSub:"selectedSub",selected:"selected",wallets:"wallets",subAccounts:"subAccounts",email:"email",ticker:"ticker",market:"market",flexEnabled:"flexEnabled"},outputs:{transfer:"transfer"},features:[i.Ab],decls:55,vars:36,consts:[["body","",3,"formGroup","ngSubmit"],[1,"transfer-grid","subaccount"],[1,"from-account"],["color","accent","appearance","fill"],["translate",""],["matNativeControl","","formControlName","accountOrigin",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf"],[1,"from"],["color","accent","appearance","fill",1,"no-padding"],["matNativeControl","","formControlName","walletOrigin",3,"selectionChange"],[1,"from-balance"],[3,"ngClass"],[3,"content"],[1,"to-account"],["matNativeControl","","formControlName","accountDestination",3,"selectionChange"],[1,"to"],["matNativeControl","","formControlName","walletDestination"],[1,"to-balance"],["color","accent","appearance","fill",1,"market-form"],["matInput","","formControlName","amount","required","","type","number","min","0","inputmode","numeric","autocomplete","off"],["amountField",""],["matSuffix","","mat-raised-button","","body","","type","button",1,"mat-small-button",3,"click"],["matSuffix","",1,"form-icon",3,"base"],["mat-raised-button","",3,"disabled"],[3,"value"]],template:function(t,e){1&t&&(i.Ub(0,"form",0),i.bc("ngSubmit",(function(){return e.submitTransfer()})),i.Ub(1,"div",1),i.Ub(2,"div",2),i.Ub(3,"mat-form-field",3),i.Ub(4,"mat-label",4),i.Qc(5,"LABEL.ORIGIN_ACCOUNT"),i.Tb(),i.Ub(6,"mat-select",5),i.bc("selectionChange",(function(t){return e.setOriginsSubAccount(e.selected,t.value),e.setDestinationSubAccount(e.selected,t.value)})),i.Oc(7,S,2,2,"mat-option",6),i.Tb(),i.Tb(),i.Tb(),i.Ub(8,"div",7),i.Ub(9,"mat-form-field",8),i.Ub(10,"mat-label",4),i.Qc(11,"FORM.FROM"),i.Tb(),i.Ub(12,"mat-select",9),i.bc("selectionChange",(function(t){return e.setWalletsDestination(t.value)})),i.Oc(13,E,4,7,"mat-option",6),i.gc(14,"async"),i.Tb(),i.Tb(),i.Tb(),i.Ub(15,"div",10),i.Ub(16,"nutritional-info"),i.Ub(17,"span",11),i.Qc(18),i.gc(19,"translate"),i.Tb(),i.Pb(20,"ghost-trail",12),i.gc(21,"cryptoPrecise"),i.Tb(),i.Tb(),i.Ub(22,"div",13),i.Ub(23,"mat-form-field",3),i.Ub(24,"mat-label",4),i.Qc(25,"LABEL.DESTINATION_ACCOUNT"),i.Tb(),i.Ub(26,"mat-select",14),i.bc("selectionChange",(function(t){return e.setDestinationSubAccount(e.selected,t.value)})),i.Oc(27,x,2,2,"mat-option",6),i.Tb(),i.Tb(),i.Tb(),i.Ub(28,"div",15),i.Ub(29,"mat-form-field",8),i.Ub(30,"mat-label",4),i.Qc(31,"FORM.TO"),i.Tb(),i.Ub(32,"mat-select",16),i.Oc(33,P,4,7,"mat-option",6),i.gc(34,"async"),i.Tb(),i.Tb(),i.Tb(),i.Ub(35,"div",17),i.Ub(36,"nutritional-info"),i.Ub(37,"span"),i.Qc(38),i.gc(39,"translate"),i.Tb(),i.Pb(40,"ghost-trail",12),i.gc(41,"cryptoPrecise"),i.Tb(),i.Tb(),i.Tb(),i.Ub(42,"mat-form-field",18),i.Ub(43,"mat-label",4),i.Qc(44,"FORM.AMOUNT"),i.Tb(),i.Pb(45,"input",19,20),i.Ub(47,"button",21),i.bc("click",(function(){return e.setWalletPercentage(1)})),i.Qc(48),i.gc(49,"uppercase"),i.gc(50,"translate"),i.Tb(),i.Pb(51,"market-icon",22),i.Tb(),i.Ub(52,"button",23),i.Qc(53),i.gc(54,"translate"),i.Tb(),i.Tb()),2&t&&(i.mc("formGroup",e.form),i.Cb(7),i.mc("ngForOf",e.subs),i.Cb(6),i.mc("ngForOf",i.hc(14,14,e.origins$)),i.Cb(4),i.mc("ngClass",i.rc(34,A,null==e.form.get("amount").errors?null:e.form.get("amount").errors.amountOverBalance)),i.Cb(1),i.Rc(i.hc(19,16,e.originBalanceLabel)),i.Cb(2),i.mc("content",i.ic(21,18,e.balance,e.selected.currency)),i.Cb(7),i.mc("ngForOf",e.subs),i.Cb(6),i.mc("ngForOf",i.hc(34,21,e.destinations$)),i.Cb(5),i.Rc(i.hc(39,23,e.destinationBalanceLabel)),i.Cb(2),i.mc("content",i.ic(41,25,e.margin,e.selected.currency)),i.Cb(8),i.Sc(" ",i.hc(49,28,i.hc(50,30,"BUTTON.MAX"))," "),i.Cb(3),i.mc("base",e.selected.currency),i.Cb(1),i.mc("disabled",e.form.invalid),i.Cb(1),i.Sc(" ",i.hc(54,32,"BUTTON.SUBMIT_TRANSFER")," "))},directives:[r.z,r.p,l.a,r.h,d.c,d.f,h.a,f.a,r.o,r.g,p.m,g.a,p.l,m.a,v.b,r.c,r.s,r.v,y.b,d.h,_.a,O.n],pipes:[p.b,h.d,k.b,p.x,T.a,T.b],styles:['button[_ngcontent-%COMP%], mat-form-field[_ngcontent-%COMP%]{width:100%}.transfer-grid[_ngcontent-%COMP%]{margin-top:var(--spacing)}@media (max-width:1024px){.transfer-grid[_ngcontent-%COMP%]{display:flex;flex-direction:column}.transfer-grid[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.transfer-grid[_ngcontent-%COMP%] .switch[_ngcontent-%COMP%]{display:none}}@media (min-width:1025px){.transfer-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr auto 1fr;grid-template-rows:auto auto;grid-template:"from switch to" auto "fromBalance empty toBalance" auto/min-content min-content min-content;grid-column-gap:var(--spacing)}.transfer-grid.subaccount[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr;grid-template:"from-account to-account" auto "from to" auto "fromBalance toBalance" auto/auto}.transfer-grid[_ngcontent-%COMP%] .from-account[_ngcontent-%COMP%]{grid-area:from-account}.transfer-grid[_ngcontent-%COMP%] .to-account[_ngcontent-%COMP%]{grid-area:to-account}.transfer-grid[_ngcontent-%COMP%] .from[_ngcontent-%COMP%]{grid-area:from}.transfer-grid[_ngcontent-%COMP%] .to[_ngcontent-%COMP%]{grid-area:to}.transfer-grid[_ngcontent-%COMP%] .switch[_ngcontent-%COMP%]{align-self:center;grid-area:switch}.transfer-grid[_ngcontent-%COMP%] .switch[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:42px!important}.transfer-grid[_ngcontent-%COMP%] .from-balance[_ngcontent-%COMP%]{grid-area:fromBalance}.transfer-grid[_ngcontent-%COMP%] .to-balance[_ngcontent-%COMP%]{grid-area:toBalance}}.estimate[_ngcontent-%COMP%]{font-size:2em;margin-right:var(--spacing)}'],changeDetection:0}),t}()},kfYe:function(t,e,n){"use strict";n.r(e),n.d(e,"OTPConfirmationComponent",(function(){return m}));var i=n("3kIJ"),r=n("mcff"),o=n("ZTXN"),a=n("xVbo"),s=n("BwBJ"),c=n("kuMc"),u=n("kZht"),l=n("zqNl"),d=n("rfPA"),h=n("bBQR"),f=n("anSm"),p=n("TzY9"),b=n("hCLc"),g=n("aDqW"),m=function(){var t=function(){function t(e,n,i){C(this,t),this.store=e,this.inputs=n,this.formBuilder=i,this.destroy$=new o.b}return w(t,[{key:"ngOnInit",value:function(){var t=this;this.form=this.buildForm,this.form.get("otp").valueChanges.pipe(Object(a.a)((function(t){return 6===t.length})),Object(s.a)(100),Object(c.a)(this.destroy$)).subscribe((function(){return t.submitForm()}))}},{key:"ngOnDestroy",value:function(){this.destroy$.next(!0),this.destroy$.unsubscribe()}},{key:"submitForm",value:function(){this.store.dispatch(Object.assign(Object.assign({},this.inputs.action),{otp:this.form.get("otp").value,totp:this.form.get("otp").value}))}},{key:"buildForm",get:function(){return this.formBuilder.group({otp:["",[i.x.required]]})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Ob(l.b),u.Ob(r.a),u.Ob(i.d))},t.\u0275cmp=u.Ib({type:t,selectors:[["otp-confirmation"]],decls:6,vars:7,consts:[[3,"heading"],["body","",1,"otp-confirmation__form",3,"formGroup","ngSubmit"],[3,"form"],["mat-raised-button","",3,"disabled"]],template:function(t,e){1&t&&(u.Ub(0,"pro-dialog",0),u.Ub(1,"form",1),u.bc("ngSubmit",(function(){return e.submitForm()})),u.Pb(2,"input-otp-entry",2),u.Ub(3,"button",3),u.Qc(4),u.gc(5,"translate"),u.Tb(),u.Tb(),u.Tb()),2&t&&(u.mc("heading",e.inputs.title),u.Cb(1),u.mc("formGroup",e.form),u.Cb(1),u.mc("form",e.form),u.Cb(1),u.mc("disabled",e.form.invalid),u.Cb(1),u.Sc(" ",u.hc(5,5,"BUTTON.SUBMIT_CODE")," "))},directives:[d.a,h.a,i.z,i.p,f.a,i.h,p.a,b.b],pipes:[g.d],styles:[".otp-confirmation__form[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%], .otp-confirmation__form[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),t}()},kgbq:function(t,e,n){"use strict";function i(){}n.d(e,"a",(function(){return i}))},kuMc:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("uCWR");function r(t){return function(e){return e.lift(new o(t))}}var o=function(){function t(e){C(this,t),this.notifier=e}return w(t,[{key:"call",value:function(t,e){var n=new s(t),r=Object(i.c)(this.notifier,new i.a(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n}}]),t}(),s=function(t){a(n,t);var e=c(n);function n(t){var i;return C(this,n),(i=e.call(this,t)).seenValue=!1,i}return w(n,[{key:"notifyNext",value:function(){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(i.b)},l5Az:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("kZht"),r=n("6uGs"),o=n("sXtk"),a={headers:new r.c({"Content-Type":"application/json"}),withCredentials:!0},s=function(){var t=function(){function t(e,n){C(this,t),this.http=e,this.env=n,this.orderFormPriceUpdated$=new i.o,this.orderFormQuantityUpdated$=new i.o}return w(t,[{key:"updateOrderFormPrice",value:function(t){this.orderFormPriceUpdated$.next(t)}},{key:"updateOrderFormQty",value:function(t){this.orderFormQuantityUpdated$.next(t)}},{key:"submitMarsOrder",value:function(t){var e=Object.assign(Object.assign({},t),{type:void 0});return this.http.post(this.env.urls.rest+"/sendorder",e,a)}},{key:"editOrder",value:function(t){var e=Object.assign(Object.assign({},t),{type:void 0});return this.http.put(this.env.urls.rest+"/editorder",e,a)}},{key:"cancelOrder",value:function(t){return this.http.post(this.env.urls.rest+"/cancelorder",{order_id:t},a)}},{key:"cancelAllOrders",value:function(){return this.http.post(this.env.urls.rest+"/cancelallorders",null,a)}},{key:"calculateMarginFromLeverge",value:function(t){return this.http.post(this.env.urls.rest+"/leveragepreferences/calculate",t,a)}},{key:"calculateLeverageFromMargin",value:function(t){return this.http.post(this.env.urls.rest+"/leveragepreferences/changemargin",t,a)}},{key:"calculateMaxOrderSize",value:function(t){return this.http.post(this.env.urls.rest+"/initialmargin/maxordersize",t,a)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(r.a),i.Yb(o.a))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}()},lE9u:function(t,e,n){"use strict";n.d(e,"q",(function(){return r})),n.d(e,"o",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"w",(function(){return s})),n.d(e,"i",(function(){return c})),n.d(e,"t",(function(){return u})),n.d(e,"g",(function(){return l})),n.d(e,"y",(function(){return d})),n.d(e,"x",(function(){return h})),n.d(e,"n",(function(){return f})),n.d(e,"z",(function(){return p})),n.d(e,"A",(function(){return b})),n.d(e,"B",(function(){return g})),n.d(e,"c",(function(){return m})),n.d(e,"a",(function(){return v})),n.d(e,"j",(function(){return y})),n.d(e,"k",(function(){return _})),n.d(e,"u",(function(){return O})),n.d(e,"l",(function(){return k})),n.d(e,"v",(function(){return w})),n.d(e,"b",(function(){return C})),n.d(e,"p",(function(){return T})),n.d(e,"m",(function(){return S})),n.d(e,"f",(function(){return E})),n.d(e,"r",(function(){return x})),n.d(e,"h",(function(){return P})),n.d(e,"d",(function(){return A})),n.d(e,"s",(function(){return I}));var i=n("zqNl"),r=Object(i.g)("Reset Wallets State"),o=Object(i.g)("Open Wallets Feed"),a=Object(i.g)("Close Wallets Feed"),s=Object(i.g)("Set Wallets",Object(i.l)()),c=Object(i.g)("Get Crypto Deposit Details"),u=Object(i.g)("Set Crypto Deposit Details",Object(i.l)()),l=Object(i.g)("Generate Crypto Deposit Address",Object(i.l)()),d=Object(i.g)("Wallet Transfer",Object(i.l)()),h=Object(i.g)("Subaccount Wallet Transfer",Object(i.l)()),f=Object(i.g)("Open Transfer Dialog"),p=Object(i.g)("Withdraw Crypto",Object(i.l)()),b=Object(i.g)("Withdraw Crypto Confirm",Object(i.l)()),g=Object(i.g)("Withdraw Crypto External",Object(i.l)()),m=Object(i.g)("Cancel Withdrawal",Object(i.l)()),v=Object(i.g)("Add Demo Money"),y=Object(i.g)("Get Detailed Wallet Data",Object(i.l)()),_=Object(i.g)("Get Fiat Deposit Details"),O=Object(i.g)("Set Fiat Deposit Details",Object(i.l)()),k=Object(i.g)("Get Fiat Withdrawal Details"),w=Object(i.g)("Set Fiat Withdrawal Details",Object(i.l)()),C=Object(i.g)("Add Fiat Withdrawal Details",Object(i.l)()),T=Object(i.g)("Remove Fiat Withdrawal Details",Object(i.l)()),S=Object(i.g)("Initiate Manual Fiat Withdrawal",Object(i.l)()),E=Object(i.g)("Fetch Authenticated Wallets"),x=Object(i.g)("Set Authenticated Wallets",Object(i.l)()),P=Object(i.g)("Get Account Available Transfer Preference"),A=Object(i.g)("Change Transfer Preference",Object(i.l)()),I=Object(i.g)("Set AvailableTransfer Preference",Object(i.l)())},lFJA:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("J180"),a=n("6oIa");e.BrowserMultiFormatReader=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=500);var i=new a.default;return i.setHints(e),t.call(this,i,n)||this}return r(e,t),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)},e}(o.BrowserCodeReader)},lcP6:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("oznm");e.default=function(){function t(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(t){if(t<1||t>32||t>this.available())throw new i.default(""+t);var e=0,n=this.bitOffset,r=this.byteOffset,o=this.bytes;if(n>0){var a=8-n,s=t>8-s<<(c=a-s))>>c,t-=s,8===(n+=s)&&(n=0,r++)}if(t>0){for(;t>=8;)e=e<<8|255&o[r],r++,t-=8;var c;t>0&&(e=e<>(c=8-t)<>c,n+=t)}return this.bitOffset=n,this.byteOffset=r,e},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}()},ldwH:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("UdWo"),r=n("KFdt"),o=n("4Pxi"),a=n("ZCEf"),s=n("xSUO"),c=n("q+cW"),u=n("PSEG"),l=n("ssKD"),d=n("LqyJ");e.default=function(){function t(){this.decoder=new i.default}return t.prototype.decode=function(e,n){var i,c;if(void 0===n&&(n=null),null!=n&&n.has(a.default.PURE_BARCODE)){var d=t.extractPureBits(e.getBlackMatrix());i=this.decoder.decode(d),c=t.NO_POINTS}else{var h=new u.default(e.getBlackMatrix()).detect();i=this.decoder.decode(h.getBits()),c=h.getPoints()}var f=i.getRawBytes(),p=new r.default(i.getText(),f,8*f.length,c,o.default.DATA_MATRIX,l.default.currentTimeMillis()),b=i.getByteSegments();null!=b&&p.putMetadata(s.default.BYTE_SEGMENTS,b);var g=i.getECLevel();return null!=g&&p.putMetadata(s.default.ERROR_CORRECTION_LEVEL,g),p},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),n=t.getBottomRightOnBit();if(null==e||null==n)throw new d.default;var i=this.moduleSize(e,t),r=e[1],o=e[0],a=(n[0]-o+1)/i,s=(n[1]-r+1)/i;if(a<=0||s<=0)throw new d.default;var u=i/2;r+=u,o+=u;for(var l=new c.default(a,s),h=0;h div[_ngcontent-%COMP%]{margin-bottom:var(--spacing-l);flex:1}.row-form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex:1}.manage-withdrawal[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.header[_ngcontent-%COMP%]{text-align:center;margin-bottom:var(--spacing-l)}.header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:var(--spacing-l) 0}.header[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{font-size:3em}.error[_ngcontent-%COMP%]{padding:var(--spacing);border:1px solid var(--warn-colour);border-radius:var(--bdrs);margin-bottom:var(--spacing)}.error[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .error[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--warn-colour);margin:0}.error[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:700}"],changeDetection:0}),t}()},lruz:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("MUfl"),r=n("kZht"),o=n("1VvW"),a=function(){var t=function(){function t(e,n){C(this,t),this.router=e,this.feature=n}return w(t,[{key:"canActivate",value:function(t){return!!this.feature.isEnabled(t.data.feature)||(this.router.navigate(["/futures"]),!1)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(o.d),r.Yb(i.a))},t.\u0275prov=r.Kb({token:t,factory:t.\u0275fac}),t}()},"lw+r":function(t,e,n){"use strict";n.d(e,"a",(function(){return x})),n.d(e,"b",(function(){return N})),n.d(e,"c",(function(){return tt})),n.d(e,"d",(function(){return nt}));var i=n("kZht"),r=n("An66");function o(t,e){if(1&t&&i.Pb(0,"div",3),2&t){var n=e.index,r=i.fc();i.mc("ngStyle",r.gridRenderer.getGridColumnStyle(n))}}function a(t,e){if(1&t&&i.Pb(0,"div",4),2&t){var n=e.index,r=i.fc();i.mc("ngStyle",r.gridRenderer.getGridRowStyle(n))}}var s=["*"];function c(t,e){if(1&t){var n=i.Vb();i.Ub(0,"div",8),i.bc("mousedown",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)}))("touchstart",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)})),i.Tb()}}function u(t,e){if(1&t){var n=i.Vb();i.Ub(0,"div",9),i.bc("mousedown",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)}))("touchstart",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)})),i.Tb()}}function l(t,e){if(1&t){var n=i.Vb();i.Ub(0,"div",10),i.bc("mousedown",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)}))("touchstart",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)})),i.Tb()}}function d(t,e){if(1&t){var n=i.Vb();i.Ub(0,"div",11),i.bc("mousedown",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)}))("touchstart",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)})),i.Tb()}}function h(t,e){if(1&t){var n=i.Vb();i.Ub(0,"div",12),i.bc("mousedown",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)}))("touchstart",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)})),i.Tb()}}function f(t,e){if(1&t){var n=i.Vb();i.Ub(0,"div",13),i.bc("mousedown",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)}))("touchstart",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)})),i.Tb()}}function p(t,e){if(1&t){var n=i.Vb();i.Ub(0,"div",14),i.bc("mousedown",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)}))("touchstart",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)})),i.Tb()}}function b(t,e){if(1&t){var n=i.Vb();i.Ub(0,"div",15),i.bc("mousedown",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)}))("touchstart",(function(t){return i.Ec(n),i.fc().resize.dragStartDelay(t)})),i.Tb()}}var g,m,v,y,_,O,k,T,S,E=function t(){C(this,t)},x=function(t){return t.Fit="fit",t.ScrollVertical="scrollVertical",t.ScrollHorizontal="scrollHorizontal",t.Fixed="fixed",t.VerticalFixed="verticalFixed",t.HorizontalFixed="horizontalFixed",t}({}),P=function(t){return t.Always="always",t.OnDragAndResize="onDrag&Resize",t.None="none",t}({}),A=function(t){return t.None="none",t.CompactUp="compactUp",t.CompactLeft="compactLeft",t.CompactUpAndLeft="compactUp&Left",t.CompactLeftAndUp="compactLeft&Up",t.CompactRight="compactRight",t.CompactUpAndRight="compactUp&Right",t.CompactRightAndUp="compactRight&Up",t}({}),I=function(t){return t.LTR="ltr",t.RTL="rtl",t}({}),M=function(){var t=function(){function t(e){C(this,t),this.gridster=e}return w(t,[{key:"destroy",value:function(){delete this.gridster}},{key:"checkCompact",value:function(){this.gridster.$options.compactType!==A.None&&(this.gridster.$options.compactType===A.CompactUp?this.checkCompactUp():this.gridster.$options.compactType===A.CompactLeft?this.checkCompactLeft():this.gridster.$options.compactType===A.CompactUpAndLeft?(this.checkCompactUp(),this.checkCompactLeft()):this.gridster.$options.compactType===A.CompactLeftAndUp?(this.checkCompactLeft(),this.checkCompactUp()):this.gridster.$options.compactType===A.CompactRight?this.checkCompactRight():this.gridster.$options.compactType===A.CompactUpAndRight?(this.checkCompactUp(),this.checkCompactRight()):this.gridster.$options.compactType===A.CompactRightAndUp&&(this.checkCompactRight(),this.checkCompactUp()))}},{key:"checkCompactItem",value:function(t){this.gridster.$options.compactType!==A.None&&(this.gridster.$options.compactType===A.CompactUp?this.moveUpTillCollision(t):this.gridster.$options.compactType===A.CompactLeft?this.moveLeftTillCollision(t):this.gridster.$options.compactType===A.CompactUpAndLeft?(this.moveUpTillCollision(t),this.moveLeftTillCollision(t)):this.gridster.$options.compactType===A.CompactLeftAndUp?(this.moveLeftTillCollision(t),this.moveUpTillCollision(t)):this.gridster.$options.compactType===A.CompactUpAndRight&&(this.moveUpTillCollision(t),this.moveRightTillCollision(t)))}},{key:"checkCompactUp",value:function(){for(var t,e=!1,n=this.gridster.grid.length,i=0;i-1)return!0;if(o.indexOf(r)>-1)return!1}return t.checkDragHandleClass(e.parentNode,n,i,r)}},{key:"checkContentClass",value:function(e,n,i){return!(!e||e===n)&&(!!(e.hasAttribute("class")&&e.getAttribute("class").split(" ").indexOf(i)>-1)||t.checkContentClass(e.parentNode,n,i))}},{key:"compareItems",value:function(t,e){return t.y>e.y?-1:t.ye.x?-1:1}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),j=function(){var t=function(){function t(e){C(this,t),this.gridster=e}return w(t,[{key:"destroy",value:function(){delete this.initialItem,delete this.gridster.movingItem,this.gridster.previewStyle&&this.gridster.previewStyle(),delete this.gridster,this.emptyCellExit&&(this.emptyCellExit(),this.emptyCellExit=null)}},{key:"updateOptions",value:function(){var t=this;this.gridster.$options.enableEmptyCellClick&&!this.emptyCellClick&&this.gridster.options.emptyCellClickCallback?(this.emptyCellClick=this.gridster.renderer.listen(this.gridster.el,"click",this.emptyCellClickCb.bind(this)),this.emptyCellClickTouch=this.gridster.renderer.listen(this.gridster.el,"touchend",this.emptyCellClickCb.bind(this))):!this.gridster.$options.enableEmptyCellClick&&this.emptyCellClick&&this.emptyCellClickTouch&&(this.emptyCellClick(),this.emptyCellClickTouch(),this.emptyCellClick=null,this.emptyCellClickTouch=null),this.gridster.$options.enableEmptyCellContextMenu&&!this.emptyCellContextMenu&&this.gridster.options.emptyCellContextMenuCallback?this.emptyCellContextMenu=this.gridster.renderer.listen(this.gridster.el,"contextmenu",this.emptyCellContextMenuCb.bind(this)):!this.gridster.$options.enableEmptyCellContextMenu&&this.emptyCellContextMenu&&(this.emptyCellContextMenu(),this.emptyCellContextMenu=null),this.gridster.$options.enableEmptyCellDrop&&!this.emptyCellDrop&&this.gridster.options.emptyCellDropCallback?(this.emptyCellDrop=this.gridster.renderer.listen(this.gridster.el,"drop",this.emptyCellDragDrop.bind(this)),this.gridster.zone.runOutsideAngular((function(){t.emptyCellMove=t.gridster.renderer.listen(t.gridster.el,"dragover",t.emptyCellDragOver.bind(t))})),this.emptyCellExit=this.gridster.renderer.listen("document","dragend",(function(){t.gridster.movingItem=null,t.gridster.previewStyle()}))):!this.gridster.$options.enableEmptyCellDrop&&this.emptyCellDrop&&this.emptyCellMove&&this.emptyCellExit&&(this.emptyCellDrop(),this.emptyCellMove(),this.emptyCellExit(),this.emptyCellMove=null,this.emptyCellDrop=null,this.emptyCellExit=null),this.gridster.$options.enableEmptyCellDrag&&!this.emptyCellDrag&&this.gridster.options.emptyCellDragCallback?(this.emptyCellDrag=this.gridster.renderer.listen(this.gridster.el,"mousedown",this.emptyCellMouseDown.bind(this)),this.emptyCellDragTouch=this.gridster.renderer.listen(this.gridster.el,"touchstart",this.emptyCellMouseDown.bind(this))):!this.gridster.$options.enableEmptyCellDrag&&this.emptyCellDrag&&this.emptyCellDragTouch&&(this.emptyCellDrag(),this.emptyCellDragTouch(),this.emptyCellDrag=null,this.emptyCellDragTouch=null)}},{key:"emptyCellClickCb",value:function(t){if(!this.gridster.movingItem&&!R.checkContentClassForEmptyCellClickEvent(this.gridster,t)){var e=this.getValidItemFromEvent(t);e&&(this.gridster.options.emptyCellClickCallback&&this.gridster.options.emptyCellClickCallback(t,e),this.gridster.cdRef.markForCheck())}}},{key:"emptyCellContextMenuCb",value:function(t){if(!this.gridster.movingItem&&!R.checkContentClassForEmptyCellClickEvent(this.gridster,t)){t.preventDefault(),t.stopPropagation();var e=this.getValidItemFromEvent(t);e&&(this.gridster.options.emptyCellContextMenuCallback&&this.gridster.options.emptyCellContextMenuCallback(t,e),this.gridster.cdRef.markForCheck())}}},{key:"emptyCellDragDrop",value:function(t){var e=this.getValidItemFromEvent(t);e&&(this.gridster.options.emptyCellDropCallback&&this.gridster.options.emptyCellDropCallback(t,e),this.gridster.cdRef.markForCheck())}},{key:"emptyCellDragOver",value:function(t){t.preventDefault(),t.stopPropagation();var e=this.getValidItemFromEvent(t);e?(t.dataTransfer&&(t.dataTransfer.dropEffect="move"),this.gridster.movingItem=e):(t.dataTransfer&&(t.dataTransfer.dropEffect="none"),this.gridster.movingItem=null),this.gridster.previewStyle()}},{key:"emptyCellMouseDown",value:function(t){var e=this;if(!R.checkContentClassForEmptyCellClickEvent(this.gridster,t)){t.preventDefault(),t.stopPropagation();var n=this.getValidItemFromEvent(t);n&&1===t.buttons&&(this.initialItem=n,this.gridster.movingItem=n,this.gridster.previewStyle(),this.gridster.zone.runOutsideAngular((function(){e.emptyCellMMove=e.gridster.renderer.listen("window","mousemove",e.emptyCellMouseMove.bind(e)),e.emptyCellMMoveTouch=e.gridster.renderer.listen("window","touchmove",e.emptyCellMouseMove.bind(e))})),this.emptyCellUp=this.gridster.renderer.listen("window","mouseup",this.emptyCellMouseUp.bind(this)),this.emptyCellUpTouch=this.gridster.renderer.listen("window","touchend",this.emptyCellMouseUp.bind(this)))}}},{key:"emptyCellMouseMove",value:function(t){t.preventDefault(),t.stopPropagation();var e=this.getValidItemFromEvent(t,this.initialItem);e&&(this.gridster.movingItem=e,this.gridster.previewStyle())}},{key:"emptyCellMouseUp",value:function(t){var e=this;this.emptyCellMMove(),this.emptyCellMMoveTouch(),this.emptyCellUp(),this.emptyCellUpTouch();var n=this.getValidItemFromEvent(t,this.initialItem);n&&(this.gridster.movingItem=n),this.gridster.options.emptyCellDragCallback&&this.gridster.movingItem&&this.gridster.options.emptyCellDragCallback(t,this.gridster.movingItem),setTimeout((function(){e.initialItem=null,e.gridster&&(e.gridster.movingItem=null,e.gridster.previewStyle())})),this.gridster.cdRef.markForCheck()}},{key:"getPixelsX",value:function(t,e){var n=this.gridster.options.scale;return n?(t.clientX-e.left)/n+this.gridster.el.scrollLeft-this.gridster.gridRenderer.getLeftMargin():t.clientX+this.gridster.el.scrollLeft-e.left-this.gridster.gridRenderer.getLeftMargin()}},{key:"getPixelsY",value:function(t,e){var n=this.gridster.options.scale;return n?(t.clientY-e.top)/n+this.gridster.el.scrollTop-this.gridster.gridRenderer.getTopMargin():t.clientY+this.gridster.el.scrollTop-e.top-this.gridster.gridRenderer.getTopMargin()}},{key:"getValidItemFromEvent",value:function(t,e){t.preventDefault(),t.stopPropagation(),R.checkTouchEvent(t);var n=this.gridster.el.getBoundingClientRect(),i=this.getPixelsX(t,n),r=this.getPixelsY(t,n),o={x:this.gridster.pixelsToPositionX(i,Math.floor,!0),y:this.gridster.pixelsToPositionY(r,Math.floor,!0),cols:this.gridster.$options.defaultItemCols,rows:this.gridster.$options.defaultItemRows};if(e&&(o.cols=Math.min(Math.abs(e.x-o.x)+1,this.gridster.$options.emptyCellDragMaxCols),o.rows=Math.min(Math.abs(e.y-o.y)+1,this.gridster.$options.emptyCellDragMaxRows),e.xthis.gridster.$options.emptyCellDragMaxCols-1&&(o.x=this.gridster.movingItem?this.gridster.movingItem.x:0),e.ythis.gridster.$options.emptyCellDragMaxRows-1&&(o.y=this.gridster.movingItem?this.gridster.movingItem.y:0)),this.gridster.$options.enableOccupiedCellDrop||!this.gridster.checkCollision(o))return o}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(E))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),L=function(){var t=function(){function t(e){C(this,t),this.gridster=e}return w(t,[{key:"destroy",value:function(){delete this.gridster}},{key:"updateItem",value:function(t,e,n){if(this.gridster.mobile)this.clearCellPosition(n,t),n.setStyle(t,"height",this.gridster.$options.keepFixedHeightInMobile?e.rows*this.gridster.$options.fixedRowHeight+"px":e.rows*this.gridster.curWidth/e.cols+"px"),n.setStyle(t,"width",this.gridster.$options.keepFixedWidthInMobile?this.gridster.$options.fixedColWidth+"px":""),n.setStyle(t,"margin-bottom",this.gridster.$options.margin+"px"),n.setStyle(t,I.LTR?"margin-right":"margin-left","");else{var i=Math.round(this.gridster.curColWidth*e.x),r=Math.round(this.gridster.curRowHeight*e.y),o=this.gridster.curColWidth*e.cols-this.gridster.$options.margin,a=this.gridster.curRowHeight*e.rows-this.gridster.$options.margin;this.setCellPosition(n,t,i,r),n.setStyle(t,"width",o+"px"),n.setStyle(t,"height",a+"px");var s=null,c=null;this.gridster.$options.outerMargin&&(this.gridster.rows===e.rows+e.y&&(s=null!==this.gridster.$options.outerMarginBottom?this.gridster.$options.outerMarginBottom+"px":this.gridster.$options.margin+"px"),this.gridster.columns===e.cols+e.x&&(c=null!==this.gridster.$options.outerMarginBottom?this.gridster.$options.outerMarginRight+"px":this.gridster.$options.margin+"px")),n.setStyle(t,"margin-bottom",s),n.setStyle(t,I.LTR?"margin-right":"margin-left",c)}}},{key:"updateGridster",value:function(){var t="",e="",n="",i="";this.gridster.$options.gridType===x.Fit?(t=x.Fit,e=x.ScrollVertical,n=x.ScrollHorizontal,i=x.Fixed):this.gridster.$options.gridType===x.ScrollVertical?(this.gridster.curRowHeight=this.gridster.curColWidth,t=x.ScrollVertical,e=x.Fit,n=x.ScrollHorizontal,i=x.Fixed):this.gridster.$options.gridType===x.ScrollHorizontal?(this.gridster.curColWidth=this.gridster.curRowHeight,t=x.ScrollHorizontal,e=x.Fit,n=x.ScrollVertical,i=x.Fixed):this.gridster.$options.gridType===x.Fixed?(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=x.Fixed,e=x.Fit,n=x.ScrollVertical,i=x.ScrollHorizontal):this.gridster.$options.gridType===x.VerticalFixed?(this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=x.ScrollVertical,e=x.Fit,n=x.ScrollHorizontal,i=x.Fixed):this.gridster.$options.gridType===x.HorizontalFixed&&(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=x.ScrollHorizontal,e=x.Fit,n=x.ScrollVertical,i=x.Fixed),this.gridster.mobile||this.gridster.$options.setGridSize&&this.gridster.$options.gridType!==x.Fit?this.gridster.renderer.removeClass(this.gridster.el,t):this.gridster.renderer.addClass(this.gridster.el,t),this.gridster.renderer.removeClass(this.gridster.el,e),this.gridster.renderer.removeClass(this.gridster.el,n),this.gridster.renderer.removeClass(this.gridster.el,i)}},{key:"getGridColumnStyle",value:function(t){return Object.assign(Object.assign({},this.getLeftPosition(this.gridster.curColWidth*t)),{width:this.gridster.curColWidth-this.gridster.$options.margin+"px",height:this.gridster.gridRows.length*this.gridster.curRowHeight-this.gridster.$options.margin+"px"})}},{key:"getGridRowStyle",value:function(t){return Object.assign(Object.assign({},this.getTopPosition(this.gridster.curRowHeight*t)),{width:this.gridster.gridColumns.length*this.gridster.curColWidth-this.gridster.$options.margin+"px",height:this.gridster.curRowHeight-this.gridster.$options.margin+"px"})}},{key:"getLeftPosition",value:function(t){var e=this.gridster.$options.dirType===I.RTL?-t:t;return this.gridster.$options.useTransformPositioning?{transform:"translateX("+e+"px)"}:{left:this.getLeftMargin()+e+"px"}}},{key:"getTopPosition",value:function(t){return this.gridster.$options.useTransformPositioning?{transform:"translateY("+t+"px)"}:{top:this.getTopMargin()+t+"px"}}},{key:"clearCellPosition",value:function(t,e){this.gridster.$options.useTransformPositioning?t.setStyle(e,"transform",""):(t.setStyle(e,"top",""),t.setStyle(e,"left",""))}},{key:"setCellPosition",value:function(t,e,n,i){var r=this.gridster.$options.dirType===I.RTL?-n:n;this.gridster.$options.useTransformPositioning?t.setStyle(e,"transform","translate3d("+r+"px, "+i+"px, 0)"):(t.setStyle(e,"left",this.getLeftMargin()+r+"px"),t.setStyle(e,"top",this.getTopMargin()+i+"px"))}},{key:"getLeftMargin",value:function(){return this.gridster.$options.outerMargin?null!==this.gridster.$options.outerMarginLeft?this.gridster.$options.outerMarginLeft:this.gridster.$options.margin:0}},{key:"getTopMargin",value:function(){return this.gridster.$options.outerMargin?null!==this.gridster.$options.outerMarginTop?this.gridster.$options.outerMarginTop:this.gridster.$options.margin:0}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(E))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),N=function(){var t=function(){function t(e,n,i,r){C(this,t),this.renderer=n,this.cdRef=i,this.zone=r,this.columns=0,this.rows=0,this.gridColumns=[],this.gridRows=[],this.el=e.nativeElement,this.$options=JSON.parse(JSON.stringify(D)),this.calculateLayoutDebounce=R.debounce(this.calculateLayout.bind(this),0),this.mobile=!1,this.curWidth=0,this.curHeight=0,this.grid=[],this.curColWidth=0,this.curRowHeight=0,this.dragInProgress=!1,this.emptyCell=new j(this),this.compact=new M(this),this.gridRenderer=new L(this)}return w(t,[{key:"checkCollisionTwoItems",value:function(t,e){if(!(t.xe.x&&t.ye.y))return!1;if(!this.$options.allowMultiLayer)return!0;var n=this.$options.defaultLayerIndex;return(void 0===t.layerIndex?n:t.layerIndex)===(void 0===e.layerIndex?n:e.layerIndex)}},{key:"ngOnInit",value:function(){this.options.initCallback&&this.options.initCallback(this)}},{key:"ngOnChanges",value:function(t){var e=this;t.options&&(this.setOptions(),this.options.api={optionsChanged:this.optionsChanged.bind(this),resize:this.onResize.bind(this),getNextPossiblePosition:this.getNextPossiblePosition.bind(this),getFirstPossiblePosition:this.getFirstPossiblePosition.bind(this),getLastPossiblePosition:this.getLastPossiblePosition.bind(this),getItemComponent:function(t){return e.getItemComponent(t)}},this.columns=this.$options.minCols,this.rows=this.$options.minRows,this.setGridSize(),this.calculateLayout())}},{key:"resize",value:function(){var t,e;"fit"!==this.$options.gridType||this.mobile?(e=this.el.clientWidth,t=this.el.clientHeight):(e=this.el.offsetWidth,t=this.el.offsetHeight),e===this.curWidth&&t===this.curHeight||!this.checkIfToResize()||this.onResize()}},{key:"setOptions",value:function(){this.$options=R.merge(this.$options,this.options,this.$options),this.$options.disableWindowResize||this.windowResize?this.$options.disableWindowResize&&this.windowResize&&(this.windowResize(),this.windowResize=null):this.windowResize=this.renderer.listen("window","resize",this.onResize.bind(this)),this.emptyCell.updateOptions()}},{key:"optionsChanged",value:function(){this.setOptions();for(var t=this.grid.length-1;t>=0;t--)this.grid[t].updateOptions();this.calculateLayout()}},{key:"ngOnDestroy",value:function(){this.windowResize&&this.windowResize(),this.options&&this.options.destroyCallback&&this.options.destroyCallback(this),this.options&&this.options.api&&(this.options.api.resize=void 0,this.options.api.optionsChanged=void 0,this.options.api.getNextPossiblePosition=void 0,this.options.api=void 0),this.emptyCell.destroy(),delete this.emptyCell,this.compact.destroy(),delete this.compact}},{key:"onResize",value:function(){this.options.setGridSize&&(this.renderer.setStyle(this.el,"width",""),this.renderer.setStyle(this.el,"height","")),this.setGridSize(),this.calculateLayout()}},{key:"checkIfToResize",value:function(){var t=this.el.clientWidth,e=this.el.offsetWidth,n=this.el.scrollWidth,i=this.el.clientHeight,r=this.el.offsetHeight,o=this.el.scrollHeight;return!(tr&&o-re&&n-ethis.curWidth?(this.mobile=!this.mobile,this.renderer.addClass(this.el,"mobile")):this.mobile&&this.$options.mobileBreakpoint=0;i--)(t=this.grid[i]).notPlaced||(e=Math.max(e,t.$item.y+t.$item.rows),n=Math.max(n,t.$item.x+t.$item.cols));this.columns===n&&this.rows===e||(this.columns=n,this.rows=e,this.options.gridSizeChangedCallback&&this.options.gridSizeChangedCallback(this))}},{key:"calculateLayout",value:function(){if(this.compact&&this.compact.checkCompact(),this.setGridDimensions(),this.$options.outerMargin){var t=-this.$options.margin;null!==this.$options.outerMarginLeft?(t+=this.$options.outerMarginLeft,this.renderer.setStyle(this.el,"padding-left",this.$options.outerMarginLeft+"px")):(t+=this.$options.margin,this.renderer.setStyle(this.el,"padding-left",this.$options.margin+"px")),null!==this.$options.outerMarginRight?(t+=this.$options.outerMarginRight,this.renderer.setStyle(this.el,"padding-right",this.$options.outerMarginRight+"px")):(t+=this.$options.margin,this.renderer.setStyle(this.el,"padding-right",this.$options.margin+"px")),this.curColWidth=(this.curWidth-t)/this.columns;var e=-this.$options.margin;null!==this.$options.outerMarginTop?(e+=this.$options.outerMarginTop,this.renderer.setStyle(this.el,"padding-top",this.$options.outerMarginTop+"px")):(e+=this.$options.margin,this.renderer.setStyle(this.el,"padding-top",this.$options.margin+"px")),null!==this.$options.outerMarginBottom?(e+=this.$options.outerMarginBottom,this.renderer.setStyle(this.el,"padding-bottom",this.$options.outerMarginBottom+"px")):(e+=this.$options.margin,this.renderer.setStyle(this.el,"padding-bottom",this.$options.margin+"px")),this.curRowHeight=(this.curHeight-e)/this.rows}else this.curColWidth=(this.curWidth+this.$options.margin)/this.columns,this.curRowHeight=(this.curHeight+this.$options.margin)/this.rows,this.renderer.setStyle(this.el,"padding-left","0px"),this.renderer.setStyle(this.el,"padding-right","0px"),this.renderer.setStyle(this.el,"padding-top","0px"),this.renderer.setStyle(this.el,"padding-bottom","0px");this.gridRenderer.updateGridster(),this.$options.setGridSize?(this.renderer.addClass(this.el,"gridSize"),this.mobile||(this.renderer.setStyle(this.el,"width",this.columns*this.curColWidth+this.$options.margin+"px"),this.renderer.setStyle(this.el,"height",this.rows*this.curRowHeight+this.$options.margin+"px"))):(this.renderer.removeClass(this.el,"gridSize"),this.renderer.setStyle(this.el,"width",""),this.renderer.setStyle(this.el,"height","")),this.updateGrid();for(var n,i=this.grid.length-1;i>=0;i--)(n=this.grid[i]).setSize(),n.drag.toggle(),n.resize.toggle();setTimeout(this.resize.bind(this),100)}},{key:"updateGrid",value:function(){"always"!==this.$options.displayGrid||this.mobile?"onDrag&Resize"===this.$options.displayGrid&&this.dragInProgress?this.renderer.addClass(this.el,"display-grid"):"none"!==this.$options.displayGrid&&this.dragInProgress&&!this.mobile||this.renderer.removeClass(this.el,"display-grid"):this.renderer.addClass(this.el,"display-grid"),this.setGridDimensions(),this.gridColumns.length=t.getNewArrayLength(this.columns,this.curWidth,this.curColWidth),this.gridRows.length=t.getNewArrayLength(this.rows,this.curHeight,this.curRowHeight),this.cdRef.markForCheck()}},{key:"addItem",value:function(t){void 0===t.$item.cols&&(t.$item.cols=this.$options.defaultItemCols,t.item.cols=t.$item.cols,t.itemChanged()),void 0===t.$item.rows&&(t.$item.rows=this.$options.defaultItemRows,t.item.rows=t.$item.rows,t.itemChanged()),-1===t.$item.x||-1===t.$item.y?this.autoPositionItem(t):this.checkCollision(t.$item)&&(this.$options.disableWarnings||(t.notPlaced=!0,console.warn("Can't be placed in the bounds of the dashboard, trying to auto position!/n"+JSON.stringify(t.item,["cols","rows","x","y"]))),this.$options.disableAutoPositionOnConflict?t.notPlaced=!0:this.autoPositionItem(t)),this.grid.push(t),this.calculateLayoutDebounce()}},{key:"removeItem",value:function(t){this.grid.splice(this.grid.indexOf(t),1),this.calculateLayoutDebounce(),this.options.itemRemovedCallback&&this.options.itemRemovedCallback(t.item,t)}},{key:"checkCollision",value:function(t){var e=!1;if(this.options.itemValidateCallback&&(e=!this.options.itemValidateCallback(t)),!e&&this.checkGridCollision(t)&&(e=!0),!e){var n=this.findItemWithItem(t);n&&(e=n)}return e}},{key:"checkGridCollision",value:function(t){var e=t.cols*t.rows;return!(t.y>-1&&t.x>-1&&t.cols+t.x<=this.$options.maxCols&&t.rows+t.y<=this.$options.maxRows&&t.cols<=(void 0===t.maxItemCols?this.$options.maxItemCols:t.maxItemCols)&&t.cols>=(void 0===t.minItemCols?this.$options.minItemCols:t.minItemCols)&&t.rows<=(void 0===t.maxItemRows?this.$options.maxItemRows:t.maxItemRows)&&t.rows>=(void 0===t.minItemRows?this.$options.minItemRows:t.minItemRows)&&(void 0===t.minItemArea?this.$options.minItemArea:t.minItemArea)<=e&&(void 0===t.maxItemArea?this.$options.maxItemArea:t.maxItemArea)>=e)}},{key:"findItemWithItem",value:function(t){for(var e,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};-1===t.cols&&(t.cols=this.$options.defaultItemCols),-1===t.rows&&(t.rows=this.$options.defaultItemRows),this.setGridDimensions();for(var n,i=e.y||0;i=this.rows+t.rows;return!(this.rows<=this.columns&&r)&&this.$options.maxCols>=this.columns+t.cols?(t.x=this.columns,t.y=0,!0):!!r&&(t.y=this.rows,t.x=0,!0)}},{key:"getFirstPossiblePosition",value:function(t){var e=Object.assign({},t);return this.getNextPossiblePosition(e),e}},{key:"getLastPossiblePosition",value:function(t){var e={y:0,x:0};e=this.grid.reduce((function(t,e){var n={y:e.$item.y+e.$item.rows-1,x:e.$item.x+e.$item.cols-1};return 1===R.compareItems(t,n)?n:t}),e);var n=Object.assign({},t);return this.getNextPossiblePosition(n,e),n}},{key:"pixelsToPositionX",value:function(t,e,n){var i=e(t/this.curColWidth);return n?i:Math.max(i,0)}},{key:"pixelsToPositionY",value:function(t,e,n){var i=e(t/this.curRowHeight);return n?i:Math.max(i,0)}},{key:"positionXToPixels",value:function(t){return t*this.curColWidth}},{key:"positionYToPixels",value:function(t){return t*this.curRowHeight}},{key:"getItemComponent",value:function(t){return this.grid.find((function(e){return e.item===t}))}},{key:"checkCollisionForSwaping",value:function(t){var e=!1;if(this.options.itemValidateCallback&&(e=!this.options.itemValidateCallback(t)),!e&&this.checkGridCollision(t)&&(e=!0),!e){var n=this.findItemWithItemForSwaping(t);n&&(e=n)}return e}},{key:"findItemWithItemForSwaping",value:function(e){for(var n,i=this.grid.length-1;i>-1;i--)if((n=this.grid[i]).$item!==e&&t.checkCollisionTwoItemsForSwaping(n.$item,e))return n;return!1}}],[{key:"checkCollisionTwoItemsForSwaping",value:function(t,e){return t.x+(1===t.cols?0:1)e.x+(1===e.cols?0:1)&&t.y+(1===t.rows?0:1)e.y+(1===e.rows?0:1)}},{key:"getNewArrayLength",value:function(t,e,n){var i=Math.max(t,Math.floor(e/n));return i<0?0:Number.isFinite(i)?Math.floor(i):0}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.l),i.Ob(i.G),i.Ob(i.h),i.Ob(i.B))},t.\u0275cmp=i.Ib({type:t,selectors:[["gridster"]],inputs:{options:"options"},features:[i.Ab],ngContentSelectors:s,decls:4,vars:2,consts:[["class","gridster-column",3,"ngStyle",4,"ngFor","ngForOf"],["class","gridster-row",3,"ngStyle",4,"ngFor","ngForOf"],[1,"gridster-preview"],[1,"gridster-column",3,"ngStyle"],[1,"gridster-row",3,"ngStyle"]],template:function(t,e){1&t&&(i.lc(),i.Oc(0,o,1,1,"div",0),i.Oc(1,a,1,1,"div",1),i.kc(2),i.Pb(3,"gridster-preview",2)),2&t&&(i.mc("ngForOf",e.gridColumns),i.Cb(1),i.mc("ngForOf",e.gridRows))},directives:function(){return[r.m,et,r.o]},styles:["gridster{-ms-user-select:none;-webkit-user-select:none;background:grey;box-sizing:border-box;display:block;height:100%;position:relative;user-select:none;width:100%}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto}gridster.mobile gridster-item{position:relative}gridster.gridSize{height:auto;width:auto}gridster.gridSize.fit{height:100%;width:100%}gridster .gridster-column,gridster .gridster-row{box-sizing:border-box;display:none;position:absolute;transition:.3s}gridster.display-grid .gridster-column,gridster.display-grid .gridster-row{display:block}gridster .gridster-column{border-left:1px solid #fff;border-right:1px solid #fff}gridster .gridster-row{border-bottom:1px solid #fff;border-top:1px solid #fff}"],encapsulation:2}),t}(),U=function t(){C(this,t)},F=function(){var t=function(){function t(e){C(this,t),this.iteration=0,this.pushedItems=[],this.pushedItemsTemp=[],this.pushedItemsTempPath=[],this.pushedItemsPath=[],this.gridsterItem=e,this.gridster=e.gridster,this.tryPattern={fromEast:[this.tryWest,this.trySouth,this.tryNorth,this.tryEast],fromWest:[this.tryEast,this.trySouth,this.tryNorth,this.tryWest],fromNorth:[this.trySouth,this.tryEast,this.tryWest,this.tryNorth],fromSouth:[this.tryNorth,this.tryEast,this.tryWest,this.trySouth]},this.fromSouth="fromSouth",this.fromNorth="fromNorth",this.fromEast="fromEast",this.fromWest="fromWest"}return w(t,[{key:"destroy",value:function(){delete this.gridster,delete this.gridsterItem}},{key:"pushItems",value:function(t,e){if(this.gridster.$options.pushItems&&!e){this.pushedItemsOrder=[],this.iteration=0;var n=this.push(this.gridsterItem,t);return n||this.restoreTempItems(),this.pushedItemsOrder=[],this.pushedItemsTemp=[],this.pushedItemsTempPath=[],n}return!1}},{key:"restoreTempItems",value:function(){for(var t=this.pushedItemsTemp.length-1;t>-1;t--)this.removeFromTempPushed(this.pushedItemsTemp[t])}},{key:"restoreItems",value:function(){for(var t,e=0,n=this.pushedItems.length;e-1;t--)this.checkPushedItem(this.pushedItems[t],t)&&(e=!0);e&&this.checkPushBack()}},{key:"push",value:function(t,e){if(this.iteration>100)return console.warn("max iteration reached"),!1;if(this.gridster.checkGridCollision(t.$item))return!1;if(""===e)return!1;var n=this.gridster.findItemsWithItem(t.$item),i=e===this.fromNorth||e===this.fromWest;n.sort((function(t,e){return i?e.$item.y-t.$item.y||e.$item.x-t.$item.x:t.$item.y-e.$item.y||t.$item.x-e.$item.x}));for(var r,o=0,a=!0,s=[];o-1&&this.pushedItemsTempPath[c].length>10){a=!1;break}if(this.tryPattern[e][0].call(this,r,t))this.pushedItemsOrder.push(r),s.push(r);else if(this.tryPattern[e][1].call(this,r,t))this.pushedItemsOrder.push(r),s.push(r);else if(this.tryPattern[e][2].call(this,r,t))this.pushedItemsOrder.push(r),s.push(r);else{if(!this.tryPattern[e][3].call(this,r,t)){a=!1;break}this.pushedItemsOrder.push(r),s.push(r)}}if(!a&&(o=this.pushedItemsOrder.lastIndexOf(s[0]))>-1)for(var u=this.pushedItemsOrder.length-1;u>=o;u--)r=this.pushedItemsOrder[u],this.pushedItemsOrder.pop(),this.removeFromTempPushed(r),this.removeFromPushedItem(r);return this.iteration++,a}},{key:"trySouth",value:function(t,e){return!!this.gridster.$options.pushDirections.south&&(this.addToTempPushed(t),t.$item.y=e.$item.y+e.$item.rows,this.push(t,this.fromNorth)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))}},{key:"tryNorth",value:function(t,e){return!!this.gridster.$options.pushDirections.north&&(this.addToTempPushed(t),t.$item.y=e.$item.y-t.$item.rows,this.push(t,this.fromSouth)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))}},{key:"tryEast",value:function(t,e){return!!this.gridster.$options.pushDirections.east&&(this.addToTempPushed(t),t.$item.x=e.$item.x+e.$item.cols,this.push(t,this.fromWest)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))}},{key:"tryWest",value:function(t,e){return!!this.gridster.$options.pushDirections.west&&(this.addToTempPushed(t),t.$item.x=e.$item.x-t.$item.cols,this.push(t,this.fromEast)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))}},{key:"addToTempPushed",value:function(t){var e=this.pushedItemsTemp.indexOf(t);-1===e&&(e=this.pushedItemsTemp.push(t)-1,this.pushedItemsTempPath[e]=[]),this.pushedItemsTempPath[e].push({x:t.$item.x,y:t.$item.y})}},{key:"removeFromTempPushed",value:function(t){var e=this.pushedItemsTemp.indexOf(t),n=this.pushedItemsTempPath[e].pop();n&&(t.$item.x=n.x,t.$item.y=n.y,t.setSize(),this.pushedItemsTempPath[e].length||(this.pushedItemsTemp.splice(e,1),this.pushedItemsTempPath.splice(e,1)))}},{key:"addToPushed",value:function(t){if(this.pushedItems.indexOf(t)<0)this.pushedItems.push(t),this.pushedItemsPath.push([{x:t.item.x||0,y:t.item.y||0},{x:t.$item.x,y:t.$item.y}]);else{var e=this.pushedItems.indexOf(t);this.pushedItemsPath[e].push({x:t.$item.x,y:t.$item.y})}}},{key:"removeFromPushed",value:function(t){t>-1&&(this.pushedItems.splice(t,1),this.pushedItemsPath.splice(t,1))}},{key:"removeFromPushedItem",value:function(t){var e=this.pushedItems.indexOf(t);e>-1&&(this.pushedItemsPath[e].pop(),this.pushedItemsPath.length||(this.pushedItems.splice(e,1),this.pushedItemsPath.splice(e,1)))}},{key:"checkPushedItem",value:function(t,e){for(var n,i,r,o=this.pushedItemsPath[e],a=o.length-2,s=!1;a>-1;a--)n=o[a],i=t.$item.x,r=t.$item.y,t.$item.x=n.x,t.$item.y=n.y,this.gridster.findItemWithItem(t.$item)?(t.$item.x=i,t.$item.y=r):(t.setSize(),o.splice(a+1,o.length-a-1),s=!0);return o.length<2&&this.removeFromPushed(e),s}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(U))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}();function B(t,e,n,i,r,o,a,s,c,u){g=t.$options.scrollSensitivity,m=t.$options.scrollSpeed,v=t.el,y=c,_=u;var l=v.offsetWidth,d=v.scrollLeft,h=v.scrollTop,f=n-h;if(!t.$options.disableScrollVertical)if(a.clientYo.clientY&&h>0&&fo.clientX&&d>0&&pthis.gridsterItem.$item.x?e=this.push.fromEast:t.ythis.gridsterItem.$item.y&&(e=this.push.fromSouth),this.push.pushItems(e,this.gridster.$options.disablePushOnDrag),this.swap.swapItems(),this.collision=this.gridster.checkCollision(this.gridsterItem.$item),this.collision?(this.gridsterItem.$item.x=this.positionXBackup,this.gridsterItem.$item.y=this.positionYBackup,this.gridster.$options.draggable.dropOverItems&&!0!==this.collision&&this.collision.$item&&(this.gridster.movingItem=null)):this.path.push({x:this.gridsterItem.$item.x,y:this.gridsterItem.$item.y}),this.push.checkPushBack()}this.gridster.previewStyle(!0)}},{key:"toggle",value:function(){var t=this.gridsterItem.canBeDragged();!this.enabled&&t?(this.enabled=!this.enabled,this.dragStartFunction=this.dragStartDelay.bind(this),this.mousedown=this.gridsterItem.renderer.listen(this.gridsterItem.el,"mousedown",this.dragStartFunction),this.touchstart=this.gridsterItem.renderer.listen(this.gridsterItem.el,"touchstart",this.dragStartFunction)):this.enabled&&!t&&(this.enabled=!this.enabled,this.mousedown(),this.touchstart())}},{key:"dragStartDelay",value:function(t){var e=this;if(!(t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("gridster-item-resizable-handler")>-1||R.checkContentClassForEvent(this.gridster,t)))if(R.checkTouchEvent(t),this.gridster.$options.draggable.delayStart)var n=setTimeout((function(){e.dragStart(t),u()}),this.gridster.$options.draggable.delayStart),i=this.gridsterItem.renderer.listen("document","mouseup",u),r=this.gridsterItem.renderer.listen("document","mouseleave",u),o=this.gridsterItem.renderer.listen("window","blur",u),a=this.gridsterItem.renderer.listen("document","touchmove",(function(e){R.checkTouchEvent(e),(Math.abs(e.clientX-t.clientX)>9||Math.abs(e.clientY-t.clientY)>9)&&u()})),s=this.gridsterItem.renderer.listen("document","touchend",u),c=this.gridsterItem.renderer.listen("document","touchcancel",u);else this.dragStart(t);function u(){clearTimeout(n),o(),i(),r(),a(),s(),c()}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(U),i.Yb(E),i.Yb(i.B))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),X=function(){var t=function(){function t(e){C(this,t),this.pushedItems=[],this.pushedItemsPath=[],this.gridsterItem=e,this.gridster=e.gridster,this.tryPattern={fromEast:this.tryWest,fromWest:this.tryEast,fromNorth:this.trySouth,fromSouth:this.tryNorth},this.fromSouth="fromSouth",this.fromNorth="fromNorth",this.fromEast="fromEast",this.fromWest="fromWest"}return w(t,[{key:"destroy",value:function(){delete this.gridster,delete this.gridsterItem}},{key:"pushItems",value:function(t){return!!this.gridster.$options.pushResizeItems&&this.push(this.gridsterItem,t)}},{key:"restoreItems",value:function(){for(var t,e=0,n=this.pushedItems.length;e-1;t--)this.checkPushedItem(this.pushedItems[t],t)&&(e=!0);e&&this.checkPushBack()}},{key:"push",value:function(t,e){var n=this.gridster.checkCollision(t.$item);if(n&&!0!==n&&n!==this.gridsterItem&&n.canBeResized()){if(this.tryPattern[e].call(this,n,t,e))return!0}else if(!1===n)return!0;return!1}},{key:"trySouth",value:function(t,e,n){var i=t.$item.y,r=t.$item.rows;return t.$item.y=e.$item.y+e.$item.rows,t.$item.rows=r+i-t.$item.y,this.gridster.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.y=i,t.$item.rows=r,!1):(t.setSize(),this.addToPushed(t),this.push(e,n),!0)}},{key:"tryNorth",value:function(t,e,n){var i=t.$item.rows;return t.$item.rows=e.$item.y-t.$item.y,this.gridster.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.rows=i,!1):(t.setSize(),this.addToPushed(t),this.push(e,n),!0)}},{key:"tryEast",value:function(t,e,n){var i=t.$item.x,r=t.$item.cols;return t.$item.x=e.$item.x+e.$item.cols,t.$item.cols=r+i-t.$item.x,this.gridster.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.x=i,t.$item.cols=r,!1):(t.setSize(),this.addToPushed(t),this.push(e,n),!0)}},{key:"tryWest",value:function(t,e,n){var i=t.$item.cols;return t.$item.cols=e.$item.x-t.$item.x,this.gridster.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.cols=i,!1):(t.setSize(),this.addToPushed(t),this.push(e,n),!0)}},{key:"addToPushed",value:function(t){if(this.pushedItems.indexOf(t)<0)this.pushedItems.push(t),this.pushedItemsPath.push([{x:t.item.x||0,y:t.item.y||0,cols:t.item.cols||0,rows:t.item.rows||0},{x:t.$item.x,y:t.$item.y,cols:t.$item.cols,rows:t.$item.rows}]);else{var e=this.pushedItems.indexOf(t);this.pushedItemsPath[e].push({x:t.$item.x,y:t.$item.y,cols:t.$item.cols,rows:t.$item.rows})}}},{key:"removeFromPushed",value:function(t){t>-1&&(this.pushedItems.splice(t,1),this.pushedItemsPath.splice(t,1))}},{key:"checkPushedItem",value:function(t,e){for(var n,i,r,o,a,s=this.pushedItemsPath[e],c=s.length-2;c>-1;c--)n=s[c],i=t.$item.x,r=t.$item.y,o=t.$item.cols,a=t.$item.rows,t.$item.x=n.x,t.$item.y=n.y,t.$item.cols=n.cols,t.$item.rows=n.rows,this.gridster.findItemWithItem(t.$item)?(t.$item.x=i,t.$item.y=r,t.$item.cols=o,t.$item.rows=a):(t.setSize(),s.splice(c+1,s.length-1-c));return s.length<2&&(this.removeFromPushed(e),!0)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(U))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),J=function(){var t=function(){function t(e,n,i){C(this,t),this.zone=i,this.gridsterItem=e,this.gridster=n,this.lastMouse={clientX:0,clientY:0},this.itemBackup=[0,0,0,0],this.resizeEventScrollType={w:!1,e:!1,n:!1,s:!1}}return w(t,[{key:"destroy",value:function(){this.gridster.previewStyle&&this.gridster.previewStyle(),delete this.gridsterItem,delete this.gridster}},{key:"dragStart",value:function(t){var e,n,i,r=this;t.which&&1!==t.which||(this.gridster.options.resizable&&this.gridster.options.resizable.start&&this.gridster.options.resizable.start(this.gridsterItem.item,this.gridsterItem,t),t.stopPropagation(),t.preventDefault(),this.dragFunction=this.dragMove.bind(this),this.dragStopFunction=this.dragStop.bind(this),this.zone.runOutsideAngular((function(){r.mousemove=r.gridsterItem.renderer.listen("document","mousemove",r.dragFunction),r.touchmove=r.gridster.renderer.listen(r.gridster.el,"touchmove",r.dragFunction)})),this.mouseup=this.gridsterItem.renderer.listen("document","mouseup",this.dragStopFunction),this.mouseleave=this.gridsterItem.renderer.listen("document","mouseleave",this.dragStopFunction),this.cancelOnBlur=this.gridsterItem.renderer.listen("window","blur",this.dragStopFunction),this.touchend=this.gridsterItem.renderer.listen("document","touchend",this.dragStopFunction),this.touchcancel=this.gridsterItem.renderer.listen("document","touchcancel",this.dragStopFunction),this.gridsterItem.renderer.addClass(this.gridsterItem.el,"gridster-item-resizing"),this.lastMouse.clientX=t.clientX,this.lastMouse.clientY=t.clientY,this.left=this.gridsterItem.left,this.top=this.gridsterItem.top,this.originalClientX=t.clientX,this.originalClientY=t.clientY,this.width=this.gridsterItem.width,this.height=this.gridsterItem.height,this.bottom=this.gridsterItem.top+this.gridsterItem.height,this.right=this.gridsterItem.left+this.gridsterItem.width,this.margin=this.gridster.$options.margin,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.diffLeft=t.clientX+this.offsetLeft-this.left,this.diffRight=t.clientX+this.offsetLeft-this.right,this.diffTop=t.clientY+this.offsetTop-this.top,this.diffBottom=t.clientY+this.offsetTop-this.bottom,this.minHeight=this.gridster.positionYToPixels(this.gridsterItem.$item.minItemRows||this.gridster.$options.minItemRows)-this.margin,this.minWidth=this.gridster.positionXToPixels(this.gridsterItem.$item.minItemCols||this.gridster.$options.minItemCols)-this.margin,this.gridster.movingItem=this.gridsterItem.$item,this.gridster.previewStyle(),this.push=new F(this.gridsterItem),this.pushResize=new X(this.gridsterItem),this.gridster.dragInProgress=!0,this.gridster.updateGrid(),(null===(e=t.target)||void 0===e?void 0:e.hasAttribute("class"))&&t.target.getAttribute("class").split(" ").indexOf("handle-n")>-1?(this.resizeEventScrollType.n=!0,this.directionFunction=this.handleN):(null===(n=t.target)||void 0===n?void 0:n.hasAttribute("class"))&&t.target.getAttribute("class").split(" ").indexOf("handle-w")>-1?this.gridster.$options.dirType===I.RTL?(this.resizeEventScrollType.e=!0,this.directionFunction=this.handleE):(this.resizeEventScrollType.w=!0,this.directionFunction=this.handleW):(null===(i=t.target)||void 0===i?void 0:i.hasAttribute("class"))&&t.target.getAttribute("class").split(" ").indexOf("handle-s")>-1?(this.resizeEventScrollType.s=!0,this.directionFunction=this.handleS):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-e")>-1?this.gridster.$options.dirType===I.RTL?(this.resizeEventScrollType.w=!0,this.directionFunction=this.handleW):(this.resizeEventScrollType.e=!0,this.directionFunction=this.handleE):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-nw")>-1?this.gridster.$options.dirType===I.RTL?(this.resizeEventScrollType.n=!0,this.resizeEventScrollType.e=!0,this.directionFunction=this.handleNE):(this.resizeEventScrollType.n=!0,this.resizeEventScrollType.w=!0,this.directionFunction=this.handleNW):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-ne")>-1?this.gridster.$options.dirType===I.RTL?(this.resizeEventScrollType.n=!0,this.resizeEventScrollType.w=!0,this.directionFunction=this.handleNW):(this.resizeEventScrollType.n=!0,this.resizeEventScrollType.e=!0,this.directionFunction=this.handleNE):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-sw")>-1?this.gridster.$options.dirType===I.RTL?(this.resizeEventScrollType.s=!0,this.resizeEventScrollType.e=!0,this.directionFunction=this.handleSE):(this.resizeEventScrollType.s=!0,this.resizeEventScrollType.w=!0,this.directionFunction=this.handleSW):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-se")>-1&&(this.gridster.$options.dirType===I.RTL?(this.resizeEventScrollType.s=!0,this.resizeEventScrollType.w=!0,this.directionFunction=this.handleSW):(this.resizeEventScrollType.s=!0,this.resizeEventScrollType.e=!0,this.directionFunction=this.handleSE)))}},{key:"dragMove",value:function(t){var e=this;t.stopPropagation(),t.preventDefault(),R.checkTouchEvent(t),this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,B(this.gridster,this.left,this.top,this.width,this.height,t,this.lastMouse,this.directionFunction.bind(this),!0,this.resizeEventScrollType);var n=this.gridster.options.scale||1;this.directionFunction({clientX:this.originalClientX+(t.clientX-this.originalClientX)/n,clientY:this.originalClientY+(t.clientY-this.originalClientY)/n}),this.lastMouse.clientX=t.clientX,this.lastMouse.clientY=t.clientY,this.zone.run((function(){e.gridster.updateGrid()}))}},{key:"dragStop",value:function(t){var e=this;t.stopPropagation(),t.preventDefault(),H(),this.mousemove(),this.mouseup(),this.mouseleave(),this.cancelOnBlur(),this.touchmove(),this.touchend(),this.touchcancel(),this.gridster.dragInProgress=!1,this.gridster.updateGrid(),this.gridster.options.resizable&&this.gridster.options.resizable.stop?Promise.resolve(this.gridster.options.resizable.stop(this.gridsterItem.item,this.gridsterItem,t)).then(this.makeResize.bind(this),this.cancelResize.bind(this)):this.makeResize(),setTimeout((function(){e.gridsterItem.renderer.removeClass(e.gridsterItem.el,"gridster-item-resizing"),e.gridster&&(e.gridster.movingItem=null,e.gridster.previewStyle())}))}},{key:"cancelResize",value:function(){this.gridsterItem.$item.cols=this.gridsterItem.item.cols||1,this.gridsterItem.$item.rows=this.gridsterItem.item.rows||1,this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.gridsterItem.setSize(),this.push.restoreItems(),this.pushResize.restoreItems(),this.push.destroy(),delete this.push,this.pushResize.destroy(),delete this.pushResize}},{key:"makeResize",value:function(){this.gridsterItem.setSize(),this.gridsterItem.checkItemChanges(this.gridsterItem.$item,this.gridsterItem.item),this.push.setPushedItems(),this.pushResize.setPushedItems(),this.push.destroy(),delete this.push,this.pushResize.destroy(),delete this.pushResize}},{key:"handleN",value:function(t){if(this.top=t.clientY+this.offsetTop-this.diffTop,this.height=this.bottom-this.top,this.minHeight>this.height&&(this.height=this.minHeight,this.top=this.bottom-this.minHeight),this.newPosition=this.gridster.pixelsToPositionY(this.top+this.margin,Math.floor),this.gridsterItem.$item.y!==this.newPosition){if(this.itemBackup[1]=this.gridsterItem.$item.y,this.itemBackup[3]=this.gridsterItem.$item.rows,this.gridsterItem.$item.rows+=this.gridsterItem.$item.y-this.newPosition,this.gridsterItem.$item.y=this.newPosition,this.pushResize.pushItems(this.pushResize.fromSouth),this.push.pushItems(this.push.fromSouth,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.y=this.itemBackup[1],this.gridsterItem.$item.rows=this.itemBackup[3],this.setItemTop(this.gridster.positionYToPixels(this.gridsterItem.$item.y)),void this.setItemHeight(this.gridster.positionYToPixels(this.gridsterItem.$item.rows)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemTop(this.top),this.setItemHeight(this.height)}},{key:"handleW",value:function(t){if(this.left=t.clientX+this.offsetLeft-this.diffLeft,this.width=this.right-this.left,this.minWidth>this.width&&(this.width=this.minWidth,this.left=this.right-this.minWidth),this.newPosition=this.gridster.pixelsToPositionX(this.left+this.margin,Math.floor),this.gridsterItem.$item.x!==this.newPosition){if(this.itemBackup[0]=this.gridsterItem.$item.x,this.itemBackup[2]=this.gridsterItem.$item.cols,this.gridsterItem.$item.cols+=this.gridsterItem.$item.x-this.newPosition,this.gridsterItem.$item.x=this.newPosition,this.pushResize.pushItems(this.pushResize.fromEast),this.push.pushItems(this.push.fromEast,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.x=this.itemBackup[0],this.gridsterItem.$item.cols=this.itemBackup[2],this.setItemLeft(this.gridster.positionXToPixels(this.gridsterItem.$item.x)),void this.setItemWidth(this.gridster.positionXToPixels(this.gridsterItem.$item.cols)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemLeft(this.left),this.setItemWidth(this.width)}},{key:"handleS",value:function(t){if(this.height=t.clientY+this.offsetTop-this.diffBottom-this.top,this.minHeight>this.height&&(this.height=this.minHeight),this.bottom=this.top+this.height,this.newPosition=this.gridster.pixelsToPositionY(this.bottom,Math.ceil),this.gridsterItem.$item.y+this.gridsterItem.$item.rows!==this.newPosition){if(this.itemBackup[3]=this.gridsterItem.$item.rows,this.gridsterItem.$item.rows=this.newPosition-this.gridsterItem.$item.y,this.pushResize.pushItems(this.pushResize.fromNorth),this.push.pushItems(this.push.fromNorth,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.rows=this.itemBackup[3],void this.setItemHeight(this.gridster.positionYToPixels(this.gridsterItem.$item.rows)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemHeight(this.height)}},{key:"handleE",value:function(t){if(this.width=t.clientX+this.offsetLeft-this.diffRight-this.left,this.minWidth>this.width&&(this.width=this.minWidth),this.right=this.left+this.width,this.newPosition=this.gridster.pixelsToPositionX(this.right,Math.ceil),this.gridsterItem.$item.x+this.gridsterItem.$item.cols!==this.newPosition){if(this.itemBackup[2]=this.gridsterItem.$item.cols,this.gridsterItem.$item.cols=this.newPosition-this.gridsterItem.$item.x,this.pushResize.pushItems(this.pushResize.fromWest),this.push.pushItems(this.push.fromWest,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.cols=this.itemBackup[2],void this.setItemWidth(this.gridster.positionXToPixels(this.gridsterItem.$item.cols)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemWidth(this.width)}},{key:"handleNW",value:function(t){this.handleN(t),this.handleW(t)}},{key:"handleNE",value:function(t){this.handleN(t),this.handleE(t)}},{key:"handleSW",value:function(t){this.handleS(t),this.handleW(t)}},{key:"handleSE",value:function(t){this.handleS(t),this.handleE(t)}},{key:"toggle",value:function(){this.resizeEnabled=this.gridsterItem.canBeResized()}},{key:"dragStartDelay",value:function(t){var e=this;if(R.checkTouchEvent(t),this.gridster.$options.resizable.delayStart)var n=setTimeout((function(){e.dragStart(t),u()}),this.gridster.$options.resizable.delayStart),i=this.gridsterItem.renderer.listen("document","mouseup",u),r=this.gridsterItem.renderer.listen("document","mouseleave",u),o=this.gridsterItem.renderer.listen("window","blur",u),a=this.gridsterItem.renderer.listen("document","touchmove",(function(e){R.checkTouchEvent(e),(Math.abs(e.clientX-t.clientX)>9||Math.abs(e.clientY-t.clientY)>9)&&u()})),s=this.gridsterItem.renderer.listen("document","touchend",u),c=this.gridsterItem.renderer.listen("document","touchcancel",u);else this.dragStart(t);function u(){clearTimeout(n),o(),i(),r(),a(),s(),c()}}},{key:"setItemTop",value:function(t){this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,this.left,t)}},{key:"setItemLeft",value:function(t){this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,t,this.top)}},{key:"setItemHeight",value:function(t){this.gridsterItem.renderer.setStyle(this.gridsterItem.el,"height",t+"px")}},{key:"setItemWidth",value:function(t){this.gridsterItem.renderer.setStyle(this.gridsterItem.el,"width",t+"px")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Yb(U),i.Yb(E),i.Yb(i.B))},t.\u0275prov=i.Kb({token:t,factory:t.\u0275fac}),t}(),tt=function(){var t=function(){function t(e,n,i,r){C(this,t),this.renderer=i,this.zone=r,this.el=e.nativeElement,this.$item={cols:-1,rows:-1,x:-1,y:-1},this.gridster=n,this.drag=new Z(this,n,this.zone),this.resize=new J(this,n,this.zone)}return w(t,[{key:"ngOnInit",value:function(){this.gridster.addItem(this)}},{key:"ngOnChanges",value:function(t){t.item&&(this.updateOptions(),this.init||this.gridster.calculateLayoutDebounce())}},{key:"updateOptions",value:function(){this.$item=R.merge(this.$item,this.item,{cols:void 0,rows:void 0,x:void 0,y:void 0,layerIndex:void 0,dragEnabled:void 0,resizeEnabled:void 0,compactEnabled:void 0,maxItemRows:void 0,minItemRows:void 0,maxItemCols:void 0,minItemCols:void 0,maxItemArea:void 0,minItemArea:void 0})}},{key:"ngOnDestroy",value:function(){this.gridster.removeItem(this),delete this.gridster,this.drag.destroy(),delete this.drag,this.resize.destroy(),delete this.resize}},{key:"setSize",value:function(){this.renderer.setStyle(this.el,"display",this.notPlaced?"":"block"),this.gridster.gridRenderer.updateItem(this.el,this.$item,this.renderer),this.updateItemSize()}},{key:"updateItemSize",value:function(){var t=this.$item.x*this.gridster.curColWidth,e=this.$item.cols*this.gridster.curColWidth-this.gridster.$options.margin,n=this.$item.rows*this.gridster.curRowHeight-this.gridster.$options.margin;this.top=this.$item.y*this.gridster.curRowHeight,this.left=t,!this.init&&e>0&&n>0&&(this.init=!0,this.item.initCallback&&this.item.initCallback(this.item,this),this.gridster.options.itemInitCallback&&this.gridster.options.itemInitCallback(this.item,this),this.gridster.$options.scrollToNewItems&&this.el.scrollIntoView(!1)),e===this.width&&n===this.height||(this.width=e,this.height=n,this.gridster.options.itemResizeCallback&&this.gridster.options.itemResizeCallback(this.item,this))}},{key:"itemChanged",value:function(){this.gridster.options.itemChangeCallback&&this.gridster.options.itemChangeCallback(this.item,this)}},{key:"checkItemChanges",value:function(t,e){t.rows===e.rows&&t.cols===e.cols&&t.x===e.x&&t.y===e.y||(this.gridster.checkCollision(this.$item)?(this.$item.x=e.x||0,this.$item.y=e.y||0,this.$item.cols=e.cols||1,this.$item.rows=e.rows||1,this.setSize()):(this.item.cols=this.$item.cols,this.item.rows=this.$item.rows,this.item.x=this.$item.x,this.item.y=this.$item.y,this.gridster.calculateLayoutDebounce(),this.itemChanged()))}},{key:"canBeDragged",value:function(){return!this.gridster.mobile&&(void 0===this.$item.dragEnabled?this.gridster.$options.draggable.enabled:this.$item.dragEnabled)}},{key:"canBeResized",value:function(){return!this.gridster.mobile&&(void 0===this.$item.resizeEnabled?this.gridster.$options.resizable.enabled:this.$item.resizeEnabled)}},{key:"bringToFront",value:function(t){if(!(t&&t<=0)){var e=this.getLayerIndex(),n=this.gridster.$options.maxLayerIndex;if(en?n:i}}}},{key:"sendToBack",value:function(t){if(!(t&&t<=0)){var e=this.getLayerIndex();if(e>0){var n=t?e-t:0;this.item.layerIndex=this.$item.layerIndex=n<0?0:n}}}},{key:"getLayerIndex",value:function(){return void 0!==this.item.layerIndex?this.item.layerIndex:void 0!==this.gridster.$options.defaultLayerIndex?this.gridster.$options.defaultLayerIndex:0}},{key:"zIndex",get:function(){return this.getLayerIndex()+this.gridster.$options.baseLayerIndex}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.l),i.Ob(N),i.Ob(i.G),i.Ob(i.B))},t.\u0275cmp=i.Ib({type:t,selectors:[["gridster-item"]],hostVars:2,hostBindings:function(t,e){2&t&&i.Lc("z-index",e.zIndex)},inputs:{item:"item"},features:[i.Ab],ngContentSelectors:s,decls:9,vars:8,consts:[["class","gridster-item-resizable-handler handle-s",3,"mousedown","touchstart",4,"ngIf"],["class","gridster-item-resizable-handler handle-e",3,"mousedown","touchstart",4,"ngIf"],["class","gridster-item-resizable-handler handle-n",3,"mousedown","touchstart",4,"ngIf"],["class","gridster-item-resizable-handler handle-w",3,"mousedown","touchstart",4,"ngIf"],["class","gridster-item-resizable-handler handle-se",3,"mousedown","touchstart",4,"ngIf"],["class","gridster-item-resizable-handler handle-ne",3,"mousedown","touchstart",4,"ngIf"],["class","gridster-item-resizable-handler handle-sw",3,"mousedown","touchstart",4,"ngIf"],["class","gridster-item-resizable-handler handle-nw",3,"mousedown","touchstart",4,"ngIf"],[1,"gridster-item-resizable-handler","handle-s",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-e",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-n",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-w",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-se",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-ne",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-sw",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-nw",3,"mousedown","touchstart"]],template:function(t,e){1&t&&(i.lc(),i.kc(0),i.Oc(1,c,1,0,"div",0),i.Oc(2,u,1,0,"div",1),i.Oc(3,l,1,0,"div",2),i.Oc(4,d,1,0,"div",3),i.Oc(5,h,1,0,"div",4),i.Oc(6,f,1,0,"div",5),i.Oc(7,p,1,0,"div",6),i.Oc(8,b,1,0,"div",7)),2&t&&(i.Cb(1),i.mc("ngIf",e.gridster.$options.resizable.handles.s&&e.resize.resizeEnabled),i.Cb(1),i.mc("ngIf",e.gridster.$options.resizable.handles.e&&e.resize.resizeEnabled),i.Cb(1),i.mc("ngIf",e.gridster.$options.resizable.handles.n&&e.resize.resizeEnabled),i.Cb(1),i.mc("ngIf",e.gridster.$options.resizable.handles.w&&e.resize.resizeEnabled),i.Cb(1),i.mc("ngIf",e.gridster.$options.resizable.handles.se&&e.resize.resizeEnabled),i.Cb(1),i.mc("ngIf",e.gridster.$options.resizable.handles.ne&&e.resize.resizeEnabled),i.Cb(1),i.mc("ngIf",e.gridster.$options.resizable.handles.sw&&e.resize.resizeEnabled),i.Cb(1),i.mc("ngIf",e.gridster.$options.resizable.handles.nw&&e.resize.resizeEnabled))},directives:[r.n],styles:["gridster-item{-ms-user-select:text;-webkit-user-select:text;background:#fff;box-sizing:border-box;display:none;overflow:hidden;position:absolute;transition:.3s;user-select:text;z-index:1}gridster-item.gridster-item-moving{cursor:move}gridster-item.gridster-item-moving,gridster-item.gridster-item-resizing{box-shadow:0 0 5px 5px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);transition:0s;z-index:2}.gridster-item-resizable-handler{position:absolute;z-index:2}.gridster-item-resizable-handler.handle-n{cursor:ns-resize;height:10px;left:0;right:0;top:0}.gridster-item-resizable-handler.handle-e{bottom:0;cursor:ew-resize;right:0;top:0;width:10px}.gridster-item-resizable-handler.handle-s{bottom:0;cursor:ns-resize;height:10px;left:0;right:0}.gridster-item-resizable-handler.handle-w{bottom:0;cursor:ew-resize;left:0;top:0;width:10px}.gridster-item-resizable-handler.handle-ne{cursor:ne-resize;height:10px;right:0;top:0;width:10px}.gridster-item-resizable-handler.handle-nw{cursor:nw-resize;height:10px;left:0;top:0;width:10px}.gridster-item-resizable-handler.handle-se{border-color:rgba(0,0,0,0);border-style:solid;border-width:0 0 10px 10px;bottom:0;cursor:se-resize;height:0;right:0;width:0}.gridster-item-resizable-handler.handle-sw{bottom:0;cursor:sw-resize;height:10px;left:0;width:10px}gridster-item:hover .gridster-item-resizable-handler.handle-se{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #ccc}"],encapsulation:2}),t}(),et=function(){var t=function(){function t(e,n,i){C(this,t),this.renderer=i,this.el=e.nativeElement,this.gridster=n,this.gridster.previewStyle=this.previewStyle.bind(this)}return w(t,[{key:"ngOnDestroy",value:function(){delete this.el,delete this.gridster.previewStyle,delete this.gridster}},{key:"previewStyle",value:function(t){this.gridster.movingItem?(this.gridster.compact&&t&&this.gridster.compact.checkCompactItem(this.gridster.movingItem),this.renderer.setStyle(this.el,"display","block"),this.gridster.gridRenderer.updateItem(this.el,this.gridster.movingItem,this.renderer)):this.renderer.setStyle(this.el,"display","")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.l),i.Ob(N),i.Ob(i.G))},t.\u0275cmp=i.Ib({type:t,selectors:[["gridster-preview"]],decls:0,vars:0,template:function(t,e){},styles:["gridster-preview{background:rgba(0,0,0,.15);display:none;position:absolute}"],encapsulation:2}),t}(),nt=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},imports:[[r.c]]}),t}()},lx5p:function(t,e,n){"use strict";n.d(e,"n",(function(){return r})),n.d(e,"p",(function(){return o})),n.d(e,"m",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"G",(function(){return u})),n.d(e,"F",(function(){return l})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return h})),n.d(e,"j",(function(){return b})),n.d(e,"J",(function(){return g})),n.d(e,"s",(function(){return v})),n.d(e,"Q",(function(){return y})),n.d(e,"M",(function(){return _})),n.d(e,"d",(function(){return O})),n.d(e,"i",(function(){return k})),n.d(e,"g",(function(){return w})),n.d(e,"u",(function(){return C})),n.d(e,"v",(function(){return T})),n.d(e,"y",(function(){return S})),n.d(e,"x",(function(){return E})),n.d(e,"w",(function(){return x})),n.d(e,"r",(function(){return P})),n.d(e,"q",(function(){return A})),n.d(e,"P",(function(){return I})),n.d(e,"O",(function(){return M})),n.d(e,"A",(function(){return D})),n.d(e,"z",(function(){return R})),n.d(e,"a",(function(){return L})),n.d(e,"k",(function(){return N})),n.d(e,"t",(function(){return U})),n.d(e,"h",(function(){return F})),n.d(e,"N",(function(){return B})),n.d(e,"o",(function(){return z})),n.d(e,"D",(function(){return V})),n.d(e,"I",(function(){return H})),n.d(e,"H",(function(){return q})),n.d(e,"e",(function(){return $})),n.d(e,"L",(function(){return Q})),n.d(e,"C",(function(){return W})),n.d(e,"B",(function(){return G})),n.d(e,"f",(function(){return K})),n.d(e,"E",(function(){return j})),n.d(e,"K",(function(){return Z}));var i=n("VmIW");function r(t){return function(e){return e===t}}function o(t){return function(e){return e!==t}}function a(t){return function(t){return null!=t}(t)}n("og7C"),n("D57K");var s=function(t){return function(){return t}};function c(t){return function(e){return function(n){return t(n,e)}}}function u(t){return function(e){var n=m(e,2),i=n[0],r=n[1];return t(i,r)}}function l(t){return function(e){return e[t]}}var d=l(0);function h(t,e){return function(n){return t?e(n):n}}var b=function(t){return t},g=function(t,e){return e};function v(t){return t.toLowerCase()}function y(t){return t.toUpperCase()}function _(t){return t.trim()}function O(t,e){return t-e}function k(t,e){return e-t}function w(t,e){return function(n,i){return e(t(n),t(i))}}function C(t,e){return i.Maybe.fromUndefined(t.find(e))}function T(t,e){var n,r=0,o=p(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(e(a,r++))return Object(i.Some)(a)}}catch(s){o.e(s)}finally{o.f()}return Object(i.None)()}function S(t,e){return i.Maybe.fromNull(t.exec(e))}function E(t,e){try{return Object(i.Some)(JSON.parse(t))}catch(n){return e&&console[e](n),Object(i.None)()}}function x(t,e){return t.flatMap((function(t){return e.map((function(e){return[t,e]}))}))}function P(t){return t.isSome()}function A(t){return t.isNone()}function I(t){return t.some()}function M(t){return t.orUndefined()}function D(t,e){var n=!1,i=Object.entries(e).map((function(e){var i=m(e,2),r=i[0],o=i[1],a=t(o,r);return o!==a&&(n=!0),[r,a]}));return n?Object.fromEntries(i):e}function R(t,e){return function(n){return Object.assign(Object.assign({},n),f({},t,e(n[t])))}}function j(){for(var t=arguments.length,e=new Array(t),n=0;ne},U=function(t,e){return t=e})),c(U),c((function(t,e){return t<=e})),u(U)),z=(u(U),u(N),u(N),function(t){return t<0}),V=function(t){return 0!==t};function H(t){if(1e-5===t)return function(t){return Math.round(1e5*t)/1e5};var e=1/t;return function(t){return Math.round(t*e)/e}}function q(t){if(0===t)return Math.round;var e=Math.pow(10,t);return function(t){return Math.round(t*e)/e}}function $(t,e){return j(function(t){return function(e){return Math.max(t,e)}}(t),function(t){return function(e){return Math.min(t,e)}}(e))}function Q(t){return function(e,n){return e+t(n)}}function W(t){return function(e,n){return Math.min(e,t(n))}}function G(t){return function(e,n){return Math.max(e,t(n))}}function Y(t){return Array.isArray(t)?{min:t[0],max:t[1]}:t}function K(t,e){var n=Y(t),i=Y(e),r=(i.max-i.min)/(n.max-n.min);return function(t){return i.min+(t-n.min)*r}}function Z(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return function(n){if(e<1)throw new Error("`maxChunks` must be greater than 1.");var i=[],r=0,o=0;if("string"==typeof t){if(t.length<1&&e===1/0)throw new Error("String patterns (without `maxChunks`) must be longer than 1 character.");for(var a=-1;-1!==(a=n.indexOf(t,o))&&++r=0&&l[y].codewords.length!==v;)y--;y++;var _=v-o.getECCodewordsPerBlock(),O=0;for(b=0;b<_;b++)for(var k=0;k [_ngcontent-%COMP%]:first-of-type{margin-bottom:var(--spacing-s)}.progress-cell[_ngcontent-%COMP%]{text-align:right;flex:0.75}.progress-cell[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-of-type{margin-bottom:var(--spacing-s)}@media (max-width:1024px){.details[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),t}()},mW0F:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this)).parent=t,o.outerValue=i,o.outerIndex=r,o.index=0,o}return w(n,[{key:"_next",value:function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}},{key:"_error",value:function(t){this.parent.notifyError(t,this),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(this),this.unsubscribe()}}]),n}(n("5uGe").a),r=n("1MAX"),o=n("IdLP");function s(t,e,n,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new i(t,n,a);if(!s.closed)return e instanceof o.a?e.subscribe(s):Object(r.a)(e)(s)}},mWJl:function(t,e,n){},mWib:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("5uGe"),r=n("Efrr");function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.a;return function(n){return n.lift(new s(t,e))}}var s=function(){function t(e,n){C(this,t),this.dueTime=e,this.scheduler=n}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new u(t,this.dueTime,this.scheduler))}}]),t}(),u=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,t)).dueTime=i,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return w(n,[{key:"_next",value:function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(l,this.dueTime,this))}},{key:"_complete",value:function(){this.debouncedNext(),this.destination.complete()}},{key:"debouncedNext",value:function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}},{key:"clearDebounce",value:function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}]),n}(i.a);function l(t){t.debouncedNext()}},mawV:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("3lSR");function r(){return Object(i.a)(1)}},mcff:function(t,e,n){"use strict";n.d(e,"a",(function(){return I})),n.d(e,"b",(function(){return L})),n.d(e,"c",(function(){return N})),n.d(e,"d",(function(){return P}));var i=n("5GZx"),r=n("ZtZA"),o=n("kZht"),s=n("pTnX"),u=n("vE5V"),l=n("An66"),d=n("ZTXN"),h=n("i9xl"),f=n("ROBh"),p=n("xVbo"),b=n("J+dc"),g=n("jIqt"),m=n("jL3B"),v=n("+6xv"),y=n("Hq54");function _(t,e){}var O=function t(){C(this,t),this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0},k={dialogContainer:Object(v.n)("dialogContainer",[Object(v.k)("void, exit",Object(v.l)({opacity:0,transform:"scale(0.7)"})),Object(v.k)("enter",Object(v.l)({transform:"none"})),Object(v.m)("* => enter",Object(v.e)("150ms cubic-bezier(0, 0, 0.2, 1)",Object(v.l)({transform:"none",opacity:1}))),Object(v.m)("* => void, * => exit",Object(v.e)("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",Object(v.l)({opacity:0})))])},T=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,a,s,c){var u;return C(this,n),(u=e.call(this))._elementRef=t,u._focusTrapFactory=i,u._changeDetectorRef=r,u._config=s,u._focusMonitor=c,u._animationStateChanged=new o.o,u._elementFocusedBeforeDialogWasOpened=null,u._closeInteractionType=null,u.attachDomPortal=function(t){return u._portalOutlet.hasAttached(),u._portalOutlet.attachDomPortal(t)},u._ariaLabelledBy=s.ariaLabelledBy||null,u._document=a,u}return w(n,[{key:"_initializeWithAttachedContent",value:function(){this._setupFocusTrap(),this._capturePreviouslyFocusedElement(),this._focusDialogContainer()}},{key:"attachComponentPortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachTemplatePortal(t)}},{key:"_recaptureFocus",value:function(){this._containsFocus()||(!this._config.autoFocus||!this._focusTrap.focusInitialElement())&&this._elementRef.nativeElement.focus()}},{key:"_trapFocus",value:function(){this._config.autoFocus?this._focusTrap.focusInitialElementWhenReady():this._containsFocus()||this._elementRef.nativeElement.focus()}},{key:"_restoreFocus",value:function(){var t=this._elementFocusedBeforeDialogWasOpened;if(this._config.restoreFocus&&t&&"function"==typeof t.focus){var e=this._document.activeElement,n=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==n&&!n.contains(e)||(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}},{key:"_setupFocusTrap",value:function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)}},{key:"_capturePreviouslyFocusedElement",value:function(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement)}},{key:"_focusDialogContainer",value:function(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}},{key:"_containsFocus",value:function(){var t=this._elementRef.nativeElement,e=this._document.activeElement;return t===e||t.contains(e)}}]),n}(r.a);return t.\u0275fac=function(e){return new(e||t)(o.Ob(o.l),o.Ob(m.i),o.Ob(o.h),o.Ob(l.d,8),o.Ob(O),o.Ob(m.h))},t.\u0275dir=o.Jb({type:t,viewQuery:function(t,e){var n;1&t&&o.Jc(r.c,!0),2&t&&o.zc(n=o.cc())&&(e._portalOutlet=n.first)},features:[o.zb]}),t}(),S=function(){var t=function(t){a(n,t);var e=c(n);function n(){var t;return C(this,n),(t=e.apply(this,arguments))._state="enter",t}return w(n,[{key:"_onAnimationDone",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?(this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:n})):"exit"===e&&(this._restoreFocus(),this._animationStateChanged.next({state:"closed",totalTime:n}))}},{key:"_onAnimationStart",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?this._animationStateChanged.next({state:"opening",totalTime:n}):"exit"!==e&&"void"!==e||this._animationStateChanged.next({state:"closing",totalTime:n})}},{key:"_startExitAnimation",value:function(){this._state="exit",this._changeDetectorRef.markForCheck()}}]),n}(T);return t.\u0275fac=function(e){return E(e||t)},t.\u0275cmp=o.Ib({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(t,e){1&t&&o.Mc("@dialogContainer.start",(function(t){return e._onAnimationStart(t)}))("@dialogContainer.done",(function(t){return e._onAnimationDone(t)})),2&t&&(o.Xb("id",e._id),o.Db("role",e._config.role)("aria-labelledby",e._config.ariaLabel?null:e._ariaLabelledBy)("aria-label",e._config.ariaLabel)("aria-describedby",e._config.ariaDescribedBy||null),o.Nc("@dialogContainer",e._state))},features:[o.zb],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&o.Oc(0,_,0,0,"ng-template",0)},directives:[r.c],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[k.dialogContainer]}}),t}(),E=o.Wb(S),x=0,P=function(){function t(e,n){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mat-dialog-"+x++;C(this,t),this._overlayRef=e,this._containerInstance=n,this.id=r,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new d.b,this._afterClosed=new d.b,this._beforeClosed=new d.b,this._state=0,n._id=r,n._animationStateChanged.pipe(Object(p.a)((function(t){return"opened"===t.state})),Object(b.a)(1)).subscribe((function(){i._afterOpened.next(),i._afterOpened.complete()})),n._animationStateChanged.pipe(Object(p.a)((function(t){return"closed"===t.state})),Object(b.a)(1)).subscribe((function(){clearTimeout(i._closeFallbackTimeout),i._finishDialogClose()})),e.detachments().subscribe((function(){i._beforeClosed.next(i._result),i._beforeClosed.complete(),i._afterClosed.next(i._result),i._afterClosed.complete(),i.componentInstance=null,i._overlayRef.dispose()})),e.keydownEvents().pipe(Object(p.a)((function(t){return t.keyCode===y.f&&!i.disableClose&&!Object(y.r)(t)}))).subscribe((function(t){t.preventDefault(),A(i,"keyboard")})),e.backdropClick().subscribe((function(){i.disableClose?i._containerInstance._recaptureFocus():A(i,"mouse")}))}return w(t,[{key:"close",value:function(t){var e=this;this._result=t,this._containerInstance._animationStateChanged.pipe(Object(p.a)((function(t){return"closing"===t.state})),Object(b.a)(1)).subscribe((function(n){e._beforeClosed.next(t),e._beforeClosed.complete(),e._overlayRef.detachBackdrop(),e._closeFallbackTimeout=setTimeout((function(){return e._finishDialogClose()}),n.totalTime+100)})),this._state=1,this._containerInstance._startExitAnimation()}},{key:"afterOpened",value:function(){return this._afterOpened}},{key:"afterClosed",value:function(){return this._afterClosed}},{key:"beforeClosed",value:function(){return this._beforeClosed}},{key:"backdropClick",value:function(){return this._overlayRef.backdropClick()}},{key:"keydownEvents",value:function(){return this._overlayRef.keydownEvents()}},{key:"updatePosition",value:function(t){var e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this}},{key:"updateSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this._getPositionStrategy().width(t).height(e),this._overlayRef.updatePosition(),this}},{key:"addPanelClass",value:function(t){return this._overlayRef.addPanelClass(t),this}},{key:"removePanelClass",value:function(t){return this._overlayRef.removePanelClass(t),this}},{key:"getState",value:function(){return this._state}},{key:"_finishDialogClose",value:function(){this._state=2,this._overlayRef.dispose()}},{key:"_getPositionStrategy",value:function(){return this._overlayRef.getConfig().positionStrategy}}]),t}();function A(t,e,n){return void 0!==t._containerInstance&&(t._containerInstance._closeInteractionType=e),t.close(n)}var I=new o.s("MatDialogData"),M=new o.s("mat-dialog-default-options"),D=new o.s("mat-dialog-scroll-strategy"),R={provide:D,deps:[i.c],useFactory:function(t){return function(){return t.scrollStrategies.block()}}},j=function(){var t=function(){function t(e,n,i,r,o,a,s,c,u){var l=this;C(this,t),this._overlay=e,this._injector=n,this._defaultOptions=i,this._parentDialog=r,this._overlayContainer=o,this._dialogRefConstructor=s,this._dialogContainerType=c,this._dialogDataToken=u,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new d.b,this._afterOpenedAtThisLevel=new d.b,this._ariaHiddenElements=new Map,this.afterAllClosed=Object(h.a)((function(){return l.openDialogs.length?l._getAfterAllClosed():l._getAfterAllClosed().pipe(Object(g.a)(void 0))})),this._scrollStrategy=a}return w(t,[{key:"_getAfterAllClosed",value:function(){var t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}},{key:"open",value:function(t,e){var n=this;(e=function(t,e){return Object.assign(Object.assign({},e),t)}(e,this._defaultOptions||new O)).id&&this.getDialogById(e.id);var i=this._createOverlay(e),r=this._attachDialogContainer(i,e),o=this._attachDialogContent(t,r,i,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(o),o.afterClosed().subscribe((function(){return n._removeOpenDialog(o)})),this.afterOpened.next(o),r._initializeWithAttachedContent(),o}},{key:"closeAll",value:function(){this._closeDialogs(this.openDialogs)}},{key:"getDialogById",value:function(t){return this.openDialogs.find((function(e){return e.id===t}))}},{key:"ngOnDestroy",value:function(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}},{key:"_createOverlay",value:function(t){var e=this._getOverlayConfig(t);return this._overlay.create(e)}},{key:"_getOverlayConfig",value:function(t){var e=new i.d({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}},{key:"_attachDialogContainer",value:function(t,e){var n=o.t.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:O,useValue:e}]}),i=new r.d(this._dialogContainerType,e.viewContainerRef,n,e.componentFactoryResolver);return t.attach(i).instance}},{key:"_attachDialogContent",value:function(t,e,n,i){var a=new this._dialogRefConstructor(n,e,i.id);if(t instanceof o.N)e.attachTemplatePortal(new r.h(t,null,{$implicit:i.data,dialogRef:a}));else{var s=this._createInjector(i,a,e),c=e.attachComponentPortal(new r.d(t,i.viewContainerRef,s));a.componentInstance=c.instance}return a.updateSize(i.width,i.height).updatePosition(i.position),a}},{key:"_createInjector",value:function(t,e,n){var i=t&&t.viewContainerRef&&t.viewContainerRef.injector,r=[{provide:this._dialogContainerType,useValue:n},{provide:this._dialogDataToken,useValue:t.data},{provide:this._dialogRefConstructor,useValue:e}];return!t.direction||i&&i.get(u.b,null)||r.push({provide:u.b,useValue:{value:t.direction,change:Object(f.a)()}}),o.t.create({parent:i||this._injector,providers:r})}},{key:"_removeOpenDialog",value:function(t){var e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((function(t,e){t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")})),this._ariaHiddenElements.clear(),this._getAfterAllClosed().next()))}},{key:"_hideNonDialogContentFromAssistiveTechnology",value:function(){var t=this._overlayContainer.getContainerElement();if(t.parentElement)for(var e=t.parentElement.children,n=e.length-1;n>-1;n--){var i=e[n];i===t||"SCRIPT"===i.nodeName||"STYLE"===i.nodeName||i.hasAttribute("aria-live")||(this._ariaHiddenElements.set(i,i.getAttribute("aria-hidden")),i.setAttribute("aria-hidden","true"))}}},{key:"_closeDialogs",value:function(t){for(var e=t.length;e--;)t[e].close()}},{key:"openDialogs",get:function(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}},{key:"afterOpened",get:function(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Ob(i.c),o.Ob(o.t),o.Ob(void 0),o.Ob(void 0),o.Ob(i.e),o.Ob(void 0),o.Ob(o.P),o.Ob(o.P),o.Ob(o.s))},t.\u0275dir=o.Jb({type:t}),t}(),L=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a,s,c){return C(this,n),e.call(this,t,i,o,s,c,a,P,S,I)}return n}(j);return t.\u0275fac=function(e){return new(e||t)(o.Yb(i.c),o.Yb(o.t),o.Yb(l.j,8),o.Yb(M,8),o.Yb(D),o.Yb(t,12),o.Yb(i.e))},t.\u0275prov=o.Kb({token:t,factory:t.\u0275fac}),t}(),N=function(){var t=function t(){C(this,t)};return t.\u0275mod=o.Mb({type:t}),t.\u0275inj=o.Lb({factory:function(e){return new(e||t)},providers:[L,R],imports:[[i.f,r.g,s.j],s.j]}),t}()},mlVJ:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r}));var i=/XBT/g,r=/BTC/g},n5Bc:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("uwQt");e.default=function(t){function e(e,n,i){var r=t.call(this,e,n)||this;return r.count=0,r.finderPattern=i,r}return r(e,t),e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(o.default)},n5WT:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),n("4Pxi");var o=n("ZCEf"),a=n("KFdt"),s=n("xSUO"),c=n("Qkwj"),u=n("iiuT"),l=n("PdLq"),d=n("LqyJ"),h=n("nB6u"),f=n("sPys");e.default=function(t){function e(){var n=t.call(this)||this;n.decodeRowStringBuffer="",n.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map((function(t){return t.slice()}));for(var i=10;i<20;i++){for(var r=e.L_PATTERNS[i-10],o=new Array(r.length),a=0;a=0&&(n=t.isRange(a,o,!1))}return i},e.prototype.decodeRow=function(t,n,i){var r=e.findStartGuardPattern(n),u=null==i?null:i.get(o.default.NEED_RESULT_POINT_CALLBACK);if(null!=u){var p=new c.default((r[0]+r[1])/2,t);u.foundPossibleResultPoint(p)}var b=this.decodeMiddle(n,r,this.decodeRowStringBuffer),g=b.rowOffset,m=b.resultString;if(null!=u){var v=new c.default(g,t);u.foundPossibleResultPoint(v)}var y=e.decodeEnd(n,g);if(null!=u){var _=new c.default((y[0]+y[1])/2,t);u.foundPossibleResultPoint(_)}var O=y[1],k=O+(O-y[0]);if(k>=n.getSize()||!n.isRange(O,k,!1))throw new d.default;var w=m.toString();if(w.length<8)throw new h.default;if(!e.checkChecksum(w))throw new f.default;var C=(r[1]+r[0])/2,T=(y[1]+y[0])/2,S=this.getBarcodeFormat(),E=[new c.default(C,t),new c.default(T,t)],x=new a.default(w,null,0,E,S,(new Date).getTime()),P=0;try{var A=l.default.decodeRow(t,n,y[1]);x.putMetadata(s.default.UPC_EAN_EXTENSION,A.getText()),x.putAllMetadata(A.getResultMetadata()),x.addResultPoints(A.getResultPoints()),P=A.getText().length}catch(R){}var I=null==i?null:i.get(o.default.ALLOWED_EAN_EXTENSIONS);if(null!=I){var M=!1;for(var D in I)if(P.toString()===D){M=!0;break}if(!M)throw new d.default}return x},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var n=t.length;if(0===n)return!1;var i=parseInt(t.charAt(n-1),10);return e.getStandardUPCEANChecksum(t.substring(0,n-1))===i},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,n=0,i=e-1;i>=0;i-=2){if((r=t.charAt(i).charCodeAt(0)-"0".charCodeAt(0))<0||r>9)throw new h.default;n+=r}for(n*=3,i=e-2;i>=0;i-=2){var r;if((r=t.charAt(i).charCodeAt(0)-"0".charCodeAt(0))<0||r>9)throw new h.default;n+=r}return(1e3-n)%10},e.decodeEnd=function(t,n){return e.findGuardPattern(t,n,!1,e.START_END_PATTERN,new Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPattern=function(t,n,i,r,o){for(var a=t.getSize(),s=0,c=n=i?t.getNextUnset(n):t.getNextSet(n),l=r.length,h=i,f=n;f=0)return a;throw new d.default},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=[1,1,1],e.MIDDLE_PATTERN=[1,1,1,1,1],e.END_PATTERN=[1,1,1,1,1,1],e.L_PATTERNS=[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],e}(u.default)},nB6u:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("w6/c");e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.default)},nVws:function(t,e,n){"use strict";n.d(e,"a",(function(){return W}));var i=n("D57K"),r=n("gxtV"),o=n("zqNl"),a=n("KQpv"),s=n.n(a),c=n("YtkY"),u=n("uJYd"),l=n("sXtk"),d=n("ylpo"),h=n("rxqU"),f=n("Rjzq"),p=n("NloN"),b=n("vYTc"),g=n("9baa"),m=n("qAYy"),v=n("+Px6"),y=n("kZht"),_=n("F6wS"),O=n("TMzY"),k=n("An66"),T=n("yvKM"),S=n("4hXt"),E=n("ebJJ"),x=n("fa4l"),P=n("6neU"),A=n("cqWG"),I=n("7J2L"),M=n("aDqW");function D(t,e){if(1&t){var n=y.Vb();y.Sb(0),y.Ub(1,"basic-order-form",13),y.bc("refreshOptions",(function(){return y.Ec(n),y.fc(4).refreshSavedOptions()})),y.Tb(),y.Rb()}if(2&t){var i=y.fc(2).ngIf,r=y.fc(2);y.Cb(1),y.mc("side",r.orderSide)("options",r.options)("basicOrderType",r.orderType)("indexPrice",i.indexPrice)}}function R(t,e){if(1&t){var n=y.Vb();y.Sb(0),y.Ub(1,"trigger-order-form",14),y.bc("refreshOptions",(function(){return y.Ec(n),y.fc(4).refreshSavedOptions()})),y.Tb(),y.Rb()}if(2&t){var i=y.fc(4);y.Cb(1),y.mc("side",i.orderSide)("triggerType","stop")("options",i.options)}}function j(t,e){if(1&t){var n=y.Vb();y.Sb(0),y.Ub(1,"trigger-order-form",14),y.bc("refreshOptions",(function(){return y.Ec(n),y.fc(4).refreshSavedOptions()})),y.Tb(),y.Rb()}if(2&t){var i=y.fc(4);y.Cb(1),y.mc("side",i.orderSide)("triggerType","take_profit")("options",i.options)}}function L(t,e){if(1&t){var n=y.Vb();y.Sb(0),y.Ub(1,"trigger-order-form",14),y.bc("refreshOptions",(function(){return y.Ec(n),y.fc(4).refreshSavedOptions()})),y.Tb(),y.Rb()}if(2&t){var i=y.fc(4);y.Cb(1),y.mc("side",i.orderSide)("triggerType","trigger_entry")("options",i.options)}}function N(t,e){1&t&&(y.Sb(0),y.Pb(1,"bracket-order-form"),y.Rb())}function U(t,e){if(1&t&&(y.Sb(0,11),y.Oc(1,D,2,4,"ng-container",12),y.Oc(2,R,2,3,"ng-container",12),y.Oc(3,j,2,3,"ng-container",12),y.Oc(4,L,2,3,"ng-container",12),y.Oc(5,N,2,0,"ng-container",12),y.Rb()),2&t){var n=y.fc(3);y.mc("ngSwitch",n.orderType),y.Cb(1),y.mc("ngSwitchCase","limit"===n.orderType||"market"===n.orderType?n.orderType:""),y.Cb(1),y.mc("ngSwitchCase","stop"),y.Cb(1),y.mc("ngSwitchCase","take_profit"),y.Cb(1),y.mc("ngSwitchCase","trigger_entry"),y.Cb(1),y.mc("ngSwitchCase","bracket")}}function F(t,e){if(1&t){var n=y.Vb();y.Ub(0,"mat-card-content"),y.Ub(1,"div",5),y.Ub(2,"mat-button-toggle-group",6),y.Ub(3,"mat-button-toggle",7),y.bc("click",(function(){return y.Ec(n),y.fc(2).changeSide("buy")})),y.Qc(4),y.gc(5,"translate"),y.gc(6,"translate"),y.Tb(),y.Ub(7,"mat-button-toggle",8),y.bc("click",(function(){return y.Ec(n),y.fc(2).changeSide("sell")})),y.Qc(8),y.gc(9,"translate"),y.gc(10,"translate"),y.Tb(),y.Tb(),y.Ub(11,"order-type-toggle",9),y.bc("changeOrderType",(function(t){return y.Ec(n),y.fc(2).changeOrderType(t)}))("openCalculator",(function(){y.Ec(n);var t=e.ngIf;return y.fc(2).openCalculatorDialog(t.selectedTicker)})),y.Tb(),y.Tb(),y.Oc(12,U,6,6,"ng-container",10),y.Tb()}if(2&t){var i=e.ngIf,r=y.fc(2),o=y.Ac(6);y.Cb(2),y.mc("value",r.orderSide),y.Cb(2),y.Tc(" ",y.hc(5,10,"BUTTON.BUY")," | ",y.hc(6,12,"BUTTON.LONG")," "),y.Cb(4),y.Tc(" ",y.hc(9,14,"BUTTON.SELL")," | ",y.hc(10,16,"BUTTON.SHORT")," "),y.Cb(3),y.mc("orderType",r.orderType)("displayTooltips",i.displayTooltips)("isFlexMarket",i.isFlexMarket),y.Cb(1),y.mc("ngIf",i.selectedTicker)("ngIfElse",o)}}var B=function(t,e,n,i){return{displayTooltips:t,selectedTicker:e,isFlexMarket:n,indexPrice:i}};function z(t,e){if(1&t&&(y.Sb(0),y.Oc(1,F,13,18,"mat-card-content",4),y.gc(2,"async"),y.gc(3,"async"),y.gc(4,"async"),y.gc(5,"async"),y.Rb()),2&t){var n=y.fc();y.Cb(1),y.mc("ngIf",y.uc(9,B,y.hc(2,1,n.displayTooltips$),y.hc(3,3,n.selectedTicker$),y.hc(4,5,n.isFlexMarket$),y.hc(5,7,n.indexPrice$)))}}function V(t,e){1&t&&(y.Ub(0,"div",15),y.Pb(1,"sign-in-form",16),y.Tb()),2&t&&(y.Cb(1),y.mc("includeDirect",!1))}function H(t,e){1&t&&y.Pb(0,"kraken-loading")}var q=function(){return{horizontal:675,vertical:600}},$=s()("app:order-form"),Q=s()("trace:app:order-form"),W=function(){var t=function(){function t(e,n){C(this,t),this.store=e,this.env=n,this.debug=$,this.options=this.refreshSavedOptions(),this.orderType="limit",this.orderSide="buy",this.displayTooltips$=this.store.pipe(Object(o.m)(h.y)),this.userSignedIn$=this.store.pipe(Object(o.m)(h.m)),this.selectedTicker$=this.store.pipe(Object(o.m)(m.p)),this.showOrderForm$=this.userSignedIn$.pipe(Object(c.a)((function(t){return!!g.a.isNative||t}))),this.isFlexMarket$=this.store.pipe(Object(o.m)(v.a)),this.indexPrice$=this.store.pipe(Object(o.m)(m.a))}return w(t,[{key:"refreshSavedOptions",value:function(){var t={showOptions:!0,makerOnly:!1,reduceOnly:!1,orderTypeOverride:void 0,triggerSignal:"mark"},e=Object(p.b)(d.j,void 0);if(e){Q("loading saved options",e);var n=Object.assign(Object.assign({},t),e);return this.options=n,n}return Q("loading default options"),this.options=t,t}},{key:"changeOrderType",value:function(t){this.orderType=t}},{key:"openCalculatorDialog",value:function(t){this.store.dispatch(Object(u.g)({name:"order-calculators",inputs:{mid:Object(b.j)(t)}}))}},{key:"changeSide",value:function(t){this.orderSide=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(y.Ob(o.b),y.Ob(l.a))},t.\u0275cmp=y.Ib({type:t,selectors:[["order-form"]],features:[y.Bb([f.a])],decls:7,vars:6,consts:[["orientation","",1,"order-form",3,"breakpoints"],[4,"ngIf","ngIfElse"],["signInForm",""],["loader",""],[4,"ngIf"],[1,"side-buttons"],[3,"value"],["value","buy",1,"long",3,"click"],["value","sell",1,"short",3,"click"],[3,"orderType","displayTooltips","isFlexMarket","changeOrderType","openCalculator"],[3,"ngSwitch",4,"ngIf","ngIfElse"],[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"side","options","basicOrderType","indexPrice","refreshOptions"],[3,"side","triggerType","options","refreshOptions"],[1,"unauth"],[3,"includeDirect"]],template:function(t,e){if(1&t&&(y.Ub(0,"mat-card",0),y.Oc(1,z,6,14,"ng-container",1),y.gc(2,"async"),y.Tb(),y.Oc(3,V,2,1,"ng-template",null,2,y.Pc),y.Oc(5,H,1,0,"ng-template",null,3,y.Pc)),2&t){var n=y.Ac(4);y.mc("breakpoints",y.qc(5,q)),y.Cb(1),y.mc("ngIf",y.hc(2,3,e.showOrderForm$))("ngIfElse",n)}},directives:[_.a,O.a,k.n,_.b,T.b,T.a,S.a,k.p,k.q,E.a,x.a,P.a,A.a,I.a],pipes:[k.b,M.d],styles:["[noauth][_nghost-%COMP%]{pointer-events:none}mat-card[_ngcontent-%COMP%]{box-shadow:none!important;overflow:hidden}form[_ngcontent-%COMP%]{overflow-x:hidden}form[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:100%}.submit[_ngcontent-%COMP%]{display:flex}.submit[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1}.submit[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:first-of-type){margin-left:var(--spacing)}.footer[_ngcontent-%COMP%]{margin-top:var(--spacing);background:var(--card-colour);text-align:right;width:100%}.options[_ngcontent-%COMP%]{display:block}.inputs[_ngcontent-%COMP%], .options[_ngcontent-%COMP%]{flex-direction:column}.inputs[_ngcontent-%COMP%]{display:flex}.inputs[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex:1}.order-form[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;padding-left:var(--spacing);padding-top:var(--spacing);padding-bottom:var(--spacing)}.radio-options[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;padding-top:var(--spacing)}.radio-options--inline[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{flex-flow:row nowrap;justify-content:space-between}.slider-info[_ngcontent-%COMP%]{cursor:pointer}.slider-info[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--icon-colour)}.side-buttons[_ngcontent-%COMP%]{padding-right:var(--spacing)}.side[_ngcontent-%COMP%] .buy[_ngcontent-%COMP%]{color:var(--accent-colour)!important}.side[_ngcontent-%COMP%] .buy.mat-button-toggle-checked[_ngcontent-%COMP%]{color:var(--text-colour)!important;background-color:var(--button-accent-colour)!important}.side[_ngcontent-%COMP%] .sell[_ngcontent-%COMP%]{color:var(--warn-colour)!important}.side[_ngcontent-%COMP%] .sell.mat-button-toggle-checked[_ngcontent-%COMP%]{color:var(--text-colour)!important;background-color:var(--button-warn-colour)!important}.input-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex:1}.input-row[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{min-width:0}.input-row[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]:not(:first-child){padding-left:var(--spacing)}@media (max-width:599px){.input-row[_ngcontent-%COMP%]{width:91vw}}.maker-reduce[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}.maker-reduce[_ngcontent-%COMP%] .mat-checkbox-layout{border-bottom:none!important}.unauth[_ngcontent-%COMP%]{padding:var(--spacing)}.estimate[_ngcontent-%COMP%]{font-size:2em;margin-right:var(--spacing)}.mat-button-toggle-checked.long[_ngcontent-%COMP%]{background:var(--g300)}.mat-button-toggle-checked.short[_ngcontent-%COMP%]{background:var(--warn-colour)}.close-position[_ngcontent-%COMP%]{align-self:flex-end}.trigger-details[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly}.trigger-details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:center}.trigger[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid var(--border-colour);margin:var(--spacing-s) 0;justify-content:space-between;align-items:center}.trigger-menu[_ngcontent-%COMP%]{cursor:pointer}.trigger-checkboxes[_ngcontent-%COMP%]{display:flex}.trigger-checkboxes[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]:first-child{margin-right:var(--spacing-l)}"],changeDetection:0}),t=Object(i.d)([Object(r.a)()],t)}()},nXbC:function(t,e,n){"use strict";n.r(e),n.d(e,"ToursComponent",(function(){return b}));var i=n("uJYd"),r=n("kZht"),o=n("mcff"),a=n("zqNl"),s=n("1VvW"),c=n("rfPA"),u=n("bBQR"),l=n("1etq"),d=n("NxuZ"),h=n("hCLc"),f=n("anSm"),p=n("aDqW"),b=function(){var t=function(){function t(e,n,i){C(this,t),this.dialogRef=e,this.store=n,this.router=i}return w(t,[{key:"startTour",value:function(){this.closeDialog(),this.router.navigate(["/futures"]),this.store.dispatch(Object(i.A)({tour:"trading-dashboard"}))}},{key:"closeDialog",value:function(){this.dialogRef.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(o.d),r.Ob(a.b),r.Ob(s.d))},t.\u0275cmp=r.Ib({type:t,selectors:[["tours"]],decls:16,vars:6,consts:[["heading","HEADING.TAKE_TOUR"],[1,"tours"],[1,"hero"],["src","assets/images/kraken_illustration4.png","alt","Kraken illustration"],[1,"content"],["subheading",""],["icon","kraken","size","lg"],[1,"options"],["body","","mat-raised-button","",3,"click"],["body","","mat-button","",3,"click"]],template:function(t,e){1&t&&(r.Ub(0,"pro-dialog",0),r.Ub(1,"section",1),r.Ub(2,"div",2),r.Pb(3,"img",3),r.Tb(),r.Ub(4,"div",4),r.Ub(5,"p",5),r.Qc(6," Take the "),r.Pb(7,"fa-icon",6),r.Qc(8," Kraken Futures Tour "),r.Tb(),r.Ub(9,"div",7),r.Ub(10,"button",8),r.bc("click",(function(){return e.startTour()})),r.Qc(11),r.gc(12,"translate"),r.Tb(),r.Ub(13,"button",9),r.bc("click",(function(){return e.closeDialog()})),r.Qc(14),r.gc(15,"translate"),r.Tb(),r.Tb(),r.Tb(),r.Tb(),r.Tb()),2&t&&(r.Cb(11),r.Sc(" ",r.hc(12,2,"LABEL.SHOW_AROUND")," "),r.Cb(3),r.Sc(" ",r.hc(15,4,"LABEL.SKIP_FOR_NOW")," "))},directives:[c.a,u.a,l.a,d.b,h.b,f.a],pipes:[p.d],styles:[".tours[_ngcontent-%COMP%]{display:flex;flex-direction:row}.tours[_ngcontent-%COMP%] .hero[_ngcontent-%COMP%]{margin-right:var(--spacing-l)}.tours[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:250px}.tours[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{justify-content:center;align-self:center}.tours[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:var(--spacing-l)}.tours[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--brand)}.options[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0}),t}()},nXdR:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"l",(function(){return d})),n.d(e,"b",(function(){return h})),n.d(e,"c",(function(){return f})),n.d(e,"g",(function(){return p})),n.d(e,"e",(function(){return b})),n.d(e,"h",(function(){return g})),n.d(e,"f",(function(){return m})),n.d(e,"d",(function(){return v})),n.d(e,"n",(function(){return y})),n.d(e,"p",(function(){return _})),n.d(e,"o",(function(){return O})),n.d(e,"q",(function(){return k})),n.d(e,"m",(function(){return w})),n.d(e,"r",(function(){return C})),n.d(e,"k",(function(){return T})),n.d(e,"i",(function(){return S})),n.d(e,"j",(function(){return E}));var i=n("KQpv"),r=n.n(i),o=n("og7C"),a=n("VmIW"),s=n("TYVA"),c=n("mlVJ"),u=r()("app:utils:wallets"),l=":";function d(t){var e,n=t.name.toUpperCase(),i=t.currency.toUpperCase(),r=null===(e=t.pair)||void 0===e?void 0:e.toUpperCase(),o="XBT"===n?"BTC":n,a="XBT"===i?"BTC":i,s="XBT/USD"===r?"BTC/USD":r;return Object.assign(Object.assign({},t),{name:o,currency:a,pair:s})}function h(t,e,n,i){return t.map((function(t){var r=t.currency,o="XBT"===r?"BTC":r,a=e.get(r);if(!a){if(u("no USD price found for wallet "+t.name,t),"USD"===r){var s="holding"===t.type?t.balance:t.pv,c=t.am,l=n>0?s/n:0;return Object.assign(Object.assign(Object.assign({},t),{currency:o,asset:i.get(r),notional:s,allocation:l}),"futures"===t.type&&{amNotional:c})}return Object.assign(Object.assign(Object.assign({},t),{currency:o,asset:i.get(r),notional:0,allocation:0}),"futures"===t.type&&{amNotional:0})}var d=a.price*("holding"===t.type?t.balance:t.pv),h=a.price*t.am,f=n>0?d/n:0;return Object.assign(Object.assign(Object.assign({},t),{currency:o,asset:i.get(r),notional:d,allocation:f}),"futures"===t.type&&{amNotional:h})}))}function f(t,e){return null==e?t:t.filter((function(t){var n=t.currency;return g(e).replace(c.b,"BTC")===n}))}function p(t,e){var n=t.get(e.currency);return n?n.price*e.balance:"USD"===e.currency?e.balance:0}function b(t,e){var n=t.get(e.currency);return n?n.price*e.pv:0}function g(t){return Object(s.u)(t.symbol).collateral.toUpperCase()}function m(t){var e=t.toUpperCase();return e.startsWith("F-")?Object(a.Some)(e.substring(2).replace(l,s.b)):Object(a.None)()}function v(t){if(t)switch(t.toUpperCase()){case"F-XBT:USD":return"BTC";case"F-ETH:USD":return"ETH";case"F-XRP:USD":return"XRP";case"F-XRP:XBT":return"BTC";case"F-BCH:USD":return"BCH";case"F-LTC:USD":return"LTC";case"F-XBT:EUR":case"F-ETH:EUR":case"F-LTC:EUR":case"F-BCH:EUR":case"F-XRP:EUR":return"EUR"}}function y(t,e){return t.cv?e.cv?e.cv-t.cv:1:-1}function _(t,e){var n=s.e,i=e.currency;return n.indexOf(t.currency)-n.indexOf(i)}function O(t,e){var n=s.e,i=Object(s.k)(t.pair),r=Object(s.k)(e.pair);return n.indexOf(i)-n.indexOf(r)}function k(t,e){var n=s.w,i=Object(s.l)(t.pair),r=Object(s.l)(e.pair);return n.indexOf(i)-n.indexOf(r)}function w(t,e){var n=s.e;return n.indexOf(t)-n.indexOf(e)}function C(t,e){var n=s.B;return n.indexOf(t.type)-n.indexOf(e.type)}function T(t){return Object.keys(t).map((function(e){var n=e.toUpperCase();return{type:"holding",currency:n,balance:t[e],name:n,am:0,funding:0,im:0,mm:0,pv:0,pnl:0}}))}function S(t){return Object.keys(t).map((function(e){return{type:"futures",currency:t[e].unit,balance:t[e].balance,name:t[e].name,am:t[e].available,im:t[e].initial_margin,funding:t[e].unrealised_funding,mm:t[e].maintenance_margin,pv:t[e].portfolio_value,pair:t[e].pair,pnl:t[e].pnl}}))}function E(t){return{type:"flex",currency:"USD",cv:t.collateral_value,am:t.available_margin,balance:t.balance_value,name:"multi-collateral",im:t.initial_margin,funding:t.unrealised_funding,mm:t.maintenance_margin,pv:t.portfolio_value,pnl:t.pnl,flexAssets:(e=Object(o.b)(t.currencies),e.map((function(t,e){var n="XBT"===e?"BTC":e;return{type:"flex",currency:n,am:t.available||0,balance:t.quantity,name:"FLEX-"+n,pv:t.value,cv:t.collateral_value,im:0,funding:0,mm:0,pnl:0}}))),margin_equity:t.margin_equity,total_unrealized:t.total_unrealized,total_unrealized_as_margin:t.total_unrealized_as_margin};var e}},neWc:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("XQH8"),a=n("+luX"),s=n("q+cW"),c=n("LqyJ");e.default=function(t){function e(n){var i=t.call(this,n)||this;return i.luminances=e.EMPTY,i.buckets=new Int32Array(e.LUMINANCE_BUCKETS),i}return r(e,t),e.prototype.getBlackRow=function(t,n){var i=this.getLuminanceSource(),r=i.getWidth();null==n||n.getSize()>e.LUMINANCE_SHIFT]++;var u=e.estimateBlackPoint(s);if(r<3)for(c=0;c>e.LUMINANCE_SHIFT]++;var d=e.estimateBlackPoint(o),h=t.getMatrix();for(a=0;ao&&(r=a,o=t[a]),t[a]>i&&(i=t[a]);var s=0,u=0;for(a=0;au&&(s=a,u=p)}if(r>s){var d=r;r=s,s=d}if(s-r<=n/16)throw new c.default;var h=s-1,f=-1;for(a=s-1;a>r;a--){var p,b=a-r;(p=b*b*(s-a)*(i-t[a]))>f&&(h=a,f=p)}return h<\n ')}function r(){throw Error("xPosition value must be 'center', 'before' or after'.\n Example: ")}function o(){throw Error('yPosition value must be either \'above\' or below\'.\n Example: ')}n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}))},nkQU:function(t,e,n){"use strict";n.d(e,"a",(function(){return at}));var i=n("D57K"),r=n("kZht"),o=n("LoUP"),a=n("O30t"),s=n("gxtV"),c=n("sXtk"),u=n("UVqw"),l=n("anSm"),d=n("yPvj"),h=n("IkSM"),f=n("B6Vo"),p=n("Cc4E"),b=n("zho4"),g=n("chaP"),m=n("+I9z"),v=n("1o0v"),y=n("scAs"),_=n("CfRh"),O=n("An66"),k=n("LbKT"),T=n("NxuZ"),S=n("WYJo"),E=n("rUBT"),x=n("aDqW"),P=n("rqGg"),A=n("DpwM");function I(t,e){1&t&&r.Pb(0,"tr",26)}function M(t,e){if(1&t){var n=r.Vb();r.Ub(0,"tr",27),r.bc("click",(function(){r.Ec(n);var t=e.$implicit;return r.fc().selectTicker.emit({symbol:t.instrument,replaceUrl:!1})})),r.Tb()}}function D(t,e){1&t&&r.Pb(0,"th",28)}function R(t,e){if(1&t&&(r.Ub(0,"td",29),r.Pb(1,"market-icon",30),r.gc(2,"base"),r.Tb()),2&t){var n=e.$implicit;r.Cb(1),r.mc("base",r.hc(2,1,n.instrument))}}var j=function(){return[250,100]};function L(t,e){if(1&t&&(r.Ub(0,"th",31),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,j)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.MARKET")," ")}}function N(t,e){if(1&t&&(r.Ub(0,"td",32),r.Ub(1,"span"),r.Qc(2),r.gc(3,"pair"),r.Tb(),r.Ub(4,"span"),r.Qc(5),r.gc(6,"uppercase"),r.gc(7,"contractFamily"),r.gc(8,"translate"),r.gc(9,"maturityMonth"),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(2),r.Sc(" ",r.hc(3,3,n.instrument)," "),r.Cb(3),r.Tc(" ",r.hc(6,5,r.hc(7,7,n.instrument))," ",r.hc(8,9,r.ic(9,11,n.instrument,"short"))," ")}}function U(t,e){1&t&&(r.Ub(0,"th",33),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t&&(r.Cb(1),r.Sc(" ",r.hc(2,1,"COLUMN.SIZE")," "))}function F(t,e){if(1&t&&(r.Ub(0,"td",34),r.Ub(1,"span"),r.Ub(2,"span"),r.Ub(3,"span"),r.Qc(4),r.gc(5,"translate"),r.Tb(),r.Pb(6,"ghost-trail",35),r.Tb(),r.Ub(7,"span",36),r.Qc(8),r.gc(9,"asset"),r.Tb(),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(3),r.Gb("global__text--accent",n.balance>0)("global__text--warn",n.balance<0),r.Cb(1),r.Sc(" ",r.hc(5,8,n.balance>0?"BUTTON.LONG":"BUTTON.SHORT")," "),r.Cb(2),r.nc("content",n.displaySize),r.mc("showZeros",!1),r.Cb(2),r.Rc(r.hc(9,10,n.tradingDisplayAsset))}}function B(t,e){if(1&t&&(r.Ub(0,"th",37),r.Qc(1),r.gc(2,"translate"),r.gc(3,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(8,j)),r.Cb(1),r.Tc(" ",r.hc(2,4,"COLUMN.ENTRY")," / ",r.hc(3,6,"COLUMN.MARK")," ")}}function z(t,e){if(1&t&&(r.Ub(0,"td",38),r.Ub(1,"span",39),r.Qc(2),r.gc(3,"sato"),r.Ub(4,"span",36),r.Qc(5),r.gc(6,"quote"),r.Tb(),r.Tb(),r.Ub(7,"span",40),r.Qc(8),r.gc(9,"sato"),r.Ub(10,"span",36),r.Qc(11),r.gc(12,"quote"),r.Tb(),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(2),r.Sc(" ",r.ic(3,4,n.entry_price,n)," "),r.Cb(3),r.Rc(r.hc(6,7,n.instrument)),r.Cb(3),r.Sc(" ",r.ic(9,9,n.mark_price,n)," "),r.Cb(3),r.Rc(r.hc(12,12,n.instrument))}}function V(t,e){if(1&t&&(r.Ub(0,"th",41),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,j)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.MARK")," ")}}function H(t,e){if(1&t&&(r.Ub(0,"td",38),r.Ub(1,"span",40),r.Qc(2),r.gc(3,"sato"),r.Tb(),r.Ub(4,"span",36),r.Qc(5),r.gc(6,"quote"),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(2),r.Rc(r.ic(3,2,n.mark_price,n)),r.Cb(3),r.Rc(r.hc(6,5,n.instrument))}}function q(t,e){if(1&t&&(r.Ub(0,"th",33),r.Ub(1,"span",42),r.Qc(2),r.gc(3,"translate"),r.Tb(),r.Pb(4,"liq-price-faq"),r.Tb()),2&t){var n=r.fc();r.Cb(1),r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,j)),r.Cb(1),r.Sc(" ",r.hc(3,3,"COLUMN.EST_LIQ_PRICE")," ")}}function $(t,e){if(1&t&&(r.Sb(0),r.Ub(1,"span",40),r.Qc(2),r.gc(3,"sato"),r.Tb(),r.Ub(4,"span",36),r.Qc(5),r.gc(6,"quote"),r.Tb(),r.Rb()),2&t){var n=r.fc().$implicit;r.Cb(2),r.Rc(r.ic(3,2,n.liquidation_threshold,n)),r.Cb(3),r.Rc(r.hc(6,5,n.instrument))}}function Q(t,e){if(1&t&&(r.Ub(0,"span",45),r.Qc(1,"N/A"),r.Tb()),2&t){var n=r.fc(2);r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(2,j))}}function W(t,e){if(1&t&&(r.Ub(0,"td",38),r.Oc(1,$,7,7,"ng-container",43),r.Oc(2,Q,2,3,"ng-template",null,44,r.Pc),r.Tb()),2&t){var n=e.$implicit,i=r.Ac(3);r.Cb(1),r.mc("ngIf",n.liquidation_threshold>0)("ngIfElse",i)}}function G(t,e){if(1&t&&(r.Ub(0,"th",46),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,j)),r.Cb(1),r.Sc(" ",r.hc(2,3,"COLUMN.EFFECTIVE_LVG")," ")}}function Y(t,e){if(1&t&&(r.Ub(0,"span",49),r.Qc(1),r.Tb()),2&t){var n=r.fc().$implicit,i=r.fc();r.Cb(1),r.Rc(i.lvg(n.leveragePref))}}function K(t,e){if(1&t){var n=r.Vb();r.Ub(0,"td",47),r.bc("click",(function(){r.Ec(n);var t=e.$implicit,i=r.fc();return i.selectTicker.emit({symbol:t.instrument,replaceUrl:!1}),i.viewLvgPrefs.emit({position:t})})),r.Qc(1),r.gc(2,"number"),r.Oc(3,Y,2,1,"span",48),r.gc(4,"contractFamily"),r.Tb()}if(2&t){var i=e.$implicit;r.Cb(1),r.Sc(" ",r.ic(2,2,i.effective_leverage,"1.2-2"),"x "),r.Cb(2),r.mc("ngIf","mc"===r.hc(4,5,i.instrument))}}function Z(t,e){if(1&t&&(r.Ub(0,"th",50),r.Qc(1),r.gc(2,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(5,j)),r.Cb(1),r.Sc(" ",r.hc(2,3,"IM / MM")," ")}}function X(t,e){if(1&t&&(r.Ub(0,"td",38),r.Ub(1,"span",39),r.Qc(2),r.gc(3,"sato"),r.Ub(4,"span",36),r.Qc(5),r.gc(6,"asset"),r.Tb(),r.Tb(),r.Ub(7,"span",40),r.Qc(8),r.gc(9,"sato"),r.Ub(10,"span",36),r.Qc(11),r.gc(12,"asset"),r.Tb(),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(2),r.Sc(" ",r.jc(3,4,n.initial_margin,n.walletDisplayAsset,"full")," "),r.Cb(3),r.Rc(r.hc(6,8,n.walletDisplayAsset)),r.Cb(3),r.Sc(" ",r.jc(9,10,n.maintenance_margin,n.walletDisplayAsset,"full")," "),r.Cb(3),r.Rc(r.hc(12,14,n.walletDisplayAsset))}}function J(t,e){if(1&t&&(r.Ub(0,"th",51),r.Qc(1),r.gc(2,"translate"),r.gc(3,"translate"),r.Tb()),2&t){var n=r.fc();r.mc("sbDisabled",!n.displayTooltips)("sbDelay",r.qc(8,j)),r.Cb(1),r.Tc(" ",r.hc(2,4,"COLUMN.PNL")," / ",r.hc(3,6,"COLUMN.ROE")," ")}}function tt(t,e){if(1&t&&(r.Ub(0,"td",38),r.Ub(1,"span",52),r.Qc(2),r.gc(3,"sato"),r.Ub(4,"span",36),r.Qc(5),r.gc(6,"asset"),r.Tb(),r.Tb(),r.Ub(7,"span",52),r.Qc(8),r.gc(9,"percent"),r.Tb(),r.Tb()),2&t){var n=e.$implicit;r.Cb(1),r.mc("pnl",n.displayPnl),r.Cb(1),r.Sc(" ",r.jc(3,5,n.displayPnl,n.walletDisplayAsset,"full")," "),r.Cb(3),r.Rc(r.hc(6,9,n.walletDisplayAsset)),r.Cb(2),r.mc("pnl",n.return_on_equity),r.Cb(1),r.Sc(" ",r.ic(9,11,n.return_on_equity,"1.2-2")," ")}}function et(t,e){1&t&&r.Pb(0,"th",28)}function nt(t,e){if(1&t){var n=r.Vb();r.Sb(0),r.Ub(1,"div",53),r.bc("click",(function(t){r.Ec(n);var e=r.fc().$implicit,i=r.fc();return t.stopPropagation(),i.viewDetailed.emit({position:e})})),r.Pb(2,"fa-icon",56),r.gc(3,"translate"),r.Tb(),r.Ub(4,"div",57),r.bc("click",(function(t){r.Ec(n);var e=r.fc().$implicit,i=r.fc();return t.stopPropagation(),i.limitClose.emit({position:e})})),r.Pb(5,"fa-icon",58),r.gc(6,"translate"),r.Ub(7,"p"),r.Qc(8),r.gc(9,"translate"),r.Tb(),r.Tb(),r.Ub(10,"div",59),r.bc("click",(function(t){r.Ec(n);var e=r.fc().$implicit,i=r.fc();return t.stopPropagation(),i.marketClose.emit({position:e})})),r.Pb(11,"fa-icon",60),r.gc(12,"translate"),r.Ub(13,"p"),r.Qc(14),r.gc(15,"translate"),r.Tb(),r.Tb(),r.Rb()}2&t&&(r.Cb(2),r.mc("matTooltip",r.hc(3,5,"BUTTON.VIEW_MORE_DETAILS")),r.Cb(3),r.mc("matTooltip",r.hc(6,7,"DIALOG.CONFIRM_CLOSE_AT_PRICE.TITLE")),r.Cb(3),r.Rc(r.hc(9,9,"BUTTON.LIMIT")),r.Cb(3),r.mc("matTooltip",r.hc(12,11,"DIALOG.CONFIRM_CLOSE_POSITION.TITLE")),r.Cb(3),r.Rc(r.hc(15,13,"BUTTON.MKT_CLOSE")))}function it(t,e){if(1&t){var n=r.Vb();r.Ub(0,"td",29),r.Ub(1,"div",53),r.bc("click",(function(t){r.Ec(n);var i=e.$implicit,o=r.fc();return t.stopPropagation(),o.sharePosition.emit({position:i})})),r.Pb(2,"fa-icon",54),r.gc(3,"translate"),r.Tb(),r.Oc(4,nt,16,15,"ng-container",55),r.Tb()}if(2&t){var i=r.fc();r.Cb(2),r.mc("matTooltip",r.hc(3,2,"BUTTON.SHARE")),r.Cb(2),r.mc("ngIf",!i.flexOnly)}}var rt=function(){return{small:100,medium:400,large:800}},ot=function(t,e){var n={symbol:t.instrument,size:t.balance,liq_price:t.liquidation_threshold,profit_loss:t.pnl};return e in n?n[e]:t[e]},at=function(){var t=function(){function t(e){C(this,t),this.env=e,this.tableColumns=["icon","symbol","size","entry_price","liq_price","effective_leverage","im","profit_loss","position_actions"],this.tableData=new a.k([]),this.flexOnly=!1,this.selectTicker=new r.o,this.marketClose=new r.o,this.limitClose=new r.o,this.viewDetailed=new r.o,this.sharePosition=new r.o,this.viewLvgPrefs=new r.o}return w(t,[{key:"ngOnInit",value:function(){this.tableData.sortingDataAccessor=ot}},{key:"ngAfterViewInit",value:function(){var t=this;this.tableSort.first&&(this.tableData.sort=this.tableSort.first),this.tableSort.changes.pipe(Object(s.b)(this)).subscribe((function(e){e.first&&(t.tableData.sort=e.first)}))}},{key:"ngOnChanges",value:function(t){var e=t.positions;e&&(this.tableData.data=e.currentValue)}},{key:"trackByInstrumentSymbol",value:function(t,e){return e.instrument}},{key:"lvg",value:function(t){return(null==t?void 0:t.cross)?"CROSS":"ISOLATED"}},{key:"liqPriceFaq",get:function(){return"kraken"===this.env.platform?"https://support.kraken.com/hc/en-us/articles/4402283092244-Liquidation-FAQ":"https://support.cryptofacilities.com/hc/en-us/articles/4402649576337-Liquidation-FAQ"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Ob(c.a))},t.\u0275cmp=r.Ib({type:t,selectors:[["open-positions-desktop"]],viewQuery:function(t,e){var n;1&t&&r.Wc(o.a,!0),2&t&&r.zc(n=r.cc())&&(e.tableSort=n)},inputs:{positions:"positions",displayTooltips:"displayTooltips",flexOnly:"flexOnly"},outputs:{selectTicker:"selectTicker",marketClose:"marketClose",limitClose:"limitClose",viewDetailed:"viewDetailed",sharePosition:"sharePosition",viewLvgPrefs:"viewLvgPrefs"},features:[r.Ab],decls:33,vars:9,consts:[["breakpoint","","mat-table","","matSort","",3,"breakpoints","dataSource","trackBy"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",3,"click",4,"matRowDef","matRowDefColumns"],["matColumnDef","icon"],["mat-header-cell","",4,"matHeaderCellDef"],["body","","mat-cell","",4,"matCellDef"],["matColumnDef","symbol"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.OPEN_POSITIONS.MARKET",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["class","block-cell","mat-cell","","body","",4,"matCellDef"],["matColumnDef","size"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["class","block-cell","mat-cell","","body","","mono","",4,"matCellDef"],["matColumnDef","entry_price"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.ENTRY_AND_MARK",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["class","block-cell","body","","mono","","mat-cell","",4,"matCellDef"],["matColumnDef","mark_price"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.MARK_PRICE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["matColumnDef","liq_price"],["matColumnDef","effective_leverage"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.EFFECTIVE_LVG",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["body","","mono","","mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","im"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.IM_MM",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["matColumnDef","profit_loss"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.PNL_ROE",3,"sbDisabled","sbDelay",4,"matHeaderCellDef"],["matColumnDef","position_actions"],["mat-header-row",""],["mat-row","",3,"click"],["mat-header-cell",""],["body","","mat-cell",""],[3,"base"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.OPEN_POSITIONS.MARKET",3,"sbDisabled","sbDelay"],["mat-cell","","body","",1,"block-cell"],["mat-header-cell","","mat-sort-header",""],["mat-cell","","body","","mono","",1,"block-cell"],[3,"content","showZeros"],["ghost",""],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.ENTRY_AND_MARK",3,"sbDisabled","sbDelay"],["body","","mono","","mat-cell","",1,"block-cell"],["mono","","bold",""],["mono",""],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.MARK_PRICE",3,"sbDisabled","sbDelay"],["tooltip","","sbTooltip","TOOLTIP.LIQ_PRICE",3,"sbDisabled","sbDelay"],[4,"ngIf","ngIfElse"],["naLiq",""],["tooltip","","sbTooltip","TOOLTIP.NA_LIQ_PRICE",3,"sbDisabled","sbDelay"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.EFFECTIVE_LVG",3,"sbDisabled","sbDelay"],["body","","mono","","mat-cell","",3,"click"],["class","lvg-pref",4,"ngIf"],[1,"lvg-pref"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.IM_MM",3,"sbDisabled","sbDelay"],["mat-header-cell","","mat-sort-header","","tooltip","","sbTooltip","TOOLTIP.PNL_ROE",3,"sbDisabled","sbDelay"],["pnlZero","",3,"pnl"],[1,"info-button",3,"click"],["icon","share-ios","size","lg",3,"matTooltip"],[4,"ngIf"],["icon","file","size","lg",3,"matTooltip"],[1,"limit-button",3,"click"],["primary","","icon","close-position","size","lg",3,"matTooltip"],[1,"market-button",3,"click"],["primary","","icon","circle-minus","size","lg",3,"matTooltip"]],template:function(t,e){1&t&&(r.Ub(0,"table",0),r.Oc(1,I,1,0,"tr",1),r.Oc(2,M,1,0,"tr",2),r.Sb(3,3),r.Oc(4,D,1,0,"th",4),r.Oc(5,R,3,3,"td",5),r.Rb(),r.Sb(6,6),r.Oc(7,L,3,6,"th",7),r.Oc(8,N,10,14,"td",8),r.Rb(),r.Sb(9,9),r.Oc(10,U,3,3,"th",10),r.Oc(11,F,10,12,"td",11),r.Rb(),r.Sb(12,12),r.Oc(13,B,4,9,"th",13),r.Oc(14,z,13,14,"td",14),r.Rb(),r.Sb(15,15),r.Oc(16,V,3,6,"th",16),r.Oc(17,H,7,7,"td",14),r.Rb(),r.Sb(18,17),r.Oc(19,q,5,6,"th",10),r.Oc(20,W,4,2,"td",14),r.Rb(),r.Sb(21,18),r.Oc(22,G,3,6,"th",19),r.Oc(23,K,5,7,"td",20),r.Rb(),r.Sb(24,21),r.Oc(25,Z,3,6,"th",22),r.Oc(26,X,13,16,"td",14),r.Rb(),r.Sb(27,23),r.Oc(28,J,4,9,"th",24),r.Oc(29,tt,10,14,"td",14),r.Rb(),r.Sb(30,25),r.Oc(31,et,1,0,"th",4),r.Oc(32,it,5,4,"td",5),r.Rb(),r.Tb()),2&t&&(r.Gb("flex-only",e.flexOnly),r.mc("breakpoints",r.qc(8,rt))("dataSource",e.tableData)("trackBy",e.trackByInstrumentSymbol),r.Cb(1),r.mc("matHeaderRowDef",e.tableColumns)("matHeaderRowDefSticky",!0),r.Cb(1),r.mc("matRowDefColumns",e.tableColumns))},directives:[a.j,u.a,o.a,a.g,a.i,a.c,a.e,a.b,a.f,a.h,a.d,a.a,l.a,d.a,o.b,h.a,f.a,p.a,b.a,g.a,m.a,v.a,y.a,_.a,O.n,k.a,T.b,S.a],pipes:[E.a,x.d,E.e,O.x,E.c,E.d,P.a,A.c,E.f,O.f,O.u],styles:["market-icon[_ngcontent-%COMP%]{font-size:20px}table[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%]{height:calc(var(--table-row-height) + var(--spacing))!important}table[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%]:last-of-type, table[_ngcontent-%COMP%] .mat-header-cell[_ngcontent-%COMP%]:last-of-type{text-align:right}.block-cell[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:block;line-height:1.25em}.actions-header[_ngcontent-%COMP%]{cursor:pointer}.actions-header[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.actions-header[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--warn-colour);margin-right:var(--spacing-s)}.actions-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--warn-colour);text-transform:capitalize!important}.cancel-button[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%]{cursor:pointer;display:inline-block}.cancel-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.cancel-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-left:var(--spacing-s)}.copy-button[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%]{margin-right:var(--spacing)}.copy-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--brand)}.cancel-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:var(--warn-colour)}.cancel-all-button[_ngcontent-%COMP%]{cursor:pointer}.cancel-all-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.cancel-all-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--warn-colour);margin-right:var(--spacing-s)}.cancel-all-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--warn-colour);text-transform:capitalize!important}table[breakpoint=medium][_ngcontent-%COMP%] .info-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], table[breakpoint=medium][_ngcontent-%COMP%] .limit-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], table[breakpoint=medium][_ngcontent-%COMP%] .market-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], table[breakpoint=medium][_ngcontent-%COMP%] .mat-column-change[_ngcontent-%COMP%], table[breakpoint=medium][_ngcontent-%COMP%] .mat-column-effective_leverage[_ngcontent-%COMP%], table[breakpoint=medium][_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{display:none}table.flex-only[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{font-size:24px}table.flex-only[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:var(--spacing-s) 0;font-size:14px}table[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%]{cursor:pointer}table[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%]:hover{background:var(--table-row-alt)}.lvg-pref[_ngcontent-%COMP%]{background:var(--form-input-colour);padding:var(--spacing-xs);border-radius:var(--bdrs)}"],changeDetection:0}),t=Object(i.d)([Object(s.a)()],t)}()},nmFE:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("q+cW"),r=n("9U7V"),o=n("nB6u"),a=n("oznm");e.default=function(){function t(e){var n=e.getHeight();if(n<8||n>144||0!=(1&n))throw new o.default;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new i.default(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(t){var e=t.getHeight(),n=t.getWidth();return r.default.getVersionForDimensions(e,n)},t.prototype.readCodewords=function(){var t=new Int8Array(this.version.getTotalCodewords()),e=0,n=4,i=0,r=this.mappingBitMatrix.getHeight(),a=this.mappingBitMatrix.getWidth(),s=!1,c=!1,u=!1,l=!1;do{if(n!==r||0!==i||s)if(n!==r-2||0!==i||0==(3&a)||c)if(n!==r+4||2!==i||0!=(7&a)||u)if(n!==r-2||0!==i||4!=(7&a)||l){do{n=0&&!this.readMappingMatrix.get(i,n)&&(t[e++]=255&this.readUtah(n,i,r,a)),n-=2,i+=2}while(n>=0&&i=0&&i=0);n+=3,i+=1}else t[e++]=255&this.readCorner4(r,a),n-=2,i+=2,l=!0;else t[e++]=255&this.readCorner3(r,a),n-=2,i+=2,u=!0;else t[e++]=255&this.readCorner2(r,a),n-=2,i+=2,c=!0;else t[e++]=255&this.readCorner1(r,a),n-=2,i+=2,s=!0}while(n0);return a.length()>0&&n.append(a.toString()),new i.default(t,n.toString(),0===s.length?null:s,null)},t.decodeAsciiSegment=function(t,e,n){var i=!1;do{var r=t.readBits(8);if(0===r)throw new c.default;if(r<=128)return i&&(r+=128),e.append(String.fromCharCode(r-1)),l.ASCII_ENCODE;if(129===r)return l.PAD_ENCODE;if(r<=229){var o=r-130;o<10&&e.append("0"),e.append(""+o)}else switch(r){case 230:return l.C40_ENCODE;case 231:return l.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:break;case 235:i=!0;break;case 236:e.append("[)>\x1e05\x1d"),n.insert(0,"\x1e\x04");break;case 237:e.append("[)>\x1e06\x1d"),n.insert(0,"\x1e\x04");break;case 238:return l.ANSIX12_ENCODE;case 239:return l.TEXT_ENCODE;case 240:return l.EDIFACT_ENCODE;case 241:break;default:if(254!==r||0!==t.available())throw new c.default}}while(t.available()>0);return l.ASCII_ENCODE},t.decodeC40Segment=function(t,e){var n=!1,i=[],r=0;do{if(8===t.available())return;var o=t.readBits(8);if(254===o)return;this.parseTwoBytes(o,t.readBits(8),i);for(var a=0;a<3;a++){var s=i[a];switch(r){case 0:if(s<3)r=s+1;else{if(!(s0)},t.decodeTextSegment=function(t,e){var n=!1,i=[],r=0;do{if(8===t.available())return;var o=t.readBits(8);if(254===o)return;this.parseTwoBytes(o,t.readBits(8),i);for(var a=0;a<3;a++){var s=i[a];switch(r){case 0:if(s<3)r=s+1;else{if(!(s0)},t.decodeAnsiX12Segment=function(t,e){var n=[];do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var r=0;r<3;r++){var o=n[r];switch(o){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(o<14)e.append(String.fromCharCode(o+44));else{if(!(o<40))throw new c.default;e.append(String.fromCharCode(o+51))}}}}while(t.available()>0)},t.parseTwoBytes=function(t,e,n){var i=(t<<8)+e-1,r=Math.floor(i/1600);n[0]=r,i-=1600*r,r=Math.floor(i/40),n[1]=r,n[2]=i-40*r},t.decodeEdifactSegment=function(t,e){do{if(t.available()<=16)return;for(var n=0;n<4;n++){var i=t.readBits(6);if(31===i){var r=8-t.getBitOffset();return void(8!==r&&t.readBits(r))}0==(32&i)&&(i|=64),e.append(String.fromCharCode(i))}}while(t.available()>0)},t.decodeBase256Segment=function(t,e,n){var i,r=1+t.getByteOffset(),o=this.unrandomize255State(t.readBits(8),r++);if((i=0===o?t.available()/8|0:o<250?o:250*(o-249)+this.unrandomize255State(t.readBits(8),r++))<0)throw new c.default;for(var l=new Uint8Array(i),d=0;d=0?n:n+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",String.fromCharCode(127)],t}()},o8en:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}()},oCyE:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("vI0g"),r=n("YwYi"),o=n("uQul"),a=n("FoZF");e.default=function(){function t(t){this.field=t}return t.prototype.decode=function(t,e){for(var n=this.field,a=new r.default(n,t),s=new Int32Array(e),c=!0,u=0;u=(n/2|0);){var d=s,h=u;if(u=l,(s=c).isZero())throw new o.default("r_{i-1} was zero");c=d;for(var f=r.getZero(),p=s.getCoefficient(s.getDegree()),b=r.inverse(p);c.getDegree()>=s.getDegree()&&!c.isZero();){var g=c.getDegree()-s.getDegree(),m=r.multiply(c.getCoefficient(c.getDegree()),b);f=f.addOrSubtract(r.buildMonomial(g,m)),c=c.addOrSubtract(s.multiplyByMonomial(g,m))}if(l=f.multiply(u).addOrSubtract(h),c.getDegree()>=s.getDegree())throw new a.default("Division algorithm failed to reduce polynomial?")}var v=l.getCoefficient(0);if(0===v)throw new o.default("sigmaTilde(0) was zero");var y=r.inverse(v);return[l.multiplyScalar(y),c.multiplyScalar(y)]},t.prototype.findErrorLocations=function(t){var e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);for(var n=new Int32Array(e),i=0,r=this.field,a=1;a2&&void 0!==arguments[2]?arguments[2]:10;return t.pipe(Object(_.a)((function(i){return e&&e.handleError(i),n<=1?t:Q(t,e,n-1)})))}var W,G=((W=function(t){a(n,t);var e=c(n);function n(t){var i;return C(this,n),i=e.call(this),t&&(i.source=t),i}return w(n,[{key:"lift",value:function(t){var e=new n;return e.source=this,e.operator=t,e}}]),n}(s.a)).\u0275fac=function(t){return new(t||W)(F.Yb(i.a))},W.\u0275prov=F.Kb({token:W,factory:W.\u0275fac}),W);function Y(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return{ngModule:bt,providers:[t,{provide:it,multi:!0,useValue:t},{provide:tt,multi:!0,useValue:[]},{provide:rt,multi:!0,useFactory:mt,deps:[F.t,it,tt]}]}}},{key:"forRoot",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{ngModule:pt,providers:[{provide:J,useFactory:vt,deps:[[ht,new F.C,new F.L]]},{provide:ot,useValue:Q},ht,at,G,t,{provide:et,useValue:[t]},{provide:tt,multi:!0,useValue:[]},{provide:nt,useFactory:mt,deps:[F.t,et,tt]}]}}}]),t}()).\u0275mod=F.Mb({type:ut}),ut.\u0275inj=F.Lb({factory:function(t){return new(t||ut)}}),ut);function mt(t,e,n){var i,r=[],o=p(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;r.push.apply(r,b(a))}}catch(l){o.e(l)}finally{o.f()}var s,c=p(n);try{for(c.s();!(s=c.n()).done;){var u=s.value;r.push.apply(r,b(u))}}catch(l){c.e(l)}finally{c.f()}return function(t,e){return e.map((function(e){return t.get(e)}))}(t,r)}function vt(t){if(t)throw new TypeError("EffectsModule.forRoot() called twice. Feature modules should use EffectsModule.forFeature() instead.");return"guarded"}},og7C:function(t,e,n){"use strict";n.d(e,"e",(function(){return U})),n.d(e,"b",(function(){return he})),n.d(e,"c",(function(){return Ye})),n.d(e,"a",(function(){return je})),n.d(e,"f",(function(){return dn})),n.d(e,"d",(function(){return vn})),n.d(e,"g",(function(){return yn})),n.d(e,"h",(function(){return ee})),n.d(e,"i",(function(){return Qt}));var i={};function r(t){t&&(t.value=!0)}function o(){}function a(t){return void 0===t.size&&(t.size=t.__iterate(c)),t.size}function s(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?a(t)+e:e}function c(){return!0}function u(t,e,n){return(0===t&&!f(t)||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function l(t,e){return h(t,e,0)}function d(t,e){return h(t,e,e)}function h(t,e,n){return void 0===t?n:f(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function f(t){return t<0||0===t&&1/t==-1/0}function p(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function b(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function g(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function m(t){return b(t)||g(t)}var v=function(t){return p(t)?t:U(t)},y=function(t){function e(t){return b(t)?t:F(t)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(v),_=function(t){function e(t){return g(t)?t:B(t)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(v),O=function(t){function e(t){return p(t)&&!m(t)?t:z(t)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(v);function k(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function w(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function C(t){return p(t)||w(t)}v.Keyed=y,v.Indexed=_,v.Set=O;var T="@@__IMMUTABLE_ORDERED__@@";function S(t){return Boolean(t&&t[T])}var E="function"==typeof Symbol&&Symbol.iterator,x=E||"@@iterator",P=function(t){this.next=t};function A(t,e,n,i){var r=0===t?e:1===t?n:[e,n];return i?i.value=r:i={value:r,done:!1},i}function I(){return{value:void 0,done:!0}}function M(t){return!!j(t)}function D(t){return t&&"function"==typeof t.next}function R(t){var e=j(t);return e&&e.call(t)}function j(t){var e=t&&(E&&t[E]||t["@@iterator"]);if("function"==typeof e)return e}P.prototype.toString=function(){return"[Iterator]"},P.KEYS=0,P.VALUES=1,P.ENTRIES=2,P.prototype.inspect=P.prototype.toSource=function(){return this.toString()},P.prototype[x]=function(){return this};var L=Object.prototype.hasOwnProperty;function N(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var U=function(t){function e(t){return null==t?Q():C(t)?t.toSeq():function(t){var e=Y(t);if(e)return e;if("object"==typeof t)return new H(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var n=this._cache;if(n){for(var i=n.length,r=0;r!==i;){var o=n[e?i-++r:r++];if(!1===t(o[1],o[0],this))break}return r}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var n=this._cache;if(n){var i=n.length,r=0;return new P((function(){if(r===i)return{value:void 0,done:!0};var o=n[e?i-++r:r++];return A(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(v),F=function(t){function e(t){return null==t?Q().toKeyedSeq():p(t)?b(t)?t.toSeq():t.fromEntrySeq():w(t)?t.toSeq():W(t)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(U),B=function(t){function e(t){return null==t?Q():p(t)?b(t)?t.entrySeq():t.toIndexedSeq():w(t)?t.toSeq().entrySeq():G(t)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(U),z=function(t){function e(t){return(p(t)&&!m(t)?t:B(t)).toSetSeq()}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(U);U.isSeq=k,U.Keyed=F,U.Set=z,U.Indexed=B,U.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var V=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[s(this,t)]:e},e.prototype.__iterate=function(t,e){for(var n=this._array,i=n.length,r=0;r!==i;){var o=e?i-++r:r++;if(!1===t(n[o],o,this))break}return r},e.prototype.__iterator=function(t,e){var n=this._array,i=n.length,r=0;return new P((function(){if(r===i)return{value:void 0,done:!0};var o=e?i-++r:r++;return A(t,o,n[o])}))},e}(B),H=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return L.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var n=this._object,i=this._keys,r=i.length,o=0;o!==r;){var a=i[e?r-++o:o++];if(!1===t(n[a],a,this))break}return o},e.prototype.__iterator=function(t,e){var n=this._object,i=this._keys,r=i.length,o=0;return new P((function(){if(o===r)return{value:void 0,done:!0};var a=i[e?r-++o:o++];return A(t,a,n[a])}))},e}(F);H.prototype[T]=!0;var q,$=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=R(this._collection),i=0;if(D(n))for(var r;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=R(this._collection);if(!D(n))return new P(I);var i=0;return new P((function(){var e=n.next();return e.done?e:A(t,i++,e.value)}))},e}(B);function Q(){return q||(q=new V([]))}function W(t){var e=Array.isArray(t)?new V(t):M(t)?new $(t):void 0;if(e)return e.fromEntrySeq();if("object"==typeof t)return new H(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function G(t){var e=Y(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function Y(t){return N(t)?new V(t):M(t)?new $(t):void 0}function K(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function Z(t){return K(t)&&S(t)}function X(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function J(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(X(t)&&X(e)&&t.equals(e))}var tt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),i=65535&(e|=0);return n*i+((t>>>16)*i+n*(e>>>16)<<16>>>0)|0};function et(t){return t>>>1&1073741824|3221225471&t}var nt=Object.prototype.valueOf;function it(t){switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var e=0|t;for(e!==t&&(e^=4294967295*t);t>4294967295;)e^=t/=4294967295;return et(e)}(t);case"string":return t.length>dt?(void 0===(n=pt[e=t])&&(n=rt(e),ft===ht&&(ft=0,pt={}),ft++,pt[e]=n),n):rt(t);case"object":case"function":return null===t?1108378658:"function"==typeof t.hashCode?et(t.hashCode(t)):(t.valueOf!==nt&&"function"==typeof t.valueOf&&(t=t.valueOf(t)),function(t){var e;if(ct&&void 0!==(e=ot.get(t)))return e;if(void 0!==(e=t[lt]))return e;if(!st){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[lt]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=++ut,1073741824&ut&&(ut=0),ct)ot.set(t,e);else{if(void 0!==at&&!1===at(t))throw new Error("Non-extensible objects are not allowed as keys.");if(st)Object.defineProperty(t,lt,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[lt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[lt]=e}}return e}(t));case"undefined":return 1108378659;default:if("function"==typeof t.toString)return rt(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}var e,n}function rt(t){for(var e=0,n=0;n=0&&(f.get=function(e,n){return(e=s(this,e))>=0&&ec)return{value:void 0,done:!0};var t=r.next();return i||1===e||t.done?t:A(e,s-1,0===e?void 0:t.value[1],t)}))},f}function Ct(t,e,n,i){var r=Rt(t);return r.__iterateUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterate(r,o);var s=!0,c=0;return t.__iterate((function(t,o,u){if(!s||!(s=e.call(n,t,o,u)))return c++,r(t,i?o:c-1,a)})),c},r.__iteratorUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterator(r,o);var s=t.__iterator(2,o),c=!0,u=0;return new P((function(){var t,o,l;do{if((t=s.next()).done)return i||1===r?t:A(r,u++,0===r?void 0:t.value[1],t);var d=t.value;o=d[0],l=d[1],c&&(c=e.call(n,l,o,a))}while(c);return 2===r?t:A(r,o,l,t)}))},r}function Tt(t,e){var n=b(t),i=[t].concat(e).map((function(t){return p(t)?n&&(t=y(t)):t=n?W(t):G(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===i.length)return t;if(1===i.length){var r=i[0];if(r===t||n&&b(r)||g(t)&&g(r))return r}var o=new V(i);return n?o=o.toKeyedSeq():g(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=i.reduce((function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}}),0),o}function St(t,e,n){var i=Rt(t);return i.__iterateUncached=function(r,o){if(o)return this.cacheResult().__iterate(r,o);var a=0,s=!1;return function t(c,u){c.__iterate((function(o,c){return(!e||u0}function At(t,e,n,i){var r=Rt(t),o=new V(n).map((function(t){return t.size}));return r.size=i?o.max():o.min(),r.__iterate=function(t,e){for(var n,i=this.__iterator(1,e),r=0;!(n=i.next()).done&&!1!==t(n.value,r++,this););return r},r.__iteratorUncached=function(t,r){var o=n.map((function(t){return t=v(t),R(r?t.reverse():t)})),a=0,s=!1;return new P((function(){var n;return s||(n=o.map((function(t){return t.next()})),s=i?n.every((function(t){return t.done})):n.some((function(t){return t.done}))),s?{value:void 0,done:!0}:A(t,a++,e.apply(null,n.map((function(t){return t.value}))))}))},r}function It(t,e){return t===e?t:k(t)?e:t.constructor(e)}function Mt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Dt(t){return b(t)?y:g(t)?_:O}function Rt(t){return Object.create((b(t)?F:g(t)?B:z).prototype)}function jt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):U.prototype.cacheResult.call(this)}function Lt(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t0;)e[n]=arguments[n+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return te(this,e,t)}function te(t,e,n){for(var r=[],o=0;o0;)e[n]=arguments[n+1];return ie(t,e)}function ne(t,e,n){return ie(t,e,function(t){return function e(n,i,r){return zt(n)&&zt(i)?ie(n,[i],e):t?t(n,i,r):i}}(n))}function ie(t,e,n){if(!zt(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(C(t))return"function"==typeof n&&t.mergeWith?t.mergeWith.apply(t,[n].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var i=Array.isArray(t),r=t,o=i?_:y,a=i?function(e){r===t&&(r=qt(r)),r.push(e)}:function(e,i){var o=L.call(r,i),a=o&&n?n(r[i],e,i):e;o&&a===r[i]||(r===t&&(r=qt(r)),r[i]=a)},s=0;s0;)e[n]=arguments[n+1];return ne(this,e,t)}function ae(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return $t(this,t,Ce(),(function(t){return ie(t,e)}))}function se(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return $t(this,t,Ce(),(function(t){return ne(t,e)}))}function ce(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function ue(){return this.__ownerID?this:this.__ensureOwner(new o)}function le(){return this.__ensureOwner()}function de(){return this.__altered}gt.prototype.cacheResult=bt.prototype.cacheResult=mt.prototype.cacheResult=vt.prototype.cacheResult=jt;var he=function(t){function e(e){return null==e?Ce():K(e)&&!S(e)?e:Ce().withMutations((function(n){var i=t(e);Ft(i.size),i.forEach((function(t,e){return n.set(e,t)}))}))}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Ce().withMutations((function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return Te(this,t,e)},e.prototype.remove=function(t){return Te(this,t,i)},e.prototype.deleteAll=function(t){var e=v(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ce()},e.prototype.sort=function(t){return Ye(Et(this,t))},e.prototype.sortBy=function(t,e){return Ye(Et(this,e,t))},e.prototype.map=function(t,e){return this.withMutations((function(n){n.forEach((function(i,r){n.set(r,t.call(e,i,r,n))}))}))},e.prototype.__iterator=function(t,e){return new _e(this,t,e)},e.prototype.__iterate=function(t,e){var n=this,i=0;return this._root&&this._root.iterate((function(e){return i++,t(e[1],e[0],n)}),e),i},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?we(this.size,this._root,t,this.__hash):0===this.size?Ce():(this.__ownerID=t,this.__altered=!1,this)},e}(y);he.isMap=K;var fe=he.prototype;fe["@@__IMMUTABLE_MAP__@@"]=!0,fe.delete=fe.remove,fe.removeAll=fe.deleteAll,fe.setIn=Wt,fe.removeIn=fe.deleteIn=Gt,fe.update=Kt,fe.updateIn=Zt,fe.merge=fe.concat=Xt,fe.mergeWith=Jt,fe.mergeDeep=re,fe.mergeDeepWith=oe,fe.mergeIn=ae,fe.mergeDeepIn=se,fe.withMutations=ce,fe.wasAltered=de,fe.asImmutable=le,fe["@@transducer/init"]=fe.asMutable=ue,fe["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},fe["@@transducer/result"]=function(t){return t.asImmutable()};var pe=function(t,e){this.ownerID=t,this.entries=e};pe.prototype.get=function(t,e,n,i){for(var r=this.entries,o=0,a=r.length;o=Ie)return function(t,e,n,i){t||(t=new o);for(var r=new ve(t,it(n),[n,i]),a=0;a>>t)),o=this.bitmap;return 0==(o&r)?i:this.nodes[Pe(o&r-1)].get(t+5,e,n,i)},be.prototype.update=function(t,e,n,r,o,a,s){void 0===n&&(n=it(r));var c=31&(0===e?n:n>>>e),u=1<=Me)return function(t,e,n,i,r){for(var o=0,a=new Array(32),s=0;0!==n;s++,n>>>=1)a[s]=1&n?e[o++]:void 0;return a[i]=r,new ge(t,o+1,a)}(t,f,l,c,b);if(d&&!b&&2===f.length&&Ee(f[1^h]))return f[1^h];if(d&&b&&1===f.length&&Ee(b))return b;var g=t&&t===this.ownerID,m=d?b?l:l^u:l|u,v=d?b?Ae(f,h,b,g):function(t,e,n){var i=t.length-1;if(n&&e===i)return t.pop(),t;for(var r=new Array(i),o=0,a=0;a>>t)];return r?r.get(t+5,e,n,i):i},ge.prototype.update=function(t,e,n,r,o,a,s){void 0===n&&(n=it(r));var c=31&(0===e?n:n>>>e),u=this.nodes,l=u[c];if(o===i&&!l)return this;var d=Se(l,t,e+5,n,r,o,a,s);if(d===l)return this;var h=this.count;if(l){if(!d&&--h>>n),s=31&(0===n?i:i>>>n),c=a===s?[xe(t,e,n+5,i,r)]:(o=new ve(e,i,r),a>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,127&(t+=t>>8)+(t>>16)}function Ae(t,e,n,i){var r=i?t:Nt(t);return r[e]=n,r}var Ie=8,Me=16,De=8;function Re(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var je=function(t){function e(e){var n=Ve();if(null==e)return n;if(Re(e))return e;var i=t(e),r=i.size;return 0===r?n:(Ft(r),r>0&&r<32?ze(0,r,5,null,new Ne(i.toArray())):n.withMutations((function(t){t.setSize(r),i.forEach((function(e,n){return t.set(n,e)}))})))}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=s(this,t))>=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?Qe(t,e).set(0,n):Qe(t,0,e+1).set(e,n)}));var i=t._tail,r=t._root,o={value:!1};return(e+=t._origin)>=We(t._capacity)?i=He(i,t.__ownerID,0,e,n,o):r=He(r,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=r,t._tail=i,t.__hash=void 0,t.__altered=!0,t):ze(t._origin,t._capacity,t._level,r,i):t}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Ve()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){Qe(n,0,e+t.length);for(var i=0;i>>e&31;if(i>=this.array.length)return new Ne([],t);var r,o=0===i;if(e>0){var a=this.array[i];if((r=a&&a.removeBefore(t,e-5,n))===a&&o)return this}if(o&&!r)return this;var s=qe(this,t);if(!o)for(var c=0;c>>e&31;if(r>=this.array.length)return this;if(e>0){var o=this.array[r];if((i=o&&o.removeAfter(t,e-5,n))===o&&r===this.array.length-1)return this}var a=qe(this,t);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Ue,Fe={};function Be(t,e){var n=t._origin,i=t._capacity,r=We(i),o=t._tail;return function t(a,s,c){return 0===s?function(t,a){var s=a===r?o&&o.array:t&&t.array,c=a>n?0:n-a,u=i-a;return u>32&&(u=32),function(){if(c===u)return Fe;var t=e?--u:c++;return s&&s[t]}}(a,c):function(r,o,a){var s,c=r&&r.array,u=a>n?0:n-a>>o,l=1+(i-a>>o);return l>32&&(l=32),function(){for(;;){if(s){var n=s();if(n!==Fe)return n;s=null}if(u===l)return Fe;var i=e?--l:u++;s=t(c&&c[i],o-5,a+(i<>>n&31,u=t&&c0){var l=t&&t.array[c],d=He(l,e,n-5,i,o,a);return d===l?t:((s=qe(t,e)).array[c]=d,s)}return u&&t.array[c]===o?t:(a&&r(a),s=qe(t,e),void 0===o&&c===s.array.length-1?s.array.pop():s.array[c]=o,s)}function qe(t,e){return e&&t&&e===t.ownerID?t:new Ne(t?t.array.slice():[],e)}function $e(t,e){if(e>=We(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>i&31],i-=5;return n}}function Qe(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var i=t.__ownerID||new o,r=t._origin,a=t._capacity,s=r+e,c=void 0===n?a:n<0?a+n:r+n;if(s===r&&c===a)return t;if(s>=c)return t.clear();for(var u=t._level,l=t._root,d=0;s+d<0;)l=new Ne(l&&l.array.length?[void 0,l]:[],i),d+=1<<(u+=5);d&&(s+=d,r+=d,c+=d,a+=d);for(var h=We(a),f=We(c);f>=1<h?new Ne([],i):p;if(p&&f>h&&s5;m-=5){var v=h>>>m&31;g=g.array[v]=qe(g.array[v],i)}g.array[h>>>5&31]=p}if(c=f)s-=f,c-=f,u=5,l=null,b=b&&b.removeBefore(i,0,s);else if(s>r||f>>u&31;if(y!==f>>>u&31)break;y&&(d+=(1<r&&(l=l.removeBefore(i,u,s-d)),l&&f>>5<<5}var Ge,Ye=function(t){function e(t){return null==t?Ze():Z(t)?t:Ze().withMutations((function(e){var n=y(t);Ft(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ze()},e.prototype.set=function(t,e){return Xe(this,t,e)},e.prototype.remove=function(t){return Xe(this,t,i)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],n)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?Ke(e,n,t,this.__hash):0===this.size?Ze():(this.__ownerID=t,this._map=e,this._list=n,this)},e}(he);function Ke(t,e,n,i){var r=Object.create(Ye.prototype);return r.size=t?t.size:0,r._map=t,r._list=e,r.__ownerID=n,r.__hash=i,r}function Ze(){return Ge||(Ge=Ke(Ce(),Ve()))}function Xe(t,e,n){var r,o,a=t._map,s=t._list,c=a.get(e),u=void 0!==c;if(n===i){if(!u)return t;s.size>=32&&s.size>=2*a.size?(r=(o=s.filter((function(t,e){return void 0!==t&&c!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(r.__ownerID=o.__ownerID=t.__ownerID)):(r=a.remove(e),o=c===s.size-1?s.pop():s.set(c,void 0))}else if(u){if(n===s.get(c)[1])return t;r=a,o=s.set(c,[e,n])}else r=a.set(e,s.size),o=s.set(s.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=o,t.__hash=void 0,t):Ke(r,o)}function Je(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}Ye.isOrderedMap=Z,Ye.prototype[T]=!0,Ye.prototype.delete=Ye.prototype.remove;var tn=function(t){function e(t){return null==t?on():Je(t)?t:on().pushAll(t)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var n=this._head;for(t=s(this,t);n&&t--;)n=n.next;return n?n.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,n=this._head,i=arguments.length-1;i>=0;i--)n={value:t[i],next:n};return this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):rn(e,n)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&Je(e))return e;Ft(e.size);var n=this.size,i=this._head;return e.__iterate((function(t){n++,i={value:t,next:i}}),!0),this.__ownerID?(this.size=n,this._head=i,this.__hash=void 0,this.__altered=!0,this):rn(n,i)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):on()},e.prototype.slice=function(e,n){if(u(e,n,this.size))return this;var i=l(e,this.size);if(d(n,this.size)!==this.size)return t.prototype.slice.call(this,e,n);for(var r=this.size-i,o=this._head;i--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):rn(r,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?rn(this.size,this._head,t,this.__hash):0===this.size?on():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var n=this;if(e)return new V(this.toArray()).__iterate((function(e,i){return t(e,i,n)}),e);for(var i=0,r=this._head;r&&!1!==t(r.value,i++,this);)r=r.next;return i},e.prototype.__iterator=function(t,e){if(e)return new V(this.toArray()).__iterator(t,e);var n=0,i=this._head;return new P((function(){if(i){var e=i.value;return i=i.next,A(t,n++,e)}return{value:void 0,done:!0}}))},e}(_);tn.isStack=Je;var en,nn=tn.prototype;function rn(t,e,n,i){var r=Object.create(nn);return r.size=t,r._head=e,r.__ownerID=n,r.__hash=i,r.__altered=!1,r}function on(){return en||(en=rn(0))}function an(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function sn(t){return an(t)&&S(t)}function cn(t,e){if(t===e)return!0;if(!p(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||b(t)!==b(e)||g(t)!==g(e)||S(t)!==S(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!m(t);if(S(t)){var r=t.entries();return e.every((function(t,e){var i=r.next().value;return i&&J(i[1],t)&&(n||J(i[0],e))}))&&r.next().done}var o=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{o=!0;var a=t;t=e,e=a}var s=!0,c=e.__iterate((function(e,r){if(n?!t.has(e):o?!J(e,t.get(r,i)):!J(t.get(r,i),e))return s=!1,!1}));return s&&t.size===c}function un(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function ln(t){if(!t||"object"!=typeof t)return t;if(!p(t)){if(!zt(t))return t;t=U(t)}if(b(t)){var e={};return t.__iterate((function(t,n){e[n]=ln(t)})),e}var n=[];return t.__iterate((function(t){n.push(ln(t))})),n}nn["@@__IMMUTABLE_STACK__@@"]=!0,nn.shift=nn.pop,nn.unshift=nn.push,nn.unshiftAll=nn.pushAll,nn.withMutations=ce,nn.wasAltered=de,nn.asImmutable=le,nn["@@transducer/init"]=nn.asMutable=ue,nn["@@transducer/step"]=function(t,e){return t.unshift(e)},nn["@@transducer/result"]=function(t){return t.asImmutable()};var dn=function(t){function e(e){return null==e?gn():an(e)&&!S(e)?e:gn().withMutations((function(n){var i=t(e);Ft(i.size),i.forEach((function(t){return n.add(t)}))}))}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(y(t).keySeq())},e.intersect=function(t){return(t=v(t).toArray()).length?fn.intersect.apply(e(t.pop()),t):gn()},e.union=function(t){return(t=v(t).toArray()).length?fn.union.apply(e(t.pop()),t):gn()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return pn(this,this._map.set(t,t))},e.prototype.remove=function(t){return pn(this,this._map.remove(t))},e.prototype.clear=function(){return pn(this,this._map.clear())},e.prototype.map=function(t,e){var n=this,i=[],r=[];return this.forEach((function(o){var a=t.call(e,o,o,n);a!==o&&(i.push(o),r.push(a))})),this.withMutations((function(t){i.forEach((function(e){return t.remove(e)})),r.forEach((function(e){return t.add(e)}))}))},e.prototype.union=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(n){for(var i=0;i=0&&e=0&&n>>-15,461845907),e=tt(e<<13|e>>>-13,5),e=tt((e=(e+3864292196|0)^t)^e>>>16,2246822507),et((e=tt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){i=31*i+Mn(it(t),it(e))|0}:function(t,e){i=i+Mn(it(t),it(e))|0}:e?function(t){i=31*i+it(t)|0}:function(t){i=i+it(t)|0}),i)}(this))}});var kn=v.prototype;kn["@@__IMMUTABLE_ITERABLE__@@"]=!0,kn[x]=kn.values,kn.toJSON=kn.toArray,kn.__toStringMapper=Vt,kn.inspect=kn.toSource=function(){return this.toString()},kn.chain=kn.flatMap,kn.contains=kn.includes,un(y,{flip:function(){return It(this,yt(this))},mapEntries:function(t,e){var n=this,i=0;return It(this,this.toSeq().map((function(r,o){return t.call(e,[o,r],i++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return It(this,this.toSeq().flip().map((function(i,r){return t.call(e,i,r,n)})).flip())}});var wn=y.prototype;wn["@@__IMMUTABLE_KEYED__@@"]=!0,wn[x]=kn.entries,wn.toJSON=On,wn.__toStringMapper=function(t,e){return Vt(e)+": "+Vt(t)},un(_,{toKeyedSeq:function(){return new bt(this,!1)},filter:function(t,e){return It(this,kt(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return It(this,Ot(this,!1))},slice:function(t,e){return It(this,wt(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(e||0,0),0===n||2===n&&!e)return this;t=l(t,t<0?this.count():this.size);var i=this.slice(0,t);return It(this,1===n?i:i.concat(Nt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return It(this,St(this,t,!1))},get:function(t,e){return(t=s(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,n){return n===t}),void 0,e)},has:function(t){return(t=s(this,t))>=0&&(void 0!==this.size?this.size===1/0||te?-1:0}function Mn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Cn["@@__IMMUTABLE_INDEXED__@@"]=!0,Cn[T]=!0,un(O,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),O.prototype.has=kn.includes,O.prototype.contains=O.prototype.includes,un(F,y.prototype),un(B,_.prototype),un(z,O.prototype);var Dn=function(t){function e(t){return null==t?Nn():sn(t)?t:Nn().withMutations((function(e){var n=O(t);Ft(n.size),n.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(y(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(dn);Dn.isOrderedSet=sn;var Rn,jn=Dn.prototype;function Ln(t,e){var n=Object.create(jn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Nn(){return Rn||(Rn=Ln(Ze()))}jn[T]=!0,jn.zip=Cn.zip,jn.zipWith=Cn.zipWith,jn.__empty=Nn,jn.__make=Ln;var Un=function(t,e){var n,i=function i(o){var a=this;if(o instanceof i)return o;if(!(this instanceof i))return new i(o);if(!n){n=!0;var s=Object.keys(t),c=r._indices={};r._name=e,r._keys=s,r._defaultValues=t;for(var u=0;u=10&&(u|=1<<4-l),4!==l&&(s=e.getNextSet(s),s=e.getNextUnset(s))}if(5!==i.length)throw new c.default;var p=this.determineCheckDigit(u);if(t.extensionChecksum(i.toString())!==p)throw new c.default;return s},t.extensionChecksum=function(t){for(var e=t.length,n=0,i=e-2;i>=0;i-=2)n+=t.charAt(i).charCodeAt(0)-"0".charCodeAt(0);for(n*=3,i=e-1;i>=0;i-=2)n+=t.charAt(i).charCodeAt(0)-"0".charCodeAt(0);return(n*=3)%10},t.prototype.determineCheckDigit=function(t){for(var e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new c.default},t.parseExtensionString=function(e){if(5!==e.length)return null;var n=t.parseExtension5String(e);return null==n?null:new Map([[s.default.SUGGESTED_PRICE,n]])},t.parseExtension5String=function(t){var e;switch(t.charAt(0)){case"0":e="\xa3";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e=""}var n=parseInt(t.substring(1)),i=n%100;return e+(n/100).toString()+"."+(i<10?"0"+i:i.toString())},t}()},orIj:function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o}));var i={USDT:"Tether",USDC:"USD Coin",DAI:"DAI",PAX:"Paxos Standard Token",PAXG:"PAX Gold"},r={USD:"Dollar",ZUSD:"Dollar",EUR:"Euro",ZEUR:"Euro",CAD:"Canadian Dollar",ZCAD:"Canadian Dollar",GBP:"British Pound",ZGBP:"British Pound",CHF:"Swiss Franc",JPY:"Swiss Franc",ZJPY:"Japanese Yen"},o=Object.assign(Object.assign(Object.assign({},{XBT:"Bitcoin",BTC:"Bitcoin",ETH:"Ethereum",XRP:"Ripple XRP",BCH:"Bitcoin Cash",LTC:"Litecoin",EOS:"EOS",BNB:"Binance Coin",BSV:"Bitcoin SV",XMR:"Monero",ADA:"Cardano",XLM:"Stellar",XXLM:"Stellar",TRX:"TRON",LEO:"UNUS SED LEO",HT:"Huobi Token",DASH:"Dash",ETC:"Ethereum Classic",XTZ:"Tezos",MIOTA:"IOTA",NEO:"NEO",LINK:"Chainlink",ATOM:"Cosmos",MKR:"Maker",ONT:"Ontology",XEM:"NEM",CRO:"Crypto.com Chain",ZEC:"Zcash",XZEC:"Zcash",DOGE:"Dogecoin",XXDG:"Dogecoin",HEDG:"HedgeTrade",VSYS:"V Systems",DCR:"Decred",BAT:"Basic Attention Token",VET:"VeChain",QTUM:"Qtum",TUSD:"TrueUSD",BTG:"Bitcoin Gold",ZB:"ZB",OMG:"OmiseGO",RVN:"Ravencoin",KCS:"KuCoin Shares",BTT:"BitTorrent",LSK:"Lisk",ALGO:"Algorand",NANO:"Nano",INB:"Insight Chain",REP:"Augur",XREP:"Augur",BCD:"Bitcoin Diamond",HOT:"Holo",WAVES:"Waves",THETA:"THETA",ICX:"ICON",ZRX:"0x",DGB:"DigiByte",BTS:"BitShares",MAID:"MaidSafeCoin",HC:"HyperCash",BCN:"Bytecoin",LAMB:"Lambda",NPXS:"Pundi X",IOST:"IOST",KMD:"Komodo",NEX:"Nash Exchange",AOA:"Aurora",DAI:"Dai",BTM:"Bytom",SC:"Siacoin",XVG:"Verge",MONA:"MonaCoin",NRG:"Energi",RIF:"RIF Token",QNT:"Quant",ARDR:"Ardor",ENJ:"Enjin Coin",ZIL:"Zilliqa",AE:"Aeternity",GNT:"Golem",STEEM:"Steem",SNT:"Status",MCO:"Crypto.com",SNX:"Synthetix Network Token",NEXO:"Nexo",WIN:"WINk",GXC:"GXChain",XZC:"Zcoin",ABBC:"ABBC Coin",BEAM:"Beam",WTC:"Waltonchain",RDD:"ReddCoin",ELF:"aelf",GRIN:"Grin",DRG:"Dragon Coins",WAX:"WAX",XMX:"XMax",SOLVE:"SOLVE",ETP:"Metaverse ETP",ELA:"Elastos",STRAT:"Stratis",REN:"Ren",GNO:"Gnosis",SOL:"Solana",OP:"Optimism",NEAR:"NEAR Protocol",APE:"APE",AXS:"Axie Infinity Shards",FTM:"Fantom",DOT:"Polkadot",ARB:"Arbitrum",MATIC:"Polygon",FEE:"Kraken Fee Credit",KFEE:"Kraken Fee Credit",FIL:"Filecoin","USD CREDIT":"USD Credit",EURT:"Tether EURt",AVAX:"Avalanche"}),i),r)},oznm:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("w6/c");e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.default)},p3rJ:function(t,e){e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},p5wL:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"e",(function(){return u})),n.d(e,"d",(function(){return l}));var i=n("og7C");function r(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o2?n-2:0),o=2;o=0;n--)t=this.copyBit(8,n,t);var i=this.bitMatrix.getHeight(),o=0,s=i-7;for(n=i-1;n>=s;n--)o=this.copyBit(8,n,o);for(e=i-8;e=0;o--)for(var s=t-9;s>=r;s--)n=this.copyBit(s,o,n);var c=i.default.decodeVersionInformation(n);if(null!==c&&c.getDimensionForVersion()===t)return this.parsedVersion=c,c;for(n=0,s=5;s>=0;s--)for(o=t-9;o>=r;o--)n=this.copyBit(s,o,n);if(null!==(c=i.default.decodeVersionInformation(n))&&c.getDimensionForVersion()===t)return this.parsedVersion=c,c;throw new a.default},t.prototype.copyBit=function(t,e,n){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?n<<1|1:n<<1},t.prototype.readCodewords=function(){var t=this.readFormatInformation(),e=this.readVersion(),n=o.default.values.get(t.getDataMask()),i=this.bitMatrix.getHeight();n.unmaskBitMatrix(this.bitMatrix,i);for(var r=e.buildFunctionPattern(),s=!0,c=new Uint8Array(e.getTotalCodewords()),u=0,l=0,d=0,h=i-1;h>0;h-=2){6===h&&h--;for(var f=0;f1&&void 0!==arguments[1]?arguments[1]:0;return function(t){a(i,t);var n=c(i);function i(){var t;C(this,i);for(var r=arguments.length,o=new Array(r),a=0;a0?n:t}}]),t}(),F=new i.s("mat-date-formats");try{L="undefined"!=typeof Intl}catch(Ft){L=!1}var B={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},z=q(31,(function(t){return String(t+1)})),V={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},H=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function q(t,e){for(var n=Array(t),i=0;i9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(n,t))}return this._stripDirectionalityCharacters(t.toDateString())}},{key:"addCalendarYears",value:function(t,e){return this.addCalendarMonths(t,12*e)}},{key:"addCalendarMonths",value:function(t,e){var n=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(n)!=((this.getMonth(t)+e)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n}},{key:"addCalendarDays",value:function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}},{key:"toIso8601",value:function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}},{key:"deserialize",value:function(t){if("string"==typeof t){if(!t)return null;if(H.test(t)){var e=new Date(t);if(this.isValid(e))return e}}return o(h(n.prototype),"deserialize",this).call(this,t)}},{key:"isDateInstance",value:function(t){return t instanceof Date}},{key:"isValid",value:function(t){return!isNaN(t.getTime())}},{key:"invalid",value:function(){return new Date(NaN)}},{key:"_createDateWithOverflow",value:function(t,e,n){var i=new Date(t,e,n);return t>=0&&t<100&&i.setFullYear(this.getYear(i)-1900),i}},{key:"_2digit",value:function(t){return("00"+t).slice(-2)}},{key:"_stripDirectionalityCharacters",value:function(t){return t.replace(/[\u200e\u200f]/g,"")}},{key:"_format",value:function(t,e){var n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.format(n)}}]),n}(U)).\u0275fac=function(t){return new(t||Q)(i.Yb(N,8),i.Yb(g.a))},Q.\u0275prov=i.Kb({token:Q,factory:Q.\u0275fac}),Q),Z=(($=function t(){C(this,t)}).\u0275mod=i.Mb({type:$}),$.\u0275inj=i.Lb({factory:function(t){return new(t||$)},providers:[{provide:U,useClass:K}],imports:[[g.b]]}),$),X={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},J=((Y=function t(){C(this,t)}).\u0275mod=i.Mb({type:Y}),Y.\u0275inj=i.Lb({factory:function(t){return new(t||Y)},providers:[{provide:F,useValue:X}],imports:[[Z]]}),Y),tt=((G=function(){function t(){C(this,t)}return w(t,[{key:"isErrorState",value:function(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}]),t}()).\u0275fac=function(t){return new(t||G)},G.\u0275prov=Object(i.Kb)({factory:function(){return new G},token:G,providedIn:"root"}),G),et=((W=function t(){C(this,t)}).\u0275fac=function(t){return new(t||W)},W.\u0275dir=i.Jb({type:W,selectors:[["","mat-line",""],["","matLine",""]],hostAttrs:[1,"mat-line"]}),W);function nt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mat";t.changes.pipe(Object(m.a)(t)).subscribe((function(t){var i=t.length;it(e,n+"-2-line",!1),it(e,n+"-3-line",!1),it(e,n+"-multi-line",!1),2===i||3===i?it(e,"".concat(n,"-").concat(i,"-line"),!0):i>3&&it(e,n+"-multi-line",!0)}))}function it(t,e,n){var i=t.nativeElement.classList;n?i.add(e):i.remove(e)}var rt,ot,at,st,ct,ut,lt,dt,ht=((rt=function t(){C(this,t)}).\u0275mod=i.Mb({type:rt}),rt.\u0275inj=i.Lb({factory:function(t){return new(t||rt)},imports:[[P],P]}),rt),ft=function(){function t(e,n,i){C(this,t),this._renderer=e,this.element=n,this.config=i,this.state=3}return w(t,[{key:"fadeOut",value:function(){this._renderer.fadeOutRipple(this)}}]),t}(),pt={enterDuration:450,exitDuration:400},bt=Object(g.f)({passive:!0}),gt=["mousedown","touchstart"],mt=["mouseup","mouseleave","touchend","touchcancel"],vt=function(){function t(e,n,i,r){C(this,t),this._target=e,this._ngZone=n,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Object(f.e)(i))}return w(t,[{key:"fadeInRipple",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=Object.assign(Object.assign({},pt),i.animation);i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);var a=i.radius||function(t,e,n){var i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),r=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+r*r)}(t,e,r),s=t-r.left,c=e-r.top,u=o.enterDuration,l=document.createElement("div");l.classList.add("mat-ripple-element"),l.style.left=s-a+"px",l.style.top=c-a+"px",l.style.height=2*a+"px",l.style.width=2*a+"px",null!=i.color&&(l.style.backgroundColor=i.color),l.style.transitionDuration=u+"ms",this._containerElement.appendChild(l),window.getComputedStyle(l).getPropertyValue("opacity"),l.style.transform="scale(1)";var d=new ft(this,l,i);return d.state=0,this._activeRipples.add(d),i.persistent||(this._mostRecentTransientRipple=d),this._runTimeoutOutsideZone((function(){var t=d===n._mostRecentTransientRipple;d.state=1,i.persistent||t&&n._isPointerDown||d.fadeOut()}),u),d}},{key:"fadeOutRipple",value:function(t){var e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),e){var n=t.element,i=Object.assign(Object.assign({},pt),t.config.animation);n.style.transitionDuration=i.exitDuration+"ms",n.style.opacity="0",t.state=2,this._runTimeoutOutsideZone((function(){t.state=3,n.parentNode.removeChild(n)}),i.exitDuration)}}},{key:"fadeOutAll",value:function(){this._activeRipples.forEach((function(t){return t.fadeOut()}))}},{key:"setupTriggerEvents",value:function(t){var e=Object(f.e)(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(gt))}},{key:"handleEvent",value:function(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(mt),this._pointerUpEventsRegistered=!0)}},{key:"_onMousedown",value:function(t){var e=Object(r.l)(t),n=this._lastTouchStartEvent&&Date.now()1&&void 0!==arguments[1]?arguments[1]:0;this._ngZone.runOutsideAngular((function(){return setTimeout(t,e)}))}},{key:"_registerEvents",value:function(t){var e=this;this._ngZone.runOutsideAngular((function(){t.forEach((function(t){e._triggerElement.addEventListener(t,e,bt)}))}))}},{key:"_removeTriggerEvents",value:function(){var t=this;this._triggerElement&&(gt.forEach((function(e){t._triggerElement.removeEventListener(e,t,bt)})),this._pointerUpEventsRegistered&&mt.forEach((function(e){t._triggerElement.removeEventListener(e,t,bt)})))}}]),t}(),yt=new i.s("mat-ripple-global-options"),_t=((ct=function(){function t(e,n,i,r,o){C(this,t),this._elementRef=e,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=r||{},this._rippleRenderer=new vt(this,n,e,i)}return w(t,[{key:"ngOnInit",value:function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}},{key:"ngOnDestroy",value:function(){this._rippleRenderer._removeTriggerEvents()}},{key:"fadeOutAll",value:function(){this._rippleRenderer.fadeOutAll()}},{key:"_setupTriggerEventsIfEnabled",value:function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}},{key:"launch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign(Object.assign({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=t,this._setupTriggerEventsIfEnabled()}},{key:"trigger",get:function(){return this._trigger||this._elementRef.nativeElement},set:function(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}},{key:"rippleConfig",get:function(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}},{key:"rippleDisabled",get:function(){return this.disabled||!!this._globalOptions.disabled}}]),t}()).\u0275fac=function(t){return new(t||ct)(i.Ob(i.l),i.Ob(i.B),i.Ob(g.a),i.Ob(yt,8),i.Ob(v.a,8))},ct.\u0275dir=i.Jb({type:ct,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&i.Gb("mat-ripple-unbounded",e.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),ct),Ot=((st=function t(){C(this,t)}).\u0275mod=i.Mb({type:st}),st.\u0275inj=i.Lb({factory:function(t){return new(t||st)},imports:[[P,g.b],P]}),st),kt=((at=function t(e){C(this,t),this._animationMode=e,this.state="unchecked",this.disabled=!1}).\u0275fac=function(t){return new(t||at)(i.Ob(v.a,8))},at.\u0275cmp=i.Ib({type:at,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(t,e){2&t&&i.Gb("mat-pseudo-checkbox-indeterminate","indeterminate"===e.state)("mat-pseudo-checkbox-checked","checked"===e.state)("mat-pseudo-checkbox-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(t,e){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n'],encapsulation:2,changeDetection:0}),at),wt=((ot=function t(){C(this,t)}).\u0275mod=i.Mb({type:ot}),ot.\u0275inj=i.Lb({factory:function(t){return new(t||ot)}}),ot),Ct=A((function t(){C(this,t)})),Tt=0,St=((ut=function(t){a(n,t);var e=c(n);function n(){var t;return C(this,n),(t=e.apply(this,arguments))._labelId="mat-optgroup-label-"+Tt++,t}return n}(Ct)).\u0275fac=function(t){return Et(t||ut)},ut.\u0275dir=i.Jb({type:ut,inputs:{label:"label"},features:[i.zb]}),ut),Et=i.Wb(St),xt=new i.s("MatOptgroup"),Pt=0,At=function t(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];C(this,t),this.source=e,this.isUserInput=n},It=new i.s("MAT_OPTION_PARENT_COMPONENT"),Mt=((dt=function(){function t(e,n,r,o){C(this,t),this._element=e,this._changeDetectorRef=n,this._parent=r,this.group=o,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+Pt++,this.onSelectionChange=new i.o,this._stateChanges=new p.b}return w(t,[{key:"select",value:function(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"focus",value:function(t,e){var n=this._getHostElement();"function"==typeof n.focus&&n.focus(e)}},{key:"setActiveStyles",value:function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}},{key:"setInactiveStyles",value:function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}},{key:"getLabel",value:function(){return this.viewValue}},{key:"_handleKeydown",value:function(t){t.keyCode!==y.e&&t.keyCode!==y.m||Object(y.r)(t)||(this._selectViaInteraction(),t.preventDefault())}},{key:"_selectViaInteraction",value:function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}},{key:"_getAriaSelected",value:function(){return this.selected||!this.multiple&&null}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._element.nativeElement}},{key:"ngAfterViewChecked",value:function(){if(this._selected){var t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_emitSelectionChangeEvent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.onSelectionChange.emit(new At(this,t))}},{key:"multiple",get:function(){return this._parent&&this._parent.multiple}},{key:"selected",get:function(){return this._selected}},{key:"disabled",get:function(){return this.group&&this.group.disabled||this._disabled},set:function(t){this._disabled=Object(f.c)(t)}},{key:"disableRipple",get:function(){return this._parent&&this._parent.disableRipple}},{key:"active",get:function(){return this._active}},{key:"viewValue",get:function(){return(this._getHostElement().textContent||"").trim()}}]),t}()).\u0275fac=function(t){return new(t||dt)(i.Ob(i.l),i.Ob(i.h),i.Ob(void 0),i.Ob(St))},dt.\u0275dir=i.Jb({type:dt,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),dt),Dt=((lt=function(t){a(n,t);var e=c(n);function n(t,i,r,o){return C(this,n),e.call(this,t,i,r,o)}return n}(Mt)).\u0275fac=function(t){return new(t||lt)(i.Ob(i.l),i.Ob(i.h),i.Ob(It,8),i.Ob(xt,8))},lt.\u0275cmp=i.Ib({type:lt,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(t,e){1&t&&i.bc("click",(function(){return e._selectViaInteraction()}))("keydown",(function(t){return e._handleKeydown(t)})),2&t&&(i.Xb("id",e.id),i.Db("tabindex",e._getTabIndex())("aria-selected",e._getAriaSelected())("aria-disabled",e.disabled.toString()),i.Gb("mat-selected",e.selected)("mat-option-multiple",e.multiple)("mat-active",e.active)("mat-option-disabled",e.disabled))},exportAs:["matOption"],features:[i.zb],ngContentSelectors:k,decls:4,vars:3,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"]],template:function(t,e){1&t&&(i.lc(),i.Oc(0,_,1,2,"mat-pseudo-checkbox",0),i.Ub(1,"span",1),i.kc(2),i.Tb(),i.Pb(3,"div",2)),2&t&&(i.mc("ngIf",e.multiple),i.Cb(3),i.mc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disabled||e.disableRipple))},directives:[d.n,_t,kt],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.cdk-high-contrast-active .mat-option .mat-option-ripple{opacity:.5}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),lt);function Rt(t,e,n){if(n.length){for(var i=e.toArray(),r=n.toArray(),o=0,a=0;an+i?Math.max(0,t-i+e):n}var Lt,Nt=((Lt=function t(){C(this,t)}).\u0275mod=i.Mb({type:Lt}),Lt.\u0275inj=i.Lb({factory:function(t){return new(t||Lt)},imports:[[Ot,d.c,wt]]}),Lt),Ut=new i.s("mat-label-global-options")},pUSv:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("iiuT"),a=n("LqyJ"),s=n("dyLe");e.default=function(t){function e(){var e=t.call(this)||this;return e.decodeFinderCounters=new Array(4),e.dataCharacterCounters=new Array(8),e.oddRoundingErrors=new Array(4),e.evenRoundingErrors=new Array(4),e.oddCounts=new Array(e.dataCharacterCounters.length/2),e.evenCounts=new Array(e.dataCharacterCounters.length/2),e}return r(e,t),e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(t,n){for(var i=0;ii&&(i=e[r],n=r);t[n]++},e.decrement=function(t,e){for(var n=0,i=e[0],r=1;r=e.MIN_FINDER_PATTERN_RATIO&&i<=e.MAX_FINDER_PATTERN_RATIO){for(var r=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,a=0,s=t;ao&&(o=c),c1&&void 0!==arguments[1]&&arguments[1];if(!t)return e?"1.2-2":"1.0-0";switch(t.toUpperCase()){case"XBT":case"BTC":return e?"1.8-8":"1.4-4";case"ETH":case"LTC":case"BCH":return e?"1.4-4":"1.3-3";case"XRP":case"EUR":case"USD":default:return"1.2-2"}}function a(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return 2;switch(t.toUpperCase()){case"XBT":case"BTC":return e?8:6;case"ETH":return e?4:5;case"LTC":return 4;case"BCH":return e?4:5;case"XRP":case"EUR":case"USD":default:return 2}}function s(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Math.min(20,Math.max(0,-Math.floor(Math.log10(t.tickSize))))||0,r=a(Object(i.p)(t.symbol),e);return Math.max(r,n)}},ppTs:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r}));var i=function(t){return["GB","GBR"].includes(t)?"GBR":["AUS","AU"].includes(t)?"AUS":["ITA","IT"].includes(t)?"ITA":["ES","ESP"].includes(t)?"ESP":t},r=["GBR","AUS","ITA","ESP"]},prE9:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n("Efrr"),r=n("uCWR"),o=function(){function t(e){C(this,t),this.durationSelector=e}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new s(t,this.durationSelector))}}]),t}(),s=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this,t)).durationSelector=i,r.hasValue=!1,r}return w(n,[{key:"_next",value:function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e;try{e=(0,this.durationSelector)(t)}catch(i){return this.destination.error(i)}var n=Object(r.c)(e,new r.a(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},{key:"clearThrottle",value:function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))}},{key:"notifyNext",value:function(){this.clearThrottle()}},{key:"notifyComplete",value:function(){this.clearThrottle()}}]),n}(r.b),u=n("8lHc");function l(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.a;return e=function(){return Object(u.a)(t,n)},function(t){return t.lift(new o(e))}}},"q+cW":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("+luX"),r=n("ssKD"),o=n("1XZd"),a=n("KZGf"),s=n("oznm"),c=function(){function t(t,e,n,i){if(this.width=t,this.height=e,this.rowSize=n,this.bits=i,null==e&&(e=t),this.height=e,t<1||e<1)throw new s.default("Both dimensions must be greater than 0");null==n&&(n=Math.floor((t+31)/32)),this.rowSize=n,null==i&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var n=e.length,i=e[0].length,r=new t(i,n),o=0;oa){if(-1===c)c=o-a;else if(o-a!==c)throw new s.default("row lengths do not match");a=o,u++}l++}else if(e.substring(l,l+n.length)===n)l+=n.length,r[o]=!0,o++;else{if(e.substring(l,l+i.length)!==i)throw new s.default("illegal character encountered: "+e.substring(l));l+=i.length,r[o]=!1,o++}if(o>a){if(-1===c)c=o-a;else if(o-a!==c)throw new s.default("row lengths do not match");u++}for(var d=new t(c,u),h=0;h>>(31&t)&1)},t.prototype.set=function(t,e){var n=e*this.rowSize+Math.floor(t/32);this.bits[n]|=1<<(31&t)&4294967295},t.prototype.unset=function(t,e){var n=e*this.rowSize+Math.floor(t/32);this.bits[n]&=~(1<<(31&t)&4294967295)},t.prototype.flip=function(t,e){var n=e*this.rowSize+Math.floor(t/32);this.bits[n]^=1<<(31&t)&4294967295},t.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new s.default("input matrix dimensions do not match");for(var e=new i.default(Math.floor(this.width/32)+1),n=this.rowSize,r=this.bits,o=0,a=this.height;othis.height||r>this.width)throw new s.default("The region must fit inside the matrix");for(var a=this.rowSize,c=this.bits,u=e;ua&&(a=s),32*co){for(l=31;u>>>l==0;)l--;32*c+l>o&&(o=32*c+l)}}}return o=0&&0===e[n];)n--;if(n<0)return null;for(var i=Math.floor(n/t),r=32*Math.floor(n%t),o=e[n],a=31;o>>>a==0;)a--;return Int32Array.from([r+=a,i])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){return e instanceof t&&this.width===e.width&&this.height===e.height&&this.rowSize===e.rowSize&&o.default.equals(this.bits,e.bits)},t.prototype.hashCode=function(){var t=this.width;return 31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+o.default.hashCode(this.bits)},t.prototype.toString=function(t,e,n){return void 0===t&&(t="x"),void 0===e&&(e=" "),void 0===n&&(n="\n"),this.buildToString(t,e,n)},t.prototype.buildToString=function(t,e,n){var i=new a.default;i.append(n);for(var r=0,o=this.height;rn||c<-1||c>r)throw new i.default;o=!1,-1===s?(e[a]=0,o=!0):s===n&&(e[a]=n-1,o=!0),-1===c?(e[a+1]=0,o=!0):c===r&&(e[a+1]=r-1,o=!0)}for(o=!0,a=e.length-2;a>=0&&o;a-=2){if(s=Math.floor(e[a]),c=Math.floor(e[a+1]),s<-1||s>n||c<-1||c>r)throw new i.default;o=!1,-1===s?(e[a]=0,o=!0):s===n&&(e[a]=n-1,o=!0),-1===c?(e[a+1]=0,o=!0):c===r&&(e[a+1]=r-1,o=!0)}},t}()},qAYy:function(t,e,n){"use strict";n.d(e,"c",(function(){return v})),n.d(e,"k",(function(){return _})),n.d(e,"p",(function(){return w})),n.d(e,"d",(function(){return C})),n.d(e,"o",(function(){return T})),n.d(e,"g",(function(){return P})),n.d(e,"i",(function(){return A})),n.d(e,"h",(function(){return I})),n.d(e,"m",(function(){return M})),n.d(e,"n",(function(){return D})),n.d(e,"l",(function(){return j})),n.d(e,"q",(function(){return L})),n.d(e,"e",(function(){return N})),n.d(e,"j",(function(){return U})),n.d(e,"f",(function(){return F})),n.d(e,"b",(function(){return B})),n.d(e,"a",(function(){return z}));var i=n("zqNl"),r=n("og7C"),o=n("p5wL"),a=n("TYVA"),s=n("a1kK"),c=n("vYTc"),u=n("ND+C"),l=n("+Px6"),d=n("rxqU"),h=n("7KkP"),p=n("+axt"),g={detailed:Object(r.b)(),lite:Object(r.b)()},m=Object(i.i)(g,Object(i.k)(u.a,(function(t,e){var n=e.ticker;return Object(o.b)(t.lite.set(n.product_id,n),t,"lite")})),Object(i.k)(u.b,(function(t,e){var n=e.tickers;return Object(o.a)(n,t,"lite")})),Object(i.k)(u.c,(function(t,e){var n=e.ticker;return Object(o.b)(t.detailed.set(n.product_id,n),t,"detailed")})),Object(i.k)(u.d,(function(t,e){var n=e.tickers;return Object(o.a)(n,t,"detailed")})));function v(t,e){return m(t,e)}var y=Object(i.h)("tickers"),_=Object(i.j)(y,(function(t){return t.lite})),O=Object(i.j)(y,(function(t){return t.detailed})),k=Object(i.j)(O,l.d,d.r,(function(t,e,n){return t.map(Object(h.f)(e,n))})),w=Object(i.j)(k,l.r,l.j,(function(t,e,n){var i=t.get(e);if(void 0!==i)return Object(s.e)(n,i,"product_id")})),C=Object(i.j)(l.j,k,(function(t,e,n){var i=e.get(n.symbol);if(void 0!==i)return Object(s.e)(t,i,"product_id")})),T=Object(i.j)(_,d.r,l.j,(function(t,e,n){var i=t.map(Object(h.e)(e));return Object(s.d)(n,i,"product_id")})),S=Object(i.j)(T,(function(t){return t.valueSeq().filter((function(t){return"perpetual"===t.tag})).filter((function(t){return Object(a.x)(t.product_id)})).toArray()})),E=Object(i.j)(T,(function(t){return t.filter((function(t){return!Object(c.a)(t.product_id)}))})),x=Object(i.j)(T,(function(t){return t.filter((function(t){return Object(c.a)(t.product_id)}))})),P=Object(i.j)(T,(function(t){return t.filter((function(t){return null!=Object(a.x)(t.product_id)}))})),A=Object(i.j)(E,(function(t){return t.reduce((function(t,e){var n=Object(a.m)(e.product_id);return Object.assign(Object.assign({},t),t[n]?f({},n,[].concat(b(t[n]),[e]).sort(c.d).sort(c.e).sort(c.g)):f({},n,[e]))}),{})})),I=Object(i.j)(x,(function(t){return t.reduce((function(t,e){var n=Object(a.m)(e.product_id);return Object.assign(Object.assign({},t),t[n]?f({},n,[].concat(b(t[n]),[e]).sort(c.d).sort(c.e).sort(c.g)):f({},n,[e]))}),{})})),M=Object(i.j)(T,(function(t){return t.sort(c.g).sort(c.f).map((function(t){return t.pair})).toOrderedSet().toArray()})),D=Object(i.j)(S,(function(t){return t.sort(c.g).sort(c.f)})),R=Object(i.j)(T,l.r,(function(t,e){return t.filter((function(t){return t.pair===Object(a.o)(e)})).toOrderedMap().sort(Object(c.h)((function(t){return t.tag}),a.r))})),j=Object(i.j)(R,(function(t){return t.map((function(t){return{symbol:t.product_id,tag:t.tag,customPerp:Object(a.u)(t.product_id).customTag}})).valueSeq()})),L=Object(i.j)(w,(function(t){var e;return Number(null!==(e=null==t?void 0:t.leverage.split("x")[0])&&void 0!==e?e:1)})),N=Object(i.j)(P,(function(t){return t.reduce((function(t,e){var n=e.category;return n&&!t.includes(n)&&t.push(n),t}),[])})),U=Object(i.j)(E,(function(t){return t.filter((function(t){return"perpetual"===t.tag})).valueSeq().toArray().sort((function(t,e){return t.volume>=e.volume?-1:1}))})),F=Object(i.j)(x,d.p,(function(t,e){var n=t.valueSeq().filter((function(t){return e.has(Object(c.i)(t))})).toArray(),i=t.groupBy((function(t){return t.category})).map((function(t){return t.valueSeq().toArray()})).valueSeq().toArray().sort((function(t,e){return t.reduce((function(t,e){return t+e.notionalVolume}),0)>=e.reduce((function(t,e){return t+e.notionalVolume}),0)?-1:1})).map((function(t){return t.sort((function(t,e){return t.notionalVolume>=e.notionalVolume?-1:1}))})).map((function(t){return t.slice(0,3)}));return i.unshift(n),b(new Set(i.flat()))})),B=Object(i.j)(w,d.p,(function(t,e){return t&&e.has(Object(c.i)(t))})),z=Object(i.j)(p.a,w,(function(t,e){var n;return e&&(null===(n=t.get(e.pair.split("/")[0]))||void 0===n?void 0:n.price)}))},qArU:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}()},qEfY:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i="function"==typeof Symbol&&Symbol.observable||"@@observable"},qZtG:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("ROBh"),r=n("mawV");function o(){return Object(r.a)()(Object(i.a).apply(void 0,arguments))}},qvG1:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("KZGf"),r=n("2gaf");e.default=function(){function t(t,e){this.width=t,this.height=e}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(t,e,n,i){throw new r.default("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new r.default("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new r.default("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new i.default,n=0;n4294967295)throw new Error("input must fit within a 32-bit range");return new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,(255&t)>>0])}function h(t){if(4!==t.byteLength)throw new Error("input array must be 4 bytes in length");return new DataView(t.buffer).getUint32(0,!1)}var f,p=n("kZht"),b=n("6uGs"),g=((f=function(){function t(e,n){C(this,t),this.http=e,this.env=n}return w(t,[{key:"isSignedIn",value:function(){return this.http.get(this.env.urls.auth+"/is-logged-in",c.a)}},{key:"signIn",value:function(t){var e=this,n=t.email,i=t.password,o=t.otp;return this.addPowToPayload({email:n,password:i,totp:o}).pipe(Object(r.a)((function(t){return e.http.post(e.env.urls.auth+"/token",t,c.a)})))}},{key:"signOut",value:function(){return this.http.request("delete",this.env.urls.auth+"/token",Object.assign(Object.assign({},c.a),{observe:"response",responseType:"json"}))}},{key:"signUp",value:function(t){var e=this,n=t.email,i=t.password,o=t.accountType,a=t.marketing,s=t.acknowledgement,u=t.affiliateUid,l=t.allowPwned,d=Object.assign(Object.assign({email:n,password:i,accountType:o,verifyPassword:i,newsletter:a,readAndAgree:s},u&&{affiliateUid:u}),{allowPwned:l});return this.addPowToPayload(d).pipe(Object(r.a)((function(t){return e.http.post(e.env.urls.auth+"/sign-up",t,c.a)})))}},{key:"activateAccount",value:function(t){return this.http.post(this.env.urls.auth+"/activate-account",{uid:t},c.a)}},{key:"requestPasswordReset",value:function(t){var e=this;return this.addPowToPayload({email:t}).pipe(Object(r.a)((function(t){return e.http.post(e.env.urls.auth+"/password-reset/request",t,c.a)})))}},{key:"confirmPasswordReset",value:function(t){var e=this;return this.addPowToPayload(t).pipe(Object(r.a)((function(t){return e.http.post(e.env.urls.auth+"/password-reset/confirm",t,c.a)})))}},{key:"changePassword",value:function(t){var e=this,n=Object.assign(Object.assign({},t),{newPasswordVerify:t.newPassword});return this.addPowToPayload(n).pipe(Object(r.a)((function(t){return e.http.post(e.env.urls.auth+"/account/change-password",t,c.a)})))}},{key:"activateTotp",value:function(t,e){return this.http.post(this.env.urls.auth+"/totp/activate",{secret:t,totp:e},c.a)}},{key:"deactivateTotp",value:function(t){var e=this;return this.addPowToPayload({totp:t}).pipe(Object(r.a)((function(t){return e.http.post(e.env.urls.auth+"/totp/deactivate",t,c.a)})))}},{key:"getActiveSessions",value:function(){return this.http.get(this.env.urls.auth+"/tokens",c.a)}},{key:"deleteSession",value:function(t){return this.http.request("delete",this.env.urls.auth+"/token?only=json",Object.assign(Object.assign({},c.a),{body:{token:t}}))}},{key:"replenishSession",value:function(){return this.http.post(this.env.urls.auth+"/refresh",void 0,c.a)}},{key:"fetchSessionLength",value:function(){return this.http.get(this.env.urls.auth+"/account/token-lifespan",c.a)}},{key:"changeSessionLength",value:function(t){return this.http.put(this.env.urls.auth+"/account/token-lifespan",{lifespan:t},c.a).pipe(Object(o.a)(t))}},{key:"requestMobileToken",value:function(t){return this.http.post(this.env.urls.auth+"/mobile-token/request",{mfaRequestId:t.mfaRequestId},c.a)}},{key:"scanMobileToken",value:function(t){return this.http.post(this.env.urls.auth+"/mobile-token/scan",t,c.a)}},{key:"confirmMobileSession",value:function(t){return this.http.post(this.env.urls.auth+"/mobile-token/confirm",t,c.a)}},{key:"checkStatusConfirmationCode",value:function(t){return this.http.post(this.env.urls.auth+"/mobile-token/status",{uid:t},c.a)}},{key:"requestPowChallenge",value:function(){return this.http.get(this.env.urls.auth+"/pow",c.a)}},{key:"solvePowChallenge",value:function(t){var e=t.seed,n=t.steps,r=t.target;return Object(i.a)(function(t,e,n){return Object(u.a)(this,void 0,void 0,regeneratorRuntime.mark((function i(){var r,o,a,s,c,u,f,p;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:r=[],o="string"==typeof t?function(t){if(64!==t.trim().length)throw new Error("hex encoded input must be equivalent to 32 bytes");var e=function(t){for(var e=[],n=t;n.length>0;){var i=n.slice(0,2);n=n.slice(2);var r=parseInt(i,16);e.push(r)}return new Uint8Array(e)}(t);if(32!==e.length)throw new Error("parsed hex must be 32 bytes");return e}(t):t,a=Date.now(),i.prev=3;case 4:if(!(r.length button[_ngcontent-%COMP%]{width:100%;margin-bottom:var(--spacing)}.sign-up-inner[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{border:solid var(--warn-colour);text-align:center;padding:var(--spacing);margin:var(--spacing) 0}.sign-up-inner[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:var(--spacing) 0;width:100%}.sign-up-inner[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{text-align:left}.sign-up-inner[_ngcontent-%COMP%] form[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{margin-top:var(--spacing)}markdown[_ngcontent-%COMP%] a{color:var(--link-colour)}"],changeDetection:0}),t=Object(i.d)([Object(f.a)()],t)}()},rTkt:function(t,e,n){"use strict";function i(t,e,n){var i=e.getPropertyValue(t).trim();n.contentDocument&&n.contentDocument.documentElement&&n.contentDocument.documentElement.style.setProperty(t,i)}function r(t){if("auto"===t){if(!window||!("matchMedia"in window))return"dark";var e=window.matchMedia("(prefers-color-scheme: dark)").matches,n=window.matchMedia("(prefers-color-scheme: light)").matches;return e?"dark":n?"light":"dark"}return t}n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return r}))},rUBT:function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"f",(function(){return s})),n.d(e,"b",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"e",(function(){return l})),n.d(e,"d",(function(){return d})),n.d(e,"c",(function(){return h}));var i=n("TYVA"),r=n("mlVJ"),o=n("kZht"),a=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){try{return Object(i.m)(t)}catch(e){return t}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Nb({name:"base",type:t,pure:!0}),t}(),s=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){try{return Object(i.p)(t)}catch(e){return t}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Nb({name:"quote",type:t,pure:!0}),t}(),c=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){try{return Object(i.n)(t).replace(r.b,"BTC")}catch(e){return t.replace(r.b,"BTC")}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Nb({name:"collateral",type:t,pure:!0}),t}(),u=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){try{return Object(i.z)(t)}catch(e){return t}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Nb({name:"traded",type:t,pure:!0}),t}(),l=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){if(null==t)return null;var e="";try{e="string"==typeof t?Object(i.o)(t):"symbol"in t&&t.type.startsWith("futures")?Object(i.o)(t.symbol):"pair"in t?t.pair:String(t)}catch(n){e=String(t)}return e.replace(r.b,"BTC")}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Nb({name:"pair",type:t,pure:!0}),t}(),d=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long";if(null==t)return null;try{return"string"==typeof t?Object(i.i)(t,e):"symbol"in t?Object(i.i)(t.symbol,e):"product_id"in t?Object(i.i)(t.product_id,e):String(t)}catch(n){return String(t)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Nb({name:"maturityMonth",type:t,pure:!0}),t}(),h=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){if(null==t)return null;try{return"string"==typeof t?Object(i.f)(t):String(t)}catch(e){return String(t)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Nb({name:"contractFamily",type:t,pure:!0}),t}()},rWo0:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("HgnN"),r=n("i9P/"),o={closed:!0,next:function(t){},error:function(t){if(i.a.useDeprecatedSynchronousErrorHandling)throw t;Object(r.a)(t)},complete:function(){}}},rcUp:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return""+t.substring(0,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Nb({name:"truncate",type:t,pure:!0}),t}()},rfPA:function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var i=n("kZht"),r=n("mcff"),o=n("Asjx"),a=n("F6wS"),s=n("An66"),c=n("1etq"),u=n("NxuZ"),l=n("h2+Y"),d=n("aDqW");function h(t,e){if(1&t){var n=i.Vb();i.Ub(0,"mat-card-title"),i.Ub(1,"p",2),i.Qc(2),i.gc(3,"translate"),i.Tb(),i.Ub(4,"fa-icon",3),i.bc("click",(function(){return i.Ec(n),i.fc().closeDialog()})),i.Tb(),i.Tb()}if(2&t){var r=i.fc();i.Cb(2),i.Rc(i.ic(3,1,r.heading,r.interpolate))}}function f(t,e){1&t&&i.Pb(0,"mat-progress-bar",4)}var p=["*"],b=function(){var t=function(){function t(e,n){C(this,t),this.dialogRef=e,this.breakpointObserver=n,this.padding="l",this.loading=!1}return w(t,[{key:"ngOnInit",value:function(){this.setDialogSize()}},{key:"setDialogSize",value:function(){this.breakpointObserver.isMatched("(max-width: 599px)")?this.dialogRef.updateSize("100%","100%"):this.dialogRef.updateSize("auto","auto")}},{key:"closeDialog",value:function(){this.dialogRef.close()}},{key:"paddingSize",get:function(){return this.padding?"var(--spacing-".concat(this.padding,")"):"0"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(r.d),i.Ob(o.a))},t.\u0275cmp=i.Ib({type:t,selectors:[["pro-dialog"]],inputs:{heading:"heading",interpolate:"interpolate",padding:"padding",loading:"loading"},ngContentSelectors:p,decls:5,vars:4,consts:[[4,"ngIf"],["mode","indeterminate",4,"ngIf"],["subheading",""],["icon","close-medium","size","lg",1,"close",3,"click"],["mode","indeterminate"]],template:function(t,e){1&t&&(i.lc(),i.Ub(0,"mat-card"),i.Oc(1,h,5,4,"mat-card-title",0),i.Oc(2,f,1,0,"mat-progress-bar",1),i.Ub(3,"mat-card-content"),i.kc(4),i.Tb(),i.Tb()),2&t&&(i.Cb(1),i.mc("ngIf",e.heading),i.Cb(1),i.mc("ngIf",e.loading),i.Cb(1),i.Lc("padding",e.paddingSize))},directives:[a.a,s.n,a.b,a.d,c.a,u.b,l.a],pipes:[d.d],styles:["[_nghost-%COMP%]{display:block;height:100%;min-width:300px}[_nghost-%COMP%] mat-card-title[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{color:var(--text-colour);cursor:pointer}@media (max-width:1024px){[_nghost-%COMP%] mat-card[_ngcontent-%COMP%]{overflow-y:scroll}}@media (min-width:1025px) and (max-width:1366px){[_nghost-%COMP%] mat-card-content[_ngcontent-%COMP%]{max-height:500px}}@media (min-width:1367px) and (max-width:1440px){[_nghost-%COMP%] mat-card-content[_ngcontent-%COMP%]{max-height:650px}}"],changeDetection:0}),t}()},rgaJ:function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i,r=n("kZht"),o=n("KQpv"),a=n.n(o),s=a()("menuAim"),c=a()("trace:menuAim"),u={passive:!0},l=[],d=0,h=((i=function(){function t(e,n){var i,o,a,s,c;C(this,t),this.zone=e,this.element=n,this.exitMenuTrigger=!0,this.opts={},this.enter$=new r.o,this.exit$=new r.o,this.activate$=new r.o,this.deactivate$=new r.o,this.clickRow$=new r.o,this.exitMenu$=new r.o,this.config={exitDelay:null!==(i=this.opts.exitDelay)&&void 0!==i?i:0,subMenuSelector:null!==(o=this.opts.subMenuSelector)&&void 0!==o?o:"*",subMenuDirection:null!==(a=this.opts.subMenuDirection)&&void 0!==a?a:"right",tolerance:null!==(s=this.opts.tolerance)&&void 0!==s?s:75,isRoot:null===(c=this.opts.isRoot)||void 0===c||c}}return w(t,[{key:"ngAfterViewInit",value:function(){this.attach(this.element.nativeElement)}},{key:"ngOnDestroy",value:function(){this.detach()}},{key:"attach",value:function(t){var e=this;this.menu=t;var n=function(t){return e.zone.run((function(){return e.mouseenterRow(t)}))};if(this.overListener=n,this.menu.addEventListener("mouseover",n,u),this.config.isRoot){var i=function(t){return e.zone.run((function(){return e.mouseleaveMenu(t)}))};this.leaveListener=i,this.menu.addEventListener("mouseleave",i,u)}1==++d&&document.addEventListener("mousemove",f,u)}},{key:"mouseleaveMenu",value:function(t){this.timeoutId&&(window.clearTimeout(this.timeoutId),this.timeoutId=void 0),this.config.exitDelay?(this.exitTimeoutID&&window.clearTimeout(this.exitTimeoutID),this.exitTimeoutID=window.setTimeout(this.commitExit,this.config.exitDelay)):this.commitExit()}},{key:"forceExit",value:function(){this.exitTimeoutID&&window.clearTimeout(this.exitTimeoutID),this.commitExit()}},{key:"commitExit",value:function(){this.timeoutId=this.exitTimeoutID=void 0,this.exitMenuTrigger&&this.activeRow&&(this.activeRow=void 0,this.deactivate$.emit(this.activeRow)),this.exitMenu$.emit()}},{key:"mouseenterRow",value:function(t){var e=t.target;if(e!==this.menu)if(this.exitTimeoutID&&(clearTimeout(this.exitTimeoutID),this.exitTimeoutID=void 0),this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=void 0),e.matches("".concat(this.rowSelector,", ").concat(this.rowSelector," *"))){for(;!e.matches(this.rowSelector);)e=e.parentElement;e!==this.activeRow&&(e&&this.enter$.emit(e),this.possiblyActivate(e))}else console.warn("firing mouseenter on wrong element",e)}},{key:"mouseleaveRow",value:function(t){this.exit$.emit(t.currentTarget)}},{key:"clickRow",value:function(t){var e=t.currentTarget;e!==this.activeRow&&this.activate(e),this.clickRow$.emit([t,e])}},{key:"activate",value:function(t){t!==this.activeRow&&(s("activating row",t),this.activeRow&&this.deactivate$.emit(this.activeRow),this.activeRow=t,this.activate$.emit(t))}},{key:"possiblyActivate",value:function(t){var e=this,n=this.activationDelay();n?(c("delaying row activation for ".concat(n,"ms")),this.timeoutId=window.setTimeout((function(){return e.possiblyActivate(t)}),n)):(c("activating row immediately"),this.activate(t),this.activate$.emit(t))}},{key:"activationDelay",value:function(){var t=this,e=!1;if(this.activeRow){var n=this.activeRow.parentElement.querySelectorAll(this.config.subMenuSelector);e=Array.from(n).some((function(e){return e===t.activeRow}))}if(!e)return 0;var i=b(this.menu),r={x:i.left,y:i.top-this.config.tolerance},o={x:i.left+this.menu.offsetWidth,y:r.y},a={x:i.left,y:i.top+this.menu.offsetHeight+this.config.tolerance},s={x:i.left+this.menu.offsetWidth,y:a.y},c=l[l.length-1],u=l[0];if(!c)return 0;if(u||(u=c),u.xs.x||u.ys.y)return 0;if(this.lastDelayLoc&&c.x===this.lastDelayLoc.x&&c.y===this.lastDelayLoc.y)return 0;var d=m({right:[o,s],left:[a,r],below:[s,a],above:[r,o]}[this.config.subMenuDirection],2),h=d[0],f=d[1],g=p(c,h),v=p(c,f),y=p(u,h),_=p(u,f);return g_?(this.lastDelayLoc=c,300):(this.lastDelayLoc=void 0,0)}},{key:"setActiveRow",value:function(t){this.activeRow=t,this.timeoutId&&(window.clearTimeout(this.timeoutId),this.timeoutId=void 0),this.exitTimeoutID&&(window.clearTimeout(this.exitTimeoutID),this.exitTimeoutID=void 0)}},{key:"deactivateRow",value:function(){this.activeRow&&this.deactivate$.emit(this.activeRow),this.activeRow=void 0}},{key:"detach",value:function(){this.menu&&(this.timeoutId&&clearTimeout(this.timeoutId),0==--d&&document.removeEventListener("mousemove",f),this.config.isRoot&&this.leaveListener&&this.menu.removeEventListener("mouseleave",this.leaveListener),this.overListener&&this.menu.removeEventListener("mouseover",this.overListener),this.timeoutId=this.lastDelayLoc=this.activeRow=this.menu=void 0)}}]),t}()).\u0275fac=function(t){return new(t||i)(r.Ob(r.B),r.Ob(r.l))},i.\u0275dir=r.Jb({type:i,selectors:[["","menuAim",""]],inputs:{rowSelector:["menuAim","rowSelector"],exitMenuTrigger:["menuAimExitMenu","exitMenuTrigger"],opts:["menuAimOpts","opts"]},outputs:{enter$:"menuAimEnter",exit$:"menuAimExit",activate$:"menuAimActivate",deactivate$:"menuAimDeactivate",clickRow$:"menuAimClickRow",exitMenu$:"menuAimExitMenu"},exportAs:["menuAim"]}),i),f=function(t){l.push({x:t.pageX,y:t.pageY}),l.length>3&&l.shift()},p=function(t,e){return(e.y-t.y)/(e.x-t.x)},b=function(t){var e=t.getBoundingClientRect(),n=e.top,i=e.left,r=t.ownerDocument.defaultView,o=r.pageXOffset;return{top:n+r.pageYOffset,left:i+o}}},rqGg:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("lx5p"),r=n("mlVJ"),o=n("kZht"),a=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"transform",value:function(t){return Object(i.m)(t)?t.name.replace(r.b,"BTC"):""}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=o.Nb({name:"asset",type:t,pure:!0}),t}()},ruxD:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("5uGe"),r=n("bwdy");function o(t){return function(e){return e.lift(new s(t))}}var s=function(){function t(e){C(this,t),this.callback=e}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new u(t,this.callback))}}]),t}(),u=function(t){a(n,t);var e=c(n);function n(t,i){var o;return C(this,n),(o=e.call(this,t)).add(new r.a(i)),o}return n}(i.a)},rxqU:function(t,e,n){"use strict";n.d(e,"o",(function(){return g})),n.d(e,"i",(function(){return v})),n.d(e,"d",(function(){return y})),n.d(e,"j",(function(){return O})),n.d(e,"e",(function(){return k})),n.d(e,"c",(function(){return w})),n.d(e,"k",(function(){return C})),n.d(e,"l",(function(){return T})),n.d(e,"n",(function(){return S})),n.d(e,"b",(function(){return x})),n.d(e,"a",(function(){return A})),n.d(e,"y",(function(){return I})),n.d(e,"p",(function(){return M})),n.d(e,"q",(function(){return D})),n.d(e,"r",(function(){return R})),n.d(e,"g",(function(){return L})),n.d(e,"h",(function(){return N})),n.d(e,"t",(function(){return U})),n.d(e,"s",(function(){return F})),n.d(e,"f",(function(){return B})),n.d(e,"m",(function(){return z})),n.d(e,"z",(function(){return V})),n.d(e,"x",(function(){return H})),n.d(e,"v",(function(){return $})),n.d(e,"w",(function(){return Q})),n.d(e,"A",(function(){return W})),n.d(e,"u",(function(){return G}));var i=n("D57K"),r=n("zqNl"),o=n("og7C"),a=n("VmIW"),s=n("lx5p"),c=n("p5wL"),u=n("TYVA"),l=n("0tVE"),d=n("bjK4"),h=n("+Px6"),f={details:void 0,api:{keys:[]},alerts:{initialMargin:!1,maintenanceMargin:!1,newsletter:!1,finalSettlement:!1,accountLogin:!1,ticketSubmission:!1,depositReceived:!1,withdrawalReceived:!1},limitations:{termsAgreedDate:void 0,assignmentProgramAgreedDate:void 0,allowedEWallet:!1},feData:{},subaccounts:[],summary:void 0,documents:[],feeScheduleVolumes:Object(o.b)(),algos:[]},p=Object(r.i)(f,Object(r.k)(l.x,(function(){return f})),Object(r.k)(l.G,(function(t,e){return Object(c.b)(e,t,"details")})),Object(r.k)(l.z,(function(t,e){var n=e.keys;return Object(c.b)(n,t,"api","keys")})),Object(r.k)(l.c,(function(t,e){return Object(c.b)([].concat(b(t.api.keys),[e]),t,"api","keys")})),Object(r.k)(l.u,(function(t,e){var n=e.keyId;return Object(c.b)(t.api.keys.filter((function(t){return t.id!==n})),t,"api","keys")})),Object(r.k)(l.I,(function(t,e){return Object(c.b)(e,t,"limitations")})),Object(r.k)(l.J,(function(t,e){return Object(c.b)(e,t,"summary")})),Object(r.k)(l.H,(function(t,e){var n=e.docs;return Object(c.b)(n,t,"documents")})),Object(r.k)(l.s,(function(t,e){return Object(c.b)(e,t,"feData")})),Object(r.k)(l.e,(function(t,e){return Object(c.a)(e,t,"feData")})),Object(r.k)(l.d,(function(t,e){var n=e.marketDescriptor;return Object(c.b)(Object(o.f)(t.feData.favoriteMarkets||[]).add(n).toArray(),t,"feData","favoriteMarkets")})),Object(r.k)(l.v,(function(t,e){var n=e.marketDescriptor;return Object(c.b)(Object(o.f)(t.feData.favoriteMarkets||[]).remove(n).toArray(),t,"feData","favoriteMarkets")})),Object(r.k)(l.D,(function(t,e){var n=Object(i.f)(e,["type"]);return Object(c.b)(Object.assign(Object.assign({},t.feData.quantityUnits),n),t,"feData","quantityUnits")})),Object(r.k)(l.B,(function(t,e){return Object(c.b)(e,t,"alerts")})),Object(r.k)(l.A,(function(t,e){var n=e.date;return Object(c.b)(n,t,"limitations","assignmentProgramAgreedDate")})),Object(r.k)(l.E,(function(t,e){var n=e.accounts;return Object(c.b)(n,t,"subaccounts")})),Object(r.k)(l.K,(function(t,e){var n=e.volumes;return Object(c.b)(Object(o.b)(n),t,"feeScheduleVolumes")})),Object(r.k)(l.F,(function(t,e){var n=e.algos;return Object(c.b)(n,t,"algos")})));function g(t,e){return p(t,e)}var v=Object(r.h)("user"),y=Object(r.j)(v,(function(t){return t.details})),_=Object(r.j)(v,(function(t){return t.summary})),O=Object(r.j)(_,(function(t){return null==t?void 0:t.uid})),k=Object(r.j)(y,(function(t){return null==t?void 0:t.email})),w=Object(r.j)(y,(function(t){return null==t?void 0:t.countryCode})),C=Object(r.j)(y,(function(t){return"DE"===(null==t?void 0:t.countryCode)||"DEU"===(null==t?void 0:t.countryCode)})),T=Object(r.j)(y,(function(t){var e;return null!==(e=null==t?void 0:t.external)&&void 0!==e&&e})),S=Object(r.j)(y,(function(t){var e;return null!==(e=null==t?void 0:t.isSubAccount)&&void 0!==e&&e})),E=(Object(r.j)(y,(function(t){return null==t?void 0:t.platformName})),Object(r.j)(v,(function(t){return null==t?void 0:t.documents})),Object(r.j)(v,Object(s.F)("feeScheduleVolumes"))),x=Object(r.j)(v,(function(t){return t.algos})),P=Object(r.j)(v,(function(t){return t.limitations})),A=Object(r.j)(v,(function(t){return t.feData})),I=Object(r.j)(A,(function(t){var e;return null===(e=t.tooltipsShown)||void 0===e||e})),M=Object(r.j)(A,(function(t){var e;return Object(o.f)(null!==(e=t.favoriteMarkets)&&void 0!==e?e:[])})),D=Object(r.j)(A,h.p,(function(t,e){return a.Maybe.fromFalsy(t.activityPairFilterOn).map((function(){return e}))})),R=Object(r.j)(A,d.l,(function(t,e){return u.a})),j=Object(r.j)(v,Object(s.F)("api")),L=Object(r.j)(j,Object(s.F)("keys")),N=Object(r.j)(v,Object(s.F)("alerts")),U=Object(r.j)(v,Object(s.F)("subaccounts")),F=Object(r.j)(U,(function(t){return t.map(Object(s.F)("email"))})),B=Object(r.j)(U,(function(t){return t.length})),z=Object(r.j)(y,(function(t){return!!t})),V=Object(r.j)(P,(function(t){return t?!!t.assignmentProgramAgreedDate:void 0})),H=Object(r.j)(E,h.n,(function(t,e){return a.Maybe.fromNull("flexible_futures"===(null==e?void 0:e.type)||"futures_inverse"===(null==e?void 0:e.type)||"futures_vanilla"===(null==e?void 0:e.type)?t.get(e.feeScheduleUid):0)})),q=Object(r.j)(h.e,E,u.q),$=Object(r.j)(q,h.n,(function(t,e){return"flexible_futures"===(null==e?void 0:e.type)||"futures_inverse"===(null==e?void 0:e.type)||"futures_vanilla"===(null==e?void 0:e.type)?a.Maybe.fromNull(t.get(e.feeScheduleUid)):a.Maybe.None()})),Q=Object(r.j)($,H,(function(t,e){return t.flatMap(Object(s.F)(1)).flatMap((function(t){return e.map((function(e){return[t,e]}))})).map((function(t){var e=m(t,2),n=e[0],i=e[1];return n.usdVolume-i}))})),W=Object(r.j)(y,(function(t){return!(null==t?void 0:t.external)&&"mtf"===(null==t?void 0:t.platformName)})),G=Object(r.j)(y,(function(t){return null==t?void 0:t.defaultTransferPreference}))},ryP2:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("6Oco"),r=n("ROBh"),o=n("47ST"),a=function(){var t=function(){function t(e,n,i){C(this,t),this.kind=e,this.value=n,this.error=i,this.hasValue="N"===e}return w(t,[{key:"observe",value: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()}}},{key:"do",value: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()}}},{key:"accept",value:function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}},{key:"toObservable",value:function(){switch(this.kind){case"N":return Object(r.a)(this.value);case"E":return Object(o.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")}}],[{key:"createNext",value:function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}},{key:"createError",value:function(e){return new t("E",void 0,e)}},{key:"createComplete",value:function(){return t.completeNotification}}]),t}();return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},"s/Os":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("YwYi"),r=n("ssKD"),o=n("oznm");e.default=function(){function t(t){this.field=t,this.cachedGenerators=[],this.cachedGenerators.push(new i.default(t,Int32Array.from([1])))}return t.prototype.buildGenerator=function(t){var e=this.cachedGenerators;if(t>=e.length)for(var n=e[e.length-1],r=this.field,o=e.length;o<=t;o++){var a=n.multiply(new i.default(r,Int32Array.from([1,r.exp(o-1+r.getGeneratorBase())])));e.push(a),n=a}return e[t]},t.prototype.encode=function(t,e){if(0===e)throw new o.default("No error correction bytes");var n=t.length-e;if(n<=0)throw new o.default("No data bytes provided");var a=this.buildGenerator(e),s=new Int32Array(n);r.default.arraycopy(t,0,s,0,n);for(var c=new i.default(this.field,s),u=(c=c.multiplyByMonomial(e,1)).divide(a)[1].getCoefficients(),l=e-u.length,d=0;d [_ngcontent-%COMP%]:first-of-type{margin-bottom:var(--spacing-s)}.progress-cell[_ngcontent-%COMP%]{text-align:right;flex:0.75}.progress-cell[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-of-type{margin-bottom:var(--spacing-s)}.progress-cell[_ngcontent-%COMP%]{margin-left:var(--spacing-l)}"],changeDetection:0}),t}()},sBeF:function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return b})),n.d(e,"d",(function(){return g})),n.d(e,"e",(function(){return h})),n.d(e,"f",(function(){return f})),n.d(e,"g",(function(){return m})),n.d(e,"h",(function(){return l}));var i=n("9bRT"),r=n("ROBh"),o=n("ZTXN"),s=n("kZht"),u=function t(){C(this,t)};function l(t){return t&&"function"==typeof t.connect}var d=function(t){a(n,t);var e=c(n);function n(t){var i;return C(this,n),(i=e.call(this))._data=t,i}return w(n,[{key:"connect",value:function(){return Object(i.a)(this._data)?this._data:Object(r.a)(this._data)}},{key:"disconnect",value:function(){}}]),n}(u),h=function(){function t(){C(this,t)}return w(t,[{key:"applyChanges",value:function(t,e,n,i,r){t.forEachOperation((function(t,i,o){var a,s;if(null==t.previousIndex){var c=n(t,i,o);a=e.createEmbeddedView(c.templateRef,c.context,c.index),s=1}else null==o?(e.remove(i),s=3):(a=e.get(i),e.move(a,o),s=2);r&&r({context:null==a?void 0:a.context,operation:s,record:t})}))}},{key:"detach",value:function(){}}]),t}(),f=function(){function t(){C(this,t),this.viewCacheSize=20,this._viewCache=[]}return w(t,[{key:"applyChanges",value:function(t,e,n,i,r){var o=this;t.forEachOperation((function(t,a,s){var c,u;null==t.previousIndex?u=(c=o._insertView((function(){return n(t,a,s)}),s,e,i(t)))?1:0:null==s?(o._detachAndCacheView(a,e),u=3):(c=o._moveView(a,s,e,i(t)),u=2),r&&r({context:null==c?void 0:c.context,operation:u,record:t})}))}},{key:"detach",value:function(){var t,e=p(this._viewCache);try{for(e.s();!(t=e.n()).done;){t.value.destroy()}}catch(n){e.e(n)}finally{e.f()}}},{key:"_insertView",value:function(t,e,n,i){var r=this._insertViewFromCache(e,n);if(!r){var o=t();return n.createEmbeddedView(o.templateRef,o.context,o.index)}r.context.$implicit=i}},{key:"_detachAndCacheView",value:function(t,e){var n=this._detachView(t,e);this._maybeCacheView(n,e)}},{key:"_moveView",value:function(t,e,n,i){var r=n.get(t);return n.move(r,e),r.context.$implicit=i,r}},{key:"_maybeCacheView",value:function(t,e){if(this._viewCache.length0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];C(this,t),this._multiple=n,this._emitChanges=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new o.b,i&&i.length&&(n?i.forEach((function(t){return e._markSelected(t)})):this._markSelected(i[0]),this._selectedToEmit.length=0)}return w(t,[{key:"select",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i2&&void 0!==arguments[2]?arguments[2]:_;i(e),t.forEach((function(t){return n.store.dispatch(t)})),this.dialogRef.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Ob(a.b),o.Ob(i.d),o.Ob(i.a),o.Ob(s.c))},t.\u0275cmp=o.Ib({type:t,selectors:[["confirmation"]],decls:8,vars:7,consts:[[3,"heading"],["body","","class","subtitle",4,"ngIf"],["markdown","",1,"body",3,"data"],["body","","class","checkbox",3,"change",4,"ngIf"],[1,"buttons"],[4,"ngFor","ngForOf"],["body","",1,"subtitle"],["body","",1,"checkbox",3,"change"],["body","","mat-raised-button","",3,"color","disabled","click",4,"ngIf"],["body","","mat-button","",3,"disabled","click",4,"ngIf"],["body","","mat-raised-button","",3,"color","disabled","click"],["body","","mat-button","",3,"disabled","click"]],template:function(t,e){1&t&&(o.Ub(0,"pro-dialog",0),o.Ub(1,"section"),o.Oc(2,b,3,3,"p",1),o.Pb(3,"section",2),o.gc(4,"translate"),o.Oc(5,g,3,3,"mat-checkbox",3),o.Ub(6,"section",4),o.Oc(7,y,3,2,"ng-container",5),o.Tb(),o.Tb(),o.Tb()),2&t&&(o.mc("heading",e.inputs.title),o.Cb(2),o.mc("ngIf",e.inputs.subtitle),o.Cb(1),o.mc("data",o.hc(4,5,e.inputs.body)),o.Cb(2),o.mc("ngIf",e.inputs.checkbox),o.Cb(2),o.mc("ngForOf",e.inputs.buttons))},directives:[c.a,u.a,l.n,s.a,l.m,d.a,h.a,f.b],pipes:[p.d],styles:[".body[_ngcontent-%COMP%], .subtitle[_ngcontent-%COMP%]{margin-bottom:var(--spacing-l)}.body[_ngcontent-%COMP%]{max-width:650px}.body[_ngcontent-%COMP%] p{line-height:1.3}.buttons[_ngcontent-%COMP%]{justify-content:flex-end;margin-top:var(--spacing-l)}.buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:last-child){margin-right:var(--spacing)}"],changeDetection:0}),t}()},sHul:function(t,e,n){"use strict";n.r(e),n.d(e,"SignUpComponent",(function(){return H}));var i=n("D57K"),r=n("3kIJ"),o=n("zqNl"),a=n("lx5p"),s=n("i67J"),c=n("94ty"),u=n("zdQl"),l=n("bjK4"),d=n("MUfl"),h=n("uJYd"),f=n("Tjvn"),p=n("9Ccw"),b=n("gxtV"),g=n("jIqt"),m=n("Ohay"),v=n("sXtk"),y=n("kZht"),_=n("Asjx"),O=n("mcff"),k=n("i9Na"),T=n("rfPA"),S=n("bBQR"),E=n("afE0"),x=n("hCLc"),P=n("3W1Y"),A=n("aDqW"),I=n("An66"),M=n("anSm"),D=n("EmXI"),R=n("Tcl6"),j=n("eGwX"),L=n("IOEv"),N=n("pTnX"),U=n("UDV5"),F=n("scAs");function B(t,e){1&t&&(y.Ub(0,"div",21),y.Ub(1,"p",22),y.Qc(2),y.gc(3,"translate"),y.Tb(),y.Ub(4,"p",23),y.Qc(5),y.gc(6,"translate"),y.Tb(),y.Ub(7,"p",19),y.Pb(8,"markdown",24),y.gc(9,"translate"),y.Tb(),y.Tb()),2&t&&(y.Cb(2),y.Sc(" ",y.hc(3,3,"ERROR.PASSWORD_COMPROMISED")," "),y.Cb(3),y.Sc(" ",y.hc(6,5,"SUPPORT.HAVE_I_BEEN_PWNED")," "),y.Cb(3),y.mc("data",y.hc(9,7,"SUPPORT.PWNED_URL")))}function z(t,e){1&t&&(y.Ub(0,"mat-error"),y.Qc(1),y.gc(2,"translate"),y.Tb()),2&t&&(y.Cb(1),y.Sc(" ",y.hc(2,1,"FORM.EMAIL_ERROR")," "))}function V(t,e){1&t&&(y.Ub(0,"mat-checkbox",25),y.Qc(1),y.gc(2,"translate"),y.Tb()),2&t&&(y.Cb(1),y.Sc(" ",y.hc(2,1,"FORM.USE_COMPROMISED_PASSWORD_CONFIRM")," "))}var H=function(){var t=function(){function t(e,n,i,r,s,d,h){C(this,t),this.store=e,this.feature=n,this.formBuilder=i,this.breakpointObserver=r,this.dialogRef=s,this.env=h,this.isPasswordCompromised=!1,this.form=this.buildForm(),this.reset=!1,this.loading$=this.store.pipe(Object(o.m)(l.m,{filter:c.C.type})),this.affiliateCode$=this.store.pipe(Object(o.m)(u.c)),this.passwordCompromised$=this.store.select(p.h),d.renderer.link=f.a,d.renderer.image=Object(a.b)("")}return w(t,[{key:"ngOnInit",value:function(){var t=this;this.setDialogSize(),this.affiliateCode$.pipe(Object(s.h)(),Object(b.b)(this)).subscribe((function(e){return t.form.get("affiliateUid").setValue(e)})),this.passwordCompromised$.pipe(Object(g.a)(!1),Object(m.a)(),Object(b.b)(this)).subscribe((function(e){var n,i;t.isPasswordCompromised=e,e?null===(i=t.form.get("allowPwnedPassword"))||void 0===i||i.enable():null===(n=t.form.get("allowPwnedPassword"))||void 0===n||n.disable()}))}},{key:"ngOnDestroy",value:function(){this.reset=!0}},{key:"submitForm",value:function(){this.store.dispatch(Object(c.C)(Object.assign(Object.assign({},this.form.value),{allowPwned:this.isPasswordCompromised})))}},{key:"updatePassword",value:function(t){this.store.dispatch(Object(c.q)({passwordCompromised:!1})),this.form.get("password").setValue(t)}},{key:"closeDialog",value:function(t){this.dialogRef.close(),this.store.dispatch(Object(h.n)(c.t.type)),this.store.dispatch(Object(c.q)({passwordCompromised:!1})),t&&this.store.dispatch(Object(h.g)(t))}},{key:"goToKrakenSignUp",value:function(){window.open(this.env.urls.externalSignUp,"_blank","noopener")}},{key:"setDialogSize",value:function(){this.breakpointObserver.isMatched("(max-width: 599px)")?this.dialogRef.updateSize("100%","100%"):this.dialogRef.updateSize("350px","auto")}},{key:"buildForm",value:function(){return this.formBuilder.group({email:["",[r.x.required,r.x.email]],password:["",[r.x.required]],accountType:["individual",[r.x.required]],marketing:[!1,[r.x.required]],acknowledgement:[!1,[r.x.requiredTrue]],affiliateUid:[""],allowPwnedPassword:[!1,[r.x.requiredTrue]]})}},{key:"translateParams",get:function(){return{magUrl:"https://www.cryptofacilities.com/membership-agreement",privUrl:"https://www.cryptofacilities.com/privacy-policy",existing:{link:"https://futures.kraken.com"},tc:{openMagg:"",closeMagg:"",openPriv:"",closePriv:""}}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(y.Ob(o.b),y.Ob(d.a),y.Ob(r.d),y.Ob(_.a),y.Ob(O.d),y.Ob(k.c),y.Ob(v.a))},t.\u0275cmp=y.Ib({type:t,selectors:[["sign-up"]],decls:47,vars:46,consts:[["heading","DIALOG.SIGNUP.TITLE",3,"loading"],[1,"sign-up-inner"],["icon","user-full"],["mat-raised-button","",3,"disabled","click"],["caption","","translate",""],["class","warning",4,"ngIf"],["body","",3,"formGroup","ngSubmit"],["color","accent","appearance","fill"],["formControlName","email","required","","matInput","","type","email"],[4,"ngIf"],[3,"resetToggle","passwordUpdate"],["matNativeControl","","formControlName","accountType"],["value","individual"],["value","corporate"],["formControlName","marketing",1,"no-border"],["formControlName","acknowledgement","required","",1,"no-border"],["markdown","",3,"data"],["class","no-border","formControlName","allowPwnedPassword",4,"ngIf"],["mat-raised-button","",3,"disabled"],["body",""],[1,"global__text--link",3,"click"],[1,"warning"],["body","","bold","",1,"global__text--warn"],["body","","bold",""],[3,"data"],["formControlName","allowPwnedPassword",1,"no-border"]],template:function(t,e){1&t&&(y.Ub(0,"pro-dialog",0),y.gc(1,"async"),y.Ub(2,"div",1),y.Pb(3,"dialog-badge",2),y.Ub(4,"button",3),y.bc("click",(function(){return e.goToKrakenSignUp()})),y.gc(5,"async"),y.Qc(6),y.gc(7,"translate"),y.Tb(),y.Ub(8,"small",4),y.Qc(9,"FRAGMENT.OR"),y.Tb(),y.Oc(10,B,10,9,"div",5),y.gc(11,"async"),y.Ub(12,"form",6),y.bc("ngSubmit",(function(){return e.submitForm()})),y.Ub(13,"mat-form-field",7),y.Ub(14,"mat-label"),y.Qc(15),y.gc(16,"translate"),y.Tb(),y.Pb(17,"input",8),y.Oc(18,z,3,3,"mat-error",9),y.Tb(),y.Ub(19,"input-password-confirm",10),y.bc("passwordUpdate",(function(t){return e.updatePassword(t)})),y.Tb(),y.Ub(20,"mat-form-field",7),y.Ub(21,"mat-label"),y.Qc(22),y.gc(23,"translate"),y.Tb(),y.Ub(24,"mat-select",11),y.Ub(25,"mat-option",12),y.Qc(26),y.gc(27,"translate"),y.Tb(),y.Ub(28,"mat-option",13),y.Qc(29),y.gc(30,"translate"),y.Tb(),y.Tb(),y.Tb(),y.Ub(31,"mat-checkbox",14),y.Qc(32),y.gc(33,"translate"),y.Tb(),y.Ub(34,"mat-checkbox",15),y.Pb(35,"span",16),y.gc(36,"translate"),y.Tb(),y.Oc(37,V,3,3,"mat-checkbox",17),y.gc(38,"async"),y.Ub(39,"button",18),y.gc(40,"async"),y.Qc(41),y.gc(42,"translate"),y.Tb(),y.Tb(),y.Ub(43,"div",19),y.Ub(44,"a",20),y.bc("click",(function(){return e.closeDialog({name:"sign-in"})})),y.Qc(45),y.gc(46,"translate"),y.Tb(),y.Tb(),y.Tb(),y.Tb()),2&t&&(y.mc("loading",y.hc(1,17,e.loading$)),y.Cb(4),y.mc("disabled",y.hc(5,19,e.loading$)),y.Cb(2),y.Sc(" ",y.hc(7,21,"NAV.SIGN_UP_KRAKEN")," "),y.Cb(4),y.mc("ngIf",y.hc(11,23,e.passwordCompromised$)),y.Cb(2),y.mc("formGroup",e.form),y.Cb(3),y.Rc(y.hc(16,25,"FORM.EMAIL")),y.Cb(3),y.mc("ngIf",e.form.get("email").invalid),y.Cb(1),y.mc("resetToggle",e.reset),y.Cb(3),y.Rc(y.hc(23,27,"DIALOG.SIGNUP.ACCOUNT_SELECT.TYPE")),y.Cb(4),y.Sc(" ",y.hc(27,29,"DIALOG.SIGNUP.ACCOUNT_SELECT.INDIVIDUAL")," "),y.Cb(3),y.Sc(" ",y.hc(30,31,"DIALOG.SIGNUP.ACCOUNT_SELECT.CORPORATE")," "),y.Cb(3),y.Sc(" ",y.hc(33,33,"DIALOG.SIGNUP.MARKETING_CHECKBOX")," "),y.Cb(3),y.mc("data",y.ic(36,35,"DIALOG.SIGNUP.TC_READ",e.translateParams)),y.Cb(2),y.mc("ngIf",y.hc(38,38,e.passwordCompromised$)),y.Cb(2),y.mc("disabled",e.form.invalid||y.hc(40,40,e.loading$)),y.Cb(2),y.Sc(" ",y.hc(42,42,"DIALOG.SIGNUP.BUTTONS.EMAIL")," "),y.Cb(4),y.Sc(" ",y.hc(46,44,"DIALOG.SIGNUP.SIGNIN_LINK")," "))},directives:[T.a,S.a,E.a,x.b,P.a,A.a,I.n,r.z,r.p,M.a,r.h,D.c,D.f,r.c,R.b,r.o,r.g,r.v,j.a,L.a,N.n,U.a,U.c,k.a,F.a,D.b],pipes:[I.b,A.d],styles:[".sign-up-inner[_ngcontent-%COMP%]{max-width:40ch;text-align:center}.sign-up-inner[_ngcontent-%COMP%] dialog-badge[_ngcontent-%COMP%]{margin-bottom:var(--spacing-l)}.sign-up-inner[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%;margin-bottom:var(--spacing)}.sign-up-inner[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{border:solid var(--warn-colour);text-align:center;padding:var(--spacing);margin:var(--spacing) 0}.sign-up-inner[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:var(--spacing) 0;width:100%}.sign-up-inner[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{text-align:left}.sign-up-inner[_ngcontent-%COMP%] form[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{margin-top:var(--spacing)}markdown[_ngcontent-%COMP%] a{color:var(--link-colour)}"],changeDetection:0}),t=Object(i.d)([Object(b.a)()],t)}()},sJbC:function(t,e,n){"use strict";n.r(e),n.d(e,"ExternalTermsComponent",(function(){return k}));var i=n("lx5p"),r=n("zqNl"),o=n("jOdJ"),a=n("uJYd"),s=n("0tVE"),c=n("R1aX"),u=n("Tjvn"),l=n("kZht"),d=n("mcff"),h=n("aDqW"),f=n("i9Na"),p=n("rfPA"),b=n("bBQR"),g=n("Eu46"),m=n("An66"),v=n("UDV5"),y=n("hCLc");function _(t,e){1&t&&(l.Ub(0,"li"),l.Qc(1),l.gc(2,"translate"),l.Tb()),2&t&&(l.Cb(1),l.Sc(" ",l.hc(2,1,"DIALOG.KRAKEN_TERMS.CONTENT.QUESTIONNAIRE")," "))}function O(t,e){if(1&t){var n=l.Vb();l.Ub(0,"section",2),l.Ub(1,"section",3),l.Pb(2,"img",4),l.Tb(),l.Ub(3,"section",5),l.Ub(4,"p",6),l.Qc(5),l.gc(6,"translate"),l.Tb(),l.Ub(7,"ul",7),l.Pb(8,"li",8),l.gc(9,"translate"),l.Oc(10,_,3,3,"li",9),l.Ub(11,"li"),l.Qc(12),l.gc(13,"translate"),l.Tb(),l.Tb(),l.Ub(14,"mat-checkbox",10),l.bc("change",(function(){return l.Ec(n),l.fc().toggleTermsAccepted()})),l.Pb(15,"span",8),l.gc(16,"translate"),l.Tb(),l.Ub(17,"mat-checkbox",10),l.bc("change",(function(){return l.Ec(n),l.fc().toggleNewsletterAccepted()})),l.Qc(18),l.gc(19,"translate"),l.Tb(),l.Ub(20,"button",11),l.bc("click",(function(){return l.Ec(n),l.fc().enableFutures()})),l.Qc(21),l.gc(22,"translate"),l.Tb(),l.Tb(),l.Tb()}if(2&t){var i=e.ngLet,r=l.fc();l.Cb(5),l.Sc(" ",l.hc(6,8,"DIALOG.KRAKEN_TERMS.SUBTITLE")," "),l.Cb(3),l.mc("data",l.ic(9,10,"DIALOG.KRAKEN_TERMS.CONTENT.SGB_TC_AGREE",r.translateParams)),l.Cb(2),l.mc("ngIf","INVESTOR_TYPES_DISABLED"!==i),l.Cb(2),l.Rc(l.hc(13,13,"DIALOG.KRAKEN_TERMS.CONTENT.FUND_WALLET")),l.Cb(3),l.mc("data",l.ic(16,15,"DIALOG.KRAKEN_TERMS.CHECKBOXES.SGB_TC_READ",r.translateParams)),l.Cb(3),l.Sc(" ",l.hc(19,18,"DIALOG.KRAKEN_TERMS.CHECKBOXES.NEWSLETTER")," "),l.Cb(2),l.mc("disabled",!r.termsAccepted),l.Cb(1),l.Sc(" ",l.hc(22,20,"BUTTON.ENABLE_FUTURES_ACCESS")," ")}}var k=function(){var t=function(){function t(e,n,o,a){C(this,t),this.store=e,this.dialogRef=n,this.translateService=o,this.userClassification$=this.store.pipe(Object(r.m)(c.c)),this.termsAccepted=!1,this.newsletterAccepted=!1,this.translateParams={tcUrl:"https://support.kraken.com/hc/en-us/articles/360047047031-Payward-Brokers-Pte-Ltd-Terms-Conditions",privUrl:"https://www.kraken.com/en-us/legal/privacy"},a.renderer.link=u.a,a.renderer.image=Object(i.b)("")}return w(t,[{key:"enableFutures",value:function(){var t=this;this.newsletterAccepted&&this.store.dispatch(Object(s.C)({newsletterEnabled:!0})),this.userClassification$.pipe(Object(o.a)()).subscribe((function(e){t.store.dispatch(Object(s.t)()),"INVESTOR_TYPES_DISABLED"!==e?t.store.dispatch(Object(a.g)({name:"confirmation",inputs:{title:"DIALOG.EXTERNAL_TERMS.WELCOME",subtitle:"DIALOG.EXTERNAL_TERMS.ENABLED",body:t.translateService.instant("DIALOG.EXTERNAL_TERMS.CONTENT"),buttons:[{label:"DIALOG.EXTERNAL_TERMS.BEGIN_Q",colour:"accent",actions:[Object(a.c)(),Object(a.e)({route:"verification"})]}]}})):t.closeDialog()}))}},{key:"toggleTermsAccepted",value:function(){this.termsAccepted=!this.termsAccepted}},{key:"toggleNewsletterAccepted",value:function(){this.newsletterAccepted=!this.newsletterAccepted}},{key:"closeDialog",value:function(){this.dialogRef.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(l.Ob(r.b),l.Ob(d.d),l.Ob(h.e),l.Ob(f.c))},t.\u0275cmp=l.Ib({type:t,selectors:[["external-terms"]],decls:3,vars:3,consts:[["heading","DIALOG.KRAKEN_TERMS.TITLE"],["class","external-terms",4,"ngLet"],[1,"external-terms"],[1,"illustration"],["src","assets/images/kraken_illustration2.png","alt","Kraken illustration"],[1,"content"],[1,"global__text","global__text-subheading"],[1,"global__text","global__text-body"],["markdown","",3,"data"],[4,"ngIf"],[1,"global__text","global__text-body","no-border",3,"change"],["mat-raised-button","",3,"disabled","click"]],template:function(t,e){1&t&&(l.Ub(0,"pro-dialog",0),l.Oc(1,O,23,22,"section",1),l.gc(2,"async"),l.Tb()),2&t&&(l.Cb(1),l.mc("ngLet",l.hc(2,1,e.userClassification$)))},directives:[p.a,b.a,g.a,f.a,m.n,v.a,y.b],pipes:[m.b,h.d],styles:[".external-terms[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:600px}.external-terms[_ngcontent-%COMP%] .illustration[_ngcontent-%COMP%]{margin-right:var(--spacing-l)}.external-terms[_ngcontent-%COMP%] .illustration[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:175px}@media (max-width:599px){.external-terms[_ngcontent-%COMP%] .illustration[_ngcontent-%COMP%]{display:none}}.external-terms[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .external-terms[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.external-terms[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:disc;padding-left:var(--spacing);margin-left:var(--spacing)}.external-terms[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:not(:last-of-type){padding-bottom:var(--spacing-s)}.external-terms[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{border-bottom:0}.external-terms[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:var(--spacing)}"],changeDetection:0}),t}()},sKBq:function(t,e,n){"use strict";function i(t,e){void 0===e&&(e=t.constructor);var n=Error.captureStackTrace;n&&n(t,e)}n.r(e),n.d(e,"CustomError",(function(){return a})),n.d(e,"customErrorFactory",(function(){return c}));var r,o=(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)}),a=function(t){function e(e){var n,r,o,a=this.constructor,s=t.call(this,e)||this;return Object.defineProperty(s,"name",{value:a.name,enumerable:!1,configurable:!0}),n=s,r=a.prototype,(o=Object.setPrototypeOf)?o(n,r):n.__proto__=r,i(s),s}return o(e,t),e}(Error),s=function(){for(var t=arguments,e=0,n=0,i=arguments.length;n=5&&(i+=t.N1+(c-5)),c=1,u=d)}c>=5&&(i+=t.N1+(c-5))}return i},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}()},sPsw:function(t,e,n){"use strict";n.r(e),n.d(e,"MfaConfirmComponent",(function(){return J}));var i=n("D57K"),r=n("mcff"),o=n("gxtV"),a=n("QQZH"),s=n("C05f"),c=n("HM3f"),u=n("6Oco"),l=n("GoAz"),d=n("47ST"),h=n("YtkY"),f=n("xVbo"),p=n("BwBJ"),b=n("w0kG"),g=n("TLy2"),v=n("7SLS"),y=n("4e/d"),_=n("KQpv"),O=n.n(_),k=n("uJYd"),T=n("sXtk"),S=n("T5QL"),E=n("7UDb"),x=n("kZht"),P=n("zqNl"),A=n("3kIJ"),I=n("6uGs"),M=n("aDqW"),D=n("rfPA"),R=n("bBQR"),j=n("An66"),L=n("7J2L"),N=n("anSm"),U=n("TzY9"),F=n("NxuZ"),B=n("hCLc");function z(t,e){if(1&t&&x.Qb(0,7),2&t){x.fc();var n=x.Ac(6);x.mc("ngTemplateOutlet",n)}}function V(t,e){if(1&t&&x.Qb(0,7),2&t){x.fc();var n=x.Ac(8);x.mc("ngTemplateOutlet",n)}}function H(t,e){1&t&&x.Pb(0,"kraken-loading",8)}function q(t,e){if(1&t&&x.Qb(0,7),2&t){x.fc(3);var n=x.Ac(10);x.mc("ngTemplateOutlet",n)}}function $(t,e){if(1&t&&x.Qb(0,7),2&t){x.fc(3);var n=x.Ac(12);x.mc("ngTemplateOutlet",n)}}function Q(t,e){if(1&t&&(x.Sb(0,1),x.gc(1,"async"),x.Oc(2,q,1,1,"ng-container",2),x.Oc(3,$,1,1,"ng-container",2),x.Rb()),2&t){var n=x.fc(2);x.mc("ngSwitch",x.hc(1,3,n.fidoState$)),x.Cb(2),x.mc("ngSwitchCase","waiting"),x.Cb(1),x.mc("ngSwitchCase","error")}}function W(t,e){1&t&&(x.Ub(0,"small",12),x.Qc(1),x.gc(2,"translate"),x.Tb()),2&t&&(x.Cb(1),x.Sc(" ",x.hc(2,1,"FRAGMENT.OR")," "))}function G(t,e){if(1&t&&(x.Ub(0,"div",13),x.Ub(1,"p",14),x.Qc(2,"DIALOG.SIGNIN.TOTP_VERIFY"),x.Tb(),x.Pb(3,"input-otp-entry",15),x.Tb()),2&t){var n=x.fc(2);x.Cb(3),x.mc("form",n.form)}}function Y(t,e){if(1&t&&(x.Oc(0,Q,4,5,"ng-container",9),x.gc(1,"async"),x.Oc(2,W,3,3,"small",10),x.gc(3,"async"),x.Oc(4,G,4,1,"div",11),x.gc(5,"async")),2&t){var n=x.fc();x.mc("ngIf",x.hc(1,3,n.activeFido$)),x.Cb(2),x.mc("ngIf",x.hc(3,5,n.activeBoth$)),x.Cb(2),x.mc("ngIf",x.hc(5,7,n.activeTotp$))}}function K(t,e){1&t&&(x.Ub(0,"div",16),x.Ub(1,"p",14),x.Qc(2,"DIALOG.SIGNIN.HWAUTH_VERIFY"),x.Tb(),x.Pb(3,"kraken-loading",8),x.Tb())}function Z(t,e){if(1&t){var n=x.Vb();x.Ub(0,"div",17),x.Pb(1,"fa-icon",18),x.Ub(2,"div"),x.Ub(3,"p",14),x.Qc(4,"DIALOG.SIGNIN.HWAUTH_ERROR"),x.Tb(),x.Ub(5,"button",19),x.bc("click",(function(){return x.Ec(n),x.fc().resetFido()})),x.Qc(6),x.gc(7,"translate"),x.Tb(),x.Tb(),x.Tb()}2&t&&(x.Cb(6),x.Sc(" ",x.hc(7,1,"BUTTON.TRY_AGAIN")," "))}var X=O()("app:dialog:MfaConfirm"),J=function(){var t=function(){function t(e,n,i,r,o,u,l,d){C(this,t),this.inputs=e,this.dialogRef=n,this.store=i,this.formBuilder=r,this.fido2=o,this.env=u,this.http=l,this.translate=d,this.challenge$=new a.a,this.step$=new s.a("fetching"),this.fidoState$=new s.a("waiting"),this.activeFido$=this.challenge$.pipe(Object(h.a)((function(t){return t.mfaRequired.includes("fido2")}))),this.activeTotp$=this.challenge$.pipe(Object(h.a)((function(t){return t.mfaRequired.includes("totp")}))),this.activeBoth$=Object(c.a)([this.activeFido$,this.activeTotp$]).pipe(Object(h.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return n&&i})))}return w(t,[{key:"ngOnInit",value:function(){this.form=this.buildForm(),this.watchTotpField(),this.run()}},{key:"buildForm",value:function(){return this.formBuilder.group({totp:[""]})}},{key:"watchTotpField",value:function(){var t=this;this.form.get("totp").valueChanges.pipe(Object(f.a)((function(t){return 6===t.length})),Object(p.a)(100),Object(b.a)(this.challenge$),Object(g.a)((function(e){var n=m(e,2),i=n[0],r=n[1];return t.submitTotp(r.mfaRequestId,i).pipe(Object(v.a)(r.mfaRequestId),Object(y.a)((function(e){return console.warn({res:e}),"error"in e&&"error"in e.error&&t.handleError(e.error.error),u.a})))})),Object(o.b)(this)).subscribe((function(e){t.dialogRef.close(),t.store.dispatch(Object.assign(Object.assign({},t.inputs.action),{mfaRequestId:e}))}))}},{key:"resetFido",value:function(){this.form.get("totp").setValue(""),this.run(),this.fidoState$.next("waiting")}},{key:"fetchChallenge",value:function(){return this.http.post(this.env.urls.auth+"/mfa/request",void 0,E.a)}},{key:"submitNone",value:function(t){return this.submitForm({mfaRequestId:t})}},{key:"submitTotp",value:function(t,e){return this.submitForm({mfaRequestId:t,totp:e})}},{key:"submitFido",value:function(t,e){return this.submitForm({mfaRequestId:t,cred:e})}},{key:"submitForm",value:function(t){return this.http.post(this.env.urls.auth+"/mfa/authorize",t,E.a)}},{key:"run",value:function(){var t=this;this.fetchChallenge().pipe(Object(g.a)((function(e){X(e),t.challenge$.next(e),t.step$.next("ready");var n=e.mfaRequestId;return"challenge"in e&&e.challenge?Object(l.a)(t.fido2.getAssertion(e.challenge)).pipe(Object(y.a)((function(e){return console.error("error in authenticator verify",e),t.fidoState$.next("error"),Object(d.a)("HWAUTH_VERIFY_FAIL")})),Object(g.a)((function(e){return t.submitFido(n,e).pipe(Object(y.a)((function(t){return Object(d.a)(t.error.error)})))})),Object(v.a)(n)):e.mfaRequired.includes("totp")?u.a:t.submitNone(n).pipe(Object(v.a)(n))}))).subscribe((function(e){X(e),t.dialogRef.close(),t.store.dispatch(Object.assign(Object.assign({},t.inputs.action),{mfaRequestId:e}))}),this.handleError)}},{key:"handleError",value:function(t){console.warn({errCode:t}),"invalid_mfa"===t&&this.form.get("totp").setValue("");var e=this.translate.instant("ERROR.SIGNIN_ERR"),n=this.translate.instant("ERROR_CODE."+t.toUpperCase());this.store.dispatch(Object(k.j)({message:"".concat(e," - ").concat(n),class:"warn"}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(x.Ob(r.a),x.Ob(r.d),x.Ob(P.b),x.Ob(A.d),x.Ob(S.a),x.Ob(T.a),x.Ob(I.a),x.Ob(M.e))},t.\u0275cmp=x.Ib({type:t,selectors:[["mfa-confirm"]],decls:13,vars:5,consts:[["heading","HEADING.AUTHORIZE_ACTION"],[3,"ngSwitch"],[3,"ngTemplateOutlet",4,"ngSwitchCase"],["fetching",""],["ready",""],["fidoWaiting",""],["fidoError",""],[3,"ngTemplateOutlet"],["color","accent"],[3,"ngSwitch",4,"ngIf"],["class","global__text global__text-caption",4,"ngIf"],["class","totp-verify",4,"ngIf"],[1,"global__text","global__text-caption"],[1,"totp-verify"],["body","","translate",""],["controlName","totp",3,"form"],[1,"hwauth-verify"],[1,"hwauth-error"],["icon","warning","size","lg"],["mat-raised-button","","size","small",3,"click"]],template:function(t,e){1&t&&(x.Ub(0,"pro-dialog",0),x.Sb(1,1),x.gc(2,"async"),x.Oc(3,z,1,1,"ng-container",2),x.Oc(4,V,1,1,"ng-container",2),x.Rb(),x.Tb(),x.Oc(5,H,1,0,"ng-template",null,3,x.Pc),x.Oc(7,Y,6,9,"ng-template",null,4,x.Pc),x.Oc(9,K,4,0,"ng-template",null,5,x.Pc),x.Oc(11,Z,8,3,"ng-template",null,6,x.Pc)),2&t&&(x.Cb(1),x.mc("ngSwitch",x.hc(2,3,e.step$)),x.Cb(2),x.mc("ngSwitchCase","fetching"),x.Cb(1),x.mc("ngSwitchCase","ready"))},directives:[D.a,R.a,j.p,j.q,j.s,L.a,j.n,N.a,M.a,U.a,F.b,B.b],pipes:[j.b,M.d],styles:["input-otp-entry[_ngcontent-%COMP%]{--margin-top:var(--spacing);width:100%}"],changeDetection:0}),t=Object(i.d)([Object(o.a)()],t)}()},sPys:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("w6/c");e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.default)},sWLk:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},sXtk:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n("AytR"),r=n("kZht"),o=["ar","de","en","es","fr","he","it","ja","ko","nl","pl","pt","ru","tr","uk","vi","zh"],a=["fido2","wsHealth","flex","fusionBanners"],s=["PF_PEPEUSD","PF_SHIBUSD","PF_BONKUSD"],c="localhost:4280",u=function(){var t=function(){function t(){C(this,t),this.platform="kraken",this.appVersion="0.0.0",this.urls={rest:"http://".concat(c,"/derivatives/api/v4"),websocket:"ws://".concat(c,"/ws/v1"),auth:"http://".concat(c,"/api/auth/v1"),health:"http://".concat(c,"/api/health/v1"),healthWs:"ws://".concat(c,"/ws/health"),history:"http://".concat(c,"/api/history/v2"),base:"http://".concat(c,"/"),support:"https://support.kraken.com",externalSignIn:"https://www.kraken.com/login-futures",externalSignUp:"https://www.kraken.com/sign-up",fusion:"https://pro.kraken.com/app/trade/futures-btc-usd-perp#dialog/sign-in?utm_source=KF&utm_medium=banner&utm_campaign=pro_futures_launch&utm_content=banner"},this.demo=!0,this.locales=o,this.featuresEnabled=a,this.hiddenMarkets=s}return w(t,[{key:"production",get:function(){return i.b.production}},{key:"localDev",get:function(){return!i.b.production}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Kb({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},scAs:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n}return w(t,[{key:"ngOnInit",value:function(){this.renderer.addClass(this.element.nativeElement,"global__text--bold")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","bold",""]]}),t}()},sikL:function(t,e,n){"use strict";n.r(e),n.d(e,"LimitCloseComponent",(function(){return y}));var i=n("3kIJ"),r=n("mcff"),o=n("h3eB"),a=n("kZht"),s=n("zqNl"),c=n("rfPA"),u=n("bBQR"),l=n("An66"),d=n("EmXI"),h=n("Tcl6"),f=n("UDV5"),p=n("hCLc"),b=n("aDqW"),g=n("DpwM"),m=n("rUBT"),v=function(t,e){return{"global__text--accent":t,"global__text--warn":e}},y=function(){var t=function(){function t(e,n,i){C(this,t),this.store=e,this.inputs=n,this.formBuilder=i}return w(t,[{key:"ngOnInit",value:function(){this.form=this.buildForm}},{key:"submitForm",value:function(){var t={limitPrice:this.form.get("limitPrice").value,orderType:this.form.get("makerOnly").value?"post":"limit",reduceOnly:!0,side:this.inputs.position.balance>0?"sell":"buy",size:Math.abs(this.inputs.position.balance),symbol:this.inputs.position.instrument};this.store.dispatch(Object(o.o)(t))}},{key:"buildForm",get:function(){return this.formBuilder.group({limitPrice:[this.inputs.position.balance>0?this.inputs.ticker.ask:this.inputs.ticker.bid,i.x.required],makerOnly:[!1,[i.x.required]]})}},{key:"absBalance",get:function(){return Math.abs(this.inputs.position.balance)}},{key:"tickSize",get:function(){return this.inputs.instrument?this.inputs.instrument.tickSize:1}},{key:"direction",get:function(){return this.inputs.position.balance>0?"Long":"Short"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Ob(s.b),a.Ob(r.a),a.Ob(i.d))},t.\u0275cmp=a.Ib({type:t,selectors:[["limit-close"]],decls:48,vars:50,consts:[["heading","DIALOG.CONFIRM_CLOSE_AT_PRICE.TITLE"],[1,"limit-close__form","global__text","global__text-body",3,"formGroup"],[1,"limit-close__details"],[1,"limit-close__detail"],[1,"global__text","global__text-body"],[1,"global__text","global__text-body","global__text--mono"],[1,"global__text","global__text-body","global__text--mono",3,"ngClass"],["color","accent","appearance","fill",1,"limit-close__quantity","global__text","global__text-body"],["matInput","","readonly","",3,"value"],["formControlName","limitPrice","required","","matInput","","type","number","min","0",3,"step"],[1,"limit-close__checkboxes"],["formControlName","makerOnly"],["mat-raised-button","","color","warn",1,"global__text","global__text-body",3,"disabled","click"]],template:function(t,e){1&t&&(a.Ub(0,"pro-dialog",0),a.Ub(1,"form",1),a.Ub(2,"section",2),a.Ub(3,"div",3),a.Ub(4,"p",4),a.Qc(5),a.gc(6,"translate"),a.Tb(),a.Ub(7,"p",5),a.Qc(8),a.Tb(),a.Tb(),a.Ub(9,"div",3),a.Ub(10,"p",4),a.Qc(11),a.gc(12,"translate"),a.Tb(),a.Ub(13,"p",5),a.Qc(14),a.gc(15,"number"),a.Tb(),a.Tb(),a.Ub(16,"div",3),a.Ub(17,"p",4),a.Qc(18),a.gc(19,"translate"),a.Tb(),a.Ub(20,"p",6),a.Qc(21),a.Tb(),a.Tb(),a.Ub(22,"div",3),a.Ub(23,"p",4),a.Qc(24),a.gc(25,"translate"),a.Tb(),a.Ub(26,"p",6),a.Qc(27),a.gc(28,"cryptoPrecise"),a.gc(29,"collateral"),a.gc(30,"collateral"),a.Tb(),a.Tb(),a.Tb(),a.Ub(31,"mat-form-field",7),a.Ub(32,"mat-label"),a.Qc(33),a.gc(34,"translate"),a.Tb(),a.Pb(35,"input",8),a.Tb(),a.Ub(36,"mat-form-field",7),a.Ub(37,"mat-label"),a.Qc(38),a.gc(39,"translate"),a.Tb(),a.Pb(40,"input",9),a.Tb(),a.Ub(41,"div",10),a.Ub(42,"mat-checkbox",11),a.Qc(43),a.gc(44,"translate"),a.Tb(),a.Tb(),a.Ub(45,"button",12),a.bc("click",(function(){return e.submitForm()})),a.Qc(46),a.gc(47,"translate"),a.Tb(),a.Tb(),a.Tb()),2&t&&(a.Cb(1),a.mc("formGroup",e.form),a.Cb(4),a.Rc(a.hc(6,19,"COLUMN.SYMBOL")),a.Cb(3),a.Sc(" ",e.inputs.position.instrument," "),a.Cb(3),a.Rc(a.hc(12,21,"COLUMN.SIZE")),a.Cb(3),a.Sc(" ",a.hc(15,23,e.inputs.position.balance)," "),a.Cb(4),a.Rc(a.hc(19,25,"COLUMN.DIRECTION")),a.Cb(2),a.mc("ngClass",a.sc(44,v,e.inputs.position.balance>0,e.inputs.position.balance<0)),a.Cb(1),a.Sc(" ",e.direction," "),a.Cb(3),a.Rc(a.hc(25,27,"COLUMN.PROFIT_LOSS")),a.Cb(2),a.mc("ngClass",a.sc(47,v,e.inputs.position.pnl>0,e.inputs.position.pnl<0)),a.Cb(1),a.Tc(" ",a.ic(28,29,e.inputs.position.pnl,a.hc(29,32,e.inputs.position.instrument))," ",a.hc(30,34,e.inputs.position.instrument)," "),a.Cb(6),a.Rc(a.hc(34,36,"FORM.QUANTITY")),a.Cb(2),a.mc("value",e.absBalance),a.Cb(3),a.Rc(a.hc(39,38,"FORM.LIMIT_PRICE")),a.Cb(2),a.mc("step",e.tickSize),a.Cb(3),a.Sc(" ",a.hc(44,40,"BUTTON.MAKER_ONLY")," "),a.Cb(2),a.mc("disabled",e.form.invalid),a.Cb(1),a.Sc(" ",a.hc(47,42,"BUTTON.CLOSE_POSITION")," "))},directives:[c.a,u.a,i.z,i.p,i.h,l.l,d.c,d.f,h.b,i.c,i.s,i.o,i.g,i.v,f.a,p.b],pipes:[b.d,l.f,g.b,m.b],styles:["@media (max-width:599px){form[_ngcontent-%COMP%]{width:100%}}form[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{margin-top:var(--spacing);width:100%}.limit-close__checkboxes[_ngcontent-%COMP%], .limit-close__details[_ngcontent-%COMP%]{padding:var(--spacing) 0}.limit-close__detail[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;margin-bottom:6px}"],changeDetection:0}),t}()},sq1e:function(t,e,n){"use strict";n.d(e,"a",(function(){return it})),n.d(e,"b",(function(){return Z})),n.d(e,"c",(function(){return ft})),n.d(e,"d",(function(){return J})),n.d(e,"e",(function(){return _t}));var i=n("jL3B"),r=n("s2U3"),s=n("ZtZA"),u=n("An66"),l=n("kZht"),d=n("pTnX"),f=n("FxgA"),p=n("ZTXN"),g=n("bwdy"),m=n("g6G6"),v=n("KTx3"),y=n("ROBh"),_=n("8lHc"),O=n("vE5V"),k=n("+6xv"),T=n("jIqt"),S=n("Ohay"),E=n("kuMc"),x=n("5XID"),P=n("VbQ3"),A=n("O1jd"),I=n("Hq54");function M(t,e){1&t&&l.kc(0)}var D=["*"];function R(t,e){}var j=function(t){return{animationDuration:t}},L=function(t,e){return{value:t,params:e}},N=["tabBodyWrapper"],U=["tabHeader"];function F(t,e){}function B(t,e){if(1&t&&l.Oc(0,F,0,0,"ng-template",9),2&t){var n=l.fc().$implicit;l.mc("cdkPortalOutlet",n.templateLabel)}}function z(t,e){if(1&t&&l.Qc(0),2&t){var n=l.fc().$implicit;l.Rc(n.textLabel)}}function V(t,e){if(1&t){var n=l.Vb();l.Ub(0,"div",6),l.bc("click",(function(){l.Ec(n);var t=e.$implicit,i=e.index,r=l.fc(),o=l.Ac(1);return r._handleClick(t,o,i)})),l.Ub(1,"div",7),l.Oc(2,B,1,1,"ng-template",8),l.Oc(3,z,1,1,"ng-template",8),l.Tb(),l.Tb()}if(2&t){var i=e.$implicit,r=e.index,o=l.fc();l.Gb("mat-tab-label-active",o.selectedIndex==r),l.mc("id",o._getTabLabelId(r))("disabled",i.disabled)("matRippleDisabled",i.disabled||o.disableRipple),l.Db("tabIndex",o._getTabIndex(i,r))("aria-posinset",r+1)("aria-setsize",o._tabs.length)("aria-controls",o._getTabContentId(r))("aria-selected",o.selectedIndex==r)("aria-label",i.ariaLabel||null)("aria-labelledby",!i.ariaLabel&&i.ariaLabelledby?i.ariaLabelledby:null),l.Cb(2),l.mc("ngIf",i.templateLabel),l.Cb(1),l.mc("ngIf",!i.templateLabel)}}function H(t,e){if(1&t){var n=l.Vb();l.Ub(0,"mat-tab-body",10),l.bc("_onCentered",(function(){return l.Ec(n),l.fc()._removeTabBodyWrapperHeight()}))("_onCentering",(function(t){return l.Ec(n),l.fc()._setTabBodyWrapperHeight(t)})),l.Tb()}if(2&t){var i=e.$implicit,r=e.index,o=l.fc();l.Gb("mat-tab-body-active",o.selectedIndex==r),l.mc("id",o._getTabContentId(r))("content",i.content)("position",i.position)("origin",i.origin)("animationDuration",o.animationDuration),l.Db("aria-labelledby",o._getTabLabelId(r))}}var q=["tabListContainer"],$=["tabList"],Q=["nextPaginator"],W=["previousPaginator"],G=new l.s("MatInkBarPositioner",{providedIn:"root",factory:function(){return function(t){return{left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"}}}}),Y=function(){var t=function(){function t(e,n,i,r){C(this,t),this._elementRef=e,this._ngZone=n,this._inkBarPositioner=i,this._animationMode=r}return w(t,[{key:"alignToElement",value:function(t){var e=this;this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular((function(){requestAnimationFrame((function(){return e._setStyles(t)}))})):this._setStyles(t)}},{key:"show",value:function(){this._elementRef.nativeElement.style.visibility="visible"}},{key:"hide",value:function(){this._elementRef.nativeElement.style.visibility="hidden"}},{key:"_setStyles",value:function(t){var e=this._inkBarPositioner(t),n=this._elementRef.nativeElement;n.style.left=e.left,n.style.width=e.width}}]),t}();return t.\u0275fac=function(e){return new(e||t)(l.Ob(l.l),l.Ob(l.B),l.Ob(G),l.Ob(f.a,8))},t.\u0275dir=l.Jb({type:t,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(t,e){2&t&&l.Gb("_mat-animation-noopable","NoopAnimations"===e._animationMode)}}),t}(),K=new l.s("MatTabContent"),Z=function(){var t=function t(e){C(this,t),this.template=e};return t.\u0275fac=function(e){return new(e||t)(l.Ob(l.N))},t.\u0275dir=l.Jb({type:t,selectors:[["","matTabContent",""]],features:[l.Bb([{provide:K,useExisting:t}])]}),t}(),X=new l.s("MatTabLabel"),J=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(s.b);return t.\u0275fac=function(e){return tt(e||t)},t.\u0275dir=l.Jb({type:t,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[l.Bb([{provide:X,useExisting:t}]),l.zb]}),t}(),tt=l.Wb(J),et=Object(d.y)((function t(){C(this,t)})),nt=new l.s("MAT_TAB_GROUP"),it=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this))._viewContainerRef=t,r._closestTabGroup=i,r.textLabel="",r._contentPortal=null,r._stateChanges=new p.b,r.position=null,r.origin=null,r.isActive=!1,r}return w(n,[{key:"ngOnChanges",value:function(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"ngOnInit",value:function(){this._contentPortal=new s.h(this._explicitContent||this._implicitContent,this._viewContainerRef)}},{key:"_setTemplateLabelInput",value:function(t){t&&(this._templateLabel=t)}},{key:"templateLabel",get:function(){return this._templateLabel},set:function(t){this._setTemplateLabelInput(t)}},{key:"content",get:function(){return this._contentPortal}}]),n}(et);return t.\u0275fac=function(e){return new(e||t)(l.Ob(l.R),l.Ob(nt,8))},t.\u0275cmp=l.Ib({type:t,selectors:[["mat-tab"]],contentQueries:function(t,e,n){var i;1&t&&(l.Hb(n,X,!0),l.Ic(n,K,!0,l.N)),2&t&&(l.zc(i=l.cc())&&(e.templateLabel=i.first),l.zc(i=l.cc())&&(e._explicitContent=i.first))},viewQuery:function(t,e){var n;1&t&&l.Jc(l.N,!0),2&t&&l.zc(n=l.cc())&&(e._implicitContent=n.first)},inputs:{disabled:"disabled",textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"]},exportAs:["matTab"],features:[l.zb,l.Ab],ngContentSelectors:D,decls:1,vars:0,template:function(t,e){1&t&&(l.lc(),l.Oc(0,M,1,0,"ng-template"))},encapsulation:2}),t}(),rt={translateTab:Object(k.n)("translateTab",[Object(k.k)("center, void, left-origin-center, right-origin-center",Object(k.l)({transform:"none"})),Object(k.k)("left",Object(k.l)({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),Object(k.k)("right",Object(k.l)({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),Object(k.m)("* => left, * => right, left => center, right => center",Object(k.e)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),Object(k.m)("void => left-origin-center",[Object(k.l)({transform:"translate3d(-100%, 0, 0)"}),Object(k.e)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),Object(k.m)("void => right-origin-center",[Object(k.l)({transform:"translate3d(100%, 0, 0)"}),Object(k.e)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},ot=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o){var a;return C(this,n),(a=e.call(this,t,i,o))._host=r,a._centeringSub=g.a.EMPTY,a._leavingSub=g.a.EMPTY,a}return w(n,[{key:"ngOnInit",value:function(){var t=this;o(h(n.prototype),"ngOnInit",this).call(this),this._centeringSub=this._host._beforeCentering.pipe(Object(T.a)(this._host._isCenterPosition(this._host._position))).subscribe((function(e){e&&!t.hasAttached()&&t.attach(t._host._content)})),this._leavingSub=this._host._afterLeavingCenter.subscribe((function(){t.detach()}))}},{key:"ngOnDestroy",value:function(){o(h(n.prototype),"ngOnDestroy",this).call(this),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}]),n}(s.c);return t.\u0275fac=function(e){return new(e||t)(l.Ob(l.j),l.Ob(l.R),l.Ob(Object(l.V)((function(){return st}))),l.Ob(u.d))},t.\u0275dir=l.Jb({type:t,selectors:[["","matTabBodyHost",""]],features:[l.zb]}),t}(),at=function(){var t=function(){function t(e,n,i){var r=this;C(this,t),this._elementRef=e,this._dir=n,this._dirChangeSubscription=g.a.EMPTY,this._translateTabComplete=new p.b,this._onCentering=new l.o,this._beforeCentering=new l.o,this._afterLeavingCenter=new l.o,this._onCentered=new l.o(!0),this.animationDuration="500ms",n&&(this._dirChangeSubscription=n.change.subscribe((function(t){r._computePositionAnimationState(t),i.markForCheck()}))),this._translateTabComplete.pipe(Object(S.a)((function(t,e){return t.fromState===e.fromState&&t.toState===e.toState}))).subscribe((function(t){r._isCenterPosition(t.toState)&&r._isCenterPosition(r._position)&&r._onCentered.emit(),r._isCenterPosition(t.fromState)&&!r._isCenterPosition(r._position)&&r._afterLeavingCenter.emit()}))}return w(t,[{key:"ngOnInit",value:function(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}},{key:"ngOnDestroy",value:function(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}},{key:"_onTranslateTabStarted",value:function(t){var e=this._isCenterPosition(t.toState);this._beforeCentering.emit(e),e&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_isCenterPosition",value:function(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t}},{key:"_computePositionAnimationState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getLayoutDirection();this._position=this._positionIndex<0?"ltr"==t?"left":"right":this._positionIndex>0?"ltr"==t?"right":"left":"center"}},{key:"_computePositionFromOrigin",value:function(t){var e=this._getLayoutDirection();return"ltr"==e&&t<=0||"rtl"==e&&t>0?"left-origin-center":"right-origin-center"}},{key:"position",set:function(t){this._positionIndex=t,this._computePositionAnimationState()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(l.Ob(l.l),l.Ob(O.b,8),l.Ob(l.h))},t.\u0275dir=l.Jb({type:t,inputs:{animationDuration:"animationDuration",position:"position",_content:["content","_content"],origin:"origin"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),t}(),st=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r){return C(this,n),e.call(this,t,i,r)}return n}(at);return t.\u0275fac=function(e){return new(e||t)(l.Ob(l.l),l.Ob(O.b,8),l.Ob(l.h))},t.\u0275cmp=l.Ib({type:t,selectors:[["mat-tab-body"]],viewQuery:function(t,e){var n;1&t&&l.Wc(s.f,!0),2&t&&l.zc(n=l.cc())&&(e._portalHost=n.first)},hostAttrs:[1,"mat-tab-body"],features:[l.zb],decls:3,vars:6,consts:[[1,"mat-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(t,e){1&t&&(l.Ub(0,"div",0,1),l.bc("@translateTab.start",(function(t){return e._onTranslateTabStarted(t)}))("@translateTab.done",(function(t){return e._translateTabComplete.next(t)})),l.Oc(2,R,0,0,"ng-template",2),l.Tb()),2&t&&l.mc("@translateTab",l.sc(3,L,e._position,l.rc(1,j,e.animationDuration)))},directives:[ot],styles:[".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}\n"],encapsulation:2,data:{animation:[rt.translateTab]}}),t}(),ct=new l.s("MAT_TABS_CONFIG"),ut=0,lt=function t(){C(this,t)},dt=Object(d.w)(Object(d.x)((function t(e){C(this,t),this._elementRef=e})),"primary"),ht=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o){var a;return C(this,n),(a=e.call(this,t))._changeDetectorRef=i,a._animationMode=o,a._tabs=new l.F,a._indexToSelect=0,a._tabBodyWrapperHeight=0,a._tabsSubscription=g.a.EMPTY,a._tabLabelSubscription=g.a.EMPTY,a._dynamicHeight=!1,a._selectedIndex=null,a.headerPosition="above",a.selectedIndexChange=new l.o,a.focusChange=new l.o,a.animationDone=new l.o,a.selectedTabChange=new l.o(!0),a._groupId=ut++,a.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",a.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,a}return w(n,[{key:"ngAfterContentChecked",value:function(){var t=this,e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){var n=null==this._selectedIndex;n||this.selectedTabChange.emit(this._createChangeEvent(e)),Promise.resolve().then((function(){t._tabs.forEach((function(t,n){return t.isActive=n===e})),n||t.selectedIndexChange.emit(e)}))}this._tabs.forEach((function(n,i){n.position=i-e,null==t._selectedIndex||0!=n.position||n.origin||(n.origin=e-t._selectedIndex)})),this._selectedIndex!==e&&(this._selectedIndex=e,this._changeDetectorRef.markForCheck())}},{key:"ngAfterContentInit",value:function(){var t=this;this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe((function(){if(t._clampTabIndex(t._indexToSelect)===t._selectedIndex)for(var e=t._tabs.toArray(),n=0;n.mat-tab-header .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-tab-body-wrapper{transition:none;animation:none}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}\n"],encapsulation:2}),t}(),pt=Object(d.y)((function t(){C(this,t)})),bt=function(){var t=function(t){a(n,t);var e=c(n);function n(t){var i;return C(this,n),(i=e.call(this)).elementRef=t,i}return w(n,[{key:"focus",value:function(){this.elementRef.nativeElement.focus()}},{key:"getOffsetLeft",value:function(){return this.elementRef.nativeElement.offsetLeft}},{key:"getOffsetWidth",value:function(){return this.elementRef.nativeElement.offsetWidth}}]),n}(pt);return t.\u0275fac=function(e){return new(e||t)(l.Ob(l.l))},t.\u0275dir=l.Jb({type:t,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(t,e){2&t&&(l.Db("aria-disabled",!!e.disabled),l.Gb("mat-tab-disabled",e.disabled))},inputs:{disabled:"disabled"},features:[l.zb]}),t}(),gt=Object(A.f)({passive:!0}),mt=function(){var t=function(){function t(e,n,i,r,o,a,s){var c=this;C(this,t),this._elementRef=e,this._changeDetectorRef=n,this._viewportRuler=i,this._dir=r,this._ngZone=o,this._platform=a,this._animationMode=s,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new p.b,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new p.b,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new l.o,this.indexFocused=new l.o,o.runOutsideAngular((function(){Object(v.a)(e.nativeElement,"mouseleave").pipe(Object(E.a)(c._destroyed)).subscribe((function(){c._stopInterval()}))}))}return w(t,[{key:"ngAfterViewInit",value:function(){var t=this;Object(v.a)(this._previousPaginator.nativeElement,"touchstart",gt).pipe(Object(E.a)(this._destroyed)).subscribe((function(){t._handlePaginatorPress("before")})),Object(v.a)(this._nextPaginator.nativeElement,"touchstart",gt).pipe(Object(E.a)(this._destroyed)).subscribe((function(){t._handlePaginatorPress("after")}))}},{key:"ngAfterContentInit",value:function(){var t=this,e=this._dir?this._dir.change:Object(y.a)(null),n=this._viewportRuler.change(150),r=function(){t.updatePagination(),t._alignInkBarToSelectedTab()};this._keyManager=new i.g(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(0),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(r):r(),Object(m.a)(e,n,this._items.changes).pipe(Object(E.a)(this._destroyed)).subscribe((function(){Promise.resolve().then(r),t._keyManager.withHorizontalOrientation(t._getLayoutDirection())})),this._keyManager.change.pipe(Object(E.a)(this._destroyed)).subscribe((function(e){t.indexFocused.emit(e),t._setTabFocus(e)}))}},{key:"ngAfterContentChecked",value:function(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}},{key:"_handleKeydown",value:function(t){if(!Object(I.r)(t))switch(t.keyCode){case I.e:case I.m:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t));break;default:this._keyManager.onKeydown(t)}}},{key:"_onContentChanges",value:function(){var t=this,e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run((function(){t.updatePagination(),t._alignInkBarToSelectedTab(),t._changeDetectorRef.markForCheck()})))}},{key:"updatePagination",value:function(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}},{key:"_isValidIndex",value:function(t){if(!this._items)return!0;var e=this._items?this._items.toArray()[t]:null;return!!e&&!e.disabled}},{key:"_setTabFocus",value:function(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();var e=this._tabListContainer.nativeElement,n=this._getLayoutDirection();e.scrollLeft="ltr"==n?0:e.scrollWidth-e.offsetWidth}}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_updateTabScrollPosition",value:function(){if(!this.disablePagination){var t=this.scrollDistance,e=this._platform,n="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform="translateX(".concat(Math.round(n),"px)"),e&&(e.TRIDENT||e.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}}},{key:"_scrollHeader",value:function(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}},{key:"_handlePaginatorClick",value:function(t){this._stopInterval(),this._scrollHeader(t)}},{key:"_scrollToLabel",value:function(t){if(!this.disablePagination){var e=this._items?this._items.toArray()[t]:null;if(e){var n,i,r=this._tabListContainer.nativeElement.offsetWidth,o=e.elementRef.nativeElement,a=o.offsetLeft,s=o.offsetWidth;"ltr"==this._getLayoutDirection()?i=(n=a)+s:n=(i=this._tabList.nativeElement.offsetWidth-a)-s;var c=this.scrollDistance,u=this.scrollDistance+r;nu&&(this.scrollDistance+=i-u+60)}}}},{key:"_checkPaginationEnabled",value:function(){if(this.disablePagination)this._showPaginationControls=!1;else{var t=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t}}},{key:"_checkScrollingControls",value:function(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}},{key:"_getMaxScrollDistance",value:function(){return this._tabList.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}},{key:"_alignInkBarToSelectedTab",value:function(){var t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}},{key:"_stopInterval",value:function(){this._stopScrolling.next()}},{key:"_handlePaginatorPress",value:function(t,e){var n=this;e&&null!=e.button&&0!==e.button||(this._stopInterval(),Object(_.a)(650,100).pipe(Object(E.a)(Object(m.a)(this._stopScrolling,this._destroyed))).subscribe((function(){var e=n._scrollHeader(t),i=e.maxScrollDistance,r=e.distance;(0===r||r>=i)&&n._stopInterval()})))}},{key:"_scrollTo",value:function(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};var e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}},{key:"selectedIndex",get:function(){return this._selectedIndex},set:function(t){t=Object(x.f)(t),this._selectedIndex!=t&&(this._selectedIndexChanged=!0,this._selectedIndex=t,this._keyManager&&this._keyManager.updateActiveItem(t))}},{key:"focusIndex",get:function(){return this._keyManager?this._keyManager.activeItemIndex:0},set:function(t){this._isValidIndex(t)&&this.focusIndex!==t&&this._keyManager&&this._keyManager.setActiveItem(t)}},{key:"scrollDistance",get:function(){return this._scrollDistance},set:function(t){this._scrollTo(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(l.Ob(l.l),l.Ob(l.h),l.Ob(P.h),l.Ob(O.b,8),l.Ob(l.B),l.Ob(A.a),l.Ob(f.a,8))},t.\u0275dir=l.Jb({type:t,inputs:{disablePagination:"disablePagination"}}),t}(),vt=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a,s,c){var u;return C(this,n),(u=e.call(this,t,i,r,o,a,s,c))._disableRipple=!1,u}return w(n,[{key:"_itemSelected",value:function(t){t.preventDefault()}},{key:"disableRipple",get:function(){return this._disableRipple},set:function(t){this._disableRipple=Object(x.c)(t)}}]),n}(mt);return t.\u0275fac=function(e){return new(e||t)(l.Ob(l.l),l.Ob(l.h),l.Ob(P.h),l.Ob(O.b,8),l.Ob(l.B),l.Ob(A.a),l.Ob(f.a,8))},t.\u0275dir=l.Jb({type:t,inputs:{disableRipple:"disableRipple"},features:[l.zb]}),t}(),yt=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a,s,c){return C(this,n),e.call(this,t,i,r,o,a,s,c)}return n}(vt);return t.\u0275fac=function(e){return new(e||t)(l.Ob(l.l),l.Ob(l.h),l.Ob(P.h),l.Ob(O.b,8),l.Ob(l.B),l.Ob(A.a),l.Ob(f.a,8))},t.\u0275cmp=l.Ib({type:t,selectors:[["mat-tab-header"]],contentQueries:function(t,e,n){var i;1&t&&l.Hb(n,bt,!1),2&t&&l.zc(i=l.cc())&&(e._items=i)},viewQuery:function(t,e){var n;1&t&&(l.Jc(Y,!0),l.Jc(q,!0),l.Jc($,!0),l.Wc(Q,!0),l.Wc(W,!0)),2&t&&(l.zc(n=l.cc())&&(e._inkBar=n.first),l.zc(n=l.cc())&&(e._tabListContainer=n.first),l.zc(n=l.cc())&&(e._tabList=n.first),l.zc(n=l.cc())&&(e._nextPaginator=n.first),l.zc(n=l.cc())&&(e._previousPaginator=n.first))},hostAttrs:[1,"mat-tab-header"],hostVars:4,hostBindings:function(t,e){2&t&&l.Gb("mat-tab-header-pagination-controls-enabled",e._showPaginationControls)("mat-tab-header-rtl","rtl"==e._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[l.zb],ngContentSelectors:D,decls:13,vars:8,consts:[["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-label-container",3,"keydown"],["tabListContainer",""],["role","tablist",1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-labels"],["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(t,e){1&t&&(l.lc(),l.Ub(0,"div",0,1),l.bc("click",(function(){return e._handlePaginatorClick("before")}))("mousedown",(function(t){return e._handlePaginatorPress("before",t)}))("touchend",(function(){return e._stopInterval()})),l.Pb(2,"div",2),l.Tb(),l.Ub(3,"div",3,4),l.bc("keydown",(function(t){return e._handleKeydown(t)})),l.Ub(5,"div",5,6),l.bc("cdkObserveContent",(function(){return e._onContentChanges()})),l.Ub(7,"div",7),l.kc(8),l.Tb(),l.Pb(9,"mat-ink-bar"),l.Tb(),l.Tb(),l.Ub(10,"div",8,9),l.bc("mousedown",(function(t){return e._handlePaginatorPress("after",t)}))("click",(function(){return e._handlePaginatorClick("after")}))("touchend",(function(){return e._stopInterval()})),l.Pb(12,"div",2),l.Tb()),2&t&&(l.Gb("mat-tab-header-pagination-disabled",e._disableScrollBefore),l.mc("matRippleDisabled",e._disableScrollBefore||e.disableRipple),l.Cb(5),l.Gb("_mat-animation-noopable","NoopAnimations"===e._animationMode),l.Cb(5),l.Gb("mat-tab-header-pagination-disabled",e._disableScrollAfter),l.mc("matRippleDisabled",e._disableScrollAfter||e.disableRipple))},directives:[d.r,r.a,Y],styles:['.mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-labels{display:flex}[mat-align-tabs=center]>.mat-tab-header .mat-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-tab-header .mat-tab-labels{justify-content:flex-end}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}._mat-animation-noopable.mat-tab-list{transition:none;animation:none}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-label:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}@media(max-width: 599px){.mat-tab-label{min-width:72px}}\n'],encapsulation:2}),t}(),_t=function(){var t=function t(){C(this,t)};return t.\u0275mod=l.Mb({type:t}),t.\u0275inj=l.Lb({factory:function(e){return new(e||t)},imports:[[u.c,d.j,s.g,d.s,r.c,i.a],d.j]}),t}()},ssKD:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){function t(){}return t.arraycopy=function(t,e,n,i,r){for(;r--;)n[i++]=t[e++]},t.currentTimeMillis=function(){return Date.now()},t}()},sxqi:function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var i=n("6uGs"),r=n("YtkY"),o=n("VmIW"),a=n("KQpv"),s=n.n(a),c=n("i67J"),u=n("sXtk"),l=n("M/Eb"),d=n("TYVA"),h=n("7UDb"),f=n("a1kK"),p=n("kZht"),b=n("1VvW"),g=s()("app:service:market"),m={headers:new i.c({"Content-Type":"application/json"}),withCredentials:!0},v=function(){var t=function(){function t(e,n,i,r){C(this,t),this.http=e,this.env=n,this.router=i,this.route=r}return w(t,[{key:"fetchFuturesMarkets",value:function(){return"cf"===this.env.platform?this.http.get(this.env.urls.rest+"/instruments",m).pipe(Object(r.a)((function(t){return t.instruments})),Object(r.a)(l.c),Object(r.a)(l.e),Object(r.a)(l.b),Object(r.a)(Object(l.d)(this.env.hiddenMarkets))):this.http.get(this.env.urls.rest+"/instruments",m).pipe(Object(r.a)((function(t){return t.instruments})),Object(r.a)(l.c),Object(r.a)(l.e),Object(r.a)(Object(l.d)(this.env.hiddenMarkets)))}},{key:"fetchAuthenticatedFuturesMarkets",value:function(){return this.http.get(this.env.urls.rest+"/trading/instruments",m).pipe(Object(r.a)((function(t){return t.instruments})),Object(r.a)(l.c),Object(r.a)(l.e),Object(r.a)(l.c),Object(r.a)(Object(l.d)(this.env.hiddenMarkets)))}},{key:"fetchLeveragePrefs",value:function(){return this.http.get(this.env.urls.rest+"/leveragepreferences",m).pipe(Object(c.k)("leveragePreferences"))}},{key:"fetchPnlPrefs",value:function(){return this.http.get(this.env.urls.rest+"/pnlpreferences",m).pipe(Object(c.k)("preferences"))}},{key:"setPnlPrefs",value:function(t){var e=new URL(this.env.urls.rest+"/pnlpreferences");return e.searchParams.set("symbol",t.symbol),e.searchParams.set("pnlPreference",t.pnlCurrency),this.http.put(e.href,null,m)}},{key:"setLeveragePrefs",value:function(t){var e=new URL(this.env.urls.rest+"/leveragepreferences");return e.searchParams.set("symbol",t.symbol),t.maxLeverage&&e.searchParams.set("maxLeverage",t.maxLeverage),this.http.put(e.href,null,m)}},{key:"fetchFeeSchedules",value:function(){return this.http.get(this.env.urls.rest+"/feeschedules",h.a).pipe(Object(c.k)("feeSchedules"))}},{key:"currentMarketClass",value:function(){var t,e,n,i;return o.Maybe.fromUndefined(null!==(i=null===(n=null===(e=null===(t=this.route.firstChild)||void 0===t?void 0:t.snapshot)||void 0===e?void 0:e.data)||void 0===n?void 0:n.marketClass)&&void 0!==i?i:void 0)}},{key:"navigateToMarket",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Object(d.x)(t);n?(g("navigating to",n),this.router.navigate([f.c,n.original],{replaceUrl:e})):console.warn('"'.concat(n,'" is not a valid market'))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(p.Yb(i.a),p.Yb(u.a),p.Yb(b.d),p.Yb(b.a))},t.\u0275prov=p.Kb({token:t,factory:t.\u0275fac}),t}()},"t+Fc":function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("unaY"),a=n("qvG1"),s=n("oznm");e.HTMLCanvasElementLuminanceSource=function(t){function e(n){var i=t.call(this,n.width,n.height)||this;return i.canvas=n,i.tempCanvasElement=null,i.buffer=e.makeBufferFromCanvasImageData(n),i}return r(e,t),e.makeBufferFromCanvasImageData=function(t){var n=t.getContext("2d").getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height)},e.toGrayscaleBuffer=function(t,e,n){for(var i=new Uint8ClampedArray(e*n),r=0,o=0,a=t.length;r>10;return i},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new s.default("Requested row is outside the image: "+t);var n=this.getWidth(),i=t*n;return null===e?e=this.buffer.slice(i,i+n):(e.length0&&void 0!==arguments[0]&&arguments[0],n=[this.translate.instant("DIALOG.LVG_SLIDER.BODY.0"),this.translate.instant("DIALOG.LVG_SLIDER.BODY.1"),this.translate.instant("DIALOG.LVG_SLIDER.BODY.2"),this.translate.instant("DIALOG.LVG_SLIDER.BODY.3"),this.translate.instant("DIALOG.LVG_SLIDER.BODY.4")],i=this.supportArticle.transform(360024116752),r={title:"DIALOG.LVG_SLIDER.TITLE",subtitle:"DIALOG.LVG_SLIDER.SUBTITLE",checkbox:e?"DIALOG.LVG_SLIDER.CHECKBOX":void 0,body:'\n
      \n
    • '.concat(n[0],'
    • \n
    • ').concat(n[1],'
    • \n
    • ').concat(n[2],'
    • \n
    • ').concat(n[3],'
    • \n
    \n ').concat(n[4],"\n "),buttons:e?[{label:"BUTTON.ACCEPT",colour:"accent",actions:[Object(d.c)(),Object(l.e)({leverage:0,leverageSlider:!0,leverageDisclaimerAccepted:h.DateTime.utc().toISO()})],callback:function(){t.lvgControl.setValue(!0)}}]:[]};this.store.dispatch(Object(d.g)({name:"confirmation",inputs:r}))}},{key:"leverageMultipliers",value:function(){return Object(b.a)()}},{key:"leverageMax",value:function(t){var e;return this.leverageSteps[null!==(e=null==t?void 0:t.leverage)&&void 0!==e?e:0]}},{key:"changeLeverage",value:function(t){this.store.dispatch(Object(l.e)({leverage:t}))}},{key:"leverageSteps",get:function(){return Object(b.b)()}},{key:"leverageStepsRange",get:function(){var t=[];return this.leverageSteps.forEach((function(e){return t.push({value:e,legend:e+"x"})})),t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(g.Ob(s.b),g.Ob(m.e),g.Ob(f.a))},t.\u0275cmp=g.Ib({type:t,selectors:[["leverage-limiter"]],decls:3,vars:8,consts:[[4,"ngIf"],[1,"leverage-limiter","multi-input"],[1,"flex-split"],[3,"formControl","click"],["tooltip","","sbTooltip","TOOLTIP.LEVERAGE_LIMIT",3,"sbDisabled","sbDelay"],["class","global__text global__text-accent",4,"ngIf"],[1,"slider-info",3,"click"],["icon","info","size","lg"],[3,"step","steps","suffix","stepChange",4,"ngIf"],["body","","ghost","","caption","",3,"marginBottom",4,"ngIf"],[1,"global__text","global__text-accent"],[3,"step","steps","suffix","stepChange"],["body","","ghost","","caption",""]],template:function(t,e){1&t&&(g.Oc(0,L,12,10,"ng-container",0),g.gc(1,"async"),g.gc(2,"async")),2&t&&g.mc("ngIf",g.sc(5,N,g.hc(1,1,e.userData$),g.hc(2,3,e.displayTooltips$)))},directives:[v.n,y.a,r.o,r.f,_.a,O.a,k.a,T.a,S.b,E.a,x.a,P.a,A.a],pipes:[v.b,m.d],styles:[".multi-input[_ngcontent-%COMP%]{border-bottom:1px solid var(--border-colour-dark)}.multi-input[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{--layout-border-width:0}.multi-input[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{margin-top:var(--spacing-s);margin-bottom:var(--spacing)!important}"],changeDetection:0}),t=Object(i.d)([Object(p.a)()],t)}()},u7r1:function(t,e,n){"use strict";function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16;return function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n="";n.length span[_ngcontent-%COMP%]{display:block;line-height:1.25em}.actions-header[_ngcontent-%COMP%]{cursor:pointer}.actions-header[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.actions-header[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--warn-colour);margin-right:var(--spacing-s)}.actions-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--warn-colour);text-transform:capitalize!important}.cancel-button[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%]{cursor:pointer;display:inline-block}.cancel-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.cancel-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .copy-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-left:var(--spacing-s)}.copy-button[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%]{margin-right:var(--spacing)}.copy-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .edit-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .info-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .limit-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%], .market-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--brand)}.cancel-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{color:var(--warn-colour)}.cancel-all-button[_ngcontent-%COMP%]{cursor:pointer}.cancel-all-button[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:inline}.cancel-all-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--warn-colour);margin-right:var(--spacing-s)}.cancel-all-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--warn-colour);text-transform:capitalize!important}table[breakpoint=medium][_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], table[breakpoint=medium][_ngcontent-%COMP%] .copy-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], table[breakpoint=medium][_ngcontent-%COMP%] .edit-button[_ngcontent-%COMP%] p[_ngcontent-%COMP%], table[breakpoint=medium][_ngcontent-%COMP%] .mat-column-reduce_only[_ngcontent-%COMP%]{display:none}.mat-column-reduce_only[_ngcontent-%COMP%]{text-align:right;text-transform:capitalize;padding-right:var(--spacing)}"],changeDetection:0}),t=Object(i.d)([Object(c.a)()],t)}()},v4C1:function(t,e,n){"use strict";n.d(e,"a",(function(){return R}));var i=n("zqNl"),r=n("YtkY"),o=n("i67J"),a=n("MT7k"),s=n("+Px6"),c=n("rxqU"),u=n("YyhG"),l=n("kZht"),d=n("Eu46"),h=n("F6wS"),f=n("An66"),p=n("DTJn"),b=n("NxuZ"),g=n("anSm"),m=n("IkSM"),v=n("B6Vo"),y=n("Cc4E"),_=n("zho4"),O=n("7J2L"),k=n("chaP"),T=n("za3o"),S=n("aDqW"),E=n("DpwM"),x=n("rcUp");function P(t,e){1&t&&l.Pb(0,"kraken-loading")}var A=function(){return[250,100]};function I(t,e){if(1&t&&(l.Ub(0,"sb-table-row"),l.Ub(1,"sb-table-cell"),l.Pb(2,"fa-icon",10),l.Tb(),l.Ub(3,"sb-table-cell",11),l.Qc(4),l.gc(5,"sato"),l.Tb(),l.Ub(6,"sb-table-cell",11),l.Qc(7),l.gc(8,"satoSize"),l.Tb(),l.Ub(9,"sb-table-cell",12),l.Qc(10),l.gc(11,"truncate"),l.Tb(),l.Ub(12,"sb-table-cell",13),l.gc(13,"date"),l.Qc(14),l.gc(15,"date"),l.Tb(),l.Tb()),2&t){var n=e.$implicit,i=e.index,r=l.fc().ngLet,o=l.fc();l.Lc("background-color",r.sizeRelativeTradeHistory?o.sizeRelativeBackground(n):""),l.Gb("positive","buy"===n.side)("negative","sell"===n.side),l.Cb(2),l.mc("icon",o.getTradeDirection(n,r.trades[i+1])),l.Cb(2),l.Sc(" ",l.ic(5,15,n.price,r.selectedMarket)," "),l.Cb(3),l.Sc(" ",l.ic(8,18,n.displayQty,r.selectedMarket)," "),l.Cb(2),l.mc("sbTooltip",o.getTypeTooltip(n.type))("sbDisabled",!r.displayTooltips)("sbDelay",l.qc(30,A)),l.Cb(1),l.Sc(" ",l.ic(11,21,n.type,1)," "),l.Cb(2),l.mc("sbTooltip",l.ic(13,24,n.time,"d MMM y - HH:mm:ss")),l.Cb(2),l.Rc(l.ic(15,27,n.time,"HH:mm:ss"))}}function M(t,e){if(1&t&&(l.Ub(0,"mat-card",1),l.Oc(1,P,1,0,"kraken-loading",2),l.Ub(2,"sb-table"),l.Ub(3,"sb-table-row",3),l.Ub(4,"sb-table-cell"),l.Pb(5,"fa-icon",4),l.Tb(),l.Ub(6,"sb-table-cell",5),l.Qc(7),l.gc(8,"translate"),l.Tb(),l.Ub(9,"sb-table-cell",6),l.Qc(10),l.gc(11,"translate"),l.Tb(),l.Ub(12,"sb-table-cell",7),l.Qc(13),l.gc(14,"translate"),l.Tb(),l.Ub(15,"sb-table-cell",8),l.Qc(16),l.gc(17,"translate"),l.Tb(),l.Tb(),l.Oc(18,I,16,31,"sb-table-row",9),l.Tb(),l.Tb()),2&t){var n=e.ngLet,i=l.fc();l.Cb(1),l.mc("ngIf",i.isLoading(n.trades)),l.Cb(2),l.mc("header",!0),l.Cb(3),l.mc("sbDisabled",!n.displayTooltips)("sbDelay",l.qc(25,A)),l.Cb(1),l.Sc(" ",l.hc(8,17,"COLUMN.PRICE")," "),l.Cb(2),l.mc("sbDisabled",!n.displayTooltips)("sbDelay",l.qc(26,A)),l.Cb(1),l.Tc(" ",l.hc(11,19,"COLUMN.SIZE")," (",n.sizeUnit,") "),l.Cb(2),l.mc("sbDisabled",!n.displayTooltips)("sbDelay",l.qc(27,A)),l.Cb(1),l.Sc(" ",l.hc(14,21,"COLUMN.TYPE")," "),l.Cb(2),l.mc("sbDisabled",!n.displayTooltips)("sbDelay",l.qc(28,A)),l.Cb(1),l.Sc(" ",l.hc(17,23,"COLUMN.TIME")," "),l.Cb(2),l.mc("ngForOf",n.trades)("ngForTrackBy",i.trackByUid)}}var D=function(t,e,n,i,r,o){return{trades:t,selectedMarket:e,sizeUnit:n,sizeFormatter:i,sizeRelativeTradeHistory:r,displayTooltips:o}},R=function(){var t=function(){function t(e){C(this,t),this.store=e,this.trades$=this.store.pipe(Object(i.m)(a.c),Object(o.p)()),this.selectedMarket$=this.store.pipe(Object(i.m)(s.n)),this.userData$=this.store.pipe(Object(i.m)(c.a)),this.sizeUnit$=this.store.pipe(Object(i.m)(u.n)),this.sizeFormatter$=this.store.pipe(Object(i.m)(u.m)),this.sizeRelativeTradeHistory$=this.userData$.pipe(Object(r.a)((function(t){var e;return null===(e=t.sizeRelativeTradeHistory)||void 0===e||e}))),this.displayTooltips$=this.store.pipe(Object(i.m)(c.y))}return w(t,[{key:"trackByUid",value:function(t,e){return e.uid}},{key:"getTradeDirection",value:function(t,e){return e?t.price>e.price?"arrow-small-up":t.price=e&&(o^=t,o&=e-1);this.expTable=r;var s=new Int32Array(e);for(a=0;a2&&void 0!==arguments[2]?arguments[2]:0;return null!==i&&i>0?o(h(n.prototype),"requestAsyncId",this).call(this,t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=l(t.flush.bind(t,null))))}},{key:"recycleAsyncId",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==i&&i>0||null===i&&this.delay>0)return o(h(n.prototype),"recycleAsyncId",this).call(this,t,e,i);0===t.actions.length&&(d(e),t.scheduled=void 0)}}]),n}(n("EWqr").a),p=new(function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,[{key:"flush",value:function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++io.DateTime.local()&&"high"===t.priority}));if(e)return o.DateTime.fromMillis(e.effective_time).toRelative()}))),this.tour$=this.store.pipe(Object(r.m)(p.k))}return w(t,[{key:"ngOnInit",value:function(){var t=this;this.tour$.pipe(Object(u.a)((function(t){return t.inProgress})),Object(u.a)((function(t){return"trading-dashboard"===t.type&&9===t.step||"wallets"===t.type&&5===t.step||"workspaces"===t.type&&6===t.step}))).subscribe((function(){t.infoTourPopper.centerTrigger()}))}},{key:"openShortcutCheatsheet",value:function(){this.store.dispatch(Object(h.g)({name:"shortcuts-cheatsheet"}))}},{key:"setTradingUnits",value:function(t){this.store.dispatch(Object(g.D)({trading:t}))}},{key:"setWalletUnits",value:function(t){this.store.dispatch(Object(g.D)({wallet:t}))}},{key:"getHealthParts",value:function(t){return t.map((function(t){return[pt[t],gt[t]]})).orSome(["LOADING.LOADING","var(--n500)"])}},{key:"startTour",value:function(t){"trading-dashboard"===t||"workspaces"===t?this.router.navigate(["/futures"]):"wallets"===t&&this.router.navigate(["/wallets"]),this.store.dispatch(Object(h.A)({tour:t}))}},{key:"closeDialog",value:function(){this.store.dispatch(Object(h.c)())}},{key:"openWaitingList",value:function(){this.store.dispatch(Object(h.g)({name:"waiting-list"}))}},{key:"hasLanguages",get:function(){return this.env.locales.length>1}},{key:"tradingUnits",get:function(){return this.quantityUnits.trading}},{key:"walletUnits",get:function(){return this.quantityUnits.wallet}},{key:"demo",get:function(){return this.env.demo}},{key:"restrictedBanner",get:function(){var t,e;if(null===(t=this.userDetails)||void 0===t?void 0:t.countryCode){var n=Object(m.b)(null===(e=this.userDetails)||void 0===e?void 0:e.countryCode);if(m.a.includes(n))return"RESTRICTED.BANNER."+n}return"RESTRICTED.BANNER.GENERIC"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(f.a),i.Ob(b.a),i.Ob(r.b),i.Ob(y.d))},t.\u0275cmp=i.Ib({type:t,selectors:[["status-bar"]],viewQuery:function(t,e){var n;1&t&&i.Jc(q,!0),2&t&&i.zc(n=i.cc())&&(e.infoTourPopper=n.first)},inputs:{notifications:"notifications",unreadNotifications:"unreadNotifications",currentLanguage:"currentLanguage",currentTheme:"currentTheme",quantityUnits:"quantityUnits",signedIn:"signedIn",userDetails:"userDetails",platform:"platform"},outputs:{openNotificationDraw:"openNotificationDraw",updateLanguage$:"updateLanguage",selectTheme:"updateTheme"},decls:63,vars:46,consts:[[1,"left"],["body","","class","status system-status","sbPlacement","topStart",3,"sbTooltip",4,"ngLet"],["body","","class","status",4,"ngIf"],["body","","class","status system-status","sbPlacement","topStart",3,"style","sbTooltip",4,"ngIf"],[1,"spacer"],[1,"right"],["body","",1,"status","status--button",3,"sbMenuTriggerFor"],["sbDelay","200",1,"status","status--button",3,"sbTooltip","click"],["icon","command","size","lg"],["sbTooltip","NAV.THEME","sbDelay","200",1,"status","status--button",3,"sbMenuTriggerFor"],["icon","brush","size","lg"],["class","status status--button language-select","sbTooltip","LABEL.SELECT_LANGUAGE","sbDelay","200",4,"ngIf"],["sbTooltip","HEADING.NOTIFICATIONS","sbDelay","200",1,"status","status--button",3,"click"],[1,"global__text",3,"sbBadge","sbBadgeShow"],["size","lg",3,"icon"],["body","","sbDelay","200",1,"status",3,"sbTooltip"],["ghost",""],["themeMenu","sbMenu"],["sb-menu-item","",3,"sbIcon","click"],["tourMenu","sbMenu"],["sb-menu-item","",3,"click",4,"ngIf"],["sb-menu-item","",3,"click"],["localTime",""],["systemHealth",""],["serviceHealth",""],["loading",""],["sbPlacement","topEnd"],["unitsPopper",""],[3,"quantityUnits","changeTradingUnits","changeWalletUnits",4,"sbContent"],["sbPlacement","topStart"],["infoTourPopper",""],[3,"title","dispose",4,"sbContent"],["body","","sbPlacement","topStart",1,"status","system-status",3,"sbTooltip"],["icon","circle","size","lg"],["body","",1,"status"],["icon","warning","size","lg"],["sbTooltip","LABEL.SELECT_LANGUAGE","sbDelay","200",1,"status","status--button","language-select"],[3,"currentLanguage","updateLanguage"],["icon","language","size","lg"],["body","",1,"time-tooltip"],["body","","class","grid-0-1 gap-s-m system-health-tooltip",4,"ngIf","ngIfElse"],["body","",1,"grid-0-1","gap-s-m","system-health-tooltip"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf","ngIfElse"],["icon","circle"],["translate",""],[3,"quantityUnits","changeTradingUnits","changeWalletUnits"],[3,"title","dispose"],["subheading","","target","_blank","href","https://support.kraken.com/hc/en-us/categories/360001977131-Futures",1,"external-button"],["icon","external-link"],[1,"all-tours"],["body","","translate",""],[1,"options"],["body","","mat-raised-button","",3,"click"]],template:function(t,e){if(1&t&&(i.Ub(0,"footer"),i.Ub(1,"div",0),i.Oc(2,Q,4,8,"div",1),i.gc(3,"async"),i.Oc(4,G,3,6,"div",2),i.gc(5,"async"),i.Oc(6,K,3,4,"div",3),i.Tb(),i.Pb(7,"div",4),i.Ub(8,"div",5),i.Ub(9,"div",6),i.Qc(10),i.gc(11,"translate"),i.Tb(),i.Ub(12,"div",7),i.bc("click",(function(){return e.openShortcutCheatsheet()})),i.gc(13,"translate"),i.Pb(14,"fa-icon",8),i.Tb(),i.Ub(15,"div",9),i.Pb(16,"fa-icon",10),i.Tb(),i.Oc(17,Z,3,1,"div",11),i.Ub(18,"div",12),i.bc("click",(function(){return e.openNotificationDraw.emit()})),i.Ub(19,"span",13),i.Pb(20,"fa-icon",14),i.Tb(),i.Tb(),i.Ub(21,"div",15),i.Ub(22,"p",16),i.Qc(23),i.gc(24,"translate"),i.Tb(),i.Qc(25," \xa0 "),i.Ub(26,"p"),i.Qc(27),i.gc(28,"async"),i.Tb(),i.Tb(),i.Tb(),i.Tb(),i.Ub(29,"sb-menu",null,17),i.Ub(31,"button",18),i.bc("click",(function(){return e.selectTheme.emit("auto")})),i.Qc(32),i.gc(33,"translate"),i.Tb(),i.Ub(34,"button",18),i.bc("click",(function(){return e.selectTheme.emit("dark")})),i.Qc(35),i.gc(36,"translate"),i.Tb(),i.Ub(37,"button",18),i.bc("click",(function(){return e.selectTheme.emit("light")})),i.Qc(38),i.gc(39,"translate"),i.Tb(),i.Tb(),i.Ub(40,"sb-menu",null,19),i.Oc(42,X,3,3,"button",20),i.gc(43,"async"),i.Ub(44,"button",21),i.bc("click",(function(){return e.startTour("trading-dashboard")})),i.Qc(45),i.gc(46,"translate"),i.Tb(),i.Tb(),i.Oc(47,J,13,12,"ng-template",null,22,i.Pc),i.Oc(49,at,2,4,"ng-template",null,23,i.Pc),i.Oc(51,ct,1,2,"ng-template",null,24,i.Pc),i.Oc(53,ut,2,0,"ng-template",null,25,i.Pc),i.Ub(55,"sb-popper",26,27),i.Oc(57,lt,1,1,"quantity-units-choice",28),i.Tb(),i.Ub(58,"sb-popper",29,30),i.Oc(60,dt,12,7,"tour-step",31),i.Tb(),i.Pb(61,"trading-tour"),i.Pb(62,"flex-tour")),2&t){var n=i.Ac(30),r=i.Ac(41),o=i.Ac(48);i.Cb(2),i.mc("ngLet",i.hc(3,24,e.overallSystemStatus$)),i.Cb(2),i.mc("ngIf",i.hc(5,26,e.futureMaintenance$)),i.Cb(2),i.mc("ngIf",null==e.userDetails?null:e.userDetails.isRestricted),i.Cb(3),i.mc("sbMenuTriggerFor",r),i.Cb(1),i.Sc(" ",i.hc(11,28,"LABEL.TOURS")," "),i.Cb(2),i.oc("sbTooltip","",i.hc(13,30,"TOOLTIP.KEYBOARD_SHORTCUTS")," (?)"),i.Cb(3),i.mc("sbMenuTriggerFor",n),i.Cb(2),i.mc("ngIf",e.hasLanguages),i.Cb(2),i.Lc("--badge-bg",null!=e.unreadNotifications&&e.unreadNotifications.length?"var(--warn-colour)":"var(--accent-colour)"),i.mc("sbBadge",null==e.notifications?null:e.notifications.length)("sbBadgeShow",null==e.notifications?null:e.notifications.length),i.Cb(1),i.mc("icon",null!=e.notifications&&e.notifications.length?"notification-full":"notification"),i.Cb(1),i.mc("sbTooltip",o),i.Cb(2),i.Sc("",i.hc(24,32,"LABEL.SERVER_TIME"),":"),i.Cb(4),i.Rc(i.hc(28,34,e.serverTimeShort$)),i.Cb(4),i.mc("sbIcon","auto"===e.currentTheme?"check-1":"blank"),i.Cb(1),i.Sc(" ",i.hc(33,36,"LABEL.AUTOMATIC")," "),i.Cb(2),i.mc("sbIcon","dark"===e.currentTheme?"check-1":"blank"),i.Cb(1),i.Sc(" ",i.hc(36,38,"THEME.DARK")," "),i.Cb(2),i.mc("sbIcon","light"===e.currentTheme?"check-1":"blank"),i.Cb(1),i.Sc(" ",i.hc(39,40,"THEME.LIGHT")," "),i.Cb(4),i.mc("ngIf",i.hc(43,42,e.flexEnabled$)),i.Cb(3),i.Sc(" ",i.hc(46,44,"LABEL.TRADING_DASH")," ")}},directives:[_.a,O.n,k.a,T.b,S.a,E.a,x.b,P.a,A.a,I.a,M.a,D.a,R.a,j.a,L.a,N.a,U.a,O.s,F.a,B.a,z.a,V.a,H.b],pipes:[O.b,F.d],styles:["[_nghost-%COMP%]{display:block;color:var(--text-colour);background-color:var(--toolbar-colour);border:1px solid var(--border-colour);border-radius:var(--bdrs);-webkit-user-select:none;-moz-user-select:none;user-select:none}footer[_ngcontent-%COMP%]{height:100%;display:flex}footer[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:1}footer[_ngcontent-%COMP%] .left[_ngcontent-%COMP%], footer[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{display:flex}footer[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{border-right-width:1px}footer[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{border-left-width:1px}.status[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 var(--spacing);border:0 solid var(--border-colour);cursor:default}.status--button[_ngcontent-%COMP%]{cursor:pointer}.system-status[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--spacing-s)}.time-tooltip[_ngcontent-%COMP%]{font-size:.9rem}.time-tooltip[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:var(--spacing-s)}.time-tooltip[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]:not(:first-of-type){margin-top:var(--spacing)}.system-health-tooltip[_ngcontent-%COMP%]{font-size:.9rem}.transparent-backdrop[_ngcontent-%COMP%]{background-color:transparent}quantity-units-choice[_ngcontent-%COMP%]{padding:var(--spacing);max-width:60ch;font-size:14px}.external-button[_ngcontent-%COMP%]{color:var(--brand)}.all-tours[_ngcontent-%COMP%]{margin-top:var(--spacing-l);display:flex;flex-direction:column}.all-tours[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}.all-tours[_ngcontent-%COMP%] .options[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}.all-tours[_ngcontent-%COMP%] .options[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing)}"],changeDetection:0}),t}()},vYTc:function(t,e,n){"use strict";n.d(e,"j",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"i",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"d",(function(){return u})),n.d(e,"h",(function(){return l})),n.d(e,"g",(function(){return d})),n.d(e,"f",(function(){return h})),n.d(e,"b",(function(){return f})),n.d(e,"a",(function(){return p}));var i=n("TYVA");function r(t){return Object(i.s)(t.ask,t.bid)}function o(t){var e=t.pair.replace(i.c,i.b),n="XBT/USD"===e?"BTC/USD":e;return Object.assign(Object.assign({},t),{product_id:t.product_id.toUpperCase(),pair:n})}function a(t){return"".concat(t.pair,"@").concat(t.tag).toLowerCase()}function s(t,e){return i.r.indexOf(t.tag)-i.r.indexOf(e.tag)}var c=["VOLATILE","BURST","VOLUME","SUSPENDING"];function u(t,e){return c.indexOf(t.product_id.split("_")[2])-c.indexOf(e.product_id.split("_")[2])}function l(t,e){return function(n,i){return e.indexOf(t(n))-e.indexOf(t(i))}}var d=l((function(t){return Object(i.p)(t.product_id)}),i.w),h=l((function(t){return Object(i.m)(t.product_id)}),i.e);function f(t){return{price:t.price,base:t.base,quote:t.quote}}var p=function(t){return t.startsWith("PF_")||t.startsWith("FF_")}},va0y:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("Qkwj"),r=n("dyLe"),o=n("LqyJ"),a=function(){function t(e,n,i,r){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),null==n&&(n=t.INIT_SIZE),null==i&&(i=e.getWidth()/2|0),null==r&&(r=e.getHeight()/2|0);var a=n/2|0;if(this.leftInit=i-a,this.rightInit=i+a,this.upInit=r-a,this.downInit=r+a,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new o.default}return t.prototype.detect=function(){for(var t=this.leftInit,e=this.rightInit,n=this.upInit,i=this.downInit,r=!1,a=!0,s=!1,c=!1,u=!1,l=!1,d=!1,h=this.width,f=this.height;a;){a=!1;for(var p=!0;(p||!c)&&e=h){r=!0;break}for(var b=!0;(b||!u)&&i=f){r=!0;break}for(var g=!0;(g||!l)&&t>=0;)(g=this.containsBlackPoint(n,i,t,!1))?(t--,a=!0,l=!0):l||t--;if(t<0){r=!0;break}for(var m=!0;(m||!d)&&n>=0;)(m=this.containsBlackPoint(t,e,n,!0))?(n--,a=!0,d=!0):d||n--;if(n<0){r=!0;break}a&&(s=!0)}if(!r&&s){for(var v=e-t,y=null,_=1;null===y&&_>16&255)+(f>>7&510)+(255&f))/4&255}u.luminances=d}else u.luminances=e;if(void 0===r&&(u.dataWidth=n),void 0===o&&(u.dataHeight=i),void 0===a&&(u.left=0),void 0===s&&(u.top=0),u.left+n>u.dataWidth||u.top+i>u.dataHeight)throw new c.default("Crop rectangle does not fit within image data.");return u}return r(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new c.default("Requested row is outside the image: "+t);var n=this.getWidth();return(null==e||e.length0){var r=i.indexOf(n);-1!==r&&i.splice(r,1)}}},{key:"notifyComplete",value:function(){}},{key:"_next",value:function(t){if(0===this.toRespond.length){var e=[t].concat(b(this.values));this.project?this._tryProject(e):this.destination.next(e)}}},{key:"_tryProject",value:function(t){var e;try{e=this.project.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}]),n}(i.a)},w2Kr:function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var i=n("kZht"),r=n("zqNl"),o=n("uJYd"),a=n("bjK4"),s=n("1VvW"),c=n("F6wS"),u=n("NxuZ"),l=n("Eu46"),d=n("An66"),h=n("1etq"),f=n("scAs"),p=n("WRMk"),b=n("hCLc"),g=n("aDqW");function m(t,e){if(1&t&&(i.Ub(0,"div",16),i.Pb(1,"img",17),i.Tb()),2&t){var n=i.fc(2);i.Cb(1),i.mc("src",n.imageUrl,i.Gc)}}function v(t,e){if(1&t&&(i.Ub(0,"a",18),i.Pb(1,"fa-icon",19),i.Ub(2,"span",20),i.Qc(3,"TOUR.WATCH_VIDEO"),i.Tb(),i.Tb()),2&t){var n=i.fc(2);i.mc("href",n.videoUrl,i.Gc)}}function y(t,e){if(1&t){var n=i.Vb();i.Ub(0,"div",2),i.Oc(1,m,2,1,"div",3),i.Ub(2,"div",4),i.Ub(3,"div"),i.Ub(4,"div",5),i.Ub(5,"span"),i.Pb(6,"fa-icon",6),i.Ub(7,"span",7),i.Qc(8),i.gc(9,"translate"),i.Tb(),i.Tb(),i.Ub(10,"p",8),i.Qc(11),i.Tb(),i.Tb(),i.Pb(12,"progress-bar",9),i.Ub(13,"div",10),i.kc(14),i.Tb(),i.Tb(),i.Ub(15,"div",11),i.Oc(16,v,4,1,"a",12),i.Pb(17,"div",13),i.Ub(18,"span"),i.Ub(19,"button",14),i.bc("click",(function(){return i.Ec(n),i.fc().previous()})),i.Qc(20),i.gc(21,"translate"),i.Tb(),i.Ub(22,"button",15),i.bc("click",(function(){return i.Ec(n),i.fc().next()})),i.Qc(23),i.gc(24,"translate"),i.Tb(),i.Tb(),i.Tb(),i.Tb(),i.Tb()}if(2&t){var r=e.ngLet,o=i.fc();i.Lc("min-height",o.minHeight),i.Cb(1),i.mc("ngIf",o.image),i.Cb(7),i.Rc(i.hc(9,11,o.title)),i.Cb(3),i.Tc("",r.step," / ",r.total,""),i.Cb(1),i.mc("progress",o.progress(r)),i.Cb(4),i.mc("ngIf",o.videoUrl),i.Cb(3),i.mc("disabled",r.step<2),i.Cb(1),i.Sc(" ",i.hc(21,13,"BUTTON.PREVIOUS")," "),i.Cb(3),i.Sc(" ",i.hc(24,15,100===o.progress(r)?"BUTTON.FINISH":"BUTTON.NEXT")," ")}}var _=["*"],O=function(){var t=function(){function t(e,n){C(this,t),this.store=e,this.router=n,this.minHeight="auto",this.dispose=new i.o,this.nextEvent=new i.o,this.previousEvent=new i.o,this.tour$=this.store.pipe(Object(r.m)(a.k)),this.stepMoved=!1}return w(t,[{key:"ngOnDestroy",value:function(){this.stepMoved||this.endTour()}},{key:"endTour",value:function(){this.store.dispatch(Object(o.d)())}},{key:"next",value:function(){this.stepMoved=!0,this.nextRouteTo&&this.router.navigate([this.nextRouteTo]),this.nextEvent.emit(),this.store.dispatch(Object(o.f)()),this.dispose.emit()}},{key:"previous",value:function(){this.stepMoved=!0,this.previousRouteTo&&this.router.navigate([this.previousRouteTo]),this.previousEvent.emit(),this.store.dispatch(Object(o.m)()),this.dispose.emit()}},{key:"progress",value:function(t){return t.step/t.total*100}},{key:"imageUrl",get:function(){return"assets/images/tour-".concat(this.image,".png")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(r.b),i.Ob(s.d))},t.\u0275cmp=i.Ib({type:t,selectors:[["tour-step"]],inputs:{image:"image",title:"title",nextRouteTo:"nextRouteTo",previousRouteTo:"previousRouteTo",videoUrl:"videoUrl",minHeight:"minHeight"},outputs:{dispose:"dispose",nextEvent:"nextEvent",previousEvent:"previousEvent"},ngContentSelectors:_,decls:6,vars:3,consts:[["icon","close-medium","size","lg",1,"close",3,"click"],["class","tour-step",3,"minHeight",4,"ngLet"],[1,"tour-step"],["class","left-container",4,"ngIf"],[1,"right-container"],[1,"title"],["icon","kraken","size","lg"],["subheading","","bold",""],["subheading","",1,"step-id"],[3,"progress"],[1,"content"],[1,"buttons"],["subheading","","target","_blank","rel","noopener",3,"href",4,"ngIf"],[1,"spacer"],["subheading","","mat-button","",3,"disabled","click"],["subheading","","mat-raised-button","",3,"click"],[1,"left-container"],["alt","Tour component",3,"src"],["subheading","","target","_blank","rel","noopener",3,"href"],["icon","caret-right","size","3x"],["translate",""]],template:function(t,e){1&t&&(i.lc(),i.Ub(0,"mat-card"),i.Ub(1,"mat-card-title"),i.Ub(2,"fa-icon",0),i.bc("click",(function(){return e.dispose.emit()})),i.Tb(),i.Tb(),i.Ub(3,"mat-card-content"),i.Oc(4,y,25,17,"div",1),i.gc(5,"async"),i.Tb(),i.Tb()),2&t&&(i.Cb(4),i.mc("ngLet",i.hc(5,1,e.tour$)))},directives:[c.a,c.d,u.b,c.b,l.a,d.n,h.a,f.a,p.a,b.b,g.a],pipes:[d.b,g.d],styles:[".tour-step[_ngcontent-%COMP%]{display:flex;flex-direction:row;padding:var(--spacing-l);background:var(--card-colour);min-height:300px}mat-card-title[_ngcontent-%COMP%]{color:var(--text-colour);display:flex;justify-content:flex-end!important}mat-card-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{cursor:pointer}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.left-container[_ngcontent-%COMP%]{margin-right:var(--spacing-l);width:400px}.left-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:400px;border-radius:10px;animation:fadeIn 1s;-webkit-animation:fadeIn 1s;-moz-animation:fadeIn 1s;-o-animation:fadeIn 1s;-ms-animation:fadeIn 1s}.right-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;max-width:400px}progress-bar[_ngcontent-%COMP%]{width:100%;margin-bottom:var(--spacing-l)}.content[_ngcontent-%COMP%]{line-height:1.3!important}.step-id[_ngcontent-%COMP%]{margin-left:var(--spacing);align-self:center}.title[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;color:var(--brand);padding-bottom:var(--spacing-s);margin-bottom:var(--spacing)}.title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{padding-right:var(--spacing)}.buttons[_ngcontent-%COMP%]{display:flex;margin-top:var(--spacing-l);flex-direction:row;justify-content:space-between;align-self:flex-end;width:100%}.buttons[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{cursor:pointer;color:var(--brand);vertical-align:middle}.buttons[_ngcontent-%COMP%] fa-icon.disabled[_ngcontent-%COMP%]{color:var(--ghost-colour)}"],changeDetection:0}),t}()},"w6/c":function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n("sKBq");e.default=function(t){function e(e){void 0===e&&(e=void 0);var n=t.call(this,e)||this;return n.message=e,n}return r(e,t),e}(o.CustomError)},wCIf:function(t,e,n){var i=n("67SP"),r=n("bT3u");function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=new i(this.degree);e.fill(0);var n=i.concat([t,e],t.length+this.degree),o=r.mod(n,this.genPoly),a=this.degree-o.length;if(a>0){var s=new i(this.degree);return s.fill(0),o.copy(s,a),s}return o},t.exports=o},wMit:function(t,e,n){"use strict";n.d(e,"q",(function(){return r})),n.d(e,"p",(function(){return o})),n.d(e,"k",(function(){return a})),n.d(e,"h",(function(){return s})),n.d(e,"f",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"m",(function(){return l})),n.d(e,"j",(function(){return d})),n.d(e,"c",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"l",(function(){return p})),n.d(e,"g",(function(){return b})),n.d(e,"a",(function(){return g})),n.d(e,"n",(function(){return m})),n.d(e,"i",(function(){return v})),n.d(e,"b",(function(){return y})),n.d(e,"o",(function(){return _}));var i=n("zqNl"),r=Object(i.g)("Set Selected Market",Object(i.l)()),o=Object(i.g)("Set Quote Asset",Object(i.l)()),a=Object(i.g)("Set Assets",Object(i.l)()),s=Object(i.g)("Fetch Markets"),c=Object(i.g)("Fetch Futures Markets"),u=Object(i.g)("Fetch Authenticated Futures Markets"),l=Object(i.g)("Set Futures Markets",Object(i.l)()),d=Object(i.g)("Get Funding Rates",Object(i.l)()),h=Object(i.g)("Check Contract Expiry"),f=Object(i.g)("Fetch Fee Schedules"),p=Object(i.g)("Set Fee Schedules",Object(i.l)()),b=Object(i.g)("Fetch Leverage Preferences"),g=Object(i.g)("Set Flex Leverage Preferences",Object(i.l)()),m=Object(i.g)("Set Leverage Preferences",Object(i.l)()),v=Object(i.g)("Fetch PnL Preferences"),y=Object(i.g)("Set Flex PnL Preferences",Object(i.l)()),_=Object(i.g)("Set PnL Preferences",Object(i.l)())},wdR4:function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s}));var i=n("An66"),r=n("kZht"),o=function(){function t(e,n){C(this,t),this._document=n;var i=this._textarea=this._document.createElement("textarea"),r=i.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",i.setAttribute("aria-hidden","true"),i.value=e,this._document.body.appendChild(i)}return w(t,[{key:"copy",value:function(){var t=this._textarea,e=!1;try{if(t){var n=this._document.activeElement;t.select(),t.setSelectionRange(0,t.value.length),e=this._document.execCommand("copy"),n&&n.focus()}}catch(i){}return e}},{key:"destroy",value:function(){var t=this._textarea;t&&(t.parentNode&&t.parentNode.removeChild(t),this._textarea=void 0)}}]),t}(),a=function(){var t=function(){function t(e){C(this,t),this._document=e}return w(t,[{key:"copy",value:function(t){var e=this.beginCopy(t),n=e.copy();return e.destroy(),n}},{key:"beginCopy",value:function(t){return new o(t,this._document)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Yb(i.d))},t.\u0275prov=Object(r.Kb)({factory:function(){return new t(Object(r.Yb)(i.d))},token:t,providedIn:"root"}),t}(),s=function(){var t=function t(){C(this,t)};return t.\u0275mod=r.Mb({type:t}),t.\u0275inj=r.Lb({factory:function(e){return new(e||t)}}),t}()},wjKt:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("lcP6"),r=n("y1Fj"),o=n("SnIc"),a=n("PDjX"),s=n("L09h"),c=n("KZGf"),u=n("3xzP"),l=n("nB6u");e.default=function(){function t(){}return t.decode=function(e,n,a,u){var d=new i.default(e),h=new c.default,f=new Array,p=-1,b=-1;try{var g=null,m=!1,v=void 0;do{if(d.available()<4)v=s.default.TERMINATOR;else{var y=d.readBits(4);v=s.default.forBits(y)}switch(v){case s.default.TERMINATOR:break;case s.default.FNC1_FIRST_POSITION:case s.default.FNC1_SECOND_POSITION:m=!0;break;case s.default.STRUCTURED_APPEND:if(d.available()<16)throw new l.default;p=d.readBits(8),b=d.readBits(8);break;case s.default.ECI:var _=t.parseECIValue(d);if(null===(g=r.default.getCharacterSetECIByValue(_)))throw new l.default;break;case s.default.HANZI:var O=d.readBits(4),k=d.readBits(v.getCharacterCountBits(n));O===t.GB2312_SUBSET&&t.decodeHanziSegment(d,h,k);break;default:var w=d.readBits(v.getCharacterCountBits(n));switch(v){case s.default.NUMERIC:t.decodeNumericSegment(d,h,w);break;case s.default.ALPHANUMERIC:t.decodeAlphanumericSegment(d,h,w,m);break;case s.default.BYTE:t.decodeByteSegment(d,h,w,g,f,u);break;case s.default.KANJI:t.decodeKanjiSegment(d,h,w);break;default:throw new l.default}}}while(v!==s.default.TERMINATOR)}catch(C){throw new l.default}return new o.default(e,h.toString(),0===f.length?null:f,null===a?null:a.toString(),p,b)},t.decodeHanziSegment=function(t,e,n){if(13*n>t.available())throw new l.default;for(var i=new Uint8Array(2*n),r=0;n>0;){var o=t.readBits(13),s=o/96<<8&4294967295|o%96;i[r]=(s+=s<959?41377:42657)>>8&255,i[r+1]=255&s,r+=2,n--}try{e.append(u.default.decode(i,a.default.GB2312))}catch(c){throw new l.default(c)}},t.decodeKanjiSegment=function(t,e,n){if(13*n>t.available())throw new l.default;for(var i=new Uint8Array(2*n),r=0;n>0;){var o=t.readBits(13),s=o/192<<8&4294967295|o%192;i[r]=(s+=s<7936?33088:49472)>>8,i[r+1]=s,r+=2,n--}try{e.append(u.default.decode(i,a.default.SHIFT_JIS))}catch(c){throw new l.default(c)}},t.decodeByteSegment=function(t,e,n,i,r,o){if(8*n>t.available())throw new l.default;for(var s,c=new Uint8Array(n),d=0;d=t.ALPHANUMERIC_CHARS.length)throw new l.default;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,n,i,r){for(var o=n.length();i>1;){if(e.available()<11)throw new l.default;var a=e.readBits(11);n.append(t.toAlphaNumericChar(Math.floor(a/45))),n.append(t.toAlphaNumericChar(a%45)),i-=2}if(1===i){if(e.available()<6)throw new l.default;n.append(t.toAlphaNumericChar(e.readBits(6)))}if(r)for(var s=o;s=3;){if(e.available()<10)throw new l.default;var r=e.readBits(10);if(r>=1e3)throw new l.default;n.append(t.toAlphaNumericChar(Math.floor(r/100))),n.append(t.toAlphaNumericChar(Math.floor(r/10)%10)),n.append(t.toAlphaNumericChar(r%10)),i-=3}if(2===i){if(e.available()<7)throw new l.default;var o=e.readBits(7);if(o>=100)throw new l.default;n.append(t.toAlphaNumericChar(Math.floor(o/10))),n.append(t.toAlphaNumericChar(o%10))}else if(1===i){if(e.available()<4)throw new l.default;var a=e.readBits(4);if(a>=10)throw new l.default;n.append(t.toAlphaNumericChar(a))}},t.parseECIValue=function(t){var e=t.readBits(8);if(0==(128&e))return 127&e;if(128==(192&e))return(63&e)<<8&4294967295|t.readBits(8);if(192==(224&e))return(31&e)<<16&4294967295|t.readBits(16);throw new l.default},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}()},wk3K:function(t,e,n){"use strict";n.d(e,"a",(function(){return W}));var i=n("D57K"),r=n("6uGs"),o=n("gxtV"),a=n("zqNl"),s=n("KQpv"),c=n.n(s),u=n("HM3f"),l=n("BwBJ"),d=n("jOdJ"),h=n("iT4G"),f=n("xVbo"),p=n("w0kG"),b=n("0Woy"),g=n("yBos"),v=n("TYVA"),y=n("i67J"),_=n("lx5p"),O=n("Qbn9"),k=n("pjhv"),T=n("NloN"),S=n("rTkt"),E=n("uJYd"),x=n("h3eB"),P=n("sXtk"),A=n("ylpo"),I=n("bjK4"),M=n("+Px6"),D=n("qAYy"),R=n("YyhG"),j=n("rxqU"),L=n("J/3c"),N=n("UbJG"),U=n("0goF"),F=n("mlVJ"),B=n("kZht"),z=n("Asjx"),V=n("F6wS"),H=n("An66");function q(t,e){1&t&&B.Pb(0,"div",3)}var $=c()("app:chart-tradingview"),Q=c()("trace:app:chart-tradingview"),W=function(){var t=function(){function t(e,n,i,s,c,p){var b=this;C(this,t),this.http=e,this.breakpointObserver=n,this.env=i,this.el=s,this.store=c,this.zone=p,this.socket=Object(g.a)(this.env.urls.websocket+"?chart"),this.chart=null,this.retryDelay=100,this.resolution="1",this.resolutionMap={1:"1m",5:"5m",15:"15m",30:"30m",60:"1h",240:"4h",720:"12h","1D":"1d",D:"1d"},this.chartType="trade",this.thereIsSomeData=!1,this.orderLines=new Map,this.positionLines=new Map,this.liquidationLine=null,this.options={disableUndo:!1},this.userSignedIn$=this.store.pipe(Object(a.m)(j.m)),this.markets$=this.store.pipe(Object(a.m)(M.j)),this.instrumentSymbol$=this.store.pipe(Object(a.m)(M.r)),this.selectedMarket$=this.store.pipe(Object(a.m)(M.n)),this.selectedMarketPosition$=this.store.pipe(Object(a.m)(R.g)),this.selectedMarketOrders$=this.store.pipe(Object(a.m)(R.f)),this.userData$=this.store.pipe(Object(a.m)(j.a)),this.selectedTicker$=this.store.pipe(Object(a.m)(D.p)),this.userFuturesWallets$=this.store.pipe(Object(a.m)(L.h)),this.userSelectedFuturesWallet$=this.store.pipe(Object(a.m)(L.n)),this.layoutTheme$=this.store.pipe(Object(a.m)(I.q)),this.workspaceId$=this.store.pipe(Object(a.m)(N.b)),this.enableChartPointer$=this.store.pipe(Object(a.m)(I.b)),this.datafeed={onReady:function(t){setTimeout((function(){return t({exchanges:[{value:"",name:"",desc:""}],supported_resolutions:["1","5","15","30","60","240","720","D","W"],supports_marks:!1,supports_timescale_marks:!1,supports_time:!1})}),0)},searchSymbols:function(){},resolveSymbol:function(t,e){$("resolving symbol",t),b.store.pipe(Object(a.m)(M.i,{symbol:t}),Object(y.h)(),Object(l.a)(0)).subscribe((function(n){var i,r;$("found market",n);var o=null!==(r=null===(i=n.numericPrecision)||void 0===i?void 0:i.short)&&void 0!==r?r:8,a=Math.pow(10,o);Q("using precision/scale",o,a);var s=t.replace(F.b,"BTC");e({name:s,full_name:"",ticker:s,description:s,type:"futures",session:"24x7",exchange:"",listed_exchange:"",timezone:"Europe/London",pricescale:a,minmov:1,supported_resolutions:["1","5","15","30","60","240","720","D","W"],has_intraday:!0,intraday_multipliers:["1","5","15","30","60","240","720"],has_no_volume:!1})}))},getBars:function(t,e,n,i,o,a){var s={headers:new r.c({"Content-Type":"application/json"}),withCredentials:!0},c=t.name.replace(F.a,"XBT");b.resolution=e,b.http.get("".concat(b.env.urls.rest,"/charts/").concat(b.chartType,"/").concat(c,"/").concat(b.resolutionMap[e],"?from=").concat(n,"&to=").concat(i),s).subscribe((function(t){b.thereIsSomeData=!0,b.retryDelay=100;var e=t.candles.map((function(t){return{open:Number(t.open),high:Number(t.high),low:Number(t.low),close:Number(t.close),volume:Number(t.volume),time:t.time}}));o(e,{noData:0===t.candles.length||!t.more_candles})}),(function(t){console.error("Market Chart Snapshot Error",t),b.retryDelay=Object(y.b)(b.retryDelay),$("Market Chart HTTP Error; Retrying in ".concat(b.retryDelay,"ms")),setTimeout((function(){return b.createChart()}),b.retryDelay),a("http error")}))},subscribeBars:function(t,e,n){Object(u.a)([b.selectedMarketOrders$,b.selectedMarketPosition$,b.selectedTicker$,b.userData$]).pipe(Object(d.a)(),Object(o.b)(b)).subscribe((function(i){var r=m(i,4),a=r[0],s=r[1],c=(r[2],r[3]),u=t.name.replace(F.a,"XBT");b.socket.next({event:"subscribe",feed:"candles_".concat(b.chartType,"_").concat(b.resolutionMap[e]),product_ids:[u]}),b.socket.pipe(Object(h.a)(12.5*O.e),Object(f.a)((function(t){return t.feed==="candles_".concat(b.chartType,"_").concat(b.resolutionMap[e])})),Object(f.a)((function(t){return!!t.candle})),Object(o.b)(b)).subscribe((function(t){var e=t.candle;b.retryDelay=100,n({open:Number(e.open),high:Number(e.high),low:Number(e.low),close:Number(e.close),volume:Number(e.volume),time:e.time})}),(function(t){var e;null===(e=b.socket)||void 0===e||e.complete(),console.error("Market Chart Realtime Error",t),b.retryDelay=Object(y.b)(b.retryDelay),$("Market Chart WS Error; Restarting in ".concat(b.retryDelay,"ms")),setTimeout((function(){return b.createChart()}),b.retryDelay)}),(function(){var t;console.warn("Chart WS completed. Page reload might be necessary."),null===(t=b.socket)||void 0===t||t.complete(),b.createChart()})),a&&b.ordersVisible(c)&&a.size<100&&b.updateOrderLines(),s&&(b.updatePositionLines(),b.liquidationPriceVisible(c)&&b.updateLiquidationLine())}))},unsubscribeBars:function(t){var e=t.replace(F.a,"XBT").split("_");b.socket.next("PV"===e[0]||"PI"===e[0]||"PF"===e[0]?{event:"unsubscribe",product_ids:["".concat(e[0],"_").concat(e[1])],feed:"candles_".concat(b.chartType,"_").concat(b.resolutionMap[b.resolution])}:{event:"unsubscribe",product_ids:["".concat(e[0],"_").concat(e[1],"_").concat(e[2])],feed:"candles_".concat(b.chartType,"_").concat(b.resolutionMap[b.resolution])})}}}return w(t,[{key:"saveChart",value:function(){var t,e=this;null===(t=this.chart)||void 0===t||t.save((function(t){var n=t.charts,i="cf"===e.env.platform?A.c:A.d;Object(T.c)(i,{charts:n})}))}},{key:"ngOnInit",value:function(){var t=this;this.workspaceId$.pipe(Object(d.a)()).subscribe((function(e){t.activeWorkspaceId=e})),this.instrumentSymbol$.pipe(Object(o.b)(this)).subscribe((function(e){if(t.chart){try{t.chart.setSymbol(e.toUpperCase(),t.resolution,(function(){}))}catch(n){console.warn("Chart not yet initialised.")}t.liquidationLine&&(t.liquidationLine.remove(),t.liquidationLine=null)}else setTimeout((function(){t.createChart()}),100)})),this.selectedMarketOrders$.pipe(Object(p.a)(this.userData$),Object(o.b)(this)).subscribe((function(e){var n=m(e,2),i=n[0],r=n[1];t.chart&&t.ordersVisible(r)&&i.size<100&&t.updateOrderLines()})),this.selectedMarketPosition$.pipe(Object(p.a)(this.userData$),Object(o.b)(this)).subscribe((function(e){var n=m(e,2),i=(n[0],n[1]);t.chart&&t.positionsVisible(i)&&(t.updatePositionLines(),t.liquidationPriceVisible(i)&&t.updateLiquidationLine())})),this.layoutTheme$.pipe(Object(b.a)(),Object(o.b)(this)).subscribe((function(e){var n=m(e,2);n[0],n[1];t.saveChart(),setTimeout((function(){return t.createChart()}))})),this.watchChartSettings()}},{key:"ngOnDestroy",value:function(){try{this.saveChart()}catch(t){console.error("internal chart error",t)}}},{key:"liquidationPriceVisible",value:function(t){return!!t&&!t.hideMarketChartLiquidationPrice}},{key:"ordersVisible",value:function(t){return!!t&&!t.hideMarketChartOrders}},{key:"positionsVisible",value:function(t){return!!t&&!t.hideMarketChartPositions}},{key:"watchChartSettings",value:function(){var t=this;this.userData$.pipe(Object(o.b)(this)).subscribe((function(e){e.chartType&&e.chartType!==t.chartType&&t.changeChartType(e.chartType),"hideMarketChartLiquidationPrice"in e&&void 0!==e.hideMarketChartLiquidationPrice&&t.toggleLiquidationPrice(e.hideMarketChartLiquidationPrice),"hideMarketChartOrders"in e&&void 0!==e.hideMarketChartOrders&&t.toggleOrders(e.hideMarketChartOrders),"hideMarketChartPositions"in e&&void 0!==e.hideMarketChartPositions&&t.togglePositions(e.hideMarketChartPositions)}))}},{key:"changeChartType",value:function(t){this.saveChart(),this.chartType=t,this.createChart()}},{key:"resetLines",value:function(){this.orderLines=new Map,this.positionLines=new Map,this.liquidationLine=null}},{key:"toggleLiquidationPrice",value:function(t){this.liquidationLine&&t&&(this.liquidationLine.remove(),this.liquidationLine=null),this.liquidationLine||t||this.updateLiquidationLine()}},{key:"toggleOrders",value:function(t){var e=this;this.orderLines.size>0&&t&&(this.orderLines.forEach((function(t,n){e.orderLines.get(n).remove()})),this.orderLines=new Map),this.orderLines&&0!==this.orderLines.size||t||this.updateOrderLines()}},{key:"togglePositions",value:function(t){var e=this;this.positionLines.size>0&&t&&(this.positionLines.forEach((function(t,n){e.positionLines.get(n).remove()})),this.positionLines=new Map,this.liquidationLine&&(this.liquidationLine.remove(),this.liquidationLine=null)),this.positionLines&&0!==this.positionLines.size||t||this.updatePositionLines()}},{key:"onCancelOrder",value:function(t){var e=this;this.zone.run((function(){return e.store.dispatch(Object(x.d)({id:t}))}))}},{key:"onEditOrder",value:function(t){var e=this;$("editing order",t),Object(u.a)([this.markets$,this.userSelectedFuturesWallet$]).pipe(Object(d.a)()).subscribe((function(n){var i=m(n,2),r=i[0],o=i[1],a=r.get(t.instrument),s=(null==o?void 0:o.am)||0;e.zone.run((function(){return e.store.dispatch(Object(E.g)({name:"edit-order",inputs:{order:t,instrument:a,availableMargin:s}}))}))}))}},{key:"createChart",value:function(){var t=this;this.instrumentSymbol$.pipe(Object(d.a)()).subscribe((function(e){var n=window.getComputedStyle(t.el.nativeElement),i=n.getPropertyValue("--background-colour")||"#ffffff",r=n.getPropertyValue("--card-colour")||"#ffffff",o="cf"===t.env.platform?A.c:A.d,a=Object(T.b)(o,void 0);a&&(a.charts[0].panes[0].sources[0].state.symbol=e.toUpperCase(),a.charts[0].panes[0].sources[0].state.shortName=e.toUpperCase(),r!==a.charts[0].chartProperties.paneProperties.background&&(a.charts[0].chartProperties.paneProperties.background=r.trim()));var s=Object.assign(Object.assign({symbol:e.toUpperCase(),datafeed:t.datafeed,saved_data:a||void 0,container_id:"chart-container",library_path:"./assets/scripts/charting_library/",interval:Object(T.b)(A.e,"60"),locale:"en",timezone:"Europe/London"},t.isMobile?{preset:"mobile"}:null),{disabled_features:["timeframes_toolbar","edit_buttons_in_legend","control_bar","border_around_the_chart","header_interval_dialog_button","header_compare","header_undo_redo","compare_symbol","widget_logo","symbol_search_hot_key"],autosize:!0,overrides:t.overrides,custom_css_url:"css/chart-overrides.css",loading_screen:{backgroundColor:i},theme:"Dark"});t.socket.next({event:"subscribe",feed:"heartbeat"}),t.chart=new U.widget(s),t.chart.onChartReady((function(){var e;t.proxyCssProps(),null===(e=t.chart)||void 0===e||e.applyOverrides(t.overrides),t.resetLines()}))}))}},{key:"updateLiquidationLine",value:function(){var t=this;if(this.chart&&this.thereIsSomeData){try{this.chart.chart()}catch(n){return}var e=window.getComputedStyle(this.el.nativeElement).getPropertyValue("--warn-colour");this.selectedMarketPosition$.pipe(Object(d.a)()).subscribe((function(i){if(i&&i.liquidation_threshold>0)if(t.liquidationLine)t.liquidationLine.setPrice(i.liquidation_threshold).setQuantity(i.balance.toString());else try{t.liquidationLine=t.chart.chart().createPositionLine(t.options).setPrice(i.liquidation_threshold).setQuantity(i.balance.toString()).setText("Liquidation").setLineColor(e).setBodyTextColor(e).setBodyBorderColor(e).setQuantityBackgroundColor(e).setQuantityBorderColor(e)}catch(n){console.error(n)}}))}}},{key:"updatePositionLines",value:function(){var t=this;if(this.chart&&this.thereIsSomeData){try{this.chart.chart()}catch(e){return}Object(u.a)([this.selectedMarketPosition$,this.instrumentSymbol$]).pipe(Object(d.a)()).subscribe((function(e){var n=m(e,2),i=n[0],r=n[1];if(i){var o=i.pnl>0,a=o?"\u25b2":"\u25bc",s=o?"#009688":"#f44336",c=t.positionLines.get(i.instrument),u=Object(v.n)(r).replace(F.b,"BTC");c?c.setText("".concat(a," ").concat(i.pnl.toFixed(Object(k.b)(u))," ").concat(u)).setBodyTextColor(s).setBodyBorderColor(s).setQuantity(i.balance.toString()).setPrice(i.entry_price):t.positionLines.set(i.instrument,t.chart.chart().createPositionLine(t.options).setText("".concat(a," ").concat(i.pnl.toFixed(Object(k.b)(u))," ").concat(u)).setBodyTextColor(s).setBodyBorderColor(s).setQuantity(i.balance.toString()).setPrice(i.entry_price)),t.positionLines&&t.positionLines.forEach((function(e,n){(!i||i.instrument!==n)&&(t.positionLines.get(n).remove(),t.positionLines.delete(n))}))}else t.positionLines.size>0&&t.positionLines.forEach((function(e,n){t.positionLines.get(n).remove(),t.positionLines.delete(n)}))}))}}},{key:"updateOrderLines",value:function(){var t=this;Object(u.a)([this.selectedMarketOrders$,this.selectedMarket$]).pipe(Object(d.a)()).subscribe((function(e){var n=m(e,2),i=n[0],r=n[1];if(t.chart&&i&&t.thereIsSomeData){try{t.chart.chart()}catch(o){return}i.forEach((function(e){var n=0===e.direction?"Long":"Short",i="stop"===e.type,o="take_profit"===e.type,a=i?"- Stop Loss":o?"- Take Profit":"limit"===e.type?"- Limit":"";if(t.orderLines.get(e.order_id))t.orderLines.get(e.order_id).onMove((function(){setTimeout((function(){t.onEditOrder(Object.assign(Object.assign(Object.assign({},e),e.limit_price&&!i&&!o&&{limit_price:t.getPriceOfOrder(e.order_id,r)}),(i||o)&&{stop_price:t.getPriceOfOrder(e.order_id,r)})),t.updateOrderLinePrice(e.order_id,i?e.stop_price:e.limit_price)}),250)})).onModify("",(function(){setTimeout((function(){return t.onEditOrder(e)}),250)})).onCancel("",(function(){return t.onCancelOrder(e.order_id)})).setQuantity(e.qty.toString()).setPrice(i||o?e.stop_price:e.limit_price).setText("".concat(n," ").concat(a));else{var s=window.getComputedStyle(t.el.nativeElement),c=s.getPropertyValue("--g300"),u=s.getPropertyValue("--warn-colour"),l=0===e.direction?c:u,d=i||o?e.stop_price:e.limit_price;t.orderLines.set(e.order_id,t.chart.chart().createOrderLine(t.options).onMove((function(){setTimeout((function(){t.onEditOrder(Object.assign(Object.assign(Object.assign({},e),e.limit_price&&!i&&!o&&{limit_price:t.getPriceOfOrder(e.order_id,r)}),(i||o)&&{stop_price:t.getPriceOfOrder(e.order_id,r)})),t.updateOrderLinePrice(e.order_id,i?e.stop_price:e.limit_price)}),250)})).onModify("",(function(n){setTimeout((function(){return t.onEditOrder(e)}),250)})).onCancel("",(function(){return t.onCancelOrder(e.order_id)})).setText("".concat(n," ").concat(a)).setLineLength(3).setLineStyle(2).setLineLength(50).setLineColor(l).setExtendLeft(!0).setQuantity(e.qty.toString()).setPrice(d).setBodyTextColor(l).setBodyBorderColor(l).setQuantityBackgroundColor(l).setQuantityBorderColor(l).setCancelButtonBackgroundColor(l).setCancelButtonBorderColor(l).setCancelButtonIconColor("#FFF"))}})),t.orderLines.forEach((function(e,n){i&&(i.get(n)||(t.orderLines.get(n).remove(),t.orderLines.delete(n)))}))}}))}},{key:"proxyCssProps",value:function(){var t=this;setTimeout((function(){var e=t.el.nativeElement.querySelector("iframe");if(e){var n=window.getComputedStyle(t.el.nativeElement);["--brand","--accent-colour","--warn-colour","--background-colour","--toolbar-colour","--card-colour","--button-colour","--form-input-colour","--text-colour","--ghost-colour","--button-text-colour","--input-colour","--link-colour","--border-colour-dark","--icon-colour","--g300"].forEach((function(t){return Object(S.a)(t,n,e)}))}}),100)}},{key:"getPriceOfOrder",value:function(t,e){var n,i,r=this.orderLines.get(t).getPrice();if(!e)return r;var o=null!==(i=null===(n=e.numericPrecision)||void 0===n?void 0:n.full)&&void 0!==i?i:8,a=Object(_.H)(o)(r),s=Object(_.I)(e.tickSize)(a);return Q("get price of order id "+t,{rawPrice:r,price:a,nearestTick:s}),s}},{key:"updateOrderLinePrice",value:function(t,e){return this.orderLines.get(t).setPrice(e)}},{key:"overrides",get:function(){var t=window.getComputedStyle(this.el.nativeElement);return this.proxyCssProps(),{"paneProperties.background":t.getPropertyValue("--card-colour").trim(),"paneProperties.vertGridProperties.color":t.getPropertyValue("--border-colour-dark").trim(),"paneProperties.horzGridProperties.color":t.getPropertyValue("--border-colour-dark").trim(),"scalesProperties.textColor":t.getPropertyValue("--text-colour").trim(),"scalesProperties.lineColor":t.getPropertyValue("--text-colour").trim(),"mainSeriesProperties.candleStyle.upColor":t.getPropertyValue("--accent-colour").trim(),"mainSeriesProperties.candleStyle.borderUpColor":t.getPropertyValue("--accent-colour").trim(),"mainSeriesProperties.candleStyle.downColor":t.getPropertyValue("--warn-colour").trim(),"mainSeriesProperties.candleStyle.borderDownColor":t.getPropertyValue("--warn-colour").trim()}}},{key:"isMobile",get:function(){return this.breakpointObserver.isMatched("(max-width: 599px)")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(B.Ob(r.a),B.Ob(z.a),B.Ob(P.a),B.Ob(B.l),B.Ob(a.b),B.Ob(B.B))},t.\u0275cmp=B.Ib({type:t,selectors:[["market-chart"]],hostBindings:function(t,e){1&t&&B.bc("beforeunload",(function(){return e.saveChart()}),!1,B.Dc)},decls:5,vars:3,consts:[["id","market-chart",1,"market-chart"],["class","drag-event-hider",4,"ngIf"],["id","chart-container"],[1,"drag-event-hider"]],template:function(t,e){1&t&&(B.Ub(0,"mat-card",0),B.Ub(1,"mat-card-content"),B.Oc(2,q,1,0,"div",1),B.gc(3,"async"),B.Pb(4,"div",2),B.Tb(),B.Tb()),2&t&&(B.Cb(2),B.mc("ngIf",!1===B.hc(3,1,e.enableChartPointer$)))},directives:[V.a,V.b,H.n],pipes:[H.b],styles:["mat-card[_ngcontent-%COMP%]{box-shadow:none!important}.market-chart[_ngcontent-%COMP%], .market-chart[_ngcontent-%COMP%] #chart-container[_ngcontent-%COMP%], .market-chart[_ngcontent-%COMP%] .mat-card-content[_ngcontent-%COMP%]{height:100%}@media (max-width:1024px){.market-chart[_ngcontent-%COMP%] #chart-container[_ngcontent-%COMP%]{height:100%}}.drag-event-hider[_ngcontent-%COMP%]{height:100%;width:100%;position:absolute}"],changeDetection:0}),t=Object(i.d)([Object(o.a)()],t)}()},wny4:function(t,e){var n=console.debug||console.log;t.exports={load:function(t,e){var i=Object.assign({sync:!1,libUrl:"https://cdnjs.cloudflare.com/ajax/libs/zxcvbn/4.4.2/zxcvbn.js",libIntegrity:"sha384-jhGcGHNZytnBnH1wbEM3KxJYyRDy9Q0QLKjE65xk+aMqXFCdvFuYIjzMWAAWBBtR"},t);return i.sync?function(t){return o(t.libUrl,t.libIntegrity,(function(){n("zxcvbn loaded"),a=global.zxcvbn}),(function(){console.error(new Error("Cannot load zxcvbn"))})),function(t,e){return a?a(t,e):{password:t,user_inputs:e,guesses:-1,guesses_log10:-1,crack_times_seconds:-1,crack_times_display:-1,score:-1,feedback:{suggestions:[],warning:""},sequence:[],calc_time:0}}}(i):function(t,e){if("function"!=typeof e)return new Promise((function(e,n){o(t.libUrl,t.libIntegrity,(function(){e(global.zxcvbn)}),(function(){n(new Error("Cannot load zxcvbn"))}))}));o(t.libUrl,t.libIntegrity,(function(){e(null,global.zxcvbn)}),(function(){e(new Error("Cannot load zxcvbn"))}))}(i,e)}};var i=!1,r=0;function o(t,e,n,o){if(i)1===r?n():-1===r&&o();else{i=!0;var a=global.document.getElementsByTagName("head")[0],s=global.document.createElement("script");s.type="text/javascript",e&&(s.integrity=e,s.crossOrigin="anonymous"),s.async=!0,s.onload=function(){r=1,n()},s.onerror=function(){r=-1,o()},s.src=t,a.appendChild(s)}}var a=null},"wqq/":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("QQZH");function r(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,a=t.windowTime,s=void 0===a?Number.POSITIVE_INFINITY:a,c=t.refCount,u=t.scheduler,l=0,d=!1,h=!1;return function(t){var r;l++,!e||d?(d=!1,e=new i.a(o,s,u),r=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t)},error:function(t){d=!0,e.error(t)},complete:function(){h=!0,n=void 0,e.complete()}})):r=e.subscribe(this),this.add((function(){l--,r.unsubscribe(),n&&!h&&c&&0===l&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}},x94p:function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var i=n("1VvW"),r=n("xVbo"),o=n("kZht"),a=n("Asjx"),s=n("NxuZ"),c=n("An66"),u=n("y1fC"),l=n("zho4"),d=n("B6Vo"),h=n("aDqW");function f(t,e){if(1&t&&(o.Ub(0,"a",11),o.Ub(1,"div",2),o.Pb(2,"fa-icon",12),o.Tb(),o.Ub(3,"div",4),o.Ub(4,"div",13),o.Qc(5),o.gc(6,"translate"),o.Tb(),o.Tb(),o.Tb()),2&t){var n=o.fc().$implicit,i=o.fc();o.mc("routerLink",n.link)("sbTooltip",i.mouseOver?void 0:n.name),o.Cb(2),o.mc("icon",n.icon),o.Cb(3),o.Sc(" ",o.hc(6,4,n.name)," ")}}function p(t,e){if(1&t&&(o.Sb(0),o.Oc(1,f,7,6,"a",10),o.Rb()),2&t){var n=e.$implicit;o.Cb(1),o.mc("ngIf",!n.hidden)}}function b(t,e){if(1&t){var n=o.Vb();o.Ub(0,"a",14),o.bc("click",(function(){o.Ec(n);var t=o.fc();return t.mouseOver=!t.mouseOver})),o.Ub(1,"div",2),o.Pb(2,"fa-icon",15),o.Tb(),o.Ub(3,"div",4),o.Ub(4,"div",13),o.Qc(5),o.gc(6,"translate"),o.Tb(),o.Tb(),o.Tb()}2&t&&(o.Cb(5),o.Sc(" ",o.hc(6,1,"BUTTON.COLLAPSE_SIDEBAR")," "))}function g(t,e){if(1&t){var n=o.Vb();o.Ub(0,"a",16),o.bc("click",(function(){return o.Ec(n),o.fc().mouseOver=!0})),o.Ub(1,"div",2),o.Pb(2,"fa-icon",17),o.Tb(),o.Tb()}}var m=function(t){return{brand:t}};function v(t,e){if(1&t){var n=o.Vb();o.Ub(0,"div",20),o.bc("click",(function(){return o.Ec(n),o.fc(2).mouseOver=!0})),o.Ub(1,"div",2),o.Pb(2,"fa-icon",12),o.Tb(),o.Ub(3,"div",4),o.Ub(4,"div",13),o.Qc(5),o.gc(6,"translate"),o.Tb(),o.Tb(),o.Tb()}if(2&t){var i=o.fc().$implicit,r=o.fc();o.mc("ngClass",o.rc(5,m,r.isCurrentRoute(i.link))),o.Cb(2),o.mc("icon",i.icon),o.Cb(3),o.Sc(" ",o.hc(6,3,i.name)," ")}}function y(t,e){if(1&t){var n=o.Vb();o.Ub(0,"a",21),o.bc("click",(function(){o.Ec(n);var t=o.fc().$implicit,e=o.fc();return e.router.url.includes(t.link)?e.mouseOver=!1:null})),o.Ub(1,"div",2),o.Pb(2,"fa-icon",12),o.Tb(),o.Ub(3,"div",4),o.Ub(4,"div",13),o.Qc(5),o.gc(6,"translate"),o.Tb(),o.Tb(),o.Tb()}if(2&t){var i=o.fc().$implicit;o.mc("routerLink",i.link),o.Cb(2),o.mc("icon",i.icon),o.Cb(3),o.Sc(" ",o.hc(6,3,i.name)," ")}}function _(t,e){if(1&t&&(o.Sb(0),o.Oc(1,v,7,7,"div",18),o.Oc(2,y,7,5,"a",19),o.Rb()),2&t){var n=e.$implicit,i=o.fc();o.Cb(1),o.mc("ngIf",!n.hidden&&!i.mouseOver&&i.isCurrentRoute(n.link)),o.Cb(1),o.mc("ngIf",!n.hidden&&i.mouseOver)}}var O=function(){var t=function(){function t(e,n,o){var a=this;C(this,t),this.router=e,this.cdr=n,this.breakpointObserver=o,this.navItems=[{name:"NAV.TRADING",link:"/futures",icon:"trade"},{name:"NAV.WALLETS",link:"/wallets",icon:"wallet"},{name:"NAV.LOGS",link:"/history",icon:"list"},{name:"NAV.ASSIGNMENT",link:"/assignment",icon:"thunder"},{name:"NAV.AFFILIATE",link:"/affiliate",icon:"user",hidden:!0},{name:"NAV.SUBACCOUNTS",link:"/subaccounts",icon:"user-group"},{name:"NAV.SUPPORT",link:"/support",icon:"support"},{name:"NAV.SETTINGS",link:"/settings",icon:"cog"},{name:"NAV.VERIFICATION",link:"/verification",icon:"check"}],this.mouseOver=!1,this.router.events.pipe(Object(r.a)((function(t){return t instanceof i.b}))).subscribe((function(){a.mouseOver&&(a.mouseOver=!1),a.cdr.detectChanges()}))}return w(t,[{key:"ngOnChanges",value:function(t){("userTier"in t||"userClassification"in t||"email"in t)&&(this.navItems.find((function(t){return"NAV.VERIFICATION"===t.name})).hidden=this.demo||!(("NONE"===this.userTier||"FAILED"===this.userTier||"NONE"===this.userClassification)&&this.email)),"hasSubAccounts"in t&&(this.navItems.find((function(t){return"NAV.SUBACCOUNTS"===t.name})).hidden=!this.hasSubAccounts)}},{key:"clickout",value:function(t){t.target.classList.contains("open")&&(this.mouseOver=!1)}},{key:"isCurrentRoute",value:function(t){return this.router.url.includes(t)||"/"===this.router.url&&"/futures"===t}},{key:"isMobile",get:function(){return this.breakpointObserver.isMatched("(max-width: 599px)")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Ob(i.d),o.Ob(o.h),o.Ob(a.a))},t.\u0275cmp=o.Ib({type:t,selectors:[["app-expandable-sidenav"]],hostVars:2,hostBindings:function(t,e){1&t&&o.bc("click",(function(t){return e.clickout(t)}),!1,o.Cc),2&t&&o.Gb("open",e.mouseOver)},inputs:{demo:"demo",isAffiliate:"isAffiliate",email:"email",userTier:"userTier",userClassification:"userClassification",hasSubAccounts:"hasSubAccounts",logo:"logo",platform:"platform"},features:[o.Ab],decls:12,vars:7,consts:[[1,"hover-wrapper","desktop-nav"],["routerLink","/",1,"nav-item","brand"],[1,"nav-item__icon"],[3,"icon","size"],[1,"nav-item__text"],["alt","Logo",1,"nav-item__logo",3,"src"],[4,"ngFor","ngForOf"],["class","nav-item expander",3,"click",4,"ngIf"],["class","nav-item expander expander--narrow","sbTooltip","BUTTON.EXPAND_SIDEBAR","sbPlacement","end","sbDelay","100",3,"click",4,"ngIf"],[1,"hover-wrapper","mobile-nav"],["routerLinkActive","nav-item--active","class","nav-item","sbPlacement","end","sbDelay","100",3,"routerLink","sbTooltip",4,"ngIf"],["routerLinkActive","nav-item--active","sbPlacement","end","sbDelay","100",1,"nav-item",3,"routerLink","sbTooltip"],["size","lg",3,"icon"],[1,"nav-item__text-inner"],[1,"nav-item","expander",3,"click"],["icon","chevron-left","size","lg"],["sbTooltip","BUTTON.EXPAND_SIDEBAR","sbPlacement","end","sbDelay","100",1,"nav-item","expander","expander--narrow",3,"click"],["icon","chevron-right","size","lg"],["class","nav-item",3,"ngClass","click",4,"ngIf"],["routerLinkActive","brand","class","nav-item",3,"routerLink","click",4,"ngIf"],[1,"nav-item",3,"ngClass","click"],["routerLinkActive","brand",1,"nav-item",3,"routerLink","click"]],template:function(t,e){1&t&&(o.Ub(0,"div",0),o.Ub(1,"div"),o.Ub(2,"a",1),o.Ub(3,"div",2),o.Pb(4,"fa-icon",3),o.Tb(),o.Ub(5,"div",4),o.Pb(6,"img",5),o.Tb(),o.Tb(),o.Oc(7,p,2,1,"ng-container",6),o.Tb(),o.Oc(8,b,7,3,"a",7),o.Oc(9,g,3,0,"a",8),o.Tb(),o.Ub(10,"div",9),o.Oc(11,_,3,2,"ng-container",6),o.Tb()),2&t&&(o.Cb(4),o.mc("icon",e.platform)("size","kraken"===e.platform?"lg":"xs"),o.Cb(2),o.mc("src",e.logo,o.Gc),o.Cb(1),o.mc("ngForOf",e.navItems),o.Cb(1),o.mc("ngIf",e.mouseOver),o.Cb(1),o.mc("ngIf",!e.mouseOver),o.Cb(2),o.mc("ngForOf",e.navItems))},directives:[i.g,s.b,c.m,c.n,i.f,u.a,l.a,d.a,c.l],pipes:[h.d],styles:['[_nghost-%COMP%]{z-index:10;margin-left:calc(-1 * var(--spacing))}.open[_nghost-%COMP%]:after{content:"";position:absolute;width:100%;height:100%;left:0;top:0;background:rgba(0,0,0,.32);z-index:101}@media (max-width:1024px){.open[_nghost-%COMP%] .nav-item[_ngcontent-%COMP%]{height:calc(44px * 1.5)}}.open[_nghost-%COMP%] .hover-wrapper[_ngcontent-%COMP%]{width:calc(54px * 6.5)}@media (max-width:1024px){.open[_nghost-%COMP%] .hover-wrapper[_ngcontent-%COMP%]{background:var(--card-colour);height:100%;width:calc(44px * 6.5)}}.hover-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;width:54px;height:100%;padding:var(--spacing-s);position:relative;z-index:102;background-color:var(--toolbar-colour);border:1px solid var(--border-colour);border-radius:var(--bdrs);transform:translateX(var(--spacing));transition:width .3s ease}@media (max-width:1024px){.hover-wrapper[_ngcontent-%COMP%]{border:0;background-color:var(--background-colour);padding:0;width:44px}}.expander[_ngcontent-%COMP%]{margin-bottom:0!important}.expander--narrow[_ngcontent-%COMP%]{width:44px}.nav-item[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;gap:var(--spacing);align-items:center;padding:var(--spacing-s) 0;font-family:var(--typeface);color:var(--icon-colour);border:1px solid var(--border-colour);border-radius:var(--bdrs);cursor:pointer}@media (max-width:1024px){.nav-item[_ngcontent-%COMP%]{background:var(--background-colour);padding:0;height:46px;margin-bottom:0!important}}.nav-item[_ngcontent-%COMP%]:not(:last-child){margin-bottom:var(--spacing-s)}.nav-item--active[_ngcontent-%COMP%], .nav-item[_ngcontent-%COMP%]:focus, .nav-item[_ngcontent-%COMP%]:hover{color:var(--text-colour)}.nav-item--active[_ngcontent-%COMP%]{font-weight:700;background:var(--form-input-colour)}.nav-item__icon[_ngcontent-%COMP%]{margin:var(--spacing)}.nav-item__text[_ngcontent-%COMP%]{overflow-x:hidden;font-size:1.2rem;font-weight:500;line-height:1.3}@media (min-width:1025px){.brand[_ngcontent-%COMP%] .nav-item__text[_ngcontent-%COMP%]{font-size:1.1rem;letter-spacing:.3ch;font-weight:700;text-transform:uppercase}}.nav-item__text-inner[_ngcontent-%COMP%]{white-space:nowrap}.nav-item__logo[_ngcontent-%COMP%]{vertical-align:bottom}.brand[_ngcontent-%COMP%]{background:var(--form-input-colour);color:var(--logo-colour)}@media (max-width:1024px){.desktop-nav[_ngcontent-%COMP%]{display:none!important}}@media (min-width:1025px){.mobile-nav[_ngcontent-%COMP%]{display:none!important}}.spacer[_ngcontent-%COMP%]{flex-grow:1}.nav-tooltip[_ngcontent-%COMP%]{white-space:nowrap}.nav-tooltip[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding:7px}'],changeDetection:0}),t}()},xSUO:function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.default=((i={})[i.OTHER=0]="OTHER",i[i.ORIENTATION=1]="ORIENTATION",i[i.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",i[i.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",i[i.ISSUE_NUMBER=4]="ISSUE_NUMBER",i[i.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",i[i.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",i[i.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",i[i.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",i[i.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",i[i.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY",i)},xVbo:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("5uGe");function r(t,e){return function(n){return n.lift(new o(t,e))}}var o=function(){function t(e,n){C(this,t),this.predicate=e,this.thisArg=n}return w(t,[{key:"call",value:function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg))}}]),t}(),s=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this,t)).predicate=i,o.thisArg=r,o.count=0,o}return w(n,[{key:"_next",value:function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}]),n}(i.a)},y1Fj:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("nB6u"),r=e.CharacterSetValueIdentifiers=function(t){return t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR",t}(e.CharacterSetValueIdentifiers||{});e.default=function(){function t(e,n,i){for(var r=[],o=3;o=900)throw new i.default("incorect value");var n=t.VALUES_TO_ECI.get(e);if(void 0===n)throw new i.default("incorect value");return n},t.getCharacterSetECIByName=function(e){var n=t.NAME_TO_ECI.get(e);if(void 0===n)throw new i.default("incorect value");return n},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.getName()===n.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(r.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(r.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(r.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(r.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(r.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(r.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(r.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(r.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(r.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(r.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(r.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(r.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(r.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(r.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(r.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(r.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(r.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(r.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(r.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(r.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(r.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(r.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(r.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(r.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(r.Big5,28,"Big5"),t.GB18030=new t(r.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(r.EUC_KR,30,"EUC_KR","EUC-KR"),t}()},y1fC:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return c}));var i=n("kZht"),r=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"connectedPositions",value:function(){var t=this.placement;return this.positionsForPlacement(t in u?u[t]:t)}},{key:"positionsForPlacement",value:function(t){return[c[t],s(c[t])]}}],[{key:"topThenBottom",get:function(){return[c.topCenter,s(c.topCenter)]}},{key:"bottomThenTop",get:function(){return[c.bottomCenter,s(c.bottomCenter)]}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Jb({type:t,selectors:[["","sbPlacement",""]],inputs:{placement:["sbPlacement","placement"]},exportAs:["sbPlacement"]}),t}();function o(t){return"start"===t?"end":"end"===t?"start":"center"}function a(t){return"top"===t?"bottom":"bottom"===t?"top":"center"}function s(t){return{originX:o(t.originX),originY:a(t.originY),overlayX:o(t.overlayX),overlayY:a(t.overlayY),offsetX:t.offsetX?-t.offsetX:void 0,offsetY:t.offsetY?-t.offsetY:void 0,panelClass:t.panelClass,weight:t.weight}}var c={topStart:{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",offsetY:-2},topCenter:{originX:"center",originY:"top",overlayX:"center",overlayY:"bottom",offsetY:-2},topEnd:{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",offsetY:-2},centerStart:{originX:"start",originY:"center",overlayX:"end",overlayY:"center",offsetX:-2},centerEnd:{originX:"end",originY:"center",overlayX:"start",overlayY:"center",offsetX:2},bottomStart:{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top",offsetY:2},bottomCenter:{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top",offsetY:2},bottomEnd:{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top",offsetY:2},flyoutStart:{originX:"start",originY:"top",overlayX:"end",overlayY:"top",offsetY:2},flyoutEnd:{originX:"end",originY:"top",overlayX:"start",overlayY:"top",offsetY:2}},u={top:"topCenter",bottom:"bottomCenter",start:"centerStart",end:"centerEnd"}},y6QJ:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("kZht"),r=n("aJOL"),o=n("An66");function a(t,e){if(1&t){var n=i.Vb();i.Ub(0,"a",2),i.bc("click",(function(){i.Ec(n);var t=e.$implicit,r=i.fc();return r.updateLayout(t),r.updateSelected(t)})),i.Qc(1),i.Tb()}if(2&t){var r=e.$implicit,o=i.fc();i.Gb("bottom-nav--selected",o.selected===r),i.Cb(1),i.Sc(" ",r," ")}}var s=function(){var t=function(){function t(){C(this,t),this.bottomNavUpdateLayout=new i.o}return w(t,[{key:"ngOnInit",value:function(){this.selected=this.buttons[0]}},{key:"updateSelected",value:function(t){this.selected=t}},{key:"updateLayout",value:function(t){this.bottomNavUpdateLayout.emit(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["bottom-nav"]],inputs:{buttons:"buttons"},outputs:{bottomNavUpdateLayout:"bottomNavUpdateLayout"},decls:2,vars:1,consts:[[1,"bottom-nav"],["class","global__text global__text-body global__text--link",3,"bottom-nav--selected","click",4,"ngFor","ngForOf"],[1,"global__text","global__text-body","global__text--link",3,"click"]],template:function(t,e){1&t&&(i.Ub(0,"mat-toolbar",0),i.Oc(1,a,2,3,"a",1),i.Tb()),2&t&&(i.Cb(1),i.mc("ngForOf",e.buttons))},directives:[r.a,o.m],styles:["[_nghost-%COMP%]{bottom:0;border-top:1px solid var(--border-colour);left:0;margin-bottom:0!important;position:fixed;width:100%;z-index:2}.bottom-nav[_ngcontent-%COMP%]{align-content:center;background-color:var(--toolbar-colour);display:flex;justify-content:space-around;max-height:46px!important;min-height:46px!important;padding:0}.bottom-nav[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{flex:1;font-weight:700;text-align:center;text-transform:capitalize}.bottom-nav[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:nth-of-type(2n){border-left:2px solid var(--border-colour);border-right:2px solid var(--border-colour)}.bottom-nav--selected[_ngcontent-%COMP%]{color:var(--accent-colour)!important}"],changeDetection:0}),t}()},yBEi:function(t,e){var n,i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return i[t]},e.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},yBos:function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var i=n("ZTXN"),r=n("5uGe"),s=n("IdLP"),l=n("bwdy"),d=n("QQZH"),f={url:"",deserializer:function(t){return JSON.parse(t.data)},serializer:function(t){return JSON.stringify(t)}},p=function(t){a(n,t);var e=c(n);function n(t,r){var o;if(C(this,n),o=e.call(this),t instanceof s.a)o.destination=r,o.source=t;else{var a=o._config=Object.assign({},f);if(o._output=new i.b,"string"==typeof t)a.url=t;else for(var c in t)t.hasOwnProperty(c)&&(a[c]=t[c]);if(!a.WebSocketCtor&&WebSocket)a.WebSocketCtor=WebSocket;else if(!a.WebSocketCtor)throw new Error("no WebSocket constructor can be found");o.destination=new d.a}return u(o)}return w(n,[{key:"lift",value:function(t){var e=new n(this._config,this.destination);return e.operator=t,e.source=this,e}},{key:"_resetState",value:function(){this._socket=null,this.source||(this.destination=new d.a),this._output=new i.b}},{key:"multiplex",value:function(t,e,n){var i=this;return new s.a((function(r){try{i.next(t())}catch(a){r.error(a)}var o=i.subscribe((function(t){try{n(t)&&r.next(t)}catch(a){r.error(a)}}),(function(t){return r.error(t)}),(function(){return r.complete()}));return function(){try{i.next(e())}catch(a){r.error(a)}o.unsubscribe()}}))}},{key:"_connectSocket",value:function(){var t=this,e=this._config,n=e.WebSocketCtor,i=e.protocol,o=e.url,a=e.binaryType,s=this._output,c=null;try{c=i?new n(o,i):new n(o),this._socket=c,a&&(this._socket.binaryType=a)}catch(h){return void s.error(h)}var u=new l.a((function(){t._socket=null,c&&1===c.readyState&&c.close()}));c.onopen=function(e){if(!t._socket)return c.close(),void t._resetState();var n=t._config.openObserver;n&&n.next(e);var i=t.destination;t.destination=r.a.create((function(n){if(1===c.readyState)try{var i=t._config.serializer;c.send(i(n))}catch(e){t.destination.error(e)}}),(function(e){var n=t._config.closingObserver;n&&n.next(void 0),e&&e.code?c.close(e.code,e.reason):s.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")),t._resetState()}),(function(){var e=t._config.closingObserver;e&&e.next(void 0),c.close(),t._resetState()})),i&&i instanceof d.a&&u.add(i.subscribe(t.destination))},c.onerror=function(e){t._resetState(),s.error(e)},c.onclose=function(e){t._resetState();var n=t._config.closeObserver;n&&n.next(e),e.wasClean?s.complete():s.error(e)},c.onmessage=function(e){try{var n=t._config.deserializer;s.next(n(e))}catch(i){s.error(i)}}}},{key:"_subscribe",value:function(t){var e=this,n=this.source;return n?n.subscribe(t):(this._socket||this._connectSocket(),this._output.subscribe(t),t.add((function(){var t=e._socket;0===e._output.observers.length&&(t&&1===t.readyState&&t.close(),e._resetState())})),t)}},{key:"unsubscribe",value:function(){var t=this._socket;t&&1===t.readyState&&t.close(),this._resetState(),o(h(n.prototype),"unsubscribe",this).call(this)}}]),n}(i.a);function b(t){return new p(t)}},yHDr:function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var i=n("kZht"),r=n("+vck"),o=n("1etq"),a=n("yPvj"),s=n("anSm"),c=n("NxuZ"),u=n("WYJo"),l=n("1o0v"),d=n("chaP"),h=n("rUBT"),f=n("An66"),p=n("rcUp"),b=n("aDqW"),g=n("DpwM"),m=function(){var t=function(){function t(){C(this,t),this.selectTicker=new i.o,this.editOrder=new i.o,this.cancelOrder=new i.o,this.viewDetailed=new i.o}return w(t,[{key:"direction",get:function(){return this.order.direction===r.a.Sell?"SIDE.SELL":"SIDE.BUY"}},{key:"triggerSign",get:function(){return"stop"===this.order.type==(this.order.direction===r.a.Buy)?"\u2265":"\u2264"}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Ib({type:t,selectors:[["trigger-orders-mobile"]],inputs:{order:"order"},outputs:{selectTicker:"selectTicker",editOrder:"editOrder",cancelOrder:"cancelOrder",viewDetailed:"viewDetailed"},decls:49,vars:62,consts:[[1,"card",3,"click"],[1,"row"],["subheading",""],[3,"pair"],["body","",1,"buttons"],["icon","file","size","2x",1,"copy-button",3,"click"],["primary","","icon","edit","size","2x",1,"edit-button",3,"matTooltip","click"],["icon","close","size","2x",1,"close-button",3,"matTooltip","click"],["body",""],["ghost",""],[1,"global__text--mono"],["body","",1,"type-cell"],["body","",1,"direction-cell"],["body","","mono","",1,"size-cell"],["body","",1,"price-cell"],["mono",""]],template:function(t,e){1&t&&(i.Ub(0,"div",0),i.bc("click",(function(){return e.selectTicker.emit({symbol:e.order.instrument,replaceUrl:!1})})),i.Ub(1,"div",1),i.Ub(2,"div",2),i.Pb(3,"market-icon",3),i.gc(4,"pair"),i.Qc(5),i.gc(6,"uppercase"),i.gc(7,"contractFamily"),i.gc(8,"pair"),i.gc(9,"truncate"),i.gc(10,"translate"),i.gc(11,"maturityMonth"),i.Tb(),i.Ub(12,"div",4),i.Ub(13,"fa-icon",5),i.bc("click",(function(t){return e.viewDetailed.emit({order:e.order}),t.stopPropagation()})),i.Tb(),i.Ub(14,"fa-icon",6),i.bc("click",(function(t){return e.editOrder.emit({order:e.order}),t.stopPropagation()})),i.gc(15,"translate"),i.Tb(),i.Ub(16,"fa-icon",7),i.bc("click",(function(t){return e.cancelOrder.emit({id:e.order.order_id}),t.stopPropagation()})),i.gc(17,"translate"),i.Tb(),i.Tb(),i.Tb(),i.Ub(18,"div",1),i.Ub(19,"div",8),i.Qc(20),i.gc(21,"date"),i.Ub(22,"span",9),i.Qc(23),i.gc(24,"date"),i.Tb(),i.Tb(),i.Ub(25,"div",8),i.Qc(26),i.gc(27,"titlecase"),i.Ub(28,"span",10),i.Qc(29),i.gc(30,"sato"),i.Tb(),i.Tb(),i.Tb(),i.Ub(31,"div",1),i.Ub(32,"div",11),i.Qc(33),i.gc(34,"titlecase"),i.Tb(),i.Ub(35,"div",12),i.Ub(36,"strong"),i.Qc(37),i.gc(38,"translate"),i.Tb(),i.Tb(),i.Ub(39,"div",13),i.Qc(40),i.Tb(),i.Ub(41,"div",14),i.Ub(42,"span",15),i.Qc(43),i.gc(44,"sato"),i.gc(45,"translate"),i.Tb(),i.Ub(46,"span",9),i.Qc(47),i.gc(48,"quote"),i.Tb(),i.Tb(),i.Tb(),i.Tb()),2&t&&(i.Cb(3),i.mc("pair",i.hc(4,20,e.order.instrument)),i.Cb(2),i.Uc(" ",i.hc(6,22,i.hc(7,24,e.order.instrument))," ",i.hc(8,26,e.order.instrument)," ",i.ic(9,28,i.hc(10,31,i.ic(11,33,e.order.instrument,"short")),4),". "),i.Cb(9),i.mc("matTooltip",i.hc(15,36,"BUTTON.EDIT")),i.Cb(2),i.mc("matTooltip",i.hc(17,38,"BUTTON.CANCEL")),i.Cb(4),i.Sc(" ",i.ic(21,40,e.order.time,"HH:mm:ss")," "),i.Cb(3),i.Rc(i.ic(24,43,e.order.time,"dd/MMM/yyyy")),i.Cb(3),i.Tc(" ",e.order.triggerSignal?i.hc(27,46,e.order.triggerSignal):null," ",e.triggerSign," "),i.Cb(3),i.Sc(" ",i.ic(30,48,e.order.stop_price,e.order)," "),i.Cb(4),i.Sc(" ",i.hc(34,51,e.order.type.replace("_"," "))," "),i.Cb(3),i.Gb("global__text--accent",0===e.order.direction)("global__text--warn",1===e.order.direction),i.Cb(1),i.Sc(" ",i.hc(38,53,e.direction)," "),i.Cb(3),i.Sc(" ",e.order.qty," "),i.Cb(3),i.Sc(" ",e.order.limit_price?i.ic(44,55,e.order.limit_price,e.order):i.hc(45,58,"LABEL.MARKET")," "),i.Cb(4),i.Rc(e.order.limit_price?i.hc(48,60,e.order.instrument):null))},directives:[o.a,a.a,s.a,c.b,u.a,l.a,d.a],pipes:[h.e,f.x,h.c,p.a,b.d,h.d,f.e,f.w,g.c,h.f],styles:["market-icon[_ngcontent-%COMP%]{font-size:20px}[_nghost-%COMP%]{display:block;border-bottom:1px solid var(--border-colour);margin-bottom:var(--spacing);padding-bottom:var(--spacing)}market-icon[_ngcontent-%COMP%]{margin-right:var(--spacing-s);vertical-align:middle}.row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 var(--spacing-s)}.row[_ngcontent-%COMP%] + .row[_ngcontent-%COMP%]{margin-top:var(--spacing)}.buttons[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{cursor:pointer}.buttons[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]:not(:last-of-type){margin-right:var(--spacing)}.buttons[_ngcontent-%COMP%] .copy-button[_ngcontent-%COMP%], .buttons[_ngcontent-%COMP%] .edit-button[_ngcontent-%COMP%], .buttons[_ngcontent-%COMP%] .info-button[_ngcontent-%COMP%], .buttons[_ngcontent-%COMP%] .limit-button[_ngcontent-%COMP%], .buttons[_ngcontent-%COMP%] .market-button[_ngcontent-%COMP%]{color:var(--brand)}.buttons[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{color:var(--warn-colour)}.type-cell[_ngcontent-%COMP%]{display:flex;align-items:center;flex:0.5}.direction-cell[_ngcontent-%COMP%], .size-cell[_ngcontent-%COMP%]{display:flex;align-items:center;flex:0.25}.price-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:right;flex:0.5}.price-cell[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-of-type{margin-bottom:var(--spacing-s)}.progress-cell[_ngcontent-%COMP%]{text-align:right;flex:0.75}.progress-cell[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-of-type{margin-bottom:var(--spacing-s)}"],changeDetection:0}),t}()},yN5A:function(t,e,n){"use strict";n.d(e,"i",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"l",(function(){return s})),n.d(e,"j",(function(){return c})),n.d(e,"h",(function(){return u})),n.d(e,"e",(function(){return l})),n.d(e,"a",(function(){return d})),n.d(e,"g",(function(){return h})),n.d(e,"d",(function(){return f})),n.d(e,"f",(function(){return p})),n.d(e,"k",(function(){return b}));var i=n("zqNl"),r=Object(i.g)("Reset Workspaces"),o=Object(i.g)("Create and Add Workspace from Config",Object(i.l)()),a=Object(i.g)("Add Workspace",Object(i.l)()),s=Object(i.g)("Set Workspaces",Object(i.l)()),c=Object(i.g)("Set Active Workspace",Object(i.l)()),u=Object(i.g)("Rename Workspace",Object(i.l)()),l=Object(i.g)("Delete Workspace",Object(i.l)()),d=Object(i.g)("Add Tab",Object(i.l)()),h=Object(i.g)("Move Tab",Object(i.l)()),f=Object(i.g)("Delete Tab",Object(i.l)()),p=Object(i.g)("Focus Tab",Object(i.l)()),b=Object(i.g)("Set Dragged Component",Object(i.l)())},yPvj:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n("VmIW"),r=new Set(["$pac","0xbtc","2give","abt","act","actn","ada","add","adx","ae","aeon","aeur","agi","agrs","aion","amb","amp","ant","apex","appc","ardr","arg","ark","arn","ary","ast","atm","atom","audr","auto","aywa","bab","bat","bay","bcbc","bcc","bcd","bch","bcio","bcn","bco","bcpt","bdl","beam","bela","bix","blcn","blk","block","blz","bnb","bnt","bnty","booty","bos","bpt","bq","brd","bsd","bsv","btc","btcd","btch","btcp","btcz","btdx","btg","btm","bts","btt","btx","burst","call","cc","cdn","cdt","cenz","chain","chat","chips","cix","clam","cloak","cmm","cmt","cnd","cnx","cny","cob","colx","coqui","cred","crpt","crw","cs","ctr","ctxc","cvc","d","dai","dash","dat","data","dbc","dcn","dcr","deez","dent","dew","dgb","dgd","dlt","dnt","dock","doge","drgn","drop","dta","dth","dtr","ebst","eca","edg","edo","edoge","ela","elec","elf","elix","ella","emc","emc2","eng","enj","entrp","eon","eop","eos","eqli","equa","etc","eth","ethos","etn","etp","eur","evx","exmo","exp","fair","fct","fil","fjc","fldc","flo","fsn","ftc","fuel","fun","game","gas","gbp","gbx","gbyte","generic","gin","glxt","gmr","gno","gnt","gold","grc","grin","grs","gsc","gto","gup","gusd","gvt","gxs","gzr","hight","hodl","hot","hpb","hsr","ht","html","huc","hush","icn","icx","ignis","ilk","ink","ins","ion","iop","iost","iotx","iq","itc","jnt","jpy","kcs","kin","kmd","knc","krb","lbc","lend","link","lkk","loom","lpt","lrc","lsk","ltc","lun","maid","mana","matic","mcap","mco","mda","mds","med","meetone","mft","miota","mith","mkr","mln","mnx","mnz","moac","mod","mona","msr","mth","mtl","music","mzc","nano","nas","nav","ncash","ndz","nebl","neo","neos","neu","nexo","ngc","nio","nlc2","nlg","nmc","npxs","nuls","nxs","nxt","oax","ok","omg","omni","ong","ont","oot","ost","ox","part","pasc","pasl","pax","pay","payx","pink","pirl","pivx","plr","poa","poe","polis","poly","pot","powr","ppc","ppp","ppt","pre","prl","pungo","pura","qash","qiwi","qlc","qrl","qsp","qtum","r","rads","rap","rcn","rdd","rdn","ren","rep","req","rhoc","ric","rise","rlc","rpx","rub","rvn","ryo","safe","salt","san","sbd","sberbank","sc","shift","sib","sky","slr","sls","smart","sngls","snm","snt","soc","spank","sphtx","srn","stak","start","steem","storj","storm","stq","strat","sub","sumo","sys","taas","tau","tbx","tel","ten","tern","tgch","theta","tix","tkn","tks","tnb","tnc","tnt","tomo","tpay","trig","trtl","trx","tusd","tzc","ubq","unity","usd","usdc","usdt","utk","veri","vet","via","vib","vibe","vivo","vrc","vrsc","vtc","vtho","wabi","wan","waves","wax","wgr","wicc","wings","wpr","wtc","x","xas","xbc","xbp","xbt","xby","xcp","xdn","xem","xin","xlm","xmcc","xmg","xmo","xmr","xmy","xp","xpa","xpm","xrp","xsg","xtz","xuc","xvc","xvg","xzc","yoyow","zcl","zec","zel","zen","zest","zil","zilla","zrx","link","snx","comp","bal","yfi","aave","gme","tsla","defi","privacy","sol","avax","luna","dot","shib","uni","luna2","ape","gmt","op","near","axs","ftm","crv","chz","grt","sand","ksm","algo","1inch","knc","sushi","bnb","ftt","ogn","flow","kava","gala"]),o=n("kZht"),a=n("An66");function s(t,e){if(1&t&&o.Pb(0,"img",2),2&t){var n=o.fc();o.mc("src",n.icon1url,o.Gc)}}function c(t,e){1&t&&o.Pb(0,"img",3),2&t&&o.mc("src",e.$implicit,o.Gc)}var u,l=/^\s*([a-z]+)(?:[-_:\/\\]([a-z]+))?\s*$/i,d=((u=function(){function t(){C(this,t),this.solid=!1}return w(t,[{key:"splitPair",value:function(){if(this.pair){var t=l.exec(this.pair);if(!t)return null;var e=m(t,3);return[e[1],e[2]]}return null}},{key:"icon1",get:function(){var t=this.splitPair();return t&&t[0]?t[0]:this.base||"generic"}},{key:"icon2",get:function(){var t=this.splitPair();return t&&t[1]?Object(i.Some)(t[1]):this.quote?Object(i.Some)(this.quote):Object(i.None)()}},{key:"icon1base",get:function(){return h(this.icon1)}},{key:"icon2base",get:function(){return this.icon2.map(h)}},{key:"icon1url",get:function(){return f(this.icon1base)}},{key:"icon2url",get:function(){return this.icon2base.map(f)}}]),t}()).\u0275fac=function(t){return new(t||u)},u.\u0275cmp=o.Ib({type:u,selectors:[["market-icon"]],inputs:{pair:"pair",base:"base",quote:"quote",solid:"solid"},decls:2,vars:2,consts:[["alt","icon1 name","class","icon1",3,"src",4,"ngIf"],["alt","icon2 name","class","icon2",3,"src",4,"ngIf"],["alt","icon1 name",1,"icon1",3,"src"],["alt","icon2 name",1,"icon2",3,"src"]],template:function(t,e){1&t&&(o.Oc(0,s,1,1,"img",0),o.Oc(1,c,1,1,"img",1)),2&t&&(o.mc("ngIf",e.icon1url),o.Cb(1),o.mc("ngIf",e.icon2url.orUndefined()))},directives:[a.n],styles:["[_nghost-%COMP%]{display:inline;white-space:nowrap;font-size:1.2em;vertical-align:-.2em;line-height:0}img[_ngcontent-%COMP%]{height:1em;z-index:1}.icon2[_ngcontent-%COMP%], img[_ngcontent-%COMP%]{position:relative}.icon2[_ngcontent-%COMP%]{margin-left:-.3em;z-index:0}"],changeDetection:0}),u);function h(t){return void 0===t?"generic":r.has(t.toLowerCase())?t.toLowerCase():"generic"}function f(t){return"assets/images/crypto-icons/color/".concat(t,".svg")}},yTkW:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){a(n,t);var e=c(n);function n(t,i){var r;return C(this,n),(r=e.call(this)).subject=t,r.subscriber=i,r.closed=!1,r}return w(n,[{key:"unsubscribe",value: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)}}}}]),n}(n("bwdy").a)},ykds:function(t,e,n){"use strict";n.d(e,"a",(function(){return $}));var i=n("D57K"),r=n("gxtV"),o=n("zqNl"),a=n("KQpv"),s=n.n(a),c=n("jOdJ"),u=n("TYVA"),l=n("Ee7O"),d=n("NloN"),h=n("i67J"),f=n("qAYy"),p=n("rxqU"),b=n("Aey0"),g=n("sxqi"),m=n("ylpo"),v=n("uJYd"),y=n("kZht"),_=n("aDqW"),O=n("An66"),k=n("LBlH"),T=n("pPqe"),S=n("hCLc"),E=n("anSm"),x=n("o09O"),P=n("yPvj"),A=n("za3o"),I=n("NxuZ"),M=n("1o0v"),D=n("RCeD"),R=n("rUBT"),j=n("15qg");function L(t,e){1&t&&(y.Sb(0),y.Ub(1,"span"),y.Qc(2),y.gc(3,"translate"),y.Tb(),y.Rb()),2&t&&(y.Cb(2),y.Rc(y.hc(3,1,"TAG.PERPETUAL")))}function N(t,e){if(1&t&&(y.Ub(0,"span"),y.Qc(1),y.gc(2,"maturityMonth"),y.Tb(),y.Qc(3),y.Ub(4,"span",12),y.Qc(5),y.gc(6,"tag"),y.Tb()),2&t){var n=y.fc().$implicit;y.Cb(1),y.Rc(y.ic(2,3,n.product_id,"short")),y.Cb(2),y.Sc(" "," "," "),y.Cb(2),y.Sc("(",y.hc(6,6,n.tag),")")}}function U(t,e){if(1&t){var n=y.Vb();y.Sb(0),y.Ub(1,"button",6),y.bc("click",(function(){return y.Ec(n),y.fc().shortcutHelper()})),y.Pb(2,"market-icon",7),y.gc(3,"base"),y.Ub(4,"span",8),y.Qc(5),y.gc(6,"pair"),y.Ub(7,"span"),y.Qc(8),y.gc(9,"uppercase"),y.gc(10,"contractFamily"),y.Tb(),y.Tb(),y.Ub(11,"span",9),y.Oc(12,L,4,3,"ng-container",1),y.Oc(13,N,7,8,"ng-template",null,10,y.Pc),y.Tb(),y.Pb(15,"fa-icon",11),y.Tb(),y.Rb()}if(2&t){var i=e.$implicit,r=y.Ac(14);y.fc();var o=y.Ac(4);y.Cb(1),y.mc("sbTriggerFor",o),y.Cb(1),y.mc("base",y.hc(3,8,i.product_id)),y.Cb(3),y.Sc("",y.hc(6,10,i.pair)," "),y.Cb(2),y.Lc("color","var(--brand)"),y.Cb(1),y.Rc(y.hc(9,12,y.hc(10,14,i.product_id))),y.Cb(4),y.mc("ngIf","perpetual"===i.tag)("ngIfElse",r)}}function F(t,e){if(1&t&&y.Pb(0,"market-picker",13),2&t){y.fc();var n=y.Ac(4);y.mc("popper",n)}}function B(t,e){1&t&&(y.Sb(0),y.Ub(1,"span"),y.Qc(2),y.gc(3,"translate"),y.Tb(),y.Rb()),2&t&&(y.Cb(2),y.Rc(y.hc(3,1,"Perp")))}function z(t,e){if(1&t&&(y.Ub(0,"span"),y.Qc(1),y.gc(2,"maturityMonth"),y.Tb(),y.Qc(3),y.Ub(4,"span",12),y.Qc(5),y.gc(6,"tag"),y.Tb()),2&t){var n=y.fc().$implicit;y.Cb(1),y.Rc(y.ic(2,3,n.product_id,"short")),y.Cb(2),y.Sc(" "," "," "),y.Cb(2),y.Sc("(",y.hc(6,6,n.tag),")")}}function V(t,e){if(1&t){var n=y.Vb();y.Sb(0),y.Ub(1,"button",14),y.bc("click",(function(){return y.Ec(n),y.fc().openMarketSelector()})),y.Ub(2,"span",8),y.Qc(3),y.gc(4,"pair"),y.Ub(5,"span"),y.Qc(6),y.gc(7,"uppercase"),y.gc(8,"contractFamily"),y.Tb(),y.Tb(),y.Ub(9,"span",9),y.Oc(10,B,4,3,"ng-container",1),y.Oc(11,z,7,8,"ng-template",null,10,y.Pc),y.Tb(),y.Pb(13,"fa-icon",11),y.Tb(),y.Rb()}if(2&t){var i=e.$implicit,r=y.Ac(12);y.Cb(3),y.Sc("",y.hc(4,6,i.pair)," "),y.Cb(2),y.Lc("color","var(--brand)"),y.Cb(1),y.Rc(y.hc(7,8,y.hc(8,10,i.product_id))),y.Cb(4),y.mc("ngIf","perpetual"===i.tag)("ngIfElse",r)}}function H(t,e){1&t&&(y.Ub(0,"div",15),y.Ub(1,"span",16),y.Qc(2),y.gc(3,"translate"),y.Tb(),y.Tb()),2&t&&(y.Cb(2),y.Rc(y.hc(3,1,"LOADING.MARKETS")))}var q=s()("app:market-dropdowns"),$=function(){var t=function(){function t(e,n,i,r,a){C(this,t),this.vcr=e,this.store=n,this.market=i,this.layout=r,this.translateService=a,this.userSignedIn$=this.store.pipe(Object(o.m)(p.m)),this.selectedTicker$=this.store.pipe(Object(o.m)(f.p),Object(h.g)()),this.groupedTickers$=this.store.pipe(Object(o.m)(f.i)),this.pairs$=this.store.pipe(Object(o.m)(f.m)),this.selectedPairTags$=this.store.pipe(Object(o.m)(f.l)),this.tickers$=this.store.pipe(Object(o.m)(f.o))}return w(t,[{key:"ngOnInit",value:function(){var t=this;this.layout.openPicker$.pipe(Object(r.b)(this)).subscribe((function(){t.marketPicker.onTrigger({trigger:{vcr:t.vcr},event:null})}))}},{key:"selectPair",value:function(t){var e=this;q("select pair",t),this.groupedTickers$.pipe(Object(c.a)()).subscribe((function(n){var i=n[Object(u.k)(t)].find((function(e){return e.pair===t})).product_id;e.changeSelectedTicker(i)}))}},{key:"changeSelectedTicker",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];q("select symbol",t),this.market.navigateToMarket(t,e)}},{key:"trackByValue",value:function(t,e){return e}},{key:"trackBySymbol",value:function(t,e){return e.symbol}},{key:"openMarketSelector",value:function(){this.store.dispatch(Object(v.g)({name:"markets-overview"}))}},{key:"shortcutHelper",value:function(){if(!Object(d.b)(m.s,void 0)){var t=this.translateService.instant("HEADING.KEYBOARD_SHORTCUTS"),e=this.translateService.instant("LABEL.SHORTCUTS_INFO"),n=this.translateService.instant("LABEL.CLICK_FOR_SHORTCUTS"),i=Object(v.g)({name:"shortcuts-cheatsheet"});this.store.dispatch(Object(v.j)({title:t,message:e,class:"info",action:{actionKey:n,action:i}})),Object(d.c)(m.s,Date.now())}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(y.Ob(y.R),y.Ob(o.b),y.Ob(g.a),y.Ob(b.a),y.Ob(_.e))},t.\u0275cmp=y.Ib({type:t,selectors:[["market-dropdowns"]],viewQuery:function(t,e){var n;1&t&&y.Jc(l.a,!0),2&t&&y.zc(n=y.cc())&&(e.marketPicker=n.first)},decls:11,vars:8,consts:[[1,"desktop-dropdown"],[4,"ngIf","ngIfElse"],["marketPicker",""],[3,"popper",4,"sbContent"],[1,"mobile-dropdown"],["loading",""],["mat-button","","body","",3,"sbTriggerFor","click"],[3,"base"],[1,"pair"],["capitalize","",1,"pair"],["fixed",""],["icon","chevron-down","size","lg"],["ghost",""],[3,"popper"],["mat-button","","body","",3,"click"],[1,"loading"],["body",""]],template:function(t,e){if(1&t&&(y.Ub(0,"div",0),y.Oc(1,U,16,16,"ng-container",1),y.gc(2,"async"),y.Tb(),y.Ub(3,"sb-popper",null,2),y.Oc(5,F,1,1,"market-picker",3),y.Tb(),y.Ub(6,"div",4),y.Oc(7,V,14,12,"ng-container",1),y.gc(8,"async"),y.Tb(),y.Oc(9,H,4,3,"ng-template",null,5,y.Pc)),2&t){var n=y.Ac(10);y.Cb(1),y.mc("ngIf",y.hc(2,4,e.selectedTicker$))("ngIfElse",n),y.Cb(6),y.mc("ngIf",y.hc(8,6,e.selectedTicker$))("ngIfElse",n)}},directives:[O.n,k.a,T.a,S.b,E.a,x.a,P.a,A.a,I.b,M.a,D.a],pipes:[O.b,R.a,R.e,O.x,R.c,_.d,R.d,j.a],styles:[".mat-button[_ngcontent-%COMP%]{padding-left:calc(var(--spacing) * 1.5);padding-right:var(--spacing)}@media (max-width:1024px){.mat-button[_ngcontent-%COMP%]{padding-left:var(--spacing-s);padding-right:0}}fa-icon[_ngcontent-%COMP%]{margin-left:var(--spacing)}fa-icon[_ngcontent-%COMP%], market-icon[_ngcontent-%COMP%]{display:inline-block}market-icon[_ngcontent-%COMP%]{margin-right:var(--spacing-s);font-size:32px}.pair[_ngcontent-%COMP%]{margin-right:var(--spacing);font-weight:700}.pair[_ngcontent-%COMP%], .tag[_ngcontent-%COMP%]{font-size:14px}@media (max-width:599px){.desktop-dropdown[_ngcontent-%COMP%]{display:none}}@media (min-width:600px) and (max-width:1024px){.mobile-dropdown[_ngcontent-%COMP%]{display:none}}@media (min-width:1025px){.mobile-dropdown[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),t=Object(i.d)([Object(r.a)()],t)}()},ylpo:function(t,e,n){"use strict";n.d(e,"p",(function(){return i})),n.d(e,"q",(function(){return r})),n.d(e,"o",(function(){return o})),n.d(e,"v",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return u})),n.d(e,"l",(function(){return l})),n.d(e,"g",(function(){return d})),n.d(e,"k",(function(){return h})),n.d(e,"r",(function(){return f})),n.d(e,"j",(function(){return p})),n.d(e,"b",(function(){return b})),n.d(e,"f",(function(){return g})),n.d(e,"n",(function(){return m})),n.d(e,"t",(function(){return v})),n.d(e,"u",(function(){return y})),n.d(e,"s",(function(){return _})),n.d(e,"m",(function(){return O})),n.d(e,"i",(function(){return k})),n.d(e,"h",(function(){return w})),n.d(e,"c",(function(){return C}));var i="kf-market-futures",r="kf-theme2",o="kf-read-notifications",a="kf-layouts2",s="kf-layout-active",c="kf-chart",u="kf-chart__resolution",l="kf-language2",d="kf-downtime-notification",h="kf-orderbook__grouping",f="kf-show-dust",p="kf-form-options",b="kf-bracket-form-options",g="kf-depth-chart-span",m="kf-mobile-order-form",v="kf-snackbar-info-wallets",y="kf-snackbar-info-workspaces",_="kf-snackbar-info-shortcuts",O="kf-layout-type",k="kf-draggable-options",w="kf-draggable-items",C="cf-chart__data"},yucr:function(t,e,n){"use strict";n.r(e),n.d(e,"CreateAlgoComponent",(function(){return m}));var i=n("3kIJ"),r=n("0tVE"),o=n("kZht"),a=n("mcff"),s=n("zqNl"),c=n("rfPA"),u=n("bBQR"),l=n("anSm"),d=n("1etq"),h=n("aDqW"),f=n("EmXI"),p=n("Tcl6"),b=n("UDV5"),g=n("hCLc"),m=function(){var t=function(){function t(e,n,i){C(this,t),this.dialogRef=e,this.store=n,this.formBuilder=i,this.form=this.buildForm}return w(t,[{key:"submitForm",value:function(){var t=this,e=this.form.value.label;this.store.dispatch(Object(r.i)({label:e})),this.form.reset(),Object.keys(this.form.controls).forEach((function(e){return t.form.get(e).setErrors(null)}))}},{key:"closeDialog",value:function(){this.dialogRef.close()}},{key:"buildForm",get:function(){return this.formBuilder.group({label:[""],conformanceTested:[!1,[i.x.requiredTrue]],pretradeRisk:[!1,[i.x.requiredTrue]],shutOff:[!1,[i.x.requiredTrue]],materialChange:[!1,[i.x.requiredTrue]]})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Ob(a.d),o.Ob(s.b),o.Ob(i.d))},t.\u0275cmp=o.Ib({type:t,selectors:[["create-algo"]],decls:31,vars:20,consts:[["heading","HEADING.CREATE_ALGO"],["body","",3,"formGroup","ngSubmit"],[1,"heading"],["subheading","","translate",""],["body","","translate",""],["color","accent","appearance","fill"],["matInput","","formControlName","label","autocomplete","off"],[1,"terms"],[1,"checkboxes"],["formControlName","conformanceTested","required","",1,"no-border"],["formControlName","pretradeRisk","required","",1,"no-border"],["formControlName","shutOff","required","",1,"no-border"],["formControlName","materialChange","required","",1,"no-border"],["mat-raised-button","","body","",3,"disabled"]],template:function(t,e){1&t&&(o.Ub(0,"pro-dialog",0),o.Ub(1,"form",1),o.bc("ngSubmit",(function(){return e.submitForm()})),o.Ub(2,"section",2),o.Ub(3,"h2",3),o.Qc(4,"HEADING.CREATE_ALGOID"),o.Tb(),o.Ub(5,"p",4),o.Qc(6,"ALGOIDS.LABEL"),o.Tb(),o.Tb(),o.Ub(7,"mat-form-field",5),o.Ub(8,"mat-label"),o.Qc(9),o.gc(10,"translate"),o.Tb(),o.Pb(11,"input",6),o.Tb(),o.Ub(12,"section",7),o.Ub(13,"p",4),o.Qc(14,"ALGOIDS.SELF_CERTIFICATION"),o.Tb(),o.Ub(15,"section",8),o.Ub(16,"mat-checkbox",9),o.Qc(17),o.gc(18,"translate"),o.Tb(),o.Ub(19,"mat-checkbox",10),o.Qc(20),o.gc(21,"translate"),o.Tb(),o.Ub(22,"mat-checkbox",11),o.Qc(23),o.gc(24,"translate"),o.Tb(),o.Ub(25,"mat-checkbox",12),o.Qc(26),o.gc(27,"translate"),o.Tb(),o.Tb(),o.Tb(),o.Ub(28,"button",13),o.Qc(29),o.gc(30,"translate"),o.Tb(),o.Tb(),o.Tb()),2&t&&(o.Cb(1),o.mc("formGroup",e.form),o.Cb(8),o.Rc(o.hc(10,8,"FORM.ALGO_LABEL")),o.Cb(8),o.Sc(" ",o.hc(18,10,"ALGOIDS.CONFORMANCE_TESTED")," "),o.Cb(3),o.Sc(" ",o.hc(21,12,"ALGOIDS.PRETRADE_RISK")," "),o.Cb(3),o.Sc(" ",o.hc(24,14,"ALGOIDS.SHUT_OFF")," "),o.Cb(3),o.Sc(" ",o.hc(27,16,"ALGOIDS.MATERIAL_CHANGE")," "),o.Cb(2),o.mc("disabled",e.form.invalid),o.Cb(1),o.Sc(" ",o.hc(30,18,"BUTTON.CREATE_ALGOID")," "))},directives:[c.a,u.a,i.z,i.p,l.a,i.h,d.a,h.a,f.c,f.f,p.b,i.c,i.o,i.g,b.a,b.c,i.v,g.b],pipes:[h.d],styles:[".terms[_ngcontent-%COMP%]{margin:var(--spacing) 0}.terms[_ngcontent-%COMP%] .checkboxes[_ngcontent-%COMP%]{margin:var(--spacing) 0 var(--spacing) var(--spacing)}.heading[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:500px}@media (max-width:1024px){form[_ngcontent-%COMP%]{width:100%}}h2[_ngcontent-%COMP%]{margin-bottom:var(--spacing)}"],changeDetection:0}),t}()},yvKM:function(t,e,n){"use strict";n.d(e,"a",(function(){return O})),n.d(e,"b",(function(){return y})),n.d(e,"c",(function(){return k}));var i=n("jL3B"),r=n("5XID"),o=n("sBeF"),s=n("kZht"),u=n("3kIJ"),l=n("pTnX"),d=["button"],h=["*"],f=new s.s("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),p=new s.s("MatButtonToggleGroup"),g={provide:u.m,useExisting:Object(s.V)((function(){return y})),multi:!0},m=0,v=function t(e,n){C(this,t),this.source=e,this.value=n},y=function(){var t=function(){function t(e,n){C(this,t),this._changeDetector=e,this._vertical=!1,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=function(){},this._onTouched=function(){},this._name="mat-button-toggle-group-"+m++,this.valueChange=new s.o,this.change=new s.o,this.appearance=n&&n.appearance?n.appearance:"standard"}return w(t,[{key:"ngOnInit",value:function(){this._selectionModel=new o.c(this.multiple,void 0,!1)}},{key:"ngAfterContentInit",value:function(){var t;(t=this._selectionModel).select.apply(t,b(this._buttonToggles.filter((function(t){return t.checked}))))}},{key:"writeValue",value:function(t){this.value=t,this._changeDetector.markForCheck()}},{key:"registerOnChange",value:function(t){this._controlValueAccessorChangeFn=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t}},{key:"_emitChangeEvent",value:function(){var t=this.selected,e=Array.isArray(t)?t[t.length-1]:t,n=new v(e,this.value);this._controlValueAccessorChangeFn(n.value),this.change.emit(n)}},{key:"_syncButtonToggle",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.multiple||!this.selected||t.checked||(this.selected.checked=!1),this._selectionModel?e?this._selectionModel.select(t):this._selectionModel.deselect(t):r=!0,r?Promise.resolve().then((function(){return n._updateModelValue(i)})):this._updateModelValue(i)}},{key:"_isSelected",value:function(t){return this._selectionModel&&this._selectionModel.isSelected(t)}},{key:"_isPrechecked",value:function(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some((function(e){return null!=t.value&&e===t.value})):t.value===this._rawValue)}},{key:"_setSelectionByValue",value:function(t){var e=this;this._rawValue=t,this._buttonToggles&&(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach((function(t){return e._selectValue(t)}))):(this._clearSelection(),this._selectValue(t)))}},{key:"_clearSelection",value:function(){this._selectionModel.clear(),this._buttonToggles.forEach((function(t){return t.checked=!1}))}},{key:"_selectValue",value:function(t){var e=this._buttonToggles.find((function(e){return null!=e.value&&e.value===t}));e&&(e.checked=!0,this._selectionModel.select(e))}},{key:"_updateModelValue",value:function(t){t&&this._emitChangeEvent(),this.valueChange.emit(this.value)}},{key:"name",get:function(){return this._name},set:function(t){var e=this;this._name=t,this._buttonToggles&&this._buttonToggles.forEach((function(t){t.name=e._name,t._markForCheck()}))}},{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=Object(r.c)(t)}},{key:"value",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map((function(t){return t.value})):t[0]?t[0].value:void 0},set:function(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}},{key:"selected",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=Object(r.c)(t)}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(r.c)(t),this._buttonToggles&&this._buttonToggles.forEach((function(t){return t._markForCheck()}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Ob(s.h),s.Ob(f,8))},t.\u0275dir=s.Jb({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,n){var i;1&t&&s.Hb(n,O,!0),2&t&&s.zc(i=s.cc())&&(e._buttonToggles=i)},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(s.Db("aria-disabled",e.disabled),s.Gb("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard","standard"===e.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[s.Bb([g,{provide:p,useExisting:t}])]}),t}(),_=Object(l.x)((function t(){C(this,t)})),O=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o,a,c){var u;C(this,n),(u=e.call(this))._changeDetectorRef=i,u._elementRef=r,u._focusMonitor=o,u._isSingleSelector=!1,u._checked=!1,u.ariaLabelledby=null,u._disabled=!1,u.change=new s.o;var l=Number(a);return u.tabIndex=l||0===l?l:null,u.buttonToggleGroup=t,u.appearance=c&&c.appearance?c.appearance:"standard",u}return w(n,[{key:"ngOnInit",value:function(){var t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this.id=this.id||"mat-button-toggle-"+m++,this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}},{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){var t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}},{key:"focus",value:function(t){this._buttonElement.nativeElement.focus(t)}},{key:"_onButtonClick",value:function(){var t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new v(this,this.value))}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}},{key:"buttonId",get:function(){return this.id+"-button"}},{key:"appearance",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance},set:function(t){this._appearance=t}},{key:"checked",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked},set:function(t){var e=Object(r.c)(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}},{key:"disabled",get:function(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled},set:function(t){this._disabled=Object(r.c)(t)}}]),n}(_);return t.\u0275fac=function(e){return new(e||t)(s.Ob(p,8),s.Ob(s.h),s.Ob(s.l),s.Ob(i.h),s.Zb("tabindex"),s.Ob(f,8))},t.\u0275cmp=s.Ib({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){var n;1&t&&s.Wc(d,!0),2&t&&s.zc(n=s.cc())&&(e._buttonElement=n.first)},hostAttrs:[1,"mat-button-toggle"],hostVars:11,hostBindings:function(t,e){1&t&&s.bc("focus",(function(){return e.focus()})),2&t&&(s.Db("tabindex",-1)("id",e.id)("name",null),s.Gb("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-appearance-standard","standard"===e.appearance))},inputs:{disableRipple:"disableRipple",ariaLabelledby:["aria-labelledby","ariaLabelledby"],tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],value:"value"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[s.zb],ngContentSelectors:h,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,e){if(1&t&&(s.lc(),s.Ub(0,"button",0,1),s.bc("click",(function(){return e._onButtonClick()})),s.Ub(2,"div",2),s.kc(3),s.Tb(),s.Tb(),s.Pb(4,"div",3),s.Pb(5,"div",4)),2&t){var n=s.Ac(1);s.mc("id",e.buttonId)("disabled",e.disabled||null),s.Db("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),s.Cb(5),s.mc("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[l.r],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.cdk-high-contrast-active .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}.cdk-high-contrast-active .mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\n"],encapsulation:2,changeDetection:0}),t}(),k=function(){var t=function t(){C(this,t)};return t.\u0275mod=s.Mb({type:t}),t.\u0275inj=s.Lb({factory:function(e){return new(e||t)},imports:[[l.j,l.s],l.j]}),t}()},"zK/z":function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var i=n("YyhG"),r=n("zqNl"),o=n("kZht"),a=n("sq1e"),s=n("36Sp"),c=n("O0qa"),u=n("hnst"),l=n("rEzU"),d=n("bxcy"),h=n("zW++"),f=n("aDqW"),p=n("An66");function b(t,e){if(1&t&&(o.Ub(0,"span",3),o.gc(1,"async"),o.gc(2,"async"),o.Qc(3),o.gc(4,"translate"),o.Tb()),2&t){var n=o.fc();o.mc("matBadge",o.hc(1,3,n.numPositions$))("matBadgeHidden",0===o.hc(2,5,n.numPositions$)),o.Cb(3),o.Rc(o.hc(4,7,"HEADING.OPEN_POSITIONS"))}}function g(t,e){if(1&t&&(o.Ub(0,"span",3),o.gc(1,"async"),o.gc(2,"async"),o.Qc(3),o.gc(4,"translate"),o.Tb()),2&t){var n=o.fc();o.mc("matBadge",o.hc(1,3,n.numOrders$))("matBadgeHidden",0===o.hc(2,5,n.numOrders$)),o.Cb(3),o.Rc(o.hc(4,7,"HEADING.OPEN_ORDERS"))}}function m(t,e){if(1&t&&(o.Ub(0,"span",3),o.gc(1,"async"),o.gc(2,"async"),o.Qc(3),o.gc(4,"translate"),o.Tb()),2&t){var n=o.fc();o.mc("matBadge",o.hc(1,3,n.numTriggers$))("matBadgeHidden",0===o.hc(2,5,n.numTriggers$)),o.Cb(3),o.Rc(o.hc(4,7,"HEADING.TRIGGER_ORDERS"))}}var v=function(){var t=function t(e){C(this,t),this.store=e,this.numOrders$=this.store.pipe(Object(r.m)(i.h)),this.numTriggers$=this.store.pipe(Object(r.m)(i.j)),this.numPositions$=this.store.pipe(Object(r.m)(i.i))};return t.\u0275fac=function(e){return new(e||t)(o.Ob(r.b))},t.\u0275cmp=o.Ib({type:t,selectors:[["account-activity"]],decls:13,vars:4,consts:[["dynamicHeight",""],["matTabLabel",""],[3,"label"],["matBadgeOverlap","false",3,"matBadge","matBadgeHidden"]],template:function(t,e){1&t&&(o.Ub(0,"mat-tab-group",0),o.Ub(1,"mat-tab"),o.Oc(2,b,5,9,"ng-template",1),o.Pb(3,"open-positions"),o.Tb(),o.Ub(4,"mat-tab"),o.Oc(5,g,5,9,"ng-template",1),o.Pb(6,"open-orders"),o.Tb(),o.Ub(7,"mat-tab"),o.Oc(8,m,5,9,"ng-template",1),o.Pb(9,"trigger-orders"),o.Tb(),o.Ub(10,"mat-tab",2),o.gc(11,"translate"),o.Pb(12,"filled-orders"),o.Tb(),o.Tb()),2&t&&(o.mc("@.disabled",!0),o.Cb(10),o.mc("label",o.hc(11,2,"HEADING.FILLED_ORDERS")))},directives:[a.c,a.a,a.d,s.a,c.a,u.a,l.a,d.a,h.a],pipes:[f.d,p.b],styles:[""],changeDetection:0}),t}()},zUnb:function(e,n,i){"use strict";i.r(n);var o,s,u=i("kZht"),l=i("AytR"),d=i("6uGs"),h=i("ENSU"),f=i("FxgA"),p=i("1VvW"),g=i("An66"),v=i("i9xl"),y=i("47ST"),_=i("KTx3"),O=i("ROBh"),k=i("qZtG"),T=i("ZTXN"),S=i("IdLP"),E=i("kgbq"),x=new S.a(E.a),P=i("g6G6"),A=i("YtkY"),I=i("xVbo"),M=i("TLy2"),D=i("JHA6"),R=i("J+dc"),j=i("8j5Y"),L=i("BwBJ"),N="Service workers are disabled or not supported by this browser",U=function(){function t(e){if(C(this,t),this.serviceWorker=e,e){var n=Object(_.a)(e,"controllerchange").pipe(Object(A.a)((function(){return e.controller}))),i=Object(v.a)((function(){return Object(O.a)(e.controller)})),r=Object(k.a)(i,n);this.worker=r.pipe(Object(I.a)((function(t){return!!t}))),this.registration=this.worker.pipe(Object(M.a)((function(){return e.getRegistration()})));var o=Object(_.a)(e,"message").pipe(Object(A.a)((function(t){return t.data}))).pipe(Object(I.a)((function(t){return t&&t.type}))).pipe(Object(D.a)(new T.b));o.connect(),this.events=o}else this.worker=this.events=this.registration=Object(v.a)((function(){return Object(y.a)(new Error("Service workers are disabled or not supported by this browser"))}))}return w(t,[{key:"postMessage",value:function(t,e){return this.worker.pipe(Object(R.a)(1),Object(j.a)((function(n){n.postMessage(Object.assign({action:t},e))}))).toPromise().then((function(){}))}},{key:"postMessageWithStatus",value:function(t,e,n){var i=this.waitForStatus(n),r=this.postMessage(t,e);return Promise.all([i,r]).then((function(){}))}},{key:"generateNonce",value:function(){return Math.round(1e7*Math.random())}},{key:"eventsOfType",value:function(t){return this.events.pipe(Object(I.a)((function(e){return e.type===t})))}},{key:"nextEventOfType",value:function(t){return this.eventsOfType(t).pipe(Object(R.a)(1))}},{key:"waitForStatus",value:function(t){return this.eventsOfType("STATUS").pipe(Object(I.a)((function(e){return e.nonce===t})),Object(R.a)(1),Object(A.a)((function(t){if(!t.status)throw new Error(t.error)}))).toPromise()}},{key:"isEnabled",get:function(){return!!this.serviceWorker}}]),t}(),F=((s=function(){function t(e){if(C(this,t),this.sw=e,this.subscriptionChanges=new T.b,!e.isEnabled)return this.messages=x,this.notificationClicks=x,void(this.subscription=x);this.messages=this.sw.eventsOfType("PUSH").pipe(Object(A.a)((function(t){return t.data}))),this.notificationClicks=this.sw.eventsOfType("NOTIFICATION_CLICK").pipe(Object(A.a)((function(t){return t.data}))),this.pushManager=this.sw.registration.pipe(Object(A.a)((function(t){return t.pushManager})));var n=this.pushManager.pipe(Object(M.a)((function(t){return t.getSubscription()})));this.subscription=Object(P.a)(n,this.subscriptionChanges)}return w(t,[{key:"requestSubscription",value:function(t){var e=this;if(!this.sw.isEnabled)return Promise.reject(new Error(N));for(var n={userVisibleOnly:!0},i=this.decodeBase64(t.serverPublicKey.replace(/_/g,"/").replace(/-/g,"+")),r=new Uint8Array(new ArrayBuffer(i.length)),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return{ngModule:t,providers:[{provide:V,useValue:e},{provide:z,useValue:n},{provide:U,useFactory:Q,deps:[z,u.D]},{provide:u.d,useFactory:H,deps:[u.t,V,z,u.D],multi:!0}]}}}]),t}()).\u0275mod=u.Mb({type:W}),W.\u0275inj=u.Lb({factory:function(t){return new(t||W)},providers:[F,B]}),W),Z=i("aDqW"),X=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/assets/i18n/",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".json";C(this,t),this.http=e,this.prefix=n,this.suffix=i}return w(t,[{key:"getTranslation",value:function(t){return this.http.get("".concat(this.prefix).concat(t).concat(this.suffix))}}]),t}(),J=i("i9Na"),tt=i("zqNl"),et=i("KQpv"),nt=i.n(et),it=i("9baa"),rt=i("og7C"),ot=i("9hG1"),at=i("+Aie"),st=i("HM3f"),ct=i("8lHc"),ut=i("5E2i"),lt=i("jIqt"),dt=i("0Woy"),ht=i("w0kG"),ft=i("VmIW"),pt=i("NloN"),bt=i("i67J"),gt=i("eMi/"),mt=i("94ty"),vt=i("uJYd"),yt=i("GGXD"),_t=i("h3eB"),Ot=i("lE9u"),kt=i("sXtk"),wt=i("ylpo"),Ct=i("e7kw"),Tt=i("zdQl"),St=i("bjK4"),Et=i("p5wL"),xt=i("rxqU"),Pt={public:[],private:[]},At=Object(tt.i)(Pt,Object(tt.k)(yt.c,(function(t){return Object(Et.b)(Pt.private,t,"private")})),Object(tt.k)(yt.e,(function(t,e){var n=e.notifications;return Object(Et.b)(n,t,"public")})),Object(tt.k)(yt.d,(function(t,e){var n=e.notifications;return Object(Et.b)(n,t,"private")}))),It=Object(tt.h)("notifications"),Mt=Object(tt.j)(It,(function(t){return t.public})),Dt=Object(tt.j)(It,(function(t){return t.private})),Rt=Object(tt.j)(xt.m,Dt,Mt,(function(t,e,n){return t?e:n})),jt=i("R1aX"),Lt=i("MUfl"),Nt=i("Rjzq"),Ut=i("C05f"),Ft=i("3p4X"),Bt=i("6Oco"),zt=i("4e/d"),Vt=i("Qbn9"),Ht=nt()("app:service:version|web"),qt=new d.c({"Cache-Control":"no-cache, no-store, must-revalidate, post-check=0, pre-check=0",Pragma:"no-cache",Expires:"0"}),$t=((G=function(){function t(e,n){C(this,t),this.env=e,this.http=n,this.outdated$=new Ut.a(!1),this.forceUpdate$=new Ut.a(!1),Ht("init version service")}return w(t,[{key:"watchVersion",value:function(){var t=this;this.env.localDev||Object(Ft.a)(Vt.c).pipe(Object(lt.a)(0),Object(M.a)((function(){return t.fetchLatestVersion()}))).subscribe((function(e){var n=e.version,i=t.env.appVersion;n!==i&&(Ht("newer version detected: ".concat(n,", current: ").concat(i)),t.outdated$.next(!0))}))}},{key:"fetchLatestVersion",value:function(){var t="".concat(this.env.urls.base,"/version.json?cacheBuster=").concat(Math.random());return this.http.get(t,{headers:qt}).pipe(Object(bt.l)(1e3,2),Object(zt.a)((function(){return Bt.a})))}}]),t}()).\u0275fac=function(t){return new(t||G)(u.Yb(kt.a),u.Yb(d.a))},G.\u0275prov=u.Kb({token:G,factory:G.\u0275fac}),G),Qt=i("aeRQ"),Wt=i("IiX2"),Gt=i("yN5A"),Yt=i("UbJG"),Kt=i("D57K"),Zt=nt()("app:service:broadcast"),Xt=function(){function t(e){C(this,t),this.store=e,Y.set(this,void 0)}return w(t,[{key:"init",value:function(){var t,e=this;"BroadcastChannel"in window?Object(Kt.c)(this,Y,new BroadcastChannel("auth")):Zt("broadcast channel not supported in this browser"),null===(t=Object(Kt.b)(this,Y))||void 0===t||t.addEventListener("message",(function(t){var n=t.data.event;Zt("event received",n),{login:function(){return e.store.dispatch(Object(mt.f)({firstCheck:!0}))},logout:function(){return e.store.dispatch(Object(mt.B)({source:"broadcast"}))}}[n]()}))}},{key:"emit",value:function(t){var e,n={event:t};null===(e=Object(Kt.b)(this,Y))||void 0===e||e.postMessage(n)}},{key:"close",value:function(){var t;null===(t=Object(Kt.b)(this,Y))||void 0===t||t.close()}}]),t}();Y=new WeakMap,Xt.\u0275fac=function(t){return new(t||Xt)(u.Yb(tt.b))},Xt.\u0275prov=u.Kb({token:Xt,factory:Xt.\u0275fac});var Jt=i("0YqF"),te=i("5JSY"),ee=i("sxqi"),ne=i("0FJ2"),ie=i("P0vk"),re=i("x94p"),oe=i("AdKB"),ae=i("vVza"),se=i("bZCB"),ce=i("aygZ"),ue=i("Dm6q"),le=["navDrawer"],de=["notificationDrawer"],he=["notificationContainer"];function fe(t,e){1&t&&u.Pb(0,"ticker-bar")}function pe(t,e){1&t&&(u.Ub(0,"popup-banner"),u.Pb(1,"update-banner"),u.Tb())}var be,ge=function(t){return{"is-trading":t}},me=nt()("app:root"),ve=((be=function(){function t(e,n,i,r,o,a,s,c,u,l,d,h,f,p){C(this,t),this.env=e,this.version=n,this.feature=i,this.zone=r,this.router=o,this.activatedRoute=a,this.store=s,this.translateService=c,this.keybinds=u,this.cookieService=l,this.ws=d,this.supportArticle=h,this.broadcast=f,this.market=p,this.updateReadNotifs$=new T.b,this.platform$=this.store.pipe(Object(tt.m)(te.a)),this.logoUrl$=this.store.pipe(Object(tt.m)(St.f,{demo:this.env.demo,badge:!0})),this.activeTheme$=this.store.pipe(Object(tt.m)(St.j)),this.internalNav$=this.store.pipe(Object(tt.m)(St.d)),this.externalNav$=this.store.pipe(Object(tt.m)(St.c)),this.internalDropdownNav$=this.internalNav$.pipe(Object(A.a)((function(t){return t.filter((function(t){return t.alwaysDisplay}))}))),this.internalTopbarNav$=this.internalNav$.pipe(Object(A.a)((function(t){return t.filter((function(t){return!t.alwaysDisplay}))}))),this.userSignedIn$=this.store.pipe(Object(tt.m)(xt.m)),this.email$=this.store.pipe(Object(tt.m)(xt.e)),this.userTier$=this.store.pipe(Object(tt.m)(jt.e)),this.notifications$=this.store.pipe(Object(tt.m)(Rt)),this.unreadNotifications$=Object(st.a)([this.notifications$,this.updateReadNotifs$.pipe(Object(lt.a)(void 0))]).pipe(Object(A.a)((function(t){var e=m(t,1)[0],n=Object(rt.f)(Object(pt.b)(wt.o,[]));return e.filter((function(t){var e=t.id;return!n.has(e)}))}))),this.userDetails$=this.store.pipe(Object(tt.m)(xt.d)),this.userData$=this.store.pipe(Object(tt.m)(xt.a)),this.userClassification$=this.store.pipe(Object(tt.m)(jt.c)),this.quantityUnits$=this.store.pipe(Object(tt.m)(xt.r)),this.isAffiliate$=this.store.pipe(Object(tt.m)(Tt.b)),this.userHasSubAccounts$=this.store.pipe(Object(tt.m)(xt.f)),this.customWorkspaces$=this.store.pipe(Object(tt.m)(Yt.f)),this.systemHealth$=this.store.pipe(Object(tt.m)(St.g))}return w(t,[{key:"ngOnInit",value:function(){me("starting with features",b(this.feature.features)),this.setPlatform(),this.registerKeybinds(),this.setFallbackLanguage("en"),this.useLanguage(this.currentLanguage),this.applyTheme(),this.checkSession(),this.checkDialog(),this.checkActivation(),this.checkPasswordReset(),this.checkCacheBuster(),this.openPublicNotificationFeed(),this.openUserFeedsOnSignin(),this.closeUserFeedsOnSignout(),this.openNotificationsFeedOnSignin(),this.checkAffiliateReferral(),this.checkWorkspace(),this.watchSystemHealth(),this.broadcast.init(),this.watchVersion(),this.checkJailBreak()}},{key:"ngOnDestroy",value:function(){this.unregisterKeybinds(),this.ws.closeAllFeeds()}},{key:"checkJailBreak",value:function(){var t=this;it.a.isNative&&IRoot.isRooted((function(e){if(e){var n={title:"DIALOG.JAILBROKEN_APP.TITLE",checkbox:"DIALOG.JAILBROKEN_APP.CHECKBOX",body:'\n

    '.concat(t.translateService.instant("DIALOG.JAILBROKEN_APP.BODY"),"

    \n "),buttons:[{label:"DIALOG.JAILBROKEN_APP.ACCEPT",colour:"accent",actions:[Object(vt.c)()]}]};t.store.dispatch(Object(vt.g)({name:"confirmation",inputs:n}))}}),(function(t){console.log("IRoot.isRooted error:",t)}))}},{key:"setPlatform",value:function(){this.store.dispatch(Object(Jt.a)({platform:this.env.platform}))}},{key:"openUserFeedsOnSignin",value:function(){var t=this;this.userSignedIn$.pipe(Object(dt.a)(),Object(I.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return!n&&!!i}))).subscribe((function(){t.store.dispatch(Object(Ot.o)()),t.store.dispatch(Object(_t.h)())}))}},{key:"closeUserFeedsOnSignout",value:function(){var t=this;this.userSignedIn$.pipe(Object(dt.a)(),Object(I.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return!!n&&!i}))).subscribe((function(){t.store.dispatch(Object(Ot.e)()),t.store.dispatch(Object(_t.e)())}))}},{key:"openPublicNotificationFeed",value:function(){this.store.dispatch(Object(yt.b)())}},{key:"openNotificationsFeedOnSignin",value:function(){var t=this;this.userSignedIn$.pipe(Object(dt.a)(),Object(I.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return!n&&!!i}))).subscribe((function(){return t.store.dispatch(Object(yt.a)())}))}},{key:"checkSession",value:function(){var t=this;this.store.dispatch(Object(mt.f)({firstCheck:!0})),Object(ct.a)(6e4,6e4).subscribe((function(){return t.store.dispatch(Object(mt.f)({firstCheck:!1}))}))}},{key:"checkWorkspace",value:function(){var t=this;this.activatedRoute.queryParamMap.pipe(Object(I.a)((function(t){return t.has("workspace")})),Object(ht.a)(this.customWorkspaces$)).subscribe((function(e){var n=m(e,2),i=n[0],r=n[1],o=i.get("workspace");r.find((function(t){return t.id===o}))&&o&&t.zone.run((function(){return t.store.dispatch(Object(Gt.j)({id:o}))}))}))}},{key:"checkDialog",value:function(){var t=this;this.activatedRoute.queryParamMap.pipe(Object(I.a)((function(t){return t.has("dialog")}))).subscribe((function(e){var n=e.get("dialog");if("disallowed"===n){var i={title:"DIALOG.DISALLOWED.TITLE",subtitle:"DIALOG.DISALLOWED.SUBTITLE",body:t.translateService.instant("DIALOG.DISALLOWED.BODY"),buttons:[{label:"DIALOG.DISALLOWED.BUTTONS.VIEW_REQUIREMENTS",colour:"accent",actions:[Object(vt.h)({url:t.supportArticle.transform(360022618012),target:"_self"})]}]};t.store.dispatch(Object(vt.g)({name:"confirmation",inputs:i}))}else t.store.dispatch(Object(vt.g)({name:n}))}))}},{key:"checkPasswordReset",value:function(){var t=this;this.activatedRoute.queryParamMap.pipe(Object(I.a)((function(t){return t.has("password_reset")}))).subscribe((function(e){var n=e.get("password_reset");t.store.dispatch(Object(vt.g)({name:"password-reset-confirm",inputs:{code:n}}))}))}},{key:"checkActivation",value:function(){var t=this;this.activatedRoute.queryParamMap.pipe(Object(I.a)((function(t){return t.has("activate")}))).subscribe((function(e){var n=e.get("activate");t.store.dispatch(Object(mt.c)({uid:n}))}))}},{key:"checkCacheBuster",value:function(){this.activatedRoute.queryParams.pipe(Object(I.a)((function(t){return"cacheBuster"in t}))).subscribe((function(){return Object(pt.e)("cacheBuster")}))}},{key:"selectTheme",value:function(t){this.store.dispatch(Object(vt.q)({theme:t}))}},{key:"applyTheme",value:function(){var t=Object(pt.b)(wt.q,"dark");this.selectTheme(t),it.a.isNative&&it.b.StatusBar.setStyle({style:"dark"===t?it.c.Dark:it.c.Light})}},{key:"watchVersion",value:function(){var t=this;this.version.watchVersion(),this.version.forceUpdate$.pipe(Object(I.a)(ut.a)).subscribe((function(){t.router.navigate(["/outdated"])}))}},{key:"checkAffiliateReferral",value:function(){var t=this;this.cookieService.check("affiliateUid")&&this.store.dispatch(Object(gt.d)({code:this.cookieService.get("affiliateUid")})),this.activatedRoute.queryParamMap.pipe(Object(I.a)((function(t){return t.has("affiliate")}))).subscribe((function(e){var n=ot.DateTime.local().plus({days:30}).toJSDate(),i=e.get("affiliate");t.cookieService.set("affiliateUid",i,n),t.store.dispatch(Object(gt.d)({code:i}))}))}},{key:"registerKeybinds",value:function(){var t=this;this.keybinds.addBind("?",(function(){t.store.dispatch(Object(vt.c)()),t.store.dispatch(Object(vt.g)({name:"shortcuts-cheatsheet"}))})),this.keybinds.addBind("g f",(function(){return t.zone.run((function(){return t.router.navigate(["trade"])}))})),this.keybinds.addBind("g w",(function(){return t.zone.run((function(){return t.router.navigate(["wallets"])}))})),this.keybinds.addBind("g l",(function(){return t.zone.run((function(){return t.router.navigate(["history"])}))})),this.keybinds.addBind("g a",(function(){return t.zone.run((function(){return t.router.navigate(["assignment"])}))})),this.keybinds.addBind("g h",(function(){return t.zone.run((function(){return t.router.navigate(["support"])}))})),this.keybinds.addBind("g s",(function(){return t.zone.run((function(){return t.router.navigate(["settings"])}))})),this.keybinds.register(),Object(at.bind)("alt",(function(){return t.zone.run((function(){return t.store.dispatch(Object(vt.r)(!0))}))}),"keydown"),Object(at.bind)("alt",(function(){return t.zone.run((function(){return t.store.dispatch(Object(vt.r)(!1))}))}),"keyup"),Object(_.a)(window,"blur").subscribe((function(){t.zone.run((function(){return t.store.dispatch(Object(vt.r)(!1))}))}))}},{key:"unregisterKeybinds",value:function(){this.keybinds.dispose(),Object(at.unbind)("alt","keydown"),Object(at.unbind)("alt","keyup")}},{key:"watchSystemHealth",value:function(){var t=this;this.systemHealth$.pipe(Object(lt.a)(Object(ft.None)()),Object(bt.e)(),Object(dt.a)()).subscribe((function(e){var n=m(e,2),i=n[0],r=n[1];me("system health",i.orNull(),r.orNull()),r.contains("maintenance")&&t.router.navigate(["/maintenance"])}))}},{key:"closeNotificationDrawer",value:function(){this.notificationDrawer.close()}},{key:"notificationDrawerToggled",value:function(t){if(!t){if(this.notificationContainer.notifications){var e=this.notificationContainer.notifications.map((function(t){return t.id}));Object(pt.c)(wt.o,e)}this.updateReadNotifs$.next()}}},{key:"openAppStore",value:function(t){window.open("ios"===t?"https://apps.apple.com/us/app/kraken-futures/id1475904904?ls=1":"https://play.google.com/store/apps/details?id=com.krakenfutures","_blank")}},{key:"openDemo",value:function(){window.open("https://demo-futures.kraken.com","_blank")}},{key:"signUp",value:function(){this.env.demo?this.store.dispatch(Object(vt.g)({name:"sign-up-demo"})):window.open(this.env.urls.externalSignUp,"_blank","noopener")}},{key:"signIn",value:function(){this.store.dispatch(Object(vt.g)({name:"sign-in"}))}},{key:"signInQR",value:function(){this.store.dispatch(Object(vt.g)({name:"mobile-login-info"}))}},{key:"signOut",value:function(){this.store.dispatch(Object(mt.B)({source:"self"}))}},{key:"addMoney",value:function(){this.store.dispatch(Object(Ot.a)())}},{key:"restartPlatform",value:function(){this.store.dispatch(Object(vt.p)())}},{key:"setFallbackLanguage",value:function(t){this.translateService.setDefaultLang(t)}},{key:"useLanguage",value:function(t){me("use language",t),this.language=t,this.translateService.use(t),this.persistLanguage(t),document.documentElement.dir=["ar","arc","dv","fa","ha","he","khw","ks","ku","ps","ur","yi"].includes(t)?"rtl":"ltr",document.documentElement.lang=t}},{key:"persistLanguage",value:function(t){me("persisting language preference",t),Object(pt.c)(wt.l,t)}},{key:"currentLanguage",get:function(){var t,e;return null!==(e=null!==(t=this.language)&&void 0!==t?t:Object(pt.b)(wt.l,void 0))&&void 0!==e?e:this.browserLanguage}},{key:"browserLanguage",get:function(){var t=this.translateService.getBrowserLang();return this.env.locales.includes(t)?t:(console.warn('Your current browser language "'.concat(t,'" is not supported yet, using English.')),"en")}},{key:"multipleLocales",get:function(){return this.env.locales.length>1}},{key:"isTrading",get:function(){return this.market.currentMarketClass().isSome()}}]),t}()).\u0275fac=function(t){return new(t||be)(u.Ob(kt.a),u.Ob($t),u.Ob(Lt.a),u.Ob(u.B),u.Ob(p.d),u.Ob(p.a),u.Ob(tt.b),u.Ob(Z.e),u.Ob(Nt.a,2),u.Ob(ne.a),u.Ob(Qt.a),u.Ob(Ct.a),u.Ob(Xt),u.Ob(ee.a))},be.\u0275cmp=u.Ib({type:be,selectors:[["app-root"]],viewQuery:function(t,e){var n;1&t&&(u.Jc(le,!0),u.Jc(de,!0),u.Jc(he,!0)),2&t&&(u.zc(n=u.cc())&&(e.navDrawer=n.first),u.zc(n=u.cc())&&(e.notificationDrawer=n.first),u.zc(n=u.cc())&&(e.notificationContainer=n.first))},features:[u.Bb([Nt.a])],decls:35,vars:70,consts:[["position","end",3,"openedChange"],["notificationDrawer",""],[3,"notifications","close"],["notificationContainer",""],[3,"ngClass"],[3,"demo","isAffiliate","email","userTier","userClassification","hasSubAccounts","logo","platform"],[1,"route"],[3,"email","isAffiliate","userTier","currentLanguage","userClassification","userDetails","toggleNavDrawer","restartPlatform","selectLanguage"],[4,"ngIf"],[3,"notifications","unreadNotifications","currentLanguage","currentTheme","quantityUnits","platform","signedIn","userDetails","openNotificationDraw","updateLanguage","updateTheme"]],template:function(t,e){if(1&t){var n=u.Vb();u.Ub(0,"mat-sidenav-container"),u.Ub(1,"mat-sidenav",0,1),u.bc("openedChange",(function(t){return e.notificationDrawerToggled(t)})),u.Ub(3,"drawer-notifications",2,3),u.bc("close",(function(){return e.closeNotificationDrawer()})),u.gc(5,"async"),u.Tb(),u.Tb(),u.Ub(6,"mat-sidenav-content",4),u.Ub(7,"main"),u.Pb(8,"app-expandable-sidenav",5),u.gc(9,"async"),u.gc(10,"async"),u.gc(11,"async"),u.gc(12,"async"),u.gc(13,"async"),u.gc(14,"async"),u.gc(15,"async"),u.Ub(16,"div",6),u.Pb(17,"router-outlet"),u.Tb(),u.Ub(18,"app-toolbar",7),u.bc("toggleNavDrawer",(function(){return e.navDrawer.toggle()}))("restartPlatform",(function(){return e.restartPlatform()}))("selectLanguage",(function(t){return e.useLanguage(t)})),u.gc(19,"async"),u.gc(20,"async"),u.gc(21,"async"),u.gc(22,"async"),u.gc(23,"async"),u.Tb(),u.Oc(24,fe,1,0,"ticker-bar",8),u.Ub(25,"status-bar",9),u.bc("openNotificationDraw",(function(){return u.Ec(n),u.Ac(2).toggle()}))("updateLanguage",(function(t){return e.useLanguage(t)}))("updateTheme",(function(t){return e.selectTheme(t)})),u.gc(26,"async"),u.gc(27,"async"),u.gc(28,"async"),u.gc(29,"async"),u.gc(30,"async"),u.gc(31,"async"),u.gc(32,"async"),u.Tb(),u.Tb(),u.Oc(33,pe,2,0,"popup-banner",8),u.gc(34,"async"),u.Tb(),u.Tb()}2&t&&(u.Cb(3),u.mc("notifications",u.hc(5,26,e.notifications$)),u.Cb(3),u.mc("ngClass",u.rc(68,ge,e.isTrading)),u.Cb(2),u.mc("demo",e.env.demo)("isAffiliate",u.hc(9,28,e.isAffiliate$))("email",u.hc(10,30,e.email$))("userTier",u.hc(11,32,e.userTier$))("userClassification",u.hc(12,34,e.userClassification$))("hasSubAccounts",u.hc(13,36,e.userHasSubAccounts$))("logo",u.hc(14,38,e.logoUrl$))("platform",u.hc(15,40,e.platform$)),u.Cb(10),u.mc("email",u.hc(19,42,e.email$))("isAffiliate",u.hc(20,44,e.isAffiliate$))("userTier",u.hc(21,46,e.userTier$))("currentLanguage",e.currentLanguage)("userClassification",u.hc(22,48,e.userClassification$))("userDetails",u.hc(23,50,e.userDetails$)),u.Cb(6),u.mc("ngIf",e.isTrading),u.Cb(1),u.mc("notifications",u.hc(26,52,e.notifications$))("unreadNotifications",u.hc(27,54,e.unreadNotifications$))("currentLanguage",e.currentLanguage)("currentTheme",u.hc(28,56,e.activeTheme$))("quantityUnits",u.hc(29,58,e.quantityUnits$))("platform",u.hc(30,60,e.platform$))("signedIn",u.hc(31,62,e.userSignedIn$))("userDetails",u.hc(32,64,e.userDetails$)),u.Cb(8),u.mc("ngIf",u.hc(34,66,e.version.outdated$)))},directives:[ie.b,ie.a,Wt.a,ie.c,g.l,re.a,p.i,oe.a,g.n,ae.a,se.a,ce.a,ue.a],pipes:[g.b],styles:['mat-sidenav-container[_ngcontent-%COMP%]{height:100%;max-height:100%}main[_ngcontent-%COMP%]{display:grid;grid-template:"sidenav toolbar" 46px "sidenav route" 1fr "sidenav footer" 30px/54px 1fr;gap:var(--spacing);padding:var(--spacing)}@media (min-width:1025px) and (max-width:1366px){.is-trading[_ngcontent-%COMP%] main[_ngcontent-%COMP%]{grid-template:"sidenav toolbar" 100px "sidenav route" 1fr "sidenav footer" 30px/54px 1fr}.is-trading[_ngcontent-%COMP%] main[_ngcontent-%COMP%] ticker-bar[_ngcontent-%COMP%]{display:none}}@media (min-width:1367px) and (max-width:1440px){.is-trading[_ngcontent-%COMP%] main[_ngcontent-%COMP%]{grid-template:"sidenav toolbar" 100px "sidenav route" 1fr "sidenav footer" 30px/54px 1fr}.is-trading[_ngcontent-%COMP%] main[_ngcontent-%COMP%] ticker-bar[_ngcontent-%COMP%]{display:none}}@media (min-width:1441px){.is-trading[_ngcontent-%COMP%] main[_ngcontent-%COMP%]{grid-template:"sidenav tickers" 25px "sidenav toolbar" 100px "sidenav route" 1fr "sidenav footer" 30px/54px 1fr}main[_ngcontent-%COMP%] ticker-toolbar[_ngcontent-%COMP%]{display:block}}@media (max-width:1024px){main[_ngcontent-%COMP%]{height:100%;grid-template:"sidenav toolbar" 46px "route route" 1fr/44px 1fr;gap:var(--spacing-s);padding:var(--spacing-s)}main[_ngcontent-%COMP%] market-bar[_ngcontent-%COMP%], main[_ngcontent-%COMP%] ticker-bar[_ngcontent-%COMP%]{display:none}}@media (min-width:1441px){.is-trading[_ngcontent-%COMP%] .route[_ngcontent-%COMP%], .is-trading[_ngcontent-%COMP%] app-footer[_ngcontent-%COMP%], .is-trading[_ngcontent-%COMP%] app-toolbar[_ngcontent-%COMP%]{margin-top:-3px}}app-toolbar[_ngcontent-%COMP%]{grid-area:toolbar}app-expandable-sidenav[_ngcontent-%COMP%]{grid-area:sidenav}app-footer[_ngcontent-%COMP%]{grid-area:footer}.route[_ngcontent-%COMP%]{grid-area:route;--route-outlet-height:calc(100vh - 46px - (var(--spacing) * 4) - 30px);height:var(--route-outlet-height);max-height:var(--route-outlet-height);overflow:hidden}@media (min-width:1367px) and (max-width:1440px){.is-trading[_ngcontent-%COMP%] .route[_ngcontent-%COMP%]{--route-outlet-height:calc(100vh - 100px - (var(--spacing) * 4) - 30px)}}@media (min-width:1025px) and (max-width:1366px){.is-trading[_ngcontent-%COMP%] .route[_ngcontent-%COMP%]{--route-outlet-height:calc(100vh - 100px - (var(--spacing) * 4) - 30px)}}@media (min-width:1441px){.is-trading[_ngcontent-%COMP%] .route[_ngcontent-%COMP%]{--route-outlet-height:calc(100vh - 100px - 25px - (var(--spacing) * 5) - 30px)}}@media (max-width:1024px){.route[_ngcontent-%COMP%]{height:calc(100% - var(--spacing));max-height:calc(100% - var(--spacing))}}@media (max-width:1024px){status-bar[_ngcontent-%COMP%]{display:none}}'],changeDetection:0}),be),ye={provide:kt.a,useFactory:function(){var t=new kt.a,e=window||{},n=e.__env||{};for(var i in n)n.hasOwnProperty(i)&&(t[i]=e.__env[i]);return t}},_e=i("ob6c"),Oe=(i("B6ip"),i("sC+B"),i("Vb9w"),i("eI8f"),i("3ZBw"),i("sJbC"),i("87BI"),i("lj7+"),i("/rTw"),i("zio8"),i("LXEP"),i("sikL"),i("IwOb"),i("YbHt"),i("HeQ8"),i("7fYw"),i("sPsw"),i("G0l2"),i("1a33"),i("5AUt"),i("4cvs"),i("mcff")),ke=i("0tVE");i("rfPA"),i("bBQR"),i("3kIJ"),i("anSm"),i("UDV5"),i("hCLc"),i("EmXI"),i("8spT"),i("cMxr"),i("kfYe"),i("98H0"),i("RnvC"),i("eL2r"),i("cedy"),i("RnHX"),i("I1e+"),i("Ptgi"),i("Fy0W"),i("Q/zH"),i("LCtx"),i("sHul"),i("Qohw"),i("nXbC"),i("AlFj"),i("S4LQ"),i("HGNU"),i("W7x1"),i("gelr"),i("yucr");var we=i("i2L+");i("fLha");var Ce,Te,Se,Ee,xe,Pe,Ae,Ie,Me,De,Re=((Ce=function(){function t(e,n){C(this,t),this.http=e,this.env=n,this.headers=new d.c({"Content-Type":"application/json"}),this.options={headers:this.headers,withCredentials:!0}}return w(t,[{key:"getAffiliateDetails",value:function(){return this.http.get(this.env.urls.rest+"/affiliate",this.options)}},{key:"createAffiliateDetails",value:function(){var t=JSON.stringify("");return this.http.post(this.env.urls.rest+"/affiliate",t,this.options)}}]),t}()).\u0275fac=function(t){return new(t||Ce)(u.Yb(d.a),u.Yb(kt.a))},Ce.\u0275prov=u.Kb({token:Ce,factory:Ce.\u0275fac}),Ce),je=i("vYTc"),Le=((Te=function(){function t(e,n){C(this,t),this.http=e,this.env=n,this.headers=new d.c({"Content-Type":"application/json"}),this.options={headers:this.headers,withCredentials:!0}}return w(t,[{key:"getCurrentPrefs",value:function(){return this.http.get(this.env.urls.rest+"/assignmentprogram/current",this.options)}},{key:"getHistoricalPrefs",value:function(){return this.http.get(this.env.urls.rest+"/assignmentprogram/history",this.options)}},{key:"addPreference",value:function(t){if(Object(je.a)(t.contractType))return this.http.post(this.env.urls.rest+"/assignmentprogram/current",JSON.stringify(Object.assign(Object.assign({},t),{contractType:"flex",contract:t.contractType})),this.options);var e=JSON.stringify(t);return this.http.post(this.env.urls.rest+"/assignmentprogram/current",e,this.options)}},{key:"updatePreferences",value:function(t){var e=JSON.stringify(t);return this.http.post(this.env.urls.rest+"/assignmentprogram/batch",e,this.options)}},{key:"deletePreference",value:function(t){return this.http.request("delete","".concat(this.env.urls.rest,"/assignmentprogram/current/").concat(t),{headers:this.headers,withCredentials:!0})}},{key:"acceptTerms",value:function(){var t=JSON.stringify("");return this.http.post(this.env.urls.rest+"/assignmentprogram/readandagree",t,this.options)}}]),t}()).\u0275fac=function(t){return new(t||Te)(u.Yb(d.a),u.Yb(kt.a))},Te.\u0275prov=u.Kb({token:Te,factory:Te.\u0275fac}),Te),Ne=i("r1OQ"),Ue=i("CLaS"),Fe=i("T5QL"),Be={headers:new d.c({"Content-Type":"application/json"}),withCredentials:!0},ze=((Se=function(){function t(e,n){C(this,t),this.http=e,this.env=n}return w(t,[{key:"getRequiredMargin",value:function(t){return this.http.post(this.env.urls.rest+"/initialmargin",t,Be)}},{key:"getFundingRates",value:function(t){var e=new URL(this.env.urls.rest+"/historicalfundingrates");return e.searchParams.set("symbol",t),this.http.get(e.toString(),Be)}}]),t}()).\u0275fac=function(t){return new(t||Se)(u.Yb(d.a),u.Yb(kt.a))},Se.\u0275prov=u.Kb({token:Se,factory:Se.\u0275fac}),Se),Ve=i("Aey0"),He=i("7UDb"),qe=i("H0/1"),$e=((xe=function(){function t(e,n){C(this,t),this.http=e,this.env=n}return w(t,[{key:"getAdditionalLogs",value:function(t,e){var n=new URL(this.env.urls.rest+"/accountlog");return n.searchParams.set("start",t.beforeId.toString()),e&&n.searchParams.set("types",e.join(",")),this.http.get(n.href,He.a).pipe(Object(A.a)((function(t){return Object(qe.c)(t.log)})))}},{key:"getTransferLogs",value:function(t){return this.getAdditionalLogs(t,["cross-exchange transfer","cross-exchange transfer failed"])}},{key:"getTradeLogs",value:function(t){return this.getAdditionalLogs(t,["futures trade","futures liquidation","futures assignment"])}},{key:"getRecentOrderActivity",value:function(){var t=new URL(this.env.urls.history+"/orders");return this.http.get(t.href,He.a).pipe(Object(A.a)((function(t){return Object(qe.f)(t)})))}},{key:"getManualFiatWithdrawals",value:function(){var t=new URL(this.env.urls.rest+"/fiat/withdrawals/manualwithdrawals");return t.searchParams.set("currencyUnit","EUR"),this.http.get(t.href,He.a).pipe(Object(A.a)((function(t){return Object(qe.e)(t)})))}},{key:"getManualFiatDeposits",value:function(){var t=new URL(this.env.urls.rest+"/fiat/deposits/manualdeposits");return t.searchParams.set("currencyUnit","EUR"),this.http.get(t.href,He.a).pipe(Object(A.a)((function(t){return Object(qe.d)(t)})))}}]),t}()).\u0275fac=function(t){return new(t||xe)(u.Yb(d.a),u.Yb(kt.a))},xe.\u0275prov=u.Kb({token:xe,factory:xe.\u0275fac}),xe),Qe=((Ee=function(){function t(e){C(this,t),this.env=e}return w(t,[{key:"requestPermission",value:function(){return Object(Kt.a)(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!("Notification"in window)){t.next=13;break}if(t.t1="denied"!==Notification.permission,!t.t1){t.next=10;break}if(t.t2="granted"===Notification.permission,t.t2){t.next=9;break}return t.next=7,Notification.requestPermission();case 7:t.t3=t.sent,t.t2="granted"===t.t3;case 9:t.t1=t.t2;case 10:t.t0=t.t1,t.next=14;break;case 13:t.t0=(console.log("notifications not possible"),!1);case 14:return t.abrupt("return",t.t0);case 15:case"end":return t.stop()}}),t)})))}},{key:"notify",value:function(t){var e=t.title,n=t.extras,i=(n=void 0===n?{}:n).body,r=n.onlyWhenInBackground,o=void 0===r||r,a=n.timeout,s=n.tag,c=n.badge,u=n.silent,l=t.events,d=(l=void 0===l?{}:l).onclick,h=l.onclose,f=l.onerror,p=l.onshow;return Object(Kt.a)(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.requestPermission();case 2:if(t.sent){t.next=4;break}return t.abrupt("return");case 4:if(!o||"hidden"===document.visibilityState){t.next=6;break}return t.abrupt("return");case 6:return n=new Notification(e,{body:i,tag:s,badge:c,silent:u,icon:this.env.urls.base+"/favicon.ico"}),t.abrupt("return",(a&&setTimeout(n.close.bind(n),a),d&&n.addEventListener("click",d),h&&n.addEventListener("close",h),f&&n.addEventListener("error",f),p&&n.addEventListener("show",p),n));case 8:case"end":return t.stop()}}),t,this)})))}}]),t}()).\u0275fac=function(t){return new(t||Ee)(u.Yb(kt.a))},Ee.\u0275prov=u.Kb({token:Ee,factory:Ee.\u0275fac}),Ee),We=i("l5Az"),Ge=i("hsG4"),Ye=i("nXdR"),Ke={headers:new d.c({"Content-Type":"application/json"}),withCredentials:!0},Ze=((Pe=function(){function t(e,n){C(this,t),this.http=e,this.env=n}return w(t,[{key:"getDepositDetails",value:function(){return this.http.get(this.env.urls.rest+"/depositInfo",Ke)}},{key:"generateDepositAddress",value:function(t){return this.http.get("".concat(this.env.urls.rest,"/depositInfoWithNewAddress?currency=").concat(t),Ke)}},{key:"transferCrypto",value:function(t){var e,n,i,r,o,a,s,c=(n=m((e=t).source.name.substring(2).toUpperCase().split(Ye.a),2),i=n[0],r=n[1],o=m(e.destination.name.substring(2).toUpperCase().split(Ye.a),2),a=o[0],s=o[1],{amount:e.quantity,fromAccount:{currency:"BTC"===e.source.currency?"XBT":e.source.currency,type:"flex"===e.source.type?"FLEX":"holding"===e.source.type?"CASH":"MARGIN",marginAccount:"futures"===e.source.type?{type:"FUTURES",baseCurrency:i,quoteCurrency:r}:void 0},toAccount:{currency:"BTC"===e.destination.currency?"XBT":e.destination.currency,type:"flex"===e.destination.type?"FLEX":"holding"===e.destination.type?"CASH":"MARGIN",marginAccount:"futures"===e.destination.type?{type:"FUTURES",baseCurrency:a,quoteCurrency:s}:void 0}});return this.http.post(this.env.urls.rest+"/transfer",c,Ke)}},{key:"subAccountWalletTransfer",value:function(t){return this.http.post(this.env.urls.rest+"/transfer/subaccount",t,Object.assign({},Ke))}},{key:"getDetailedMargin",value:function(t){var e=new URL(this.env.urls.rest+"/marginrequirements"),n={name:t.name.toLowerCase()};return this.http.post(e.href,n,Ke)}},{key:"externalWithdrawal",value:function(t,e,n){return this.http.post(this.env.urls.rest+"/crossexchangetransfer/out",{amount:t,currency:e,sourceWallet:n},Ke)}},{key:"cryptoWithdrawal",value:function(t){return this.http.post(this.env.urls.rest+"/withdraw",t,Ke)}},{key:"confirmCryptoWithdrawal",value:function(t,e){return this.http.post(this.env.urls.rest+"/confirmwithdrawal",{authCode:e,withdrawalRequestId:t},Ke)}},{key:"cancelWithdrawal",value:function(t){return this.http.post(this.env.urls.rest+"/cancelwithdrawal",{uid:t},Ke)}},{key:"addDemoMoney",value:function(){return this.http.post(this.env.urls.rest+"/replenish",null,Ke)}},{key:"getFiatDepositDetails",value:function(){return this.http.get(this.env.urls.rest+"/fiat/deposits/details/eur",Ke)}},{key:"getFiatWithdrawalDetails",value:function(){var t=new URL(this.env.urls.rest+"/fiat/withdrawals/details");return t.searchParams.set("currencyUnit","eur"),this.http.get(t.href,Ke)}},{key:"addFiatWithdrawalDetails",value:function(t){var e=t,n=new URL(this.env.urls.rest+"/fiat/withdrawals/details");return n.searchParams.set("currencyUnit","eur"),this.http.post(n.href,e,Ke)}},{key:"removeFiatWithdrawallDetails",value:function(t){return this.http.delete("".concat(this.env.urls.rest,"/fiat/withdrawals/details/").concat(t),Ke)}},{key:"initiateManualWithdrawal",value:function(t){var e=new URL(this.env.urls.rest+"/fiat/withdrawals/manualwithdrawals"),n=Object.assign({},t);return this.http.post(e.href,n,Ke)}},{key:"fetchAuthenticatedWallets",value:function(){return this.http.get(this.env.urls.rest+"/trading/wallets",Ke)}},{key:"fetchAvailableTransferPreferences",value:function(){return this.http.get(this.env.urls.rest+"/available-transfer-preferences",Ke)}},{key:"changeTransferPreference",value:function(t){return this.http.patch(this.env.urls.rest+"/transfer-preferences",{transferPreference:t},Ke)}}]),t}()).\u0275fac=function(t){return new(t||Pe)(u.Yb(d.a),u.Yb(kt.a))},Pe.\u0275prov=u.Kb({token:Pe,factory:Pe.\u0275fac}),Pe),Xe=i("mQ8X"),Je=i("qAYy"),tn=i("KyJX"),en=i("+Px6"),nn=i("YyhG"),rn=i("J/3c"),on=i("MT7k"),an=i("9Ccw"),sn=i("+axt"),cn={layout:St.n,user:xt.o,notifications:function(t,e){return At(t,e)},assignment:Xe.a,tickers:Je.c,margin:tn.a,market:en.b,trades:nn.b,wallets:rn.a,logs:on.a,verification:jt.a,authentication:an.c,affiliate:Tt.d,workspace:Yt.g,env:te.c,prices:sn.b},un=((Ae=function t(e,n,i){var r=this;C(this,t),this.actions=e,this.affiliateService=n,this.translate=i,this.getAffiliateDetails$=Object(_e.d)((function(){return r.actions.pipe(Object(_e.e)(gt.b),Object(M.a)((function(){return r.affiliateService.getAffiliateDetails().pipe(Object(A.a)((function(t){return Object(gt.e)({details:t})})),Object(zt.a)((function(t){var e=t.error,n=r.translate.instant("ERROR.GET_AFFILIATE_ERR"),i=r.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.createAffiliateDetails$=Object(_e.d)((function(){return r.actions.pipe(Object(_e.e)(gt.a),Object(M.a)((function(){return r.affiliateService.createAffiliateDetails().pipe(Object(A.a)((function(t){return Object(gt.e)({details:t})})),Object(zt.a)((function(t){var e=t.error,n=r.translate.instant("ERROR.GET_AFFILIATE_ERR"),i=r.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))}))}).\u0275fac=function(t){return new(t||Ae)(u.Yb(_e.a),u.Yb(Re),u.Yb(Z.e))},Ae.\u0275prov=u.Kb({token:Ae,factory:Ae.\u0275fac}),Ae),ln=i("1ONQ"),dn=((Ie=function t(e,n,i,r){var o=this;C(this,t),this.actions=e,this.assignmentService=n,this.translate=i,this.router=r,this.getCurrentPrefs$=Object(_e.d)((function(){return o.actions.pipe(Object(_e.e)(ln.e),Object(M.a)((function(){return o.assignmentService.getCurrentPrefs().pipe(Object(A.a)((function(t){return Object(ln.h)({preferences:t})})),Object(zt.a)((function(t){var e=t.error,n=o.translate.instant("ERROR.GET_ASSIGNMENT_PREFS_ERR"),i=o.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.getHistoricalPrefs$=Object(_e.d)((function(){return o.actions.pipe(Object(_e.e)(ln.d),Object(M.a)((function(){return o.assignmentService.getHistoricalPrefs().pipe(Object(A.a)((function(t){return Object(ln.g)({history:t})})),Object(zt.a)((function(t){var e=t.error,n=o.translate.instant("ERROR.GET_ASSIGNMENT_HISTORY_ERR"),i=o.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.addPref$=Object(_e.d)((function(){return o.actions.pipe(Object(_e.e)(ln.b),Object(M.a)((function(t){return o.assignmentService.addPreference(t).pipe(Object(M.a)((function(){return[Object(vt.j)({message:"SNACKBAR.ADD_PREFERENCE"}),Object(ln.e)(),Object(ln.d)(),Object(vt.c)()]})),Object(zt.a)((function(t){var e=t.error,n=o.translate.instant("ERROR.ADD_PREFERENCE_ERR"),i=o.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.updatePref$=Object(_e.d)((function(){return o.actions.pipe(Object(_e.e)(ln.i),Object(M.a)((function(t){var e=t.participants;return o.assignmentService.updatePreferences(e).pipe(Object(M.a)((function(){return[Object(vt.j)({message:"Updated assignment preferences"}),Object(ln.e)(),Object(ln.d)(),Object(vt.c)()]})),Object(zt.a)((function(t){var e=t.error,n=o.translate.instant("ERROR.ADD_PREFERENCE_ERR"),i=o.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.deletePref$=Object(_e.d)((function(){return o.actions.pipe(Object(_e.e)(ln.c),Object(M.a)((function(t){var e=t.prefId;return o.assignmentService.deletePreference(e).pipe(Object(M.a)((function(){return[Object(vt.j)({message:"SNACKBAR.DELETED_PREFERENCE"}),Object(ln.d)(),Object(ln.e)()]})),Object(zt.a)((function(t){var e=t.error,n=o.translate.instant("ERROR.DELETE_PREFERENCE_ERR"),i=o.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.acceptTerms$=Object(_e.d)((function(){return o.actions.pipe(Object(_e.e)(ln.a),Object(M.a)((function(){return o.assignmentService.acceptTerms().pipe(Object(M.a)((function(){return[Object(ke.A)({date:ot.DateTime.local().toString()}),Object(vt.j)({message:"SNACKBAR.ACCEPTED_ASSIGNMENT_TERMS"}),Object(vt.c)()]})),Object(j.a)((function(){return o.router.navigate(["/assignment"])})),Object(zt.a)((function(t){var e=t.error,n=o.translate.instant("ERROR.ACCEPT_TERMS_ERR"),i=o.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"}),Object(vt.n)(ln.a.type),Object(vt.c)()]})))})))}))}).\u0275fac=function(t){return new(t||Ie)(u.Yb(_e.a),u.Yb(Le),u.Yb(Z.e),u.Yb(p.d))},Ie.\u0275prov=u.Kb({token:Ie,factory:Ie.\u0275fac}),Ie),hn=i("GoAz"),fn=i("P4Xx"),pn=i("7SLS"),bn=i("Wxxs"),gn=i("1OAy"),mn=((De=function t(e,n,i,r,o,a,s,c,u,l){var d=this;C(this,t),this.store=e,this.router=n,this.actions=i,this.env=r,this.auth=o,this.rest=a,this.fido2=s,this.ws=c,this.translate=u,this.broadcast=l,this.checkSession$=this.rest.createApiEffect({ofType:mt.f,apiStream:function(t){return d.auth.isSignedIn().pipe(Object(A.a)((function(){return t.firstCheck})),Object(ht.a)(d.store.pipe(Object(tt.m)(xt.d))))},onSuccess:function(t){var e=m(t,2),n=e[0];return!e[1]||n?Object(O.a)(Object(ke.l)()):Bt.a},errSnackbarMsg:!1}),this.demoSignIn$=this.rest.createApiEffect({ofType:mt.l,loading:mt.l.type,apiStream:function(t){return d.auth.signIn(t)},onSuccess:function(){return Object(hn.a)([Object(ke.l)(),Object(vt.c)(),Object(vt.j)({message:"SNACKBAR.SIGNIN_SUCCESS"})])},tapPost:function(){d.ws.restartSocket(),d.broadcast.emit("login")},errSnackbarMsg:"SIGNIN_ERR"}),this.signUp$=this.rest.createApiEffect({ofType:mt.C,loading:mt.C.type,apiStream:function(t){return d.auth.signUp(t).pipe(Object(A.a)((function(){return t})))},onSuccess:function(t){var e=t.email,n=t.password;return d.env.demo?Object(hn.a)([Object(vt.c)(),Object(vt.j)({message:"SNACKBAR.SIGNUP_SUCCESS"}),Object(mt.l)({email:e,password:n})]):Object(hn.a)([Object(vt.c)(),Object(vt.g)({name:"confirmation",inputs:{title:"DIALOG.ACTIVATION_REQUIRED.TITLE",subtitle:"DIALOG.ACTIVATION_REQUIRED.SUBTITLE",body:d.translate.instant("DIALOG.ACTIVATION_REQUIRED.BODY"),buttons:[{label:"BUTTON.CLOSE",colour:"accent",actions:[Object(vt.c)()]}]}})])},onError:function(t){return"PASSWORD_COMPROMISED"===t.error.error.toUpperCase()?Object(O.a)(Object(mt.q)({passwordCompromised:!0})):Object(O.a)()},errSnackbarMsg:"SIGNUP_ERR"}),this.subAccountSignup$=this.rest.createApiEffect({ofType:ke.M,loading:ke.M.type,apiStream:function(t){return d.auth.subaccountSignup(t)},onSuccess:function(){return Object(hn.a)([Object(ke.r)(),Object(vt.c)(),Object(vt.j)({message:"SNACKBAR.SUBACCOUNT_SIGNUP_SUCCESS"})])},errSnackbarMsg:"SUBACCOUNT_SIGNUP_ERR"}),this.activateUser$=this.rest.createApiEffect({ofType:mt.c,loading:mt.c.type,apiStream:function(t){var e=t.uid;return d.auth.activateAccount(e)},onSuccess:function(){return Object(hn.a)([Object(vt.c)(),Object(vt.g)({name:"confirmation",inputs:{title:"DIALOG.EMAIL_VERIFIED.TITLE",subtitle:"DIALOG.EMAIL_VERIFIED.SUBTITLE",body:d.translate.instant("DIALOG.EMAIL_VERIFIED.BODY"),buttons:[{label:"BUTTON.SIGNIN",colour:"accent",actions:[Object(vt.c)(),Object(vt.g)({name:"sign-in"})]}]}})])},errSnackbarMsg:"USER_ACTIVATION_ERR"}),this.signedIn$=Object(_e.d)((function(){return d.actions.pipe(Object(_e.e)(mt.D),Object(j.a)((function(){d.ws.restartSocket(),d.broadcast.emit("login")})),Object(A.a)((function(){return Object(ke.l)()})))})),this.signOut$=this.rest.createApiEffect({ofType:mt.B,tapPre:function(){return d.router.navigate(["/futures"])},apiStream:function(t){var e=t.source;return d.auth.signOut().pipe(Object(pn.a)(e))},onSuccess:function(){return Object(hn.a)(t.logoutActions)},onError:function(){return Object(hn.a)(t.logoutActions)},tapPost:function(t){d.ws.restartSocket(),"broadcast"!==t&&d.broadcast.emit("logout")},errSnackbarMsg:"SIGNOUT_ERR"}),this.requestPasswordReset$=this.rest.createApiEffect({ofType:mt.t,loading:mt.t.type,apiStream:function(t){var e=t.email;return d.auth.requestPasswordReset(e)},onSuccess:function(){return Object(O.a)(Object(vt.g)({name:"confirmation",inputs:{title:"DIALOG.PASSWORD_RESET_SENT.TITLE",subtitle:"DIALOG.PASSWORD_RESET_SENT.SUBTITLE",body:d.translate.instant("DIALOG.PASSWORD_RESET_SENT.BODY"),buttons:[{label:"BUTTON.OK",colour:"accent",actions:[Object(vt.c)()]}]}}))},errSnackbarMsg:"PASS_RESET_ERR"}),this.confirmPasswordReset$=this.rest.createApiEffect({ofType:mt.i,loading:mt.i.type,apiStream:function(t){return d.auth.confirmPasswordReset(t)},onSuccess:function(){try{var t=new URL(window.location.href);t.searchParams.delete("password_reset"),window.history.replaceState(null,document.title,t.toString())}catch(e){}return Object(hn.a)([Object(vt.j)({message:"SNACKBAR.NEW_PASS_SUCCESS"}),Object(vt.c)()])},onError:function(t){return"PASSWORD_COMPROMISED"===t.error.error.toUpperCase()?Object(O.a)(Object(mt.q)({passwordCompromised:!0})):Object(O.a)()},errSnackbarMsg:"PASS_SET_ERR"}),this.getHardwareAuthDevices$=this.rest.createApiEffect({ofType:mt.n,apiStream:function(){return d.fido2.fetchCredentials()},onSuccess:function(t){return Object(O.a)(Object(mt.y)({devices:t}))}}),this.deregisterHardwareAuthDevice$=this.rest.createApiEffect({ofType:mt.m,apiStream:function(t){var e=t.id;return d.fido2.deleteCred(e)},onSuccess:function(){return Object(O.a)(Object(mt.n)())}}),this.changePassword$=this.rest.createApiEffect({ofType:mt.d,loading:mt.d.type,apiStream:function(t){return d.auth.changePassword(t)},onSuccess:function(){return Object(hn.a)([Object(vt.j)({message:"SNACKBAR.PASSWORD_CHANGED_SUCCESS"}),Object(mt.B)({source:"self"})])},onError:function(t){return"PASSWORD_COMPROMISED"===t.error.error.toUpperCase()?Object(O.a)(Object(mt.q)({passwordCompromised:!0})):Object(O.a)()},errSnackbarMsg:"CHANGE_PASS_ERR"}),this.activateTotp$=this.rest.createApiEffect({ofType:mt.b,loading:mt.b.type,apiStream:function(t){var e=t.secret,n=t.totp;return d.auth.activateTotp(e,n)},onSuccess:function(){return Object(hn.a)([Object(vt.j)({message:"SNACKBAR.2FA_ACTIVATED_SUCCESS"}),Object(ke.o)()])},errSnackbarMsg:"ACTIVATE_2FA_ERR"}),this.deactivateTotp$=this.rest.createApiEffect({ofType:mt.j,loading:mt.j.type,apiStream:function(t){var e=t.totp;return d.auth.deactivateTotp(e)},onSuccess:function(){return Object(hn.a)([Object(vt.j)({message:"SNACKBAR.2FA_DEACTIVATED_SUCCESS"}),Object(ke.o)()])},errSnackbarMsg:"ACTIVATE_2FA_ERR"}),this.getActiveSessions$=this.rest.createApiEffect({ofType:mt.p,apiStream:function(){return d.auth.getActiveSessions()},onSuccess:function(t){return Object(hn.a)([Object(mt.w)({sessions:t.tokens})])},errSnackbarMsg:"GET_ACTIVE_SESSIONS_ERR"}),this.deleteSession$=this.rest.createApiEffect({ofType:mt.k,loading:mt.k.type,apiStream:function(t){var e=t.uid;return d.auth.deleteSession(e)},onSuccess:function(){return Object(hn.a)([Object(mt.f)({firstCheck:!0}),Object(mt.p)(),Object(vt.j)({message:"SNACKBAR.DELETE_SESSION_SUCCESS"})])},errSnackbarMsg:"DELETE_SESSION_ERR"}),this.replenishSession$=this.rest.createApiEffect({ofType:mt.r,loading:mt.r.type,apiStream:function(){return d.auth.replenishSession()},onSuccess:function(){return Object(hn.a)([Object(mt.f)({firstCheck:!0}),Object(mt.p)(),Object(vt.j)({message:"SNACKBAR.REPLENISH_SESSION_SUCCESS"})])},errSnackbarMsg:"REPLENISH_SESSION_ERR"}),this.fetchSessionLength$=this.rest.createApiEffect({ofType:mt.o,loading:mt.o.type,apiStream:function(){return d.auth.fetchSessionLength()},onSuccess:function(t){var e=t.lifespan;return Object(O.a)(Object(mt.x)({lifespan:e}))}}),this.changeSessionLength$=this.rest.createApiEffect({ofType:mt.e,loading:mt.e.type,apiStream:function(t){var e=t.lifespan;return d.auth.changeSessionLength(e)},onSuccess:function(t){return Object(hn.a)([Object(vt.j)({message:"SNACKBAR.SESSION_CHANGE_SUCCESS"}),Object(mt.x)({lifespan:t}),Object(mt.r)()])},errSnackbarMsg:"SESSION_CHANGE_ERR"}),this.requestMobileToken$=this.rest.createApiEffect({ofType:mt.s,loading:mt.s.type,apiStream:function(t){return d.auth.requestMobileToken(t)},onSuccess:function(t){return Object(hn.a)([Object(mt.A)({qr:t}),Object(vt.j)({message:"SNACKBAR.REQUEST_MOBILE_TOKEN_SUCCESS"}),Object(vt.c)()])},errSnackbarMsg:"REQUEST_MOBILE_TOKEN"}),this.scanMobileToken$=this.rest.createApiEffect({ofType:mt.v,loading:mt.v.type,apiStream:function(t){var e=t.serializedPayload,n=JSON.parse(e).uid;return Object(fn.a)([d.auth.scanMobileToken(e),Object(O.a)(n)])},onSuccess:function(t){var e=m(t,2),n=e[0].confirmationCode,i=e[1];return Object(hn.a)([Object(mt.z)({code:n}),Object(mt.g)({uid:i,count:0}),Object(vt.j)({message:"SNACKBAR.SCAN_MOBILE_TOKEN_SUCCESS"})])},errSnackbarMsg:"SCAN_MOBILE_TOKEN_ERR"}),this.confirmMobileSession$=Object(_e.d)((function(){return d.actions.pipe(Object(_e.e)(mt.h),Object(j.a)((function(){return d.store.dispatch(Object(vt.a)(mt.h.type))})),Object(M.a)((function(t){return d.auth.confirmMobileSession(t).pipe(Object(M.a)((function(){return Object(hn.a)([Object(mt.f)({firstCheck:!0}),Object(mt.z)({code:void 0}),Object(mt.A)({qr:void 0}),Object(mt.p)(),Object(vt.j)({message:"Successfully confirmed mobile session"}),Object(vt.n)(mt.h.type)])})),Object(zt.a)((function(t){var e=t.error,n=d.translate.instant("ERROR.SESSION_CONFIRM_ERR"),i=d.translate.instant("ERROR_CODE."+e.error.toString().toUpperCase());return[Object(vt.c)(),Object(vt.n)(mt.h.type),Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})),Object(L.a)(2e3))})),this.checkStatusConfirmationCode$=Object(_e.d)((function(){return d.actions.pipe(Object(_e.e)(mt.g),Object(j.a)((function(){return d.store.dispatch(Object(vt.a)(mt.g.type))})),Object(M.a)((function(t){return d.auth.checkStatusConfirmationCode(t.uid).pipe(Object(M.a)((function(){return Object(hn.a)([Object(mt.f)({firstCheck:!0}),Object(vt.j)({message:"SNACKBAR.SIGNIN_SUCCESS"}),Object(vt.n)(mt.g.type),Object(vt.c)()])})),Object(j.a)((function(){d.ws.restartSocket(),d.broadcast.emit("login")})),Object(zt.a)((function(){return 40===t.count?[Object(vt.c)(),Object(vt.n)(mt.g.type),Object(vt.j)({message:"ERROR.CHECK_STATUS_TIMEOUT",class:"warn"})]:[Object(mt.g)(Object.assign(Object.assign({},t),{count:t.count+1}))]})))})),Object(L.a)(3e3))}))}).logoutActions=[Object(ke.x)(),Object(mt.u)(),Object(bn.c)(),Object(Ot.q)(),Object(_t.j)(),Object(gn.j)(),Object(ln.f)(),Object(yt.c)(),Object(gt.c)(),Object(vt.j)({message:"SNACKBAR.SIGNOUT_SUCCESS"})],De.\u0275fac=function(t){return new(t||De)(u.Yb(tt.b),u.Yb(p.d),u.Yb(_e.a),u.Yb(kt.a),u.Yb(Ne.a),u.Yb(He.b),u.Yb(Fe.a),u.Yb(Qt.a),u.Yb(Z.e),u.Yb(Xt))},De.\u0275prov=u.Kb({token:De,factory:De.\u0275fac}),De),vn=((Me=function t(e,n){var i=this;C(this,t),this.actions=e,this._document=n,this.setPlatform$=Object(_e.d)((function(){return i.actions.pipe(Object(_e.e)(Jt.a),Object(j.a)((function(t){var e,n=t.platform;i._document.body.setAttribute("platform",n),null===(e=i._document.getElementById("appFavicon"))||void 0===e||e.setAttribute("href","favicon-".concat(n,".ico"))})))}),{dispatch:!1})}).\u0275fac=function(t){return new(t||Me)(u.Yb(_e.a),u.Yb(g.d))},Me.\u0275prov=u.Kb({token:Me,factory:Me.\u0275fac}),Me);function yn(t,e){return e?Object(M.a)((function(){return t}),e):Object(M.a)((function(){return t}))}var _n,On,kn,wn,Cn,Tn,Sn,En,xn,Pn,An,In,Mn,Dn,Rn,jn=i("rTkt"),Ln=i("QmxK"),Nn=i("MRfT"),Un={"assignment-disclaimer":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"B6ip"));case 2:return t.abrupt("return",t.sent.AssignmentDisclaimerComponent);case 3:case"end":return t.stop()}}),t)})))},confirmation:function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"sC+B"));case 2:return t.abrupt("return",t.sent.ConfirmationComponent);case 3:case"end":return t.stop()}}),t)})))},"wallet-transaction":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"AlFj"));case 2:return t.abrupt("return",t.sent.WalletTransactionComponent);case 3:case"end":return t.stop()}}),t)})))},"sign-up-demo":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"eI8f"));case 2:return t.abrupt("return",t.sent.DemoCredentialsComponent);case 3:case"end":return t.stop()}}),t)})))},"edit-order":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"3ZBw"));case 2:return t.abrupt("return",t.sent.EditOrderComponent);case 3:case"end":return t.stop()}}),t)})))},"external-terms":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"sJbC"));case 2:return t.abrupt("return",t.sent.ExternalTermsComponent);case 3:case"end":return t.stop()}}),t)})))},"funding-rates":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"zio8"));case 2:return t.abrupt("return",t.sent.FundingRatesComponent);case 3:case"end":return t.stop()}}),t)})))},"limit-close":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"sikL"));case 2:return t.abrupt("return",t.sent.LimitCloseComponent);case 3:case"end":return t.stop()}}),t)})))},"margin-details":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"YbHt"));case 2:return t.abrupt("return",t.sent.MarginDetailsComponent);case 3:case"end":return t.stop()}}),t)})))},"markets-overview":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"7fYw"));case 2:return t.abrupt("return",t.sent.MarketsOverviewComponent);case 3:case"end":return t.stop()}}),t)})))},"mfa-confirm":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"sPsw"));case 2:return t.abrupt("return",t.sent.MfaConfirmComponent);case 3:case"end":return t.stop()}}),t)})))},"mobile-login-info":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"G0l2"));case 2:return t.abrupt("return",t.sent.MobileLoginInfoComponent);case 3:case"end":return t.stop()}}),t)})))},"mobile-scan":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"1a33"));case 2:return t.abrupt("return",t.sent.MobileScanComponent);case 3:case"end":return t.stop()}}),t)})))},"order-calculators":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"5AUt"));case 2:return t.abrupt("return",t.sent.OrderCalculatorsComponent);case 3:case"end":return t.stop()}}),t)})))},"otp-confirmation":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"kfYe"));case 2:return t.abrupt("return",t.sent.OTPConfirmationComponent);case 3:case"end":return t.stop()}}),t)})))},"password-reset-confirm":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"98H0"));case 2:return t.abrupt("return",t.sent.PasswordResetConfirmComponent);case 3:case"end":return t.stop()}}),t)})))},"password-reset-request":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"RnvC"));case 2:return t.abrupt("return",t.sent.PasswordResetRequestComponent);case 3:case"end":return t.stop()}}),t)})))},"position-assignment":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"eL2r"));case 2:return t.abrupt("return",t.sent.PositionAssignmentComponent);case 3:case"end":return t.stop()}}),t)})))},"private-key":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"cedy"));case 2:return t.abrupt("return",t.sent.PrivateKeyComponent);case 3:case"end":return t.stop()}}),t)})))},"sign-in":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"LCtx"));case 2:return t.abrupt("return",t.sent.SignInComponent);case 3:case"end":return t.stop()}}),t)})))},"sign-up":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"sHul"));case 2:return t.abrupt("return",t.sent.SignUpComponent);case 3:case"end":return t.stop()}}),t)})))},"subaccount-sign-up":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"rP1E"));case 2:return t.abrupt("return",t.sent.SubaccountSignUpComponent);case 3:case"end":return t.stop()}}),t)})))},"create-layout":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"Vb9w"));case 2:return t.abrupt("return",t.sent.CreateLayoutComponent);case 3:case"end":return t.stop()}}),t)})))},"tab-settings":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"Qohw"));case 2:return t.abrupt("return",t.sent.TabSettingsComponent);case 3:case"end":return t.stop()}}),t)})))},tours:function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"nXbC"));case 2:return t.abrupt("return",t.sent.ToursComponent);case 3:case"end":return t.stop()}}),t)})))},"rename-layout":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"Ptgi"));case 2:return t.abrupt("return",t.sent.RenameLayoutComponent);case 3:case"end":return t.stop()}}),t)})))},"layout-loader":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"LXEP"));case 2:return t.abrupt("return",t.sent.LayoutLoaderComponent);case 3:case"end":return t.stop()}}),t)})))},"shortcuts-cheatsheet":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"Q/zH"));case 2:return t.abrupt("return",t.sent.ShortcutsCheatsheetComponent);case 3:case"end":return t.stop()}}),t)})))},"order-confirmation":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"4cvs"));case 2:return t.abrupt("return",t.sent.OrderConfirmationComponent);case 3:case"end":return t.stop()}}),t)})))},"order-details":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.e(0).then(i.bind(null,"zeIl"));case 2:return t.abrupt("return",t.sent.OrderDetailsComponent);case 3:case"end":return t.stop()}}),t)})))},"position-details":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.e(0).then(i.bind(null,"CGx5"));case 2:return t.abrupt("return",t.sent.PositionDetailsComponent);case 3:case"end":return t.stop()}}),t)})))},"fill-details":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.e(0).then(i.bind(null,"wvPa"));case 2:return t.abrupt("return",t.sent.FillDetailsComponent);case 3:case"end":return t.stop()}}),t)})))},"share-position":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.e(0).then(i.bind(null,"C28A"));case 2:return t.abrupt("return",t.sent.SharePositionComponent);case 3:case"end":return t.stop()}}),t)})))},"fee-schedule":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"W7x1"));case 2:return t.abrupt("return",t.sent.FeeSchedulesDialogComponent);case 3:case"end":return t.stop()}}),t)})))},"sg-broker-terms":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"Fy0W"));case 2:return t.abrupt("return",t.sent.SgBrokerTermsComponent);case 3:case"end":return t.stop()}}),t)})))},"recertify-algo":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"I1e+"));case 2:return t.abrupt("return",t.sent.RecertifyAlgoComponent);case 3:case"end":return t.stop()}}),t)})))},"create-algo":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"yucr"));case 2:return t.abrupt("return",t.sent.CreateAlgoComponent);case 3:case"end":return t.stop()}}),t)})))},"uk-retail-popup":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"S4LQ"));case 2:return t.abrupt("return",t.sent.UKRetailPopupComponent);case 3:case"end":return t.stop()}}),t)})))},"fiat-deposit-details":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"87BI"));case 2:return t.abrupt("return",t.sent.FiatDepositDetailsComponent);case 3:case"end":return t.stop()}}),t)})))},"fiat-withdrawal-details":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"/rTw"));case 2:return t.abrupt("return",t.sent.FiatWithdrawalDetailsComponent);case 3:case"end":return t.stop()}}),t)})))},"fiat-withdraw":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"lj7+"));case 2:return t.abrupt("return",t.sent.FiatWithdrawComponent);case 3:case"end":return t.stop()}}),t)})))},"flex-prefs":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"gelr"));case 2:return t.abrupt("return",t.sent.FlexPreferencesComponent);case 3:case"end":return t.stop()}}),t)})))},"waiting-list":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"fLha"));case 2:return t.abrupt("return",t.sent.WaitingListComponent);case 3:case"end":return t.stop()}}),t)})))},"inbound-transfer-popup":function(){return Object(Kt.a)(void 0,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then(i.bind(null,"HGNU"));case 2:return t.abrupt("return",t.sent.InboundTransferPopupComponent);case 3:case"end":return t.stop()}}),t)})))}},Fn=((On=function t(e,n,i,r,o,a,s,c){var u=this;C(this,t),this.store=e,this.actions=n,this.dialog=i,this.translateService=r,this.router=o,this.feature=a,this.health=s,this.toastr=c,this.systemHealthChecks$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(_e.c),yn(u.feature.isEnabled("wsHealth")?u.health.healthWebsocket():Object(ct.a)(0,3e4).pipe(Object(M.a)((function(){return u.health.checkSystemHealth()})))),Object(A.a)((function(t){return Object(vt.z)({health:t})})))})),this.openDialog$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(vt.g),Object(j.a)((function(t){var e=t.name,n=t.inputs;return Object(Kt.a)(u,void 0,void 0,regeneratorRuntime.mark((function t(){var i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=Object.assign(Object.assign({panelClass:"global__dialog",maxHeight:"100%",maxWidth:"100%"},n?{data:n}:void 0),{autoFocus:!1}),!(e in Un)){t.next=10;break}return t.t0=this.dialog,t.next=5,Un[e]();case 5:t.t1=t.sent,t.t2=i,t.t0.open.call(t.t0,t.t1,t.t2),t.next=11;break;case 10:console.warn("Unknown dialog requested:",e);case 11:case"end":return t.stop()}}),t,this)})))})))}),{dispatch:!1}),this.closeDialog$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(vt.c),Object(j.a)((function(){return u.dialog.closeAll()})))}),{dispatch:!1}),this.openMandatoryDialogs$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(vt.i),Object(ht.a)(u.store.select(xt.a),u.store.pipe(Object(tt.m)(xt.i))),Object(j.a)((function(t){var e,n,i=m(t,3),r=(i[0],i[1]),o=i[2],a=o.documents.find((function(t){return"sgb_terms_and_conditions"===t.documentName}));[{trigger:"sgb_platform"===(null===(e=o.details)||void 0===e?void 0:e.platformName)&&!!a&&!r.mtfNoticeShown,dialog:{name:"confirmation",inputs:{title:"Payward Brokers PTE Ltd Notice",body:"\n As per our previous communications via email and platform notice, access to Kraken Futures is now provided by Payward Brokers PTE Ltd.\n\n You can find more details [here](https://support.kraken.com/hc/en-us/sections/360009749092-Payward-Brokers).\n\n If you have an questions, please [contact support](https://support.kraken.com/hc/en-us/requests/new?ticket_form_id=360000286871).\n ",buttons:[{label:"Close",actions:[Object(ke.e)({mtfNoticeShown:!1})]},{label:"Don't show me this again",colour:"accent",actions:[Object(ke.e)({mtfNoticeShown:!0})]}]}}},{trigger:!(null===(n=o.details)||void 0===n?void 0:n.defaultTransferPreference)&&u.feature.isEnabled("transferDestination"),dialog:{name:"inbound-transfer-popup"}}].forEach((function(t){var e=t.trigger,n=t.dialog;e&&u.store.dispatch(Object(vt.g)(n))}))})))}),{dispatch:!1}),this.openSnackbar$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(vt.j),Object(ht.a)(u.store.pipe(Object(tt.m)(xt.a))),Object(j.a)((function(t){var e=m(t,2),n=e[0],i=n.message,r=n.class,o=n.title,a=n.action,s=e[1].snackbars;if(null==s||s){var c=o?u.translateService.instant(o):"",l="".concat(u.translateService.instant(i)," ").concat(a?"

    ":""," ").concat(a?u.translateService.instant(a.actionKey):""),d={progressBar:!0,enableHtml:!0};"warn"===r?u.toastr.error(l,c,Object.assign({timeOut:a?5e3:3e3},d)).onTap.pipe(Object(R.a)(1)).subscribe((function(){(null==a?void 0:a.action)&&u.store.dispatch(a.action)})):"info"===r?u.toastr.info(l,c,Object.assign({timeOut:a?7500:3e3},d)).onTap.pipe(Object(R.a)(1)).subscribe((function(){(null==a?void 0:a.action)&&u.store.dispatch(a.action)})):u.toastr.success(l,c,d)}})))}),{dispatch:!1}),this.openExternalLink$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(vt.h),Object(j.a)((function(t){var e=t.url,n=t.target;return window.open(e,n)})))}),{dispatch:!1}),this.restartPlatform$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(vt.p),Object(j.a)((function(){return location.reload()})))}),{dispatch:!1}),this.applyTheme$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(vt.q),Object(j.a)((function(t){var e=t.theme,n=Object(jn.b)(e);document.body.setAttribute("theme",n),Object(pt.c)(wt.q,e)})))}),{dispatch:!1}),this.navigateToRoute$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(vt.e),Object(j.a)((function(t){var e=t.route;return u.router.navigate([e])})))}),{dispatch:!1})}).\u0275fac=function(t){return new(t||On)(u.Yb(tt.b),u.Yb(_e.a),u.Yb(Oe.b),u.Yb(Z.e),u.Yb(p.d),u.Yb(Lt.a),u.Yb(Ln.a),u.Yb(Nn.b))},On.\u0275prov=u.Kb({token:On,factory:On.\u0275fac}),On),Bn=((_n=function t(e,n,i,r,o){var a=this;C(this,t),this.actions=e,this.logsService=n,this.translate=i,this.ws=r,this.rest=o,this.openPrivateLogFeeds$=Object(_e.d)((function(){return a.actions.pipe(Object(_e.e)(gn.i),Object(M.a)((function(){var t=[];return a.ws.openFeed({feed:"account_log"}),a.ws.openFeed({feed:"deposits_withdrawals"}),t.push(Object(gn.f)()),t})))})),this.closePrivateLogFeeds$=Object(_e.d)((function(){return a.actions.pipe(Object(_e.e)(gn.d),Object(M.a)((function(){return[a.ws.closeFeed({feed:"account_log"}),a.ws.closeFeed({feed:"deposits_withdrawals"})]})))}),{dispatch:!1}),this.getPrivateLogs$=Object(_e.d)((function(){return a.actions.pipe(Object(_e.e)(gn.e),Object(M.a)((function(t){return Object(fn.a)([a.logsService.getAdditionalLogs(t),a.logsService.getTradeLogs(t),a.logsService.getTransferLogs(t)]).pipe(Object(M.a)((function(t){var e=m(t,3),n=e[0],i=e[1],r=e[2];return[Object(gn.a)({logs:n}),Object(gn.a)({logs:i}),Object(gn.a)({logs:r})]})),Object(zt.a)((function(t){var e=t.error,n=a.translate.instant("ERROR.RETRIEVE_LOGS_ERR"),i=a.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.getPrivateOrders$=Object(_e.d)((function(){return a.actions.pipe(Object(_e.e)(gn.f),Object(M.a)((function(){return a.logsService.getRecentOrderActivity().pipe(Object(M.a)((function(t){return[Object(gn.n)({activity:t})]})),Object(zt.a)((function(t){var e=t.error,n=a.translate.instant("ERROR.GET_ORDER_ACTIVITY"),i=a.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.getManualFiatWithdrawals$=this.rest.createApiEffect({ofType:gn.h,apiStream:function(){return a.logsService.getManualFiatWithdrawals()},onSuccess:function(t){return Object(O.a)(Object(gn.l)({withdrawals:t}))},errSnackbarMsg:"GET_MANUAL_FIAT_WITHDRAWALS"}),this.getManualFiatDeposits$=this.rest.createApiEffect({ofType:gn.g,apiStream:function(){return a.logsService.getManualFiatDeposits()},onSuccess:function(t){return Object(O.a)(Object(gn.k)({deposits:t}))},errSnackbarMsg:"GET_MANUAL_FIAT_DEPOSITS"})}).\u0275fac=function(t){return new(t||_n)(u.Yb(_e.a),u.Yb($e),u.Yb(Z.e),u.Yb(Qt.a),u.Yb(He.b))},_n.\u0275prov=u.Kb({token:_n,factory:_n.\u0275fac}),_n),zn=i("1u95"),Vn=((kn=function t(e,n){var i=this;C(this,t),this.rest=e,this.futures=n,this.getInitialMargin$=this.rest.createApiEffect({ofType:zn.b,apiStream:function(t){var e=t.order,n=t.editMargin;return Object(fn.a)([i.futures.getRequiredMargin(e),Object(O.a)(n)])},onSuccess:function(t){var e=m(t,2),n=e[0],i=e[1];return Object(O.a)(i?Object(zn.d)({buy:n.initialMarginBuy,sell:n.initialMarginSell}):Object(zn.e)({buy:n.initialMarginBuy,sell:n.initialMarginSell}))},errSnackbarMsg:"ORDER_MARGINS_ERR"}),this.getBracketInitialMargin$=this.rest.createApiEffect({ofType:zn.a,apiStream:function(t){var e=t.order;return i.futures.getRequiredMargin(e)},onSuccess:function(t){return Object(O.a)(Object(zn.c)({buy:t.initialMarginBuy,sell:t.initialMarginSell}))},errSnackbarMsg:"ORDER_MARGINS_ERR"})}).\u0275fac=function(t){return new(t||kn)(u.Yb(He.b),u.Yb(ze))},kn.\u0275prov=u.Kb({token:kn,factory:kn.\u0275fac}),kn),Hn=i("TYVA"),qn=i("M/Eb"),$n=i("wMit"),Qn=((Cn=function t(e,n,i,r,o,a){var s=this;C(this,t),this.store=e,this.actions=n,this.futures=i,this.market=r,this.rest=o,this.ws=a,this.initMarkets$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)(_e.c),yn(Object(hn.a)([Object($n.h)(),Object($n.e)()])))})),this.setFuturesAssets$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)($n.m),Object(A.a)((function(t){var e=t.markets;return Object($n.k)({assets:Object(qn.a)(e)})})))})),this.fetchMarkets$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)($n.h),Object(ht.a)(s.store.pipe(Object(tt.m)(xt.m))),Object(M.a)((function(t){var e=m(t,2);return e[0],e[1]?Object(O.a)(Object($n.d)()):Object(O.a)(Object($n.f)())})))})),this.fetchFuturesMarkets$=this.rest.createApiEffect({ofType:$n.f,apiStream:function(){return s.market.fetchFuturesMarkets()},onSuccess:function(t){return Object(O.a)(Object($n.m)({markets:t}))}}),this.fetchAuthenticatedFuturesMarkets$=this.rest.createApiEffect({ofType:$n.d,apiStream:function(){return s.market.fetchAuthenticatedFuturesMarkets()},onSuccess:function(t){return Object(O.a)(Object($n.m)({markets:t}))}}),this.setSelectedMarket$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)($n.q),Object(j.a)((function(t){var e=t.symbol;Object(Hn.x)(e)&&localStorage.setItem(wt.p,e.toUpperCase())})))}),{dispatch:!1}),this.openSelectedMarketFeeds$=Object(_e.d)((function(){return s.store.pipe(Object(tt.m)(en.n),Object(dt.a)(),Object(j.a)((function(t){var e=m(t,2),n=e[0],i=e[1];n&&(s.ws.closeFeed({feed:"trade",product_ids:[n.symbol]}),s.ws.closeFeed({feed:"ticker",product_ids:[n.symbol]})),i&&(s.ws.openFeed({feed:"trade",product_ids:[i.symbol]}),s.ws.openFeed({feed:"ticker",product_ids:[i.symbol]}))})))}),{dispatch:!1}),this.getFundingRates$=this.rest.createApiEffect({ofType:$n.j,apiStream:function(t){var e=t.symbol;return s.futures.getFundingRates(e)},onSuccess:function(t){var e=t.rates;return Object(O.a)(Object(vt.g)({name:"funding-rates",inputs:{rates:e}}))}}),this.checkContractExpiry$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)($n.c),Object(M.a)((function(){return s.store.pipe(Object(tt.m)(en.f))})),Object(M.a)((function(t){return t.some((function(t){var e=t.lastTradingTime;return!!e&&ot.DateTime.fromISO(e)0})),Object(A.a)((function(t){var e=t.notifications;return e[e.length-1]})),Object(I.a)((function(t){return"maintenance"===t.type&&!!t.effective_time&&ot.DateTime.fromMillis(t.effective_time)>ot.DateTime.local()&&"high"===t.priority&&!(Object(pt.b)(wt.g,0)===t.effective_time)})),Object(A.a)((function(t){var e=Object(Hn.h)(t.effective_time);Object(pt.c)(wt.g,t.effective_time);var n=r.translate.instant("DIALOG.PLATFORM_DOWNTIME.CONTENT",{countdown:e});return Object(vt.g)({name:"confirmation",inputs:{title:"DIALOG.PLATFORM_DOWNTIME.TITLE",subtitle:"DIALOG.PLATFORM_DOWNTIME.SUBTITLE",body:n,buttons:[{label:"BUTTON.CLOSE",colour:"accent",actions:[Object(vt.c)()]}]}})})))}))}).\u0275fac=function(t){return new(t||wn)(u.Yb(_e.a),u.Yb(Z.e),u.Yb(Qt.a))},wn.\u0275prov=u.Kb({token:wn,factory:wn.\u0275fac}),wn),Gn=i("DpwM"),Yn=((Tn=function t(e,n,i,r,o){var a=this;C(this,t),this.title=e,this.store=n,this.actions=i,this.crypto=r,this.ws=o,this.openMarketTickers$=Object(_e.d)((function(){return a.actions.pipe(Object(_e.e)($n.m),Object(I.a)((function(t){return t.markets.length>0})),Object(j.a)((function(t){var e=t.markets.map((function(t){return t.symbol}));a.ws.openFeed({feed:"ticker_lite",product_ids:e})})))}),{dispatch:!1}),this.setTitleTicker$=Object(_e.d)((function(){return a.store.pipe(Object(tt.m)(Je.p),Object(bt.g)(),Object(ht.a)(a.store.select(te.b)),Object(j.a)((function(t){var e=m(t,2),n=e[0],i=e[1],r=a.crypto.transform(Object(je.j)(n),n),o=n.pair.replace("XBT","BTC");a.title.setTitle("".concat(r," ").concat(o," | ").concat(i))})))}),{dispatch:!1})}).\u0275fac=function(t){return new(t||Tn)(u.Yb(h.c),u.Yb(tt.b),u.Yb(_e.a),u.Yb(Gn.c),u.Yb(Qt.a))},Tn.\u0275prov=u.Kb({token:Tn,factory:Tn.\u0275fac}),Tn),Kn=i("3mST"),Zn=i("prE9"),Xn=i("XcTA"),Jn=((Sn=function t(e,n,i,r,o,a){var s=this;C(this,t),this.actions=e,this.translate=n,this.tradesService=i,this.ws=r,this.notifications=o,this.rest=a,this.openTradesFeeds$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)(_t.h),Object(j.a)((function(){s.ws.openFeed({feed:"open_positions"}),s.ws.openFeed({feed:"open_orders"}),s.ws.openFeed({feed:"fills"})})))}),{dispatch:!1}),this.closeTradesFeeds$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)(_t.e),Object(j.a)((function(){s.ws.closeFeed({feed:"open_positions"}),s.ws.closeFeed({feed:"open_orders"}),s.ws.closeFeed({feed:"fills"})})))}),{dispatch:!1}),this.submitOrder$=this.rest.createApiEffect({ofType:_t.o,loading:_t.o.type,apiStream:function(t){return s.tradesService.submitMarsOrder(t)},onSuccess:function(t){return Object(hn.a)([Object(_t.f)({response:t}),Object(vt.c)()])},errSnackbarMsg:"SUBMIT_ORDER_ERR"}),this.submitBracketOrder$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)(_t.n),Object(M.a)((function(t){var e=t.mainOrder,n=t.takeProfit,i=t.stopLoss;return s.tradesService.submitMarsOrder(e).pipe(Object(M.a)((function(t){return n&&i?Object(k.a)(Object(O.a)(Object(_t.f)({response:t})),Object(O.a)(Object(_t.o)(n)).pipe(Object(L.a)(250)),Object(O.a)(Object(_t.o)(i)).pipe(Object(L.a)(250))):n?Object(k.a)(Object(O.a)(Object(_t.f)({response:t})),Object(O.a)(Object(_t.o)(n)).pipe(Object(L.a)(250))):i?Object(k.a)(Object(O.a)(Object(_t.f)({response:t})),Object(O.a)(Object(_t.o)(i)).pipe(Object(L.a)(250))):Object(O.a)(Object(_t.f)({response:t}))})),Object(zt.a)((function(t){var e=t.error,n=s.translate.instant("ERROR.SUBMIT_ORDER_ERR"),i=s.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.editOrder$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)(_t.g),Object(M.a)((function(t){return s.tradesService.editOrder(t).pipe(Object(M.a)((function(t){var e=t.editStatus;return[Object(_t.f)({response:{status:e.status,orderEvents:e.orderEvents}}),Object(vt.c)()]})),Object(zt.a)((function(t){var e=t.error,n=s.translate.instant("ERROR.SUBMIT_ORDER_ERR"),i=s.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.displayOrderStatus$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)(_t.f),Object(M.a)((function(t){var e=t.response,n=e.status,i=e.orderEvents;return(null!=i?i:[]).map((function(t){return Object(Xn.b)(t)})).map((function(t){return[].concat(b("placed"===n?[Object(vt.j)({message:t,title:"SNACKBAR.ORDER_PLACED_SUCCESS"})]:[]),b("post_would_execute"===n?[Object(vt.j)({message:t,title:"SNACKBAR.ORDER_MATCH_REJECT",class:"warn"})]:[]),b("ioc_would_not_execute"===n?[Object(vt.j)({message:t,title:"SNACKBAR.IOC_ORDER",class:"warn"})]:[]),b("placed_reduced"===n?[Object(vt.j)({message:t,title:"SNACKBAR.ORDER_PLACED_REDUCED"})]:[]),b("filled_reduced"===n?[Object(vt.j)({message:t,title:"SNACKBAR.ORDER_FILLED_REDUCED"})]:[]),b("partially_filled"===n?[Object(vt.j)({message:t,title:"SNACKBAR.ORDER_PARTIALLY_FILLED"})]:[]),b("partially_filled_reduced"===n?[Object(vt.j)({message:t,title:"SNACKBAR.ORDER_PARTIAL_FILL_REDUCED"})]:[]),b("filled"===n?[Object(vt.j)({message:t,title:"SNACKBAR.ORDER_EXECUTED"})]:[]),b("edited"===n?[Object(vt.j)({message:t,title:"SNACKBAR.ORDER_EDITED"})]:[]))})).flat()})))})),this.cancelOrder$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)(_t.d),Object(M.a)((function(t){var e=t.id;return s.tradesService.cancelOrder(e).pipe(Object(M.a)((function(){return[Object(vt.j)({message:"SNACKBAR.ORDER_CANCELLED_SUCCESS"})]})),Object(zt.a)((function(t){var e=t.error,n=s.translate.instant("ERROR.CANCEL_ORDER_ERR"),i=s.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.cancelAllOrders$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)(_t.c),Object(M.a)((function(){return s.tradesService.cancelAllOrders().pipe(Object(M.a)((function(){return[Object(vt.j)({message:"SNACKBAR.ALL_ORDERS_CANCELLED_SUCCESS"})]})),Object(zt.a)((function(t){var e=t.error,n=s.translate.instant("ERROR.CANCEL_ALL_ORDERS_ERR"),i=s.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.notifyExecution$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)(_t.a),Object(Kn.a)(1),Object(j.a)((function(t){var e=t.fills;Promise.all(e.map((function(t){return s.notifications.notify({title:t.instrument+" Execution",extras:{body:"".concat(t.buy?"Buy":"Sell"," ").concat(t.qty," @ ").concat(t.price)}})})))})))}),{dispatch:!1}),this.updateFeesOnContributedVolumeChange$=Object(_e.d)((function(){return s.actions.pipe(Object(_e.e)(_t.a),Object(Kn.a)(1),Object(Zn.a)(2*Vt.e),Object(pn.a)(Object(ke.p)()))}))}).\u0275fac=function(t){return new(t||Sn)(u.Yb(_e.a),u.Yb(Z.e),u.Yb(We.a),u.Yb(Qt.a),u.Yb(Qe),u.Yb(He.b))},Sn.\u0275prov=u.Kb({token:Sn,factory:Sn.\u0275fac}),Sn),ti=i("ppTs"),ei=((xn=function t(e,n,i,r,o){var a=this;C(this,t),this.store=e,this.actions=n,this.userService=i,this.translate=r,this.rest=o,this.getUser$=Object(_e.d)((function(){return a.actions.pipe(Object(_e.e)(ke.l),Object(j.a)((function(){return a.store.dispatch(Object(vt.a)(ke.l.type))})),Object(M.a)((function(){return a.userService.getAccountDetails().pipe(Object(M.a)((function(t){var e=[],n=t.details.userVerification,i=n.investorType,r=n.tier1,o=n.tier2,s=Object.assign({email:t.details.email,countryCode:t.details.countryCode,external:t.external,loginTime:(new Date).toISOString(),isSubAccount:t.isSubAccount,platformName:t.platformName,isRestricted:t.isRestricted,defaultTransferPreference:t.defaultTransferPreference},t.userDetails),c={termsAgreedDate:t.lastReadAndAgreeDate,assignmentProgramAgreedDate:t.assignmentProgramReadAndAgreeDate,allowedEWallet:t.allowedForEWallet},u=JSON.parse(t.frontendData);return e.push(Object(ke.G)(s)),e.push(Object(ke.s)(u)),e.push(Object(ke.I)(c)),e.push(Object(ke.k)()),e.push(Object(ke.r)()),e.push(Object(ke.o)()),e.push(Object(ke.k)()),e.push(Object(ke.n)()),e.push(Object(ke.p)()),e.push(Object($n.d)()),e.push(Object(Ot.f)()),e.push(Object(Ot.h)()),"GBR"===Object(ti.b)(s.countryCode)&&null===t.ukRetailPopupResponseDate&&a.store.dispatch(Object(vt.g)({name:"uk-retail-popup"})),e.push(s.external?Object(gt.e)({details:{isAffiliate:!1}}):Object(gt.b)()),t.accountType&&e.push(Object(bn.d)({accountType:t.accountType})),i&&e.push(Object(bn.e)({classification:i})),r&&e.push(Object(bn.f)({status:r})),o&&e.push(Object(bn.g)({status:o})),Object(hn.a)(e)})),Object(zt.a)((function(t){return a.store.dispatch(Object(vt.n)(ke.l.type)),Object(y.a)(t)})))})),Object(j.a)((function(){return a.store.dispatch(Object(vt.n)(ke.l.type))})))})),this.getSummary$=this.rest.createApiEffect({ofType:ke.o,apiStream:function(){return a.userService.getSummary()},onSuccess:function(t){return Object(O.a)(Object(ke.J)(t))}}),this.acceptTerms$=Object(_e.d)((function(){return a.actions.pipe(Object(_e.e)(ke.a),Object(M.a)((function(){return a.userService.acceptTerms()})),Object(M.a)((function(){return[Object(vt.j)({message:"SNACKBAR.UPDATED_TERMS_SUCCESS"})]})),Object(zt.a)((function(t){var e=t.error,n=a.translate.instant("ERROR.ACCEPT_TERMS_ERR"),i=a.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})),this.activateSSOTransfers$=this.rest.createApiEffect({ofType:ke.b,apiStream:function(){return a.userService.activateSSO()},onSuccess:function(){return Object(hn.a)([Object(vt.j)({message:"SNACKBAR.ACTIVATE_SSO_SUCCESS"}),Object(vt.e)({route:"wallets"}),Object(vt.A)({tour:"wallets"})])},errSnackbarMsg:"ERROR.ACTIVATE_SSO"}),this.processNewSSO$=this.rest.createApiEffect({ofType:ke.t,apiStream:function(){return a.userService.respondUserDoc({documentName:"sgb_terms_and_conditions",response:!0})},onSuccess:function(){return Object(hn.a)([Object(vt.j)({message:"SNACKBAR.UPDATED_TERMS_SUCCESS"}),Object(ke.b)()])},errSnackbarMsg:"ACCEPT_TERMS_ERR"}),this.affirmUKClassification$=this.rest.createApiEffect({ofType:bn.a,apiStream:function(t){var e=t.classification;return a.userService.affirmUKClassification(e)},onSuccess:function(){return Object(hn.a)([Object(ke.l)(),Object(vt.c)()])},errSnackbarMsg:"UK_RETAIL_POPUP"}),this.saveFrontendData$=this.rest.createApiEffect({ofType:[ke.e,ke.d,ke.v,ke.D],loading:ke.e.type,apiStream:function(){return Object(fn.a)([a.store.pipe(Object(bt.n)(xt.m)),a.store.pipe(Object(bt.n)(xt.a))]).pipe(Object(M.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return n?a.userService.saveFrontendData(i):Bt.a})))},errSnackbarMsg:"UPDATE_PREFS_ERR"}),this.setNewsletter$=this.rest.createApiEffect({ofType:ke.C,apiStream:function(t){var e=t.newsletterEnabled;return a.userService.updateNewsletter(e)},errSnackbarMsg:"CHANGE_NEWSLETTER_ERR"}),this.getAPIKeys$=this.rest.createApiEffect({ofType:ke.q,apiStream:function(){return a.userService.getAPIKeys()},onSuccess:function(t){return Object(O.a)(Object(ke.z)(t))},errSnackbarMsg:"GET_API_KEYS_ERR"}),this.createAPIKey$=this.rest.createApiEffect({ofType:ke.h,loading:ke.h.type,apiStream:function(t){return a.userService.createAPIKey(t)},onSuccess:function(t){var e=t.key;return Object(hn.a)([Object(ke.c)(e),Object(vt.c)(),Object(vt.g)({name:"private-key",inputs:{publicKey:e.publicKey,privateKey:e.privateKey}}),Object(vt.j)({message:"SNACKBAR.CREATE_KEY_SUCCESS"})])},errSnackbarMsg:"CREATE_API_KEY_ERR"}),this.deleteAPIKey$=this.rest.createApiEffect({ofType:ke.j,loading:ke.j.type,apiStream:function(t){return a.userService.deleteAPIKey(t)},onSuccess:function(t){return Object(hn.a)([Object(ke.u)({keyId:t}),Object(vt.c)(),Object(vt.j)({message:"SNACKBAR.DELETE_KEY_SUCCESS"})])},errSnackbarMsg:"DELETE_API_KEY_ERR"}),this.resetAPIKey$=this.rest.createApiEffect({ofType:ke.w,loading:ke.w.type,apiStream:function(t){return a.userService.resetAPIKey(t)},onSuccess:function(){return Object(hn.a)([Object(vt.c)(),Object(vt.j)({message:"SNACKBAR.RESET_KEY_SUCCESS"})])},errSnackbarMsg:"RESET_API_KEY_ERR"}),this.fetchEmailAlerts$=this.rest.createApiEffect({ofType:ke.k,loading:ke.k.type,apiStream:function(){return a.userService.fetchEmailAlerts()},onSuccess:function(t){return Object(O.a)(Object(ke.B)(t))}}),this.changeEmailAlerts$=this.rest.createApiEffect({ofType:ke.f,loading:ke.f.type,apiStream:function(t){return a.userService.changeEmailAlerts(t)},onSuccess:function(t){return Object(hn.a)([Object(ke.B)(t),Object(vt.j)({message:"SNACKBAR.ALERTS_CHANGED_SUCCESS"})])},errSnackbarMsg:"CHANGE_ALERTS_ERR"}),this.getSubAccounts$=this.rest.createApiEffect({ofType:ke.r,apiStream:function(){return a.userService.getSubAccounts()},onSuccess:function(t){return Object(hn.a)([Object(ke.E)({accounts:t})])}}),this.fetchUserDocs$=this.rest.createApiEffect({ofType:ke.n,apiStream:function(){return a.userService.getUserDocs()},onSuccess:function(t){return Object(hn.a)([Object(ke.H)({docs:t}),Object(ke.g)(),Object(vt.i)()])}}),this.respondUserDoc$=this.rest.createApiEffect({ofType:ke.y,apiStream:function(t){return a.userService.respondUserDoc(t)},onSuccess:function(){return Object(hn.a)([Object(ke.n)(),Object(vt.j)({message:"SNACKBAR.TERMS_RESPONSE_SAVED"})])},errSnackbarMsg:"DOC_RESPOND_ERR"}),this.checkUserTerms$=Object(_e.d)((function(){return a.actions.pipe(Object(_e.e)(ke.g),Object(ht.a)(a.store.pipe(Object(tt.m)(xt.i))),Object(j.a)((function(t){var e,n,i,r,o,s=m(t,2),c=(s[0],s[1]);if("sgb_platform"===(null===(e=c.details)||void 0===e?void 0:e.platformName)){var u=c.documents.find((function(t){return"sgb_terms_and_conditions"===t.documentName})),l=c.documents.find((function(t){return"terms_and_conditions"===t.documentName}));if(!u&&l)return void a.store.dispatch(Object(vt.g)({name:"sg-broker-terms"}));if((null===(n=c.details)||void 0===n?void 0:n.external)&&!u&&!l)return void a.store.dispatch(Object(vt.g)({name:"external-terms"}))}if((null===(i=c.details)||void 0===i?void 0:i.isRestricted)&&(null===(r=c.details)||void 0===r?void 0:r.countryCode)){var d=Object(ti.b)(null===(o=c.details)||void 0===o?void 0:o.countryCode);if(ti.a.includes(d)){var h=a.translate.instant("RESTRICTED.POPUP."+d);a.store.dispatch(Object(vt.g)({name:"confirmation",inputs:{title:"DIALOG.RESTRICTED.TITLE",body:'\n

    '.concat(h,"

    \n "),buttons:[{label:"BUTTON.CLOSE",colour:"accent",actions:[Object(vt.c)()]}]}}))}}})))}),{dispatch:!1}),this.trySsoActivation$=Object(_e.d)((function(){return a.actions.pipe(Object(_e.e)(ke.H),Object(ht.a)(a.store.pipe(Object(tt.m)(jt.e))),Object(M.a)((function(t){var e=m(t,2),n=e[0],i=e[1];return n.docs.find((function(t){return"sgb_terms_and_conditions"===t.documentName}))&&"NONE"===i?Object(O.a)(Object(ke.t)()):Bt.a})))})),this.fetchUserVolumes$=this.rest.createApiEffect({ofType:ke.p,loading:ke.p.type,apiStream:function(){return a.userService.fetchUserVolumes()},onSuccess:function(t){return Object(O.a)(Object(ke.K)({volumes:t}))},errSnackbarMsg:"FETCH_USER_FEES"}),this.fetchUserAlgos$=this.rest.createApiEffect({ofType:ke.m,loading:ke.m.type,apiStream:function(){return a.userService.getUserAlgos()},onSuccess:function(t){var e=t.algoIds;return Object(O.a)(Object(ke.F)({algos:e}))},errSnackbarMsg:"FETCH_USER_ALGOS"}),this.createAlgo$=this.rest.createApiEffect({ofType:ke.i,apiStream:function(t){var e=t.label;return a.userService.createAlgo(e)},onSuccess:function(){return Object(hn.a)([Object(ke.m)(),Object(vt.c)(),Object(vt.j)({message:"SNACKBAR.CREATE_ALGO"})])},errSnackbarMsg:"CREATE_ALGO"}),this.signAlgo$=this.rest.createApiEffect({ofType:ke.L,apiStream:function(t){var e=t.id;return a.userService.signAlgo(e)},onSuccess:function(){return Object(hn.a)([Object(ke.m)(),Object(vt.c)(),Object(vt.j)({message:"SNACKBAR.SIGNED_ALGO"})])},errSnackbarMsg:"SIGNED_ALGO"})}).\u0275fac=function(t){return new(t||xn)(u.Yb(tt.b),u.Yb(_e.a),u.Yb(Ge.a),u.Yb(Z.e),u.Yb(He.b))},xn.\u0275prov=u.Kb({token:xn,factory:xn.\u0275fac}),xn),ni=((En=function t(e){var n=this;C(this,t),this.actions=e,this.checkTier$=Object(_e.d)((function(){return n.actions.pipe(Object(_e.e)(bn.b),Object(L.a)(5e3),Object(A.a)((function(){return Object(ke.l)()})))}))}).\u0275fac=function(t){return new(t||En)(u.Yb(_e.a))},En.\u0275prov=u.Kb({token:En,factory:En.\u0275fac}),En),ii=i("lx5p"),ri=((An=function t(e,n,i,o,a,s,c){var u=this;C(this,t),this.actions=e,this.walletsService=n,this.translate=i,this.ws=o,this.rest=a,this.feature=s,this.store=c,this.openWalletsFeed$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(Ot.o),Object(j.a)((function(){return u.ws.openFeed({feed:u.feature.isEnabled("flex")?"balances":"account_balances_and_margins"})})))}),{dispatch:!1}),this.closeWalletsFeed$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(Ot.e),Object(j.a)((function(){return u.ws.closeFeed({feed:u.feature.isEnabled("flex")?"balances":"account_balances_and_margins"})})))}),{dispatch:!1}),this.addDemoMoney$=this.rest.createApiEffect({ofType:Ot.a,apiStream:function(){return u.walletsService.addDemoMoney()},onSuccess:function(){return Object(hn.a)([Object(vt.j)({message:"SNACKBAR.DEMO_BALANCES_REPLENISHED"})])},errSnackbarMsg:"REPLENISH_BALANCES_ERR"}),this.getCryptoDepositDetails$=this.rest.createApiEffect({ofType:Ot.i,apiStream:function(){return u.walletsService.getDepositDetails()},onSuccess:function(t){var e=t.status,n=t.addresses;if("accountCanNotDeposit"===e){var i=u.translate.instant("ERROR.GET_DEPOSIT_ERR");return Object(O.a)(Object(vt.j)({message:i,class:"warn"}))}return Object(O.a)(Object(Ot.t)(n))},errSnackbarMsg:!1}),this.getFiatDepositDetails$=this.rest.createApiEffect({ofType:Ot.k,apiStream:function(){return u.walletsService.getFiatDepositDetails()},onSuccess:function(t){return Object(O.a)(Object(Ot.u)(t))},errSnackbarMsg:!1}),this.getFiatWithdrawalAddresses$=this.rest.createApiEffect({ofType:Ot.l,loading:Ot.l.type,apiStream:function(){return u.walletsService.getFiatWithdrawalDetails()},onSuccess:function(t){return Object(O.a)(Object(Ot.v)({addresses:t}))},errSnackbarMsg:!1}),this.addFiatWithdrawalAddress$=this.rest.createApiEffect({ofType:Ot.b,loading:Ot.b.type,apiStream:function(t){return u.walletsService.addFiatWithdrawalDetails(t)},onSuccess:function(){return Object(O.a)(Object(Ot.l)())},errSnackbarMsg:"ADD_FIAT_WITHDRAWAL"}),this.removeFiatWithdrawalAddress$=this.rest.createApiEffect({ofType:Ot.p,loading:Ot.p.type,apiStream:function(t){var e=t.addressUid;return u.walletsService.removeFiatWithdrawallDetails(e)},onSuccess:function(){return Object(O.a)(Object(Ot.l)())},errSnackbarMsg:"REMOVE_FIAT_WITHDRAWAL"}),this.generateCryptoDepositAddress$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(Ot.g),Object(M.a)((function(t){var e=t.wallet;return u.walletsService.generateDepositAddress(e.name).pipe(Object(M.a)((function(t){var n=t.addresses;return[Object(Ot.t)(n),Object(vt.c)(),Object(vt.g)({name:"wallet-transaction",inputs:{type:"deposit",originWallet:e}})]})),Object(zt.a)((function(t){var e=t.error,n=u.translate.instant("ERROR.GET_DEPOSIT_ERR"),i=u.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.walletTransfer$=this.rest.createApiEffect({ofType:Ot.y,loading:Ot.y.type,apiStream:function(t){return u.walletsService.transferCrypto(t)},onSuccess:function(){return Object(hn.a)([Object(vt.c)(),Object(vt.j)({message:"SNACKBAR.WALLET_TRANSFER_SUCCESS"})])},errSnackbarMsg:"WALLET_TRANSFER_ERR"}),this.subAccountWalletTransfer$=this.rest.createApiEffect({ofType:Ot.x,apiStream:function(t){return u.walletsService.subAccountWalletTransfer(t)},onSuccess:function(){return Object(hn.a)([Object(vt.c)(),Object(vt.j)({message:"SNACKBAR.WALLET_TRANSFER_SUCCESS"}),Object(ke.r)()])},errSnackbarMsg:"WALLET_TRANSFER_ERR"}),this.withdrawCrypto$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(Ot.z),Object(M.a)((function(t){return u.walletsService.cryptoWithdrawal(t).pipe(Object(M.a)((function(t){var e=t.withdrawalRequestId,n=Object(Ot.A)({id:e});return Object(O.a)(Object(vt.g)({name:"otp-confirmation",inputs:{title:"DIALOG.WITHDRAWAL_CONFIRMATION.TITLE",action:n}}))})),Object(zt.a)((function(t){var e=t.error,n=u.translate.instant("ERROR.CRYPTO_WITHDRAWAL_ERR"),i=u.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.withdrawCryptoConfirm$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(Ot.A),Object(M.a)((function(t){var e=t.id,n=t.otp;return u.walletsService.confirmCryptoWithdrawal(e,n).pipe(Object(M.a)((function(){return[Object(vt.j)({message:"SNACKBAR.WALLET_WITHDRAWAL_SUCCESS"}),Object(vt.c)()]})),Object(zt.a)((function(t){var e=t.error,n=u.translate.instant("ERROR.WITHDRAWAL_CONFIRMATION_ERR"),i=u.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"}),Object(vt.c)()]})))})))})),this.withdrawCryptoExternal$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(Ot.B),Object(M.a)((function(t){var e=t.amount,n=t.currency,i=t.source;return u.walletsService.externalWithdrawal(e,n,i).pipe(Object(M.a)((function(){var t={title:"DIALOG.WITHDRAWAL_TO_KRAKEN.TITLE",subtitle:"DIALOG.WITHDRAWAL_TO_KRAKEN.SUBTITLE",body:u.translate.instant("DIALOG.WITHDRAWAL_TO_KRAKEN.BODY",{amount:e,currency:n}),buttons:[{label:"BUTTON.VIEW_KRAKEN_STATUS",colour:"accent",actions:[Object(vt.c)(),Object(vt.h)({url:"https://kraken.com/u/funding/transfers",target:"_blank"})]}]};return[Object(vt.g)({name:"confirmation",inputs:t})]})),Object(zt.a)((function(t){var e=t.error,n=u.translate.instant("ERROR.CRYPTO_WITHDRAWAL_ERR"),i=u.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.getDetailedWalletData$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(Ot.j),Object(M.a)((function(t){var e=t.wallet;return u.walletsService.getDetailedMargin(e).pipe(Object(M.a)((function(t){return[Object(vt.g)({name:"margin-details",inputs:{wallet:e,margin:t}})]})),Object(zt.a)((function(t){var e=t.error,n=u.translate.instant("ERROR.DETAILED_MARGIN_ERR"),i=u.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.cancelWithdrawal$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(Ot.c),Object(M.a)((function(t){var e=t.withdrawalId;return u.walletsService.cancelWithdrawal(e).pipe(Object(M.a)((function(){return[Object(vt.j)({message:"SNACKBAR.WITHDRAWAL_CANCELLED"})]})),Object(zt.a)((function(t){var e=t.error,n=u.translate.instant("ERROR.CANCEL_WITHDRAWAL_ERR"),i=u.translate.instant("ERROR_CODE."+e.errors[0].code);return[Object(vt.j)({message:"".concat(n," - ").concat(i),class:"warn"})]})))})))})),this.openTransferDialog$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(Ot.n),Object(ht.a)(u.store.pipe(Object(tt.m)(rn.o),Object(A.a)(ii.O))),Object(j.a)((function(t){var e=m(t,2),n=(e[0],e[1]);n&&u.store.dispatch(Object(vt.g)({name:"wallet-transaction",inputs:{type:"crypto-transfer",originWallet:n}}))})))}),{dispatch:!1}),this.initiateManualFiatWithdrawal$=this.rest.createApiEffect({ofType:Ot.m,loading:Ot.m.type,apiStream:function(t){return u.walletsService.initiateManualWithdrawal(t)},onSuccess:function(){return Object(hn.a)([Object(vt.j)({message:"SNACKBAR.INITIATE_MANUAL_FIAT_WITHDRAWAL"}),Object(gn.h)(),Object(vt.c)()])},errSnackbarMsg:"INITIATE_MANUAL_FIAT_WITHDRAWAL"}),this.fetchAuthenticatedWallets$=this.rest.createApiEffect({ofType:Ot.f,apiStream:function(){return u.walletsService.fetchAuthenticatedWallets().pipe(Object(ht.a)(u.store.select(xt.a)))},onSuccess:function(t){var e=m(t,2),n=e[0],i=e[1];return n.flexibleFutures?i.flexTourShown?Object(hn.a)([Object(Ot.r)({authenticatedWallets:n}),Object($n.g)(),Object($n.i)()]):Object(hn.a)([Object(Ot.r)({authenticatedWallets:n}),Object($n.g)(),Object($n.i)(),Object(vt.A)({tour:"flex"}),Object(ke.e)({flexTourShown:!0})]):Object(O.a)(Object(Ot.r)({authenticatedWallets:n}))},errSnackbarMsg:"Failed to fetch authenticated wallets"}),this.getAvailableTransferPreferences$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(Ot.h),Object(M.a)((function(){return u.walletsService.fetchAvailableTransferPreferences().pipe(Object(M.a)((function(t){var e=t.availableTransferPreferences;return[Object(Ot.s)({availableTransferPreferences:e})]})),Object(zt.a)((function(t){r(t);var e=u.translate.instant("Failed to fetch transfer preferences");return[Object(vt.j)({message:""+e,class:"warn"})]})))})))})),this.changeTransferPreference$=Object(_e.d)((function(){return u.actions.pipe(Object(_e.e)(Ot.d),Object(M.a)((function(t){var e=t.transferPreference;return u.walletsService.changeTransferPreference(e).pipe(Object(M.a)((function(){return[Object(ke.l)(),Object(vt.j)({message:"Succesfully changed inbound transfer preference"}),Object(vt.c)()]})),Object(zt.a)((function(t){r(t);var e=u.translate.instant("Failed to set transfer preferences");return[Object(vt.c)(),Object(vt.j)({message:""+e,class:"warn"})]})))})))}))}).\u0275fac=function(t){return new(t||An)(u.Yb(_e.a),u.Yb(Ze),u.Yb(Z.e),u.Yb(Qt.a),u.Yb(He.b),u.Yb(Lt.a),u.Yb(tt.b))},An.\u0275prov=u.Kb({token:An,factory:An.\u0275fac}),An),oi=((Pn=function t(e,n){var i=this;C(this,t),this.store=e,this.actions=n,this.persistWorkspaces$=Object(_e.d)((function(){return i.actions.pipe(Object(_e.e)(Gt.i,Gt.l,Gt.c,Gt.b,Gt.h,Gt.e,Gt.a,Gt.g,Gt.f,Gt.d,Gt.j),Object(ht.a)(i.store.pipe(Object(tt.m)(Yt.f)),i.store.pipe(Object(tt.m)(Yt.b))),Object(j.a)((function(t){var e=m(t,3),n=e[1],i=e[2];Object(pt.c)(wt.v,n),Object(pt.c)(wt.a,i)})))}),{dispatch:!1}),this.deleteWorkspace$=Object(_e.d)((function(){return i.actions.pipe(Object(_e.e)(Gt.e),Object(j.a)((function(t){var e=t.id;Object(pt.b)("".concat(wt.d,"-").concat(e),null)&&localStorage.removeItem("".concat(wt.d,"-").concat(e))})))}),{dispatch:!1})}).\u0275fac=function(t){return new(t||Pn)(u.Yb(tt.b),u.Yb(_e.a))},Pn.\u0275prov=u.Kb({token:Pn,factory:Pn.\u0275fac}),Pn),ai=i("dWHr"),si=((Mn=function t(e,n){var i=this;C(this,t),this.actions=e,this.ws=n,this.openPricesFeed$=Object(_e.d)((function(){return i.actions.pipe(Object(_e.e)(ai.a,$n.m),Object(j.a)((function(){i.ws.openFeed({feed:"prices"})})))}),{dispatch:!1})}).\u0275fac=function(t){return new(t||Mn)(u.Yb(_e.a),u.Yb(Qt.a))},Mn.\u0275prov=u.Kb({token:Mn,factory:Mn.\u0275fac}),Mn),ci=((In=function(){function t(e,n){C(this,t),this.store=e,this.router=n,this.isAffiliate$=this.store.pipe(Object(tt.m)(Tt.b))}return w(t,[{key:"canActivate",value:function(){var t=this;return this.isAffiliate$.pipe(Object(I.a)((function(t){return void 0!==t})),Object(A.a)((function(e){return!!e||(t.router.navigate(["/futures"]),t.store.dispatch(Object(vt.j)({message:"ERROR.GET_AFFILIATE_ERR",class:"warn"})),!1)})))}}]),t}()).\u0275fac=function(t){return new(t||In)(u.Yb(tt.b),u.Yb(p.d))},In.\u0275prov=u.Kb({token:In,factory:In.\u0275fac}),In),ui=i("iT4G"),li=((Rn=function(){function t(e,n,i){C(this,t),this.store=e,this.auth=n,this.router=i,this.acceptedTerms$=this.store.pipe(Object(tt.m)(xt.z)),this.loggedIn$=this.auth.isSignedIn().pipe(Object(ui.a)(2e3),Object(A.a)((function(){return!0})),Object(zt.a)((function(){return Object(O.a)(!1)}))),this.showAssignment$=Object(st.a)([this.acceptedTerms$,this.loggedIn$])}return w(t,[{key:"canActivate",value:function(){var t=this;return this.showAssignment$.pipe(Object(A.a)((function(e){var n=m(e,2),i=n[0];return n[1]?!!i||(t.store.dispatch(Object(vt.g)({name:"assignment-disclaimer"})),!1):(t.router.navigate(["/futures"]),t.store.dispatch(Object(vt.j)({message:"You must be signed in to access this view",class:"warn"})),!1)})))}}]),t}()).\u0275fac=function(t){return new(t||Rn)(u.Yb(tt.b),u.Yb(Ne.a),u.Yb(p.d))},Rn.\u0275prov=u.Kb({token:Rn,factory:Rn.\u0275fac}),Rn),di=((Dn=function(){function t(e,n,i){C(this,t),this.router=e,this.store=n,this.auth=i,this.loggedIn$=this.auth.isSignedIn().pipe(Object(ui.a)(2e3),Object(A.a)((function(){return!0})),Object(zt.a)((function(){return Object(O.a)(!1)})))}return w(t,[{key:"canActivate",value:function(){var t=this;return this.loggedIn$.pipe(Object(A.a)((function(e){if(e)return!0;t.router.navigate(["/futures"]);var n={action:Object(vt.g)({name:"sign-in"}),actionKey:"LABEL.OPEN_LOGIN_DIALOG"};return t.store.dispatch(Object(vt.k)("LABEL.AUTHENTICATION_GUARD","LABEL.UNAUTHENTICATED",n)),!1})))}}]),t}()).\u0275fac=function(t){return new(t||Dn)(u.Yb(p.d),u.Yb(tt.b),u.Yb(Ne.a))},Dn.\u0275prov=u.Kb({token:Dn,factory:Dn.\u0275fac}),Dn),hi=i("r9za"),fi=i("I2Ru"),pi=i("lruz");i("rP1E");var bi,gi,mi,vi=[we.a,J.b],yi=[di,li,hi.a,ci,fi.a,pi.a],_i=[He.b,We.a,Lt.a,Ne.a,Ge.a,Qt.a,Le,$t,Fe.a,ee.a,ze,Ze,$e,Qe,Re,Ve.a,Ue.a,Xt],Oi=[Fn,ei,Wn,Yn,dn,Vn,Qn,Jn,ri,Bn,ni,mn,un,oi,vn,si],ki=((bi=function(){function t(){C(this,t)}return w(t,null,[{key:"forRoot",value:function(){return{ngModule:t,providers:[].concat(yi,_i)}}}]),t}()).\u0275mod=u.Mb({type:bi}),bi.\u0275inj=u.Lb({factory:function(t){return new(t||bi)},imports:[[].concat(vi,[J.b.forChild(),tt.d.forRoot(cn,{runtimeChecks:{strictActionSerializability:!1,strictStateSerializability:!1,strictActionTypeUniqueness:!0,strictActionWithinNgZone:!0}}),_e.b.forRoot(Oi)],b(l.a)),we.a,J.b]}),bi),wi=i("gNrm"),Ci=[{path:"",pathMatch:"full",redirectTo:"futures"},{path:"outdated",loadChildren:function(){return i.e(12).then(i.bind(null,"Xmr6")).then((function(t){return t.OutdatedModule}))}},{path:"futures",loadChildren:function(){return Promise.all([i.e(0),i.e(9)]).then(i.bind(null,"832e")).then((function(t){return t.FuturesTradingModule}))},data:{marketClass:"futures"}},{path:"wallets",canActivate:[di],loadChildren:function(){return i.e(16).then(i.bind(null,"Xejp")).then((function(t){return t.WalletsModule}))}},{path:"settings",canActivate:[di],loadChildren:function(){return i.e(6).then(i.bind(null,"7wo0")).then((function(t){return t.SettingsModule}))}},{path:"history",canActivate:[di],loadChildren:function(){return i.e(10).then(i.bind(null,"9u+z")).then((function(t){return t.HistoryModule}))}},{path:"support",loadChildren:function(){return i.e(14).then(i.bind(null,"ZlwT")).then((function(t){return t.SupportModule}))}},{path:"assignment",canActivate:[li],loadChildren:function(){return i.e(8).then(i.bind(null,"L6xC")).then((function(t){return t.AssignmentProgramModule}))}},{path:"affiliate",canActivate:[di,ci],loadChildren:function(){return i.e(7).then(i.bind(null,"d326")).then((function(t){return t.AffiliateProgramModule}))}},{path:"verification",canActivate:[di,hi.a],loadChildren:function(){return i.e(15).then(i.bind(null,"Kw+X")).then((function(t){return t.VerificationModule}))}},{path:"subaccounts",canActivate:[di],loadChildren:function(){return i.e(13).then(i.bind(null,"g/4G")).then((function(t){return t.SubaccountsModule}))}},{path:"maintenance",loadChildren:function(){return i.e(11).then(i.bind(null,"8OiN")).then((function(t){return t.MaintenanceModule}))}},{path:"**",redirectTo:"futures"}],Ti=[h.a,K.register("ngsw-worker.js",{enabled:l.b.production}),f.b,p.h.forRoot(Ci,{enableTracing:!1,preloadingStrategy:p.c}),Z.c.forRoot({loader:{provide:Z.b,useFactory:function(t,e){return new X(t,"./assets/i18n/",".json?version="+e.appVersion)},deps:[d.a,kt.a]}}),J.b.forRoot({loader:d.a,markedOptions:{provide:J.d,useFactory:function(){var t=new wi.Renderer,e=t.link;return t.link=function(n,i,r){return e.call(t,n,i,r).replace(/^0,this._updateTextContent()}}},{key:"ngOnDestroy",value:function(){var t=this._badgeElement;t&&(this.description&&this._ariaDescriber.removeDescription(t,this.description),this._renderer.destroyNode&&this._renderer.destroyNode(t))}},{key:"getBadgeElement",value:function(){return this._badgeElement}},{key:"_updateTextContent",value:function(){return this._badgeElement?this._badgeElement.textContent=this._stringifyContent():this._badgeElement=this._createBadgeElement(),this._badgeElement}},{key:"_createBadgeElement",value:function(){var t=this._renderer.createElement("span");return this._clearExistingBadges("mat-badge-content"),t.setAttribute("id","mat-badge-content-"+this._id),t.classList.add("mat-badge-content"),t.textContent=this._stringifyContent(),"NoopAnimations"===this._animationMode&&t.classList.add("_mat-animation-noopable"),this.description&&t.setAttribute("aria-label",this.description),this._elementRef.nativeElement.appendChild(t),"function"==typeof requestAnimationFrame&&"NoopAnimations"!==this._animationMode?this._ngZone.runOutsideAngular((function(){requestAnimationFrame((function(){t.classList.add("mat-badge-active")}))})):t.classList.add("mat-badge-active"),t}},{key:"_updateHostAriaDescription",value:function(t,e){var n=this._updateTextContent();e&&this._ariaDescriber.removeDescription(n,e),t&&this._ariaDescriber.describe(n,t)}},{key:"_setColor",value:function(t){if(t!==this._color){var e=this._elementRef.nativeElement.classList;this._color&&e.remove("mat-badge-"+this._color),t&&e.add("mat-badge-"+t)}}},{key:"_clearExistingBadges",value:function(t){for(var e=this._elementRef.nativeElement,n=e.children.length;n--;){var i=e.children[n];i.classList.contains(t)&&e.removeChild(i)}}},{key:"_stringifyContent",value:function(){var t=this.content;return null==t?"":""+t}},{key:"color",get:function(){return this._color},set:function(t){this._setColor(t),this._color=t}},{key:"overlap",get:function(){return this._overlap},set:function(t){this._overlap=Object(s.c)(t)}},{key:"description",get:function(){return this._description},set:function(t){if(t!==this._description){var e=this._badgeElement;this._updateHostAriaDescription(t,this._description),this._description=t,e&&(t?e.setAttribute("aria-label",t):e.removeAttribute("aria-label"))}}},{key:"hidden",get:function(){return this._hidden},set:function(t){this._hidden=Object(s.c)(t)}}]),n}(d);return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.B),i.Ob(i.l),i.Ob(o.c),i.Ob(i.G),i.Ob(u.a,8))},t.\u0275dir=i.Jb({type:t,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(t,e){2&t&&i.Gb("mat-badge-overlap",e.overlap)("mat-badge-above",e.isAbove())("mat-badge-below",!e.isAbove())("mat-badge-before",!e.isAfter())("mat-badge-after",e.isAfter())("mat-badge-small","small"===e.size)("mat-badge-medium","medium"===e.size)("mat-badge-large","large"===e.size)("mat-badge-hidden",e.hidden||!e._hasContent)("mat-badge-disabled",e.disabled)},inputs:{disabled:["matBadgeDisabled","disabled"],position:["matBadgePosition","position"],size:["matBadgeSize","size"],color:["matBadgeColor","color"],overlap:["matBadgeOverlap","overlap"],description:["matBadgeDescription","description"],hidden:["matBadgeHidden","hidden"],content:["matBadge","content"]},features:[i.zb,i.Ab]}),t}(),f=function(){var t=function t(){C(this,t)};return t.\u0275mod=i.Mb({type:t}),t.\u0275inj=i.Lb({factory:function(e){return new(e||t)},imports:[[o.a,r.j],r.j]}),t}()},za3o:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("kZht"),r=function(){var t=function(){function t(e,n){C(this,t),this.renderer=e,this.element=n}return w(t,[{key:"ngOnInit",value:function(){this.renderer.addClass(this.element.nativeElement,"global__text--capitalize")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Ob(i.G),i.Ob(i.l))},t.\u0275dir=i.Jb({type:t,selectors:[["","capitalize",""]]}),t}()},zdQl:function(t,e,n){"use strict";n.d(e,"d",(function(){return c})),n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return h}));var i=n("zqNl"),r=n("eMi/"),o=n("p5wL"),a={affiliateDetails:{isAffiliate:void 0,affiliateUid:void 0,stats:{total:{accounts:0,received:{xbt:0,xrp:0,eth:0,ltc:0}},recent:{accounts:0,received:{xbt:0,xrp:0,eth:0,ltc:0}}},revenuePercentage:0,referredFeeDiscount:0}},s=Object(i.i)(a,Object(i.k)(r.c,(function(){return a})),Object(i.k)(r.e,(function(t,e){var n=e.details;return Object(o.b)(n,t,"affiliateDetails")})),Object(i.k)(r.d,(function(t,e){var n=e.code;return Object(o.b)(n,t,"affiliateDetails","affiliateUid")})));function c(t,e){return s(t,e)}var u=Object(i.h)("affiliate"),l=Object(i.j)(u,(function(t){return t.affiliateDetails})),d=Object(i.j)(u,(function(t){return t.affiliateDetails.isAffiliate})),h=Object(i.j)(u,(function(t){return t.affiliateDetails.affiliateUid}))},zg4B:function(t,e,n){var i=n("JgBV");function r(t){this.mode=i.NUMERIC,this.data=t.toString()}r.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){var e,n,i;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),i=parseInt(n,10),t.put(i,10);var r=this.data.length-e;r>0&&(n=this.data.substr(e),i=parseInt(n,10),t.put(i,3*r+1))},t.exports=r},zho4:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("lx5p"),r=n("kZht"),o=function(){var t=function(){function t(){C(this,t)}return w(t,[{key:"delays",get:function(){if("string"==typeof this.delay){var t=m(this.delay.split(",").map(i.M).map(Number),2),e=t[0],n=void 0===e?0:e,r=t[1];return[n,void 0===r?0:r]}return"number"==typeof this.delay?[this.delay,this.delay]:this.delay}},{key:"startDelay",get:function(){return this.delays[0]}},{key:"endDelay",get:function(){return this.delays[1]}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Jb({type:t,selectors:[["","sbDelay",""]],inputs:{delay:["sbDelay","delay"]},exportAs:["sbDelay"]}),t}()},zio8:function(t,e,n){"use strict";n.r(e),n.d(e,"FundingRatesComponent",(function(){return j}));var i=n("mcff"),r=n("O30t"),o=n("og7C"),a=n("9hG1"),s=n("KQpv"),c=n.n(s),u=n("lx5p"),l=n("kZht"),d=n("rfPA"),h=n("bBQR"),f=n("EmXI"),p=n("za3o"),b=n("IOEv"),g=n("An66"),v=n("pTnX"),y=n("anSm"),_=n("chaP"),O=n("LbKT"),k=n("aDqW");function T(t,e){if(1&t&&(l.Ub(0,"mat-option",15),l.Qc(1),l.gc(2,"date"),l.Tb()),2&t){var n=e.$implicit,i=l.fc();l.mc("value",i.monthId(n)),l.Cb(1),l.Sc(" ",l.jc(2,2,n.toMillis(),"MMMM y","UTC")," ")}}function S(t,e){1&t&&l.Pb(0,"tr",16)}function E(t,e){1&t&&l.Pb(0,"tr",17)}function x(t,e){1&t&&(l.Ub(0,"th",18),l.Qc(1),l.gc(2,"translate"),l.Tb()),2&t&&(l.Cb(1),l.Sc("",l.hc(2,1,"COLUMN.TIMESPAN")," (UTC)"))}function P(t,e){if(1&t&&(l.Ub(0,"td",19),l.Qc(1),l.gc(2,"date"),l.gc(3,"date"),l.Tb()),2&t){var n=e.$implicit,i=l.fc();l.Cb(1),l.Tc(" ",l.jc(2,2,n.timestamp.toMillis(),"d MMM y - HH:mm","UTC")," \u2013 ",l.jc(3,6,i.fundingPeriodEnd(n.timestamp).toMillis(),"d MMM y - HH:mm","UTC")," ")}}function A(t,e){1&t&&(l.Ub(0,"th",18),l.Qc(1),l.gc(2,"translate"),l.Tb()),2&t&&(l.Cb(1),l.Rc(l.hc(2,1,"COLUMN.HOURLY_RELATIVE_RATE")))}function I(t,e){if(1&t&&(l.Ub(0,"td",20),l.Qc(1),l.gc(2,"number"),l.Tb()),2&t){var n=e.$implicit;l.mc("pnl",n.relativeFundingRate),l.Cb(1),l.Sc(" ",l.ic(2,2,100*n.relativeFundingRate,"1.10-10")," ")}}function M(t,e){1&t&&(l.Ub(0,"th",18),l.Qc(1),l.gc(2,"translate"),l.Tb()),2&t&&(l.Cb(1),l.Rc(l.hc(2,1,"COLUMN.HOURLY_ABSOLUTE_RATE")))}function D(t,e){if(1&t&&(l.Ub(0,"td",20),l.Qc(1),l.gc(2,"number"),l.Tb()),2&t){var n=e.$implicit;l.mc("pnl",n.fundingRate),l.Cb(1),l.Sc(" ",l.ic(2,2,n.fundingRate,"1.10-10")," ")}}var R=c()("app:dialog:funding-rates"),j=function(){var t=function(){function t(e){var n;C(this,t),this.inputs=e,this.monthId=L,this.fundingPeriodEnd=U,this.rates=(n=this.inputs.rates,Object(o.a)(n).map((function(t){return Object.assign(Object.assign({},t),{timestamp:a.DateTime.fromISO(t.timestamp)})}))),this.selectedMonth=a.DateTime.utc().startOf("month"),this.monthsSinceLaunch=function(t){for(var e=a.DateTime.utc().startOf("month"),n=[e],i=e;i>t;)i=i.minus({months:1}),n.push(i);return n}(function(t){return t.minBy((function(t){return t.timestamp.toMillis()})).timestamp}(this.rates)),this.tableColumns=["date","relative_rate","absolute_rate"],this.tableData=new r.k(N(this.rates,this.selectedMonth).toArray())}return w(t,[{key:"selectMonth",value:function(t){var e=m(t.split("-").map(Number),2),n=e[0],i=e[1];R("selecting month - year: ".concat(n,", month: ").concat(i)),this.selectedMonth=a.DateTime.fromObject({year:n,month:i,zone:"utc"}),this.tableData.data=N(this.rates,this.selectedMonth).toArray()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(l.Ob(i.a))},t.\u0275cmp=l.Ib({type:t,selectors:[["funding-rates"]],decls:20,vars:9,consts:[["heading","DIALOG.FUNDING_RATES.TITLE"],[1,"funding-rates"],["color","accent","appearance","fill",1,"month"],["capitalize",""],["matNativeControl","",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["mat-table","",3,"dataSource"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["matColumnDef","date"],["mat-header-cell","",4,"matHeaderCellDef"],["body","","mat-cell","",4,"matCellDef"],["matColumnDef","relative_rate"],["body","","mono","","mat-cell","",3,"pnl",4,"matCellDef"],["matColumnDef","absolute_rate"],[3,"value"],["mat-header-row",""],["mat-row",""],["mat-header-cell",""],["body","","mat-cell",""],["body","","mono","","mat-cell","",3,"pnl"]],template:function(t,e){1&t&&(l.Ub(0,"pro-dialog",0),l.Ub(1,"section",1),l.Ub(2,"mat-form-field",2),l.Ub(3,"mat-label",3),l.Qc(4),l.gc(5,"translate"),l.Tb(),l.Ub(6,"mat-select",4),l.bc("selectionChange",(function(t){return e.selectMonth(t.value)})),l.Oc(7,T,3,6,"mat-option",5),l.Tb(),l.Tb(),l.Ub(8,"table",6),l.Oc(9,S,1,0,"tr",7),l.Oc(10,E,1,0,"tr",8),l.Sb(11,9),l.Oc(12,x,3,3,"th",10),l.Oc(13,P,4,10,"td",11),l.Rb(),l.Sb(14,12),l.Oc(15,A,3,3,"th",10),l.Oc(16,I,3,5,"td",13),l.Rb(),l.Sb(17,14),l.Oc(18,M,3,3,"th",10),l.Oc(19,D,3,5,"td",13),l.Rb(),l.Tb(),l.Tb(),l.Tb()),2&t&&(l.Cb(4),l.Rc(l.hc(5,7,"TAG.MONTH")),l.Cb(2),l.mc("value",e.monthId(e.selectedMonth)),l.Cb(1),l.mc("ngForOf",e.monthsSinceLaunch),l.Cb(1),l.mc("dataSource",e.tableData),l.Cb(1),l.mc("matHeaderRowDef",e.tableColumns)("matHeaderRowDefSticky",!0),l.Cb(1),l.mc("matRowDefColumns",e.tableColumns))},directives:[d.a,h.a,f.c,f.f,p.a,b.a,g.m,r.j,r.g,r.i,r.c,r.e,r.b,v.n,r.f,r.h,r.d,r.a,y.a,_.a,O.a],pipes:[k.d,g.e,g.f],styles:[".funding-rates[_ngcontent-%COMP%]{max-height:60vh;overflow:auto;scrollbar-color:var(--i300) transparent;scrollbar-width:thin}@media (max-width:599px){.funding-rates[_ngcontent-%COMP%]{max-height:calc(100% - var(--toolbar-height))}}.mat-column-date[_ngcontent-%COMP%]{white-space:nowrap}.mat-column-date[_ngcontent-%COMP%], .mat-column-relative_rate[_ngcontent-%COMP%]{padding-right:var(--spacing)}.mat-column-absolute_rate[_ngcontent-%COMP%], .mat-column-relative_rate[_ngcontent-%COMP%]{text-align:right}.month[_ngcontent-%COMP%]{margin:var(--spacing);margin-bottom:calc(-1 * var(--spacing))}"],changeDetection:0}),t}();function L(t){return"".concat(t.toUTC().year,"-").concat(t.toUTC().month)}function N(t,e){return t.filter((function(t){return L(t.timestamp)===L(e)})).sortBy((function(t){return t.timestamp.toMillis()}),u.i)}function U(t){return t.plus({hours:1})}},zn8P:function(t,e){function n(t){return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}))}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"},zqNl:function(e,n,i){"use strict";i.d(n,"a",(function(){return at})),i.d(n,"b",(function(){return ft})),i.d(n,"c",(function(){return Bt})),i.d(n,"d",(function(){return zt})),i.d(n,"e",(function(){return Ft})),i.d(n,"f",(function(){return tt})),i.d(n,"g",(function(){return S})),i.d(n,"h",(function(){return Ot})),i.d(n,"i",(function(){return Yt})),i.d(n,"j",(function(){return yt})),i.d(n,"k",(function(){return Gt})),i.d(n,"l",(function(){return E})),i.d(n,"m",(function(){return bt}));var r=i("kZht"),s=i("C05f"),u=i("IdLP"),l=i("ZTXN"),d=i("kSHZ"),g=i("A2S1"),v=i("w0kG"),y=i("SrNW"),_=i("iLlD"),O=i("YtkY"),k=i("Ohay"),T={};function S(t,e){if(T[t]=(T[t]||0)+1,"function"==typeof e)return x(t,(function(){return Object.assign(Object.assign({},e.apply(void 0,arguments)),{type:t})}));switch(e?e._as:"empty"){case"empty":return x(t,(function(){return{type:t}}));case"props":return x(t,(function(e){return Object.assign(Object.assign({},e),{type:t})}));default:throw new Error("Unexpected config.")}}function E(){return{_as:"props",_p:void 0}}function x(t,e){return Object.defineProperty(e,"type",{value:t,writable:!1})}var P="@ngrx/store/init",A=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.call(this,{type:P})}return w(n,[{key:"next",value:function(t){if("function"==typeof t)throw new TypeError("\n Dispatch expected an object, instead it received a function.\n If you're using the createAction function, make sure to invoke the function\n before dispatching the action. For example, someAction should be someAction().");if(void 0===t)throw new TypeError("Actions must be objects");if(void 0===t.type)throw new TypeError("Actions must have a type property");o(h(n.prototype),"next",this).call(this,t)}},{key:"complete",value:function(){}},{key:"ngOnDestroy",value:function(){o(h(n.prototype),"complete",this).call(this)}}]),n}(s.a);return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Kb({token:t,factory:t.\u0275fac}),t}(),I=[A],M=new r.s("@ngrx/store Internal Root Guard"),D=new r.s("@ngrx/store Internal Initial State"),R=new r.s("@ngrx/store Initial State"),j=new r.s("@ngrx/store Reducer Factory"),L=new r.s("@ngrx/store Internal Reducer Factory Provider"),N=new r.s("@ngrx/store Initial Reducers"),U=new r.s("@ngrx/store Internal Initial Reducers"),F=new r.s("@ngrx/store Store Features"),B=new r.s("@ngrx/store Internal Store Reducers"),z=new r.s("@ngrx/store Internal Feature Reducers"),V=new r.s("@ngrx/store Internal Feature Configs"),H=new r.s("@ngrx/store Internal Store Features"),q=new r.s("@ngrx/store Internal Feature Reducers Token"),$=new r.s("@ngrx/store Feature Reducers"),Q=new r.s("@ngrx/store User Provided Meta Reducers"),W=new r.s("@ngrx/store Meta Reducers"),G=new r.s("@ngrx/store Internal Resolved Meta Reducers"),Y=new r.s("@ngrx/store User Runtime Checks Config"),K=new r.s("@ngrx/store Internal User Runtime Checks Config"),Z=new r.s("@ngrx/store Internal Runtime Checks"),X=new r.s("@ngrx/store Check if Action types are unique");function J(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.keys(t),i={},r=0;r0&&(t=tt.apply(null,[].concat(b(e),[t]))),function(e,n){var i=t(e);return function(t,e){return i(t=void 0===t?n:t,e)}}}var nt=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(u.a),it=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(A),rt=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o){var a;return C(this,n),(a=e.call(this,o(r,i))).dispatcher=t,a.initialState=i,a.reducers=r,a.reducerFactory=o,a}return w(n,[{key:"addFeature",value:function(t){this.addFeatures([t])}},{key:"addFeatures",value:function(t){var e=t.reduce((function(t,e){var n=e.reducers,i=e.reducerFactory,r=e.metaReducers,o=e.initialState,a=e.key,s="function"==typeof n?function(t){var e=Array.isArray(t)&&t.length>0?tt.apply(void 0,b(t)):function(t){return t};return function(t,n){return t=e(t),function(e,i){return t(e=void 0===e?n:e,i)}}}(r)(n,o):et(i,r)(n,o);return t[a]=s,t}),{});this.addReducers(e)}},{key:"removeFeature",value:function(t){this.removeFeatures([t])}},{key:"removeFeatures",value:function(t){this.removeReducers(t.map((function(t){return t.key})))}},{key:"addReducer",value:function(t,e){this.addReducers(f({},t,e))}},{key:"addReducers",value:function(t){this.reducers=Object.assign(Object.assign({},this.reducers),t),this.updateReducers(Object.keys(t))}},{key:"removeReducer",value:function(t){this.removeReducers([t])}},{key:"removeReducers",value:function(t){var e=this;t.forEach((function(t){var n,i;e.reducers=(n=e.reducers,i=t,Object.keys(n).filter((function(t){return t!==i})).reduce((function(t,e){return Object.assign(t,f({},e,n[e]))}),{}))})),this.updateReducers(t)}},{key:"updateReducers",value:function(t){this.next(this.reducerFactory(this.reducers,this.initialState)),this.dispatcher.next({type:"@ngrx/store/update-reducers",features:t})}},{key:"ngOnDestroy",value:function(){this.complete()}}]),n}(s.a);return t.\u0275fac=function(e){return new(e||t)(r.Yb(it),r.Yb(R),r.Yb(N),r.Yb(j))},t.\u0275prov=r.Kb({token:t,factory:t.\u0275fac}),t}(),ot=[rt,{provide:nt,useExisting:rt},{provide:it,useExisting:A}],at=function(){var t=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return w(n,[{key:"ngOnDestroy",value:function(){this.complete()}}]),n}(l.b);return t.\u0275fac=function(e){return st(e||t)},t.\u0275prov=r.Kb({token:t,factory:t.\u0275fac}),t}(),st=r.Wb(at),ct=[at],ut=function(t){a(n,t);var e=c(n);function n(){return C(this,n),e.apply(this,arguments)}return n}(u.a),lt=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r,o){var a;C(this,n),a=e.call(this,o);var s={state:o},c=t.pipe(Object(g.b)(d.b)).pipe(Object(v.a)(i)).pipe(Object(y.a)(dt,s));return a.stateSubscription=c.subscribe((function(t){var e=t.state,n=t.action;a.next(e),r.next(n)})),a}return w(n,[{key:"ngOnDestroy",value:function(){this.stateSubscription.unsubscribe(),this.complete()}}]),n}(s.a);return t.\u0275fac=function(e){return new(e||t)(r.Yb(A),r.Yb(nt),r.Yb(at),r.Yb(R))},t.\u0275prov=r.Kb({token:t,factory:t.\u0275fac}),t.INIT=P,t}();function dt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{state:void 0},e=arguments.length>1?arguments[1]:void 0,n=m(e,2),i=n[0],r=n[1],o=t.state;return{state:r(o,i),action:i}}var ht=[lt,{provide:ut,useExisting:lt}],ft=function(){var t=function(t){a(n,t);var e=c(n);function n(t,i,r){var o;return C(this,n),(o=e.call(this)).actionsObserver=i,o.reducerManager=r,o.source=t,o}return w(n,[{key:"select",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i2?n-2:0),r=2;r1&&void 0!==arguments[1]?arguments[1]:gt,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:gt,r=null,o=null;return{memoized:function(){if(void 0!==e)return e.result;if(!r)return o=t.apply(null,arguments),r=arguments,o;if(!mt(arguments,r,n))return o;var a=t.apply(null,arguments);return r=arguments,i(o,a)?o:(o=a,a)},reset:function(){r=null,o=null},setResult:function(t){e={result:t}},clearResult:function(){e=void 0}}}function yt(){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{stateFn:_t};return function(){for(var i=arguments.length,r=new Array(i),o=0;o1&&void 0!==arguments[1]?arguments[1]:[];return(wt(t)||Ct(t))&&0===e.length?{path:["root"],value:t}:Object.keys(t).reduce((function(n,i){if(n)return n;var r=t[i];return function(t){return Et(t)&&t.hasOwnProperty("\u0275cmp")}(r)?n:!(wt(r)||Ct(r)||function(t){return"number"==typeof t}(r)||function(t){return"boolean"==typeof t}(r)||function(t){return"string"==typeof t}(r)||Tt(r))&&(function(t){if(!function(t){return St(t)&&!Tt(t)}(t))return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}(r)?Pt(r,[].concat(b(e),[i])):{path:[].concat(b(e),[i]),value:r})}),!1)}function At(t,e){if(!1!==t){var n=t.path.join("."),i=new Error("Detected unserializable ".concat(e,' at "').concat(n,'". ').concat(kt,"#strict").concat(e,"serializability"));throw i.value=t.value,i.unserializablePath=n,i}}function It(t){return Object(r.X)()?Object.assign({strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!0,strictActionImmutability:!0,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1},t):{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function Mt(t){var e=t.strictActionSerializability,n=t.strictStateSerializability;return function(t){return e||n?function(t,e){return function(n,i){e.action(i)&&At(Pt(i),"action");var r=t(n,i);return e.state()&&At(Pt(r),"state"),r}}(t,{action:function(t){return e&&!Rt(t)},state:function(){return n}}):t}}function Dt(t){var e=t.strictActionImmutability,n=t.strictStateImmutability;return function(t){return e||n?function(t,e){return function(n,i){var r=e.action(i)?xt(i):i,o=t(n,r);return e.state()?xt(o):o}}(t,{action:function(t){return e&&!Rt(t)},state:function(){return n}}):t}}function Rt(t){return t.type.startsWith("@ngrx")}function jt(t){var e=t.strictActionWithinNgZone;return function(t){return e?function(t,e){return function(n,i){if(e.action(i)&&!r.B.isInAngularZone())throw new Error("Action '".concat(i.type,"' running outside NgZone. ").concat(kt,"#strictactionwithinngzone"));return t(n,i)}}(t,{action:function(t){return e&&!Rt(t)}}):t}}function Lt(){return[{provide:X,multi:!0,deps:[Z],useFactory:Ut}]}function Nt(t){return t}function Ut(t){if(t.strictActionTypeUniqueness){var e=Object.entries(T).filter((function(t){return m(t,2)[1]>1})).map((function(t){return m(t,1)[0]}));if(e.length)throw new Error("Action types are registered more than once, ".concat(e.map((function(t){return'"'.concat(t,'"')})).join(", "),". ").concat(kt,"#strictactiontypeuniqueness"))}}var Ft=function(){var t=function t(e,n,i,r,o,a){C(this,t)};return t.\u0275mod=r.Mb({type:t}),t.\u0275inj=r.Lb({factory:function(e){return new(e||t)(r.Yb(A),r.Yb(nt),r.Yb(at),r.Yb(ft),r.Yb(M,8),r.Yb(X,8))}}),t}(),Bt=function(){var t=function(){function t(e,n,i,r,o){C(this,t),this.features=e,this.featureReducers=n,this.reducerManager=i;var a=e.map((function(t,e){var i=n.shift()[e];return Object.assign(Object.assign({},t),{reducers:i,initialState:$t(t.initialState)})}));i.addFeatures(a)}return w(t,[{key:"ngOnDestroy",value:function(){this.reducerManager.removeFeatures(this.features)}}]),t}();return t.\u0275mod=r.Mb({type:t}),t.\u0275inj=r.Lb({factory:function(e){return new(e||t)(r.Yb(H),r.Yb($),r.Yb(rt),r.Yb(Ft),r.Yb(X,8))}}),t}(),zt=function(){var t=function(){function t(){C(this,t)}return w(t,null,[{key:"forRoot",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{ngModule:Ft,providers:[{provide:M,useFactory:Wt,deps:[[ft,new r.C,new r.L]]},{provide:D,useValue:n.initialState},{provide:R,useFactory:$t,deps:[D]},{provide:U,useValue:t},{provide:B,useExisting:t instanceof r.s?t:U},{provide:N,deps:[r.t,U,[new r.q(B)]],useFactory:Vt},{provide:Q,useValue:n.metaReducers?n.metaReducers:[]},{provide:G,deps:[W,Q],useFactory:Qt},{provide:L,useValue:n.reducerFactory?n.reducerFactory:J},{provide:j,deps:[L,G],useFactory:et},I,ot,ct,ht,pt,(e=n.runtimeChecks,[{provide:K,useValue:e},{provide:Y,useFactory:Nt,deps:[K]},{provide:Z,deps:[Y],useFactory:It},{provide:W,multi:!0,deps:[Z],useFactory:Dt},{provide:W,multi:!0,deps:[Z],useFactory:Mt},{provide:W,multi:!0,deps:[Z],useFactory:jt}]),Lt()]}}},{key:"forFeature",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{ngModule:Bt,providers:[{provide:V,multi:!0,useValue:n},{provide:F,multi:!0,useValue:{key:t,reducerFactory:n instanceof r.s||!n.reducerFactory?J:n.reducerFactory,metaReducers:n instanceof r.s||!n.metaReducers?[]:n.metaReducers,initialState:n instanceof r.s||!n.initialState?void 0:n.initialState}},{provide:H,deps:[r.t,V,F],useFactory:Ht},{provide:z,multi:!0,useValue:e},{provide:q,multi:!0,useExisting:e instanceof r.s?e:z},{provide:$,multi:!0,deps:[r.t,z,[new r.q(q)]],useFactory:qt},Lt()]}}}]),t}();return t.\u0275mod=r.Mb({type:t}),t.\u0275inj=r.Lb({factory:function(e){return new(e||t)}}),t}();function Vt(t,e){return e instanceof r.s?t.get(e):e}function Ht(t,e,n){return n.map((function(n,i){if(e[i]instanceof r.s){var o=t.get(e[i]);return{key:n.key,reducerFactory:o.reducerFactory?o.reducerFactory:J,metaReducers:o.metaReducers?o.metaReducers:[],initialState:o.initialState}}return n}))}function qt(t,e){return e.map((function(e){return e instanceof r.s?t.get(e):e}))}function $t(t){return"function"==typeof t?t():t}function Qt(t,e){return t.concat(e)}function Wt(t){if(t)throw new TypeError("StoreModule.forRoot() called twice. Feature modules should use StoreModule.forFeature() instead.");return"guarded"}function Gt(){for(var t=arguments.length,e=new Array(t),n=0;n1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:t,i=arguments.length>1?arguments[1]:void 0,r=e.get(i.type);return r?r(n,i):n}}}},[[0,1]]])}();